@verifiedinc-public/shared-ui-elements 8.20.3 → 8.21.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/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.mjs +1 -0
- package/dist/components/chart/AreaChart/index.d.ts +3 -1
- 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.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.mjs +1 -0
- 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.mjs +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.mjs +1 -0
- package/dist/components/chart/OneClickVerificationBigNumbers/OneClickVerificationBigNumbersMapper.d.ts +5 -16
- package/dist/components/chart/OneClickVerificationBigNumbers/OneClickVerificationBigNumbersMapper.mjs +1 -0
- package/dist/components/chart/OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.map.d.ts +3 -10
- package/dist/components/chart/OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.map.mjs +1 -0
- package/dist/components/chart/OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.mjs +1 -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.map.d.ts +4 -15
- package/dist/components/chart/OneClickVerificationSuccessOverTimeChart/OneClickVerificationSuccessOverTimeChart.map.mjs +1 -0
- package/dist/components/chart/OneClickVerificationSuccessOverTimeChart/OneClickVerificationSuccessOverTimeChart.mjs +1 -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.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 +4 -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.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/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/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.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/ssn.format.mjs +1 -0
- package/dist/components/form/NewOneClickForm/core/formats/state.format.mjs +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/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.mjs +1 -0
- 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.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/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/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/shared.mjs +1 -0
- 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.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.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/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/{shared/email-B-xO6du4.mjs → constants/email.mjs} +1 -1
- package/dist/constants/index.mjs +1 -1
- package/dist/{shared/metrics-BWSI1rAo.mjs → constants/metrics.mjs} +1 -1
- package/dist/contexts/index.mjs +1 -1
- package/dist/contexts/metrics/Metrics.context.mjs +1 -0
- package/dist/contexts/tunnel/index.mjs +1 -0
- package/dist/hooks/index.mjs +1 -1
- 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/{shared/useLocalStorage-OKgpJYer.mjs → hooks/useLocalStorage.mjs} +1 -1
- package/dist/hooks/useNavigatorOnline.mjs +1 -0
- package/dist/hooks/useNetworkType.mjs +1 -0
- package/dist/hooks/useOnClickOutside.mjs +1 -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/date.mjs +1 -0
- package/dist/utils/index.mjs +1 -1
- 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.mjs +1 -0
- package/dist/validations/date.schema.mjs +1 -0
- package/dist/validations/description.schema.mjs +1 -0
- package/dist/validations/email.schema.mjs +1 -0
- package/dist/validations/field.schema.mjs +1 -0
- package/dist/validations/index.mjs +1 -1
- 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 +5 -1
- package/dist/shared/Metrics.context-nclzMP1W.mjs +0 -1
- package/dist/shared/OneClickVerificationSuccessOverTimeChart.map-D9L91Rks.mjs +0 -1
- package/dist/shared/PageSectionHeader-WvpwlmBn.mjs +0 -1
- package/dist/shared/_baseIsEqual-sbOBMsGa.mjs +0 -1
- package/dist/shared/address.schema-2gCctEOX.mjs +0 -1
- package/dist/shared/colors-CSvtCJK4.mjs +0 -1
- package/dist/shared/driversLicense.schema-BR4qKD7W.mjs +0 -1
- package/dist/shared/formatKebabToPretty-Du43TgPC.mjs +0 -1
- package/dist/shared/isEqual-DsQDNaUy.mjs +0 -1
- package/dist/shared/magic-legal-language-33vF2Lum.mjs +0 -81
- package/dist/shared/magic-qr-code-UDSE_LRd.mjs +0 -1
- package/dist/shared/makeGoogleFont-pok2oDWs.mjs +0 -1
- package/dist/shared/motions-CgJF6dYW.mjs +0 -1
- package/dist/shared/omitProperty-DReNmkk1.mjs +0 -1
- package/dist/shared/phone-D3-biBwM.mjs +0 -1
- package/dist/shared/shadows-levwxV7v.mjs +0 -1
- package/dist/shared/ssn-Ben2r4Gg.mjs +0 -1
- package/dist/shared/useColorMap-CLfTqu93.mjs +0 -1
- package/dist/shared/useCopyToClipboard-ClqTa6sX.mjs +0 -1
- package/dist/shared/useResizeObserver-D7K4jTvT.mjs +0 -1
- package/dist/shared/uuidColor-bmve2xeu.mjs +0 -20
- package/dist/verifiedinc-public-shared-ui-elements-5.25.1-beta.0.tgz +0 -0
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
import { MapSeriesTimeSeriesDataOptions } from '../SeriesChart';
|
|
2
2
|
import { OneClickVerificationChartData } from './OneClickVerificationSuccessOverTimeChart';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
oneClickVerificationVerified: number;
|
|
7
|
-
oneClickVerificationFailed: number;
|
|
8
|
-
oneClickVerificationSending: number;
|
|
9
|
-
oneClickVerificationUndelivered: number;
|
|
10
|
-
oneClickVerificationExpired: number;
|
|
11
|
-
date: string | number;
|
|
12
|
-
}
|
|
3
|
+
import { OneClickVerificationBrandData, OneClickVerificationIntervalEntry } from '../oneClickVerification.types';
|
|
4
|
+
/** @deprecated Use {@link OneClickVerificationIntervalEntry} from the shared chart types. */
|
|
5
|
+
export type OneClickVerificationSuccessIntervalEntry = OneClickVerificationIntervalEntry;
|
|
13
6
|
export interface MapOneClickVerificationSuccessTimeSeriesDataOptions extends MapSeriesTimeSeriesDataOptions {
|
|
14
|
-
data:
|
|
15
|
-
interval?: OneClickVerificationSuccessIntervalEntry[];
|
|
16
|
-
brandUuid: string;
|
|
17
|
-
brandName: string;
|
|
18
|
-
}>;
|
|
7
|
+
data: OneClickVerificationBrandData[];
|
|
19
8
|
}
|
|
20
9
|
export declare function mapOneClickVerificationSuccessOverTimeChartData(options: MapOneClickVerificationSuccessTimeSeriesDataOptions): OneClickVerificationChartData[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{mapSeriesTimeSeriesData as o}from"../SeriesChart/SeriesChart.map.mjs";function v(t){const c=i=>{const{oneClickVerificationVerified:e,oneClickVerificationCreated:a}=i;return a>0?Math.round(e/a*100):0},r={...t,data:t.data.map(i=>{var e;return{...i,interval:(e=i.interval)==null?void 0:e.map(a=>({...a,verificationPercentage:c(a),verificationTotal:100}))}})},u=o({...r,keyValue:"verificationPercentage"}),l=o({...r,keyValue:"verificationTotal"});return u.map(i=>{const e=l.find(a=>a.uuid===i.uuid);return{...i,chartData:i.chartData.map(a=>{const n=e?.chartData.find(d=>d.date===a.date);return{date:a.date,verificationPercentage:a.value,verificationTotal:n?.value??0}})}})}export{v as mapOneClickVerificationSuccessOverTimeChartData};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{EmptyChartSection as f}from"../EmptyChartSection.mjs";import{LoadingChartSection as h}from"../LoadingChartSection.mjs";import{SeriesPercentageChart as p}from"../SeriesPercentageChart/index.mjs";import{useStyle as g}from"../styles.mjs";import{jsx as e}from"react/jsx-runtime";function u({data:t,isLoading:r,isFetching:o,isSuccess:n,filter:s,sx:c}){var a,i;const l=g(),m={verificationTotal:{key:"verificationTotal",name:"Total",isTotal:!0},verificationPercentage:{key:"verificationPercentage",name:"Percentage"}};return!t.length&&r?e(h,{}):!t.length||!((i=(a=t[0])==null?void 0:a.chartData)!=null&&i.length)||!n?e(f,{}):e(p,{data:t,keyValues:Object.values(m),filter:s,sx:{...l.smallChartWrapper,opacity:o?.4:1,...c}})}export{u as OneClickVerificationSuccessOverTimeChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useState as m,useRef as O,useEffect as T}from"react";import{useTheme as V,Box as E}from"@mui/material";import{ResponsiveContainer as F,PieChart as N,Pie as G,Cell as H,Legend as J}from"recharts";import{chartDefaultProps as Q}from"../shared.mjs";import{SimpleLegend as U}from"../SimpleLegend/index.mjs";import{renderActiveShape as W}from"./renderActiveShape.mjs";import{renderNeedle as X}from"./renderNeedle.mjs";import{jsx as i,jsxs as Y}from"react/jsx-runtime";const _=(s,o)=>({Allow:o.palette.success.main,Flag:o.palette.warning.main,Block:o.palette.error.main})[s]??o.palette.primary.main;function $({data:s,sx:o,legendLabel:A,legendToggle:B=!1,valueText:f="",valuePercentage:I=!0,pie:h,needleVisible:R=!1,needleValue:x,needleColor:L="#aaa",allActive:c=!1}){const{innerRadius:w=60,outerRadius:C=100}=h??{},D=V(),[j,S]=m(void 0),[v,k]=m(new Set),d=O(null),[b,y]=m(null),[P,p]=m(null),q=(e,n)=>{c||S(n)},z=()=>{c||S(void 0)},K=e=>{B&&e&&k(n=>{const t=new Set(n);return t.has(e.name)?t.delete(e.name):t.size<s.length-1&&t.add(e.name),t})},u=s.map((e,n)=>({...e,index:n,value:v.has(e.name)?0:e.value}));return T(()=>{const e=d.current;if(!e)return;const n=new ResizeObserver(g=>{var r;const a=(r=g[0])==null?void 0:r.contentRect;a&&y(a)});n.observe(e);const t=e.getBoundingClientRect();return y(t),()=>{n.disconnect()}},[]),T(()=>{var e;const n=(e=d.current)==null?void 0:e.querySelector(".recharts-legend-wrapper");if(!n){const r=setInterval(()=>{var a;const l=(a=d.current)==null?void 0:a.querySelector(".recharts-legend-wrapper");if(l){const M=l.getBoundingClientRect();p(M),clearInterval(r)}},100);return()=>{clearInterval(r)}}const t=new ResizeObserver(r=>{var a;const l=(a=r[0])==null?void 0:a.contentRect;l&&p(l)});t.observe(n);const g=n.getBoundingClientRect();return p(g),()=>{t.disconnect()}},[]),i(E,{ref:d,sx:{width:"100%",height:"100%","& g":{outline:"none"},...o},children:i(F,{children:Y(N,{...Q,children:[i(G,{data:u,nameKey:"name",dataKey:"value",innerRadius:w,outerRadius:C,activeIndex:c?u.filter(e=>e.value>0).map(e=>e.index):j,activeShape:e=>W({...e,valueText:f,valuePercentage:I,needleVisible:R,allActive:c}),paddingAngle:0,onMouseEnter:q,onMouseLeave:z,...h,children:u.map(e=>i(H,{fill:e.color??_(e.name,D),opacity:v.has(e.name)?.5:1,stroke:"none"},e.name))}),i(J,{content:i(U,{legendLabel:A,hiddenItems:v,onToggle:K})}),R&&x!==void 0&&b&&P&&X({data:u,value:x,color:L,innerRadius:w,outerRadius:C,boxDimensions:b,legendDimensions:P,valueText:f})]})})})}export{$ as PieChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Sector as y}from"recharts";import{jsxs as $,jsx as i}from"react/jsx-runtime";const j=p=>{const s=Math.PI/180,{cx:n,cy:l,midAngle:d,innerRadius:v,outerRadius:e,startAngle:x,endAngle:u,fill:r,payload:R,percent:S,value:M,valueText:m,valuePercentage:z,needleVisible:F,customText:L,allActive:D}=p,f=Math.sin(-s*d),t=Math.cos(-s*d),P=n+(e+5)*t,T=l+(e+5)*f,g=n+(e+15)*t,h=l+(e+15)*f,a=g+(t>=0?1:-1)*22,o=h,A=t>=0?"start":"end",c=M.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0});return $("g",{children:[F||D?null:i("text",{x:n,y:l,dy:8,textAnchor:"middle",fill:"#333",fontSize:14,children:R.name}),i(y,{cx:n,cy:l,innerRadius:v,outerRadius:e,startAngle:x,endAngle:u,fill:r}),i(y,{cx:n,cy:l,startAngle:x,endAngle:u,innerRadius:e+2,outerRadius:e+6,fill:r}),i("path",{d:`M${P},${T}L${g},${h}L${a},${o}`,stroke:r,fill:"none"}),i("circle",{cx:a,cy:o,r:2,fill:r,stroke:"none"}),i("text",{x:a+(t>=0?1:-1)*12,y:o,textAnchor:A,fill:"#333",fontSize:12,children:L||(m?`${m} ${c}`:c)}),z&&$("text",{x:a+(t>=0?1:-1)*12,y:o,dy:16,textAnchor:A,fill:"#999",fontSize:11,children:[`${(S*100).toFixed(2)}%`," (",c,")"]})]})};export{j as renderActiveShape};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{jsxs as A,Fragment as R,jsx as a}from"react/jsx-runtime";const S=$=>{const{value:s,data:g,color:l,innerRadius:v,outerRadius:f,boxDimensions:i,legendDimensions:p,valueText:M}=$,c=Math.PI/180;let d=0;g.forEach(k=>{d+=k.value});const y=i?i.width/2:150,D=(i?i.height/2:200)-p.height/2,h=180*(1-Math.max(0,Math.min(1,s/d))),m=(Number(v)+2*Number(f))/3,o=Math.sin(-c*h),r=Math.cos(-c*h),e=5,t=y-e,n=D,u=t+e*o,x=n-e*r,L=t-e*o,E=n+e*r,F=t+m*r,N=n+m*o,b=s.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}),j=M??b;return A(R,{children:[a("circle",{cx:t,cy:n,r:e,fill:l,stroke:"none",style:{pointerEvents:"none"}},"needle-circle"),a("path",{d:`M${u} ${x}L${L} ${E} L${F} ${N} L${u} ${x}`,stroke:"none",fill:l,style:{pointerEvents:"none"}},"needle-path"),a("text",{x:t+e,y:n+26,textAnchor:"middle",fill:"#333",fontSize:12,children:j},"needle-value")]})};export{S as renderNeedle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useTheme as d}from"@mui/material";import{SimpleBarChart as k}from"../SimpleBarChart/index.mjs";import{EmptyChartSection as f}from"../EmptyChartSection.mjs";import{LoadingChartSection as g}from"../LoadingChartSection.mjs";import{NoRiskSignalsPermissionSection as x}from"../NoRiskSignalsPermissionSection/index.mjs";import{useStyle as S}from"../styles.mjs";import{jsx as e}from"react/jsx-runtime";function C({data:a,threshold:o=100,isLoading:i=!1,isFetching:r=!1,isSuccess:m=!0,hasPermissionToDisplay:n=!0,sx:p}){const c=d(),l=S(),s=Object.entries(a??{}).map(([t,y])=>({key:t,[t]:y})),h=s.map(({key:t})=>({key:t,dataKey:t,color:c.palette.warning.light}));return n?(!a||Object.keys(a).length===0)&&i?e(g,{}):!a||Object.keys(a).length===0||!m?e(f,{}):e(k,{sx:{...l.smallChartWrapper,opacity:r?.4:1,...p},data:s,series:h,xAxis:{tickLine:!1,dataKey:"key"},yAxis:{tickLine:!1,domain:[0,`dataMax + ${o>0?o+5:0}`]},tooltip:{labelFormatter:t=>"Total"}}):e(x,{})}export{C as ReasonCodesChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useTheme as y}from"@mui/material";import{RISK_SCORE_RANGES as r}from"../constants.mjs";import{SimpleBarChart as g}from"../SimpleBarChart/index.mjs";import{EmptyChartSection as d}from"../EmptyChartSection.mjs";import{LoadingChartSection as u}from"../LoadingChartSection.mjs";import{NoRiskSignalsPermissionSection as M}from"../NoRiskSignalsPermissionSection/index.mjs";import{useStyle as k}from"../styles.mjs";import{jsx as i}from"react/jsx-runtime";function C({data:t,isLoading:m,isFetching:f,isSuccess:p,hasPermissionToDisplay:c=!0,sx:h}){const s=y(),A=k(),x=(l=>{const e={};return l.forEach(a=>{Object.entries(a).forEach(([o,S])=>{const n=parseInt(o);n<=1e3&&(e[n]=(e[n]||0)+S)})}),Array.from({length:1001},(a,o)=>({key:o.toString(),value:e[o]||0}))})(t),L=[{key:"Risk Score",dataKey:"value",color:s.palette.error.main}];return c?(!t||Object.keys(t).length===0)&&m?i(u,{}):!t||Object.keys(t).length===0||!p?i(d,{}):i(g,{data:x,series:L,sx:{...A.smallChartWrapper,opacity:f?.4:1,...h},yAxis:{label:{value:"Count",angle:-90,position:"insideLeft"},domain:[0,"dataMax + 10"]},xAxis:{domain:[0,"dataMax"],interval:"preserveStartEnd"},tooltip:{labelFormatter:()=>"Risk Score",formatter:(l,e,a)=>[l,a.payload.key]},referenceAreas:[{x1:r.ALLOW.MIN,x2:r.ALLOW.MAX,fill:"#ffffff00",isFront:!1,label:r.ALLOW.NAME},{x1:r.FLAG.MIN,x2:r.FLAG.MAX,fill:s.palette.warning.light,isFront:!1,label:r.FLAG.NAME},{x1:r.BLOCK.MIN,fill:s.palette.error.light,isFront:!1,label:r.BLOCK.NAME}]}):i(M,{})}export{C as RiskScoreBarChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useTheme as u}from"@mui/material";import{RISK_SCORE_RANGES as a}from"../constants.mjs";import{PieChart as f}from"../PieChart/index.mjs";import{EmptyChartSection as A}from"../EmptyChartSection.mjs";import{LoadingChartSection as g}from"../LoadingChartSection.mjs";import{NoRiskSignalsPermissionSection as h}from"../NoRiskSignalsPermissionSection/index.mjs";import{useStyle as S}from"../styles.mjs";import{jsx as r}from"react/jsx-runtime";function E({data:e,score:o=200,legendLabel:i,isLoading:s,isFetching:m,isSuccess:n,hasPermissionToDisplay:l=!0,sx:c}){const t=u(),L=S();if(!l)return r(h,{});if((!e||e.length<=0)&&s)return r(g,{});if(!e||e.length<=0||!n)return r(A,{});const p=[{name:a.ALLOW.NAME,customText:a.ALLOW.LABEL,value:e[0].value,color:t.palette.primary.main},{name:a.FLAG.NAME,customText:a.FLAG.LABEL,value:e[1].value,color:t.palette.warning.main},{name:a.BLOCK.NAME,customText:a.BLOCK.LABEL,value:e[2].value,color:t.palette.error.main}];return r(f,{data:p,legendToggle:!0,needleValue:o,legendLabel:i,allActive:!0,sx:{...L.smallChartWrapper,opacity:m?.4:1,...c}})}export{E as RiskScorePieChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import g from"lodash";import{stringToHashedColor as m}from"../../../utils/uuidColor.mjs";function k(s){const{brands:y,colorMap:l,data:c,keyValue:p}=s,e=new Map;y.forEach(({_raw:a})=>{(c?.filter(r=>r.brandUuid===a.brandUuid)??[]).forEach(r=>{const t=r.keyword??r.brandUuid;if(!t)return;const i=(r.interval??[]).map(d=>({date:+new Date(d.date),value:Number(d[p]||0)})).filter(d=>s.filterOutZeroValues?d.value>0:!0);if(e.has(t)){const d=e.get(t);if(!d)return;const u=[...d.chartData,...i],b=new Map;u.forEach(({date:n,value:o})=>{b.set(n,(b.get(n)??0)+o)});const U=Array.from(b.entries()).map(([n,o])=>({date:n,value:o})).sort((n,o)=>n.date-o.date);e.set(t,{keyword:r.keyword,brandUuid:a.brandUuid,brandName:a.brandName,brandColor:l.get(a.brandUuid),brandIntegrationType:a.integrationType,chartData:U})}else e.set(t,{keyword:r.keyword,brandUuid:a.brandUuid,brandName:a.brandName,brandColor:l.get(a.brandUuid),brandIntegrationType:a.integrationType,chartData:i})})});const f=a=>a==="hosted"||a==="sdk"?"SDK":a==="non-hosted"||a==="api"?"API":a,h=({keyword:a,brandColor:r,brandUuid:t})=>a?m(a):r??m(t),w=Array.from(e.values()).map(({keyword:a,brandUuid:r,brandName:t,brandColor:i,brandIntegrationType:d,chartData:u})=>({uuid:a??r,name:a??t,description:a?"":f(d),color:h({keyword:a,brandColor:i,brandUuid:r}),chartData:u}));return g.chain(w).sortBy(a=>a.name).toArray().value()}export{k as mapSeriesTimeSeriesData};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{createElement as i}from"react";import{useTheme as n,Box as s}from"@mui/material";import{ResponsiveContainer as m,LineChart as d,CartesianGrid as l,XAxis as c,YAxis as u,Label as h,Tooltip as p,Legend as f,Line as x}from"recharts";import{formatDateMMYY as g,formatExtendedDate as L}from"../../../utils/date.mjs";import{SeriesChartLegend as k}from"../SeriesChartLegend/index.mjs";import{DEFAULT_TIMEZONE as b}from"../../form/TimezoneInput/timezones.mjs";import{jsx as e,jsxs as y}from"react/jsx-runtime";function v(a){const o=n(),{timezone:r=b}=a.filter;return e(s,{sx:{width:"100%",height:"100%",...a.sx},children:e(m,{children:y(d,{width:500,height:300,margin:{top:5,right:60,left:20,bottom:5},children:[e(l,{vertical:!1}),e(c,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:t=>g(t,{timeZone:r,hour12:!1,hour:"numeric"}),allowDuplicatedCategory:!1,tickLine:!1,fontSize:12,tickMargin:12}),e(u,{textAnchor:"end",dataKey:"value",tickLine:!1,tickFormatter:t=>Number(t).toLocaleString(),allowDecimals:!1,domain:[1,"dataMax"],children:a.label&&e(h,{value:a.label,angle:-90,position:"insideLeft",style:{textAnchor:"middle"}})}),e(p,{cursor:{stroke:o.palette.neutral.main,strokeWidth:1},formatter:t=>Number(t).toLocaleString(),labelFormatter:t=>L(t,{timeZone:r,hour12:!1}),itemSorter:t=>-Number(t?.value??0)}),e(f,{content:e(k,{showUuid:a.showUuid})}),a.data.map(t=>i(x,{uuid:t.uuid,description:t.description,key:t.uuid,name:t.name,dataKey:"value",data:t.chartData,type:"monotone",stroke:t.color,strokeWidth:2,isAnimationActive:!1}))]})})})}export{v as SeriesChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useCallback as m,useMemo as w}from"react";import{Box as M,Stack as y,Typography as s}from"@mui/material";import g from"@mui/material/Unstable_Grid2";import{Decimal as h}from"decimal.js";import{AnimatePresence as F}from"framer-motion";import{useCopyToClipboard as P}from"../../../hooks/useCopyToClipboard.mjs";import{usePrevious as C}from"../../../hooks/usePrevious.mjs";import{Counter as k}from"../../animation/Counter.mjs";import{MotionStack as T}from"../../animation/motions.mjs";import{useSnackbar as B}from"../../Snackbar/index.mjs";import{jsx as i,jsxs as c}from"react/jsx-runtime";function I({entry:o,payload:r,showUuid:a=!0}){const e=m(n=>{var d,t,p;return(p=(t=(d=n.payload)==null?void 0:d.data)==null?void 0:t.reduce)==null?void 0:p.call(t,(l,u)=>l+u.value,0)},[]),f=m(n=>{const d=new h(e(n)||0),t=r?.reduce((u,j)=>u+e(j),0)||0,p=new h(t),l=Number(d.div(p).times(100).toFixed(2,h.ROUND_DOWN));return isNaN(l)||!isFinite(l)?0:l},[e,r]),x=w(()=>e(o),[o,e]),N=C(x),v=w(()=>Number(f(o)),[o,f]),U=C(v),b=m(n=>Math.floor(n).toLocaleString(),[]),D=P({type:"text/plain"}),S=B();return c(T,{component:"li",direction:"row",spacing:1,sx:{color:o.color},layout:"position",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[i(M,{sx:{width:"3px",height:"100%",backgroundColor:o.color,borderRadius:3}}),c(y,{children:[c(s,{component:"p",variant:"caption",children:[i(y,{component:"span",display:"inline-flex",mr:.5,children:i(k,{from:N??0,to:x,map:b,children:"0"})}),c(y,{component:"span",direction:"row",display:"inline-flex",children:["(",i(k,{from:U??0,to:v,map:b,children:"0"}),"%)"]})]}),i(s,{variant:"body1",children:o.value}),o.payload.description&&i(s,{variant:"body2",children:o.payload.description}),a&&o.payload.uuid&&c(s,{variant:"body2",sx:{cursor:"pointer","&:hover":{textDecoration:"underline"}},onClick:()=>{D.copy(o.payload.uuid).catch(()=>{}),S.enqueueSnackbar("UUID copied to clipboard","success")},children:[o.payload.uuid.slice(0,5),"..."]})]})]})}function L(o){const{payload:r}=o;return i(g,{container:!0,direction:"row",component:"ul",gap:2,sx:{mt:2,justifyContent:"flex-start",alignItem:"center",flexWrap:"wrap"},children:i(F,{children:r?.map(a=>i(g,{children:i(I,{entry:a,payload:r,showUuid:o.showUuid})},`item-${a.payload.uuid}-${a.value}`))})})}export{L as SeriesChartLegend};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useTheme as g,Box as k}from"@mui/material";import f from"decimal.js";import{useMemo as x}from"react";import{ResponsiveContainer as $,LineChart as v,CartesianGrid as T,XAxis as D,YAxis as E,Tooltip as w,Legend as M,Line as _}from"recharts";import{formatDateMMYY as b,formatExtendedDate as A}from"../../../utils/date.mjs";import{SeriesPercentageChartLegend as F}from"../SeriesPercentageChartLegend/index.mjs";import{DEFAULT_TIMEZONE as K}from"../../form/TimezoneInput/timezones.mjs";import{jsx as n,jsxs as L}from"react/jsx-runtime";const C=(r,c)=>{const s=new Map;return r.forEach(d=>{d.chartData.forEach(e=>{const o=new Date(e.date).getTime().toString();if(!s.has(o)){const l={date:o};s.set(o,l)}const m=s.get(o);c.forEach(({key:l})=>{var p;const h=`${d.uuid}_${l}`,i=e[l],y=(p=c.find(t=>t.isTotal))==null?void 0:p.key,a=typeof i=="string"?i.trim()===""?0:parseInt(i,10):typeof i=="number"?i:0;if(m[`${h}_absolute`]=a,l!==y){const t=e[y??""];let u;t===0?u=100:u=t>0?parseFloat(new f(a.toString()).div(t).mul(100).toFixed(2,f.ROUND_DOWN)):0,m[h]=u}else m[h]=100})})}),Array.from(s.values()).sort((d,e)=>parseInt(d.date)-parseInt(e.date))};function S(r){const{timezone:c=K}=r.filter,s=g(),d=x(()=>r.data?C(r.data,r.keyValues):[],[r.data,r.keyValues]);return n(k,{sx:{width:"100%",height:"100%",...r.sx},children:n($,{width:"100%",height:"100%",children:L(v,{data:d,width:500,height:300,margin:{top:5,right:60,left:20,bottom:5},children:[n(T,{strokeDasharray:"3 3"}),n(D,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:e=>b(e,{timeZone:c,hour12:!1,hour:"numeric"}),allowDuplicatedCategory:!1,tickLine:!1,fontSize:12,tickMargin:12}),n(E,{textAnchor:"end",tickLine:!1,tickFormatter:e=>`${e.toFixed(0)}%`}),n(w,{cursor:{stroke:s.palette.neutral.main,strokeWidth:1},labelFormatter:e=>A(e,{timeZone:c,hour12:!1}),itemSorter:e=>-Number(e?.value??0),formatter:(e,o)=>{const m=typeof e=="number"?e.toFixed(1):e;return[`${o}: ${m}%`]}}),n(M,{content:e=>{var o;const{height:m,width:l,...p}=e,h=d[d.length-1];Object.entries(h).forEach(([a,t])=>{});const i=new Map;r.data.forEach(a=>{r.keyValues.filter(t=>!t.isTotal).forEach(t=>{const u=`${a.uuid}_${t.key}`;i.set(u,a.uuid),i.set(`${u}_integrationType`,a.integrationType??"")})});const y=a=>{const t=i.get(`${a.dataKey}_integrationType`);return t==="hosted"||t==="sdk"?"SDK":t==="non-hosted"||t==="api"?"API":t};return n(F,{...p,payload:(o=e.payload)==null?void 0:o.map(a=>({uuid:i.get(a.dataKey)??"",value:a.value,color:a.color??s.palette.primary.main,integrationType:y(a),dataKey:a.dataKey}))})}}),r.data.map(e=>r.keyValues.filter(o=>!o.isTotal).map(o=>n(_,{type:"monotone",dataKey:`${e.uuid}_${o.key}`,name:e.name??e.uuid,stroke:e.color??s.palette.primary.main,strokeWidth:2,dot:!1,isAnimationActive:!1},`${e.uuid}_${o.key}`)))]})})})}export{S as SeriesPercentageChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Box as s,Stack as p,Typography as t}from"@mui/material";import a from"@mui/material/Unstable_Grid2";import{AnimatePresence as d}from"framer-motion";import{useCopyToClipboard as u}from"../../../hooks/useCopyToClipboard.mjs";import{MotionStack as l}from"../../animation/motions.mjs";import{useSnackbar as m}from"../../Snackbar/index.mjs";import{jsx as r,jsxs as n}from"react/jsx-runtime";function h({entry:i,showUuid:o=!0}){const e=u({type:"text/plain"}),c=m();return n(l,{component:"li",direction:"row",spacing:1,sx:{color:i.color},layout:"position",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[r(s,{sx:{width:"3px",height:"100%",backgroundColor:i.color,borderRadius:3}}),n(p,{children:[r(t,{variant:"body1",children:i.value}),i.integrationType&&r(t,{variant:"body2",children:i.integrationType}),o&&i.uuid&&n(t,{variant:"body2",sx:{cursor:"pointer","&:hover":{textDecoration:"underline"}},onClick:()=>{i.uuid&&(e.copy(i.uuid).catch(()=>{}),c.enqueueSnackbar("UUID copied to clipboard","success"))},children:[i.uuid.slice(0,5),"..."]})]})]})}function y(i){const{payload:o}=i;return r(a,{container:!0,direction:"row",component:"ul",gap:2,sx:{mt:2,justifyContent:"flex-start",alignItem:"center",flexWrap:"wrap"},children:r(d,{children:o?.map(e=>r(a,{children:r(h,{entry:e,showUuid:i.showUuid})},`item-${e.uuid}-${e.value}`))})})}export{y as SeriesPercentageChartLegend};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Stack as r}from"@mui/material";import{BigNumber as t}from"../BigNumber/index.mjs";import{formatNumberRounded as s,formatCurrency as u,formatPercentage as c}from"../../../utils/number/formatters.mjs";import{defaultMetrics as n,calculateSignupMetrics as m}from"./SignupBigNumbersMapper.mjs";import{jsxs as p,jsx as i}from"react/jsx-runtime";function g({chartData:e,isLoading:l=!0,hideTotalCost:o=!1}){const a=l?n:m(e);return p(r,{direction:"row",spacing:3,children:[i(t,{label:"Total 1-Click Signups",value:a.totalSignups,initialValue:a.totalSignups,map:s}),i(t,{label:"Finished 1-Click Signups",value:a.totalSuccess,initialValue:a.totalSuccess,map:s}),!o&&i(t,{label:"Total Cost",value:a.totalCost,initialValue:a.totalCost,map:u}),i(t,{label:"Success Rate",value:a.successRate,initialValue:a.successRate,map:c})]})}export{g as SignupBigNumbers};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a={totalSignups:0,totalSuccess:0,totalCost:0,successRate:0};function n(e){if(!(e!=null&&e.length))return a;const s=e.reduce((l,t)=>l+(t.overall.oneClickCreated||0),0),c=e.reduce((l,t)=>l+(t.overall.oneClickSuccess||0),0),r=e.reduce((l,t)=>{const u=t.overall.totalCost?Number(t.overall.totalCost.replace("$","").replace(/,/g,"")):0;return l+u},0),o=c/s;return{totalSignups:s,totalSuccess:c,totalCost:r,successRate:isNaN(o)?0:o}}export{n as calculateSignupMetrics,a as defaultMetrics};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useTheme as A,Box as v}from"@mui/material";import{ResponsiveContainer as k,ComposedChart as y,CartesianGrid as b,XAxis as C,YAxis as D,Tooltip as B,ReferenceLine as l,ReferenceArea as n,Bar as P}from"recharts";import{chartDefaultProps as R,xAxisDefaultProps as j,yAxisDefaultProps as F}from"../shared.mjs";import{jsx as a,jsxs as K}from"react/jsx-runtime";function T({data:m,series:p,xAxis:f,yAxis:d,tooltip:c,bar:x,referenceLines:s,referenceAreas:i,sx:h}){const u=A(),o=e=>!e.isFront,t=e=>!!e.isFront;return a(v,{sx:{width:"100%",height:"100%",...h},children:a(k,{children:K(y,{data:m,...R,children:[a(b,{strokeDasharray:"3 3",vertical:!1}),a(C,{...j,...f}),a(D,{...F,...d}),a(B,{cursor:{stroke:u.palette.neutral.main,strokeWidth:1},...c}),s?.filter(o).map((e,r)=>a(l,{...e},e.label??r)),i?.filter(o).map((e,r)=>a(n,{...e},e.label??r)),p.map(e=>a(P,{name:e.key,dataKey:e.dataKey,fill:e.color,stackId:"stack",isAnimationActive:!1,...x},e.key)),s?.filter(t).map((e,r)=>a(l,{...e},e.label??r)),i?.filter(t).map((e,r)=>a(n,{...e},e.label??r))]})})})}export{T as SimpleBarChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Box as d}from"@mui/material";import{jsx as l,jsxs as p}from"react/jsx-runtime";function i({payload:r=[],hiddenItems:a,onToggle:o,legendLabel:n}){return l(d,{sx:{display:"flex",justifyContent:"center",gap:"20px",paddingTop:"20px"},children:r.map((e,t)=>{const s=a.has(e.payload.name);return p("div",{style:{display:"flex",alignItems:"center",cursor:"pointer",opacity:s?.4:1},onClick:()=>{o?.(e.payload)},children:[l("div",{style:{width:"12px",height:"12px",backgroundColor:e.color,marginRight:"8px",borderRadius:"2px"}}),l("span",{style:{color:e.color},children:n?`${n}: ${e.value}`:e.value})]},`legend-${t}`)})})}export{i as SimpleLegend};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Stack as r}from"@mui/material";import{BigNumber as t}from"../BigNumber/index.mjs";import{formatNumberRounded as s,formatCurrency as c,formatPercentage as u}from"../../../utils/number/formatters.mjs";import{defaultMetrics as m,calculateSignupMetrics as n}from"./TTSBigNumbersMapper.mjs";import{jsxs as f,jsx as e}from"react/jsx-runtime";function p({chartData:l,isLoading:i=!0,hideTotalCost:o=!1}){const a=i?m:n(l);return f(r,{direction:"row",spacing:3,children:[e(t,{label:"Total Sent",value:a.total,initialValue:a.total,map:s}),e(t,{label:"Total Verified",value:a.success,initialValue:a.success,map:s}),!o&&e(t,{label:"Total Cost",value:a.totalCost,initialValue:a.totalCost,map:c}),e(t,{label:"Success Rate",value:a.successRate,initialValue:a.successRate,map:u})]})}export{p as TTSBigNumbers};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u={total:0,success:0,totalCost:0,successRate:0};function d(e){if(!(e!=null&&e.length))return u;let t=0,s=0;const o=0;e.forEach(a=>{var r;if((r=a.interval)!=null&&r.length){const i=a.interval.reduce((c,l)=>c+(l.ttsSent||0),0),f=a.interval.reduce((c,l)=>c+(l.ttsVerified||0),0);t+=i,s+=f}});const n=t>0?s/t:0;return{total:t,success:s,totalCost:o,successRate:isNaN(n)?0:n}}export{d as calculateSignupMetrics,u as defaultMetrics};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{mapSeriesTimeSeriesData as a}from"../SeriesChart/SeriesChart.map.mjs";function r(e){return a(e)}export{r as mapTTSTimeSeriesData};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{EmptyChartSection as c}from"../EmptyChartSection.mjs";import{LoadingChartSection as h}from"../LoadingChartSection.mjs";import{SeriesChart as m}from"../SeriesChart/index.mjs";import{jsx as e}from"react/jsx-runtime";const p={chartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500}};function l({label:r,data:t,isLoading:a,isFetching:i,isSuccess:s,filter:o,sx:n}){return!t.length&&a?e(h,{}):!t.length||!s?e(c,{}):e(m,{label:r??"TTS Over Time",data:t,filter:o,showUuid:!1,sx:{...p.chartWrapper,opacity:i?.4:1,...n}})}export{l as TTSOverTimeChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e={ALLOW:{MIN:0,MAX:400,NAME:"Allow",LABEL:"0-400"},FLAG:{MIN:401,MAX:600,NAME:"Flag",LABEL:"401-600"},BLOCK:{MIN:601,NAME:"Block",LABEL:"601-1000"}},i={ERR001:"Generic error code",OCE001:"1-Click error code",OCE002:"Unsupported phone number",OCE003:"Either phone or email is required",OCE004:"User not found",OCE005:"Credential requests are missing",OCE006:"User identifier is missing",OCE007:"Missing mandatory credentials",OCE008:"Invalid/expired verification code",OCE009:"Verification code required",OCE010:"Missing fields to autofill",OCE011:"Additional information required",OCE012:"BirthDate or SSN4 mismatch",OCE013:"No credentials found",OCE014:"1-Click request expired",OCE015:"1-Click not found",OCE016:"Conflict request for phone number",OCE017:"Risk score too high",OCE018:"Maximum code attempts exceeded",OCE019:"Maximum input attempts exceeded",OCE020:"Brand cannot be used for 1-Click API",OCE021:"User Opted Out"};export{i as ERROR_CODES_MESSAGES,e as RISK_SCORE_RANGES};
|
|
@@ -25,3 +25,7 @@ export * from './OneClickHealthPercentageChart';
|
|
|
25
25
|
export * from './OneClickVerificationBigNumbers';
|
|
26
26
|
export * from './OneClickVerificationEventsOverTimeChart';
|
|
27
27
|
export * from './OneClickVerificationSuccessOverTimeChart';
|
|
28
|
+
export * from './FunnelChart';
|
|
29
|
+
export * from './OneClickVerificationFunnelChart';
|
|
30
|
+
export * from './OneClickVerificationOutcomeOverTimeChart';
|
|
31
|
+
export * from './oneClickVerification.types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{
|
|
1
|
+
"use strict";import{SeriesChart as e}from"./SeriesChart/index.mjs";import{SeriesChartLegend as a}from"./SeriesChartLegend/index.mjs";import{SeriesPercentageChart as r}from"./SeriesPercentageChart/index.mjs";import{BigNumber as i}from"./BigNumber/index.mjs";import{SimpleBarChart as t}from"./SimpleBarChart/index.mjs";import{AreaChart as m}from"./AreaChart/index.mjs";import{ErrorCodesChart as s}from"./ErrorCodesChart/index.mjs";import{ReasonCodesChart as o}from"./ReasonCodesChart/index.mjs";import{PieChart as n}from"./PieChart/index.mjs";import{RiskScorePieChart as c}from"./RiskScorePieChart/index.mjs";import{RiskScoreBarChart as C}from"./RiskScoreBarChart/index.mjs";import{SimpleLegend as p}from"./SimpleLegend/index.mjs";import{LoadingChartSection as l}from"./LoadingChartSection.mjs";import{EmptyChartSection as h}from"./EmptyChartSection.mjs";import{MetricLastUpdated as f}from"./MetricLastUpdated.mjs";import{FunnelChart as O}from"./FunnelChart/index.mjs";import{mapSeriesTimeSeriesData as S}from"./SeriesChart/SeriesChart.map.mjs";import{OneClickPercentageChart as T}from"./OneClickPercentageChart/OneClickPercentageChart.mjs";import{OneClickOverTimeChart as k}from"./OneClickOverTimeChart/OneClickOverTimeChart.mjs";import{mapOneClickTimeSeriesData as u}from"./OneClickOverTimeChart/OneClickOverTimeChart.map.mjs";import{mapMonthlySignupsOverviewTableData as g}from"./MonthlySignupsOverviewTable/MonthlySignupsOverviewTableDataMapper.mjs";import{MonthlySignupsOverviewTable as v}from"./MonthlySignupsOverviewTable/MonthlySignupsOverviewTable.mjs";import{SignupBigNumbers as D}from"./SignupBigNumbers/SignupBigNumbers.mjs";import{TTSOverTimeChart as V}from"./TTSOverTimeChart/TTSOverTimeChart.mjs";import{mapTTSTimeSeriesData as d}from"./TTSOverTimeChart/TTSOverTimeChart.map.mjs";import{TTSBigNumbers as b}from"./TTSBigNumbers/TTSBigNumbers.mjs";import{OneClickHealthOverTimeChart as B}from"./OneClickHealthOverTimeChart/OneClickHealthOverTimeChart.mjs";import{mapOneClickHealthTimeSeriesData as H}from"./OneClickHealthOverTimeChart/OneClickHealthOverTimeChart.map.mjs";import{OneClickHealthBigNumbers as N}from"./OneClickHealthBigNumbers/OneClickHealthBigNumbers.mjs";import{calculateOneClickHealthMetrics as M,defaultMetrics as P}from"./OneClickHealthBigNumbers/OneClickHealthBigNumbersMapper.mjs";import{OneClickHealthPercentageChart as L}from"./OneClickHealthPercentageChart/OneClickHealthPercentageChart.mjs";import{OneClickVerificationBigNumbers as E}from"./OneClickVerificationBigNumbers/OneClickVerificationBigNumbers.mjs";import{OneClickVerificationEventsOverTimeChart as R}from"./OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.mjs";import{mapOneClickVerificationAreaSeriesData as y}from"./OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.map.mjs";import{OneClickVerificationSuccessOverTimeChart as F}from"./OneClickVerificationSuccessOverTimeChart/OneClickVerificationSuccessOverTimeChart.mjs";import{mapOneClickVerificationSuccessOverTimeChartData as A}from"./OneClickVerificationSuccessOverTimeChart/OneClickVerificationSuccessOverTimeChart.map.mjs";import{OneClickVerificationFunnelChart as w}from"./OneClickVerificationFunnelChart/OneClickVerificationFunnelChart.mjs";import{mapOneClickVerificationFunnelChartData as x}from"./OneClickVerificationFunnelChart/OneClickVerificationFunnelChart.map.mjs";import{OneClickVerificationOutcomeOverTimeChart as U}from"./OneClickVerificationOutcomeOverTimeChart/OneClickVerificationOutcomeOverTimeChart.mjs";import{mapOneClickVerificationOutcomeOverTimeChartData as j}from"./OneClickVerificationOutcomeOverTimeChart/OneClickVerificationOutcomeOverTimeChart.map.mjs";export{m as AreaChart,i as BigNumber,h as EmptyChartSection,s as ErrorCodesChart,O as FunnelChart,l as LoadingChartSection,f as MetricLastUpdated,v as MonthlySignupsOverviewTable,N as OneClickHealthBigNumbers,B as OneClickHealthOverTimeChart,L as OneClickHealthPercentageChart,k as OneClickOverTimeChart,T as OneClickPercentageChart,E as OneClickVerificationBigNumbers,R as OneClickVerificationEventsOverTimeChart,w as OneClickVerificationFunnelChart,U as OneClickVerificationOutcomeOverTimeChart,F as OneClickVerificationSuccessOverTimeChart,n as PieChart,o as ReasonCodesChart,C as RiskScoreBarChart,c as RiskScorePieChart,e as SeriesChart,a as SeriesChartLegend,r as SeriesPercentageChart,D as SignupBigNumbers,t as SimpleBarChart,p as SimpleLegend,b as TTSBigNumbers,V as TTSOverTimeChart,M as calculateOneClickHealthMetrics,P as defaultMetrics,g as mapMonthlySignupsOverviewTableData,H as mapOneClickHealthTimeSeriesData,u as mapOneClickTimeSeriesData,y as mapOneClickVerificationAreaSeriesData,x as mapOneClickVerificationFunnelChartData,j as mapOneClickVerificationOutcomeOverTimeChartData,A as mapOneClickVerificationSuccessOverTimeChartData,S as mapSeriesTimeSeriesData,d as mapTTSTimeSeriesData};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Full interval entry as returned by the OneClickVerification API. */
|
|
2
|
+
export interface OneClickVerificationIntervalEntry {
|
|
3
|
+
date: string | number;
|
|
4
|
+
oneClickVerificationCreated: number;
|
|
5
|
+
oneClickVerificationSending: number;
|
|
6
|
+
oneClickVerificationDelivered: number;
|
|
7
|
+
oneClickVerificationVerified: number;
|
|
8
|
+
oneClickVerificationFailed: number;
|
|
9
|
+
oneClickVerificationUndelivered: number;
|
|
10
|
+
oneClickVerificationExpired: number;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
/** Single brand entry as returned by the OneClickVerification API. */
|
|
14
|
+
export interface OneClickVerificationBrandData {
|
|
15
|
+
brandUuid: string;
|
|
16
|
+
brandName: string;
|
|
17
|
+
interval?: OneClickVerificationIntervalEntry[];
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t={margin:{top:5,right:30,left:20,bottom:5}},e={tickLine:!1,fontSize:12,tickMargin:12},i={textAnchor:"end",tickLine:!1};export{t as chartDefaultProps,e as xAxisDefaultProps,i as yAxisDefaultProps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=()=>({regularChartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500},smallChartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:300}});export{t as useStyle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{forwardRef as i,memo as l,useState as n,useImperativeHandle as d}from"react";import{PersistentDialog as m}from"./PersistentDialog.mjs";import{jsx as o}from"react/jsx-runtime";const s=i(({calendlyUrl:r},t)=>{const[a,e]=n(!1);return d(t,()=>({show:()=>{e(!0)},hide:()=>{e(!1)},toggle:()=>{e(!a)},isOpen:a})),o(m,{isOpen:a,setIsOpen:e,children:o("iframe",{src:r,style:{height:"800px",width:"500px",maxWidth:"90vw",maxHeight:"85vh",border:"none",borderRadius:"5px"}})})});s.displayName="CalendlyDialog";const p=l(s);export{p as CalendlyDialog,s as CalendlyDialogComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Dialog as t}from"@mui/material";import{jsx as i}from"react/jsx-runtime";const r={"& .MuiDialog-container > .MuiPaper-root":{maxWidth:"fit-content",width:"auto",borderRadius:"6px!important"},"& .MuiTypography-root":{textAlign:"center"},"& .MuiTypography-h1":{fontSize:"34px",fontWeight:"800!important"},"& .MuiTypography-h2":{fontWeight:"800!important"}},a=o=>i(t,{sx:r,...o,children:o.children});export{a as CustomDialog};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";import d from"@mui/icons-material/Close";import{Portal as h,IconButton as p}from"@mui/material";import{useEffect as u,useRef as y}from"react";import{jsxs as s,jsx as o}from"react/jsx-runtime";const w=({isOpen:t,setIsOpen:n,children:l,hasCloseButton:a=!0})=>{u(()=>{const e=c=>{c.key==="Escape"&&n(!1)};document.addEventListener("keydown",e);const r=()=>{t&&(window.history.pushState(null,"",window.location.pathname),n(!1))};return t&&(window.history.pushState(null,"",window.location.pathname),window.addEventListener("popstate",r)),()=>{document.removeEventListener("keydown",e),window.removeEventListener("popstate",r)}},[t]);const i=y(null);return s(h,{children:[t&&o("style",{children:`
|
|
2
|
+
body{
|
|
3
|
+
overflow-y: hidden;
|
|
4
|
+
}
|
|
5
|
+
.dialog-content-persistent{
|
|
6
|
+
overflow-y: auto;
|
|
7
|
+
}
|
|
8
|
+
`}),o("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.5)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",opacity:t?1:0,pointerEvents:t?"auto":"none",transition:"opacity 0.3s ease",zIndex:1e3},onClick:e=>{i.current&&!i.current.contains(e.target)&&n(!1)},onKeyDown:e=>{console.log(e),e.key==="Escape"&&n(!1)},children:s("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:[a&&o(p,{"aria-label":"close",onClick:()=>n(!1),sx:{position:"absolute",right:16,top:16,color:"white",backgroundColor:"rgba(0, 0, 0, 0.2)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.4)"},zIndex:1},children:o(d,{})}),o("div",{className:"dialog-content-persistent",style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:o("div",{ref:i,children:l})})]})})]})};export{w as PersistentDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useState as c,useRef as f}from"react";import{wrapPromise as u}from"../../../utils/wrapPromise/index.mjs";import"libphonenumber-js";import"lodash/find";import"tinycolor2";import{useAddressInputContext as b}from"./context.mjs";function d(){const{googlePlacesAutocompletePlaces:n,googlePlacesGetPlace:i}=b(),[y,l]=c([]),[p,o]=c(!1),a=f(null);return{handleAutoComplete:async r=>{if(!n)return;a.current&&a.current.abort();const e=new AbortController;a.current=e,o(!0);try{if(!n){o(!1);return}const[t,s]=await u(n(r,e.signal));if(e.signal.aborted)return;if(!t||s){o(!1);return}Array.isArray(t)?l(t):l([])}catch(t){if(t instanceof DOMException&&t.name==="AbortError")return}finally{a.current===e&&o(!1)}},fetchPlace:async(r,e)=>{if(!i)return null;const[t,s]=await u(i(r,e));return s?null:t&&Array.isArray(t)?t:null},buildAddress:r=>{const e={line1:"",city:"",state:"",country:"",zipCode:""};for(const t of r??[])switch(t.types[0]){case"street_number":{e.line1=`${t.longText} ${e.line1}`;break}case"route":{e.line1||(e.line1=""),e.line1+=t.shortText;break}case"postal_code":{e.zipCode=`${t.longText}${e.zipCode}`;break}case"postal_code_suffix":{e.zipCode=`${e.zipCode}-${t.longText}`;break}case"locality":e.city=t.longText??"";break;case"sublocality_level_1":case"sublocality":e.city||(e.city=t.longText??"");break;case"neighborhood":e.city||(e.city=t.longText??"");break;case"administrative_area_level_1":{t.shortText&&t.shortText.length===2&&(e.state=t.shortText);break}case"country":e.country=t.shortText??"US";break}return e},suggestions:y,isPending:p}}export{d as useAutoFill};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{createContext as r,useContext as l}from"react";import{jsx as n}from"react/jsx-runtime";const a={googlePlacesAutocompletePlaces:void 0,googlePlacesGetPlace:void 0},o=r(a);function c({children:e,googlePlacesAutocompletePlaces:t,googlePlacesGetPlace:s}){return n(o.Provider,{value:{googlePlacesAutocompletePlaces:t,googlePlacesGetPlace:s},children:e})}function d(){const e=l(o);if(e===void 0)throw new Error("useAddressInputContext must be used within an AddressInputProvider");return e}export{o as AddressInputContext,c as AddressInputProvider,d as useAddressInputContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useState as l,useMemo as D,useEffect as d}from"react";import{wrapPromise as I}from"../../../utils/wrapPromise/index.mjs";import"libphonenumber-js";import"lodash/find";import"tinycolor2";import{toUSaddress as p,fromUSAddress as U}from"../../../utils/address/index.mjs";import{useDebounceValue as x}from"../../../hooks/useDebounceValue.mjs";import{usePrevious as E}from"../../../hooks/usePrevious.mjs";import{useAutoFill as M}from"./autofill.hook.mjs";function O({defaultValue:o,onChange:m}){const[c,u]=l(!1),{handleAutoComplete:f,fetchPlace:g,buildAddress:h,suggestions:v,isPending:C}=M(),P=D(()=>p({line1:o?.line1??"",city:o?.city??"",state:o?.state??"",zipCode:o?.zipCode??""}),[o]),[y,A]=l({title:P??"",value:""}),[r,s]=l(""),F=E(r),t=x(r),[S,V]=l(!1),a=(e,n)=>{let i;typeof e=="string"?i=U(e.replace(/\n/g,"")):(i=e,s(p({...e,country:void 0})??"")),m(i,n)},b=async e=>{if(A(e),!e.value)return;u(!0);const[n]=await I(g(e.value));if(!n)return;const i=h(n);a(i),u(!1)},w=e=>{s(e)},z=()=>{s(""),a("",{shouldValidate:!1})};return d(()=>{!t.length&&S&&a("",void 0),!(!t||t.length<=3||t===F)&&(a(t,void 0),f(t).catch(console.error))},[t]),d(()=>{V(!0)},[]),{value:y,inputValue:r,suggestions:v,isPending:C,isFetchingPlace:c,handleInputChange:w,handleOptionChange:b,handleClear:z}}export{O as useDataFieldAddressInput};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Box as d,Autocomplete as O,Typography as T,TextField as k,useTheme as j,Paper as S}from"@mui/material";import c from"@mui/material/Unstable_Grid2";import{useDataFieldAddressInput as V}from"./hook.mjs";import{AddressInputProvider as F}from"./context.mjs";import{jsx as t,jsxs as G}from"react/jsx-runtime";function z(o){const n=j();return G(S,{...o,children:[o.children,t(d,{sx:a=>({display:"flex",justifyContent:"flex-end",p:1,pt:"1px",...a.applyStyles("dark",{opacity:.8})}),children:t("img",{src:n.palette.mode==="dark"?"https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-non-white3_hdpi.png":"https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white3_hdpi.png",alt:"",width:"120",height:"14"})})]})}function D({defaultValue:o,onChange:n,label:a,error:u,disabled:i,variant:g,size:h,helperText:m,inputProps:f,InputProps:x,ClearAdornment:r}){const{value:P,inputValue:v,suggestions:b,isPending:s,isFetchingPlace:p,handleInputChange:y,handleOptionChange:C,handleClear:I}=V({defaultValue:o,onChange:n});return t(d,{width:"100%",children:t(O,{disableClearable:!0,freeSolo:!0,isOptionEqualToValue:(e,l)=>e?.value===l?.value,getOptionLabel:e=>typeof e=="string"?e:e?.title,filterOptions:e=>e,options:s?[]:b.map(e=>({title:e.placePrediction.text.text??"",value:e.placePrediction.place??""})),autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,noOptionsText:"No locations",value:P,inputValue:v,loading:s||p,disabled:p||i,onChange:(e,l)=>{e.preventDefault(),e.stopPropagation(),!i&&(!l||typeof l=="string"||C(l).catch(console.error))},onInputChange:(e,l)=>{y(l)},renderInput:e=>t(k,{id:e.id,disabled:e.disabled,label:a,variant:g,size:h,error:u,helperText:m,inputProps:{...e.inputProps,tabIndex:0,autoCapitalize:"off",autoComplete:"street-address address-level2 address-level1 postal-code",...f},InputProps:{...e.InputProps,disableInjectingGlobalStyles:!0,endAdornment:r?t(r,{onClick:()=>{I()}}):void 0,...x},fullWidth:!0,multiline:!0}),renderOption:(e,l)=>{const{key:w,...A}=e;return t("li",{...A,children:t(c,{container:!0,sx:{alignItems:"flex-start"},children:t(c,{sx:{width:"100%",wordWrap:"break-word"},children:t(T,{variant:"body2",sx:{color:"text.secondary",textAlign:"left"},children:l?.title})})})},w)},PaperComponent:z})})}function L(o){const{service:n,...a}=o;return t(F,{googlePlacesAutocompletePlaces:n.googlePlacesAutocompletePlaces,googlePlacesGetPlace:n.googlePlacesGetPlace,children:t(D,{...a})})}export{L as AddressInput};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useRef as L,useState as m,useMemo as M,useEffect as N}from"react";import{Box as R,InputAdornment as j}from"@mui/material";import{getPhoneDataByFieldName as E}from"../../utils/phone/index.mjs";import{phoneSchema as H}from"../../validations/phone.schema.mjs";import{TextMaskCustom as O}from"./TextMaskCustom.mjs";import U from"./CountrySelector.mjs";import{DefaultInput as V}from"./DefaultInput.mjs";import{DataFieldClearAdornment as W}from"./DataFieldClearAdornment.mjs";import{jsx as o}from"react/jsx-runtime";function q({label:h="Phone",name:d="phone",helperText:c,onChange:n,onBlur:f,onValidPhone:r,initialValue:C="",error:_=!1,handleChangeCountry:l,value:P,autoFocus:b=!1,InputProps:x,InputLabelProps:v,shouldHaveSelectCountryButton:y=!0,shouldHaveClearButton:I=!1,disabled:g=!1,size:A,placeholder:B="+1 (___) ___-____",lazy:S=!0,enableChromeAutofill:k=!0}){const u=L(null),[a,z]=m("US"),[t,F]=m(C),s=M(()=>E("countryCode",a),[a]),T=e=>{z(e),l&&l(e),setTimeout(()=>{var i;(i=u.current)==null||i.focus()},10)},D=e=>{H.safeParse(t).success&&r?.(e)},p=e=>{F(e),n?.(e)};N(()=>{D(t)},[t]);const w={inputRef:u,autoFocus:b,label:h,name:d,helperText:c,value:P??t,error:_,onChange:e=>{p(e.target.value)},onBlur:f,autoComplete:"tel",size:A,placeholder:B,inputProps:{unmask:!0,lazy:S,mask:s?.mask,placeholderChar:"_",tabIndex:0,type:"tel",enableChromeAutofill:k},InputLabelProps:{shrink:!0,...v},InputProps:{inputComponent:O,startAdornment:y&&o(j,{position:"start",children:o(U,{value:a,onChange:T,shouldShowOnlyNorthAmericanCountries:!1})}),endAdornment:I&&o(W,{handleClear:()=>{p("")}}),...x},fullWidth:!0,disabled:g};return o(R,{width:"100%",children:o(V,{...w,sx:{m:0,"& input":{letterSpacing:"1px"}}})})}export{q as BasePhoneInput};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useState as h,useMemo as y}from"react";import{Button as C,Menu as f,MenuItem as b}from"@mui/material";import{KeyboardArrowDown as v}from"@mui/icons-material";import{countries as l,sortByCountryName as x,getPhoneDataByFieldName as g}from"../../utils/phone/index.mjs";import{jsxs as m,Fragment as w,jsx as t}from"react/jsx-runtime";function B({shouldShowOnlyNorthAmericanCountries:r=!0,...n}){var a;const[i,s]=h(null),e=!!i,c=y(()=>{let o=[...l.filter(p=>p.countryCode!=="BR")];return r||(o=[...l]),[...o].sort(x)},[r]),d=o=>{s(o.currentTarget)},u=()=>{s(null)};return m(w,{children:[t(C,{id:"demo-customized-button","aria-controls":e?"country-select-button":void 0,"aria-haspopup":"true","aria-expanded":e?"true":void 0,variant:"text",disableElevation:!0,onClick:d,endIcon:t(v,{}),children:(a=g("countryCode",n.value))==null?void 0:a.emoji}),t(f,{anchorEl:i,open:e,onClose:u,MenuListProps:{"aria-labelledby":"country-select-button"},slotProps:{paper:{style:{maxHeight:48*4.5,width:"20ch",minWidth:"300px"}}},children:c.map(o=>m(b,{role:"menuitem",onClick:()=>{n.onChange(o.countryCode),u()},children:[o.emoji," ",o.countryName]},o.countryCode))})]})}export{B as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Close as o}from"@mui/icons-material";import{InputAdornment as a,IconButton as r}from"@mui/material";import{jsx as n}from"react/jsx-runtime";function i({onClick:e,handleClear:l}){return n(a,{position:"end",children:n(r,{"aria-label":"clear value",edge:"end",size:"small",onClick:()=>{l(),e?.()},children:n(o,{fontSize:"small"})})})}export{i as DataFieldClearAdornment};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{forwardRef as S,useState as M,useRef as P,useMemo as O}from"react";import{TextField as Y,Box as F,Stack as T,IconButton as A}from"@mui/material";import{CalendarToday as N}from"@mui/icons-material";import $ from"../../../node_modules/react-datepicker/dist/es/index.mjs";import{useOnClickOutside as E}from"../../../hooks/useOnClickOutside.mjs";import R from"../../../styles/lib/react-datepicker.css.mjs";import{masks as y}from"../../../utils/masks/index.mjs";import{InputMask as j}from"../InputMask.mjs";import{jsxs as B,Fragment as z,jsx as a}from"react/jsx-runtime";const K=S(function(t,r){return a(T,{ref:r,sx:{position:"relative"},children:a(A,{edge:"end",size:"small",onClick:()=>{var l;t.disabled||(l=t.onFocus)==null||l.call(t)},disabled:t.disabled,children:a(N,{fontSize:"small"})})})}),W=function({value:t,onChange:r,defaultSelectedDate:l,overflow:h=!1,clickOutsideBoundaryElement:u,minDate:x,maxDate:p,disabled:c}){const[k,d]=M(!1),m=P(null),w=new Date("08/01/1989"),f=x??new Date(1900,0,1),n=p??new Date,b=e=>{if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";try{const o=e.getDate().toString().padStart(2,"0"),s=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getFullYear();return s==="00"||s>"12"||o==="00"||o>"31"||i<1900||i>n.getFullYear()?"":`${s}/${o}/${i}`}catch{return""}},D=O(()=>{if(!t)return l??void 0;const e=new Date(t);return isNaN(+e)||!/^\d{2}\/\d{2}\/\d{4}$/.test(t)||e<f||e>n?w:e},[t]);return E(m,()=>{d(!1)},"mousedown",{},u),B(F,{ref:m,sx:{position:"relative","& .react-datepicker-popper":h?{transform:"translate(calc(-100% + 32px), calc(-50% + 10px))!important"}:{}},children:[a("style",{children:R}),a($,{open:k,onFocus:()=>{d(e=>!e)},popperPlacement:"bottom-end",placeholderText:"MM/DD/YYYY",showPopperArrow:!1,showYearDropdown:!0,showMonthDropdown:!0,scrollableYearDropdown:!1,dateFormat:"MM/dd/yyyy",minDate:f,maxDate:n,selected:D,dropdownMode:"select",onSelect:e=>{const o=b(e);o&&(r?.({target:{value:o}}),d(!1))},disabled:c,customInput:a(K,{disabled:c})})]})};function _({label:t="Date",value:r,error:l,helperText:h,onChange:u,onBlur:x,disabled:p,pickerDefaultSelectedDate:c,pickerClickOutsideBoundaryElement:k,pickerInputOverflow:d=!1,inputMaskProps:m,minDate:w,maxDate:f,...n},b){var D;const[e,o]=M(""),s=r!==void 0,i=s?r:e,g=I=>{const v=I.target.value;s||o(v),u&&u(v)},C={label:t,error:l,helperText:h,fullWidth:!0,...n,autoComplete:"bday",inputProps:{...n.inputProps,inputMode:"numeric",tabIndex:0,mask:y.DOB_MASK},InputProps:{...n.InputProps,endAdornment:B(z,{children:[a(W,{onChange:g,value:i,overflow:d,clickOutsideBoundaryElement:k,defaultSelectedDate:c,minDate:w,maxDate:f,disabled:p}),(D=n.InputProps)==null?void 0:D.endAdornment]})}};return a(j,{mask:y.DOB_MASK,maskPlaceholder:null,disabled:p,value:i,onBlur:x,onChange:g,...m,children:a(Y,{...C,inputRef:b,fullWidth:!0,sx:{flex:1,"& input":{boxShadow:"none!important",border:"none!important",letterSpacing:"1px"}}})})}const Z=S(_);export{Z as DateInput};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useState as i,useRef as c,forwardRef as h}from"react";import{Box as x,TextField as Y}from"@mui/material";import g from"../../../node_modules/react-datepicker/dist/es/index.mjs";import M from"../../../styles/lib/react-datepicker.css.mjs";import{useOnClickOutside as R}from"../../../hooks/useOnClickOutside.mjs";import{useStyle as y}from"./style.mjs";import{jsxs as v,jsx as r}from"react/jsx-runtime";const b=h(function(t,a){return r(Y,{inputRef:a,...t,label:"Range",fullWidth:!0,sx:{flex:1,"& input":{boxShadow:"none!important",border:"none!important"}}})}),H=t=>{const a=y(),m=()=>{const{startDate:e,endDate:o}=t;return!e||!o?[null,null]:[new Date(e),new Date(o)]},[u,d]=i(m()),[D,f]=u,n=c(null),[w,s]=i(!1);return R(n,()=>{s(!1)}),v(x,{ref:n,sx:a.wrapper,children:[r("style",{children:M}),r(g,{open:w,onFocus:()=>{s(!0)},placeholderText:"MM/DD/YYYY - MM/DD/YYYY",showPopperArrow:!1,swapRange:!0,selectsRange:!0,showYearDropdown:!0,showMonthDropdown:!0,scrollableYearDropdown:!1,dateFormat:"MM/dd/yyyy HH:mm:ss",startDate:D??void 0,endDate:f??void 0,minDate:new Date(2023,0,1),maxDate:new Date,onChange:([e,o],l)=>{var p;d([e,o]),!(!e||!o)&&(((p=l?.target)==null?void 0:p.tagName)!=="INPUT"&&(e.setHours(0,0,0,0),o.setHours(23,59,59,999)),t.onChange(+e,+o))},customInput:r(b,{})})]})};export{H as DateRangeInput};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function t(){return{wrapper:{width:450,'& input[type="text"]':{textAlign:"center",width:"100%",flex:1}}}}export{t as useStyle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{forwardRef as f}from"react";import{TextField as n}from"../TextField/index.mjs";import{jsx as m}from"react/jsx-runtime";const e=({variant:r="outlined",margin:t="normal",...i},o)=>m(n,{inputRef:o,variant:r,margin:t,fullWidth:!0,...i}),a=f(e);export{a as DefaultInput,a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{TextField as l}from"@mui/material";import m from"lodash/capitalize";import{jsx as p}from"react/jsx-runtime";const r=({name:a="email",type:e="email",id:o=a,label:i=m(a),...t})=>p(l,{fullWidth:!0,type:e,name:a,id:o,label:i,inputProps:{autoCorrect:"off",autoCapitalize:"off"},...t});export{r as EmailInput};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import r from"@mona-health/react-input-mask";import{jsx as t}from"react/jsx-runtime";function m(o){return t(r,{...o})}export{m as InputMask};
|
|
@@ -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 @@
|
|
|
1
|
+
"use strict";import{middleName as a,lastName as t,firstName as i,fullName as r}from"./fullName.mjs";import{zipCode as m,country as o,state as n,city as c,line2 as d,line1 as p,address as l}from"./address.mjs";import{expirationDate as f,issuanceDate as u,issuanceState as N,documentNumber as b,driversLicense as y}from"./driversLicense.mjs";import{ssn as D}from"./ssn.mjs";import{phone as x}from"./phone.mjs";import{sex as h}from"./sex.mjs";import{birthDate as j}from"./birthDate.mjs";const s={fullName:r,firstName:i,lastName:t,middleName:a,address:l,line1:p,line2:d,city:c,state:n,country:o,zipCode:m,driversLicense:y,documentNumber:b,issuanceState:N,issuanceDate:u,expirationDate:f,ssn:D,phone:x,sex:h,birthDate:j},S=Object.fromEntries(Object.keys(s).map(e=>[e,e]));export{S as credentialKeys,s 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};
|
|
@@ -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 v=Object.defineProperty,C=(u,e,t)=>e in u?v(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,F=(u,e,t)=>C(u,typeof e!="symbol"?e+"":e,t);import{fields as p}from"../fields/index.mjs";import{FormFieldBuilder as w}from"./formFieldBuilder.mjs";import{Form as O}from"./form.mjs";import{normalizeCredentialType as m}from"./utils.mjs";import{fieldInputTypes as h}from"../fields/constants.mjs";class T{constructor(){F(this,"fieldBuilder",new w)}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$/,""),f=c.charAt(0).toLowerCase()+c.slice(1),d=p[f];if(d&&d.characteristics.inputType===h.composite&&"children"in d&&"defaultOrder"in d.characteristics&&d.characteristics.defaultOrder){const y=this.expandCredentialType(r.type);r={...r,children:y.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 O(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===h.composite?a=t.value[s]:a=t.value;const o={...t,uuid:void 0,type:r,value:a},c=this.extractRequestOptions(l,e);let f;n.characteristics.inputType===h.composite&&l.children&&(f=this.createChildFields(l,o));const d=this.fieldBuilder.createFromCredential(o,f,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===h.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{T 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{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):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 m}from"./formField.mjs";import{normalizeCredentialType as f}from"./utils.mjs";import{fieldInputTypes as d}from"../fields/constants.mjs";class v{createFromCredential(o,i,e,l){var n;const c=p[o.type];if(!c)throw new Error(`Invalid credential type: ${o.type}`);const r=c.key;let t;if(c.characteristics.inputType===d.composite)if(o.value&&Object.keys(o.value).length>0)if(i&&Object.keys(i).length>0){const s={};Object.keys(i).forEach(a=>{a in o.value&&(s[a]=o.value[a])}),t=Object.keys(s).length>0?s:void 0}else t=void 0;else t=void 0;else t=(n=o.value)==null?void 0:n[r];return new m(o.uuid,t,t,c,{children:i,allowUserInput:e?.allowUserInput??!0,mandatory:e?.mandatory??"no",multi:e?.multi??!1,variants:l,description:e?.description})}createFromSchema(o,i){let e,l;const n={allowUserInput:o.allowUserInput??!0,mandatory:o.mandatory??"no",multi:o.multi??!1,description:o.description};if(i.characteristics.inputType===d.composite&&o.children){const r={};for(const t of o.children){const s=f(t.type),a=p[s];if(a){const u=this.createFromSchema(t,a);r[a.key]=u}}l=Object.keys(r).length>0?r:void 0}if(i.characteristics.inputType===d.composite)if(l&&Object.keys(l).length>0){const r={};Object.entries(l).forEach(([t,s])=>{r[t]=s.defaultValue}),e=r}else e=void 0;else e="";const c=typeof e=="object"&&e!==null?y(e):e;return new m(void 0,e,c,i,{children:l,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 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";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 @@
|
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{birthDateSchema as t}from"../../../../../../validations/date.schema.mjs";const a=t;export{a as birthDateSchema};
|
|
@@ -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};
|
|
@@ -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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{AddressInput as P}from"../../../../../AddressInput/index.mjs";import{useFormField as h}from"../../../core/field.hook.mjs";import{useOneClickForm as k}from"../../form.context.mjs";import{FieldLabel as A}from"./label.mjs";import{ClearFieldAdornment as b}from"./clear-field-adornment.mjs";import{jsx as n}from"react/jsx-runtime";import{fieldInputTypes as z}from"../../../../core/fields/constants.mjs";function F({fieldKey:i}){var t,u,s,a,d,r;const{options:v}=k(),{field:l,setChildValue:o}=h({key:i});if(l?.schema.characteristics.inputType!==z.composite)return null;const c=(t=l.errorMessage)==null?void 0:t.toLowerCase().startsWith("line 2");return n(P,{label:n(A,{fieldKey:i}),helperText:c?l?.description:l.errorMessage??l?.description,error:!!l.errors&&!c,disabled:l.isDisabled,defaultValue:{line1:(u=l?.value)==null?void 0:u.line1,city:(s=l?.value)==null?void 0:s.city,state:(a=l?.value)==null?void 0:a.state,zipCode:(d=l?.value)==null?void 0:d.zipCode,country:((r=l?.value)==null?void 0:r.country)??"US"},onChange:e=>{var p,m,y,f,g;typeof e!="string"&&(e===null&&Object.keys(l?.value??{}).forEach(C=>{C!=="line2"&&o(C,"")}),typeof((p=l?.value)==null?void 0:p.line1)=="string"&&o("line1",e?.line1??""),typeof((m=l?.value)==null?void 0:m.city)=="string"&&o("city",e?.city??""),typeof((y=l?.value)==null?void 0:y.state)=="string"&&o("state",e?.state??""),typeof((f=l?.value)==null?void 0:f.zipCode)=="string"&&o("zipCode",e?.zipCode??""),typeof((g=l?.value)==null?void 0:g.country)=="string"&&o("country",e?.country??""))},InputProps:{"data-mask-me":!0},ClearAdornment:function({onClick:e}){return n(b,{fieldKey:i,onClick:e,ignoreKeys:["line2"]})},service:{googlePlacesAutocompletePlaces:v.servicePaths.googlePlacesAutocompletePlaces,googlePlacesGetPlace:v.servicePaths.googlePlacesGetPlace}})}export{F as AddressInputField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{InputAdornment as p,IconButton as f}from"@mui/material";import{Close as v}from"@mui/icons-material";import{useFormField as y}from"../../../core/field.hook.mjs";import{jsx as r}from"react/jsx-runtime";function b({fieldKey:s,ignoreKeys:u,onClick:i,disabled:o}){const{field:l,clear:m}=y({key:s}),c=n=>{var e,t,a,d;return((t=(e=n.parentElement)==null?void 0:e.parentElement)==null?void 0:t.querySelector("input"))??((d=(a=n.parentElement)==null?void 0:a.parentElement)==null?void 0:d.querySelector("textarea"))};return r(p,{position:"end",children:r(f,{tabIndex:-1,"aria-label":"clear value",edge:"end",size:"small",onClick:n=>{var e;(o??l?.isDisabled)||((e=c(n.currentTarget))==null||e.focus(),m({ignoreKeys:u}),i?.())},disabled:o??l?.isDisabled,children:r(v,{fontSize:"small"})})})}export{b as ClearFieldAdornment};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useRef as w,useState as x}from"react";import{Box as M}from"@mui/material";import{USDateSchema as S}from"../../../../../../../validations/date.schema.mjs";import{formatDateMMDDYYYY as A}from"../../../../../../../utils/date.mjs";import{credentialKeys as I}from"../../../../core/fields/index.mjs";import{useFormField as K}from"../../../core/field.hook.mjs";import{getAutoCompleteAttributeValue as N}from"../shared.mjs";import{FieldLabel as V}from"./label.mjs";import{ClearFieldAdornment as P}from"./clear-field-adornment.mjs";import{jsx as l}from"react/jsx-runtime";import{fieldInputTypes as R}from"../../../../core/fields/constants.mjs";import{DateInput as j}from"../../../../../DateInput/index.mjs";function L({fieldKey:i}){var o;const{field:e,setValue:t}=K({key:i}),m=w(null),[u,n]=x(e!=null&&e.value?A(e?.value):"");if(!e||e.schema.characteristics.inputType!==R.date)return null;const s=e.schema.key===I.birthDate,a=new Date,d=1900,p=1,c=1,f=s?a.getUTCFullYear()-18:a.getUTCFullYear()+100,D=s?a.getUTCMonth()+1:12,h=s?a.getUTCDate():31,g=new Date(d,p-1,c),b=new Date(f,D-1,h),C=r=>{if(e.isDisabled)return;const T=S.safeParse(r),v=r.replace(/[^0-9]/g,"");if(n(r),v.length<=0)return t("");if(!T.success)return t("NaN");const[F,k,U]=r.split("/").map(Number),Y=Date.UTC(U,F-1,k,12,0,0,0);t(String(Y))},y=()=>{n(""),t("")};return l(M,{width:"100%",children:l(j,{inputRef:m,variant:"outlined",size:"small",autoComplete:N(e.schema.key),label:l(V,{fieldKey:i}),value:u,onChange:C,error:!(e!=null&&e.isValid),helperText:(o=e.errorMessage)!=null&&o.length?e.errorMessage:e?.description,placeholder:e.schema.characteristics.placeholder,pickerDefaultSelectedDate:new Date("08/01/1989"),minDate:g,maxDate:b,disabled:e.isDisabled,InputProps:{"data-mask-me":!0,endAdornment:l(P,{fieldKey:i,onClick:y,disabled:e.isDisabled})}})})}export{L as DateInputField};
|