@verifiedinc-public/shared-ui-elements 8.0.1 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Alert/Alert.mjs +1 -0
- package/dist/components/Alert/FullWidthAlert.mjs +1 -0
- package/dist/components/Backdrop/index.mjs +1 -0
- package/dist/components/Banners/Banner.mjs +1 -0
- package/dist/components/Banners/ExactBirthdayBanner.mjs +1 -0
- package/dist/components/Banners/ResendPhoneBanner.mjs +1 -0
- package/dist/components/Banners/TestPhoneNumbersBanner.mjs +1 -0
- package/dist/components/BrandFilterInput/BrandFilterInput.hook.mjs +1 -0
- package/dist/components/BrandFilterInput/index.mjs +1 -0
- package/dist/components/Button/index.mjs +1 -0
- package/dist/components/CredentialRequestsEditor/CredentialRequestsEditor.context.mjs +1 -0
- package/dist/components/CredentialRequestsEditor/components/CredentialRequestsField.mjs +1 -0
- package/dist/components/CredentialRequestsEditor/components/DataFieldAccordion.mjs +1 -0
- package/dist/components/CredentialRequestsEditor/components/DataFieldDeleteModal.mjs +1 -0
- package/dist/components/CredentialRequestsEditor/components/DataFieldDescription.mjs +3 -0
- package/dist/components/CredentialRequestsEditor/components/DataFieldMandatory.mjs +3 -0
- package/dist/components/CredentialRequestsEditor/components/DataFieldMulti.mjs +3 -0
- package/dist/components/CredentialRequestsEditor/components/DataFieldOptionType.mjs +3 -0
- package/dist/components/CredentialRequestsEditor/components/DataFieldSection.mjs +1 -0
- package/dist/components/CredentialRequestsEditor/components/DataFieldUserInput.mjs +3 -0
- package/dist/components/CredentialRequestsEditor/components/RadioOption.mjs +1 -0
- package/dist/components/CredentialRequestsEditor/contexts/CredentialRequestFieldContext.mjs +1 -0
- package/dist/components/CredentialRequestsEditor/index.mjs +1 -0
- package/dist/components/CredentialRequestsEditor/types/mandatoryEnum.mjs +1 -0
- package/dist/components/CredentialRequestsEditor/types/sdk.mjs +1 -0
- package/dist/components/CredentialRequestsEditor/utils/buildDataFieldValue.mjs +1 -0
- package/dist/components/CredentialRequestsEditor/utils/prettyField.mjs +1 -0
- package/dist/components/CredentialRequestsEditor/utils/propagateToChildren.mjs +1 -0
- package/dist/components/Image.mjs +1 -0
- package/dist/components/QRCodeDisplay/index.mjs +1 -0
- package/dist/components/RequiredLabel/index.mjs +1 -0
- package/dist/components/Snackbar/index.mjs +1 -0
- package/dist/components/TextField/index.mjs +1 -0
- package/dist/components/Tip/index.mjs +1 -0
- package/dist/components/Typography/index.mjs +1 -0
- package/dist/components/UI/AdaptativeBox.mjs +1 -0
- package/dist/components/UI/ContentWithLoader.mjs +1 -0
- package/dist/components/When.mjs +1 -0
- package/dist/components/WhenStyled.mjs +1 -0
- package/dist/components/animation/AnimatedHeight.mjs +1 -0
- package/dist/components/animation/Counter.mjs +1 -0
- package/dist/components/animation/index.mjs +1 -1
- package/dist/components/animation/motions.mjs +1 -0
- package/dist/components/buttons/ExportToPdfButton.mjs +1 -0
- package/dist/components/buttons/LinkButton.mjs +1 -0
- package/dist/components/buttons/OriginalButton.mjs +1 -0
- package/dist/components/buttons/TextButton.mjs +1 -0
- package/dist/components/chart/AreaChart/AreaChart.map.d.ts +27 -0
- package/dist/components/chart/AreaChart/AreaChart.map.mjs +1 -0
- package/dist/components/chart/AreaChart/index.d.ts +44 -0
- package/dist/components/chart/AreaChart/index.mjs +1 -0
- package/dist/components/chart/BigNumber/index.mjs +1 -0
- package/dist/components/chart/EmptyChartSection.mjs +1 -0
- package/dist/components/chart/ErrorCodesChart/index.mjs +1 -0
- package/dist/components/chart/FunnelChart/index.d.ts +35 -0
- package/dist/components/chart/FunnelChart/index.mjs +1 -0
- package/dist/components/chart/LoadingChartSection.mjs +1 -0
- package/dist/components/chart/MetricLastUpdated.mjs +1 -0
- package/dist/components/chart/MonthlySignupsOverviewTable/MonthlySignupsOverviewTable.d.ts +1 -0
- package/dist/components/chart/MonthlySignupsOverviewTable/MonthlySignupsOverviewTable.mjs +1 -0
- package/dist/components/chart/MonthlySignupsOverviewTable/MonthlySignupsOverviewTableDataMapper.mjs +1 -0
- package/dist/components/chart/NoRiskSignalsPermissionSection/index.mjs +1 -0
- package/dist/components/chart/OneClickHealthBigNumbers/OneClickHealthBigNumbers.mjs +1 -0
- package/dist/components/chart/OneClickHealthBigNumbers/OneClickHealthBigNumbersMapper.d.ts +2 -2
- package/dist/components/chart/OneClickHealthBigNumbers/OneClickHealthBigNumbersMapper.mjs +1 -0
- package/dist/components/chart/OneClickHealthOverTimeChart/OneClickHealthOverTimeChart.map.d.ts +1 -1
- package/dist/components/chart/OneClickHealthOverTimeChart/OneClickHealthOverTimeChart.map.mjs +1 -0
- package/dist/components/chart/OneClickHealthOverTimeChart/OneClickHealthOverTimeChart.mjs +1 -0
- package/dist/components/chart/OneClickHealthPercentageChart/OneClickHealthPercentageChart.d.ts +22 -0
- package/dist/components/chart/OneClickHealthPercentageChart/OneClickHealthPercentageChart.mjs +1 -0
- package/dist/components/chart/OneClickHealthPercentageChart/index.d.ts +1 -0
- package/dist/components/chart/OneClickOverTimeChart/OneClickOverTimeChart.map.mjs +1 -0
- package/dist/components/chart/OneClickOverTimeChart/OneClickOverTimeChart.mjs +1 -0
- package/dist/components/chart/OneClickPercentageChart/OneClickPercentageChart.mjs +1 -0
- package/dist/components/chart/OneClickVerificationBigNumbers/OneClickVerificationBigNumbers.d.ts +6 -0
- package/dist/components/chart/OneClickVerificationBigNumbers/OneClickVerificationBigNumbers.mjs +1 -0
- package/dist/components/chart/OneClickVerificationBigNumbers/OneClickVerificationBigNumbersMapper.d.ts +11 -0
- package/dist/components/chart/OneClickVerificationBigNumbers/OneClickVerificationBigNumbersMapper.mjs +1 -0
- package/dist/components/chart/OneClickVerificationBigNumbers/index.d.ts +1 -0
- package/dist/components/chart/OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.d.ts +18 -0
- package/dist/components/chart/OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.map.d.ts +20 -0
- package/dist/components/chart/OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.map.mjs +1 -0
- package/dist/components/chart/OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.mjs +1 -0
- package/dist/components/chart/OneClickVerificationEventsOverTimeChart/index.d.ts +2 -0
- package/dist/components/chart/OneClickVerificationFunnelChart/OneClickVerificationFunnelChart.d.ts +11 -0
- package/dist/components/chart/OneClickVerificationFunnelChart/OneClickVerificationFunnelChart.map.d.ts +21 -0
- package/dist/components/chart/OneClickVerificationFunnelChart/OneClickVerificationFunnelChart.map.mjs +1 -0
- package/dist/components/chart/OneClickVerificationFunnelChart/OneClickVerificationFunnelChart.mjs +1 -0
- package/dist/components/chart/OneClickVerificationFunnelChart/index.d.ts +2 -0
- package/dist/components/chart/OneClickVerificationOutcomeOverTimeChart/OneClickVerificationOutcomeOverTimeChart.d.ts +17 -0
- package/dist/components/chart/OneClickVerificationOutcomeOverTimeChart/OneClickVerificationOutcomeOverTimeChart.map.d.ts +23 -0
- package/dist/components/chart/OneClickVerificationOutcomeOverTimeChart/OneClickVerificationOutcomeOverTimeChart.map.mjs +1 -0
- package/dist/components/chart/OneClickVerificationOutcomeOverTimeChart/OneClickVerificationOutcomeOverTimeChart.mjs +1 -0
- package/dist/components/chart/OneClickVerificationOutcomeOverTimeChart/index.d.ts +2 -0
- package/dist/components/chart/OneClickVerificationSuccessOverTimeChart/OneClickVerificationSuccessOverTimeChart.d.ts +22 -0
- package/dist/components/chart/OneClickVerificationSuccessOverTimeChart/OneClickVerificationSuccessOverTimeChart.map.d.ts +9 -0
- package/dist/components/chart/OneClickVerificationSuccessOverTimeChart/OneClickVerificationSuccessOverTimeChart.map.mjs +1 -0
- package/dist/components/chart/OneClickVerificationSuccessOverTimeChart/OneClickVerificationSuccessOverTimeChart.mjs +1 -0
- package/dist/components/chart/OneClickVerificationSuccessOverTimeChart/index.d.ts +2 -0
- package/dist/components/chart/PieChart/index.mjs +1 -0
- package/dist/components/chart/PieChart/renderActiveShape.mjs +1 -0
- package/dist/components/chart/PieChart/renderNeedle.mjs +1 -0
- package/dist/components/chart/ReasonCodesChart/index.mjs +1 -0
- package/dist/components/chart/RiskScoreBarChart/index.mjs +1 -0
- package/dist/components/chart/RiskScorePieChart/index.mjs +1 -0
- package/dist/components/chart/SeriesChart/SeriesChart.map.d.ts +1 -0
- package/dist/components/chart/SeriesChart/SeriesChart.map.mjs +1 -0
- package/dist/components/chart/SeriesChart/index.mjs +1 -0
- package/dist/components/chart/SeriesChartLegend/index.mjs +1 -0
- package/dist/components/chart/SeriesPercentageChart/index.mjs +1 -0
- package/dist/components/chart/SeriesPercentageChartLegend/index.mjs +1 -0
- package/dist/components/chart/SignupBigNumbers/SignupBigNumbers.mjs +1 -0
- package/dist/components/chart/SignupBigNumbers/SignupBigNumbersMapper.mjs +1 -0
- package/dist/components/chart/SimpleBarChart/index.mjs +1 -0
- package/dist/components/chart/SimpleLegend/index.mjs +1 -0
- package/dist/components/chart/TTSBigNumbers/TTSBigNumbers.mjs +1 -0
- package/dist/components/chart/TTSBigNumbers/TTSBigNumbersMapper.mjs +1 -0
- package/dist/components/chart/TTSOverTimeChart/TTSOverTimeChart.map.mjs +1 -0
- package/dist/components/chart/TTSOverTimeChart/TTSOverTimeChart.mjs +1 -0
- package/dist/components/chart/constants.mjs +1 -0
- package/dist/components/chart/index.d.ts +9 -0
- package/dist/components/chart/index.mjs +1 -1
- package/dist/components/chart/oneClickVerification.types.d.ts +18 -0
- package/dist/components/chart/shared.mjs +1 -0
- package/dist/components/chart/styles.mjs +1 -0
- package/dist/components/dialog/CalendlyDialog.mjs +1 -0
- package/dist/components/dialog/Dialog.mjs +1 -0
- package/dist/components/dialog/PersistentDialog.mjs +8 -0
- package/dist/components/form/AddressInput/autofill.hook.mjs +1 -0
- package/dist/components/form/AddressInput/context.mjs +1 -0
- package/dist/components/form/AddressInput/hook.mjs +1 -0
- package/dist/components/form/AddressInput/index.mjs +1 -0
- package/dist/components/form/BasePhoneInput.mjs +1 -0
- package/dist/components/form/CountrySelector.mjs +1 -0
- package/dist/components/form/DataFieldClearAdornment.mjs +1 -0
- package/dist/components/form/DateInput/index.d.ts +3 -0
- package/dist/components/form/DateInput/index.mjs +1 -0
- package/dist/components/form/DateRangeInput/index.mjs +1 -0
- package/dist/components/form/DateRangeInput/style.mjs +1 -0
- package/dist/components/form/DefaultInput.mjs +1 -0
- package/dist/components/form/EmailInput.mjs +1 -0
- package/dist/components/form/InputMask.mjs +1 -0
- package/dist/components/form/MemberIdInput.d.ts +21 -0
- package/dist/components/form/MemberIdInput.mjs +1 -0
- package/dist/components/form/NPIInput/index.d.ts +46 -0
- package/dist/components/form/NPIInput/index.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/fields/address.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/fields/birthDate.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/fields/constants.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/fields/driversLicense.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/fields/fullName.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/fields/healthInsurance.d.ts +104 -0
- package/dist/components/form/NewOneClickForm/core/fields/healthInsurance.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/fields/index.d.ts +86 -0
- package/dist/components/form/NewOneClickForm/core/fields/index.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/fields/phone.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/fields/sex.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/fields/ssn.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/form/form.d.ts +28 -0
- package/dist/components/form/NewOneClickForm/core/form/form.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/form/formBuilder.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/form/formField.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/form/formFieldBuilder.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/form/utils.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/formats/address.format.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/formats/date.format.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/formats/healthInsurance.format.d.ts +3 -0
- package/dist/components/form/NewOneClickForm/core/formats/healthInsurance.format.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/formats/index.d.ts +1 -0
- package/dist/components/form/NewOneClickForm/core/formats/ssn.format.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/formats/state.format.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/internal/mappers/domain.map.d.ts +2 -0
- package/dist/components/form/NewOneClickForm/core/internal/mappers/domain.map.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/internal/mappers/index.d.ts +1 -0
- package/dist/components/form/NewOneClickForm/core/mappers/create-patch.map.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/mappers/share.map.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/shared/us-states.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/address/address.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/address/city.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/address/country.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/address/line1.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/address/line2.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/address/state.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/address/zipcode.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/driversLicense/driversLicense.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/healthInsurance.schema.d.ts +35 -0
- package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/healthInsurance.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/index.d.ts +3 -0
- package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/memberId.schema.d.ts +3 -0
- package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/memberId.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/payerName.schema.d.ts +3 -0
- package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/payerName.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/index.d.ts +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/name/first.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/name/fullName.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/name/last.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/name/middle.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/other/birthDate.schema.d.ts +1 -2
- package/dist/components/form/NewOneClickForm/core/validations/other/birthDate.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/other/date.schema.d.ts +1 -6
- package/dist/components/form/NewOneClickForm/core/validations/other/date.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/other/documentNumber.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/other/phone.schema.d.ts +1 -6
- package/dist/components/form/NewOneClickForm/core/validations/other/phone.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/other/sex.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/validations/other/ssn.schema.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/core/field.hook.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/core/form.context.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/input/address.field.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/input/clear-field-adornment.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/input/date.field.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/input/field.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/input/healthInsurance.field.d.ts +3 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/input/healthInsurance.field.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/input/label.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/input/select.field.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/input/ssn.field.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/input/text.field.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/driversLicense.field.d.ts +3 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/driversLicense.field.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/field.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/healthInsurance.field.d.ts +3 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/healthInsurance.field.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/multi.field.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/single.field.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/variantSelect.field.d.ts +8 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/variantSelect.field.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/shared.d.ts +6 -2
- package/dist/components/form/NewOneClickForm/react/ui/fields/shared.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/fields/style.d.ts +13 -3
- package/dist/components/form/NewOneClickForm/react/ui/fields/style.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/form-content.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/form.context.d.ts +11 -0
- package/dist/components/form/NewOneClickForm/react/ui/form.context.mjs +1 -0
- package/dist/components/form/NewOneClickForm/react/ui/form.mjs +1 -0
- package/dist/components/form/OTPInput.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplay.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayContext.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayItem.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayItemContext.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/components/EditModeButton.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/hooks.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/types.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/extractChildrenFromCredentialFieldSet.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/extractTypesFromSchema.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/filterRepeatedCredentials.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/findCorrectSchemaProperty.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/findCredentialsByType.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getCredentialTypeDisplayInfo.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getCredentialValues.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getLastPathName.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getParentPath.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getReferencedSchemaNames.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/hasMandatoryFieldEmpty.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isNewCredentialAgainstInstance.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isNewCredentialValues.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isRequiredCredentialDisplayInfo.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isSomeFieldInputAllowed.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isValidInputCredential.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/makeCredentialDisplayInfoList.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/sortCredentialsBySchema.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/transformToFormObject.mjs +1 -0
- package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/transformToFormSchema.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldAtomic.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldCheckbox.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldClearAdornment.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldComposite.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldDescription.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/index.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/styles.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/utils/getAddressFormat.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/utils/renderInstance.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/index.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldInputLabel.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldLabel.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldLabelText.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldLeftSide.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldLegend.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldRootStack.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldStack.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/DataFieldValue.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/formats/DataFieldImage.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/formats/DataFieldText.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/autofill.hook.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/hook.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/index.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldDateInput.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldImageInput.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldPhoneInput.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldSSNInput.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldSelectInput.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldTextInput.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/types.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/utils/defaults.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/utils/getAutoCompleteAttributeValue.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/utils/getCredentialLabel.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/utils/getCredentialLabelInput.mjs +1 -0
- package/dist/components/form/OneClickForm/components/DataField/utils/getCredentialSeparator.mjs +1 -0
- package/dist/components/form/OneClickForm/components/shared/Image.mjs +1 -0
- package/dist/components/form/OneClickForm/components/shared/ImageEncoded.mjs +1 -0
- package/dist/components/form/OneClickForm/components/shared/When.mjs +1 -0
- package/dist/components/form/OneClickForm/components/validations/fragments/birthDate.mjs +1 -0
- package/dist/components/form/OneClickForm/components/validations/fragments/credentials.mjs +1 -0
- package/dist/components/form/OneClickForm/components/validations/fragments/email.mjs +1 -0
- package/dist/components/form/OneClickForm/components/validations/schemas/date.schema.mjs +1 -0
- package/dist/components/form/OneClickForm/constants/credentialTypes.mjs +1 -0
- package/dist/components/form/OneClickForm/contexts/one-click-form-options.context.mjs +1 -0
- package/dist/components/form/OneClickForm/hooks/useCanFillByQueryParam.mjs +1 -0
- package/dist/components/form/OneClickForm/hooks/useDebounceCallback.mjs +1 -0
- package/dist/components/form/OneClickForm/index.mjs +1 -0
- package/dist/components/form/OneClickForm/styles/input.mjs +1 -0
- package/dist/components/form/OneClickForm/types/display-format.mjs +1 -0
- package/dist/components/form/OneClickForm/types/input-format.mjs +1 -0
- package/dist/components/form/OneClickForm/utils/calendarDateFormatter.mjs +1 -0
- package/dist/components/form/OneClickForm/utils/compareCredentialData.mjs +1 -0
- package/dist/components/form/OneClickForm/utils/currencyRangeFormatter.mjs +1 -0
- package/dist/components/form/OneClickForm/utils/date.mjs +1 -0
- package/dist/components/form/OneClickForm/utils/formatCredentialValue.mjs +1 -0
- package/dist/components/form/OneClickForm/utils/image.mjs +1 -0
- package/dist/components/form/OneClickForm/utils/isAtomicBySchema.mjs +1 -0
- package/dist/components/form/OneClickForm/utils/isCompositeBySchema.mjs +1 -0
- package/dist/components/form/OneClickForm/utils/phone.mjs +1 -0
- package/dist/components/form/OneClickForm/utils/phoneNumberFormatter.mjs +1 -0
- package/dist/components/form/OneClickForm/utils/regex.mjs +1 -0
- package/dist/components/form/OneClickForm/utils/ssnFormatter.mjs +1 -0
- package/dist/components/form/OneClickForm/utils/string.mjs +1 -0
- package/dist/components/form/OneClickForm/utils/when.mjs +1 -0
- package/dist/components/form/PhoneInput.mjs +1 -0
- package/dist/components/form/PrettyPhoneInput.mjs +64 -0
- package/dist/components/form/RadioOption.mjs +1 -0
- package/dist/components/form/SSNInput.d.ts +3 -1
- package/dist/components/form/SSNInput.mjs +1 -0
- package/dist/components/form/SelectInput.mjs +1 -0
- package/dist/components/form/TextMaskCustom.mjs +1 -0
- package/dist/components/form/TimezoneInput/index.mjs +1 -0
- package/dist/components/form/TimezoneInput/timezones.mjs +1 -0
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/icons/IconPlayer.mjs +1 -0
- package/dist/components/index.mjs +1 -1
- package/dist/components/terms/AcceptTermsNotice.mjs +1 -0
- package/dist/components/terms/LegalLink.mjs +1 -0
- package/dist/components/terms/PrivacyPolicyNotice.mjs +1 -0
- package/dist/components/text-to-signup/magic-button.mjs +1 -0
- package/dist/components/text-to-signup/magic-legal-language.mjs +1 -0
- package/dist/components/text-to-signup/magic-qr-code.mjs +1 -0
- package/dist/components/typographies/PageHeader.mjs +1 -0
- package/dist/components/typographies/PageSectionHeader.mjs +1 -0
- package/dist/components/typographies/Paragraph.mjs +1 -0
- package/dist/components/typographies/SectionDescription.mjs +1 -0
- package/dist/components/typographies/SectionHeader.mjs +1 -0
- package/dist/components/typographies/SectionTitle.mjs +1 -0
- package/dist/components/typographies/index.mjs +1 -1
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Access powered by Verified/black.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Access powered by Verified/blackGreen.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Access powered by Verified/gray.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Access powered by Verified/green.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Access powered by Verified/index.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Access powered by Verified/white.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Access powered by Verified/whiteGreen.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Apply powered by Verified/black.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Apply powered by Verified/blackGreen.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Apply powered by Verified/gray.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Apply powered by Verified/green.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Apply powered by Verified/index.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Apply powered by Verified/white.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Apply powered by Verified/whiteGreen.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click AutoFill powered by Verified/black.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click AutoFill powered by Verified/blackGreen.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click AutoFill powered by Verified/gray.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click AutoFill powered by Verified/green.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click AutoFill powered by Verified/index.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click AutoFill powered by Verified/white.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click AutoFill powered by Verified/whiteGreen.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Login powered by Verified/black.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Login powered by Verified/blackGreen.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Login powered by Verified/gray.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Login powered by Verified/green.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Login powered by Verified/index.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Login powered by Verified/white.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Login powered by Verified/whiteGreen.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Signup powered by Verified/black.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Signup powered by Verified/blackGreen.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Signup powered by Verified/gray.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Signup powered by Verified/green.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Signup powered by Verified/index.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Signup powered by Verified/white.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Signup powered by Verified/whiteGreen.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Verify powered by Verified/black.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Verify powered by Verified/blackGreen.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Verify powered by Verified/gray.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Verify powered by Verified/green.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Verify powered by Verified/index.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Verify powered by Verified/white.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Verify powered by Verified/whiteGreen.mjs +1 -0
- package/dist/components/verified/OneClickPoweredByVerified/index.mjs +1 -0
- package/dist/components/verified/VerifiedImage.mjs +1 -0
- package/dist/components/verified/VerifiedIncLogo.mjs +1 -0
- package/dist/components/verified/powered-by-verified/index.mjs +1 -0
- package/dist/constants/email.d.ts +2 -0
- package/dist/constants/email.mjs +1 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.mjs +1 -0
- package/dist/constants/metrics.d.ts +10 -0
- package/dist/constants/metrics.mjs +1 -0
- package/dist/contexts/index.d.ts +1 -0
- package/dist/contexts/index.mjs +1 -1
- package/dist/contexts/metrics/Metrics.context.d.ts +41 -0
- package/dist/contexts/metrics/Metrics.context.mjs +1 -0
- package/dist/contexts/metrics/index.d.ts +1 -0
- package/dist/contexts/tunnel/index.mjs +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks/metrics/index.d.ts +1 -0
- package/dist/hooks/metrics/useColorMap.d.ts +4 -0
- package/dist/hooks/metrics/useColorMap.mjs +1 -0
- package/dist/hooks/text-to-signup/magic-link.mjs +1 -0
- package/dist/hooks/text-to-signup/magic-qr-code-options.mjs +1 -0
- package/dist/hooks/text-to-signup/magic-qr-code.mjs +1 -0
- package/dist/hooks/text-to-signup/magic-text.mjs +1 -0
- package/dist/hooks/useCallbackRef.mjs +1 -0
- package/dist/hooks/useCopyToClipboard.mjs +1 -0
- package/dist/{shared/useCounter-BV32zXDQ.mjs → hooks/useCounter.mjs} +1 -1
- package/dist/hooks/useDebounceCallback.mjs +1 -0
- package/dist/hooks/useDebounceValue.mjs +1 -0
- package/dist/hooks/useDisclosure.mjs +1 -0
- package/dist/hooks/useGoogleFont.mjs +1 -0
- package/dist/hooks/useIntersectionObserver.mjs +1 -0
- package/dist/hooks/useLocalStorage.mjs +1 -0
- package/dist/hooks/useNavigatorOnline.mjs +1 -0
- package/dist/hooks/useNetworkType.d.ts +23 -0
- package/dist/hooks/useNetworkType.mjs +1 -0
- package/dist/hooks/useOnClickOutside.mjs +1 -0
- package/dist/hooks/usePersistedReducer.d.ts +5 -0
- package/dist/hooks/usePersistedReducer.mjs +1 -0
- package/dist/hooks/usePrevious.mjs +1 -0
- package/dist/hooks/useQRCode.mjs +1 -0
- package/dist/hooks/useResizeObserver.mjs +1 -0
- package/dist/hooks/useScript.mjs +1 -0
- package/dist/hooks/useSearchParams.mjs +1 -0
- package/dist/hooks/useStyledQRCode.mjs +1 -0
- package/dist/hooks/useThrottle.mjs +1 -0
- package/dist/hooks/useToggle.mjs +1 -0
- package/dist/hooks/useWindowScroll.mjs +1 -0
- package/dist/hooks/useWindowSize.mjs +1 -0
- package/dist/index.mjs +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +1 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.mjs +1 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs +1 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +1 -0
- package/dist/node_modules/clsx/dist/clsx.mjs +1 -0
- package/dist/node_modules/react-datepicker/dist/es/index.mjs +1 -0
- package/dist/styles/colors.mjs +1 -0
- package/dist/styles/index.mjs +1 -1
- package/dist/styles/lib/react-datepicker.css.mjs +1 -0
- package/dist/styles/shadows.mjs +1 -0
- package/dist/styles/theme.mjs +1 -0
- package/dist/styles/typography.mjs +1 -0
- package/dist/utils/color/index.d.ts +8 -0
- package/dist/utils/color/index.mjs +1 -1
- package/dist/utils/date.d.ts +1 -1
- package/dist/utils/date.mjs +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.mjs +1 -1
- package/dist/utils/logo/index.d.ts +5 -0
- package/dist/utils/logo/index.mjs +1 -0
- package/dist/utils/makeGoogleFont.mjs +1 -0
- package/dist/{shared/notification-sBaCxCY5.mjs → utils/notification.mjs} +1 -1
- package/dist/utils/number/formatters.mjs +1 -0
- package/dist/utils/omitProperty.mjs +1 -0
- package/dist/utils/phone/index.mjs +1 -1
- package/dist/utils/ssn.mjs +1 -0
- package/dist/utils/string/formatKebabToPretty.mjs +1 -0
- package/dist/{shared/generateKeyFromString-D1AuwK4y.mjs → utils/string/generateKeyFromString.mjs} +1 -1
- package/dist/utils/string/index.mjs +1 -1
- package/dist/utils/string/toCapitalize.mjs +1 -0
- package/dist/utils/string/toSentenceCase.mjs +1 -0
- package/dist/utils/uuidColor.mjs +1 -0
- package/dist/validations/address.schema.d.ts +2 -0
- package/dist/validations/address.schema.mjs +1 -0
- package/dist/validations/date.schema.d.ts +8 -0
- package/dist/validations/date.schema.mjs +1 -0
- package/dist/validations/description.schema.mjs +1 -0
- package/dist/validations/email.schema.d.ts +1 -0
- package/dist/validations/email.schema.mjs +1 -0
- package/dist/validations/field.schema.mjs +1 -0
- package/dist/validations/index.d.ts +2 -1
- package/dist/validations/index.mjs +1 -1
- package/dist/validations/npi.schema.d.ts +2 -0
- package/dist/validations/npi.schema.mjs +1 -0
- package/dist/validations/phone.schema.mjs +1 -0
- package/dist/validations/ssn.schema.mjs +1 -0
- package/dist/validations/unix.schema.mjs +1 -0
- package/package.json +13 -5
- package/dist/shared/OneClickHealthBigNumbers-Bbr1GivF.mjs +0 -2
- package/dist/shared/PageSectionHeader-lc9WunC-.mjs +0 -1
- package/dist/shared/_baseIsEqual-BNqcL4o7.mjs +0 -1
- package/dist/shared/_getTag-DML0OnZi.mjs +0 -1
- package/dist/shared/colors-CSvtCJK4.mjs +0 -1
- package/dist/shared/date.schema-CmPHY0OU.mjs +0 -1
- package/dist/shared/formatKebabToPretty-Du43TgPC.mjs +0 -1
- package/dist/shared/index-CgwlGvef.mjs +0 -1
- package/dist/shared/jsx-runtime-Bwwz4kRH.mjs +0 -1
- package/dist/shared/magic-legal-language-7u7v_FDh.mjs +0 -155
- package/dist/shared/magic-link-Dr2o0qhW.mjs +0 -1
- package/dist/shared/magic-qr-code-DEnCvbjS.mjs +0 -1
- package/dist/shared/makeGoogleFont-pok2oDWs.mjs +0 -1
- package/dist/shared/motions-jOnF6bAS.mjs +0 -1
- package/dist/shared/phone-cSkbYk4g.mjs +0 -1
- package/dist/shared/shadows-levwxV7v.mjs +0 -1
- package/dist/shared/ssn-I4gN8M-_.mjs +0 -1
- package/dist/shared/unix.schema-D7g4VIKT.mjs +0 -1
- package/dist/shared/usePrevious-Dppy11px.mjs +0 -1
- package/dist/shared/useResizeObserver-D7K4jTvT.mjs +0 -1
- package/dist/shared/uuidColor-CbuBMrIl.mjs +0 -20
- package/dist/validations/state.schema.d.ts +0 -2
- package/dist/verifiedinc-public-shared-ui-elements-5.25.1-beta.0.tgz +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { InputProps, InputLabelProps, TextFieldProps } from '@mui/material';
|
|
3
|
+
export interface NPIInputProps {
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
name?: string;
|
|
6
|
+
helperText?: string;
|
|
7
|
+
initialValue?: string;
|
|
8
|
+
onChange?: (value: string) => void;
|
|
9
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
10
|
+
onValidNPI?: (value: string) => void;
|
|
11
|
+
error?: boolean;
|
|
12
|
+
value?: string;
|
|
13
|
+
shouldHaveClearButton?: boolean;
|
|
14
|
+
variant?: TextFieldProps['variant'];
|
|
15
|
+
size?: TextFieldProps['size'];
|
|
16
|
+
autoFocus?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
InputProps?: InputProps;
|
|
19
|
+
InputLabelProps?: InputLabelProps;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
lazy?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Renders an NPI (National Provider Identifier) input component with masking.
|
|
25
|
+
* NPI is a 10-digit numeric identifier.
|
|
26
|
+
*
|
|
27
|
+
* @param label - The label for the NPI input. Defaults to 'NPI'.
|
|
28
|
+
* @param name - The name of the NPI input. Defaults to 'npi'.
|
|
29
|
+
* @param helperText - The helper text for the NPI input.
|
|
30
|
+
* @param onChange - The callback function to handle the change event of the NPI input.
|
|
31
|
+
* @param onBlur - The callback function to handle the blur event of the NPI input.
|
|
32
|
+
* @param onValidNPI - The callback function to handle the valid NPI event of the NPI input.
|
|
33
|
+
* @param initialValue - The initial value for the NPI input. Defaults to ''.
|
|
34
|
+
* @param error - Whether the NPI input has an error. Defaults to false.
|
|
35
|
+
* @param value - The value of the NPI input. If passed, it will be used instead of the value from component state.
|
|
36
|
+
* @param autoFocus - Whether the NPI input should be focused on mount. Defaults to false.
|
|
37
|
+
* @param InputProps - Additional props to be passed to the input component.
|
|
38
|
+
* @param InputLabelProps - Additional props to be passed to the input label component.
|
|
39
|
+
* @param shouldHaveClearButton - Whether to show the clear button. Defaults to false.
|
|
40
|
+
* @param disabled - Whether the NPI input is disabled. Defaults to false.
|
|
41
|
+
* @param size - The size of the NPI input. Defaults to 'small'.
|
|
42
|
+
* @param variant - The variant of the NPI input. Defaults to 'outlined'.
|
|
43
|
+
* @param placeholder - The placeholder for the NPI input.
|
|
44
|
+
* @param lazy - Whether to use lazy loading for the NPI input. Defaults to false.
|
|
45
|
+
*/
|
|
46
|
+
export declare function NPIInput({ label, name, helperText, onChange, onBlur, onValidNPI, initialValue, error, value: valueProp, autoFocus, InputProps, InputLabelProps, shouldHaveClearButton, disabled, size, placeholder, lazy, }: Readonly<NPIInputProps>): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useState as v,useEffect as y}from"react";import{Box as z,InputAdornment as A}from"@mui/material";import{npiSchema as B}from"../../../validations/npi.schema.mjs";import{TextMaskCustom as S}from"../TextMaskCustom.mjs";import{DefaultInput as D}from"../DefaultInput.mjs";import{DataFieldClearAdornment as F}from"../DataFieldClearAdornment.mjs";import{jsx as a}from"react/jsx-runtime";function L({label:l="NPI",name:s="npi",helperText:p,onChange:n,onBlur:u,onValidNPI:o,initialValue:i="",error:m=!1,value:d,autoFocus:c=!1,InputProps:h,InputLabelProps:f,shouldHaveClearButton:I=!1,disabled:_=!1,size:x,placeholder:C="__________",lazy:P=!0}){const[t,b]=v(i),g=e=>{B.safeParse(e).success&&o?.(e)},r=e=>{b(e),n?.(e)};y(()=>{g(t)},[t]);const k={autoFocus:c,label:l,name:s,helperText:p,value:d??t,error:m,onChange:e=>{r(e.target.value)},onBlur:u,autoComplete:"off",size:x,placeholder:C,inputProps:{unmask:!0,lazy:P,mask:"0000000000",placeholderChar:"_",tabIndex:0,type:"text",inputMode:"numeric"},InputLabelProps:{shrink:!0,...f},InputProps:{inputComponent:S,endAdornment:I&&a(A,{position:"end",children:a(F,{handleClear:()=>{r("")}})}),...h},fullWidth:!0,disabled:_};return a(z,{width:"100%",children:a(D,{...k,sx:{m:0,"& input":{letterSpacing:"1px"}}})})}export{L as NPIInput};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{addressFormat as h}from"../formats/address.format.mjs";import{countrySchema as n}from"../validations/address/country.schema.mjs";import{citySchema as y}from"../validations/address/city.schema.mjs";import{line2Schema as S}from"../validations/address/line2.schema.mjs";import{line1Schema as u}from"../validations/address/line1.schema.mjs";import{addressSchema as z}from"../validations/address/address.schema.mjs";import{zipCodeSchema as f}from"../validations/address/zipcode.schema.mjs";import{stateSchema as k}from"../validations/address/state.schema.mjs";const b="address",e="line1",t="line2",a="city",r="state",i="country",c="zipCode",o={key:e,characteristics:{inputType:"text",label:"Line 1",placeholder:"123 Main Street"},zodSchema:u},s={key:t,characteristics:{inputType:"text",label:"Line 2",placeholder:"Apt 4B, Suite 100"},zodSchema:S},l={key:a,characteristics:{inputType:"text",label:"City",placeholder:"New York"},zodSchema:y},p={key:r,characteristics:{inputType:"text",label:"State",placeholder:"NY"},zodSchema:k},m={key:i,characteristics:{inputType:"text",label:"Country",placeholder:"US"},zodSchema:n},d={key:c,characteristics:{inputType:"text",label:"Zip Code",placeholder:"10001"},zodSchema:f},x={key:b,characteristics:{inputType:"composite",label:"Address",defaultOrder:[e,t,a,r,i,c]},children:{line1:o,line2:s,city:l,state:p,country:m,zipCode:d},zodSchema:z,format:h};export{x as address,l as city,m as country,o as line1,s as line2,p as state,d as zipCode};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{birthDateSchema as t}from"../validations/other/birthDate.schema.mjs";import{dateFormat as a}from"../formats/date.format.mjs";const e="birthDate",r={key:e,characteristics:{inputType:"date",label:"Birthday",placeholder:"__/__/____"},zodSchema:t,format:a};export{r as birthDate};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e={text:"text",select:"select",date:"date",composite:"composite"};export{e as fieldInputTypes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{US_STATES as p}from"../shared/us-states.mjs";import{address as n}from"./address.mjs";import{dateFormat as e}from"../formats/date.format.mjs";import{stateFormat as u}from"../formats/state.format.mjs";import{driversLicenseSchema as l}from"../validations/driversLicense/driversLicense.schema.mjs";import{dateSchema as a}from"../validations/other/date.schema.mjs";import{stateSchema as h}from"../validations/address/state.schema.mjs";import{documentNumberSchema as _}from"../validations/other/documentNumber.schema.mjs";const S="driversLicense",t="documentNumber",r="issuanceState",s="issuanceDate",i="expirationDate",f="address",c={key:t,characteristics:{inputType:"text",label:"Number",placeholder:"John"},zodSchema:_},o={key:r,characteristics:{inputType:"select",label:"State",placeholder:"NY",options:p},zodSchema:h,format:u},m={key:s,characteristics:{inputType:"date",label:"Issued",placeholder:"__/__/____"},zodSchema:a,format:e},d={key:i,characteristics:{inputType:"date",label:"Expired",placeholder:"__/__/____"},zodSchema:a,format:e},y={key:S,characteristics:{inputType:"composite",label:"Driver's License",defaultOrder:[t,r,s,i,f]},children:{documentNumber:c,issuanceState:o,issuanceDate:m,expirationDate:d,address:n},zodSchema:l};export{c as documentNumber,y as driversLicense,d as expirationDate,m as issuanceDate,o as issuanceState};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{middleSchema as r}from"../validations/name/middle.schema.mjs";import{lastSchema as s}from"../validations/name/last.schema.mjs";import{firstSchema as c}from"../validations/name/first.schema.mjs";import{fullNameSchema as o}from"../validations/name/fullName.schema.mjs";const d="fullName",e="firstName",a="lastName",m="middleName",t={key:e,characteristics:{inputType:"text",label:"First Name",placeholder:"John"},zodSchema:c},l={key:a,characteristics:{inputType:"text",label:"Last Name",placeholder:"Doe"},zodSchema:s},i={key:m,characteristics:{inputType:"text",label:"Middle Name",placeholder:"William"},zodSchema:r},h={key:d,characteristics:{inputType:"composite",label:"Full Name",defaultOrder:[e,m,a]},children:{firstName:t,lastName:l,middleName:i},zodSchema:o};export{t as firstName,h as fullName,l as lastName,i as middleName};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HealthInsuranceValue } from '../validations';
|
|
3
|
+
import { TextFieldDefinition, CompositeFieldDefinition } from './types';
|
|
4
|
+
declare const healthInsuranceKey = "healthInsurance";
|
|
5
|
+
declare const memberIdKey = "memberId";
|
|
6
|
+
declare const payerKey = "payer";
|
|
7
|
+
export declare const memberId: {
|
|
8
|
+
key: string;
|
|
9
|
+
characteristics: {
|
|
10
|
+
inputType: "text";
|
|
11
|
+
label: string;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
};
|
|
14
|
+
zodSchema: z.ZodString;
|
|
15
|
+
};
|
|
16
|
+
export declare const payerName: {
|
|
17
|
+
key: string;
|
|
18
|
+
characteristics: {
|
|
19
|
+
inputType: "text";
|
|
20
|
+
label: string;
|
|
21
|
+
placeholder: string;
|
|
22
|
+
};
|
|
23
|
+
zodSchema: z.ZodString;
|
|
24
|
+
};
|
|
25
|
+
export declare const payer: {
|
|
26
|
+
key: string;
|
|
27
|
+
characteristics: {
|
|
28
|
+
inputType: "composite";
|
|
29
|
+
label: string;
|
|
30
|
+
defaultOrder: readonly ["name"];
|
|
31
|
+
};
|
|
32
|
+
children: {
|
|
33
|
+
name: {
|
|
34
|
+
key: string;
|
|
35
|
+
characteristics: {
|
|
36
|
+
inputType: "text";
|
|
37
|
+
label: string;
|
|
38
|
+
placeholder: string;
|
|
39
|
+
};
|
|
40
|
+
zodSchema: z.ZodString;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
zodSchema: z.ZodObject<{
|
|
44
|
+
name: z.ZodOptional<z.ZodString>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
name?: string | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
name?: string | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
};
|
|
51
|
+
export declare const healthInsurance: {
|
|
52
|
+
key: string;
|
|
53
|
+
characteristics: {
|
|
54
|
+
inputType: "composite";
|
|
55
|
+
label: string;
|
|
56
|
+
defaultOrder: readonly ["memberId", "payer"];
|
|
57
|
+
};
|
|
58
|
+
zodSchema: z.ZodObject<{
|
|
59
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
memberId: z.ZodString;
|
|
61
|
+
payer: z.ZodObject<{
|
|
62
|
+
verifiedId: z.ZodString;
|
|
63
|
+
name: z.ZodString;
|
|
64
|
+
logoUrl: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
name: string;
|
|
67
|
+
verifiedId: string;
|
|
68
|
+
logoUrl?: string | undefined;
|
|
69
|
+
}, {
|
|
70
|
+
name: string;
|
|
71
|
+
verifiedId: string;
|
|
72
|
+
logoUrl?: string | undefined;
|
|
73
|
+
}>;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
memberId: string;
|
|
76
|
+
payer: {
|
|
77
|
+
name: string;
|
|
78
|
+
verifiedId: string;
|
|
79
|
+
logoUrl?: string | undefined;
|
|
80
|
+
};
|
|
81
|
+
id?: number | undefined;
|
|
82
|
+
}, {
|
|
83
|
+
memberId: string;
|
|
84
|
+
payer: {
|
|
85
|
+
name: string;
|
|
86
|
+
verifiedId: string;
|
|
87
|
+
logoUrl?: string | undefined;
|
|
88
|
+
};
|
|
89
|
+
id?: number | undefined;
|
|
90
|
+
}>;
|
|
91
|
+
format: (value: HealthInsuranceValue) => string | null;
|
|
92
|
+
};
|
|
93
|
+
declare module '../declarations' {
|
|
94
|
+
interface FieldSchemaDefinitions {
|
|
95
|
+
healthInsurance: CompositeFieldDefinition<typeof healthInsuranceKey>;
|
|
96
|
+
memberId: TextFieldDefinition<typeof memberIdKey>;
|
|
97
|
+
payer: CompositeFieldDefinition<typeof payerKey>;
|
|
98
|
+
payerName: TextFieldDefinition<'name'>;
|
|
99
|
+
}
|
|
100
|
+
interface FieldValueDefinitions {
|
|
101
|
+
healthInsurance: HealthInsuranceValue;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as t}from"zod";import{payerNameSchema as e}from"../validations/healthInsurance/payerName.schema.mjs";import{memberIdSchema as c}from"../validations/healthInsurance/memberId.schema.mjs";import{healthInsuranceFormat as o}from"../formats/healthInsurance.format.mjs";import{healthInsuranceSchema as n}from"../validations/healthInsurance/healthInsurance.schema.mjs";const s="healthInsurance",a="memberId",r="payer",h={key:a,characteristics:{inputType:"text",label:"Member ID",placeholder:"Enter member ID"},zodSchema:c},m={key:"name",characteristics:{inputType:"text",label:"Payer Name",placeholder:"Enter insurance payer name"},zodSchema:e},p={key:r,characteristics:{inputType:"composite",label:"Payer",defaultOrder:["name"]},children:{name:m},zodSchema:t.object({name:e.optional()})},i={key:s,characteristics:{inputType:"composite",label:"Health Insurance",defaultOrder:[a,r]},zodSchema:n,format:o};export{i as healthInsurance,h as memberId,p as payer,m as payerName};
|
|
@@ -512,6 +512,92 @@ export declare const fields: {
|
|
|
512
512
|
zodSchema: import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodString, string, string>, string, string>;
|
|
513
513
|
format: (value: string) => string;
|
|
514
514
|
};
|
|
515
|
+
healthInsurance: {
|
|
516
|
+
key: string;
|
|
517
|
+
characteristics: {
|
|
518
|
+
inputType: "composite";
|
|
519
|
+
label: string;
|
|
520
|
+
defaultOrder: readonly ["memberId", "payer"];
|
|
521
|
+
};
|
|
522
|
+
zodSchema: import('zod').ZodObject<{
|
|
523
|
+
id: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
524
|
+
memberId: import('zod').ZodString;
|
|
525
|
+
payer: import('zod').ZodObject<{
|
|
526
|
+
verifiedId: import('zod').ZodString;
|
|
527
|
+
name: import('zod').ZodString;
|
|
528
|
+
logoUrl: import('zod').ZodOptional<import('zod').ZodString>;
|
|
529
|
+
}, "strip", import('zod').ZodTypeAny, {
|
|
530
|
+
name: string;
|
|
531
|
+
verifiedId: string;
|
|
532
|
+
logoUrl?: string | undefined;
|
|
533
|
+
}, {
|
|
534
|
+
name: string;
|
|
535
|
+
verifiedId: string;
|
|
536
|
+
logoUrl?: string | undefined;
|
|
537
|
+
}>;
|
|
538
|
+
}, "strip", import('zod').ZodTypeAny, {
|
|
539
|
+
memberId: string;
|
|
540
|
+
payer: {
|
|
541
|
+
name: string;
|
|
542
|
+
verifiedId: string;
|
|
543
|
+
logoUrl?: string | undefined;
|
|
544
|
+
};
|
|
545
|
+
id?: number | undefined;
|
|
546
|
+
}, {
|
|
547
|
+
memberId: string;
|
|
548
|
+
payer: {
|
|
549
|
+
name: string;
|
|
550
|
+
verifiedId: string;
|
|
551
|
+
logoUrl?: string | undefined;
|
|
552
|
+
};
|
|
553
|
+
id?: number | undefined;
|
|
554
|
+
}>;
|
|
555
|
+
format: (value: import('../validations').HealthInsuranceValue) => string | null;
|
|
556
|
+
};
|
|
557
|
+
memberId: {
|
|
558
|
+
key: string;
|
|
559
|
+
characteristics: {
|
|
560
|
+
inputType: "text";
|
|
561
|
+
label: string;
|
|
562
|
+
placeholder: string;
|
|
563
|
+
};
|
|
564
|
+
zodSchema: import('zod').ZodString;
|
|
565
|
+
};
|
|
566
|
+
payer: {
|
|
567
|
+
key: string;
|
|
568
|
+
characteristics: {
|
|
569
|
+
inputType: "composite";
|
|
570
|
+
label: string;
|
|
571
|
+
defaultOrder: readonly ["name"];
|
|
572
|
+
};
|
|
573
|
+
children: {
|
|
574
|
+
name: {
|
|
575
|
+
key: string;
|
|
576
|
+
characteristics: {
|
|
577
|
+
inputType: "text";
|
|
578
|
+
label: string;
|
|
579
|
+
placeholder: string;
|
|
580
|
+
};
|
|
581
|
+
zodSchema: import('zod').ZodString;
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
zodSchema: import('zod').ZodObject<{
|
|
585
|
+
name: import('zod').ZodOptional<import('zod').ZodString>;
|
|
586
|
+
}, "strip", import('zod').ZodTypeAny, {
|
|
587
|
+
name?: string | undefined;
|
|
588
|
+
}, {
|
|
589
|
+
name?: string | undefined;
|
|
590
|
+
}>;
|
|
591
|
+
};
|
|
592
|
+
payerName: {
|
|
593
|
+
key: string;
|
|
594
|
+
characteristics: {
|
|
595
|
+
inputType: "text";
|
|
596
|
+
label: string;
|
|
597
|
+
placeholder: string;
|
|
598
|
+
};
|
|
599
|
+
zodSchema: import('zod').ZodString;
|
|
600
|
+
};
|
|
515
601
|
ssn: {
|
|
516
602
|
key: string;
|
|
517
603
|
characteristics: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{middleName as s,lastName as r,firstName as t,fullName as m}from"./fullName.mjs";import{zipCode as i,country as o,state as n,city as p,line2 as c,line1 as d,address as l}from"./address.mjs";import{expirationDate as f,issuanceDate as u,issuanceState as N,documentNumber as y,driversLicense as b}from"./driversLicense.mjs";import{payerName as h,payer as D,memberId as x,healthInsurance as I}from"./healthInsurance.mjs";import{ssn as j}from"./ssn.mjs";import{phone as v}from"./phone.mjs";import{sex as z}from"./sex.mjs";import{birthDate as O}from"./birthDate.mjs";const a={fullName:m,firstName:t,lastName:r,middleName:s,address:l,line1:d,line2:c,city:p,state:n,country:o,zipCode:i,driversLicense:b,documentNumber:y,issuanceState:N,issuanceDate:u,expirationDate:f,healthInsurance:I,memberId:x,payer:D,payerName:h,ssn:j,phone:v,sex:z,birthDate:O},C=Object.fromEntries(Object.keys(a).map(e=>[e,e]));export{C as credentialKeys,a as fields};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{phoneSchema as e}from"../validations/other/phone.schema.mjs";const o="phone",p={key:o,characteristics:{inputType:"text",label:"Phone Number",placeholder:"(555) 123-4567"},zodSchema:e};export{p as phone};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{sexSchema as e,sexOptions as s}from"../validations/other/sex.schema.mjs";const t="sex",a={key:t,characteristics:{inputType:"select",label:"Sex",options:s},zodSchema:e};export{a as sex};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{ssnFormat as s}from"../formats/ssn.format.mjs";import{ssnSchema as a}from"../validations/other/ssn.schema.mjs";const t="ssn",e={key:t,characteristics:{inputType:"text",label:"SSN",placeholder:"123-45-6789"},zodSchema:a,format:s};export{e as ssn};
|
|
@@ -6,4 +6,32 @@ export declare class Form {
|
|
|
6
6
|
get isEmpty(): boolean;
|
|
7
7
|
get isDirty(): boolean;
|
|
8
8
|
get isDisabled(): boolean;
|
|
9
|
+
get values(): {
|
|
10
|
+
[k: string]: string | {
|
|
11
|
+
memberId: string;
|
|
12
|
+
payer: {
|
|
13
|
+
name: string;
|
|
14
|
+
verifiedId: string;
|
|
15
|
+
logoUrl?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
id?: number | undefined;
|
|
18
|
+
} | {
|
|
19
|
+
firstName?: string | undefined;
|
|
20
|
+
lastName?: string | undefined;
|
|
21
|
+
middleName?: string | undefined;
|
|
22
|
+
} | {
|
|
23
|
+
line1?: string | undefined;
|
|
24
|
+
line2?: string | undefined;
|
|
25
|
+
city?: string | undefined;
|
|
26
|
+
state?: string | undefined;
|
|
27
|
+
country?: string | undefined;
|
|
28
|
+
zipCode?: string | undefined;
|
|
29
|
+
} | {
|
|
30
|
+
documentNumber?: string | undefined;
|
|
31
|
+
issuanceState?: string | undefined;
|
|
32
|
+
issuanceDate?: string | undefined;
|
|
33
|
+
expirationDate?: string | undefined;
|
|
34
|
+
address?: undefined;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
9
37
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t=Object.defineProperty,r=(s,e,i)=>e in s?t(s,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[e]=i,a=(s,e,i)=>r(s,typeof e!="symbol"?e+"":e,i);import{credentialKeys as l}from"../fields/index.mjs";class u{constructor(e){a(this,"fields"),this.fields=e}get isValid(){return Object.values(this.fields).every(e=>e.isValid)}get isEmpty(){return Object.values(this.fields).every(e=>e.schema.key===l.phone?!0:e.isEmpty)}get isDirty(){return Object.values(this.fields).some(e=>e.isDirty)}get isDisabled(){return Object.values(this.fields).every(e=>e.isDisabled)}get values(){return Object.fromEntries(Object.values(this.fields).map(e=>[e.schema.key,e.value]))}}export{u as Form};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var C=Object.defineProperty,F=(u,e,t)=>e in u?C(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,w=(u,e,t)=>F(u,typeof e!="symbol"?e+"":e,t);import{fields as p}from"../fields/index.mjs";import{FormFieldBuilder as O}from"./formFieldBuilder.mjs";import{Form as T}from"./form.mjs";import{normalizeCredentialType as m}from"./utils.mjs";import{fieldInputTypes as f}from"../fields/constants.mjs";class x{constructor(){w(this,"fieldBuilder",new O)}createFromCredentialAndRequests(e,t){const i={};for(const l of t){let r;if(typeof l=="string")r=this.expandCredentialType(l);else if(r=l,!r.children){const c=r.type.replace(/Credential$/,""),h=c.charAt(0).toLowerCase()+c.slice(1),d=p[h],y=["healthInsurance"];if(d&&d.characteristics.inputType===f.composite&&"children"in d&&"defaultOrder"in d.characteristics&&d.characteristics.defaultOrder&&!y.includes(h)){const v=this.expandCredentialType(r.type);r={...r,children:v.children}}}const n=m(r.type),s=e.filter(c=>c.type===n).filter(c=>this.credentialMeetsRequirements(r,c)),a=this.createField(r,s,n),o=p[n];o&&(i[o.key]=a)}return new T(i)}createField(e,t,i){const l=p[i];if(!l)throw new Error(`Unknown credential type: ${i}`);const r=this.extractRequestOptions(e);if(t.length===0)return this.fieldBuilder.createFromSchema(e,l);const n=t[0],s=this.createChildFields(e,n);let a;return t.length>1&&(a=t.map(o=>{const c=this.createChildFields(e,o);return this.fieldBuilder.createFromCredential(o,c,r)})),this.fieldBuilder.createFromCredential(n,s,r,a)}createChildFields(e,t){if(!e.children)return;const i={};for(const l of e.children){const r=m(l.type),n=p[r];if(!n)continue;const s=n.key;if(t.value&&s in t.value){let a;n.characteristics.inputType===f.composite?a=t.value[s]:a=t.value;const o={...t,uuid:void 0,type:r,value:a},c=this.extractRequestOptions(l,e);let h;n.characteristics.inputType===f.composite&&l.children&&(h=this.createChildFields(l,o));const d=this.fieldBuilder.createFromCredential(o,h,c);i[s]=d}else{const a=this.extractRequestOptions(l,e),o={...l,...a},c=this.fieldBuilder.createFromSchema(o,n);i[s]=c}}return Object.keys(i).length>0?i:void 0}expandCredentialType(e){var t;const i=e.replace(/Credential$/,""),l=i.charAt(0).toLowerCase()+i.slice(1),r=p[l];if(!r)throw new Error(`Unknown credential type: ${e}`);const n={type:e,allowUserInput:!0,mandatory:"no",multi:!1};if(r.characteristics.inputType===f.composite&&"children"in r&&"defaultOrder"in r.characteristics&&r.characteristics.defaultOrder){const s=[];for(const a of r.characteristics.defaultOrder){const o=(t=r.children)==null?void 0:t[a];if(o){const c=this.expandCredentialType(o.key);s.push(c)}}return{...n,children:s}}return n}credentialMeetsRequirements(e,t){if(!e.children)return!0;for(const i of e.children){const l=m(typeof i=="string"?i:i.type);if((typeof i=="string"?"no":i.mandatory??"no")==="no")continue;let r=!1;const n=p[l];if(n&&t.value){const s=n.key;r=s in t.value&&t.value[s]!==void 0&&t.value[s]!==null&&t.value[s]!==""}if(!r)return!1}return!0}extractRequestOptions(e,t){return{allowUserInput:e.allowUserInput??t?.allowUserInput??!0,mandatory:e.mandatory??t?.mandatory??"no",multi:e.multi??!1,description:e.description}}}export{x as FormBuilder};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var y=Object.defineProperty,b=(n,e,t)=>e in n?y(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,l=(n,e,t)=>b(n,typeof e!="symbol"?e+"":e,t);import{z as v}from"zod";import{isEqual as g,cloneDeep as m}from"lodash";class f{constructor(e,t,s,i,r={}){if(l(this,"id"),l(this,"_defaultValue"),l(this,"_value"),l(this,"schema"),l(this,"children"),l(this,"touched"),l(this,"allowUserInput"),l(this,"mandatory"),l(this,"multi"),l(this,"variants"),l(this,"description"),this.id=e,this._defaultValue=t,this._value=s,this.children=r.children,this.touched=!1,this.allowUserInput=r.allowUserInput??!0,this.mandatory=r.mandatory??"no",this.multi=r.multi??!1,this.variants=r.variants,this.description=r.description,i.characteristics.inputType==="composite"&&r.children)if("_def"in i.zodSchema&&i.zodSchema._def.typeName==="ZodEffects")this.schema=i;else{let a;if("shape"in i.zodSchema)a=i.zodSchema;else throw new Error("Composite field could not be modified.");const h=a.shape,o={};Object.entries(r.children).forEach(([c,u])=>{if(h[c]){const d=h[c];u.isRequired?d instanceof v.ZodString?o[c]=d.refine(p=>!u.isRequired&&u.isEmpty?!0:p!==""&&p!==null&&p!==void 0,`${u.schema.characteristics.label} is required`):o[c]=d:o[c]=d.optional()}}),this.schema={...i,zodSchema:v.object(o)}}else this.schema={...i,zodSchema:i.zodSchema.refine(a=>!this.isRequired&&this.isEmpty?!0:a!==""&&a!==null&&a!==void 0,`${i.characteristics.label} is required`)}}get defaultValue(){if(this.schema.characteristics.inputType==="composite"&&this.children){const e={};return Object.entries(this.children).forEach(([t,s])=>{e[t]=s.defaultValue}),Object.keys(e).length>0?e:void 0}return this._defaultValue}get value(){if(this.schema.characteristics.inputType==="composite"&&this.children){const e={};return Object.entries(this.children).forEach(([t,s])=>{s.schema.characteristics.inputType==="composite"?e[t]=s.value:e[t]=s.isEmpty?"":s.value}),Object.keys(e).length>0?e:void 0}return this._value}set value(e){this._value=e}get hasVariants(){return this.variants?this.variants.length>1:!1}get isValid(){return this.errors===null}get isRequired(){return this.mandatory==="yes"||this.mandatory==="if_available"}get isDisabled(){return!this.allowUserInput}get isEmpty(){const e=t=>t==null||t===""?!0:typeof t=="object"&&t!==null?Object.values(t).every(e):!1;return e(this.value)}get isDirty(){return this.schema.characteristics.inputType==="composite"&&this.children?Object.values(this.children).some(e=>e.isDirty):!g(this._value,this._defaultValue)}get errors(){let e=null;const t={};if(this.schema.characteristics.inputType==="composite"&&this.children){const s={};Object.entries(this.children).forEach(([r,a])=>{a.isEmpty&&!a.isRequired?s[r]=void 0:s[r]=a.value});const i=this.schema.zodSchema.safeParse(s);e=i.success?null:i.error,e!=null&&e.issues&&e.issues.length>0||Object.entries(this.children).forEach(([r,a])=>{const h=a.errors;h&&(t[r]=h)})}else if(!this.isRequired&&this.isEmpty)e=null;else{const s=this.schema.zodSchema.safeParse(this.value);e=s.success?null:s.error}return!e&&Object.keys(t).length===0?null:{error:e,childrenErrors:t}}get errorMessage(){var e,t,s,i;return((i=(s=(t=(e=this.errors)==null?void 0:e.error)==null?void 0:t.issues)==null?void 0:s.find(r=>typeof r.message=="string"))==null?void 0:i.message)??null}get displayValue(){if(typeof this.schema.format=="function")if(this.schema.characteristics.inputType==="composite"&&this.children){const e={};return Object.entries(this.children).forEach(([t,s])=>{e[t]=s.value}),this.schema.format(e)??null}else return this.isEmpty?null:this.schema.format(this.value)??this.value;return this.value}replaceWithVariant(e){if(!this.variants){console.warn(`Field ${this.id} has no variants`);return}const t=this.variants.find(i=>i.id===e);if(!t){console.warn(`Variant ${e} not found for field ${this.id}`);return}const s=this.variants;this.id=t.id,this.schema=t.schema,this.description=t.description,this.allowUserInput=t.allowUserInput,this.mandatory=t.mandatory,this.multi=t.multi,this._value=t.value&&typeof t.value=="object"?m(t.value):t.value,this._defaultValue=t.defaultValue&&typeof t.defaultValue=="object"?m(t.defaultValue):t.defaultValue,this.variants=s,t.children?(this.children={},Object.entries(t.children).forEach(([i,r])=>{this.children&&(this.children[i]=this.deepCloneFormField(r))})):this.children=void 0}deepCloneFormField(e){const t=e._value&&typeof e._value=="object"?m(e._value):e._value,s=e._defaultValue&&typeof e._defaultValue=="object"?m(e._defaultValue):e._defaultValue;let i;return e.children&&(i={},Object.entries(e.children).forEach(([r,a])=>{i&&(i[r]=this.deepCloneFormField(a))})),new f(e.id,s,t,e.schema,{children:i,allowUserInput:e.allowUserInput,mandatory:e.mandatory,multi:e.multi,variants:e.variants,description:e.description})}}export{f as FormField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{cloneDeep as y}from"lodash";import{fields as p}from"../fields/index.mjs";import{FormField as u}from"./formField.mjs";import{normalizeCredentialType as f}from"./utils.mjs";import{fieldInputTypes as d}from"../fields/constants.mjs";class v{createFromCredential(i,o,e,r){var n;const a=p[i.type];if(!a)throw new Error(`Invalid credential type: ${i.type}`);const l=a.key;let t;if(a.characteristics.inputType===d.composite)if(i.value&&Object.keys(i.value).length>0)if(o&&Object.keys(o).length>0){const s={};Object.keys(o).forEach(c=>{c in i.value&&(s[c]=i.value[c])}),t=Object.keys(s).length>0?s:void 0}else t=i.value;else t=void 0;else t=(n=i.value)==null?void 0:n[l];return new u(i.uuid,t,t,a,{children:o,allowUserInput:e?.allowUserInput??!0,mandatory:e?.mandatory??"no",multi:e?.multi??!1,variants:r,description:e?.description})}createFromSchema(i,o){let e,r;const n={allowUserInput:i.allowUserInput??!0,mandatory:i.mandatory??"no",multi:i.multi??!1,description:i.description};if(o.characteristics.inputType===d.composite&&i.children){const l={};for(const t of i.children){const s=f(t.type),c=p[s];if(c){const m=this.createFromSchema(t,c);l[c.key]=m}}r=Object.keys(l).length>0?l:void 0}if(o.characteristics.inputType===d.composite)if(r&&Object.keys(r).length>0){const l={};Object.entries(r).forEach(([t,s])=>{l[t]=s.defaultValue}),e=l}else e=void 0;else e="";const a=typeof e=="object"&&e!==null?y(e):e;return new u(void 0,e,a,o,{children:r,allowUserInput:n.allowUserInput,mandatory:n.mandatory,multi:n.multi,variants:void 0,description:n.description})}}export{v as FormFieldBuilder};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function n(r){const e=r.replace(/Credential$/,"");return e.charAt(0).toLowerCase()+e.slice(1)}export{n as normalizeCredentialType};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{toUSaddressPretty as d}from"../../../../../utils/address/index.mjs";const m=i=>{var r,o,t,l,n,e;return d({line1:((r=i.line1)==null?void 0:r.trim())??"",line2:(o=i.line2)==null?void 0:o.trim(),city:((t=i.city)==null?void 0:t.trim())??"",state:((l=i.state)==null?void 0:l.trim())??"",zipCode:((n=i.zipCode)==null?void 0:n.trim())??"",country:((e=i.country)==null?void 0:e.trim())??"US"})};export{m as addressFormat};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=a=>{const t=new Date(Number(a)),e=String(t.getUTCMonth()+1).padStart(2,"0"),r=String(t.getUTCDate()).padStart(2,"0"),n=t.getUTCFullYear();return`${e}/${r}/${n}`};export{o as dateFormat};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=r=>{const e=r.replace(/\*/g,"\u2022");if(e.includes("\u2022"))return e;const n=e.length;if(n<=2)return e;if(n<5){const u=e.slice(-2);return"\u2022".repeat(n-2)+u}const l=e.slice(0,2),s=e.slice(-2),c=n-4,t="\u2022".repeat(c);return l+t+s},m=r=>{var e;return!((e=r?.payer)!=null&&e.name)||!(r!=null&&r.memberId)?null:`${r.payer.name}-${a(r.memberId)}`};export{m as healthInsuranceFormat,a as maskMemberId};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=e=>e.replace(/(\d{3})-?(\d{2})-?(\d{4})/,"\u2022\u2022\u2022-\u2022\u2022-$3");export{s as ssnFormat};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{US_STATES_RECORD as r}from"../shared/us-states.mjs";const t=o=>r[o.toUpperCase()]||o;export{t as stateFormat};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function e(n){return n.filter(Boolean)}export{e as toDomainCredentials};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './domain.map';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{fieldInputTypes as h}from"../fields/constants.mjs";function f(p){const c=t=>t.uuid!==void 0,i=t=>t.schema.characteristics.inputType===h.composite&&t.children?Object.values(t.children).some(i):!t.isEmpty,a=t=>{if(t==null)return t;if(typeof t=="object"&&!Array.isArray(t)){const e={};return Object.entries(t).forEach(([s,d])=>{const r=a(d);r!==""&&r!==null&&r!==void 0&&(typeof r=="object"&&!Array.isArray(r)?Object.keys(r).length>0&&(e[s]=r):e[s]=r)}),e}return t},y=t=>{const e=a(t.value);let s;return t.schema.characteristics.inputType===h.composite?s=e:s={[t.schema.key]:e},t.id?{uuid:t.id,type:t.schema.key,value:s}:{type:t.schema.key,value:s}},l=Object.values(p.fields).filter(i),o=[],n=[],u=[];return l.forEach(t=>{const e=y(t);t.isDirty?c(e)?n.push(e):o.push(e):c(e)&&u.push(e)}),{toCreate:o,toPatch:n,unchanged:u}}export{f as toCreatePatchCredentials};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function s(o){return o.map(e=>{const u={uuid:e.uuid},a=n=>n.join("."),l=(n,c=[])=>Object.entries(n).flatMap(([i,t])=>{const r=[...c,i];return typeof t=="object"&&t!==null&&Object.keys(t).length>0?l(t,r):[a(r)]});return typeof e.value=="object"&&e.value!==null&&(u.fields=l(e.value)),u})}export{s as toShareCredentials};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming",DC:"District of Columbia",AS:"American Samoa",GU:"Guam",MP:"Northern Mariana Islands",PR:"Puerto Rico",UM:"United States Minor Outlying Islands",VI:"Virgin Islands"},e=Object.entries(n).map(([a,i])=>({value:a,label:i})).sort((a,i)=>a.label.localeCompare(i.label)),o=Object.keys(n);export{e as US_STATES,n as US_STATES_RECORD,o as US_STATE_CODES};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as t}from"zod";import{line1Schema as a,line1ValidationMessage as l}from"./line1.schema.mjs";import{line2Schema as n}from"./line2.schema.mjs";import{citySchema as o,cityValidationMessage as d}from"./city.schema.mjs";import{stateSchema as c,stateValidationMessage as y}from"./state.schema.mjs";import{countrySchema as r,countryValidationMessage as m}from"./country.schema.mjs";import{zipCodeSchema as p,zipCodeValidationMessage as u}from"./zipcode.schema.mjs";const h=t.object({line1:a.optional(),line2:n.optional(),city:o.optional(),state:c.optional(),country:r.optional(),zipCode:p.optional()}).superRefine((e,s)=>{if(Object.values(e).every(i=>!i))return!0;(Object.prototype.hasOwnProperty.call(e,"line1")||Object.prototype.hasOwnProperty.call(e,"line2")||Object.prototype.hasOwnProperty.call(e,"city")||Object.prototype.hasOwnProperty.call(e,"state")||Object.prototype.hasOwnProperty.call(e,"country")||Object.prototype.hasOwnProperty.call(e,"zipCode"))&&(Object.prototype.hasOwnProperty.call(e,"line1")&&(!e.line1||e.line1.trim()==="")&&(a.safeParse(e.line1).success||s.addIssue({code:t.ZodIssueCode.custom,path:["line1"],message:l})),Object.prototype.hasOwnProperty.call(e,"city")&&(!e.city||e.city.trim()==="")&&(o.safeParse(e.city).success||s.addIssue({code:t.ZodIssueCode.custom,path:["city"],message:d})),Object.prototype.hasOwnProperty.call(e,"state")&&(c.safeParse(e.state).success||s.addIssue({code:t.ZodIssueCode.custom,path:["state"],message:y})),Object.prototype.hasOwnProperty.call(e,"country")&&(r.safeParse(e.country).success||s.addIssue({code:t.ZodIssueCode.custom,path:["country"],message:m})),Object.prototype.hasOwnProperty.call(e,"zipCode")&&(p.safeParse(e.zipCode).success||s.addIssue({code:t.ZodIssueCode.custom,path:["zipCode"],message:u})))});export{h as addressSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as t}from"zod";const i="City is required",s=t.string().min(1,i);export{s as citySchema,i as cityValidationMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as e}from"zod";const o="Country must be US",n=e.string().refine(t=>t==="US",o);export{n as countrySchema,o as countryValidationMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as e}from"zod";const i="Line 1 is required",s=e.string().min(1,i);export{s as line1Schema,i as line1ValidationMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as o}from"zod";const t=o.string();export{t as line2Schema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as s}from"zod";import{US_STATE_CODES as t}from"../../shared/us-states.mjs";const a="Invalid state",e=s.enum(t,{message:a});export{e as stateSchema,a as stateValidationMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as o}from"zod";const e="Invalid zip code",a=o.string().regex(/^\d{5}(-\d{4})?$/,e);export{a as zipCodeSchema,e as zipCodeValidationMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as a}from"zod";import{addressSchema as m}from"../address/address.schema.mjs";import{dateSchema as e}from"../other/date.schema.mjs";import{documentNumberSchema as r}from"../other/documentNumber.schema.mjs";import{stateSchema as t}from"../address/state.schema.mjs";const s=a.object({documentNumber:r,issuanceState:t,issuanceDate:e,expirationDate:e,address:m});export{s as driversLicenseSchema};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const healthInsuranceSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
4
|
+
memberId: z.ZodString;
|
|
5
|
+
payer: z.ZodObject<{
|
|
6
|
+
verifiedId: z.ZodString;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
logoUrl: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
name: string;
|
|
11
|
+
verifiedId: string;
|
|
12
|
+
logoUrl?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
name: string;
|
|
15
|
+
verifiedId: string;
|
|
16
|
+
logoUrl?: string | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
memberId: string;
|
|
20
|
+
payer: {
|
|
21
|
+
name: string;
|
|
22
|
+
verifiedId: string;
|
|
23
|
+
logoUrl?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
id?: number | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
memberId: string;
|
|
28
|
+
payer: {
|
|
29
|
+
name: string;
|
|
30
|
+
verifiedId: string;
|
|
31
|
+
logoUrl?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
id?: number | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
export type HealthInsuranceValue = z.infer<typeof healthInsuranceSchema>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as e}from"zod";import{memberIdSchema as r}from"./memberId.schema.mjs";import{payerNameSchema as m}from"./payerName.schema.mjs";const o=e.object({id:e.number().optional(),memberId:r,payer:e.object({verifiedId:e.string().regex(/^V\d+$/),name:m,logoUrl:e.string().url().optional()})});export{o as healthInsuranceSchema};
|
package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/memberId.schema.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as m}from"zod";const e="Member ID is required",r=m.string().min(1,e).max(255,e);export{r as memberIdSchema,e as memberIdValidationMessage};
|
package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/payerName.schema.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as e}from"zod";const a="Payer name is required",m=e.string().min(1,a).max(255,a).trim();export{m as payerNameSchema,a as payerNameValidationMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as r}from"zod";const o=r.string();export{o as firstSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as m}from"zod";import{firstSchema as a}from"./first.schema.mjs";import{lastSchema as e}from"./last.schema.mjs";import{middleSchema as o}from"./middle.schema.mjs";const r=m.object({firstName:a,lastName:e,middleName:o});export{r as fullNameSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as t}from"zod";const r=t.string();export{r as lastSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as m}from"zod";const r=m.string();export{r as middleSchema};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const birthDateSchema: zod.ZodEffects<zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>, string, string>;
|
|
1
|
+
export declare const birthDateSchema: import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodString, string, string>, string, string>, string, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{birthDateSchema as t}from"../../../../../../validations/date.schema.mjs";const a=t;export{a as birthDateSchema};
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const validateTimestamp: (timestampString: string) => boolean;
|
|
3
|
-
export declare const validateMinimumDate1900: (timestampString: string) => boolean;
|
|
4
|
-
export declare const refineTimestamp: (value: string) => boolean;
|
|
5
|
-
export declare const refineMinimumDate1900: (value: string) => boolean;
|
|
6
|
-
export declare const dateSchema: zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>;
|
|
1
|
+
export declare const dateSchema: import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodString, string, string>, string, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{dateSchema as a}from"../../../../../../validations/date.schema.mjs";const t=a;export{t as dateSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as m}from"zod";const r=m.string();export{r as documentNumberSchema};
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Validation schema for phone field in forms
|
|
4
|
-
* Basic string validation for phone number input
|
|
5
|
-
*/
|
|
6
|
-
export declare const phoneSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
1
|
+
export declare const phoneSchema: import('zod').ZodEffects<import('zod').ZodString, string, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{phoneSchema as e}from"../../../../../../validations/phone.schema.mjs";const o=e;export{o as phoneSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as l}from"zod";const a=[{label:"Male",value:"Male"},{label:"Female",value:"Female"},{label:"Non-Binary",value:"Non-Binary"}],o=l.enum(a.map(e=>e.value));export{a as sexOptions,o as sexSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as t}from"zod";import{ssnRegex as e}from"../../../../../../utils/ssn.mjs";const i=t.string().refine(s=>/^•••-••-\d{4}$/.test(s)?!0:e.test(s),"Invalid SSN");export{i as ssnSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useCallback as t}from"react";import{useForm as f}from"./form.context.mjs";import{fieldInputTypes as S}from"../../core/fields/constants.mjs";const y=({key:i,validateOnChange:r=!0,validateOnBlur:u=!0})=>{var s,n,c,v;const{updateFieldValue:e,setFieldTouched:d,getField:p,validateForm:o}=f(),l=p(i),V=t(a=>{e(i,a),r&&o()},[i,e,o,r]),F=t((a,h)=>{e(`${i}.${a}`,h),r&&o()},[i,e,o,r]),T=t(a=>{d(i,a),a&&u&&o()},[i,d,o,u]),g=t(()=>o(),[o]),$=t(a=>{l?.schema.characteristics.inputType===S.composite?Object.keys(l?.children??{}).forEach(h=>{var m;(m=a?.ignoreKeys)!=null&&m.includes(h)||(e(`${i}.${h}`,""),d(`${i}.${h}`,!0))}):(e(i,""),d(i,!0))},[i,l,e,d]),D=t(()=>{l&&(e(i,l.defaultValue),d(i,!1))},[i,l,e,d]),k=((v=(c=(n=(s=l?.errors)==null?void 0:s.error)==null?void 0:n.errors)==null?void 0:c[0])==null?void 0:v.message)??null,C=l?.touched??!1;return{field:l,value:l?.value??"",setValue:V,setChildValue:F,error:k,isDirty:l?.isDirty??!1,isValid:l?.isValid??!0,isTouched:C,setTouched:T,validate:g,reset:D,clear:$}},b=i=>{const r=y(i);return{...r,inputProps:{id:i.key,value:r.value||"",onChange:u=>{r.setValue(u.target.value)},onBlur:()=>{r.setTouched(!0)},"aria-invalid":!r.isValid,"aria-describedby":r.error?`${i.key}-error`:void 0}}},q=i=>{var r,u,s,n,c,v;const e=b(i),{state:{isSubmitting:d,isSubmitSuccess:p}}=f();return{...e,fieldProps:{label:(r=e.field)==null?void 0:r.schema.characteristics.label,placeholder:e.field&&"placeholder"in((u=e.field)==null?void 0:u.schema.characteristics)?(s=e.field)==null?void 0:s.schema.characteristics.placeholder:void 0,required:(n=e.field)==null?void 0:n.isRequired,disabled:d||p||((c=e.field)==null?void 0:c.isDisabled),description:(v=e.field)==null?void 0:v.description,error:e.error,isDirty:e.isDirty,isValid:e.isValid,isTouched:e.isTouched}}};export{y as useField,b as useFieldInput,q as useFormField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useContext as k,createContext as A,useState as K,useCallback as i}from"react";import{jsx as T}from"react/jsx-runtime";const x=A(null),W=()=>{const m=k(x);if(!m)throw new Error("useForm must be used within a FormProvider");return m},I=({children:m,form:y,onSubmit:h})=>{const[n,c]=K({form:y,isSubmitting:!1,isSubmitSuccess:!1}),s=i(e=>{var o;if(!n.form)return;const r=e.split(".");if(r.length===1){const u=r[0],S=n.form.fields[u];if(S)return S;for(const g of Object.values(n.form.fields))if(g.children){for(const j of Object.values(g.children))if(j.id===u)return j}return}const[t,...l]=r,a=n.form.fields[t];if(!(a!=null&&a.children))return;let f=a;for(const u of l){if(!((o=f?.children)!=null&&o[u]))return;f=f.children[u]}return f},[n.form]),b=i(()=>n.form?n.form.isValid:!1,[n.form]),O=i(e=>{c(o=>({...o,form:e}))},[]),F=i(e=>{if(!n.form)return null;const o=e.split(".");if(o.length<2)return null;const r=o.slice(0,-1).join("."),t=o[o.length-1],l=s(r);if(!l||l.schema.characteristics.inputType!=="composite")throw new Error(`Parent field not found: ${r}`);return{parentField:l,childKey:t}},[n.form,s]),w=i(e=>{if(!e.children)return{};const o={};return Object.entries(e.children).forEach(([r,t])=>{o[r]=t.value}),o},[]),v=i(e=>{const o=F(e);if(o){const{parentField:r}=o,t=w(r);r.value=Object.keys(t).length>0?t:{};const l=e.split(".");if(l.length>2){const a=l.slice(0,-1).join(".");v(a)}}},[F,w]),E=i((e,o)=>{c(r=>{if(!r.form)return console.warn("No form instance available"),r;const t=s(e);return t?t.value===o?r:(t.value=o,v(e),{...r,form:r.form}):(console.warn(`Attempted to update non-existent field: ${e}`),r)})},[s,v]),P=i((e,o)=>{c(r=>{if(!r.form)return console.warn("No form instance available"),r;const t=s(e);return t?t.touched===o?r:(t.touched=o,{...r,form:r.form}):(console.warn(`Attempted to set touched state for non-existent field: ${e}`),r)})},[s]),V=i(()=>{c(e=>{if(!e.form)return e;const o=r=>{r.value=r.defaultValue,r.touched=!1,r.children&&Object.values(r.children).forEach(o)};return Object.values(e.form.fields).forEach(o),{...e,isSubmitting:!1,isSubmitSuccess:!1}})},[]),p=i(e=>{c(o=>({...o,isSubmitting:e}))},[]),d=i(e=>{c(o=>({...o,isSubmitSuccess:e}))},[]),$=i(async()=>{if(!(!b()||!n.form)){p(!0),d(!1);try{h&&(await h(n.form),d(!0))}catch(e){console.error("Form submission failed:",e),d(!1)}finally{p(!1)}}},[n.form,h,b,p,d]),C=i((e,o)=>{c(r=>{if(!r.form)return console.warn("No form instance available"),r;const t=s(e);return t?(t.replaceWithVariant(o),{...r,form:r.form}):(console.warn(`Field ${e} not found`),r)})},[s]),N={state:n,setForm:O,updateFieldValue:E,setFieldTouched:P,getField:s,validateForm:b,resetForm:V,submitForm:$,replaceFieldWithVariant:C};return T(x.Provider,{value:N,children:m})};export{I as FormProvider,W as useForm};
|