@gusto/embedded-react-sdk 0.51.2 → 0.52.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 +44 -0
- package/dist/components/Base/Base.d.ts +2 -0
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +1 -1
- package/dist/components/Common/OnboardingStatusBadge/index.d.ts +1 -1
- package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +4 -1
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +1 -1
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +1 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +2 -2
- package/dist/components/Common/UI/DateRangePicker/DateRangePickerTypes.d.ts +3 -2
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -1
- package/dist/components/Common/UI/FormBox/FormBox.d.ts +9 -0
- package/dist/components/Common/UI/FormBox/FormBox.js +13 -0
- package/dist/components/Common/UI/FormBox/FormBox.js.map +1 -0
- package/dist/components/Common/UI/FormBox/FormBox.module.scss.js +14 -0
- package/dist/components/Common/UI/FormBox/FormBox.module.scss.js.map +1 -0
- package/dist/components/Common/UI/FormBox/FormBoxTypes.d.ts +26 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.d.ts +9 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.js +23 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.js.map +1 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.module.scss.js +8 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.module.scss.js.map +1 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.d.ts +36 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.js +7 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.js.map +1 -0
- package/dist/components/Common/UI/FormBoxHeader/index.d.ts +1 -0
- package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -0
- package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
- package/dist/components/Common/UI/Menu/MenuTypes.d.ts +3 -3
- package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes.d.ts +2 -2
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +2 -2
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +2 -2
- package/dist/components/Common/UI/Table/TableTypes.d.ts +4 -4
- package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
- package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +2 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.d.ts +1 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.d.ts +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -8
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +8 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.d.ts +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +5 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.d.ts +3 -3
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +1 -1
- package/dist/components/Company/StateTaxes/StateTaxes.d.ts +10 -1
- package/dist/components/Company/StateTaxes/StateTaxes.js +23 -17
- package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +2 -0
- package/dist/components/Company/StateTaxes/StateTaxesComponents.js +17 -10
- package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +26 -26
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +9 -0
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +24 -24
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.d.ts +4 -3
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.d.ts +2 -2
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.d.ts +1 -1
- package/dist/components/Contractor/ContractorList/index.d.ts +2 -1
- package/dist/components/Contractor/ContractorList/index.js +123 -98
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js +22 -19
- package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.d.ts +1 -1
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.d.ts +1 -1
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.d.ts +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +2 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +150 -80
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.test.d.ts +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountFormSchema.d.ts +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.d.ts +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.d.ts +2 -2
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +2 -2
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +17 -5
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +32 -31
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +16 -4
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +33 -29
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +1 -1
- package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js +19 -18
- package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfile.d.ts +1 -1
- package/dist/components/Contractor/Profile/ContractorProfile.js +114 -110
- package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js +27 -26
- package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.d.ts +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js +6 -6
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js.map +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.d.ts +1 -1
- package/dist/components/Contractor/Submit/Submit.js +106 -63
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/Compensation.d.ts +0 -4
- package/dist/components/Employee/Compensation/onboarding/Compensation.js +38 -42
- package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +2 -2
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +1 -1
- package/dist/components/Employee/Dashboard/index.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +2 -2
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +5 -3
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +2 -2
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js +1 -4
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +2 -2
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js +27 -32
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -1
- package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js +1 -2
- package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts +2 -2
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.d.ts +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.d.ts +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js +1 -3
- package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +55 -49
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +2 -2
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.d.ts +2 -2
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js.map +1 -1
- package/dist/components/Employee/exports/employeeManagement.d.ts +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +4 -5
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +101 -125
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestsComponents.d.ts +0 -5
- package/dist/components/InformationRequests/InformationRequestsComponents.js +12 -13
- package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +4 -4
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +8 -8
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycle/index.d.ts +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +97 -92
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +2 -3
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +2 -2
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +57 -56
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +23 -6
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +37 -33
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +2 -2
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +6 -6
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +31 -31
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +9 -5
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +1 -1
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js +1 -1
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Transition/index.d.ts +1 -1
- package/dist/components/Payroll/helpers.d.ts +22 -8
- package/dist/components/Payroll/helpers.js +1 -1
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +3 -2
- package/dist/components/Payroll/payrollTypes.d.ts +1 -1
- package/dist/components/Payroll/payrollTypes.js +1 -1
- package/dist/components/Payroll/payrollTypes.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +10 -8
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +19 -19
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
- package/dist/contexts/ApiProvider/ApiProvider.d.ts +5 -5
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ApiProvider/apiVersion.d.ts +2 -2
- package/dist/contexts/ApiProvider/apiVersion.js +1 -1
- package/dist/contexts/ApiProvider/apiVersion.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +40 -36
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +5 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +18 -16
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +7 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProvider.d.ts +5 -5
- package/dist/contexts/GustoProvider/GustoProvider.js +6 -6
- package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +8 -7
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +8 -8
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/GustoProvider/index.d.ts +1 -1
- package/dist/contexts/ThemeProvider/types.d.ts +2 -2
- package/dist/contexts/index.d.ts +2 -6
- package/dist/i18n/en/Contractor.ContractorList.json.js +22 -18
- package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
- package/dist/i18n/en/Contractor.SignatureForm.json.js +5 -5
- package/dist/i18n/en/Contractor.Submit.json.js +11 -11
- package/dist/i18n/en/Employee.OnboardingSummary.json.js +24 -20
- package/dist/i18n/en/Employee.OnboardingSummary.json.js.map +1 -1
- package/dist/i18n/types.d.ts +15 -3
- package/dist/index.d.ts +8 -7
- package/dist/index.js +121 -134
- package/dist/index.js.map +1 -1
- package/dist/models/WA_RISK_CODES.d.ts +6 -2
- package/dist/models/WA_RISK_CODES.js.map +1 -1
- package/dist/models/external.d.ts +67 -57
- package/dist/partner-hook-utils/composeErrorHandler.d.ts +13 -4
- package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -1
- package/dist/partner-hook-utils/form/SDKFormProvider.d.ts +11 -2
- package/dist/partner-hook-utils/form/SDKFormProvider.js +7 -1
- package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -1
- package/dist/partner-hook-utils/form/composeSubmitHandler.d.ts +11 -4
- package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.d.ts +1 -0
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.d.ts +1 -0
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +1 -0
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.d.ts +1 -0
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.d.ts +1 -0
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SwitchHookField.d.ts +1 -0
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/TextInputHookField.d.ts +1 -0
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/index.d.ts +1 -0
- package/dist/partner-hook-utils/form/index.d.ts +3 -3
- package/dist/partner-hook-utils/form/useHookFieldResolution.js.map +1 -1
- package/dist/partner-hook-utils/index.d.ts +1 -1
- package/dist/partner-hook-utils/types.d.ts +16 -3
- package/dist/shared/constants.d.ts +12 -2
- package/dist/shared/constants.js +11 -10
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/Helpers.d.ts +13 -0
- package/dist/types/hooks.d.ts +2 -1
- package/dist/types/observability.d.ts +1 -0
- package/docs/guides/endpoint-inventory.json +396 -380
- package/package.json +17 -17
|
@@ -9,6 +9,7 @@ import { NumberInputProps } from '../../../components/Common/UI/NumberInput/Numb
|
|
|
9
9
|
*
|
|
10
10
|
* @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.
|
|
11
11
|
* @public
|
|
12
|
+
* @group Hook field props
|
|
12
13
|
*/
|
|
13
14
|
export interface NumberInputHookFieldProps<TErrorCode extends string = never> extends BaseFieldProps {
|
|
14
15
|
/** The field name; must match the corresponding key in the form schema. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInputHookField.js","sources":["../../../../src/partner-hook-utils/form/fields/NumberInputHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport type { BaseFieldProps, ValidationMessages, FormHookResult } from '../../types'\nimport { withFieldElementRegistry } from './withFieldElementRegistry'\nimport { NumberInputField } from '@/components/Common'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\n\n/**\n * Props accepted by a number input field surfaced through a form hook.\n * Exposes numeric constraints (`min`, `max`), display `format`, `placeholder` text,\n * and `validationMessages` for custom error text alongside the shared base field\n * attributes (`label`, `description`).\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @public\n */\nexport interface NumberInputHookFieldProps<\n TErrorCode extends string = never,\n> extends BaseFieldProps {\n /** The field name; must match the corresponding key in the form schema. */\n name: string\n /** Form hook result to connect to; falls back to the nearest `SDKFormProvider` when omitted. */\n formHookResult?: FormHookResult\n /** Display format for the number value (e.g. `'currency'`). */\n format?: NumberInputProps['format']\n /** Minimum allowed numeric value. */\n min?: NumberInputProps['min']\n /** Maximum allowed numeric value. */\n max?: NumberInputProps['max']\n /** Placeholder text displayed when the field has no value. */\n placeholder?: NumberInputProps['placeholder']\n /** Custom error text keyed by validation error code. */\n validationMessages?: ValidationMessages<TErrorCode>\n /** Replaces the default number input UI component; must accept the same props as `NumberInputProps`. */\n FieldComponent?: ComponentType<NumberInputProps>\n}\n\n/**\n * Number input field connected to a partner form hook result via `useHookFieldResolution`.\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @param props - Field configuration including `name`, `formHookResult`, formatting, and numeric bounds.\n * @returns The rendered number input field wrapped in the field element registry.\n * @internal\n */\nexport function NumberInputHookField<TErrorCode extends string>({\n name,\n formHookResult,\n label,\n description,\n format,\n min,\n max,\n placeholder,\n validationMessages,\n FieldComponent,\n}: NumberInputHookFieldProps<TErrorCode>) {\n const { metadata, control, errorMessage, fieldElementRegistry } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = metadata[name]\n\n return withFieldElementRegistry(\n fieldElementRegistry,\n <NumberInputField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n format={format}\n min={min}\n max={max}\n placeholder={placeholder}\n FieldComponent={FieldComponent}\n />,\n )\n}\n"],"names":["NumberInputHookField","name","formHookResult","label","description","format","min","max","placeholder","validationMessages","FieldComponent","metadata","control","errorMessage","fieldElementRegistry","useHookFieldResolution","fieldMetadata","withFieldElementRegistry","jsx","NumberInputField"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"NumberInputHookField.js","sources":["../../../../src/partner-hook-utils/form/fields/NumberInputHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport type { BaseFieldProps, ValidationMessages, FormHookResult } from '../../types'\nimport { withFieldElementRegistry } from './withFieldElementRegistry'\nimport { NumberInputField } from '@/components/Common'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\n\n/**\n * Props accepted by a number input field surfaced through a form hook.\n * Exposes numeric constraints (`min`, `max`), display `format`, `placeholder` text,\n * and `validationMessages` for custom error text alongside the shared base field\n * attributes (`label`, `description`).\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @public\n * @group Hook field props\n */\nexport interface NumberInputHookFieldProps<\n TErrorCode extends string = never,\n> extends BaseFieldProps {\n /** The field name; must match the corresponding key in the form schema. */\n name: string\n /** Form hook result to connect to; falls back to the nearest `SDKFormProvider` when omitted. */\n formHookResult?: FormHookResult\n /** Display format for the number value (e.g. `'currency'`). */\n format?: NumberInputProps['format']\n /** Minimum allowed numeric value. */\n min?: NumberInputProps['min']\n /** Maximum allowed numeric value. */\n max?: NumberInputProps['max']\n /** Placeholder text displayed when the field has no value. */\n placeholder?: NumberInputProps['placeholder']\n /** Custom error text keyed by validation error code. */\n validationMessages?: ValidationMessages<TErrorCode>\n /** Replaces the default number input UI component; must accept the same props as `NumberInputProps`. */\n FieldComponent?: ComponentType<NumberInputProps>\n}\n\n/**\n * Number input field connected to a partner form hook result via `useHookFieldResolution`.\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @param props - Field configuration including `name`, `formHookResult`, formatting, and numeric bounds.\n * @returns The rendered number input field wrapped in the field element registry.\n * @internal\n */\nexport function NumberInputHookField<TErrorCode extends string>({\n name,\n formHookResult,\n label,\n description,\n format,\n min,\n max,\n placeholder,\n validationMessages,\n FieldComponent,\n}: NumberInputHookFieldProps<TErrorCode>) {\n const { metadata, control, errorMessage, fieldElementRegistry } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = metadata[name]\n\n return withFieldElementRegistry(\n fieldElementRegistry,\n <NumberInputField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n format={format}\n min={min}\n max={max}\n placeholder={placeholder}\n FieldComponent={FieldComponent}\n />,\n )\n}\n"],"names":["NumberInputHookField","name","formHookResult","label","description","format","min","max","placeholder","validationMessages","FieldComponent","metadata","control","errorMessage","fieldElementRegistry","useHookFieldResolution","fieldMetadata","withFieldElementRegistry","jsx","NumberInputField"],"mappings":";;;;;;;AA8CO,SAASA,EAAgD;AAAA,EAC9D,MAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,KAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AACF,GAA0C;AACxC,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,cAAAC,GAAc,sBAAAC,MAAyBC;AAAA,IAChEd;AAAA,IACAC;AAAA,IACAO;AAAA,EAAA,GAEIO,IAAgBL,EAASV,CAAI;AAEnC,SAAOgB;AAAA,IACLH;AAAA,IACA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAAlB;AAAA,QACA,SAAAW;AAAA,QACA,OAAAT;AAAA,QACA,aAAAC;AAAA,QACA,cAAAS;AAAA,QACA,YAAYG,GAAe;AAAA,QAC3B,YAAYA,GAAe;AAAA,QAC3B,QAAAX;AAAA,QACA,KAAAC;AAAA,QACA,KAAAC;AAAA,QACA,aAAAC;AAAA,QACA,gBAAAE;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -10,6 +10,7 @@ import { RadioGroupProps } from '../../../components/Common/UI/RadioGroup/RadioG
|
|
|
10
10
|
* @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.
|
|
11
11
|
* @typeParam TEntry - Shape of each option entry consumed by `getOptionLabel`.
|
|
12
12
|
* @public
|
|
13
|
+
* @group Hook field props
|
|
13
14
|
*/
|
|
14
15
|
export interface RadioGroupHookFieldProps<TErrorCode extends string = never, TEntry = unknown> extends BaseFieldProps {
|
|
15
16
|
/** The field name; must match the corresponding key in the form schema. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupHookField.js","sources":["../../../../src/partner-hook-utils/form/fields/RadioGroupHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport { getFieldWithOptions } from '../getFieldWithOptions'\nimport type { BaseFieldProps, ValidationMessages, FormHookResult } from '../../types'\nimport { withFieldElementRegistry } from './withFieldElementRegistry'\nimport { RadioGroupField } from '@/components/Common'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\n\n/**\n * Props accepted by a radio group field surfaced through a form hook.\n * Exposes `getOptionLabel` to customize how option entries are rendered as labels,\n * and `validationMessages` for custom error text alongside the shared base field\n * attributes (`label`, `description`).\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @typeParam TEntry - Shape of each option entry consumed by `getOptionLabel`.\n * @public\n */\nexport interface RadioGroupHookFieldProps<\n TErrorCode extends string = never,\n TEntry = unknown,\n> extends BaseFieldProps {\n /** The field name; must match the corresponding key in the form schema. */\n name: string\n /** Form hook result to connect to; falls back to the nearest `SDKFormProvider` when omitted. */\n formHookResult?: FormHookResult\n /** Custom error text keyed by validation error code. */\n validationMessages?: ValidationMessages<TErrorCode>\n /** Maps a raw option entry to its display label; when omitted, options use the labels provided by the hook. */\n getOptionLabel?: (entry: TEntry) => string\n /** Replaces the default radio group UI component; must accept the same props as `RadioGroupProps`. */\n FieldComponent?: ComponentType<RadioGroupProps>\n}\n\n/**\n * Radio group field connected to a partner form hook result via `useHookFieldResolution`.\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @typeParam TEntry - Shape of each option entry consumed by `getOptionLabel`.\n * @param props - Field configuration including `name`, `formHookResult`, and an optional `getOptionLabel`.\n * @returns The rendered radio group field wrapped in the field element registry.\n * @internal\n */\nexport function RadioGroupHookField<TErrorCode extends string, TEntry = unknown>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n getOptionLabel,\n FieldComponent,\n}: RadioGroupHookFieldProps<TErrorCode, TEntry>) {\n const { metadata, control, errorMessage, fieldElementRegistry } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = getFieldWithOptions<TEntry>(metadata, name)\n\n const defaultOptions = fieldMetadata?.options ?? []\n const options =\n getOptionLabel && fieldMetadata?.entries\n ? fieldMetadata.entries.map((entry, index) => ({\n value: defaultOptions[index]?.value ?? '',\n label: getOptionLabel(entry),\n }))\n : defaultOptions\n\n return withFieldElementRegistry(\n fieldElementRegistry,\n <RadioGroupField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n options={options}\n FieldComponent={FieldComponent}\n />,\n )\n}\n"],"names":["RadioGroupHookField","name","formHookResult","label","description","validationMessages","getOptionLabel","FieldComponent","metadata","control","errorMessage","fieldElementRegistry","useHookFieldResolution","fieldMetadata","getFieldWithOptions","defaultOptions","options","entry","index","withFieldElementRegistry","jsx","RadioGroupField"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"RadioGroupHookField.js","sources":["../../../../src/partner-hook-utils/form/fields/RadioGroupHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport { getFieldWithOptions } from '../getFieldWithOptions'\nimport type { BaseFieldProps, ValidationMessages, FormHookResult } from '../../types'\nimport { withFieldElementRegistry } from './withFieldElementRegistry'\nimport { RadioGroupField } from '@/components/Common'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\n\n/**\n * Props accepted by a radio group field surfaced through a form hook.\n * Exposes `getOptionLabel` to customize how option entries are rendered as labels,\n * and `validationMessages` for custom error text alongside the shared base field\n * attributes (`label`, `description`).\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @typeParam TEntry - Shape of each option entry consumed by `getOptionLabel`.\n * @public\n * @group Hook field props\n */\nexport interface RadioGroupHookFieldProps<\n TErrorCode extends string = never,\n TEntry = unknown,\n> extends BaseFieldProps {\n /** The field name; must match the corresponding key in the form schema. */\n name: string\n /** Form hook result to connect to; falls back to the nearest `SDKFormProvider` when omitted. */\n formHookResult?: FormHookResult\n /** Custom error text keyed by validation error code. */\n validationMessages?: ValidationMessages<TErrorCode>\n /** Maps a raw option entry to its display label; when omitted, options use the labels provided by the hook. */\n getOptionLabel?: (entry: TEntry) => string\n /** Replaces the default radio group UI component; must accept the same props as `RadioGroupProps`. */\n FieldComponent?: ComponentType<RadioGroupProps>\n}\n\n/**\n * Radio group field connected to a partner form hook result via `useHookFieldResolution`.\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @typeParam TEntry - Shape of each option entry consumed by `getOptionLabel`.\n * @param props - Field configuration including `name`, `formHookResult`, and an optional `getOptionLabel`.\n * @returns The rendered radio group field wrapped in the field element registry.\n * @internal\n */\nexport function RadioGroupHookField<TErrorCode extends string, TEntry = unknown>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n getOptionLabel,\n FieldComponent,\n}: RadioGroupHookFieldProps<TErrorCode, TEntry>) {\n const { metadata, control, errorMessage, fieldElementRegistry } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = getFieldWithOptions<TEntry>(metadata, name)\n\n const defaultOptions = fieldMetadata?.options ?? []\n const options =\n getOptionLabel && fieldMetadata?.entries\n ? fieldMetadata.entries.map((entry, index) => ({\n value: defaultOptions[index]?.value ?? '',\n label: getOptionLabel(entry),\n }))\n : defaultOptions\n\n return withFieldElementRegistry(\n fieldElementRegistry,\n <RadioGroupField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n options={options}\n FieldComponent={FieldComponent}\n />,\n )\n}\n"],"names":["RadioGroupHookField","name","formHookResult","label","description","validationMessages","getOptionLabel","FieldComponent","metadata","control","errorMessage","fieldElementRegistry","useHookFieldResolution","fieldMetadata","getFieldWithOptions","defaultOptions","options","entry","index","withFieldElementRegistry","jsx","RadioGroupField"],"mappings":";;;;;;;;AA4CO,SAASA,EAAiE;AAAA,EAC/E,MAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AACF,GAAiD;AAC/C,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,cAAAC,GAAc,sBAAAC,MAAyBC;AAAA,IAChEX;AAAA,IACAC;AAAA,IACAG;AAAA,EAAA,GAEIQ,IAAgBC,EAA4BN,GAAUP,CAAI,GAE1Dc,IAAiBF,GAAe,WAAW,CAAA,GAC3CG,IACJV,KAAkBO,GAAe,UAC7BA,EAAc,QAAQ,IAAI,CAACI,GAAOC,OAAW;AAAA,IAC3C,OAAOH,EAAeG,CAAK,GAAG,SAAS;AAAA,IACvC,OAAOZ,EAAeW,CAAK;AAAA,EAAA,EAC3B,IACFF;AAEN,SAAOI;AAAA,IACLR;AAAA,IACA,gBAAAS;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAApB;AAAA,QACA,SAAAQ;AAAA,QACA,OAAAN;AAAA,QACA,aAAAC;AAAA,QACA,cAAAM;AAAA,QACA,YAAYG,GAAe;AAAA,QAC3B,YAAYA,GAAe;AAAA,QAC3B,SAAAG;AAAA,QACA,gBAAAT;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -11,6 +11,7 @@ import { SelectProps } from '../../../components/Common/UI/Select/SelectTypes';
|
|
|
11
11
|
* @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.
|
|
12
12
|
* @typeParam TEntry - Shape of each option entry consumed by `getOptionLabel`.
|
|
13
13
|
* @public
|
|
14
|
+
* @group Hook field props
|
|
14
15
|
*/
|
|
15
16
|
export interface SelectHookFieldProps<TErrorCode extends string = never, TEntry = unknown> extends BaseFieldProps, Pick<SelectProps, 'portalContainer'> {
|
|
16
17
|
/** The field name; must match the corresponding key in the form schema. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectHookField.js","sources":["../../../../src/partner-hook-utils/form/fields/SelectHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport { getFieldWithOptions } from '../getFieldWithOptions'\nimport type { BaseFieldProps, ValidationMessages, FormHookResult } from '../../types'\nimport { withFieldElementRegistry } from './withFieldElementRegistry'\nimport { SelectField } from '@/components/Common'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\n\n/**\n * Props accepted by a select field surfaced through a form hook.\n * Exposes `getOptionLabel` to customize how option entries are rendered as labels,\n * `placeholder` text, `portalContainer` for correct stacking inside modals,\n * and `validationMessages` for custom error text alongside the shared base field\n * attributes (`label`, `description`).\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @typeParam TEntry - Shape of each option entry consumed by `getOptionLabel`.\n * @public\n */\nexport interface SelectHookFieldProps<TErrorCode extends string = never, TEntry = unknown>\n extends BaseFieldProps, Pick<SelectProps, 'portalContainer'> {\n /** The field name; must match the corresponding key in the form schema. */\n name: string\n /** Form hook result to connect to; falls back to the nearest `SDKFormProvider` when omitted. */\n formHookResult?: FormHookResult\n /** Custom error text keyed by validation error code. */\n validationMessages?: ValidationMessages<TErrorCode>\n /** Maps a raw option entry to its display label; when omitted, options use the labels provided by the hook. */\n getOptionLabel?: (entry: TEntry) => string\n /**\n * Placeholder text displayed when no option is selected.\n * Required so empty dropdowns always communicate the action — pass an empty string only when a default value is guaranteed.\n */\n placeholder: string\n /** Replaces the default select UI component; must accept the same props as `SelectProps`. */\n FieldComponent?: ComponentType<SelectProps>\n /** When used inside a modal, pass the modal backdrop ref's element so the listbox stacks correctly. */\n portalContainer?: SelectProps['portalContainer']\n}\n\n/**\n * Select field connected to a partner form hook result via `useHookFieldResolution`.\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @typeParam TEntry - Shape of each option entry consumed by `getOptionLabel`.\n * @param props - Field configuration including `name`, `formHookResult`, and an optional `getOptionLabel`.\n * @returns The rendered select field wrapped in the field element registry.\n * @internal\n */\nexport function SelectHookField<TErrorCode extends string, TEntry = unknown>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n getOptionLabel,\n placeholder,\n FieldComponent,\n portalContainer,\n}: SelectHookFieldProps<TErrorCode, TEntry>) {\n const { metadata, control, errorMessage, fieldElementRegistry } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = getFieldWithOptions<TEntry>(metadata, name)\n\n const defaultOptions = fieldMetadata?.options ?? []\n const options =\n getOptionLabel && fieldMetadata?.entries\n ? fieldMetadata.entries.map((entry, index) => ({\n value: defaultOptions[index]?.value ?? '',\n label: getOptionLabel(entry),\n }))\n : defaultOptions\n\n return withFieldElementRegistry(\n fieldElementRegistry,\n <SelectField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n options={options}\n placeholder={placeholder}\n FieldComponent={FieldComponent}\n portalContainer={portalContainer}\n />,\n )\n}\n"],"names":["SelectHookField","name","formHookResult","label","description","validationMessages","getOptionLabel","placeholder","FieldComponent","portalContainer","metadata","control","errorMessage","fieldElementRegistry","useHookFieldResolution","fieldMetadata","getFieldWithOptions","defaultOptions","options","entry","index","withFieldElementRegistry","jsx","SelectField"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"SelectHookField.js","sources":["../../../../src/partner-hook-utils/form/fields/SelectHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport { getFieldWithOptions } from '../getFieldWithOptions'\nimport type { BaseFieldProps, ValidationMessages, FormHookResult } from '../../types'\nimport { withFieldElementRegistry } from './withFieldElementRegistry'\nimport { SelectField } from '@/components/Common'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\n\n/**\n * Props accepted by a select field surfaced through a form hook.\n * Exposes `getOptionLabel` to customize how option entries are rendered as labels,\n * `placeholder` text, `portalContainer` for correct stacking inside modals,\n * and `validationMessages` for custom error text alongside the shared base field\n * attributes (`label`, `description`).\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @typeParam TEntry - Shape of each option entry consumed by `getOptionLabel`.\n * @public\n * @group Hook field props\n */\nexport interface SelectHookFieldProps<TErrorCode extends string = never, TEntry = unknown>\n extends BaseFieldProps, Pick<SelectProps, 'portalContainer'> {\n /** The field name; must match the corresponding key in the form schema. */\n name: string\n /** Form hook result to connect to; falls back to the nearest `SDKFormProvider` when omitted. */\n formHookResult?: FormHookResult\n /** Custom error text keyed by validation error code. */\n validationMessages?: ValidationMessages<TErrorCode>\n /** Maps a raw option entry to its display label; when omitted, options use the labels provided by the hook. */\n getOptionLabel?: (entry: TEntry) => string\n /**\n * Placeholder text displayed when no option is selected.\n * Required so empty dropdowns always communicate the action — pass an empty string only when a default value is guaranteed.\n */\n placeholder: string\n /** Replaces the default select UI component; must accept the same props as `SelectProps`. */\n FieldComponent?: ComponentType<SelectProps>\n /** When used inside a modal, pass the modal backdrop ref's element so the listbox stacks correctly. */\n portalContainer?: SelectProps['portalContainer']\n}\n\n/**\n * Select field connected to a partner form hook result via `useHookFieldResolution`.\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @typeParam TEntry - Shape of each option entry consumed by `getOptionLabel`.\n * @param props - Field configuration including `name`, `formHookResult`, and an optional `getOptionLabel`.\n * @returns The rendered select field wrapped in the field element registry.\n * @internal\n */\nexport function SelectHookField<TErrorCode extends string, TEntry = unknown>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n getOptionLabel,\n placeholder,\n FieldComponent,\n portalContainer,\n}: SelectHookFieldProps<TErrorCode, TEntry>) {\n const { metadata, control, errorMessage, fieldElementRegistry } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = getFieldWithOptions<TEntry>(metadata, name)\n\n const defaultOptions = fieldMetadata?.options ?? []\n const options =\n getOptionLabel && fieldMetadata?.entries\n ? fieldMetadata.entries.map((entry, index) => ({\n value: defaultOptions[index]?.value ?? '',\n label: getOptionLabel(entry),\n }))\n : defaultOptions\n\n return withFieldElementRegistry(\n fieldElementRegistry,\n <SelectField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n options={options}\n placeholder={placeholder}\n FieldComponent={FieldComponent}\n portalContainer={portalContainer}\n />,\n )\n}\n"],"names":["SelectHookField","name","formHookResult","label","description","validationMessages","getOptionLabel","placeholder","FieldComponent","portalContainer","metadata","control","errorMessage","fieldElementRegistry","useHookFieldResolution","fieldMetadata","getFieldWithOptions","defaultOptions","options","entry","index","withFieldElementRegistry","jsx","SelectField"],"mappings":";;;;;;;;AAkDO,SAASA,EAA6D;AAAA,EAC3E,MAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,iBAAAC;AACF,GAA6C;AAC3C,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,cAAAC,GAAc,sBAAAC,MAAyBC;AAAA,IAChEb;AAAA,IACAC;AAAA,IACAG;AAAA,EAAA,GAEIU,IAAgBC,EAA4BN,GAAUT,CAAI,GAE1DgB,IAAiBF,GAAe,WAAW,CAAA,GAC3CG,IACJZ,KAAkBS,GAAe,UAC7BA,EAAc,QAAQ,IAAI,CAACI,GAAOC,OAAW;AAAA,IAC3C,OAAOH,EAAeG,CAAK,GAAG,SAAS;AAAA,IACvC,OAAOd,EAAea,CAAK;AAAA,EAAA,EAC3B,IACFF;AAEN,SAAOI;AAAA,IACLR;AAAA,IACA,gBAAAS;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAAtB;AAAA,QACA,SAAAU;AAAA,QACA,OAAAR;AAAA,QACA,aAAAC;AAAA,QACA,cAAAQ;AAAA,QACA,YAAYG,GAAe;AAAA,QAC3B,YAAYA,GAAe;AAAA,QAC3B,SAAAG;AAAA,QACA,aAAAX;AAAA,QACA,gBAAAC;AAAA,QACA,iBAAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -8,6 +8,7 @@ import { SwitchProps } from '../../../components/Common/UI/Switch/SwitchTypes';
|
|
|
8
8
|
*
|
|
9
9
|
* @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.
|
|
10
10
|
* @public
|
|
11
|
+
* @group Hook field props
|
|
11
12
|
*/
|
|
12
13
|
export interface SwitchHookFieldProps<TErrorCode extends string = never> extends BaseFieldProps {
|
|
13
14
|
/** The field name; must match the corresponding key in the form schema. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchHookField.js","sources":["../../../../src/partner-hook-utils/form/fields/SwitchHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport type { BaseFieldProps, ValidationMessages, FormHookResult } from '../../types'\nimport { withFieldElementRegistry } from './withFieldElementRegistry'\nimport { SwitchField } from '@/components/Common'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\n\n/**\n * Props accepted by a toggle switch field surfaced through a form hook.\n * Exposes `validationMessages` for custom error text alongside the shared base\n * field attributes (`label`, `description`).\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @public\n */\nexport interface SwitchHookFieldProps<TErrorCode extends string = never> extends BaseFieldProps {\n /** The field name; must match the corresponding key in the form schema. */\n name: string\n /** Form hook result to connect to; falls back to the nearest `SDKFormProvider` when omitted. */\n formHookResult?: FormHookResult\n /** Custom error text keyed by validation error code. */\n validationMessages?: ValidationMessages<TErrorCode>\n /** Replaces the default toggle switch UI component; must accept the same props as `SwitchProps`. */\n FieldComponent?: ComponentType<SwitchProps>\n}\n\n/**\n * Switch field connected to a partner form hook result via `useHookFieldResolution`.\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @param props - Field configuration including `name`, `formHookResult`, and label content.\n * @returns The rendered switch field wrapped in the field element registry.\n * @internal\n */\nexport function SwitchHookField<TErrorCode extends string>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n FieldComponent,\n}: SwitchHookFieldProps<TErrorCode>) {\n const { metadata, control, errorMessage, fieldElementRegistry } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = metadata[name]\n\n return withFieldElementRegistry(\n fieldElementRegistry,\n <SwitchField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n FieldComponent={FieldComponent}\n />,\n )\n}\n"],"names":["SwitchHookField","name","formHookResult","label","description","validationMessages","FieldComponent","metadata","control","errorMessage","fieldElementRegistry","useHookFieldResolution","fieldMetadata","withFieldElementRegistry","jsx","SwitchField"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"SwitchHookField.js","sources":["../../../../src/partner-hook-utils/form/fields/SwitchHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport type { BaseFieldProps, ValidationMessages, FormHookResult } from '../../types'\nimport { withFieldElementRegistry } from './withFieldElementRegistry'\nimport { SwitchField } from '@/components/Common'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\n\n/**\n * Props accepted by a toggle switch field surfaced through a form hook.\n * Exposes `validationMessages` for custom error text alongside the shared base\n * field attributes (`label`, `description`).\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @public\n * @group Hook field props\n */\nexport interface SwitchHookFieldProps<TErrorCode extends string = never> extends BaseFieldProps {\n /** The field name; must match the corresponding key in the form schema. */\n name: string\n /** Form hook result to connect to; falls back to the nearest `SDKFormProvider` when omitted. */\n formHookResult?: FormHookResult\n /** Custom error text keyed by validation error code. */\n validationMessages?: ValidationMessages<TErrorCode>\n /** Replaces the default toggle switch UI component; must accept the same props as `SwitchProps`. */\n FieldComponent?: ComponentType<SwitchProps>\n}\n\n/**\n * Switch field connected to a partner form hook result via `useHookFieldResolution`.\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @param props - Field configuration including `name`, `formHookResult`, and label content.\n * @returns The rendered switch field wrapped in the field element registry.\n * @internal\n */\nexport function SwitchHookField<TErrorCode extends string>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n FieldComponent,\n}: SwitchHookFieldProps<TErrorCode>) {\n const { metadata, control, errorMessage, fieldElementRegistry } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = metadata[name]\n\n return withFieldElementRegistry(\n fieldElementRegistry,\n <SwitchField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n FieldComponent={FieldComponent}\n />,\n )\n}\n"],"names":["SwitchHookField","name","formHookResult","label","description","validationMessages","FieldComponent","metadata","control","errorMessage","fieldElementRegistry","useHookFieldResolution","fieldMetadata","withFieldElementRegistry","jsx","SwitchField"],"mappings":";;;;;;;AAmCO,SAASA,EAA2C;AAAA,EACzD,MAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AACF,GAAqC;AACnC,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,cAAAC,GAAc,sBAAAC,MAAyBC;AAAA,IAChEV;AAAA,IACAC;AAAA,IACAG;AAAA,EAAA,GAEIO,IAAgBL,EAASN,CAAI;AAEnC,SAAOY;AAAA,IACLH;AAAA,IACA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAAd;AAAA,QACA,SAAAO;AAAA,QACA,OAAAL;AAAA,QACA,aAAAC;AAAA,QACA,cAAAK;AAAA,QACA,YAAYG,GAAe;AAAA,QAC3B,YAAYA,GAAe;AAAA,QAC3B,gBAAAN;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -10,6 +10,7 @@ import { TextInputProps } from '../../../components/Common/UI/TextInput/TextInpu
|
|
|
10
10
|
* @typeParam TErrorCode - Required validation error code keys mapped via `validationMessages`.
|
|
11
11
|
* @typeParam TOptionalErrorCode - Optional validation error code keys mapped via `validationMessages`.
|
|
12
12
|
* @public
|
|
13
|
+
* @group Hook field props
|
|
13
14
|
*/
|
|
14
15
|
export interface TextInputHookFieldProps<TErrorCode extends string = never, TOptionalErrorCode extends string = never> extends BaseFieldProps {
|
|
15
16
|
/** The field name; must match the corresponding key in the form schema. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputHookField.js","sources":["../../../../src/partner-hook-utils/form/fields/TextInputHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport type { BaseFieldProps, ValidationMessages, FormHookResult } from '../../types'\nimport { withFieldElementRegistry } from './withFieldElementRegistry'\nimport { TextInputField } from '@/components/Common'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\n\n/**\n * Props accepted by a text input field surfaced through a form hook.\n * Exposes a `transform` function for preprocessing raw input, `placeholder` text,\n * and `validationMessages` for custom error text alongside the shared base field\n * attributes (`label`, `description`).\n *\n * @typeParam TErrorCode - Required validation error code keys mapped via `validationMessages`.\n * @typeParam TOptionalErrorCode - Optional validation error code keys mapped via `validationMessages`.\n * @public\n */\nexport interface TextInputHookFieldProps<\n TErrorCode extends string = never,\n TOptionalErrorCode extends string = never,\n> extends BaseFieldProps {\n /** The field name; must match the corresponding key in the form schema. */\n name: string\n /** Form hook result to connect to; falls back to the nearest `SDKFormProvider` when omitted. */\n formHookResult?: FormHookResult\n /** Custom error text keyed by validation error code. */\n validationMessages?: ValidationMessages<TErrorCode, TOptionalErrorCode>\n /** Transforms the raw string value on every change before storing it; use for normalization such as trimming or changing case. */\n transform?: (value: string) => string\n /** Placeholder text displayed when the field has no value. */\n placeholder?: string\n /** Replaces the default text input UI component; must accept the same props as `TextInputProps`. */\n FieldComponent?: ComponentType<TextInputProps>\n}\n\n/**\n * Text input field connected to a partner form hook result via `useHookFieldResolution`.\n *\n * @typeParam TErrorCode - Required validation error code keys mapped via `validationMessages`.\n * @typeParam TOptionalErrorCode - Optional validation error code keys mapped via `validationMessages`.\n * @param props - Field configuration including `name`, `formHookResult`, `transform`, `placeholder`, and label content.\n * @returns The rendered text input field wrapped in the field element registry.\n * @internal\n */\nexport function TextInputHookField<\n TErrorCode extends string,\n TOptionalErrorCode extends string = never,\n>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n transform,\n placeholder,\n FieldComponent,\n}: TextInputHookFieldProps<TErrorCode, TOptionalErrorCode>) {\n const { metadata, control, errorMessage, fieldElementRegistry } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = metadata[name]\n\n return withFieldElementRegistry(\n fieldElementRegistry,\n <TextInputField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n transform={transform}\n placeholder={placeholder}\n FieldComponent={FieldComponent}\n />,\n )\n}\n"],"names":["TextInputHookField","name","formHookResult","label","description","validationMessages","transform","placeholder","FieldComponent","metadata","control","errorMessage","fieldElementRegistry","useHookFieldResolution","fieldMetadata","withFieldElementRegistry","jsx","TextInputField"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"TextInputHookField.js","sources":["../../../../src/partner-hook-utils/form/fields/TextInputHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport type { BaseFieldProps, ValidationMessages, FormHookResult } from '../../types'\nimport { withFieldElementRegistry } from './withFieldElementRegistry'\nimport { TextInputField } from '@/components/Common'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\n\n/**\n * Props accepted by a text input field surfaced through a form hook.\n * Exposes a `transform` function for preprocessing raw input, `placeholder` text,\n * and `validationMessages` for custom error text alongside the shared base field\n * attributes (`label`, `description`).\n *\n * @typeParam TErrorCode - Required validation error code keys mapped via `validationMessages`.\n * @typeParam TOptionalErrorCode - Optional validation error code keys mapped via `validationMessages`.\n * @public\n * @group Hook field props\n */\nexport interface TextInputHookFieldProps<\n TErrorCode extends string = never,\n TOptionalErrorCode extends string = never,\n> extends BaseFieldProps {\n /** The field name; must match the corresponding key in the form schema. */\n name: string\n /** Form hook result to connect to; falls back to the nearest `SDKFormProvider` when omitted. */\n formHookResult?: FormHookResult\n /** Custom error text keyed by validation error code. */\n validationMessages?: ValidationMessages<TErrorCode, TOptionalErrorCode>\n /** Transforms the raw string value on every change before storing it; use for normalization such as trimming or changing case. */\n transform?: (value: string) => string\n /** Placeholder text displayed when the field has no value. */\n placeholder?: string\n /** Replaces the default text input UI component; must accept the same props as `TextInputProps`. */\n FieldComponent?: ComponentType<TextInputProps>\n}\n\n/**\n * Text input field connected to a partner form hook result via `useHookFieldResolution`.\n *\n * @typeParam TErrorCode - Required validation error code keys mapped via `validationMessages`.\n * @typeParam TOptionalErrorCode - Optional validation error code keys mapped via `validationMessages`.\n * @param props - Field configuration including `name`, `formHookResult`, `transform`, `placeholder`, and label content.\n * @returns The rendered text input field wrapped in the field element registry.\n * @internal\n */\nexport function TextInputHookField<\n TErrorCode extends string,\n TOptionalErrorCode extends string = never,\n>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n transform,\n placeholder,\n FieldComponent,\n}: TextInputHookFieldProps<TErrorCode, TOptionalErrorCode>) {\n const { metadata, control, errorMessage, fieldElementRegistry } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = metadata[name]\n\n return withFieldElementRegistry(\n fieldElementRegistry,\n <TextInputField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n transform={transform}\n placeholder={placeholder}\n FieldComponent={FieldComponent}\n />,\n )\n}\n"],"names":["TextInputHookField","name","formHookResult","label","description","validationMessages","transform","placeholder","FieldComponent","metadata","control","errorMessage","fieldElementRegistry","useHookFieldResolution","fieldMetadata","withFieldElementRegistry","jsx","TextInputField"],"mappings":";;;;;;;AA6CO,SAASA,EAGd;AAAA,EACA,MAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,gBAAAC;AACF,GAA4D;AAC1D,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,cAAAC,GAAc,sBAAAC,MAAyBC;AAAA,IAChEZ;AAAA,IACAC;AAAA,IACAG;AAAA,EAAA,GAEIS,IAAgBL,EAASR,CAAI;AAEnC,SAAOc;AAAA,IACLH;AAAA,IACA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAAhB;AAAA,QACA,SAAAS;AAAA,QACA,OAAAP;AAAA,QACA,aAAAC;AAAA,QACA,cAAAO;AAAA,QACA,YAAYG,GAAe;AAAA,QAC3B,YAAYA,GAAe;AAAA,QAC3B,WAAAR;AAAA,QACA,aAAAC;AAAA,QACA,gBAAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { InputProps } from '../../../components/Common/UI/Input/InputTypes';
|
|
1
2
|
export { TextInputHookField, type TextInputHookFieldProps } from './TextInputHookField';
|
|
2
3
|
export { SelectHookField, type SelectHookFieldProps } from './SelectHookField';
|
|
3
4
|
export { CheckboxHookField, type CheckboxHookFieldProps } from './CheckboxHookField';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { FieldMetadata, FieldMetadataWithOptions, FieldsMetadata, ValidationMessages, BaseFieldProps, HookFieldProps, } from '../types';
|
|
2
2
|
export type { FormFieldsMetadataContextValue } from './FormFieldsMetadataContext';
|
|
3
3
|
export { FormFieldsMetadataProvider } from './FormFieldsMetadataProvider';
|
|
4
|
-
export { SDKFormProvider } from './SDKFormProvider';
|
|
5
|
-
export { composeSubmitHandler } from './composeSubmitHandler';
|
|
6
|
-
export { TextInputHookField, type TextInputHookFieldProps, SelectHookField, type SelectHookFieldProps, CheckboxHookField, type CheckboxHookFieldProps, NumberInputHookField, type NumberInputHookFieldProps, DatePickerHookField, type DatePickerHookFieldProps, RadioGroupHookField, type RadioGroupHookFieldProps, type SharedFieldLayoutProps, type SharedHorizontalFieldLayoutProps, type TextInputProps, type SelectProps, type SelectOption, type CheckboxProps, type NumberInputProps, type DatePickerProps, type RadioGroupProps, type RadioGroupOption, SwitchHookField, type SwitchHookFieldProps, type SwitchProps, } from './fields';
|
|
4
|
+
export { SDKFormProvider, type SDKFormProviderProps } from './SDKFormProvider';
|
|
5
|
+
export { composeSubmitHandler, type ComposeSubmitInput, type ComposeSubmitHandlerResult, type ComposableFormHookResult, } from './composeSubmitHandler';
|
|
6
|
+
export { type InputProps, TextInputHookField, type TextInputHookFieldProps, SelectHookField, type SelectHookFieldProps, CheckboxHookField, type CheckboxHookFieldProps, NumberInputHookField, type NumberInputHookFieldProps, DatePickerHookField, type DatePickerHookFieldProps, RadioGroupHookField, type RadioGroupHookFieldProps, type SharedFieldLayoutProps, type SharedHorizontalFieldLayoutProps, type TextInputProps, type SelectProps, type SelectOption, type CheckboxProps, type NumberInputProps, type DatePickerProps, type RadioGroupProps, type RadioGroupOption, SwitchHookField, type SwitchHookFieldProps, type SwitchProps, } from './fields';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHookFieldResolution.js","sources":["../../../src/partner-hook-utils/form/useHookFieldResolution.ts"],"sourcesContent":["import type { Control } from 'react-hook-form'\nimport { useFormState } from 'react-hook-form'\nimport type { FieldsMetadata, ValidationMessages, FormHookResult } from '../types'\nimport { useFormFieldsMetadataContext } from './FormFieldsMetadataContext'\nimport { resolveFieldError } from './resolveFieldError'\nimport type { FieldElementRegistry } from '@/components/Common/Fields/hooks/fieldElementRegistry'\n\ninterface HookFieldResolution {\n metadata: FieldsMetadata\n control: Control | undefined\n errorMessage: string | undefined\n fieldElementRegistry: FieldElementRegistry | undefined\n}\n\n/**\n * Resolves all data a HookField needs from either a `formHookResult` prop or the standard context providers (FormProvider + FormFieldsMetadataProvider).\n *\n * @remarks\n * When `formHookResult` is provided, metadata/errors/control/registry are read\n * from the prop — no context providers required. When absent, falls back to\n * the existing context-based path.\n *\n * Uses `useFormState` to establish a proper RHF subscription for error updates.\n * When `control` is provided (prop path), useFormState subscribes directly via\n * the control object. When absent (context path), it falls back to useFormContext\n * internally. The `name` parameter scopes the subscription to this field.\n *\n * `fieldElementRegistry` is forwarded so HookFields in the prop-based path can\n * self-publish the registry via `withFieldElementRegistry`. In the\n * `SDKFormProvider` path the wrap is a no-op (no registry on the prop) and the\n * outer provider's registry remains in scope.\n *\n * @typeParam TErrorCode - Required error codes the field can produce.\n * @typeParam TOptionalErrorCode - Optional error codes that only apply in some configurations.\n * @param name - Form-field name to resolve metadata, errors, and control for.\n * @param formHookResult - Form hook result passed via the `formHookResult` prop, or `undefined` to read from context.\n * @param validationMessages - Map of error codes to display strings, forwarded to error resolution.\n * @returns The metadata entry, RHF `control`, resolved error message, and field element registry for this field.\n * @internal\n */\nexport function useHookFieldResolution<\n TErrorCode extends string,\n TOptionalErrorCode extends string = never,\n>(\n name: string,\n formHookResult: FormHookResult | undefined,\n validationMessages?: ValidationMessages<TErrorCode, TOptionalErrorCode>,\n): HookFieldResolution {\n const metadataContext = useFormFieldsMetadataContext()\n\n const metadata = formHookResult?.form.fieldsMetadata ?? metadataContext?.metadata ?? {}\n\n const control = formHookResult?.form.hookFormInternals.formMethods.control as Control | undefined\n\n const { errors: formErrors } = useFormState({ control, name })\n\n const sdkErrors = formHookResult\n ? formHookResult.errorHandling.errors\n : (metadataContext?.errors ?? [])\n\n const errorMessage = resolveFieldError(name, formErrors, sdkErrors, validationMessages)\n\n const fieldElementRegistry = formHookResult?.form.hookFormInternals._fieldElementRegistry\n\n return { metadata, control, errorMessage, fieldElementRegistry }\n}\n"],"names":["useHookFieldResolution","name","formHookResult","validationMessages","metadataContext","useFormFieldsMetadataContext","metadata","control","formErrors","useFormState","sdkErrors","errorMessage","resolveFieldError","fieldElementRegistry"],"mappings":";;;AAwCO,SAASA,EAIdC,GACAC,GACAC,GACqB;AACrB,QAAMC,IAAkBC,EAAA,GAElBC,IAAWJ,GAAgB,KAAK,kBAAkBE,GAAiB,YAAY,CAAA,GAE/EG,IAAUL,GAAgB,KAAK,kBAAkB,YAAY,SAE7D,EAAE,QAAQM,EAAA,IAAeC,EAAa,EAAE,SAAAF,GAAS,MAAAN,GAAM,GAEvDS,IAAYR,IACdA,EAAe,cAAc,SAC5BE,GAAiB,UAAU,CAAA,GAE1BO,IAAeC,EAAkBX,GAAMO,GAAYE,GAAWP,CAAkB,GAEhFU,IAAuBX,GAAgB,KAAK,kBAAkB;
|
|
1
|
+
{"version":3,"file":"useHookFieldResolution.js","sources":["../../../src/partner-hook-utils/form/useHookFieldResolution.ts"],"sourcesContent":["import type { Control } from 'react-hook-form'\nimport { useFormState } from 'react-hook-form'\nimport type { FieldsMetadata, ValidationMessages, FormHookResult } from '../types'\nimport { useFormFieldsMetadataContext } from './FormFieldsMetadataContext'\nimport { resolveFieldError } from './resolveFieldError'\nimport type { FieldElementRegistry } from '@/components/Common/Fields/hooks/fieldElementRegistry'\n\ninterface HookFieldResolution {\n metadata: FieldsMetadata\n control: Control | undefined\n errorMessage: string | undefined\n fieldElementRegistry: FieldElementRegistry | undefined\n}\n\n/**\n * Resolves all data a HookField needs from either a `formHookResult` prop or the standard context providers (FormProvider + FormFieldsMetadataProvider).\n *\n * @remarks\n * When `formHookResult` is provided, metadata/errors/control/registry are read\n * from the prop — no context providers required. When absent, falls back to\n * the existing context-based path.\n *\n * Uses `useFormState` to establish a proper RHF subscription for error updates.\n * When `control` is provided (prop path), useFormState subscribes directly via\n * the control object. When absent (context path), it falls back to useFormContext\n * internally. The `name` parameter scopes the subscription to this field.\n *\n * `fieldElementRegistry` is forwarded so HookFields in the prop-based path can\n * self-publish the registry via `withFieldElementRegistry`. In the\n * `SDKFormProvider` path the wrap is a no-op (no registry on the prop) and the\n * outer provider's registry remains in scope.\n *\n * @typeParam TErrorCode - Required error codes the field can produce.\n * @typeParam TOptionalErrorCode - Optional error codes that only apply in some configurations.\n * @param name - Form-field name to resolve metadata, errors, and control for.\n * @param formHookResult - Form hook result passed via the `formHookResult` prop, or `undefined` to read from context.\n * @param validationMessages - Map of error codes to display strings, forwarded to error resolution.\n * @returns The metadata entry, RHF `control`, resolved error message, and field element registry for this field.\n * @internal\n */\nexport function useHookFieldResolution<\n TErrorCode extends string,\n TOptionalErrorCode extends string = never,\n>(\n name: string,\n formHookResult: FormHookResult | undefined,\n validationMessages?: ValidationMessages<TErrorCode, TOptionalErrorCode>,\n): HookFieldResolution {\n const metadataContext = useFormFieldsMetadataContext()\n\n const metadata = formHookResult?.form.fieldsMetadata ?? metadataContext?.metadata ?? {}\n\n const control = formHookResult?.form.hookFormInternals.formMethods.control as Control | undefined\n\n const { errors: formErrors } = useFormState({ control, name })\n\n const sdkErrors = formHookResult\n ? formHookResult.errorHandling.errors\n : (metadataContext?.errors ?? [])\n\n const errorMessage = resolveFieldError(name, formErrors, sdkErrors, validationMessages)\n\n const fieldElementRegistry = formHookResult?.form.hookFormInternals._fieldElementRegistry as\n FieldElementRegistry | undefined\n\n return { metadata, control, errorMessage, fieldElementRegistry }\n}\n"],"names":["useHookFieldResolution","name","formHookResult","validationMessages","metadataContext","useFormFieldsMetadataContext","metadata","control","formErrors","useFormState","sdkErrors","errorMessage","resolveFieldError","fieldElementRegistry"],"mappings":";;;AAwCO,SAASA,EAIdC,GACAC,GACAC,GACqB;AACrB,QAAMC,IAAkBC,EAAA,GAElBC,IAAWJ,GAAgB,KAAK,kBAAkBE,GAAiB,YAAY,CAAA,GAE/EG,IAAUL,GAAgB,KAAK,kBAAkB,YAAY,SAE7D,EAAE,QAAQM,EAAA,IAAeC,EAAa,EAAE,SAAAF,GAAS,MAAAN,GAAM,GAEvDS,IAAYR,IACdA,EAAe,cAAc,SAC5BE,GAAiB,UAAU,CAAA,GAE1BO,IAAeC,EAAkBX,GAAMO,GAAYE,GAAWP,CAAkB,GAEhFU,IAAuBX,GAAgB,KAAK,kBAAkB;AAGpE,SAAO,EAAE,UAAAI,GAAU,SAAAC,GAAS,cAAAI,GAAc,sBAAAE,EAAA;AAC5C;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * from './types';
|
|
2
|
-
export { composeErrorHandler, type MixedErrorSource, type SubmitStateForErrorHandling, } from './composeErrorHandler';
|
|
2
|
+
export { composeErrorHandler, type MixedErrorSource, type SubmitStateForErrorHandling, type QueryWithRefetch, } from './composeErrorHandler';
|
|
3
3
|
export { collectErrors } from './collectErrors';
|
|
4
4
|
export * from './form';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { UseFormReturn, FieldValues } from 'react-hook-form';
|
|
3
|
-
import { FieldElementRegistry } from '../components/Common/Fields/hooks/fieldElementRegistry';
|
|
4
3
|
import { SDKError } from '../types/sdkError';
|
|
5
4
|
/**
|
|
6
5
|
* Per-field metadata published by a form hook for the matching field component.
|
|
@@ -78,6 +77,7 @@ export type ValidationMessages<TErrorCode extends string, TOptionalErrorCode ext
|
|
|
78
77
|
* Common presentation props accepted by every hook field component.
|
|
79
78
|
*
|
|
80
79
|
* @public
|
|
80
|
+
* @group Hook field props
|
|
81
81
|
*/
|
|
82
82
|
export interface BaseFieldProps {
|
|
83
83
|
/** Visible label rendered above the field. */
|
|
@@ -91,6 +91,7 @@ export interface BaseFieldProps {
|
|
|
91
91
|
*
|
|
92
92
|
* @typeParam TProps - Original hook field props type that includes a `name` property.
|
|
93
93
|
* @public
|
|
94
|
+
* @group Hook field props
|
|
94
95
|
*/
|
|
95
96
|
export type HookFieldProps<TProps extends {
|
|
96
97
|
name: string;
|
|
@@ -108,6 +109,7 @@ export type HookFieldProps<TProps extends {
|
|
|
108
109
|
*
|
|
109
110
|
* @typeParam TFormData - Shape of the form values managed by react-hook-form.
|
|
110
111
|
* @public
|
|
112
|
+
* @group Form hook results
|
|
111
113
|
*/
|
|
112
114
|
export interface HookFormInternals<TFormData extends FieldValues = FieldValues> {
|
|
113
115
|
/** The full react-hook-form return value; use for watching fields, setting values, or triggering validation. */
|
|
@@ -121,9 +123,13 @@ export interface HookFormInternals<TFormData extends FieldValues = FieldValues>
|
|
|
121
123
|
* focus the visually first invalid field across multiple composed forms.
|
|
122
124
|
* `SDKFormProvider` and the `withFieldElementRegistry` HookField wrapper
|
|
123
125
|
* publish it via context for `useField` to populate.
|
|
126
|
+
*
|
|
127
|
+
* Typed `unknown` so the internal `FieldElementRegistry` shape never reaches
|
|
128
|
+
* the public API surface; the SDK-internal readers cast it back to the
|
|
129
|
+
* concrete type.
|
|
124
130
|
* @internal
|
|
125
131
|
*/
|
|
126
|
-
_fieldElementRegistry?:
|
|
132
|
+
_fieldElementRegistry?: unknown;
|
|
127
133
|
}
|
|
128
134
|
/**
|
|
129
135
|
* Discriminated union member returned by a hook while async data is being fetched.
|
|
@@ -135,6 +141,7 @@ export interface HookFormInternals<TFormData extends FieldValues = FieldValues>
|
|
|
135
141
|
* ready-state shape (data, form, actions, status) becomes available.
|
|
136
142
|
*
|
|
137
143
|
* @public
|
|
144
|
+
* @group Common hook results
|
|
138
145
|
*/
|
|
139
146
|
export interface HookLoadingResult {
|
|
140
147
|
/** Always `true` in this branch; narrows to `false` once the hook's ready-state shape is available. */
|
|
@@ -153,6 +160,7 @@ export interface HookLoadingResult {
|
|
|
153
160
|
*
|
|
154
161
|
* @typeParam T - Type of the saved entity returned by the underlying mutation.
|
|
155
162
|
* @public
|
|
163
|
+
* @group Form hook results
|
|
156
164
|
*/
|
|
157
165
|
export interface HookSubmitResult<T> {
|
|
158
166
|
/** Whether the submission created a new entity or updated an existing one. */
|
|
@@ -172,6 +180,7 @@ export interface HookSubmitResult<T> {
|
|
|
172
180
|
* the supported way to discriminate fetch vs submit failures today.
|
|
173
181
|
*
|
|
174
182
|
* @public
|
|
183
|
+
* @group Common hook results
|
|
175
184
|
*/
|
|
176
185
|
export interface HookErrorHandling {
|
|
177
186
|
/** Aggregated fetch and submit errors as normalized {@link SDKError} values. */
|
|
@@ -193,6 +202,7 @@ export interface HookErrorHandling {
|
|
|
193
202
|
* @typeParam TData - Shape of the data the hook exposes once loaded.
|
|
194
203
|
* @typeParam TStatus - Shape of the status flags the hook exposes.
|
|
195
204
|
* @public
|
|
205
|
+
* @group Common hook results
|
|
196
206
|
*/
|
|
197
207
|
export interface BaseHookReady<TData extends Record<string, unknown> = Record<string, unknown>, TStatus extends Record<string, unknown> = Record<string, unknown>> {
|
|
198
208
|
/** Always `false` in this branch; discriminates from {@link HookLoadingResult}. */
|
|
@@ -222,6 +232,7 @@ export interface BaseHookReady<TData extends Record<string, unknown> = Record<st
|
|
|
222
232
|
* @typeParam TFields - Shape of the pre-bound `Fields` component map.
|
|
223
233
|
* @typeParam TFormOutputs - Shape of the values produced once the schema parses on submit (the resolver output / `TTransformedValues`). Defaults to `TFormData`, which holds whenever the form's input and parsed-output shapes coincide; pass it explicitly when a schema transform makes them diverge.
|
|
224
234
|
* @public
|
|
235
|
+
* @group Form hook results
|
|
225
236
|
*/
|
|
226
237
|
export interface BaseFormHookReady<TFieldsMetadata extends FieldsMetadata = FieldsMetadata, TFormData extends FieldValues = FieldValues, TFields extends object = Record<string, unknown>, TFormOutputs = TFormData> {
|
|
227
238
|
/** Always `false` in this branch; discriminates from {@link HookLoadingResult}. */
|
|
@@ -256,6 +267,7 @@ export interface BaseFormHookReady<TFieldsMetadata extends FieldsMetadata = Fiel
|
|
|
256
267
|
* under an `SDKFormProvider`.
|
|
257
268
|
*
|
|
258
269
|
* @public
|
|
270
|
+
* @group Form hook results
|
|
259
271
|
* @privateRemarks
|
|
260
272
|
* `_fieldElementRegistry` is forwarded from {@link HookFormInternals} so HookFields
|
|
261
273
|
* can self-publish the registry for descendant `useField` calls when partners
|
|
@@ -270,7 +282,8 @@ export type FormHookResult = {
|
|
|
270
282
|
formMethods: {
|
|
271
283
|
control: unknown;
|
|
272
284
|
};
|
|
273
|
-
|
|
285
|
+
/** @internal */
|
|
286
|
+
_fieldElementRegistry?: unknown;
|
|
274
287
|
};
|
|
275
288
|
};
|
|
276
289
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContractorOnboardingStatus1 } from '@gusto/embedded-api/models/components/contractor';
|
|
1
|
+
import { OnboardingStatus as ContractorOnboardingStatus1 } from '@gusto/embedded-api/models/components/contractor';
|
|
2
2
|
/**
|
|
3
3
|
* Event keys emitted by employee-related components.
|
|
4
4
|
*
|
|
@@ -185,6 +185,7 @@ export declare const companyEvents: {
|
|
|
185
185
|
export declare const contractorEvents: {
|
|
186
186
|
readonly CONTRACTOR_SELF_ONBOARDING_START: "contractor/selfOnboarding/start";
|
|
187
187
|
readonly CONTRACTOR_SELF_ONBOARDING_DONE: "contractor/selfOnboarding/done";
|
|
188
|
+
readonly CONTRACTOR_SELF_ONBOARDING_CANCELLED: "contractor/selfOnboarding/cancelled";
|
|
188
189
|
readonly CONTRACTOR_ADDRESS_UPDATED: "contractor/address/updated";
|
|
189
190
|
readonly CONTRACTOR_ADDRESS_DONE: "contractor/address/done";
|
|
190
191
|
readonly CONTRACTOR_PAYMENT_METHOD_UPDATED: "contractor/paymentMethod/updated";
|
|
@@ -553,6 +554,7 @@ export declare const componentEvents: {
|
|
|
553
554
|
readonly RUN_PAYROLL_GROSS_UP_CALCULATED: "runPayroll/grossUp/calculated";
|
|
554
555
|
readonly CONTRACTOR_SELF_ONBOARDING_START: "contractor/selfOnboarding/start";
|
|
555
556
|
readonly CONTRACTOR_SELF_ONBOARDING_DONE: "contractor/selfOnboarding/done";
|
|
557
|
+
readonly CONTRACTOR_SELF_ONBOARDING_CANCELLED: "contractor/selfOnboarding/cancelled";
|
|
556
558
|
readonly CONTRACTOR_ADDRESS_UPDATED: "contractor/address/updated";
|
|
557
559
|
readonly CONTRACTOR_ADDRESS_DONE: "contractor/address/done";
|
|
558
560
|
readonly CONTRACTOR_PAYMENT_METHOD_UPDATED: "contractor/paymentMethod/updated";
|
|
@@ -765,6 +767,7 @@ export type EventType = (typeof componentEvents)[keyof typeof componentEvents];
|
|
|
765
767
|
* record. The values mirror the strings returned by the API.
|
|
766
768
|
*
|
|
767
769
|
* @public
|
|
770
|
+
* @page employee/types
|
|
768
771
|
*/
|
|
769
772
|
export declare const EmployeeOnboardingStatus: {
|
|
770
773
|
readonly ADMIN_ONBOARDING_INCOMPLETE: "admin_onboarding_incomplete";
|
|
@@ -785,8 +788,9 @@ export declare const EmployeeOnboardingStatus: {
|
|
|
785
788
|
* flow (invited, started, or overdue) versus an admin-driven onboarding flow.
|
|
786
789
|
*
|
|
787
790
|
* @public
|
|
791
|
+
* @page employee/types
|
|
788
792
|
*/
|
|
789
|
-
export declare const EmployeeSelfOnboardingStatuses: Set<
|
|
793
|
+
export declare const EmployeeSelfOnboardingStatuses: Set<string>;
|
|
790
794
|
/**
|
|
791
795
|
* Map of contractor onboarding status values returned by the Gusto API.
|
|
792
796
|
*
|
|
@@ -795,6 +799,7 @@ export declare const EmployeeSelfOnboardingStatuses: Set<"self_onboarding_invite
|
|
|
795
799
|
* record. The values mirror the strings returned by the API.
|
|
796
800
|
*
|
|
797
801
|
* @public
|
|
802
|
+
* @page contractor/types
|
|
798
803
|
*/
|
|
799
804
|
export declare const ContractorOnboardingStatus: {
|
|
800
805
|
readonly ADMIN_ONBOARDING_INCOMPLETE: "admin_onboarding_incomplete";
|
|
@@ -815,6 +820,7 @@ export declare const ContractorOnboardingStatus: {
|
|
|
815
820
|
* onboarding flow.
|
|
816
821
|
*
|
|
817
822
|
* @public
|
|
823
|
+
* @page contractor/types
|
|
818
824
|
*/
|
|
819
825
|
export declare const ContractorSelfOnboardingStatuses: Set<ContractorOnboardingStatus1>;
|
|
820
826
|
/**
|
|
@@ -862,6 +868,7 @@ export declare const HOURS_PER_PAY_PERIOD_ANNUALLY = 2080;
|
|
|
862
868
|
* `SignatureForm`.
|
|
863
869
|
*
|
|
864
870
|
* @public
|
|
871
|
+
* @page employee/types
|
|
865
872
|
*/
|
|
866
873
|
export declare const I9_FORM_NAME = "US_I-9";
|
|
867
874
|
/**
|
|
@@ -869,6 +876,7 @@ export declare const I9_FORM_NAME = "US_I-9";
|
|
|
869
876
|
* in state selection controls.
|
|
870
877
|
*
|
|
871
878
|
* @public
|
|
879
|
+
* @page employee/types
|
|
872
880
|
*/
|
|
873
881
|
export declare const STATES_ABBR: readonly ["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"];
|
|
874
882
|
/**
|
|
@@ -876,6 +884,7 @@ export declare const STATES_ABBR: readonly ["AL", "AK", "AZ", "AR", "CA", "CO",
|
|
|
876
884
|
* {@link STATES_ABBR}.
|
|
877
885
|
*
|
|
878
886
|
* @public
|
|
887
|
+
* @page employee/types
|
|
879
888
|
*/
|
|
880
889
|
export type StateAbbreviation = (typeof STATES_ABBR)[number];
|
|
881
890
|
/** @internal */
|
|
@@ -892,6 +901,7 @@ export declare const SIGNATORY_TITLES: {
|
|
|
892
901
|
* Pay period unit values for the `paymentUnit` field on a compensation, describing the unit a pay rate is expressed against.
|
|
893
902
|
*
|
|
894
903
|
* @public
|
|
904
|
+
* @page employee/types
|
|
895
905
|
*/
|
|
896
906
|
export declare const PAY_PERIODS: {
|
|
897
907
|
readonly HOUR: "Hour";
|
package/dist/shared/constants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnboardingStatus as E } from "@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus";
|
|
2
|
-
import {
|
|
2
|
+
import { OnboardingStatus as e } from "@gusto/embedded-api/models/components/contractor";
|
|
3
3
|
const A = {
|
|
4
4
|
EMPLOYEE_CREATE: "employee/create",
|
|
5
5
|
EMPLOYEE_CREATED: "employee/created",
|
|
@@ -154,6 +154,7 @@ const A = {
|
|
|
154
154
|
}, T = {
|
|
155
155
|
CONTRACTOR_SELF_ONBOARDING_START: "contractor/selfOnboarding/start",
|
|
156
156
|
CONTRACTOR_SELF_ONBOARDING_DONE: "contractor/selfOnboarding/done",
|
|
157
|
+
CONTRACTOR_SELF_ONBOARDING_CANCELLED: "contractor/selfOnboarding/cancelled",
|
|
157
158
|
CONTRACTOR_ADDRESS_UPDATED: "contractor/address/updated",
|
|
158
159
|
CONTRACTOR_ADDRESS_DONE: "contractor/address/done",
|
|
159
160
|
CONTRACTOR_PAYMENT_METHOD_UPDATED: "contractor/paymentMethod/updated",
|
|
@@ -250,12 +251,12 @@ const A = {
|
|
|
250
251
|
INFORMATION_REQUEST_FORM_SUBMIT: "informationRequest/form/submit",
|
|
251
252
|
INFORMATION_REQUEST_FORM_CANCEL: "informationRequest/form/cancel",
|
|
252
253
|
INFORMATION_REQUEST_FORM_DONE: "informationRequest/form/done"
|
|
253
|
-
},
|
|
254
|
+
}, d = {
|
|
254
255
|
RECOVERY_CASE_RESOLVE: "recoveryCase/resolve",
|
|
255
256
|
RECOVERY_CASE_RESUBMIT: "recoveryCase/resubmit",
|
|
256
257
|
RECOVERY_CASE_RESUBMIT_CANCEL: "recoveryCase/resubmit/cancel",
|
|
257
258
|
RECOVERY_CASE_RESUBMIT_DONE: "recoveryCase/resubmit/done"
|
|
258
|
-
},
|
|
259
|
+
}, m = {
|
|
259
260
|
OFF_CYCLE_CREATED: "offCycle/created",
|
|
260
261
|
DISMISSAL_PAY_PERIOD_SELECTED: "dismissal/payPeriod/selected",
|
|
261
262
|
TRANSITION_CREATED: "transition/created",
|
|
@@ -302,9 +303,9 @@ const A = {
|
|
|
302
303
|
...M,
|
|
303
304
|
...D,
|
|
304
305
|
...R,
|
|
305
|
-
...m,
|
|
306
|
-
...n,
|
|
307
306
|
...d,
|
|
307
|
+
...n,
|
|
308
|
+
...m,
|
|
308
309
|
...N,
|
|
309
310
|
...r
|
|
310
311
|
}, o = {
|
|
@@ -344,7 +345,7 @@ const A = {
|
|
|
344
345
|
REGULAR_HOURS_NAME: "regular hours",
|
|
345
346
|
OVERTIME_NAME: "overtime",
|
|
346
347
|
DOUBLE_OVERTIME_NAME: "double overtime"
|
|
347
|
-
}, u = 35568, F = 40,
|
|
348
|
+
}, u = 35568, F = 40, g = 173.333333, f = 2080, G = "US_I-9", B = [
|
|
348
349
|
"AL",
|
|
349
350
|
"AK",
|
|
350
351
|
"AZ",
|
|
@@ -465,8 +466,8 @@ export {
|
|
|
465
466
|
u as FLSA_OVERTIME_SALARY_LIMIT,
|
|
466
467
|
y as FlsaStatus,
|
|
467
468
|
w as HOURS_COMPENSATION_NAMES,
|
|
468
|
-
|
|
469
|
-
|
|
469
|
+
f as HOURS_PER_PAY_PERIOD_ANNUALLY,
|
|
470
|
+
g as HOURS_PER_PAY_PERIOD_MONTHLY,
|
|
470
471
|
F as HOURS_PER_PAY_PERIOD_WEEKLY,
|
|
471
472
|
G as I9_FORM_NAME,
|
|
472
473
|
v as PAYMENT_METHODS,
|
|
@@ -484,10 +485,10 @@ export {
|
|
|
484
485
|
n as contractorPaymentEvents,
|
|
485
486
|
A as employeeEvents,
|
|
486
487
|
R as informationRequestEvents,
|
|
487
|
-
|
|
488
|
+
m as offCycleEvents,
|
|
488
489
|
a as payScheduleEvents,
|
|
489
490
|
D as payrollWireEvents,
|
|
490
|
-
|
|
491
|
+
d as recoveryCasesEvents,
|
|
491
492
|
M as runPayrollEvents,
|
|
492
493
|
N as terminationEvents,
|
|
493
494
|
r as timeOffEvents
|