@greatapps/common 1.1.807 → 1.1.808
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/account/sections/affiliates/ReceivingAccountModal.mjs +6 -2
- package/dist/components/account/sections/affiliates/ReceivingAccountModal.mjs.map +1 -1
- package/dist/components/account/sections/affiliates/RequestWithdrawalSheet.mjs +30 -3
- package/dist/components/account/sections/affiliates/RequestWithdrawalSheet.mjs.map +1 -1
- package/dist/i18n/messages/en-us.mjs +4 -1
- package/dist/i18n/messages/en-us.mjs.map +1 -1
- package/dist/i18n/messages/es-es.mjs +4 -1
- package/dist/i18n/messages/es-es.mjs.map +1 -1
- package/dist/i18n/messages/pt-br.mjs +4 -1
- package/dist/i18n/messages/pt-br.mjs.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/testing/factories/index.mjs +2 -0
- package/dist/testing/factories/index.mjs.map +1 -1
- package/dist/testing/factories/withdrawal-limits.factory.mjs +18 -0
- package/dist/testing/factories/withdrawal-limits.factory.mjs.map +1 -0
- package/dist/utils/validators/pix-key.mjs +4 -0
- package/dist/utils/validators/pix-key.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/account/sections/affiliates/ReceivingAccountModal.tsx +6 -2
- package/src/components/account/sections/affiliates/RequestWithdrawalSheet.tsx +36 -3
- package/src/i18n/messages/en-us.ts +5 -0
- package/src/i18n/messages/es-es.ts +5 -0
- package/src/i18n/messages/pt-br.ts +5 -0
- package/src/index.ts +1 -1
- package/src/testing/factories/index.ts +1 -0
- package/src/testing/factories/withdrawal-limits.factory.ts +16 -0
- package/src/utils/validators/pix-key.ts +4 -0
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Types\nexport * from \"./modules/auth/schema\";\nexport * from \"./modules/users/schema\";\nexport { UserProfile } from \"./modules/users/schema\";\nexport * from \"./modules/whitelabel/schema\";\n// Style types now come from whitelabel schema directly\nexport * from \"./infra/api/types\";\n\n// Contexts\nexport * from \"./providers/query.provider\";\nexport * from \"./providers/auth.provider\";\nexport * from \"./providers/whitelabel.provider\";\nexport {\n NavigationProvider,\n useNavigationFallback,\n} from \"./providers/navigation.provider\";\n\n// Navigation (safe drop-in replacement for next/navigation)\nexport { useRouter } from \"./hooks/useRouter\";\nexport type { SafeAppRouter } from \"./hooks/useRouter\";\nexport {\n usePathname,\n useSearchParams,\n useParams,\n redirect,\n notFound,\n} from \"./utils/next-navigation\";\n\n// Hooks\nexport {\n useListProjectUsers,\n LIST_PROJECT_USERS_QUERY_KEY,\n LIST_PROJECT_USERS_BASE_KEY,\n} from \"./modules/projects/hooks/list-project-users.hook\";\nexport {\n useListAvailableUsers,\n LIST_AVAILABLE_USERS_QUERY_KEY,\n LIST_AVAILABLE_USERS_BASE_KEY,\n} from \"./modules/projects/hooks/list-available-users.hook\";\nexport {\n useListAllAccountUsers,\n LIST_ALL_ACCOUNT_USERS_QUERY_KEY,\n LIST_ALL_ACCOUNT_USERS_BASE_KEY,\n} from \"./modules/projects/hooks/list-all-account-users.hook\";\nexport {\n useProjects,\n PROJECTS_BASE_KEY,\n PROJECTS_QUERY_KEY,\n} from \"./modules/projects/hooks/list-projects.hook\";\nexport {\n useInfiniteProjects,\n INFINITE_PROJECTS_QUERY_KEY,\n} from \"./modules/projects/hooks/list-infinite-projects.hook\";\nexport { useProject } from \"./modules/projects/hooks/find-project.hook\";\nexport { useCreateProject } from \"./modules/projects/hooks/create-project.hook\";\nexport { useUpdateProject } from \"./modules/projects/hooks/update-project.hook\";\nexport { useDeleteProject } from \"./modules/projects/hooks/delete-project.hook\";\nexport { useAddProjectUsers } from \"./modules/projects/hooks/add-project-users.hook\";\nexport { useRemoveProjectUsers } from \"./modules/projects/hooks/remove-project-users.hook\";\nexport type {\n Project,\n ProjectsPage,\n CreateProjectRequest,\n UpdateProjectRequest,\n ProjectUser,\n AccountUser,\n AddRemoveProjectUsersParams,\n ListUsersParams,\n UsersPage,\n} from \"./modules/projects/types\";\nexport { ProjectSchema } from \"./modules/projects/types\";\nexport type { ListProjectsActionParams } from \"./modules/projects/actions/list-projects.action\";\nexport {\n useUserQuery,\n useUserValidateSession,\n useInvalidateUser,\n useSetUserData,\n useTwoFactorVerify,\n USER_QUERY_KEY,\n} from \"./modules/auth/hooks/useUserQuery\";\nexport { useManagementPermissions } from \"./modules/auth/hooks/useManagementPermissions\";\nexport type { ManagementPermission } from \"./modules/auth/types/management-permission.type\";\nexport { useSocialGoogleLogin } from \"./modules/auth/hooks/social-google-login.hook\";\nexport { useSocialGoogleOnboarding } from \"./modules/auth/hooks/social-google-onboarding.hook\";\nexport { useUnlinkGoogle } from \"./modules/auth/hooks/unlink-google.hook\";\nexport { useSubscriptions } from \"./modules/subscriptions/hooks/list-subscriptions.hook\";\nexport {\n SUBSCRIPTIONS_QUERY_KEY,\n CHARGES_QUERY_KEY,\n FREEZE_NOTICE_QUERY_KEY,\n} from \"./modules/subscriptions/constants/query-keys.constants\";\nexport { useCurrentSubscription } from \"./modules/subscriptions/hooks/use-current-subscription.hook\";\n/** @deprecated Use `useCurrentSubscription`. Sai na 1.1.784. */\nexport { useActiveSubscription } from \"./modules/subscriptions/hooks/find-active-subscription.hook\";\nexport { useCancelledSubscriptionGuard } from \"./modules/subscriptions/hooks/use-cancelled-subscription-guard\";\nexport { useAccountFreeze } from \"./modules/subscriptions/hooks/use-account-freeze.hook\";\nexport { useFreezeNotice } from \"./modules/subscriptions/hooks/use-freeze-notice.hook\";\nexport { usePlanById } from \"./modules/plans/hooks/use-plan-by-id.hook\";\nexport { useHasPlanAddon } from \"./modules/plans/hooks/use-has-plan-addon.hook\";\nexport { useCalculateSubscription } from \"./modules/subscriptions/hooks/calculate-subscription.hook\";\nexport { useUpdateSubscriptionPlan } from \"./modules/subscriptions/hooks/update-subscription-plan.hook\";\nexport { useUpdateSubscriptionPayment } from \"./modules/subscriptions/hooks/update-subscription-payment.hook\";\nexport { useCancelSubscription } from \"./modules/subscriptions/hooks/cancel-subscription.hook\";\nexport { useCreateSubscription } from \"./modules/subscriptions/hooks/create-subscription.hook\";\nexport { useSubscriptionById } from \"./modules/subscriptions/hooks/find-subscription-by-id.hook\";\nexport { usePendingPixStatus } from \"./modules/subscriptions/hooks/pending-pix-status.hook\";\nexport { useIaCreditOperations } from \"./modules/ia-credits/hooks/ia-credit-operations.hook\";\nexport { useCards, CARDS_QUERY_KEY } from \"./modules/cards/hooks/cards.hook\";\nexport { useCardById } from \"./modules/cards/hooks/card-by-id.hook\";\nexport { useCreateCard } from \"./modules/cards/hooks/create-card.hook\";\nexport { useCreateSetupIntent } from \"./modules/cards/hooks/create-setup-intent.hook\";\nexport { useSetDefaultCard } from \"./modules/cards/hooks/set-default-card.hook\";\nexport { useDeleteCard } from \"./modules/cards/hooks/delete-card.hook\";\nexport { useDeleteConfirmation } from \"./modules/cards/hooks/delete-confirmation.hook\";\nexport type { DeleteConfirmationFormData } from \"./modules/cards/hooks/delete-confirmation.hook\";\nexport { useHandleDeleteCard } from \"./modules/cards/hooks/handle-delete-card.hook\";\nexport { useCharges } from \"./modules/charges/hooks/charges.hook\";\nexport { useChargeById } from \"./modules/charges/hooks/charge-by-id.hook\";\nexport { useChargeAction } from \"./modules/charges/hooks/charge-action.hook\";\nexport { useNotaFiscal } from \"./modules/charges/hooks/nota-fiscal.hook\";\nexport { useRefreshChargePix } from \"./modules/charges/hooks/refresh-pix.hook\";\nexport { useIaCredits } from \"./modules/ia-credits/hooks/ia-credits.hook\";\nexport type {\n IaCreditsSummary,\n IaCreditsSummaryData,\n IaCreditAddBatch,\n IaCreditOperation,\n} from \"./modules/ia-credits/types\";\nexport { usePurchaseIaCredits } from \"./modules/ia-credits/hooks/purchase-ia-credits.hook\";\nexport { useAiCreditsOfferEligibility } from \"./modules/ia-credits/hooks/use-offer-eligibility.hook\";\nexport {\n AI_CREDITS_FIRST_PURCHASE_OFFER,\n AI_CREDITS_OFFER_ELIGIBILITY_QUERY_KEY,\n AI_CREDITS_OFFER_MAX_REPEATS,\n AiCreditsOfferStage,\n PAYMENT_METHOD_CARD,\n PAYMENT_METHOD_PIX,\n} from \"./modules/ia-credits/constants/ai-credits-offer.constants\";\nexport type {\n AiCreditsOfferEligibility,\n AiCreditsOfferEligibilityResponse,\n AiCreditsOfferIneligibilityReason,\n PurchaseIaCreditsInput,\n PurchaseIaCreditsResult,\n} from \"./modules/ia-credits/types/ai-credits-offer.type\";\nexport {\n readOfferStageCookie,\n writeOfferStageCookie,\n} from \"./modules/ia-credits/utils/offer-stage-cookie\";\nexport type { OfferStageRecord } from \"./modules/ia-credits/utils/offer-stage-cookie\";\nexport type {\n Subscription,\n SubscriptionItem,\n FindSubscriptionsParams,\n ChargeNowResult,\n} from \"./modules/subscriptions/types/subscription.type\";\nexport {\n SubscriptionSchema,\n SubscriptionItemSchema,\n} from \"./modules/subscriptions/types/subscription.type\";\nexport {\n ADDON_IDS,\n aiCreditUnitPrice,\n AI_CREDIT_SIZES,\n AI_CREDIT_VALUES,\n buildAiCreditOptions,\n resolveAiCreditPrice,\n} from \"./modules/subscriptions/constants/addons.constants\";\nexport type {\n AddonKindEnum,\n AiCreditOption,\n} from \"./modules/subscriptions/constants/addons.constants\";\nexport type {\n Plan,\n PlanItem,\n UiPlan,\n PlanFeature,\n PlanMainFeatures,\n PlanPricingByPeriod,\n PlanTooltips,\n} from \"./modules/plans/types/plan.type\";\nexport { PlanSchema, PlanItemSchema } from \"./modules/plans/types/plan.type\";\nexport {\n mapApiPlanToUiPlan,\n mapApiPlanToUiPlanForCurrency,\n} from \"./modules/plans/utils/map-api-plan-to-ui\";\nexport type { PlanBillingPeriod } from \"./modules/plans/utils/map-api-plan-to-ui\";\nexport {\n usePlans,\n PLANS_QUERY_KEY,\n} from \"./modules/plans/hooks/list-plans.hook\";\nexport { useUiPlans } from \"./modules/plans/hooks/use-ui-plans.hook\";\nexport { useEnrichedPlans } from \"./modules/plans/hooks/use-enriched-plans.hook\";\nexport {\n getPlanTooltips,\n HIDDEN_PLAN_IDS,\n} from \"./modules/plans/constants/plan-tooltips.constants\";\nexport type { BillingPeriod } from \"./modules/subscriptions/types/billing-period.type\";\nexport type {\n CalculateSubscriptionRequest,\n CalculateSubscriptionResponse,\n UpdateSubscriptionPlanRequest,\n} from \"./modules/subscriptions/types/calculate-subscription.type\";\nexport {\n PixPendingDataSchema,\n SubscriptionPendingPixResponseSchema,\n isSubscriptionPendingPixResponse,\n} from \"./modules/subscriptions/types/pix-pending.type\";\nexport type {\n PixPendingData,\n SubscriptionPendingPixResponse,\n} from \"./modules/subscriptions/types/pix-pending.type\";\nexport type {\n Card as PaymentCard,\n CreateCardRequest,\n FindCardsParams,\n SetupIntent,\n} from \"./modules/cards/types\";\nexport {\n CardSchema as PaymentCardSchema,\n CreateCardRequestSchema,\n FindCardsParamsSchema,\n SetupIntentSchema,\n} from \"./modules/cards/types\";\nexport type {\n Charge,\n FindChargesParams,\n PayChargeInput,\n} from \"./modules/charges/types/charge.type\";\nexport {\n ChargeSchema,\n FindChargesParamsSchema,\n PayChargeInputSchema,\n} from \"./modules/charges/types/charge.type\";\nexport { buildPlanExtras } from \"./modules/subscriptions/utils/build-plan-extras\";\nexport { hasSubscriptionExpired } from \"./modules/subscriptions/utils/has-subscription-expired\";\nexport { hasActivePaidSubscription } from \"./modules/subscriptions/utils/has-active-paid-subscription\";\nexport { hasPaidSubscription } from \"./modules/subscriptions/utils/has-paid-subscription\";\nexport {\n confirmPaymentIfRequired,\n PaymentAuthenticationError,\n} from \"./modules/subscriptions/utils/confirm-payment-if-required\";\nexport {\n SUBSCRIPTION_GRACE_PERIOD_DAYS,\n FREE_PLAN_ID,\n} from \"./modules/subscriptions/constants/subscription.constants\";\nexport { groupSubscriptionsByProduct } from \"./modules/subscriptions/utils/group-subscriptions-by-product\";\nexport { getSubscriptionCancellationState } from \"./modules/subscriptions/utils/get-subscription-cancellation-state\";\nexport type { SubscriptionCancellationState } from \"./modules/subscriptions/utils/get-subscription-cancellation-state\";\nexport {\n ACCOUNT_FREEZE_AFTER_DAYS,\n FREEZE_WARNING_DAYS_BEFORE,\n} from \"./modules/subscriptions/constants/subscription.constants\";\nexport { getAccountFreezeState } from \"./modules/subscriptions/utils/get-account-freeze-state\";\nexport type { AccountFreezeState } from \"./modules/subscriptions/utils/get-account-freeze-state\";\nexport { getAccountFreezeDate } from \"./modules/subscriptions/utils/get-account-freeze-date\";\nexport type { FreezeNotice } from \"./modules/subscriptions/types/freeze-notice.type\";\nexport {\n useCountPages,\n COUNT_PAGES_QUERY_KEY,\n} from \"./modules/pages/hooks/count-pages.hook\";\nexport { PAGES_QUERY_KEY } from \"./modules/pages/constants/query-keys.constants\";\nexport {\n getPriceFromCalculatedData,\n getOriginalPriceFromCalculatedData,\n periodicityToBillingPeriod,\n getPlanBadgePercents,\n getCatalogBadgePercents,\n USD_CATALOG_MAX_ANNUAL_DISCOUNT_PERCENT,\n} from \"./modules/subscriptions/utils/periodicity\";\nexport { useBuyCreditsModal } from \"./store/useBuyCreditsModal\";\nexport { useCreditsDisabledModal } from \"./store/useCreditsDisabledModal\";\nexport { usePaidPlanRequiredModal } from \"./store/usePaidPlanRequiredModal\";\nexport { useAccountDeletionWarningModal } from \"./store/useAccountDeletionWarningModal\";\nexport { useAiCreditsOfferModal } from \"./store/useAiCreditsOfferModal\";\nexport { default as BuyCreditsModal } from \"./components/modals/BuyCreditsModal\";\nexport { default as AiCreditsOfferModal } from \"./components/modals/promo/AiCreditsOfferModal\";\nexport { AiCreditsOfferGate } from \"./components/layouts/AiCreditsOfferGate\";\nexport type { AiCreditsOfferGateProps } from \"./components/layouts/AiCreditsOfferGate\";\nexport { default as CreditsDisabledModal } from \"./components/modals/CreditsDisabledModal\";\nexport { default as PaidPlanRequiredModal } from \"./components/modals/PaidPlanRequiredModal\";\nexport { default as AccountFrozenModal } from \"./components/modals/AccountFrozenModal\";\nexport { default as AccountDeletionWarningModal } from \"./components/modals/AccountDeletionWarningModal\";\nexport { default as RequiredBillingDataModal } from \"./components/modals/billing/RequiredBillingDataModal\";\nexport { BillingDataForm } from \"./components/modals/billing/BillingDataForm\";\nexport type { BillingDataFormProps } from \"./components/modals/billing/BillingDataForm\";\nexport { default as AddCardModal } from \"./components/modals/cards/AddCardModal\";\nexport { DeleteCardModal } from \"./components/modals/cards/DeleteCardModal\";\nexport { CannotDeleteCardModal } from \"./components/modals/cards/CannotDeleteCardModal\";\nexport {\n CardFormFields,\n cardFormSchema,\n buildCardFormSchema,\n} from \"./components/modals/cards/CardFormFields\";\nexport type { CardFormData } from \"./components/modals/cards/CardFormFields\";\nexport { Skeleton } from \"./components/ui/feedback/Skeleton\";\nexport { SegmentedControl } from \"./components/ui/form/SegmentedControl\";\nexport { PaymentInfoCard } from \"./components/ui/data-display/PaymentInfoCard\";\nexport { CardBrandIcon } from \"./components/ui/data-display/CardBrandIcons\";\nexport { GoogleIcon } from \"./components/ui/data-display/GoogleIcon\";\nexport { CardItem } from \"./components/ui/data-display/CardItem\";\n\n// Providers\nexport { QueryProvider } from \"./providers/query.provider\";\n\n// Middleware\nexport { createAuthMiddleware } from \"./middlewares/create-auth-middleware\";\nexport { createMiddlewareChain } from \"./middlewares/chain\";\nexport { continueChain, stopChain } from \"./middlewares/types\";\nexport type {\n MiddlewareFunction,\n MiddlewareConfig,\n MiddlewareResult,\n} from \"./middlewares/types\";\n\n// Utils\nexport { cn } from \"./infra/utils/clsx\";\nexport { formatShortDate, formatDateTime, calendarDateSchema, toCalendarDate, daysBetween } from \"./infra/utils/date\";\nexport { buildQueryParams } from \"./infra/utils/params\";\nexport { parseSchema, parseResult } from \"./infra/utils/parser\";\nexport { withAction } from \"./utils/withAction\";\nexport { resolveSafeRedirect, sameHostOr, isSameSiteUrl } from \"./utils/redirect\";\nexport { COUNTRIES, flagUrl } from \"./utils/countries\";\nexport type { Country } from \"./utils/countries\";\n\n// Layout\nexport {\n MainLayout,\n MainLayoutContent,\n MainLayoutSpacer,\n MainLayoutMain,\n} from \"./components/layouts/MainLayout\";\nexport { NavBar } from \"./components/layouts/NavBar\";\nexport type { NavBarProps } from \"./components/layouts/NavBar\";\nexport { AppNavBar } from \"./components/layouts/AppNavBar\";\nexport type { AppNavBarProps } from \"./components/layouts/AppNavBar\";\nexport { AppMobileNavBar } from \"./components/layouts/AppMobileNavBar\";\nexport type { AppMobileNavBarProps } from \"./components/layouts/AppMobileNavBar\";\nexport { SideBarNavigation } from \"./components/layouts/SideBarNavigation\";\nexport { MdSideBarNavigation } from \"./components/layouts/MdSideBarNavigation\";\nexport { default as NotificationCard } from \"./components/widgets/notifications/NotificationCard\";\nexport type { NotificationCardProps } from \"./components/widgets/notifications/NotificationCard\";\nexport { NotificationsPopover } from \"./components/layouts/NotificationsPopover\";\nexport type { NotificationsPopoverProps } from \"./components/layouts/NotificationsPopover\";\nexport { NotificationPageContent } from \"./components/pages/notifications/Notifications\";\nexport { NotFoundPage } from \"./components/pages/NotFoundPage\";\nexport { UsersSelectorPopover } from \"./components/layouts/UsersSelectorPopover\";\nexport type { UsersSelectorPopoverProps } from \"./components/layouts/UsersSelectorPopover\";\nexport { ProfilePopover } from \"./components/layouts/ProfilePopover\";\nexport type {\n ProfilePopoverProps,\n ProfileMenuItem,\n} from \"./components/layouts/ProfilePopover\";\nexport { default as WhitelabelCodes } from \"./components/layouts/WhitelabelCodes\";\nexport { NavBarItem } from \"./components/layouts/NavBarItem\";\nexport type { NavBarItemProps } from \"./components/layouts/NavBarItem\";\n\n// Navigation\nexport { AppNavigation } from \"./components/navigation/AppNavigation\";\nexport { CancelledSubscriptionBanner } from \"./components/navigation/CancelledSubscriptionBanner\";\nexport { SubscriptionBanner } from \"./components/navigation/SubscriptionBanner\";\nexport { OverdueInvoiceBanner } from \"./components/navigation/OverdueInvoiceBanner\";\nexport { UpcomingInvoiceBanner } from \"./components/navigation/UpcomingInvoiceBanner\";\nexport { TrialBanner } from \"./components/navigation/TrialBanner\";\nexport { FrozenAccountBanner } from \"./components/navigation/FrozenAccountBanner\";\nexport { FreezeWarningBanner } from \"./components/navigation/FreezeWarningBanner\";\nexport type { NavItemConfig } from \"./components/navigation/subcomponents/NavItems\";\nexport { useMobileNavbarSheet } from \"./store/useMobileNavbarSheet\";\n\n// Auth Query Key Utilities\nexport {\n useAuthQueryKey,\n useWlQueryKey,\n useWlId,\n} from \"./hooks/useAuthQueryKey\";\n\n// Hooks\nexport { default as useCopyToClipboard } from \"./hooks/copy-to-clipboard.hook\";\n\n// UI - Buttons\nexport { Button, buttonVariants } from \"./components/ui/buttons/Button\";\nexport { CopyButton } from \"./components/ui/buttons/CopyButton\";\nexport { default as CancelButton } from \"./components/ui/buttons/CancelButton\";\n\n// UI - Data Display\nexport {\n Accordion,\n AccordionItem,\n AccordionTrigger,\n AccordionContent,\n} from \"./components/ui/data-display/Accordion\";\nexport { Badge, badgeVariants } from \"./components/ui/data-display/Badge\";\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n} from \"./components/ui/data-display/Card\";\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n} from \"./components/ui/data-display/Pagination\";\nexport { ScrollArea, ScrollBar } from \"./components/ui/data-display/ScrollArea\";\nexport { Separator } from \"./components/ui/data-display/Separator\";\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n} from \"./components/ui/data-display/Table\";\nexport {\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n} from \"./components/ui/data-display/Tabs\";\nexport { UserAvatar } from \"./components/ui/data-display/UserAvatar\";\nexport type { UserAvatarProps } from \"./components/ui/data-display/UserAvatar\";\n\n// UI - Feedback\nexport { default as CircularProgress } from \"./components/ui/feedback/CircularProgress\";\nexport { default as DefaultCircularProgress } from \"./components/ui/feedback/DefaultCircularProgress\";\nexport { Progress } from \"./components/ui/feedback/Progress\";\nexport { LoadingOverlay } from \"./components/ui/feedback/LoadingOverlay\";\nexport { useBrandLoadingIcon } from \"./hooks/useBrandLoadingIcon\";\nexport {\n Toast,\n toastVariants,\n toastIconContainerVariants,\n} from \"./components/ui/feedback/Toast\";\nexport type { ToastProps } from \"./components/ui/feedback/Toast\";\n\n// UI - Form\nexport { Calendar, CalendarDayButton } from \"./components/ui/form/Calendar\";\nexport { Checkbox } from \"./components/ui/form/Checkbox\";\nexport { DatePicker } from \"./components/ui/form/DatePicker\";\nexport { DateRangePicker } from \"./components/ui/form/DateRangePicker\";\nexport { Input } from \"./components/ui/form/Input\";\nexport {\n InputOTP,\n InputOTPGroup,\n InputOTPSlot,\n InputOTPSeparator,\n} from \"./components/ui/form/InputOtp\";\nexport { RadioGroup, RadioGroupItem } from \"./components/ui/form/RadioGroup\";\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"./components/ui/form/Select\";\nexport { Switch } from \"./components/ui/form/Switch\";\nexport { Textarea } from \"./components/ui/form/Textarea\";\n\n// UI - Overlay\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n} from \"./components/ui/overlay/Command\";\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n} from \"./components/ui/overlay/Dialog\";\nexport { DialogLayer, OverlayLayerContext, useDialogLayer, useOverlayLayer } from \"./components/ui/overlay/layers\";\nexport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n PopoverAnchor,\n} from \"./components/ui/overlay/Popover\";\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n} from \"./components/ui/overlay/Sheet\";\nexport {\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n TooltipProvider,\n} from \"./components/ui/overlay/Tooltip\";\n\n// Embeds\nexport { FrillEmbed } from \"./components/embeds/FrillEmbed\";\nexport {\n CrispEmbed,\n openCrispHelpdesk,\n hideCrisp,\n showCrisp,\n updateCrispUser,\n} from \"./components/embeds/CrispEmbed\";\nexport { EmbedWidgets } from \"./components/embeds/EmbedWidgets\";\nexport { ClarityEmbed } from \"./components/embeds/ClarityEmbed\";\n\n// Store\nexport { useMdSidebarStore } from \"./store/useMdSidebarStore\";\nexport { useDesktopSidebarStore } from \"./store/useDesktopSidebarStore\";\nexport { useModalManager } from \"./store/useModalManager\";\nexport type { ModalData } from \"./store/useModalManager\";\n\n// Enums\nexport { AccountSectionType } from \"./enums/AccountSectionType\";\nexport { WorkspaceSectionType } from \"./enums/WorkspaceSectionType\";\n\n// Hooks\nexport { default as usePasswordVisibility } from \"./hooks/usePasswordVisibility\";\nexport { default as useCountdownTimer } from \"./hooks/useCountdownTimer\";\nexport { default as useIsMobile } from \"./hooks/useIsMobile\";\nexport { useDebounce } from \"./hooks/useDebounce\";\nexport { useDomMutationGuardHit } from \"./hooks/useDomMutationGuardHit\";\nexport type { DomMutationGuardHit } from \"./hooks/useDomMutationGuardHit\";\nexport { DOM_MUTATION_GUARD_SCRIPT } from \"./utils/dom/dom-mutation-guard\";\nexport { useDebouncedEffect } from \"./hooks/useDebouncedEffect\";\nexport { useDebounceState } from \"./hooks/useDebounceState\";\n\n// Utils\nexport {\n formatPhone,\n formatTimer,\n formatFullName,\n formatCPF,\n formatCNPJ,\n formatCardNumber,\n formatPixKey,\n} from \"./utils/format/masks\";\nexport { AMBIGUOUS_PIX_KEY, normalizePixKeyForStorage } from \"./utils/validators/pix-key\";\nexport {\n formatCurrency,\n formatCurrencyNumber,\n parseCurrencyToNumber,\n getCurrencyForGateway,\n getLocaleForCurrency,\n} from \"./utils/format/currency\";\nexport type { CurrencyCode } from \"./utils/format/currency\";\nexport {\n USD_GATEWAY,\n isUsdGateway,\n isUsdAccount,\n allowedPaymentMethods,\n isPaymentMethodAllowed,\n canBuyStandaloneAiCredits,\n} from \"./utils/format/gateway\";\nexport type { AccountGatewayLike, PaymentMethodKind } from \"./utils/format/gateway\";\nexport { isValidCPF, isValidCNPJ, isValidTaxId } from \"./utils/validators/common\";\nexport { BR_STATE_OPTIONS } from \"./utils/constants/br-states\";\nexport type { TimezoneOption } from \"./modules/accounts/services/timezone.service\";\nexport {\n buildLocaleOptions,\n LANGUAGE_OPTIONS as LOCALE_LANGUAGE_OPTIONS,\n} from \"./utils/intl/locales\";\nexport type { LocaleOption } from \"./utils/intl/locales\";\nexport { copyToClipboard, readFromClipboard } from \"./utils/browser/clipboard\";\n\n// UI - Form (new widgets)\nexport { FormField } from \"./components/ui/form/FormField\";\nexport { SelectField } from \"./components/ui/form/SelectField\";\nexport { ComboboxField } from \"./components/ui/form/ComboboxField\";\nexport type { ComboboxOption } from \"./components/ui/form/ComboboxField\";\nexport { default as PhoneInput } from \"./components/ui/form/PhoneInput\";\nexport { default as SwitchOptionFieldWithIcon } from \"./components/ui/form/SwitchOptionFieldWithIcon\";\nexport { TextAreaField } from \"./components/ui/form/TextAreaField\";\n\n// Account Module - Hooks\nexport {\n useCurrentAccount,\n ACCOUNT_QUERY_KEY,\n} from \"./modules/accounts/hooks/current-account.hook\";\nexport { useCurrencyFormatter } from \"./modules/accounts/hooks/use-currency-formatter.hook\";\nexport {\n useUpdateAccount,\n useUpdateAccountUser,\n useUpdateAccountUserById,\n useUpdateBillingData,\n useDeleteAccountUser,\n useDeleteAccount,\n ACCOUNT_USERS_QUERY_KEY,\n} from \"./modules/accounts/hooks/useAccountManagement\";\nexport { useAccountMembers } from \"./modules/accounts/hooks/use-account-members.hook\";\nexport { useCreateAccountUser } from \"./modules/accounts/hooks/create-account-user.hook\";\nexport { useAddUserProjects } from \"./modules/accounts/hooks/add-user-projects.hook\";\nexport { useRemoveUserProjects } from \"./modules/accounts/hooks/remove-user-projects.hook\";\nexport type { AccountMembersPage } from \"./modules/accounts/hooks/use-account-members.hook\";\nexport { useViaCep } from \"./modules/accounts/hooks/useViaCep\";\nexport { useAccountToken } from \"./modules/accounts/hooks/use-account-token.hook\";\nexport { useRequiredBillingData } from \"./modules/accounts/hooks/use-required-billing-data.hook\";\nexport {\n hasCompleteBillingData,\n isBrazilianBillingAccount,\n} from \"./modules/accounts/utils/billing-data\";\nexport type { BillingDataSnapshot } from \"./modules/accounts/utils/billing-data\";\n\n// Account Types\nexport type {\n UpdateAccountRequest,\n UpdateBillingDataRequest,\n UpdateAccountUserRequest,\n ChangePasswordRequest,\n DeleteAccountActionResult,\n DeleteUserActionResult,\n UpdateAccountActionResult,\n UpdateUserActionResult,\n TwoFactorGenerateResult,\n TwoFactorActionResult,\n ContactResetResult,\n} from \"./modules/accounts/types\";\n\nexport { default as AccountModals } from \"./components/account/AccountModals\";\nexport { useAccountModals } from \"./store/useAccountModals\";\nexport type { AccountModalsConfig, MyAccountSection } from \"./store/useAccountModals\";\nexport { useProjectFlows } from \"./store/useProjectFlows\";\nexport type { ProjectSheetState } from \"./store/useProjectFlows\";\nexport { useAffiliateFlows } from \"./store/useAffiliateFlows\";\nexport { useTeamFlows } from \"./store/useTeamFlows\";\nexport type { UserSheetState } from \"./store/useTeamFlows\";\nexport type {\n WorkspaceActions,\n SubscriptionActions,\n ProjectsActions,\n TeamActions,\n AffiliatesActions,\n} from \"./components/account/types/workspace-actions.type\";\n\n// Account Hub deep link\nexport { AccountHubFlow } from \"./enums/AccountHubFlow\";\nexport {\n ACCOUNT_HUB_SECTION_PARAM,\n ACCOUNT_HUB_FLOW_PARAM,\n ACCOUNT_HUB_COUPON_PARAM,\n ACCOUNT_HUB_PLAN_PARAM,\n ACCOUNT_HUB_TOTAL_PARAM,\n ACCOUNT_HUB_PERIOD_PARAM,\n ACCOUNT_HUB_CHARGE_PARAM,\n} from \"./modules/accounts/constants/account-hub-link.constants\";\nexport { LEGACY_ACCOUNT_ROUTES } from \"./modules/accounts/constants/legacy-account-routes.constants\";\nexport type { AccountHubLink, AccountHubPurchase, LegacyAccountRouteTarget } from \"./modules/accounts/types/account-hub-link.type\";\nexport { parseAccountHubLink } from \"./modules/accounts/utils/parse-account-hub-link\";\nexport { buildAccountHubUrl } from \"./modules/accounts/utils/build-account-hub-url\";\nexport { mapLegacyAccountRoute } from \"./modules/accounts/utils/map-legacy-account-route\";\nexport { default as useAccountHubActions } from \"./components/account/hooks/useAccountHubActions\";\n\nexport { ModalManager } from \"./components/modals/ModalManager\";\nexport { Modals } from \"./components/modals/Modals\";\n\nexport { default as TwoFactorAuthModal } from \"./components/account/TwoFactorAuthModal\";\nexport { default as DisableTwoFactorAuthModal } from \"./components/account/DisableTwoFactorAuthModal\";\nexport { default as ConfirmGlobalPreferencesModal } from \"./components/account/ConfirmGlobalPreferencesModal\";\nexport { MyProfileSection } from \"./components/account/sections/MyProfileSection\";\nexport { PreferencesSection } from \"./components/account/sections/PreferencesSection\";\nexport { SecuritySection } from \"./components/account/sections/SecuritySection\";\nexport { SubscriptionSection } from \"./components/account/sections/SubscriptionSection\";\nexport { ProjectsSection } from \"./components/account/sections/ProjectsSection\";\nexport { TeamSection } from \"./components/account/sections/TeamSection\";\nexport { AffiliatesSection } from \"./components/account/sections/AffiliatesSection\";\nexport { ChangePasswordSection } from \"./components/account/sections/ChangePasswordSection\";\nexport { ChangeEmailModal } from \"./components/account/sections/ChangeEmailModal\";\nexport { ChangePhoneModal } from \"./components/account/sections/ChangePhoneModal\";\n\n// Account Constants\nexport {\n GENDER_OPTIONS,\n CURRENCY_OPTIONS,\n TIME_FORMAT_OPTIONS,\n NOTIFICATION_TYPES,\n LANGUAGE_OPTIONS,\n} from \"./components/account/constants\";\n\n// Image Upload\nexport {\n ImageUpload,\n ImageCropModal,\n ImageTooSmallModal,\n} from \"./components/widgets/ImageUpload\";\nexport {\n useImageUpload,\n type ImageTooSmallError,\n} from \"./modules/images/hooks/use-image-upload.hook\";\nexport {\n ACCEPTED_IMAGE_FORMATS,\n ACCEPTED_IMAGE_FORMATS_STRING,\n MAX_FILE_SIZE_MB,\n} from \"./modules/images/constants/image.constants\";\nexport type {\n ImageConfig,\n CropArea,\n ProcessedImage,\n CompressImageOptions,\n} from \"./modules/images/types/image.type\";\nexport { compressImage } from \"./modules/images/utils/compress-image\";\nexport { cropImageToCanvas } from \"./modules/images/utils/crop-image\";\nexport { base64ToFile, fileToBase64 } from \"./modules/images/utils/base64\";\nexport {\n validateImage,\n validateImageFormat,\n validateImageSize,\n getImageDimensions,\n} from \"./modules/images/utils/validate-image\";\n"],"mappings":"AACA,cAAc;AACd,cAAc;AACd,SAAS,mBAAmB;AAC5B,cAAc;AAEd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAGP,SAAS,iBAAiB;AAE1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AACnC,SAAS,6BAA6B;AAYtC,SAAS,qBAAqB;AAE9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gCAAgC;AAEzC,SAAS,4BAA4B;AACrC,SAAS,iCAAiC;AAC1C,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AACjC;AAAA,EACE;AAAA,EACA;AAAA,EAC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S,uBAAuB;AAEhC,SAAS,yBAAyB;AAClC,SAAS,oBAAoB;AAW7B,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,6BAA6B;AAEtC,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AACnC,SAAS,6BAA6B;AACtC,SAAoB,WAAXA,iBAAuC;AAEhD,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AAEvB,SAAoB,WAAXA,iBAAqC;AAC9C,SAAoB,WAAXA,iBAA4C;AACrD,SAAoB,WAAXA,iBAAgD;AACzD,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AACnC,SAAS,uBAAuB;AAChC,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AAGjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAAC;AAAA,OACK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOP,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,cAAc,oBAAoB;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":["default","LANGUAGE_OPTIONS"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Types\nexport * from \"./modules/auth/schema\";\nexport * from \"./modules/users/schema\";\nexport { UserProfile } from \"./modules/users/schema\";\nexport * from \"./modules/whitelabel/schema\";\n// Style types now come from whitelabel schema directly\nexport * from \"./infra/api/types\";\n\n// Contexts\nexport * from \"./providers/query.provider\";\nexport * from \"./providers/auth.provider\";\nexport * from \"./providers/whitelabel.provider\";\nexport {\n NavigationProvider,\n useNavigationFallback,\n} from \"./providers/navigation.provider\";\n\n// Navigation (safe drop-in replacement for next/navigation)\nexport { useRouter } from \"./hooks/useRouter\";\nexport type { SafeAppRouter } from \"./hooks/useRouter\";\nexport {\n usePathname,\n useSearchParams,\n useParams,\n redirect,\n notFound,\n} from \"./utils/next-navigation\";\n\n// Hooks\nexport {\n useListProjectUsers,\n LIST_PROJECT_USERS_QUERY_KEY,\n LIST_PROJECT_USERS_BASE_KEY,\n} from \"./modules/projects/hooks/list-project-users.hook\";\nexport {\n useListAvailableUsers,\n LIST_AVAILABLE_USERS_QUERY_KEY,\n LIST_AVAILABLE_USERS_BASE_KEY,\n} from \"./modules/projects/hooks/list-available-users.hook\";\nexport {\n useListAllAccountUsers,\n LIST_ALL_ACCOUNT_USERS_QUERY_KEY,\n LIST_ALL_ACCOUNT_USERS_BASE_KEY,\n} from \"./modules/projects/hooks/list-all-account-users.hook\";\nexport {\n useProjects,\n PROJECTS_BASE_KEY,\n PROJECTS_QUERY_KEY,\n} from \"./modules/projects/hooks/list-projects.hook\";\nexport {\n useInfiniteProjects,\n INFINITE_PROJECTS_QUERY_KEY,\n} from \"./modules/projects/hooks/list-infinite-projects.hook\";\nexport { useProject } from \"./modules/projects/hooks/find-project.hook\";\nexport { useCreateProject } from \"./modules/projects/hooks/create-project.hook\";\nexport { useUpdateProject } from \"./modules/projects/hooks/update-project.hook\";\nexport { useDeleteProject } from \"./modules/projects/hooks/delete-project.hook\";\nexport { useAddProjectUsers } from \"./modules/projects/hooks/add-project-users.hook\";\nexport { useRemoveProjectUsers } from \"./modules/projects/hooks/remove-project-users.hook\";\nexport type {\n Project,\n ProjectsPage,\n CreateProjectRequest,\n UpdateProjectRequest,\n ProjectUser,\n AccountUser,\n AddRemoveProjectUsersParams,\n ListUsersParams,\n UsersPage,\n} from \"./modules/projects/types\";\nexport { ProjectSchema } from \"./modules/projects/types\";\nexport type { ListProjectsActionParams } from \"./modules/projects/actions/list-projects.action\";\nexport {\n useUserQuery,\n useUserValidateSession,\n useInvalidateUser,\n useSetUserData,\n useTwoFactorVerify,\n USER_QUERY_KEY,\n} from \"./modules/auth/hooks/useUserQuery\";\nexport { useManagementPermissions } from \"./modules/auth/hooks/useManagementPermissions\";\nexport type { ManagementPermission } from \"./modules/auth/types/management-permission.type\";\nexport { useSocialGoogleLogin } from \"./modules/auth/hooks/social-google-login.hook\";\nexport { useSocialGoogleOnboarding } from \"./modules/auth/hooks/social-google-onboarding.hook\";\nexport { useUnlinkGoogle } from \"./modules/auth/hooks/unlink-google.hook\";\nexport { useSubscriptions } from \"./modules/subscriptions/hooks/list-subscriptions.hook\";\nexport {\n SUBSCRIPTIONS_QUERY_KEY,\n CHARGES_QUERY_KEY,\n FREEZE_NOTICE_QUERY_KEY,\n} from \"./modules/subscriptions/constants/query-keys.constants\";\nexport { useCurrentSubscription } from \"./modules/subscriptions/hooks/use-current-subscription.hook\";\n/** @deprecated Use `useCurrentSubscription`. Sai na 1.1.784. */\nexport { useActiveSubscription } from \"./modules/subscriptions/hooks/find-active-subscription.hook\";\nexport { useCancelledSubscriptionGuard } from \"./modules/subscriptions/hooks/use-cancelled-subscription-guard\";\nexport { useAccountFreeze } from \"./modules/subscriptions/hooks/use-account-freeze.hook\";\nexport { useFreezeNotice } from \"./modules/subscriptions/hooks/use-freeze-notice.hook\";\nexport { usePlanById } from \"./modules/plans/hooks/use-plan-by-id.hook\";\nexport { useHasPlanAddon } from \"./modules/plans/hooks/use-has-plan-addon.hook\";\nexport { useCalculateSubscription } from \"./modules/subscriptions/hooks/calculate-subscription.hook\";\nexport { useUpdateSubscriptionPlan } from \"./modules/subscriptions/hooks/update-subscription-plan.hook\";\nexport { useUpdateSubscriptionPayment } from \"./modules/subscriptions/hooks/update-subscription-payment.hook\";\nexport { useCancelSubscription } from \"./modules/subscriptions/hooks/cancel-subscription.hook\";\nexport { useCreateSubscription } from \"./modules/subscriptions/hooks/create-subscription.hook\";\nexport { useSubscriptionById } from \"./modules/subscriptions/hooks/find-subscription-by-id.hook\";\nexport { usePendingPixStatus } from \"./modules/subscriptions/hooks/pending-pix-status.hook\";\nexport { useIaCreditOperations } from \"./modules/ia-credits/hooks/ia-credit-operations.hook\";\nexport { useCards, CARDS_QUERY_KEY } from \"./modules/cards/hooks/cards.hook\";\nexport { useCardById } from \"./modules/cards/hooks/card-by-id.hook\";\nexport { useCreateCard } from \"./modules/cards/hooks/create-card.hook\";\nexport { useCreateSetupIntent } from \"./modules/cards/hooks/create-setup-intent.hook\";\nexport { useSetDefaultCard } from \"./modules/cards/hooks/set-default-card.hook\";\nexport { useDeleteCard } from \"./modules/cards/hooks/delete-card.hook\";\nexport { useDeleteConfirmation } from \"./modules/cards/hooks/delete-confirmation.hook\";\nexport type { DeleteConfirmationFormData } from \"./modules/cards/hooks/delete-confirmation.hook\";\nexport { useHandleDeleteCard } from \"./modules/cards/hooks/handle-delete-card.hook\";\nexport { useCharges } from \"./modules/charges/hooks/charges.hook\";\nexport { useChargeById } from \"./modules/charges/hooks/charge-by-id.hook\";\nexport { useChargeAction } from \"./modules/charges/hooks/charge-action.hook\";\nexport { useNotaFiscal } from \"./modules/charges/hooks/nota-fiscal.hook\";\nexport { useRefreshChargePix } from \"./modules/charges/hooks/refresh-pix.hook\";\nexport { useIaCredits } from \"./modules/ia-credits/hooks/ia-credits.hook\";\nexport type {\n IaCreditsSummary,\n IaCreditsSummaryData,\n IaCreditAddBatch,\n IaCreditOperation,\n} from \"./modules/ia-credits/types\";\nexport { usePurchaseIaCredits } from \"./modules/ia-credits/hooks/purchase-ia-credits.hook\";\nexport { useAiCreditsOfferEligibility } from \"./modules/ia-credits/hooks/use-offer-eligibility.hook\";\nexport {\n AI_CREDITS_FIRST_PURCHASE_OFFER,\n AI_CREDITS_OFFER_ELIGIBILITY_QUERY_KEY,\n AI_CREDITS_OFFER_MAX_REPEATS,\n AiCreditsOfferStage,\n PAYMENT_METHOD_CARD,\n PAYMENT_METHOD_PIX,\n} from \"./modules/ia-credits/constants/ai-credits-offer.constants\";\nexport type {\n AiCreditsOfferEligibility,\n AiCreditsOfferEligibilityResponse,\n AiCreditsOfferIneligibilityReason,\n PurchaseIaCreditsInput,\n PurchaseIaCreditsResult,\n} from \"./modules/ia-credits/types/ai-credits-offer.type\";\nexport {\n readOfferStageCookie,\n writeOfferStageCookie,\n} from \"./modules/ia-credits/utils/offer-stage-cookie\";\nexport type { OfferStageRecord } from \"./modules/ia-credits/utils/offer-stage-cookie\";\nexport type {\n Subscription,\n SubscriptionItem,\n FindSubscriptionsParams,\n ChargeNowResult,\n} from \"./modules/subscriptions/types/subscription.type\";\nexport {\n SubscriptionSchema,\n SubscriptionItemSchema,\n} from \"./modules/subscriptions/types/subscription.type\";\nexport {\n ADDON_IDS,\n aiCreditUnitPrice,\n AI_CREDIT_SIZES,\n AI_CREDIT_VALUES,\n buildAiCreditOptions,\n resolveAiCreditPrice,\n} from \"./modules/subscriptions/constants/addons.constants\";\nexport type {\n AddonKindEnum,\n AiCreditOption,\n} from \"./modules/subscriptions/constants/addons.constants\";\nexport type {\n Plan,\n PlanItem,\n UiPlan,\n PlanFeature,\n PlanMainFeatures,\n PlanPricingByPeriod,\n PlanTooltips,\n} from \"./modules/plans/types/plan.type\";\nexport { PlanSchema, PlanItemSchema } from \"./modules/plans/types/plan.type\";\nexport {\n mapApiPlanToUiPlan,\n mapApiPlanToUiPlanForCurrency,\n} from \"./modules/plans/utils/map-api-plan-to-ui\";\nexport type { PlanBillingPeriod } from \"./modules/plans/utils/map-api-plan-to-ui\";\nexport {\n usePlans,\n PLANS_QUERY_KEY,\n} from \"./modules/plans/hooks/list-plans.hook\";\nexport { useUiPlans } from \"./modules/plans/hooks/use-ui-plans.hook\";\nexport { useEnrichedPlans } from \"./modules/plans/hooks/use-enriched-plans.hook\";\nexport {\n getPlanTooltips,\n HIDDEN_PLAN_IDS,\n} from \"./modules/plans/constants/plan-tooltips.constants\";\nexport type { BillingPeriod } from \"./modules/subscriptions/types/billing-period.type\";\nexport type {\n CalculateSubscriptionRequest,\n CalculateSubscriptionResponse,\n UpdateSubscriptionPlanRequest,\n} from \"./modules/subscriptions/types/calculate-subscription.type\";\nexport {\n PixPendingDataSchema,\n SubscriptionPendingPixResponseSchema,\n isSubscriptionPendingPixResponse,\n} from \"./modules/subscriptions/types/pix-pending.type\";\nexport type {\n PixPendingData,\n SubscriptionPendingPixResponse,\n} from \"./modules/subscriptions/types/pix-pending.type\";\nexport type {\n Card as PaymentCard,\n CreateCardRequest,\n FindCardsParams,\n SetupIntent,\n} from \"./modules/cards/types\";\nexport {\n CardSchema as PaymentCardSchema,\n CreateCardRequestSchema,\n FindCardsParamsSchema,\n SetupIntentSchema,\n} from \"./modules/cards/types\";\nexport type {\n Charge,\n FindChargesParams,\n PayChargeInput,\n} from \"./modules/charges/types/charge.type\";\nexport {\n ChargeSchema,\n FindChargesParamsSchema,\n PayChargeInputSchema,\n} from \"./modules/charges/types/charge.type\";\nexport { buildPlanExtras } from \"./modules/subscriptions/utils/build-plan-extras\";\nexport { hasSubscriptionExpired } from \"./modules/subscriptions/utils/has-subscription-expired\";\nexport { hasActivePaidSubscription } from \"./modules/subscriptions/utils/has-active-paid-subscription\";\nexport { hasPaidSubscription } from \"./modules/subscriptions/utils/has-paid-subscription\";\nexport {\n confirmPaymentIfRequired,\n PaymentAuthenticationError,\n} from \"./modules/subscriptions/utils/confirm-payment-if-required\";\nexport {\n SUBSCRIPTION_GRACE_PERIOD_DAYS,\n FREE_PLAN_ID,\n} from \"./modules/subscriptions/constants/subscription.constants\";\nexport { groupSubscriptionsByProduct } from \"./modules/subscriptions/utils/group-subscriptions-by-product\";\nexport { getSubscriptionCancellationState } from \"./modules/subscriptions/utils/get-subscription-cancellation-state\";\nexport type { SubscriptionCancellationState } from \"./modules/subscriptions/utils/get-subscription-cancellation-state\";\nexport {\n ACCOUNT_FREEZE_AFTER_DAYS,\n FREEZE_WARNING_DAYS_BEFORE,\n} from \"./modules/subscriptions/constants/subscription.constants\";\nexport { getAccountFreezeState } from \"./modules/subscriptions/utils/get-account-freeze-state\";\nexport type { AccountFreezeState } from \"./modules/subscriptions/utils/get-account-freeze-state\";\nexport { getAccountFreezeDate } from \"./modules/subscriptions/utils/get-account-freeze-date\";\nexport type { FreezeNotice } from \"./modules/subscriptions/types/freeze-notice.type\";\nexport {\n useCountPages,\n COUNT_PAGES_QUERY_KEY,\n} from \"./modules/pages/hooks/count-pages.hook\";\nexport { PAGES_QUERY_KEY } from \"./modules/pages/constants/query-keys.constants\";\nexport {\n getPriceFromCalculatedData,\n getOriginalPriceFromCalculatedData,\n periodicityToBillingPeriod,\n getPlanBadgePercents,\n getCatalogBadgePercents,\n USD_CATALOG_MAX_ANNUAL_DISCOUNT_PERCENT,\n} from \"./modules/subscriptions/utils/periodicity\";\nexport { useBuyCreditsModal } from \"./store/useBuyCreditsModal\";\nexport { useCreditsDisabledModal } from \"./store/useCreditsDisabledModal\";\nexport { usePaidPlanRequiredModal } from \"./store/usePaidPlanRequiredModal\";\nexport { useAccountDeletionWarningModal } from \"./store/useAccountDeletionWarningModal\";\nexport { useAiCreditsOfferModal } from \"./store/useAiCreditsOfferModal\";\nexport { default as BuyCreditsModal } from \"./components/modals/BuyCreditsModal\";\nexport { default as AiCreditsOfferModal } from \"./components/modals/promo/AiCreditsOfferModal\";\nexport { AiCreditsOfferGate } from \"./components/layouts/AiCreditsOfferGate\";\nexport type { AiCreditsOfferGateProps } from \"./components/layouts/AiCreditsOfferGate\";\nexport { default as CreditsDisabledModal } from \"./components/modals/CreditsDisabledModal\";\nexport { default as PaidPlanRequiredModal } from \"./components/modals/PaidPlanRequiredModal\";\nexport { default as AccountFrozenModal } from \"./components/modals/AccountFrozenModal\";\nexport { default as AccountDeletionWarningModal } from \"./components/modals/AccountDeletionWarningModal\";\nexport { default as RequiredBillingDataModal } from \"./components/modals/billing/RequiredBillingDataModal\";\nexport { BillingDataForm } from \"./components/modals/billing/BillingDataForm\";\nexport type { BillingDataFormProps } from \"./components/modals/billing/BillingDataForm\";\nexport { default as AddCardModal } from \"./components/modals/cards/AddCardModal\";\nexport { DeleteCardModal } from \"./components/modals/cards/DeleteCardModal\";\nexport { CannotDeleteCardModal } from \"./components/modals/cards/CannotDeleteCardModal\";\nexport {\n CardFormFields,\n cardFormSchema,\n buildCardFormSchema,\n} from \"./components/modals/cards/CardFormFields\";\nexport type { CardFormData } from \"./components/modals/cards/CardFormFields\";\nexport { Skeleton } from \"./components/ui/feedback/Skeleton\";\nexport { SegmentedControl } from \"./components/ui/form/SegmentedControl\";\nexport { PaymentInfoCard } from \"./components/ui/data-display/PaymentInfoCard\";\nexport { CardBrandIcon } from \"./components/ui/data-display/CardBrandIcons\";\nexport { GoogleIcon } from \"./components/ui/data-display/GoogleIcon\";\nexport { CardItem } from \"./components/ui/data-display/CardItem\";\n\n// Providers\nexport { QueryProvider } from \"./providers/query.provider\";\n\n// Middleware\nexport { createAuthMiddleware } from \"./middlewares/create-auth-middleware\";\nexport { createMiddlewareChain } from \"./middlewares/chain\";\nexport { continueChain, stopChain } from \"./middlewares/types\";\nexport type {\n MiddlewareFunction,\n MiddlewareConfig,\n MiddlewareResult,\n} from \"./middlewares/types\";\n\n// Utils\nexport { cn } from \"./infra/utils/clsx\";\nexport { formatShortDate, formatDateTime, calendarDateSchema, toCalendarDate, daysBetween } from \"./infra/utils/date\";\nexport { buildQueryParams } from \"./infra/utils/params\";\nexport { parseSchema, parseResult } from \"./infra/utils/parser\";\nexport { withAction } from \"./utils/withAction\";\nexport { resolveSafeRedirect, sameHostOr, isSameSiteUrl } from \"./utils/redirect\";\nexport { COUNTRIES, flagUrl } from \"./utils/countries\";\nexport type { Country } from \"./utils/countries\";\n\n// Layout\nexport {\n MainLayout,\n MainLayoutContent,\n MainLayoutSpacer,\n MainLayoutMain,\n} from \"./components/layouts/MainLayout\";\nexport { NavBar } from \"./components/layouts/NavBar\";\nexport type { NavBarProps } from \"./components/layouts/NavBar\";\nexport { AppNavBar } from \"./components/layouts/AppNavBar\";\nexport type { AppNavBarProps } from \"./components/layouts/AppNavBar\";\nexport { AppMobileNavBar } from \"./components/layouts/AppMobileNavBar\";\nexport type { AppMobileNavBarProps } from \"./components/layouts/AppMobileNavBar\";\nexport { SideBarNavigation } from \"./components/layouts/SideBarNavigation\";\nexport { MdSideBarNavigation } from \"./components/layouts/MdSideBarNavigation\";\nexport { default as NotificationCard } from \"./components/widgets/notifications/NotificationCard\";\nexport type { NotificationCardProps } from \"./components/widgets/notifications/NotificationCard\";\nexport { NotificationsPopover } from \"./components/layouts/NotificationsPopover\";\nexport type { NotificationsPopoverProps } from \"./components/layouts/NotificationsPopover\";\nexport { NotificationPageContent } from \"./components/pages/notifications/Notifications\";\nexport { NotFoundPage } from \"./components/pages/NotFoundPage\";\nexport { UsersSelectorPopover } from \"./components/layouts/UsersSelectorPopover\";\nexport type { UsersSelectorPopoverProps } from \"./components/layouts/UsersSelectorPopover\";\nexport { ProfilePopover } from \"./components/layouts/ProfilePopover\";\nexport type {\n ProfilePopoverProps,\n ProfileMenuItem,\n} from \"./components/layouts/ProfilePopover\";\nexport { default as WhitelabelCodes } from \"./components/layouts/WhitelabelCodes\";\nexport { NavBarItem } from \"./components/layouts/NavBarItem\";\nexport type { NavBarItemProps } from \"./components/layouts/NavBarItem\";\n\n// Navigation\nexport { AppNavigation } from \"./components/navigation/AppNavigation\";\nexport { CancelledSubscriptionBanner } from \"./components/navigation/CancelledSubscriptionBanner\";\nexport { SubscriptionBanner } from \"./components/navigation/SubscriptionBanner\";\nexport { OverdueInvoiceBanner } from \"./components/navigation/OverdueInvoiceBanner\";\nexport { UpcomingInvoiceBanner } from \"./components/navigation/UpcomingInvoiceBanner\";\nexport { TrialBanner } from \"./components/navigation/TrialBanner\";\nexport { FrozenAccountBanner } from \"./components/navigation/FrozenAccountBanner\";\nexport { FreezeWarningBanner } from \"./components/navigation/FreezeWarningBanner\";\nexport type { NavItemConfig } from \"./components/navigation/subcomponents/NavItems\";\nexport { useMobileNavbarSheet } from \"./store/useMobileNavbarSheet\";\n\n// Auth Query Key Utilities\nexport {\n useAuthQueryKey,\n useWlQueryKey,\n useWlId,\n} from \"./hooks/useAuthQueryKey\";\n\n// Hooks\nexport { default as useCopyToClipboard } from \"./hooks/copy-to-clipboard.hook\";\n\n// UI - Buttons\nexport { Button, buttonVariants } from \"./components/ui/buttons/Button\";\nexport { CopyButton } from \"./components/ui/buttons/CopyButton\";\nexport { default as CancelButton } from \"./components/ui/buttons/CancelButton\";\n\n// UI - Data Display\nexport {\n Accordion,\n AccordionItem,\n AccordionTrigger,\n AccordionContent,\n} from \"./components/ui/data-display/Accordion\";\nexport { Badge, badgeVariants } from \"./components/ui/data-display/Badge\";\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n} from \"./components/ui/data-display/Card\";\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n} from \"./components/ui/data-display/Pagination\";\nexport { ScrollArea, ScrollBar } from \"./components/ui/data-display/ScrollArea\";\nexport { Separator } from \"./components/ui/data-display/Separator\";\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n} from \"./components/ui/data-display/Table\";\nexport {\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n} from \"./components/ui/data-display/Tabs\";\nexport { UserAvatar } from \"./components/ui/data-display/UserAvatar\";\nexport type { UserAvatarProps } from \"./components/ui/data-display/UserAvatar\";\n\n// UI - Feedback\nexport { default as CircularProgress } from \"./components/ui/feedback/CircularProgress\";\nexport { default as DefaultCircularProgress } from \"./components/ui/feedback/DefaultCircularProgress\";\nexport { Progress } from \"./components/ui/feedback/Progress\";\nexport { LoadingOverlay } from \"./components/ui/feedback/LoadingOverlay\";\nexport { useBrandLoadingIcon } from \"./hooks/useBrandLoadingIcon\";\nexport {\n Toast,\n toastVariants,\n toastIconContainerVariants,\n} from \"./components/ui/feedback/Toast\";\nexport type { ToastProps } from \"./components/ui/feedback/Toast\";\n\n// UI - Form\nexport { Calendar, CalendarDayButton } from \"./components/ui/form/Calendar\";\nexport { Checkbox } from \"./components/ui/form/Checkbox\";\nexport { DatePicker } from \"./components/ui/form/DatePicker\";\nexport { DateRangePicker } from \"./components/ui/form/DateRangePicker\";\nexport { Input } from \"./components/ui/form/Input\";\nexport {\n InputOTP,\n InputOTPGroup,\n InputOTPSlot,\n InputOTPSeparator,\n} from \"./components/ui/form/InputOtp\";\nexport { RadioGroup, RadioGroupItem } from \"./components/ui/form/RadioGroup\";\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"./components/ui/form/Select\";\nexport { Switch } from \"./components/ui/form/Switch\";\nexport { Textarea } from \"./components/ui/form/Textarea\";\n\n// UI - Overlay\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n} from \"./components/ui/overlay/Command\";\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n} from \"./components/ui/overlay/Dialog\";\nexport { DialogLayer, OverlayLayerContext, useDialogLayer, useOverlayLayer } from \"./components/ui/overlay/layers\";\nexport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n PopoverAnchor,\n} from \"./components/ui/overlay/Popover\";\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n} from \"./components/ui/overlay/Sheet\";\nexport {\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n TooltipProvider,\n} from \"./components/ui/overlay/Tooltip\";\n\n// Embeds\nexport { FrillEmbed } from \"./components/embeds/FrillEmbed\";\nexport {\n CrispEmbed,\n openCrispHelpdesk,\n hideCrisp,\n showCrisp,\n updateCrispUser,\n} from \"./components/embeds/CrispEmbed\";\nexport { EmbedWidgets } from \"./components/embeds/EmbedWidgets\";\nexport { ClarityEmbed } from \"./components/embeds/ClarityEmbed\";\n\n// Store\nexport { useMdSidebarStore } from \"./store/useMdSidebarStore\";\nexport { useDesktopSidebarStore } from \"./store/useDesktopSidebarStore\";\nexport { useModalManager } from \"./store/useModalManager\";\nexport type { ModalData } from \"./store/useModalManager\";\n\n// Enums\nexport { AccountSectionType } from \"./enums/AccountSectionType\";\nexport { WorkspaceSectionType } from \"./enums/WorkspaceSectionType\";\n\n// Hooks\nexport { default as usePasswordVisibility } from \"./hooks/usePasswordVisibility\";\nexport { default as useCountdownTimer } from \"./hooks/useCountdownTimer\";\nexport { default as useIsMobile } from \"./hooks/useIsMobile\";\nexport { useDebounce } from \"./hooks/useDebounce\";\nexport { useDomMutationGuardHit } from \"./hooks/useDomMutationGuardHit\";\nexport type { DomMutationGuardHit } from \"./hooks/useDomMutationGuardHit\";\nexport { DOM_MUTATION_GUARD_SCRIPT } from \"./utils/dom/dom-mutation-guard\";\nexport { useDebouncedEffect } from \"./hooks/useDebouncedEffect\";\nexport { useDebounceState } from \"./hooks/useDebounceState\";\n\n// Utils\nexport {\n formatPhone,\n formatTimer,\n formatFullName,\n formatCPF,\n formatCNPJ,\n formatCardNumber,\n formatPixKey,\n} from \"./utils/format/masks\";\nexport { AMBIGUOUS_PIX_KEY, isPixKeyFromAnotherDocument, normalizePixKeyForStorage } from \"./utils/validators/pix-key\";\nexport {\n formatCurrency,\n formatCurrencyNumber,\n parseCurrencyToNumber,\n getCurrencyForGateway,\n getLocaleForCurrency,\n} from \"./utils/format/currency\";\nexport type { CurrencyCode } from \"./utils/format/currency\";\nexport {\n USD_GATEWAY,\n isUsdGateway,\n isUsdAccount,\n allowedPaymentMethods,\n isPaymentMethodAllowed,\n canBuyStandaloneAiCredits,\n} from \"./utils/format/gateway\";\nexport type { AccountGatewayLike, PaymentMethodKind } from \"./utils/format/gateway\";\nexport { isValidCPF, isValidCNPJ, isValidTaxId } from \"./utils/validators/common\";\nexport { BR_STATE_OPTIONS } from \"./utils/constants/br-states\";\nexport type { TimezoneOption } from \"./modules/accounts/services/timezone.service\";\nexport {\n buildLocaleOptions,\n LANGUAGE_OPTIONS as LOCALE_LANGUAGE_OPTIONS,\n} from \"./utils/intl/locales\";\nexport type { LocaleOption } from \"./utils/intl/locales\";\nexport { copyToClipboard, readFromClipboard } from \"./utils/browser/clipboard\";\n\n// UI - Form (new widgets)\nexport { FormField } from \"./components/ui/form/FormField\";\nexport { SelectField } from \"./components/ui/form/SelectField\";\nexport { ComboboxField } from \"./components/ui/form/ComboboxField\";\nexport type { ComboboxOption } from \"./components/ui/form/ComboboxField\";\nexport { default as PhoneInput } from \"./components/ui/form/PhoneInput\";\nexport { default as SwitchOptionFieldWithIcon } from \"./components/ui/form/SwitchOptionFieldWithIcon\";\nexport { TextAreaField } from \"./components/ui/form/TextAreaField\";\n\n// Account Module - Hooks\nexport {\n useCurrentAccount,\n ACCOUNT_QUERY_KEY,\n} from \"./modules/accounts/hooks/current-account.hook\";\nexport { useCurrencyFormatter } from \"./modules/accounts/hooks/use-currency-formatter.hook\";\nexport {\n useUpdateAccount,\n useUpdateAccountUser,\n useUpdateAccountUserById,\n useUpdateBillingData,\n useDeleteAccountUser,\n useDeleteAccount,\n ACCOUNT_USERS_QUERY_KEY,\n} from \"./modules/accounts/hooks/useAccountManagement\";\nexport { useAccountMembers } from \"./modules/accounts/hooks/use-account-members.hook\";\nexport { useCreateAccountUser } from \"./modules/accounts/hooks/create-account-user.hook\";\nexport { useAddUserProjects } from \"./modules/accounts/hooks/add-user-projects.hook\";\nexport { useRemoveUserProjects } from \"./modules/accounts/hooks/remove-user-projects.hook\";\nexport type { AccountMembersPage } from \"./modules/accounts/hooks/use-account-members.hook\";\nexport { useViaCep } from \"./modules/accounts/hooks/useViaCep\";\nexport { useAccountToken } from \"./modules/accounts/hooks/use-account-token.hook\";\nexport { useRequiredBillingData } from \"./modules/accounts/hooks/use-required-billing-data.hook\";\nexport {\n hasCompleteBillingData,\n isBrazilianBillingAccount,\n} from \"./modules/accounts/utils/billing-data\";\nexport type { BillingDataSnapshot } from \"./modules/accounts/utils/billing-data\";\n\n// Account Types\nexport type {\n UpdateAccountRequest,\n UpdateBillingDataRequest,\n UpdateAccountUserRequest,\n ChangePasswordRequest,\n DeleteAccountActionResult,\n DeleteUserActionResult,\n UpdateAccountActionResult,\n UpdateUserActionResult,\n TwoFactorGenerateResult,\n TwoFactorActionResult,\n ContactResetResult,\n} from \"./modules/accounts/types\";\n\nexport { default as AccountModals } from \"./components/account/AccountModals\";\nexport { useAccountModals } from \"./store/useAccountModals\";\nexport type { AccountModalsConfig, MyAccountSection } from \"./store/useAccountModals\";\nexport { useProjectFlows } from \"./store/useProjectFlows\";\nexport type { ProjectSheetState } from \"./store/useProjectFlows\";\nexport { useAffiliateFlows } from \"./store/useAffiliateFlows\";\nexport { useTeamFlows } from \"./store/useTeamFlows\";\nexport type { UserSheetState } from \"./store/useTeamFlows\";\nexport type {\n WorkspaceActions,\n SubscriptionActions,\n ProjectsActions,\n TeamActions,\n AffiliatesActions,\n} from \"./components/account/types/workspace-actions.type\";\n\n// Account Hub deep link\nexport { AccountHubFlow } from \"./enums/AccountHubFlow\";\nexport {\n ACCOUNT_HUB_SECTION_PARAM,\n ACCOUNT_HUB_FLOW_PARAM,\n ACCOUNT_HUB_COUPON_PARAM,\n ACCOUNT_HUB_PLAN_PARAM,\n ACCOUNT_HUB_TOTAL_PARAM,\n ACCOUNT_HUB_PERIOD_PARAM,\n ACCOUNT_HUB_CHARGE_PARAM,\n} from \"./modules/accounts/constants/account-hub-link.constants\";\nexport { LEGACY_ACCOUNT_ROUTES } from \"./modules/accounts/constants/legacy-account-routes.constants\";\nexport type { AccountHubLink, AccountHubPurchase, LegacyAccountRouteTarget } from \"./modules/accounts/types/account-hub-link.type\";\nexport { parseAccountHubLink } from \"./modules/accounts/utils/parse-account-hub-link\";\nexport { buildAccountHubUrl } from \"./modules/accounts/utils/build-account-hub-url\";\nexport { mapLegacyAccountRoute } from \"./modules/accounts/utils/map-legacy-account-route\";\nexport { default as useAccountHubActions } from \"./components/account/hooks/useAccountHubActions\";\n\nexport { ModalManager } from \"./components/modals/ModalManager\";\nexport { Modals } from \"./components/modals/Modals\";\n\nexport { default as TwoFactorAuthModal } from \"./components/account/TwoFactorAuthModal\";\nexport { default as DisableTwoFactorAuthModal } from \"./components/account/DisableTwoFactorAuthModal\";\nexport { default as ConfirmGlobalPreferencesModal } from \"./components/account/ConfirmGlobalPreferencesModal\";\nexport { MyProfileSection } from \"./components/account/sections/MyProfileSection\";\nexport { PreferencesSection } from \"./components/account/sections/PreferencesSection\";\nexport { SecuritySection } from \"./components/account/sections/SecuritySection\";\nexport { SubscriptionSection } from \"./components/account/sections/SubscriptionSection\";\nexport { ProjectsSection } from \"./components/account/sections/ProjectsSection\";\nexport { TeamSection } from \"./components/account/sections/TeamSection\";\nexport { AffiliatesSection } from \"./components/account/sections/AffiliatesSection\";\nexport { ChangePasswordSection } from \"./components/account/sections/ChangePasswordSection\";\nexport { ChangeEmailModal } from \"./components/account/sections/ChangeEmailModal\";\nexport { ChangePhoneModal } from \"./components/account/sections/ChangePhoneModal\";\n\n// Account Constants\nexport {\n GENDER_OPTIONS,\n CURRENCY_OPTIONS,\n TIME_FORMAT_OPTIONS,\n NOTIFICATION_TYPES,\n LANGUAGE_OPTIONS,\n} from \"./components/account/constants\";\n\n// Image Upload\nexport {\n ImageUpload,\n ImageCropModal,\n ImageTooSmallModal,\n} from \"./components/widgets/ImageUpload\";\nexport {\n useImageUpload,\n type ImageTooSmallError,\n} from \"./modules/images/hooks/use-image-upload.hook\";\nexport {\n ACCEPTED_IMAGE_FORMATS,\n ACCEPTED_IMAGE_FORMATS_STRING,\n MAX_FILE_SIZE_MB,\n} from \"./modules/images/constants/image.constants\";\nexport type {\n ImageConfig,\n CropArea,\n ProcessedImage,\n CompressImageOptions,\n} from \"./modules/images/types/image.type\";\nexport { compressImage } from \"./modules/images/utils/compress-image\";\nexport { cropImageToCanvas } from \"./modules/images/utils/crop-image\";\nexport { base64ToFile, fileToBase64 } from \"./modules/images/utils/base64\";\nexport {\n validateImage,\n validateImageFormat,\n validateImageSize,\n getImageDimensions,\n} from \"./modules/images/utils/validate-image\";\n"],"mappings":"AACA,cAAc;AACd,cAAc;AACd,SAAS,mBAAmB;AAC5B,cAAc;AAEd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAGP,SAAS,iBAAiB;AAE1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AACnC,SAAS,6BAA6B;AAYtC,SAAS,qBAAqB;AAE9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gCAAgC;AAEzC,SAAS,4BAA4B;AACrC,SAAS,iCAAiC;AAC1C,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AACjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,8BAA8B;AAEvC,SAAS,6BAA6B;AACtC,SAAS,qCAAqC;AAC9C,SAAS,wBAAw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A,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,6BAA6B;AAEtC,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AACnC,SAAS,6BAA6B;AACtC,SAAoB,WAAXA,iBAAuC;AAEhD,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AAEvB,SAAoB,WAAXA,iBAAqC;AAC9C,SAAoB,WAAXA,iBAA4C;AACrD,SAAoB,WAAXA,iBAAgD;AACzD,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AACnC,SAAS,uBAAuB;AAChC,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AAGjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAAC;AAAA,OACK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOP,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,cAAc,oBAAoB;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":["default","LANGUAGE_OPTIONS"]}
|
|
@@ -9,6 +9,7 @@ import { createProjectMock } from "./project.factory";
|
|
|
9
9
|
import { createProjectUserMock } from "./project-user.factory";
|
|
10
10
|
import { createCouponMock } from "./coupon.factory";
|
|
11
11
|
import { createAffiliateMock } from "./affiliate.factory";
|
|
12
|
+
import { createWithdrawalLimitsMock } from "./withdrawal-limits.factory";
|
|
12
13
|
export {
|
|
13
14
|
createAccountMock,
|
|
14
15
|
createAffiliateMock,
|
|
@@ -24,6 +25,7 @@ export {
|
|
|
24
25
|
createUserMock,
|
|
25
26
|
createWhitelabelMock,
|
|
26
27
|
createWhitelabelTokenMock,
|
|
28
|
+
createWithdrawalLimitsMock,
|
|
27
29
|
resetMocks
|
|
28
30
|
};
|
|
29
31
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/testing/factories/index.ts"],"sourcesContent":["export { createMock, resetMocks } from './create-mock';\nexport { createTestJwt, type TestJwtClaims } from './jwt';\nexport { createUserMock } from './user.factory';\nexport { createAccountMock } from './account.factory';\nexport { createWhitelabelMock, createWhitelabelTokenMock } from './whitelabel.factory';\nexport { createSubscriptionMock, createSubscriptionItemMock } from './subscription.factory';\nexport { createPlanMock, createPlanItemMock } from './plan.factory';\nexport { createProjectMock } from './project.factory';\nexport { createProjectUserMock } from './project-user.factory';\nexport { createCouponMock } from './coupon.factory';\nexport { createAffiliateMock } from './affiliate.factory';\n"],"mappings":"AAAA,SAAS,YAAY,kBAAkB;AACvC,SAAS,qBAAyC;AAClD,SAAS,sBAAsB;AAC/B,SAAS,yBAAyB;AAClC,SAAS,sBAAsB,iCAAiC;AAChE,SAAS,wBAAwB,kCAAkC;AACnE,SAAS,gBAAgB,0BAA0B;AACnD,SAAS,yBAAyB;AAClC,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/testing/factories/index.ts"],"sourcesContent":["export { createMock, resetMocks } from './create-mock';\nexport { createTestJwt, type TestJwtClaims } from './jwt';\nexport { createUserMock } from './user.factory';\nexport { createAccountMock } from './account.factory';\nexport { createWhitelabelMock, createWhitelabelTokenMock } from './whitelabel.factory';\nexport { createSubscriptionMock, createSubscriptionItemMock } from './subscription.factory';\nexport { createPlanMock, createPlanItemMock } from './plan.factory';\nexport { createProjectMock } from './project.factory';\nexport { createProjectUserMock } from './project-user.factory';\nexport { createCouponMock } from './coupon.factory';\nexport { createAffiliateMock } from './affiliate.factory';\nexport { createWithdrawalLimitsMock } from './withdrawal-limits.factory';\n"],"mappings":"AAAA,SAAS,YAAY,kBAAkB;AACvC,SAAS,qBAAyC;AAClD,SAAS,sBAAsB;AAC/B,SAAS,yBAAyB;AAClC,SAAS,sBAAsB,iCAAiC;AAChE,SAAS,wBAAwB,kCAAkC;AACnE,SAAS,gBAAgB,0BAA0B;AACnD,SAAS,yBAAyB;AAClC,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AACpC,SAAS,kCAAkC;","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createMock } from "./create-mock";
|
|
2
|
+
const createWithdrawalLimitsMock = createMock((overrides) => ({
|
|
3
|
+
personType: overrides?.personType ?? "cpf",
|
|
4
|
+
financialDocumentType: overrides?.financialDocumentType ?? 1,
|
|
5
|
+
requiresInvoice: overrides?.requiresInvoice ?? false,
|
|
6
|
+
minValue: overrides?.minValue ?? 25,
|
|
7
|
+
maxValuePerMonth: overrides?.maxValuePerMonth ?? 350,
|
|
8
|
+
monthlyUsed: overrides?.monthlyUsed ?? 0,
|
|
9
|
+
monthlyRemaining: overrides?.monthlyRemaining ?? 350,
|
|
10
|
+
balance: overrides?.balance ?? 500,
|
|
11
|
+
availableToWithdraw: overrides?.availableToWithdraw ?? 350,
|
|
12
|
+
canWithdraw: overrides?.canWithdraw ?? true,
|
|
13
|
+
blockReason: overrides?.blockReason ?? null
|
|
14
|
+
}));
|
|
15
|
+
export {
|
|
16
|
+
createWithdrawalLimitsMock
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=withdrawal-limits.factory.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/testing/factories/withdrawal-limits.factory.ts"],"sourcesContent":["import type { WithdrawalLimits } from '../../modules/affiliates/types/affiliate.type';\nimport { createMock } from './create-mock';\n\nexport const createWithdrawalLimitsMock = createMock<WithdrawalLimits, Partial<WithdrawalLimits>>((overrides) => ({\n personType: overrides?.personType ?? 'cpf',\n financialDocumentType: overrides?.financialDocumentType ?? 1,\n requiresInvoice: overrides?.requiresInvoice ?? false,\n minValue: overrides?.minValue ?? 25,\n maxValuePerMonth: overrides?.maxValuePerMonth ?? 350,\n monthlyUsed: overrides?.monthlyUsed ?? 0,\n monthlyRemaining: overrides?.monthlyRemaining ?? 350,\n balance: overrides?.balance ?? 500,\n availableToWithdraw: overrides?.availableToWithdraw ?? 350,\n canWithdraw: overrides?.canWithdraw ?? true,\n blockReason: overrides?.blockReason ?? null,\n}));\n"],"mappings":"AACA,SAAS,kBAAkB;AAEpB,MAAM,6BAA6B,WAAwD,CAAC,eAAe;AAAA,EAChH,YAAY,WAAW,cAAc;AAAA,EACrC,uBAAuB,WAAW,yBAAyB;AAAA,EAC3D,iBAAiB,WAAW,mBAAmB;AAAA,EAC/C,UAAU,WAAW,YAAY;AAAA,EACjC,kBAAkB,WAAW,oBAAoB;AAAA,EACjD,aAAa,WAAW,eAAe;AAAA,EACvC,kBAAkB,WAAW,oBAAoB;AAAA,EACjD,SAAS,WAAW,WAAW;AAAA,EAC/B,qBAAqB,WAAW,uBAAuB;AAAA,EACvD,aAAa,WAAW,eAAe;AAAA,EACvC,aAAa,WAAW,eAAe;AACzC,EAAE;","names":[]}
|
|
@@ -20,8 +20,12 @@ function normalizePixKeyForStorage(value, holderDocument) {
|
|
|
20
20
|
if (isMobile) return `+55${digits}`;
|
|
21
21
|
return isCpf ? digits : null;
|
|
22
22
|
}
|
|
23
|
+
function isPixKeyFromAnotherDocument(canonicalPixKey, holderDocument) {
|
|
24
|
+
return /^\d+$/.test(canonicalPixKey) && canonicalPixKey !== holderDocument.replace(/\D/g, "");
|
|
25
|
+
}
|
|
23
26
|
export {
|
|
24
27
|
AMBIGUOUS_PIX_KEY,
|
|
28
|
+
isPixKeyFromAnotherDocument,
|
|
25
29
|
normalizePixKeyForStorage
|
|
26
30
|
};
|
|
27
31
|
//# sourceMappingURL=pix-key.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/validators/pix-key.ts"],"sourcesContent":["import { isValidCNPJ, isValidCPF, isValidEmail } from './common';\n\nconst RANDOM_KEY = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\nconst PIX_KEY_CHARS = /^[\\d ().\\/+-]+$/;\nconst MOBILE_WITH_COUNTRY_CODE = /^55[1-9]{2}9\\d{8}$/;\nconst MOBILE = /^[1-9]{2}9\\d{8}$/;\n\nexport const AMBIGUOUS_PIX_KEY = Symbol('ambiguous-pix-key');\n\nexport function normalizePixKeyForStorage(value: string, holderDocument: string): string | typeof AMBIGUOUS_PIX_KEY | null {\n const key = value.trim();\n if (isValidEmail(key) || RANDOM_KEY.test(key)) return key;\n if (!PIX_KEY_CHARS.test(key)) return null;\n const digits = key.replace(/\\D/g, '');\n if (key.startsWith('+')) return MOBILE_WITH_COUNTRY_CODE.test(digits) ? `+${digits}` : null;\n if (digits.length === 14) return isValidCNPJ(digits) ? digits : null;\n if (digits.length === 13) return MOBILE_WITH_COUNTRY_CODE.test(digits) ? `+${digits}` : null;\n if (digits.length !== 11) return null;\n if (digits === holderDocument.replace(/\\D/g, '')) return digits;\n const isMobile = MOBILE.test(digits);\n const isCpf = isValidCPF(digits);\n if (isMobile && isCpf) return AMBIGUOUS_PIX_KEY;\n if (isMobile) return `+55${digits}`;\n return isCpf ? digits : null;\n}\n"],"mappings":"AAAA,SAAS,aAAa,YAAY,oBAAoB;AAEtD,MAAM,aAAa;AACnB,MAAM,gBAAgB;AACtB,MAAM,2BAA2B;AACjC,MAAM,SAAS;AAER,MAAM,oBAAoB,uBAAO,mBAAmB;AAEpD,SAAS,0BAA0B,OAAe,gBAAkE;AACzH,QAAM,MAAM,MAAM,KAAK;AACvB,MAAI,aAAa,GAAG,KAAK,WAAW,KAAK,GAAG,EAAG,QAAO;AACtD,MAAI,CAAC,cAAc,KAAK,GAAG,EAAG,QAAO;AACrC,QAAM,SAAS,IAAI,QAAQ,OAAO,EAAE;AACpC,MAAI,IAAI,WAAW,GAAG,EAAG,QAAO,yBAAyB,KAAK,MAAM,IAAI,IAAI,MAAM,KAAK;AACvF,MAAI,OAAO,WAAW,GAAI,QAAO,YAAY,MAAM,IAAI,SAAS;AAChE,MAAI,OAAO,WAAW,GAAI,QAAO,yBAAyB,KAAK,MAAM,IAAI,IAAI,MAAM,KAAK;AACxF,MAAI,OAAO,WAAW,GAAI,QAAO;AACjC,MAAI,WAAW,eAAe,QAAQ,OAAO,EAAE,EAAG,QAAO;AACzD,QAAM,WAAW,OAAO,KAAK,MAAM;AACnC,QAAM,QAAQ,WAAW,MAAM;AAC/B,MAAI,YAAY,MAAO,QAAO;AAC9B,MAAI,SAAU,QAAO,MAAM,MAAM;AACjC,SAAO,QAAQ,SAAS;AAC1B;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/validators/pix-key.ts"],"sourcesContent":["import { isValidCNPJ, isValidCPF, isValidEmail } from './common';\n\nconst RANDOM_KEY = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\nconst PIX_KEY_CHARS = /^[\\d ().\\/+-]+$/;\nconst MOBILE_WITH_COUNTRY_CODE = /^55[1-9]{2}9\\d{8}$/;\nconst MOBILE = /^[1-9]{2}9\\d{8}$/;\n\nexport const AMBIGUOUS_PIX_KEY = Symbol('ambiguous-pix-key');\n\nexport function normalizePixKeyForStorage(value: string, holderDocument: string): string | typeof AMBIGUOUS_PIX_KEY | null {\n const key = value.trim();\n if (isValidEmail(key) || RANDOM_KEY.test(key)) return key;\n if (!PIX_KEY_CHARS.test(key)) return null;\n const digits = key.replace(/\\D/g, '');\n if (key.startsWith('+')) return MOBILE_WITH_COUNTRY_CODE.test(digits) ? `+${digits}` : null;\n if (digits.length === 14) return isValidCNPJ(digits) ? digits : null;\n if (digits.length === 13) return MOBILE_WITH_COUNTRY_CODE.test(digits) ? `+${digits}` : null;\n if (digits.length !== 11) return null;\n if (digits === holderDocument.replace(/\\D/g, '')) return digits;\n const isMobile = MOBILE.test(digits);\n const isCpf = isValidCPF(digits);\n if (isMobile && isCpf) return AMBIGUOUS_PIX_KEY;\n if (isMobile) return `+55${digits}`;\n return isCpf ? digits : null;\n}\n\nexport function isPixKeyFromAnotherDocument(canonicalPixKey: string, holderDocument: string): boolean {\n return /^\\d+$/.test(canonicalPixKey) && canonicalPixKey !== holderDocument.replace(/\\D/g, '');\n}\n"],"mappings":"AAAA,SAAS,aAAa,YAAY,oBAAoB;AAEtD,MAAM,aAAa;AACnB,MAAM,gBAAgB;AACtB,MAAM,2BAA2B;AACjC,MAAM,SAAS;AAER,MAAM,oBAAoB,uBAAO,mBAAmB;AAEpD,SAAS,0BAA0B,OAAe,gBAAkE;AACzH,QAAM,MAAM,MAAM,KAAK;AACvB,MAAI,aAAa,GAAG,KAAK,WAAW,KAAK,GAAG,EAAG,QAAO;AACtD,MAAI,CAAC,cAAc,KAAK,GAAG,EAAG,QAAO;AACrC,QAAM,SAAS,IAAI,QAAQ,OAAO,EAAE;AACpC,MAAI,IAAI,WAAW,GAAG,EAAG,QAAO,yBAAyB,KAAK,MAAM,IAAI,IAAI,MAAM,KAAK;AACvF,MAAI,OAAO,WAAW,GAAI,QAAO,YAAY,MAAM,IAAI,SAAS;AAChE,MAAI,OAAO,WAAW,GAAI,QAAO,yBAAyB,KAAK,MAAM,IAAI,IAAI,MAAM,KAAK;AACxF,MAAI,OAAO,WAAW,GAAI,QAAO;AACjC,MAAI,WAAW,eAAe,QAAQ,OAAO,EAAE,EAAG,QAAO;AACzD,QAAM,WAAW,OAAO,KAAK,MAAM;AACnC,QAAM,QAAQ,WAAW,MAAM;AAC/B,MAAI,YAAY,MAAO,QAAO;AAC9B,MAAI,SAAU,QAAO,MAAM,MAAM;AACjC,SAAO,QAAQ,SAAS;AAC1B;AAEO,SAAS,4BAA4B,iBAAyB,gBAAiC;AACpG,SAAO,QAAQ,KAAK,eAAe,KAAK,oBAAoB,eAAe,QAAQ,OAAO,EAAE;AAC9F;","names":[]}
|
package/package.json
CHANGED
|
@@ -19,7 +19,11 @@ import {
|
|
|
19
19
|
normalizeCpfCnpjForStorage,
|
|
20
20
|
} from '../../../../utils/format/masks';
|
|
21
21
|
import { isValidCNPJ, isValidCPF } from '../../../../utils/validators/common';
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
AMBIGUOUS_PIX_KEY,
|
|
24
|
+
isPixKeyFromAnotherDocument,
|
|
25
|
+
normalizePixKeyForStorage,
|
|
26
|
+
} from '../../../../utils/validators/pix-key';
|
|
23
27
|
import { useAffiliateFlows } from '../../../../store/useAffiliateFlows';
|
|
24
28
|
|
|
25
29
|
type ReceivingAccountFormData = {
|
|
@@ -92,7 +96,7 @@ export function ReceivingAccountModal() {
|
|
|
92
96
|
return;
|
|
93
97
|
}
|
|
94
98
|
|
|
95
|
-
if (typeof pix === 'string' &&
|
|
99
|
+
if (typeof pix === 'string' && isPixKeyFromAnotherDocument(pix, digits)) {
|
|
96
100
|
ctx.addIssue({
|
|
97
101
|
code: z.ZodIssueCode.custom,
|
|
98
102
|
path: ['pix'],
|
|
@@ -23,6 +23,11 @@ import {
|
|
|
23
23
|
parseCurrencyToNumber,
|
|
24
24
|
} from '../../../../utils/format/currency';
|
|
25
25
|
import { formatDocument, formatPixKey } from '../../../../utils/format/masks';
|
|
26
|
+
import {
|
|
27
|
+
AMBIGUOUS_PIX_KEY,
|
|
28
|
+
isPixKeyFromAnotherDocument,
|
|
29
|
+
normalizePixKeyForStorage,
|
|
30
|
+
} from '../../../../utils/validators/pix-key';
|
|
26
31
|
import { formatFileSize, isPDFFile } from '../../../../utils/file/index';
|
|
27
32
|
import { useUploadProgress } from '../../../../hooks/useUploadProgress';
|
|
28
33
|
import useIsMobile from '../../../../hooks/useIsMobile';
|
|
@@ -144,6 +149,12 @@ export function RequestWithdrawalSheet() {
|
|
|
144
149
|
const requiresInvoice = limits?.requiresInvoice ?? false;
|
|
145
150
|
const hasReceivingAccount = !!(affiliate?.pix && affiliate?.holder_name && affiliate?.holder_document);
|
|
146
151
|
|
|
152
|
+
const holderDocument = affiliate?.holder_document ?? '';
|
|
153
|
+
const storedPixKey = affiliate?.pix ? normalizePixKeyForStorage(affiliate.pix, holderDocument) : undefined;
|
|
154
|
+
const isPixKeyInvalid = storedPixKey === null || storedPixKey === AMBIGUOUS_PIX_KEY;
|
|
155
|
+
const isPixKeyMismatch = typeof storedPixKey === 'string' && isPixKeyFromAnotherDocument(storedPixKey, holderDocument);
|
|
156
|
+
const hasPixKeyIssue = isPixKeyInvalid || isPixKeyMismatch;
|
|
157
|
+
|
|
147
158
|
const minValueLabel = minWithdrawal.toFixed(2).replace('.', ',');
|
|
148
159
|
|
|
149
160
|
const withdrawalSchema = useMemo(
|
|
@@ -309,8 +320,13 @@ export function RequestWithdrawalSheet() {
|
|
|
309
320
|
<span className="w-40 text-zinc-950 paragraph-small-medium">
|
|
310
321
|
{translateSheet('pixKeyLabel')}
|
|
311
322
|
</span>
|
|
312
|
-
<span
|
|
313
|
-
{
|
|
323
|
+
<span
|
|
324
|
+
className={cn(
|
|
325
|
+
'w-full paragraph-small-regular truncate',
|
|
326
|
+
hasPixKeyIssue ? 'text-red-600' : 'text-zinc-600'
|
|
327
|
+
)}
|
|
328
|
+
>
|
|
329
|
+
{affiliate?.pix ? (hasPixKeyIssue ? affiliate.pix : formatPixKey(affiliate.pix)) : '—'}
|
|
314
330
|
</span>
|
|
315
331
|
</div>
|
|
316
332
|
<div className="flex items-center gap-3">
|
|
@@ -322,9 +338,24 @@ export function RequestWithdrawalSheet() {
|
|
|
322
338
|
</span>
|
|
323
339
|
</div>
|
|
324
340
|
</div>
|
|
341
|
+
{hasPixKeyIssue && (
|
|
342
|
+
<div role="alert" className="flex flex-col gap-3 rounded-lg bg-red-50 p-4">
|
|
343
|
+
<div className="flex items-start gap-3">
|
|
344
|
+
<IconAlertTriangle size={20} className="text-red-600 shrink-0 mt-0.5" />
|
|
345
|
+
<p className="paragraph-small-medium text-zinc-950">
|
|
346
|
+
{isPixKeyInvalid
|
|
347
|
+
? translateSheet('pixKeyInvalidWarning')
|
|
348
|
+
: translateSheet('pixKeyMismatchWarning')}
|
|
349
|
+
</p>
|
|
350
|
+
</div>
|
|
351
|
+
<Button className="h-10! w-fit" type="button" onClick={openReceivingAccount}>
|
|
352
|
+
{translateSheet('updateReceivingAccountButton')}
|
|
353
|
+
</Button>
|
|
354
|
+
</div>
|
|
355
|
+
)}
|
|
325
356
|
</div>
|
|
326
357
|
|
|
327
|
-
{limits && !limits.canWithdraw ? (
|
|
358
|
+
{limits && !limits.canWithdraw && !hasPixKeyIssue ? (
|
|
328
359
|
<div className="flex flex-col gap-3 bg-zinc-50 rounded-lg p-4">
|
|
329
360
|
<div className="size-8 bg-white rounded-lg shadow-[0px_2px_10px_0px_rgba(26,26,26,0.05)] flex items-center justify-center">
|
|
330
361
|
<IconAlertTriangle size={18} className="text-amber-500" />
|
|
@@ -350,6 +381,7 @@ export function RequestWithdrawalSheet() {
|
|
|
350
381
|
render={({ field, fieldState }) => (
|
|
351
382
|
<FormField
|
|
352
383
|
required
|
|
384
|
+
disabled={hasPixKeyIssue}
|
|
353
385
|
label={translateSheet('withdrawalValueLabel')}
|
|
354
386
|
placeholder={translateSheet('withdrawalValuePlaceholder')}
|
|
355
387
|
inputMode="numeric"
|
|
@@ -481,6 +513,7 @@ export function RequestWithdrawalSheet() {
|
|
|
481
513
|
!affiliate ||
|
|
482
514
|
!limits ||
|
|
483
515
|
!hasReceivingAccount ||
|
|
516
|
+
hasPixKeyIssue ||
|
|
484
517
|
!withdrawalAmount ||
|
|
485
518
|
withdrawalAmount < minWithdrawal ||
|
|
486
519
|
toCents(withdrawalAmount) > toCents(availableToWithdraw) ||
|
|
@@ -537,6 +537,11 @@ const messages = {
|
|
|
537
537
|
blockedDescription:
|
|
538
538
|
'The registered Pix key is a tax ID that differs from the account holder document. Update the key or the document to request withdrawals again.',
|
|
539
539
|
blockedEditAccountButton: 'Edit receiving account',
|
|
540
|
+
pixKeyInvalidWarning:
|
|
541
|
+
'Your Pix key is invalid. Update your receiving details to request a withdrawal.',
|
|
542
|
+
pixKeyMismatchWarning:
|
|
543
|
+
'The Pix key does not match the account holder CPF/CNPJ. Update your receiving details to request a withdrawal.',
|
|
544
|
+
updateReceivingAccountButton: 'Update receiving details',
|
|
540
545
|
},
|
|
541
546
|
bankAccount: {
|
|
542
547
|
dialogTitle: 'Receiving account',
|
|
@@ -540,6 +540,11 @@ const messages = {
|
|
|
540
540
|
blockedDescription:
|
|
541
541
|
'La clave Pix registrada es un CPF/CNPJ distinto del documento del titular. Ajusta la clave o el documento para volver a solicitar retiros.',
|
|
542
542
|
blockedEditAccountButton: 'Editar cuenta de cobro',
|
|
543
|
+
pixKeyInvalidWarning:
|
|
544
|
+
'Tu clave Pix no es válida. Actualiza tus datos de cobro para solicitar el retiro.',
|
|
545
|
+
pixKeyMismatchWarning:
|
|
546
|
+
'La clave Pix no coincide con el CPF/CNPJ del titular. Actualiza tus datos de cobro para solicitar el retiro.',
|
|
547
|
+
updateReceivingAccountButton: 'Actualizar datos de cobro',
|
|
543
548
|
},
|
|
544
549
|
bankAccount: {
|
|
545
550
|
dialogTitle: 'Cuenta de recepción',
|
|
@@ -548,6 +548,11 @@ const messages = {
|
|
|
548
548
|
blockedDescription:
|
|
549
549
|
'A chave Pix cadastrada é um CPF/CNPJ diferente do documento do titular. Ajuste a chave ou o documento para voltar a solicitar saques.',
|
|
550
550
|
blockedEditAccountButton: 'Editar conta de recebimento',
|
|
551
|
+
pixKeyInvalidWarning:
|
|
552
|
+
'Sua chave Pix está inválida. Atualize seus dados de recebimento para solicitar o saque.',
|
|
553
|
+
pixKeyMismatchWarning:
|
|
554
|
+
'A chave Pix não confere com o CPF/CNPJ do titular. Atualize seus dados de recebimento para solicitar o saque.',
|
|
555
|
+
updateReceivingAccountButton: 'Atualizar dados de recebimento',
|
|
551
556
|
},
|
|
552
557
|
bankAccount: {
|
|
553
558
|
dialogTitle: 'Conta de recebimento',
|
package/src/index.ts
CHANGED
|
@@ -561,7 +561,7 @@ export {
|
|
|
561
561
|
formatCardNumber,
|
|
562
562
|
formatPixKey,
|
|
563
563
|
} from "./utils/format/masks";
|
|
564
|
-
export { AMBIGUOUS_PIX_KEY, normalizePixKeyForStorage } from "./utils/validators/pix-key";
|
|
564
|
+
export { AMBIGUOUS_PIX_KEY, isPixKeyFromAnotherDocument, normalizePixKeyForStorage } from "./utils/validators/pix-key";
|
|
565
565
|
export {
|
|
566
566
|
formatCurrency,
|
|
567
567
|
formatCurrencyNumber,
|
|
@@ -9,3 +9,4 @@ export { createProjectMock } from './project.factory';
|
|
|
9
9
|
export { createProjectUserMock } from './project-user.factory';
|
|
10
10
|
export { createCouponMock } from './coupon.factory';
|
|
11
11
|
export { createAffiliateMock } from './affiliate.factory';
|
|
12
|
+
export { createWithdrawalLimitsMock } from './withdrawal-limits.factory';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { WithdrawalLimits } from '../../modules/affiliates/types/affiliate.type';
|
|
2
|
+
import { createMock } from './create-mock';
|
|
3
|
+
|
|
4
|
+
export const createWithdrawalLimitsMock = createMock<WithdrawalLimits, Partial<WithdrawalLimits>>((overrides) => ({
|
|
5
|
+
personType: overrides?.personType ?? 'cpf',
|
|
6
|
+
financialDocumentType: overrides?.financialDocumentType ?? 1,
|
|
7
|
+
requiresInvoice: overrides?.requiresInvoice ?? false,
|
|
8
|
+
minValue: overrides?.minValue ?? 25,
|
|
9
|
+
maxValuePerMonth: overrides?.maxValuePerMonth ?? 350,
|
|
10
|
+
monthlyUsed: overrides?.monthlyUsed ?? 0,
|
|
11
|
+
monthlyRemaining: overrides?.monthlyRemaining ?? 350,
|
|
12
|
+
balance: overrides?.balance ?? 500,
|
|
13
|
+
availableToWithdraw: overrides?.availableToWithdraw ?? 350,
|
|
14
|
+
canWithdraw: overrides?.canWithdraw ?? true,
|
|
15
|
+
blockReason: overrides?.blockReason ?? null,
|
|
16
|
+
}));
|
|
@@ -23,3 +23,7 @@ export function normalizePixKeyForStorage(value: string, holderDocument: string)
|
|
|
23
23
|
if (isMobile) return `+55${digits}`;
|
|
24
24
|
return isCpf ? digits : null;
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
export function isPixKeyFromAnotherDocument(canonicalPixKey: string, holderDocument: string): boolean {
|
|
28
|
+
return /^\d+$/.test(canonicalPixKey) && canonicalPixKey !== holderDocument.replace(/\D/g, '');
|
|
29
|
+
}
|