@gusto/embedded-react-sdk 0.8.0 → 0.8.2
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 +20 -3
- package/dist/components/Base/Base.d.ts +6 -5
- package/dist/components/Base/Base.js +40 -39
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/index.d.ts +1 -0
- package/dist/components/Common/ActionsLayout/index.d.ts +1 -0
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +5 -3
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/index.d.ts +1 -0
- package/dist/components/Common/DataView/index.d.ts +1 -0
- package/dist/components/Common/DocumentList/index.d.ts +1 -0
- package/dist/components/Common/DocumentViewer/index.d.ts +1 -0
- package/dist/components/Common/FadeIn/FadeIn.module.scss.js +4 -4
- package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.js +1 -1
- package/dist/components/Common/FieldCaption/FieldCaption.js.map +1 -0
- package/dist/components/Common/{UI/FieldCaption → FieldCaption}/index.d.ts +1 -0
- package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.js +1 -1
- package/dist/components/Common/FieldDescription/FieldDescription.js.map +1 -0
- package/dist/components/Common/{UI/FieldDescription → FieldDescription}/index.d.ts +1 -0
- package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.js +1 -1
- package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.js.map +1 -0
- package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/index.d.ts +1 -0
- package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.js +1 -1
- package/dist/components/Common/FieldLayout/FieldLayout.js.map +1 -0
- package/dist/components/Common/FieldLayout/FieldLayoutTypes.d.ts +52 -0
- package/dist/components/Common/{UI/FieldLayout → FieldLayout}/index.d.ts +1 -0
- package/dist/components/Common/Fields/CheckboxField/index.d.ts +1 -0
- package/dist/components/Common/Fields/CheckboxGroupField/index.d.ts +1 -0
- package/dist/components/Common/Fields/ComboBoxField/index.d.ts +1 -0
- package/dist/components/Common/Fields/DatePickerField/index.d.ts +1 -0
- package/dist/components/Common/Fields/NumberInputField/index.d.ts +1 -0
- package/dist/components/Common/Fields/RadioGroupField/index.d.ts +1 -0
- package/dist/components/Common/Fields/SelectField/index.d.ts +1 -0
- package/dist/components/Common/Fields/SwitchField/index.d.ts +1 -0
- package/dist/components/Common/Fields/TextInputField/index.d.ts +1 -0
- package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.js +1 -1
- package/dist/components/Common/Fieldset/Fieldset.js.map +1 -0
- package/dist/components/Common/{UI/Fieldset → Fieldset}/index.d.ts +1 -0
- package/dist/components/Common/Flex/index.d.ts +1 -0
- package/dist/components/Common/Form/index.d.ts +1 -0
- package/dist/components/Common/HamburgerMenu/index.d.ts +1 -0
- package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.js +2 -2
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.js.map +1 -0
- package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/index.d.ts +1 -0
- package/dist/components/Common/PaginationControl/index.d.ts +1 -0
- package/dist/components/Common/ReorderableList/index.d.ts +1 -0
- package/dist/components/Common/SignatureForm/SignatureForm.d.ts +12 -6
- package/dist/components/Common/SignatureForm/SignatureForm.js +10 -10
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/index.d.ts +1 -0
- package/dist/components/Common/TaxInputs/index.d.ts +1 -0
- package/dist/components/Common/UI/Alert/Alert.d.ts +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +13 -12
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/AlertTypes.d.ts +16 -4
- package/dist/components/Common/UI/Alert/index.d.ts +1 -0
- package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +6 -0
- package/dist/components/Common/UI/Button/Button.js +28 -27
- package/dist/components/Common/UI/Button/Button.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
- package/dist/components/Common/UI/Button/ButtonTypes.d.ts +29 -4
- package/dist/components/Common/UI/Button/index.d.ts +1 -0
- package/dist/components/Common/UI/CalendarPreview/CalendarPreviewTypes.d.ts +24 -0
- package/dist/components/Common/UI/CalendarPreview/index.d.ts +1 -0
- package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
- package/dist/components/Common/UI/Card/CardTypes.d.ts +12 -4
- package/dist/components/Common/UI/Checkbox/Checkbox.js +4 -4
- package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Common/UI/Checkbox/CheckboxTypes.d.ts +16 -1
- package/dist/components/Common/UI/Checkbox/index.d.ts +1 -0
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js +4 -4
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +33 -3
- package/dist/components/Common/UI/CheckboxGroup/index.d.ts +1 -0
- package/dist/components/Common/UI/ComboBox/ComboBox.js +8 -8
- package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +31 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js +13 -13
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +25 -1
- package/dist/components/Common/UI/DatePicker/index.d.ts +1 -0
- package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +12 -0
- package/dist/components/Common/UI/Heading/index.d.ts +1 -0
- package/dist/components/Common/UI/Input/index.d.ts +1 -0
- package/dist/components/Common/UI/Link/LinkTypes.d.ts +53 -1
- package/dist/components/Common/UI/Link/index.d.ts +1 -0
- package/dist/components/Common/UI/List/ListTypes.d.ts +3 -5
- package/dist/components/Common/UI/List/index.d.ts +1 -0
- package/dist/components/Common/UI/Menu/MenuTypes.d.ts +30 -0
- package/dist/components/Common/UI/Menu/index.d.ts +1 -0
- package/dist/components/Common/UI/NumberInput/NumberInput.js +4 -4
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +34 -1
- package/dist/components/Common/UI/NumberInput/index.d.ts +1 -0
- package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +12 -0
- package/dist/components/Common/UI/ProgressBar/index.d.ts +1 -0
- package/dist/components/Common/UI/Radio/Radio.js +1 -1
- package/dist/components/Common/UI/Radio/Radio.js.map +1 -1
- package/dist/components/Common/UI/Radio/RadioTypes.d.ts +16 -1
- package/dist/components/Common/UI/Radio/index.d.ts +1 -0
- package/dist/components/Common/UI/RadioGroup/RadioGroup.js +4 -4
- package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +33 -3
- package/dist/components/Common/UI/RadioGroup/index.d.ts +1 -0
- package/dist/components/Common/UI/Select/Select.js +8 -8
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +34 -1
- package/dist/components/Common/UI/Select/index.d.ts +1 -0
- package/dist/components/Common/UI/Switch/Switch.js +1 -1
- package/dist/components/Common/UI/Switch/Switch.js.map +1 -1
- package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +25 -1
- package/dist/components/Common/UI/Switch/index.d.ts +1 -0
- package/dist/components/Common/UI/Table/TableTypes.d.ts +21 -0
- package/dist/components/Common/UI/Table/index.d.ts +1 -0
- package/dist/components/Common/UI/Text/TextTypes.d.ts +18 -0
- package/dist/components/Common/UI/Text/index.d.ts +1 -0
- package/dist/components/Common/UI/TextInput/TextInput.js +1 -1
- package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
- package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +22 -1
- package/dist/components/Common/UI/TextInput/index.d.ts +1 -0
- package/dist/components/Common/VisuallyHidden/index.d.ts +1 -0
- package/dist/components/Common/index.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/AssignSignatory.d.ts +3 -3
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +26 -25
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -7
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.d.ts +2 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.d.ts +41 -15
- package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js +17 -20
- package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/index.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +10 -10
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +17 -11
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +42 -45
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/index.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/index.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccount.d.ts +10 -0
- package/dist/components/Company/BankAccount/BankAccount.js +32 -0
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -0
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +6 -6
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +12 -6
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +2 -2
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +10 -10
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +12 -6
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +17 -17
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -0
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +13 -0
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +63 -0
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -0
- package/dist/components/Company/DocumentSigner/DocumentList/Head.js.map +1 -0
- package/dist/components/Company/DocumentSigner/DocumentList/List.js.map +1 -0
- package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.js.map +1 -0
- package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/index.d.ts +1 -0
- package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -0
- package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +12 -0
- package/dist/components/Company/DocumentSigner/DocumentSigner.js +41 -0
- package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js.map +1 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/Form.js.map +1 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/Head.js.map +1 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js.map +1 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +14 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +72 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -0
- package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/index.d.ts +1 -0
- package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -0
- package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -0
- package/dist/components/Company/DocumentSigner/documentSignerStateMachine.js.map +1 -0
- package/dist/components/Company/DocumentSigner/index.d.ts +2 -0
- package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -0
- package/dist/components/Company/FederalTaxes/FederalTaxes.d.ts +1 -4
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +31 -31
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/index.d.ts +1 -0
- package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +18 -8
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -15
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Industry.d.ts +1 -1
- package/dist/components/Company/Industry/Industry.js +29 -28
- package/dist/components/Company/Industry/Industry.js.map +1 -1
- package/dist/components/Company/Industry/index.d.ts +1 -0
- package/dist/components/Company/Locations/LocationForm/Form.d.ts +27 -11
- package/dist/components/Company/Locations/LocationForm/Form.js +24 -24
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +24 -24
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/Locations.d.ts +9 -0
- package/dist/components/Company/Locations/Locations.js +27 -0
- package/dist/components/Company/Locations/Locations.js.map +1 -0
- package/dist/components/Company/Locations/LocationsList/LocationsList.d.ts +3 -3
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +27 -32
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/index.d.ts +1 -0
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +2 -2
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js +13 -13
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js +3 -3
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.d.ts +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +15 -15
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.d.ts +2 -2
- package/dist/components/Company/PaySchedule/PaySchedule.js +68 -67
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +28 -31
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.module.scss.js +8 -0
- package/dist/components/Company/PaySchedule/_parts/List.module.scss.js.map +1 -0
- package/dist/components/Company/PaySchedule/_parts/index.d.ts +1 -0
- package/dist/components/Company/PaySchedule/index.d.ts +1 -0
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +31 -13
- package/dist/components/Company/PaySchedule/usePaySchedule.js +13 -19
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxes.d.ts +9 -0
- package/dist/components/Company/StateTaxes/StateTaxes.js +27 -0
- package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -0
- package/dist/components/Company/StateTaxes/{StateTaxesFlowComponents.js → StateTaxesComponents.js} +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +3 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +3 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +66 -77
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +3 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +1 -1
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
- package/dist/components/Company/index.d.ts +7 -6
- package/dist/components/Company/index.js +18 -18
- package/dist/components/Employee/Compensation/Compensation.d.ts +1 -1
- package/dist/components/Employee/Compensation/Compensation.js +48 -47
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +17 -16
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +10 -10
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Compensation/index.d.ts +1 -0
- package/dist/components/Employee/Compensation/useCompensation.d.ts +53 -45
- package/dist/components/Employee/Compensation/useCompensation.js +59 -68
- package/dist/components/Employee/Compensation/useCompensation.js.map +1 -1
- package/dist/components/Employee/Deductions/Deductions.d.ts +11 -7
- package/dist/components/Employee/Deductions/Deductions.js +76 -74
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/index.d.ts +1 -0
- package/dist/components/Employee/Deductions/useDeductions.d.ts +34 -14
- package/dist/components/Employee/Deductions/useDeductions.js +10 -29
- package/dist/components/Employee/Deductions/useDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentSigner.d.ts +11 -0
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js +27 -0
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -0
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/index.d.ts +2 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +38 -38
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.d.ts +1 -1
- package/dist/components/Employee/Landing/Landing.js +5 -5
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/Landing/index.d.ts +1 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +27 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +29 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -0
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +107 -0
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -0
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.d.ts +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +30 -30
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/index.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +22 -10
- package/dist/components/Employee/PaymentMethod/BankAccount.js +9 -9
- package/dist/components/Employee/PaymentMethod/BankAccount.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +74 -74
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +10 -6
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +8 -8
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/index.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +92 -37
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +31 -39
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +68 -31
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +33 -46
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.d.ts +33 -13
- package/dist/components/Employee/Profile/HomeAddress.js +39 -38
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +81 -32
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +60 -74
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.d.ts +1 -1
- package/dist/components/Employee/Profile/Profile.js +69 -72
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +44 -15
- package/dist/components/Employee/Profile/SelfPersonalDetails.js +18 -21
- package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/index.d.ts +1 -0
- package/dist/components/Employee/Profile/useProfile.js +3 -4
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +17 -0
- package/dist/components/{Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingComponents.js → Employee/SelfOnboardingFlow/SelfOnboardingComponents.js} +7 -7
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -0
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +2 -0
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js +22 -0
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -0
- package/dist/components/{Flow/StateMachines/employeeSelfOnboarding.js → Employee/SelfOnboardingFlow/selfOnboardingMachine.js} +4 -4
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -0
- package/dist/components/Employee/Taxes/FederalForm.d.ts +28 -12
- package/dist/components/Employee/Taxes/FederalForm.js +28 -28
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/StateForm.d.ts +9 -5
- package/dist/components/Employee/Taxes/StateForm.js +6 -6
- package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.d.ts +1 -1
- package/dist/components/Employee/Taxes/Taxes.js +78 -77
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/index.d.ts +1 -0
- package/dist/components/Employee/Taxes/useTaxes.js +3 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/index.d.ts +4 -1
- package/dist/components/Employee/index.js +20 -16
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Flow/useFlow.d.ts +2 -1
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/contexts/ApiProvider/ApiProvider.d.ts +5 -0
- package/dist/contexts/ApiProvider/ApiProvider.js +34 -0
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -0
- package/dist/contexts/GustoApiProvider/index.d.ts +1 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +2 -7
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +26 -24
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/GustoProvider/index.d.ts +2 -1
- package/dist/contexts/LocaleProvider/index.d.ts +1 -0
- package/dist/contexts/ThemeProvider/index.d.ts +1 -0
- package/dist/contexts/index.d.ts +1 -0
- package/dist/helpers/validations.d.ts +6 -5
- package/dist/helpers/validations.js +10 -17
- package/dist/helpers/validations.js.map +1 -1
- package/dist/hooks/useForkRef/index.d.ts +1 -0
- package/dist/i18n/I18n.d.ts +2 -0
- package/dist/i18n/I18n.js +27 -21
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/index.d.ts +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +7 -13
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +1 -1
- package/dist/shared/constants.js +1 -1
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/Helpers.d.ts +14 -0
- package/dist/types/i18next.d.ts +60 -61
- package/package.json +7 -4
- package/dist/components/Common/UI/FieldCaption/FieldCaption.js.map +0 -1
- package/dist/components/Common/UI/FieldDescription/FieldDescription.js.map +0 -1
- package/dist/components/Common/UI/FieldErrorMessage/FieldErrorMessage.js.map +0 -1
- package/dist/components/Common/UI/FieldLayout/FieldLayout.js.map +0 -1
- package/dist/components/Common/UI/FieldLayout/FieldLayoutTypes.d.ts +0 -19
- package/dist/components/Common/UI/Fieldset/Fieldset.js.map +0 -1
- package/dist/components/Common/UI/HorizontalFieldLayout/HorizontalFieldLayout.js.map +0 -1
- package/dist/components/Company/BankAccount/BankAccountFlow.d.ts +0 -5
- package/dist/components/Company/BankAccount/BankAccountFlow.js +0 -24
- package/dist/components/Company/BankAccount/BankAccountFlow.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/DocumentList/Actions.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/DocumentList/DocumentList.d.ts +0 -13
- package/dist/components/Company/DocumentSignerFlow/DocumentList/DocumentList.js +0 -69
- package/dist/components/Company/DocumentSignerFlow/DocumentList/DocumentList.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/DocumentList/Head.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/DocumentList/List.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/DocumentList/ManageSignatories.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/DocumentList/useDocumentList.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/DocumentSignerFlow.d.ts +0 -6
- package/dist/components/Company/DocumentSignerFlow/DocumentSignerFlow.js +0 -35
- package/dist/components/Company/DocumentSignerFlow/DocumentSignerFlow.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/Actions.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/Form.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/Head.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/Preview.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/SignatureForm.d.ts +0 -17
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/SignatureForm.js +0 -78
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/SignatureForm.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/useSignatureForm.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/assignSignatoryState.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/documentSignerStateMachine.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/index.d.ts +0 -1
- package/dist/components/Company/DocumentSignerFlow/stateMachine.js.map +0 -1
- package/dist/components/Company/Locations/LocationsFlow.d.ts +0 -5
- package/dist/components/Company/Locations/LocationsFlow.js +0 -21
- package/dist/components/Company/Locations/LocationsFlow.js.map +0 -1
- package/dist/components/Company/StateTaxes/StateTaxesFlow.d.ts +0 -5
- package/dist/components/Company/StateTaxes/StateTaxesFlow.js +0 -21
- package/dist/components/Company/StateTaxes/StateTaxesFlow.js.map +0 -1
- package/dist/components/Company/StateTaxes/StateTaxesFlowComponents.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentSignerFlow.d.ts +0 -5
- package/dist/components/Employee/DocumentSigner/DocumentSignerFlow.js +0 -21
- package/dist/components/Employee/DocumentSigner/DocumentSignerFlow.js.map +0 -1
- package/dist/components/Flow/EmployeeOnboardingFlow.d.ts +0 -27
- package/dist/components/Flow/EmployeeOnboardingFlow.js +0 -29
- package/dist/components/Flow/EmployeeOnboardingFlow.js.map +0 -1
- package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingComponents.d.ts +0 -5
- package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingComponents.js.map +0 -1
- package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingFlow.d.ts +0 -13
- package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingFlow.js +0 -26
- package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingFlow.js.map +0 -1
- package/dist/components/Flow/StateMachines/employeeOnboarding.js +0 -136
- package/dist/components/Flow/StateMachines/employeeOnboarding.js.map +0 -1
- package/dist/components/Flow/StateMachines/employeeSelfOnboarding.js.map +0 -1
- package/dist/components/Flow/StateMachines/index.d.ts +0 -2
- package/dist/components/Flow/index.d.ts +0 -2
- package/dist/components/Flow/index.js +0 -7
- package/dist/components/Flow/index.js.map +0 -1
- /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.d.ts +0 -0
- /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.module.scss.js +0 -0
- /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.module.scss.js.map +0 -0
- /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.d.ts +0 -0
- /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.module.scss.js +0 -0
- /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.module.scss.js.map +0 -0
- /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.d.ts +0 -0
- /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.module.scss.js +0 -0
- /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.module.scss.js.map +0 -0
- /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.d.ts +0 -0
- /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.module.scss.js +0 -0
- /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.module.scss.js.map +0 -0
- /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.d.ts +0 -0
- /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.module.scss.js +0 -0
- /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.module.scss.js.map +0 -0
- /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.d.ts +0 -0
- /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.module.scss.js +0 -0
- /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.module.scss.js.map +0 -0
- /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayoutTypes.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Actions.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Actions.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Head.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Head.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/List.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/List.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.module.scss.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.module.scss.js.map +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/useDocumentList.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Actions.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Actions.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Form.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Form.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Head.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Head.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Preview.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Preview.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/useSignatureForm.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/assignSignatoryState.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/assignSignatoryState.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/documentSignerStateMachine.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/documentSignerStateMachine.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/stateMachine.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/stateMachine.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow/useDocumentSignerFlow.d.ts → DocumentSigner/useDocumentSigner.d.ts} +0 -0
- /package/dist/components/Company/StateTaxes/{StateTaxesFlowComponents.d.ts → StateTaxesComponents.d.ts} +0 -0
- /package/dist/components/{Flow/StateMachines/employeeOnboarding.d.ts → Employee/OnboardingFlow/onboardingStateMachine.d.ts} +0 -0
- /package/dist/components/{Flow/StateMachines/employeeSelfOnboarding.d.ts → Employee/SelfOnboardingFlow/selfOnboardingMachine.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.2
|
|
4
|
+
|
|
5
|
+
- Refactored employee flow components structure and improved organization within Employee namespace
|
|
6
|
+
- Added component-level dictionary override functionality for improved internationalization
|
|
7
|
+
- Updated state taxes component to support API-based validation messages
|
|
8
|
+
- Fixed commission Zod schema validation issues
|
|
9
|
+
- Fixed issue with headers not being passed properly through our API client
|
|
10
|
+
|
|
11
|
+
## 0.8.1
|
|
12
|
+
|
|
13
|
+
- Replaced Valibot with Zod for bundle size reduction. Also included zod as a dependency
|
|
14
|
+
- Updated package.json to fix an issue with types being unavailable for consumers
|
|
15
|
+
- Misc style corrections and consistency fixes
|
|
16
|
+
- Updated component adapter documentation to include generated props
|
|
17
|
+
- bug: GWS-4966 headers not being set properly for requests when configured in GustoProvider
|
|
18
|
+
- moved APIProvider into `embedded-react-sdk` from `embedded-api` package
|
|
19
|
+
|
|
3
20
|
## 0.8.0
|
|
4
21
|
|
|
5
22
|
- Company Onboarding flow improvements and fixes:
|
|
@@ -7,7 +24,7 @@
|
|
|
7
24
|
- Introduced Company.OnboardingOverview component for tracking onboarding progress
|
|
8
25
|
- Improved state management and context handling for onboarding components
|
|
9
26
|
- Enhanced documentation for company onboarding workflow
|
|
10
|
-
- Added Company.
|
|
27
|
+
- Added Company.StateTaxes component for managing state tax requirements
|
|
11
28
|
- Support for state-specific tax forms and requirements
|
|
12
29
|
- Ability to update state tax settings with validation
|
|
13
30
|
- Component Adapter initial implementation available with most components (Docs coming soon)
|
|
@@ -99,7 +116,7 @@ You would do the following instead::
|
|
|
99
116
|
>
|
|
100
117
|
```
|
|
101
118
|
|
|
102
|
-
#### DocumentSigner has been renamed to
|
|
119
|
+
#### DocumentSigner has been renamed to DocumentSigner
|
|
103
120
|
|
|
104
121
|
Where you would previously do
|
|
105
122
|
|
|
@@ -110,7 +127,7 @@ Where you would previously do
|
|
|
110
127
|
You should update the naming as follows:
|
|
111
128
|
|
|
112
129
|
```tsx
|
|
113
|
-
<Employee.
|
|
130
|
+
<Employee.DocumentSigner employeeId="some-id" onEvent={() => {}} />
|
|
114
131
|
```
|
|
115
132
|
|
|
116
133
|
## 0.6.0
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { ReactNode,
|
|
1
|
+
import { ReactNode, JSX } from 'react';
|
|
2
2
|
import { FallbackProps } from 'react-error-boundary';
|
|
3
3
|
import { OnEventType } from './useBase';
|
|
4
4
|
import { EventType } from '../../shared/constants';
|
|
5
|
-
|
|
5
|
+
import { ResourceDictionary, Resources } from '../../types/Helpers';
|
|
6
|
+
export interface CommonComponentInterface<TResourceKey extends keyof Resources = keyof Resources> {
|
|
6
7
|
children?: ReactNode;
|
|
7
8
|
className?: string;
|
|
8
9
|
defaultValues?: unknown;
|
|
10
|
+
dictionary?: ResourceDictionary<TResourceKey>;
|
|
9
11
|
}
|
|
10
|
-
export interface BaseComponentInterface {
|
|
12
|
+
export interface BaseComponentInterface<TResourceKey extends keyof Resources = keyof Resources> extends CommonComponentInterface<TResourceKey> {
|
|
11
13
|
FallbackComponent?: (props: FallbackProps) => JSX.Element;
|
|
12
14
|
LoaderComponent?: () => JSX.Element;
|
|
13
15
|
onEvent: OnEventType<EventType, unknown>;
|
|
14
|
-
children?: ReactNode;
|
|
15
16
|
}
|
|
16
|
-
export declare const BaseComponent:
|
|
17
|
+
export declare const BaseComponent: <TResourceKey extends keyof Resources = keyof Resources>({ children, FallbackComponent, LoaderComponent, onEvent, dictionary, }: BaseComponentInterface<TResourceKey>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,71 +1,72 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ErrorBoundary as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { APIError as
|
|
6
|
-
import { SDKValidationError as
|
|
7
|
-
import { UnprocessableEntityErrorObject as
|
|
8
|
-
import { FadeIn as
|
|
9
|
-
import { BaseContext as
|
|
10
|
-
import { componentEvents as
|
|
11
|
-
import { useAsyncError as
|
|
12
|
-
import { Loading as
|
|
13
|
-
import { InternalError as
|
|
14
|
-
import { snakeCaseToCamelCase as
|
|
15
|
-
import { useComponentContext as
|
|
16
|
-
const
|
|
17
|
-
const
|
|
1
|
+
import { jsx as a, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, useCallback as x, Suspense as v } from "react";
|
|
3
|
+
import { ErrorBoundary as A } from "react-error-boundary";
|
|
4
|
+
import { useTranslation as S } from "react-i18next";
|
|
5
|
+
import { APIError as _ } from "@gusto/embedded-api/models/errors/apierror";
|
|
6
|
+
import { SDKValidationError as j } from "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
7
|
+
import { UnprocessableEntityErrorObject as u } from "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
8
|
+
import { FadeIn as B } from "../Common/FadeIn/FadeIn.js";
|
|
9
|
+
import { BaseContext as I } from "./useBase.js";
|
|
10
|
+
import { componentEvents as K } from "../../shared/constants.js";
|
|
11
|
+
import { useAsyncError as P } from "../Common/hooks/useAsyncError.js";
|
|
12
|
+
import { Loading as R } from "../Common/Loading/Loading.js";
|
|
13
|
+
import { InternalError as w } from "../Common/InternalError/InternalError.js";
|
|
14
|
+
import { snakeCaseToCamelCase as M } from "../../helpers/formattedStrings.js";
|
|
15
|
+
import { useComponentContext as O } from "../../contexts/ComponentAdapter/useComponentContext.js";
|
|
16
|
+
const T = (t) => t.map((e) => e.message ? /* @__PURE__ */ a("li", { children: e.message }, e.key) : null), y = (t, e) => {
|
|
17
|
+
const s = e ? e + "." : "";
|
|
18
18
|
if (t.category === "invalid_attribute_value" || t.category === "invalid_operation")
|
|
19
19
|
return [
|
|
20
20
|
{
|
|
21
|
-
key:
|
|
21
|
+
key: M(s + t.errorKey),
|
|
22
22
|
message: t.message ?? ""
|
|
23
23
|
}
|
|
24
24
|
];
|
|
25
25
|
if (t.category === "nested_errors" && t.errors !== void 0) {
|
|
26
26
|
let o = "";
|
|
27
|
-
return t.metadata?.key && typeof t.metadata.key == "string" ? o = t.metadata.key : t.metadata?.state && typeof t.metadata.state == "string" ? o = t.metadata.state : t.errorKey && (o = t.errorKey), t.errors.flatMap((
|
|
27
|
+
return t.metadata?.key && typeof t.metadata.key == "string" ? o = t.metadata.key : t.metadata?.state && typeof t.metadata.state == "string" ? o = t.metadata.state : t.errorKey && (o = t.errorKey), t.errors.flatMap((f) => y(f, s + o));
|
|
28
28
|
}
|
|
29
29
|
return [];
|
|
30
|
-
},
|
|
30
|
+
}, Z = ({
|
|
31
31
|
children: t,
|
|
32
|
-
FallbackComponent: e =
|
|
33
|
-
LoaderComponent:
|
|
34
|
-
onEvent: o
|
|
32
|
+
FallbackComponent: e = w,
|
|
33
|
+
LoaderComponent: s = R,
|
|
34
|
+
onEvent: o,
|
|
35
|
+
dictionary: f
|
|
35
36
|
}) => {
|
|
36
|
-
const [
|
|
37
|
-
i(r), r instanceof
|
|
38
|
-
},
|
|
37
|
+
const [E, i] = p(null), [m, d] = p(null), l = P(), { t: g } = S(), k = O(), C = (r) => {
|
|
38
|
+
i(r), r instanceof u && Array.isArray(r.errors) && d(r.errors.flatMap((c) => y(c)));
|
|
39
|
+
}, b = x(
|
|
39
40
|
async (r, c) => {
|
|
40
|
-
i(null),
|
|
41
|
+
i(null), d(null);
|
|
41
42
|
try {
|
|
42
43
|
await c(r);
|
|
43
|
-
} catch (
|
|
44
|
-
|
|
44
|
+
} catch (n) {
|
|
45
|
+
n instanceof _ || n instanceof j || n instanceof u ? C(n) : l(n);
|
|
45
46
|
}
|
|
46
47
|
},
|
|
47
|
-
[i,
|
|
48
|
+
[i, l]
|
|
48
49
|
);
|
|
49
50
|
return /* @__PURE__ */ a(
|
|
50
|
-
|
|
51
|
+
I.Provider,
|
|
51
52
|
{
|
|
52
53
|
value: {
|
|
53
54
|
fieldErrors: m,
|
|
54
55
|
setError: i,
|
|
55
56
|
onEvent: o,
|
|
56
|
-
throwError:
|
|
57
|
-
baseSubmitHandler:
|
|
57
|
+
throwError: l,
|
|
58
|
+
baseSubmitHandler: b
|
|
58
59
|
},
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
-
|
|
60
|
+
children: /* @__PURE__ */ h(
|
|
61
|
+
A,
|
|
61
62
|
{
|
|
62
63
|
FallbackComponent: e,
|
|
63
64
|
onError: (r) => {
|
|
64
|
-
o(
|
|
65
|
+
o(K.ERROR, r);
|
|
65
66
|
},
|
|
66
67
|
children: [
|
|
67
|
-
(
|
|
68
|
-
/* @__PURE__ */ a(
|
|
68
|
+
(E || m) && /* @__PURE__ */ a(k.Alert, { label: g("status.errorEncountered"), status: "error", children: m && /* @__PURE__ */ a("ul", { children: T(m) }) }),
|
|
69
|
+
/* @__PURE__ */ a(v, { fallback: /* @__PURE__ */ a(s, {}), children: /* @__PURE__ */ a(B, { children: t }) })
|
|
69
70
|
]
|
|
70
71
|
}
|
|
71
72
|
)
|
|
@@ -73,6 +74,6 @@ const O = (t) => t.map((e) => e.message ? /* @__PURE__ */ a("li", { children: e.
|
|
|
73
74
|
);
|
|
74
75
|
};
|
|
75
76
|
export {
|
|
76
|
-
|
|
77
|
+
Z as BaseComponent
|
|
77
78
|
};
|
|
78
79
|
//# sourceMappingURL=Base.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Base.js","sources":["../../../src/components/Base/Base.tsx"],"sourcesContent":["import type { ReactNode,
|
|
1
|
+
{"version":3,"file":"Base.js","sources":["../../../src/components/Base/Base.tsx"],"sourcesContent":["import type { ReactNode, JSX } from 'react'\nimport { Suspense, useState, useCallback } from 'react'\nimport type { FallbackProps } from 'react-error-boundary'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { useTranslation } from 'react-i18next'\nimport { APIError } from '@gusto/embedded-api/models/errors/apierror'\nimport { SDKValidationError } from '@gusto/embedded-api/models/errors/sdkvalidationerror'\nimport { UnprocessableEntityErrorObject } from '@gusto/embedded-api/models/errors/unprocessableentityerrorobject'\nimport type { EntityErrorObject } from '@gusto/embedded-api/models/components/entityerrorobject'\nimport { FadeIn } from '../Common/FadeIn/FadeIn'\nimport { BaseContext, type FieldError, type KnownErrors, type OnEventType } from './useBase'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport { InternalError, Loading, useAsyncError } from '@/components/Common'\nimport { snakeCaseToCamelCase } from '@/helpers/formattedStrings'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport type { ResourceDictionary, Resources } from '@/types/Helpers'\n\nexport interface CommonComponentInterface<TResourceKey extends keyof Resources = keyof Resources> {\n children?: ReactNode\n className?: string\n defaultValues?: unknown\n dictionary?: ResourceDictionary<TResourceKey>\n}\n\n// Base component wrapper with error and suspense handling\nexport interface BaseComponentInterface<TResourceKey extends keyof Resources = keyof Resources>\n extends CommonComponentInterface<TResourceKey> {\n FallbackComponent?: (props: FallbackProps) => JSX.Element\n LoaderComponent?: () => JSX.Element\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**Traverses errorList and finds items with message properties */\nconst renderErrorList = (errorList: FieldError[]): React.ReactNode => {\n return errorList.map(errorFromList => {\n if (errorFromList.message) {\n return <li key={errorFromList.key}>{errorFromList.message}</li>\n }\n return null\n })\n}\n/**Recuresively parses error list and constructs an array of objects containing attribute value error messages associated with form fields. Nested errors construct '.' separated keys\n * metadata.state is a special case for state taxes validation errors\n */\nconst getFieldErrors = (\n error: EntityErrorObject,\n parentKey?: string,\n): { key: string; message: string }[] => {\n const keyPrefix = parentKey ? parentKey + '.' : ''\n if (error.category === 'invalid_attribute_value' || error.category === 'invalid_operation') {\n return [\n {\n key: snakeCaseToCamelCase(keyPrefix + error.errorKey),\n message: error.message ?? '',\n },\n ]\n }\n if (error.category === 'nested_errors' && error.errors !== undefined) {\n //TODO: clean this up once Metadata type is fixed in openapi spec\n let keySuffix = ''\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n if (error.metadata?.key && typeof error.metadata.key === 'string') {\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n keySuffix = error.metadata.key as string\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n } else if (error.metadata?.state && typeof error.metadata.state === 'string') {\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n keySuffix = error.metadata.state as string\n } else if (error.errorKey) {\n keySuffix = error.errorKey\n }\n return error.errors.flatMap(err => getFieldErrors(err, keyPrefix + keySuffix))\n }\n return []\n}\n\ntype SubmitHandler<T> = (data: T) => Promise<void>\n\nexport const BaseComponent = <TResourceKey extends keyof Resources = keyof Resources>({\n children,\n FallbackComponent = InternalError,\n LoaderComponent = Loading,\n onEvent,\n dictionary,\n}: BaseComponentInterface<TResourceKey>) => {\n const [error, setError] = useState<KnownErrors | null>(null)\n const [fieldErrors, setFieldErrors] = useState<FieldError[] | null>(null)\n const throwError = useAsyncError()\n const { t } = useTranslation()\n const Components = useComponentContext()\n\n const processError = (error: KnownErrors) => {\n setError(error)\n //422\tapplication/json - content relaited error\n if (error instanceof UnprocessableEntityErrorObject && Array.isArray(error.errors)) {\n setFieldErrors(error.errors.flatMap(err => getFieldErrors(err)))\n }\n }\n\n const baseSubmitHandler = useCallback(\n async <T,>(data: T, componentHandler: SubmitHandler<T>) => {\n setError(null)\n setFieldErrors(null)\n try {\n await componentHandler(data)\n } catch (err) {\n if (\n err instanceof APIError ||\n err instanceof SDKValidationError ||\n err instanceof UnprocessableEntityErrorObject\n ) {\n processError(err)\n } else throwError(err)\n }\n },\n [setError, throwError],\n )\n\n return (\n <BaseContext.Provider\n value={{\n fieldErrors,\n setError,\n onEvent,\n throwError,\n baseSubmitHandler,\n }}\n >\n <ErrorBoundary\n FallbackComponent={FallbackComponent}\n onError={err => {\n onEvent(componentEvents.ERROR, err)\n }}\n >\n {(error || fieldErrors) && (\n <Components.Alert label={t('status.errorEncountered')} status=\"error\">\n {fieldErrors && <ul>{renderErrorList(fieldErrors)}</ul>}\n </Components.Alert>\n )}\n <Suspense fallback={<LoaderComponent />}>\n <FadeIn>{children}</FadeIn>\n </Suspense>\n </ErrorBoundary>\n </BaseContext.Provider>\n )\n}\n"],"names":["renderErrorList","errorList","errorFromList","jsx","getFieldErrors","error","parentKey","keyPrefix","snakeCaseToCamelCase","keySuffix","err","BaseComponent","children","FallbackComponent","InternalError","LoaderComponent","Loading","onEvent","dictionary","setError","useState","fieldErrors","setFieldErrors","throwError","useAsyncError","t","useTranslation","Components","useComponentContext","processError","UnprocessableEntityErrorObject","baseSubmitHandler","useCallback","data","componentHandler","APIError","SDKValidationError","BaseContext","jsxs","ErrorBoundary","componentEvents","Suspense","FadeIn"],"mappings":";;;;;;;;;;;;;;;AAiCA,MAAMA,IAAkB,CAACC,MAChBA,EAAU,IAAI,CAAiBC,MAChCA,EAAc,UACR,gBAAAC,EAAA,MAAA,EAA4B,UAAcD,EAAA,QAAA,GAAlCA,EAAc,GAA4B,IAErD,IACR,GAKGE,IAAiB,CACrBC,GACAC,MACuC;AACjC,QAAAC,IAAYD,IAAYA,IAAY,MAAM;AAChD,MAAID,EAAM,aAAa,6BAA6BA,EAAM,aAAa;AAC9D,WAAA;AAAA,MACL;AAAA,QACE,KAAKG,EAAqBD,IAAYF,EAAM,QAAQ;AAAA,QACpD,SAASA,EAAM,WAAW;AAAA,MAAA;AAAA,IAE9B;AAEF,MAAIA,EAAM,aAAa,mBAAmBA,EAAM,WAAW,QAAW;AAEpE,QAAII,IAAY;AAEhB,WAAIJ,EAAM,UAAU,OAAO,OAAOA,EAAM,SAAS,OAAQ,WAEvDI,IAAYJ,EAAM,SAAS,MAElBA,EAAM,UAAU,SAAS,OAAOA,EAAM,SAAS,SAAU,WAElEI,IAAYJ,EAAM,SAAS,QAClBA,EAAM,aACfI,IAAYJ,EAAM,WAEbA,EAAM,OAAO,QAAQ,CAAAK,MAAON,EAAeM,GAAKH,IAAYE,CAAS,CAAC;AAAA,EAAA;AAE/E,SAAO,CAAC;AACV,GAIaE,IAAgB,CAAyD;AAAA,EACpF,UAAAC;AAAA,EACA,mBAAAC,IAAoBC;AAAA,EACpB,iBAAAC,IAAkBC;AAAA,EAClB,SAAAC;AAAA,EACA,YAAAC;AACF,MAA4C;AAC1C,QAAM,CAACb,GAAOc,CAAQ,IAAIC,EAA6B,IAAI,GACrD,CAACC,GAAaC,CAAc,IAAIF,EAA8B,IAAI,GAClEG,IAAaC,EAAc,GAC3B,EAAE,GAAAC,EAAE,IAAIC,EAAe,GACvBC,IAAaC,EAAoB,GAEjCC,IAAe,CAACxB,MAAuB;AAC3C,IAAAc,EAASd,CAAK,GAEVA,aAAiByB,KAAkC,MAAM,QAAQzB,EAAM,MAAM,KAC/EiB,EAAejB,EAAM,OAAO,QAAQ,OAAOD,EAAeM,CAAG,CAAC,CAAC;AAAA,EAEnE,GAEMqB,IAAoBC;AAAA,IACxB,OAAWC,GAASC,MAAuC;AACzD,MAAAf,EAAS,IAAI,GACbG,EAAe,IAAI;AACf,UAAA;AACF,cAAMY,EAAiBD,CAAI;AAAA,eACpBvB,GAAK;AACZ,QACEA,aAAeyB,KACfzB,aAAe0B,KACf1B,aAAeoB,IAEfD,EAAanB,CAAG,MACAA,CAAG;AAAA,MAAA;AAAA,IAEzB;AAAA,IACA,CAACS,GAAUI,CAAU;AAAA,EACvB;AAGE,SAAA,gBAAApB;AAAA,IAACkC,EAAY;AAAA,IAAZ;AAAA,MACC,OAAO;AAAA,QACL,aAAAhB;AAAA,QACA,UAAAF;AAAA,QACA,SAAAF;AAAA,QACA,YAAAM;AAAA,QACA,mBAAAQ;AAAA,MACF;AAAA,MAEA,UAAA,gBAAAO;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,mBAAA1B;AAAA,UACA,SAAS,CAAOH,MAAA;AACN,YAAAO,EAAAuB,EAAgB,OAAO9B,CAAG;AAAA,UACpC;AAAA,UAEE,UAAA;AAAA,aAAAL,KAASgB,MACR,gBAAAlB,EAAAwB,EAAW,OAAX,EAAiB,OAAOF,EAAE,yBAAyB,GAAG,QAAO,SAC3D,UAAeJ,KAAA,gBAAAlB,EAAC,QAAI,UAAgBH,EAAAqB,CAAW,EAAE,CAAA,GACpD;AAAA,YAEF,gBAAAlB,EAACsC,KAAS,UAAU,gBAAAtC,EAACY,KAAgB,GACnC,UAAA,gBAAAZ,EAACuC,GAAQ,EAAA,UAAA9B,EAAS,CAAA,EACpB,CAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF;AAEJ;"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
const t = "
|
|
2
|
-
columnTitle: t
|
|
1
|
+
const t = "_columnTitle_1djp5_1", l = "_columnData_1djp5_8", o = {
|
|
2
|
+
columnTitle: t,
|
|
3
|
+
columnData: l
|
|
3
4
|
};
|
|
4
5
|
export {
|
|
6
|
+
l as columnData,
|
|
5
7
|
t as columnTitle,
|
|
6
|
-
|
|
8
|
+
o as default
|
|
7
9
|
};
|
|
8
10
|
//# sourceMappingURL=DataCards.module.scss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataCards.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataCards.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const e = "
|
|
1
|
+
const e = "_fade_6tfn1_1", f = "_fadeIn_6tfn1_8", a = {
|
|
2
2
|
fade: e,
|
|
3
|
-
fadeIn:
|
|
3
|
+
fadeIn: f
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default,
|
|
7
7
|
e as fade,
|
|
8
|
-
|
|
8
|
+
f as fadeIn
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=FadeIn.module.scss.js.map
|
|
@@ -2,7 +2,7 @@ import { jsxs as c, jsx as l } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as p } from "react-i18next";
|
|
3
3
|
import d from "classnames";
|
|
4
4
|
import n from "./FieldCaption.module.scss.js";
|
|
5
|
-
import { VisuallyHidden as f } from "
|
|
5
|
+
import { VisuallyHidden as f } from "../VisuallyHidden/VisuallyHidden.js";
|
|
6
6
|
const j = ({
|
|
7
7
|
children: e,
|
|
8
8
|
as: o = "label",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldCaption.js","sources":["../../../../src/components/Common/FieldCaption/FieldCaption.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport { VisuallyHidden } from '../VisuallyHidden'\nimport styles from './FieldCaption.module.scss'\n\nexport interface FieldCaptionProps {\n children: React.ReactNode\n as?: 'label' | 'legend'\n htmlFor?: string\n isRequired?: boolean\n isVisuallyHidden?: boolean\n className?: string\n}\n\nexport const FieldCaption: React.FC<FieldCaptionProps> = ({\n children,\n as = 'label',\n htmlFor,\n isRequired = false,\n isVisuallyHidden = false,\n className,\n}: FieldCaptionProps) => {\n const { t } = useTranslation('common')\n const Component = as\n\n const content = (\n <Component\n className={classNames(styles.root, className)}\n htmlFor={as === 'label' ? htmlFor : undefined}\n >\n {children}\n {!isRequired && <span className={styles.optionalLabel}>{t('optionalLabel')}</span>}\n </Component>\n )\n\n return isVisuallyHidden ? <VisuallyHidden>{content}</VisuallyHidden> : content\n}\n"],"names":["FieldCaption","children","as","htmlFor","isRequired","isVisuallyHidden","className","t","useTranslation","content","jsxs","classNames","styles","jsx","VisuallyHidden"],"mappings":";;;;;AAcO,MAAMA,IAA4C,CAAC;AAAA,EACxD,UAAAC;AAAA,EACA,IAAAC,IAAK;AAAA,EACL,SAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,kBAAAC,IAAmB;AAAA,EACnB,WAAAC;AACF,MAAyB;AACvB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAG/BC,IACJ,gBAAAC;AAAA,IAHgBR;AAAA,IAGf;AAAA,MACC,WAAWS,EAAWC,EAAO,MAAMN,CAAS;AAAA,MAC5C,SAASJ,MAAO,UAAUC,IAAU;AAAA,MAEnC,UAAA;AAAA,QAAAF;AAAA,QACA,CAACG,KAAe,gBAAAS,EAAA,QAAA,EAAK,WAAWD,EAAO,eAAgB,UAAEL,EAAA,eAAe,EAAE,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAC7E;AAGF,SAAOF,IAAmB,gBAAAQ,EAACC,GAAgB,EAAA,UAAAL,EAAQ,CAAA,IAAoBA;AACzE;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import e from "classnames";
|
|
3
3
|
import p from "./FieldDescription.module.scss.js";
|
|
4
|
-
import { createMarkup as a } from "
|
|
4
|
+
import { createMarkup as a } from "../../../helpers/formattedStrings.js";
|
|
5
5
|
const u = ({
|
|
6
6
|
children: o,
|
|
7
7
|
className: s,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldDescription.js","sources":["../../../../src/components/Common/FieldDescription/FieldDescription.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport styles from './FieldDescription.module.scss'\nimport { createMarkup } from '@/helpers/formattedStrings'\n\ninterface FieldDescriptionProps {\n children: React.ReactNode\n className?: string\n id?: string\n}\n\nexport const FieldDescription: React.FC<FieldDescriptionProps> = ({\n children,\n className,\n id,\n}: FieldDescriptionProps) => {\n const commonProps = {\n className: classNames(styles.root, className),\n id,\n }\n\n return (\n children &&\n (typeof children === 'string' ? (\n <div {...commonProps} dangerouslySetInnerHTML={createMarkup(children)} />\n ) : (\n <div {...commonProps}>{children}</div>\n ))\n )\n}\n"],"names":["FieldDescription","children","className","id","commonProps","classNames","styles","jsx","createMarkup"],"mappings":";;;;AAUO,MAAMA,IAAoD,CAAC;AAAA,EAChE,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,IAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAc;AAAA,IAClB,WAAWC,EAAWC,EAAO,MAAMJ,CAAS;AAAA,IAC5C,IAAAC;AAAA,EACF;AAEA,SACEF,MACC,OAAOA,KAAa,WACnB,gBAAAM,EAAC,SAAK,GAAGH,GAAa,yBAAyBI,EAAaP,CAAQ,EAAG,CAAA,sBAEtE,OAAK,EAAA,GAAGG,GAAc,UAAAH,EAAS,CAAA;AAGtC;"}
|
package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.js
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import p from "classnames";
|
|
3
3
|
import r from "./FieldErrorMessage.module.scss.js";
|
|
4
|
-
import { useComponentContext as a } from "
|
|
4
|
+
import { useComponentContext as a } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
5
5
|
function l({
|
|
6
6
|
children: o,
|
|
7
7
|
id: t,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldErrorMessage.js","sources":["../../../../src/components/Common/FieldErrorMessage/FieldErrorMessage.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react'\nimport classNames from 'classnames'\nimport styles from './FieldErrorMessage.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface FieldErrorMessageProps extends HTMLAttributes<HTMLParagraphElement> {\n withErrorIcon?: boolean\n}\n\nexport function FieldErrorMessage({\n children,\n id,\n className,\n withErrorIcon = true,\n ...props\n}: FieldErrorMessageProps) {\n const { Text } = useComponentContext()\n\n return (\n children && (\n <Text\n id={id}\n className={classNames(styles.root, className, {\n [styles.withErrorIcon as string]: withErrorIcon,\n })}\n {...props}\n >\n {children}\n </Text>\n )\n )\n}\n"],"names":["FieldErrorMessage","children","id","className","withErrorIcon","props","Text","useComponentContext","jsx","classNames","styles"],"mappings":";;;;AASO,SAASA,EAAkB;AAAA,EAChC,UAAAC;AAAA,EACA,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,GAAGC;AACL,GAA2B;AACnB,QAAA,EAAE,MAAAC,EAAK,IAAIC,EAAoB;AAErC,SACEN,KACE,gBAAAO;AAAA,IAACF;AAAA,IAAA;AAAA,MACC,IAAAJ;AAAA,MACA,WAAWO,EAAWC,EAAO,MAAMP,GAAW;AAAA,QAC5C,CAACO,EAAO,aAAuB,GAAGN;AAAA,MAAA,CACnC;AAAA,MACA,GAAGC;AAAA,MAEH,UAAAJ;AAAA,IAAA;AAAA,EACH;AAGN;"}
|
|
@@ -2,7 +2,7 @@ import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import { FieldCaption as F } from "../FieldCaption/FieldCaption.js";
|
|
4
4
|
import r from "./FieldLayout.module.scss.js";
|
|
5
|
-
import { getDataProps as N } from "
|
|
5
|
+
import { getDataProps as N } from "../../../helpers/getDataProps.js";
|
|
6
6
|
import { FieldDescription as g } from "../FieldDescription/FieldDescription.js";
|
|
7
7
|
import { FieldErrorMessage as x } from "../FieldErrorMessage/FieldErrorMessage.js";
|
|
8
8
|
const A = ({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldLayout.js","sources":["../../../../src/components/Common/FieldLayout/FieldLayout.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { FieldDescription } from '../FieldDescription'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldCaption } from '../FieldCaption/FieldCaption'\nimport styles from './FieldLayout.module.scss'\nimport type { FieldLayoutProps } from './FieldLayoutTypes'\nimport { getDataProps } from '@/helpers/getDataProps'\n\nexport const FieldLayout: React.FC<FieldLayoutProps> = ({\n label,\n description,\n descriptionId,\n errorMessage,\n errorMessageId,\n children,\n isRequired = false,\n htmlFor,\n shouldVisuallyHideLabel = false,\n className,\n withErrorIcon = true,\n ...props\n}: FieldLayoutProps) => {\n return (\n <div className={classNames(styles.root, className)} {...getDataProps(props)}>\n <div\n className={classNames(styles.labelAndDescription, {\n [styles.withVisibleLabel as string]: !shouldVisuallyHideLabel,\n [styles.withDescription as string]: Boolean(description),\n })}\n >\n <FieldCaption\n htmlFor={htmlFor}\n isRequired={isRequired}\n isVisuallyHidden={shouldVisuallyHideLabel}\n >\n {label}\n </FieldCaption>\n <FieldDescription id={descriptionId}>{description}</FieldDescription>\n </div>\n {children}\n <FieldErrorMessage\n id={errorMessageId}\n className={styles.errorMessage}\n withErrorIcon={withErrorIcon}\n >\n {errorMessage}\n </FieldErrorMessage>\n </div>\n )\n}\n"],"names":["FieldLayout","label","description","descriptionId","errorMessage","errorMessageId","children","isRequired","htmlFor","shouldVisuallyHideLabel","className","withErrorIcon","props","jsxs","classNames","styles","getDataProps","jsx","FieldCaption","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;AAQO,MAAMA,IAA0C,CAAC;AAAA,EACtD,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,SAAAC;AAAA,EACA,yBAAAC,IAA0B;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,GAAGC;AACL,MAEI,gBAAAC,EAAC,OAAI,EAAA,WAAWC,EAAWC,EAAO,MAAML,CAAS,GAAI,GAAGM,EAAaJ,CAAK,GACxE,UAAA;AAAA,EAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAWC,EAAO,qBAAqB;AAAA,QAChD,CAACA,EAAO,gBAA0B,GAAG,CAACN;AAAA,QACtC,CAACM,EAAO,eAAyB,GAAG,EAAQb;AAAA,MAAW,CACxD;AAAA,MAED,UAAA;AAAA,QAAA,gBAAAe;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,SAAAV;AAAA,YACA,YAAAD;AAAA,YACA,kBAAkBE;AAAA,YAEjB,UAAAR;AAAA,UAAA;AAAA,QACH;AAAA,QACC,gBAAAgB,EAAAE,GAAA,EAAiB,IAAIhB,GAAgB,UAAYD,EAAA,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACpD;AAAA,EACCI;AAAA,EACD,gBAAAW;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,IAAIf;AAAA,MACJ,WAAWU,EAAO;AAAA,MAClB,eAAAJ;AAAA,MAEC,UAAAP;AAAA,IAAA;AAAA,EAAA;AACH,GACF;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DataAttributes } from '../../../types/Helpers';
|
|
3
|
+
export interface SharedFieldLayoutProps extends DataAttributes {
|
|
4
|
+
/**
|
|
5
|
+
* Optional description text for the field
|
|
6
|
+
*/
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Error message to display when the field is invalid
|
|
10
|
+
*/
|
|
11
|
+
errorMessage?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Indicates if the field is required
|
|
14
|
+
*/
|
|
15
|
+
isRequired?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Label text for the field
|
|
18
|
+
*/
|
|
19
|
+
label: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Hides the label visually while keeping it accessible to screen readers
|
|
22
|
+
*/
|
|
23
|
+
shouldVisuallyHideLabel?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface InternalFieldLayoutProps {
|
|
26
|
+
/**
|
|
27
|
+
* Content to be rendered inside the field layout
|
|
28
|
+
*/
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* ID of the form control that this label is associated with
|
|
32
|
+
*/
|
|
33
|
+
htmlFor: string;
|
|
34
|
+
/**
|
|
35
|
+
* ID of the error message element
|
|
36
|
+
*/
|
|
37
|
+
errorMessageId: string;
|
|
38
|
+
/**
|
|
39
|
+
* ID of the description element
|
|
40
|
+
*/
|
|
41
|
+
descriptionId: string;
|
|
42
|
+
/**
|
|
43
|
+
* Additional CSS class name
|
|
44
|
+
*/
|
|
45
|
+
className?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Whether to show the error icon
|
|
48
|
+
*/
|
|
49
|
+
withErrorIcon?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface FieldLayoutProps extends SharedFieldLayoutProps, InternalFieldLayoutProps {
|
|
52
|
+
}
|
|
@@ -2,7 +2,7 @@ import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { useId as f } from "react";
|
|
3
3
|
import l from "classnames";
|
|
4
4
|
import e from "./Fieldset.module.scss.js";
|
|
5
|
-
import { getDataProps as g } from "
|
|
5
|
+
import { getDataProps as g } from "../../../helpers/getDataProps.js";
|
|
6
6
|
import { FieldCaption as h } from "../FieldCaption/FieldCaption.js";
|
|
7
7
|
import { FieldDescription as D } from "../FieldDescription/FieldDescription.js";
|
|
8
8
|
import { FieldErrorMessage as F } from "../FieldErrorMessage/FieldErrorMessage.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fieldset.js","sources":["../../../../src/components/Common/Fieldset/Fieldset.tsx"],"sourcesContent":["import { useId } from 'react'\nimport classNames from 'classnames'\nimport { FieldDescription } from '../FieldDescription'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldCaption } from '../FieldCaption'\nimport type { SharedFieldLayoutProps } from '../FieldLayout/FieldLayoutTypes'\nimport styles from './Fieldset.module.scss'\nimport { getDataProps } from '@/helpers/getDataProps'\n\nexport interface FieldsetProps\n extends Omit<SharedFieldLayoutProps, 'label' | 'shouldVisuallyHideLabel'> {\n children: React.ReactNode\n description?: React.ReactNode\n errorMessage?: string\n isRequired?: boolean\n legend: React.ReactNode\n shouldVisuallyHideLegend?: boolean\n className?: string\n}\n\nexport const Fieldset: React.FC<FieldsetProps> = ({\n children,\n description,\n errorMessage,\n isRequired = false,\n legend,\n shouldVisuallyHideLegend = false,\n className,\n ...props\n}: FieldsetProps) => {\n const generatedErrorMessageId = useId()\n const errorMessageId = `error-message-${generatedErrorMessageId}`\n\n return (\n <fieldset\n className={classNames(styles.root, className)}\n aria-describedby={errorMessage ? errorMessageId : undefined}\n {...getDataProps(props)}\n >\n <div\n className={classNames(styles.legendAndDescription, {\n [styles.withVisibleLegend as string]: !shouldVisuallyHideLegend,\n [styles.withDescription as string]: Boolean(description),\n })}\n >\n <FieldCaption\n as=\"legend\"\n isRequired={isRequired}\n isVisuallyHidden={shouldVisuallyHideLegend}\n >\n {legend}\n </FieldCaption>\n <FieldDescription>{description}</FieldDescription>\n </div>\n {children}\n <FieldErrorMessage\n id={errorMessageId}\n className={styles.errorMessage}\n aria-live=\"polite\"\n role=\"alert\"\n >\n {errorMessage}\n </FieldErrorMessage>\n </fieldset>\n )\n}\n"],"names":["Fieldset","children","description","errorMessage","isRequired","legend","shouldVisuallyHideLegend","className","props","errorMessageId","useId","jsxs","classNames","styles","getDataProps","jsx","FieldCaption","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;;AAoBO,MAAMA,IAAoC,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,QAAAC;AAAA,EACA,0BAAAC,IAA2B;AAAA,EAC3B,WAAAC;AAAA,EACA,GAAGC;AACL,MAAqB;AAEb,QAAAC,IAAiB,iBADSC,EAAM,CACyB;AAG7D,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAWC,EAAO,MAAMN,CAAS;AAAA,MAC5C,oBAAkBJ,IAAeM,IAAiB;AAAA,MACjD,GAAGK,EAAaN,CAAK;AAAA,MAEtB,UAAA;AAAA,QAAA,gBAAAG;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWC,EAAWC,EAAO,sBAAsB;AAAA,cACjD,CAACA,EAAO,iBAA2B,GAAG,CAACP;AAAA,cACvC,CAACO,EAAO,eAAyB,GAAG,EAAQX;AAAA,YAAW,CACxD;AAAA,YAED,UAAA;AAAA,cAAA,gBAAAa;AAAA,gBAACC;AAAA,gBAAA;AAAA,kBACC,IAAG;AAAA,kBACH,YAAAZ;AAAA,kBACA,kBAAkBE;AAAA,kBAEjB,UAAAD;AAAA,gBAAA;AAAA,cACH;AAAA,cACA,gBAAAU,EAACE,KAAkB,UAAYf,EAAA,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACjC;AAAA,QACCD;AAAA,QACD,gBAAAc;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,IAAIT;AAAA,YACJ,WAAWI,EAAO;AAAA,YAClB,aAAU;AAAA,YACV,MAAK;AAAA,YAEJ,UAAAV;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import N from "classnames";
|
|
3
3
|
import r from "./HorizontalFieldLayout.module.scss.js";
|
|
4
|
-
import { getDataProps as b } from "
|
|
5
|
-
import { VisuallyHidden as g } from "
|
|
4
|
+
import { getDataProps as b } from "../../../helpers/getDataProps.js";
|
|
5
|
+
import { VisuallyHidden as g } from "../VisuallyHidden/VisuallyHidden.js";
|
|
6
6
|
import { FieldDescription as w } from "../FieldDescription/FieldDescription.js";
|
|
7
7
|
import { FieldErrorMessage as x } from "../FieldErrorMessage/FieldErrorMessage.js";
|
|
8
8
|
const M = ({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HorizontalFieldLayout.js","sources":["../../../../src/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { VisuallyHidden } from '../VisuallyHidden'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldDescription } from '../FieldDescription'\nimport styles from './HorizontalFieldLayout.module.scss'\nimport type { HorizontalFieldLayoutProps } from './HorizontalFieldLayoutTypes'\nimport { getDataProps } from '@/helpers/getDataProps'\n\nexport const HorizontalFieldLayout: React.FC<HorizontalFieldLayoutProps> = ({\n label,\n description,\n descriptionId,\n errorMessage,\n errorMessageId,\n children,\n htmlFor,\n className,\n shouldVisuallyHideLabel,\n ...props\n}: HorizontalFieldLayoutProps) => {\n const labelContent = (\n <label className={styles.label} htmlFor={htmlFor}>\n {label}\n </label>\n )\n\n const withDescriptionOrErrorMessage = description || errorMessage\n\n return (\n <div\n className={classNames(\n styles.root,\n {\n [styles.withoutVisibleLabel as string]:\n shouldVisuallyHideLabel && withDescriptionOrErrorMessage,\n [styles.withOnlyChildren as string]:\n shouldVisuallyHideLabel && !withDescriptionOrErrorMessage,\n },\n className,\n )}\n {...getDataProps(props)}\n >\n <div className={styles.children}>{children}</div>\n {shouldVisuallyHideLabel ? <VisuallyHidden>{labelContent}</VisuallyHidden> : labelContent}\n <FieldDescription id={descriptionId} className={styles.description}>\n {description}\n </FieldDescription>\n <FieldErrorMessage id={errorMessageId} className={styles.errorMessage}>\n {errorMessage}\n </FieldErrorMessage>\n </div>\n )\n}\n"],"names":["HorizontalFieldLayout","label","description","descriptionId","errorMessage","errorMessageId","children","htmlFor","className","shouldVisuallyHideLabel","props","labelContent","jsx","styles","withDescriptionOrErrorMessage","jsxs","classNames","getDataProps","VisuallyHidden","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;AAQO,MAAMA,IAA8D,CAAC;AAAA,EAC1E,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,GAAGC;AACL,MAAkC;AAChC,QAAMC,IACH,gBAAAC,EAAA,SAAA,EAAM,WAAWC,EAAO,OAAO,SAAAN,GAC7B,UACHN,GAAA,GAGIa,IAAgCZ,KAAeE;AAGnD,SAAA,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTH,EAAO;AAAA,QACP;AAAA,UACE,CAACA,EAAO,mBAA6B,GACnCJ,KAA2BK;AAAA,UAC7B,CAACD,EAAO,gBAA0B,GAChCJ,KAA2B,CAACK;AAAA,QAChC;AAAA,QACAN;AAAA,MACF;AAAA,MACC,GAAGS,EAAaP,CAAK;AAAA,MAEtB,UAAA;AAAA,QAAA,gBAAAE,EAAC,OAAI,EAAA,WAAWC,EAAO,UAAW,UAAAP,GAAS;AAAA,QAC1CG,IAA0B,gBAAAG,EAACM,GAAgB,EAAA,UAAAP,EAAa,CAAA,IAAoBA;AAAA,0BAC5EQ,GAAiB,EAAA,IAAIhB,GAAe,WAAWU,EAAO,aACpD,UACHX,GAAA;AAAA,0BACCkB,GAAkB,EAAA,IAAIf,GAAgB,WAAWQ,EAAO,cACtD,UACHT,EAAA,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { UseFormProps } from 'react-hook-form';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export declare const SignatureFormSchema: z.ZodObject<{
|
|
4
|
+
signature: z.ZodString;
|
|
5
|
+
confirmSignature: z.ZodLiteral<true>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
signature: string;
|
|
8
|
+
confirmSignature: true;
|
|
9
|
+
}, {
|
|
10
|
+
signature: string;
|
|
11
|
+
confirmSignature: true;
|
|
12
|
+
}>;
|
|
13
|
+
export type SignatureFormInputs = z.infer<typeof SignatureFormSchema>;
|
|
8
14
|
interface SignatureFormProps {
|
|
9
15
|
onSubmit: (data: SignatureFormInputs) => void | Promise<void>;
|
|
10
16
|
children?: React.ReactNode;
|