@greatapps/common 1.1.791 → 1.1.793
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/AccountHubLinkHandler.mjs +16 -4
- package/dist/components/account/AccountHubLinkHandler.mjs.map +1 -1
- package/dist/components/account/AccountUnsavedChangesDialog.mjs +34 -0
- package/dist/components/account/AccountUnsavedChangesDialog.mjs.map +1 -0
- package/dist/components/account/MyAccountModal.mjs +28 -22
- package/dist/components/account/MyAccountModal.mjs.map +1 -1
- package/dist/components/account/hooks/useAccountHubActions.mjs +15 -0
- package/dist/components/account/hooks/useAccountHubActions.mjs.map +1 -1
- package/dist/components/account/sections/MyProfileSection.mjs +20 -22
- package/dist/components/account/sections/MyProfileSection.mjs.map +1 -1
- package/dist/components/account/sections/PreferencesSection.mjs +15 -20
- package/dist/components/account/sections/PreferencesSection.mjs.map +1 -1
- package/dist/components/account/sections/subscription/PaymentConfirmationDialog.mjs +3 -2
- package/dist/components/account/sections/subscription/PaymentConfirmationDialog.mjs.map +1 -1
- package/dist/components/ui/data-display/SuccessConfettiIcon.mjs +40 -0
- package/dist/components/ui/data-display/SuccessConfettiIcon.mjs.map +1 -0
- package/dist/enums/AccountHubFlow.mjs +1 -0
- package/dist/enums/AccountHubFlow.mjs.map +1 -1
- package/dist/i18n/messages/en-us.mjs +5 -0
- package/dist/i18n/messages/en-us.mjs.map +1 -1
- package/dist/i18n/messages/es-es.mjs +5 -0
- package/dist/i18n/messages/es-es.mjs.map +1 -1
- package/dist/i18n/messages/pt-br.mjs +5 -0
- package/dist/i18n/messages/pt-br.mjs.map +1 -1
- package/dist/index.mjs +9 -1
- package/dist/index.mjs.map +1 -1
- package/dist/middlewares/create-auth-middleware.mjs +1 -1
- package/dist/middlewares/create-auth-middleware.mjs.map +1 -1
- package/dist/modules/accounts/constants/account-hub-link.constants.mjs +9 -1
- package/dist/modules/accounts/constants/account-hub-link.constants.mjs.map +1 -1
- package/dist/modules/accounts/utils/build-account-hub-url.mjs +13 -1
- package/dist/modules/accounts/utils/build-account-hub-url.mjs.map +1 -1
- package/dist/modules/accounts/utils/is-billing-period.mjs +8 -0
- package/dist/modules/accounts/utils/is-billing-period.mjs.map +1 -0
- package/dist/modules/accounts/utils/parse-account-hub-link.mjs +21 -2
- package/dist/modules/accounts/utils/parse-account-hub-link.mjs.map +1 -1
- package/dist/store/useAccountUnsavedChanges.mjs +31 -0
- package/dist/store/useAccountUnsavedChanges.mjs.map +1 -0
- package/package.json +1 -1
- package/src/components/account/AccountHubLinkHandler.tsx +15 -3
- package/src/components/account/AccountUnsavedChangesDialog.tsx +49 -0
- package/src/components/account/MyAccountModal.tsx +41 -34
- package/src/components/account/hooks/useAccountHubActions.ts +17 -1
- package/src/components/account/sections/MyProfileSection.tsx +24 -20
- package/src/components/account/sections/PreferencesSection.tsx +17 -21
- package/src/components/account/sections/subscription/PaymentConfirmationDialog.tsx +3 -2
- package/src/components/ui/data-display/SuccessConfettiIcon.tsx +33 -0
- package/src/enums/AccountHubFlow.ts +1 -0
- 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 +5 -1
- package/src/middlewares/create-auth-middleware.ts +1 -1
- package/src/modules/accounts/constants/account-hub-link.constants.ts +4 -0
- package/src/modules/accounts/types/account-hub-link.type.ts +9 -0
- package/src/modules/accounts/utils/build-account-hub-url.ts +14 -0
- package/src/modules/accounts/utils/is-billing-period.ts +7 -0
- package/src/modules/accounts/utils/parse-account-hub-link.ts +25 -2
- package/src/store/useAccountUnsavedChanges.ts +52 -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 * 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 { 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} from \"./utils/format/masks\";\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} from \"./modules/accounts/constants/account-hub-link.constants\";\nexport { LEGACY_ACCOUNT_ROUTES } from \"./modules/accounts/constants/legacy-account-routes.constants\";\nexport type { AccountHubLink, 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,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,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,gCAAgC;AACzC,SAAS,iCAAiC;AAC1C,SAAS,oCAAoC;AAC7C,SAAS,6BAA6B;AACtC,SAAS,6BAA6B;AACtC,SAAS,2BAA2B;AACpC,SAAS,2BAA2B;AACpC,SAAS,6BAA6B;AACtC,SAAS,UAAU,uBAAuB;AAC1C,SAAS,mBAAm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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 * 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 { 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} from \"./utils/format/masks\";\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,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;AAA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;AAClC,SAAS,cAAc,oBAAoB;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":["default","LANGUAGE_OPTIONS"]}
|
|
@@ -26,7 +26,7 @@ function createAuthMiddleware(options) {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
const loginUrl = accountsUrlIsSameSite ? new URL("/login", accountsUrl) : new URL("/login", request.url);
|
|
29
|
-
if (pathname !== "/") {
|
|
29
|
+
if (pathname !== "/" || request.nextUrl.search) {
|
|
30
30
|
const proto = request.headers.get("x-forwarded-proto") || request.nextUrl.protocol.replace(/:$/, "") || "https";
|
|
31
31
|
loginUrl.searchParams.set("redirect", `${proto}://${host}${pathname}${request.nextUrl.search}`);
|
|
32
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/middlewares/create-auth-middleware.ts"],"sourcesContent":["import { NextRequest, NextResponse } from 'next/server';\r\n\r\nimport { continueChain, MiddlewareConfig, MiddlewareFunction, MiddlewareResult, stopChain } from './types';\r\nimport { isRouteEquals } from './is-route-equals';\r\nimport { whitelabelService } from '../modules/whitelabel/services/whitelabel.service';\r\nimport { isSameSiteUrl } from '../utils/redirect';\r\n\r\ninterface CreateAuthMiddlewareOptions {\r\n publicRoutes?: string[];\r\n authRoutes?: string[];\r\n}\r\n\r\nexport function createAuthMiddleware(options?: CreateAuthMiddlewareOptions): MiddlewareFunction {\r\n return async (request: NextRequest) => {\r\n const { pathname } = request.nextUrl;\r\n const token = process.env.DUMMY_AUTH_TOKEN || request.cookies.get('greatapps')?.value;\r\n const isPublicRoute = isRouteEquals(pathname, options?.publicRoutes || []);\r\n const isAuthRoute = isRouteEquals(pathname, options?.authRoutes || []);\r\n\r\n if (token && isAuthRoute) {\r\n return stopChain(NextResponse.redirect(new URL('/', request.url)));\r\n }\r\n\r\n if (!token && !isPublicRoute && !isAuthRoute) {\r\n const host = request.headers.get('host') || '';\r\n const whitelabel = await whitelabelService.getTokenByDomain(host).catch(() => null);\r\n const accountsUrl = whitelabel?.accounts_url;\r\n const accountsUrlIsSameSite = !!accountsUrl && isSameSiteUrl(accountsUrl, host);\r\n\r\n if (accountsUrl && !accountsUrlIsSameSite) {\r\n console.error('[auth-middleware] accounts_url fora do site do host da requisição', {\r\n host,\r\n pathname,\r\n whitelabelId: whitelabel?.id,\r\n accountsUrl,\r\n });\r\n }\r\n\r\n const loginUrl = accountsUrlIsSameSite\r\n ? new URL('/login', accountsUrl)\r\n : new URL('/login', request.url);\r\n\r\n if (pathname !== '/') {\r\n // URL absoluta da página de origem — o login vive em outro domínio (accounts),\r\n // então só o pathname faria o redirect cair no host do accounts.\r\n const proto =\r\n request.headers.get('x-forwarded-proto') ||\r\n request.nextUrl.protocol.replace(/:$/, '') ||\r\n 'https';\r\n loginUrl.searchParams.set('redirect', `${proto}://${host}${pathname}${request.nextUrl.search}`);\r\n }\r\n\r\n return stopChain(NextResponse.redirect(loginUrl));\r\n }\r\n\r\n return continueChain();\r\n }\r\n}"],"mappings":"AAAA,SAAsB,oBAAoB;AAE1C,SAAS,eAAuE,iBAAiB;AACjG,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,qBAAqB;AAOvB,SAAS,qBAAqB,SAA2D;AAC9F,SAAO,OAAO,YAAyB;AACrC,UAAM,EAAE,SAAS,IAAI,QAAQ;AAC7B,UAAM,QAAQ,QAAQ,IAAI,oBAAoB,QAAQ,QAAQ,IAAI,WAAW,GAAG;AAChF,UAAM,gBAAgB,cAAc,UAAU,SAAS,gBAAgB,CAAC,CAAC;AACzE,UAAM,cAAc,cAAc,UAAU,SAAS,cAAc,CAAC,CAAC;AAErE,QAAI,SAAS,aAAa;AACxB,aAAO,UAAU,aAAa,SAAS,IAAI,IAAI,KAAK,QAAQ,GAAG,CAAC,CAAC;AAAA,IACnE;AAEA,QAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,aAAa;AAC5C,YAAM,OAAO,QAAQ,QAAQ,IAAI,MAAM,KAAK;AAC5C,YAAM,aAAa,MAAM,kBAAkB,iBAAiB,IAAI,EAAE,MAAM,MAAM,IAAI;AAClF,YAAM,cAAc,YAAY;AAChC,YAAM,wBAAwB,CAAC,CAAC,eAAe,cAAc,aAAa,IAAI;AAE9E,UAAI,eAAe,CAAC,uBAAuB;AACzC,gBAAQ,MAAM,2EAAqE;AAAA,UACjF;AAAA,UACA;AAAA,UACA,cAAc,YAAY;AAAA,UAC1B;AAAA,QACF,CAAC;AAAA,MACH;AAEA,YAAM,WAAW,wBACb,IAAI,IAAI,UAAU,WAAW,IAC7B,IAAI,IAAI,UAAU,QAAQ,GAAG;AAEjC,UAAI,aAAa,
|
|
1
|
+
{"version":3,"sources":["../../src/middlewares/create-auth-middleware.ts"],"sourcesContent":["import { NextRequest, NextResponse } from 'next/server';\r\n\r\nimport { continueChain, MiddlewareConfig, MiddlewareFunction, MiddlewareResult, stopChain } from './types';\r\nimport { isRouteEquals } from './is-route-equals';\r\nimport { whitelabelService } from '../modules/whitelabel/services/whitelabel.service';\r\nimport { isSameSiteUrl } from '../utils/redirect';\r\n\r\ninterface CreateAuthMiddlewareOptions {\r\n publicRoutes?: string[];\r\n authRoutes?: string[];\r\n}\r\n\r\nexport function createAuthMiddleware(options?: CreateAuthMiddlewareOptions): MiddlewareFunction {\r\n return async (request: NextRequest) => {\r\n const { pathname } = request.nextUrl;\r\n const token = process.env.DUMMY_AUTH_TOKEN || request.cookies.get('greatapps')?.value;\r\n const isPublicRoute = isRouteEquals(pathname, options?.publicRoutes || []);\r\n const isAuthRoute = isRouteEquals(pathname, options?.authRoutes || []);\r\n\r\n if (token && isAuthRoute) {\r\n return stopChain(NextResponse.redirect(new URL('/', request.url)));\r\n }\r\n\r\n if (!token && !isPublicRoute && !isAuthRoute) {\r\n const host = request.headers.get('host') || '';\r\n const whitelabel = await whitelabelService.getTokenByDomain(host).catch(() => null);\r\n const accountsUrl = whitelabel?.accounts_url;\r\n const accountsUrlIsSameSite = !!accountsUrl && isSameSiteUrl(accountsUrl, host);\r\n\r\n if (accountsUrl && !accountsUrlIsSameSite) {\r\n console.error('[auth-middleware] accounts_url fora do site do host da requisição', {\r\n host,\r\n pathname,\r\n whitelabelId: whitelabel?.id,\r\n accountsUrl,\r\n });\r\n }\r\n\r\n const loginUrl = accountsUrlIsSameSite\r\n ? new URL('/login', accountsUrl)\r\n : new URL('/login', request.url);\r\n\r\n if (pathname !== '/' || request.nextUrl.search) {\r\n // URL absoluta da página de origem — o login vive em outro domínio (accounts),\r\n // então só o pathname faria o redirect cair no host do accounts.\r\n const proto =\r\n request.headers.get('x-forwarded-proto') ||\r\n request.nextUrl.protocol.replace(/:$/, '') ||\r\n 'https';\r\n loginUrl.searchParams.set('redirect', `${proto}://${host}${pathname}${request.nextUrl.search}`);\r\n }\r\n\r\n return stopChain(NextResponse.redirect(loginUrl));\r\n }\r\n\r\n return continueChain();\r\n }\r\n}"],"mappings":"AAAA,SAAsB,oBAAoB;AAE1C,SAAS,eAAuE,iBAAiB;AACjG,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,qBAAqB;AAOvB,SAAS,qBAAqB,SAA2D;AAC9F,SAAO,OAAO,YAAyB;AACrC,UAAM,EAAE,SAAS,IAAI,QAAQ;AAC7B,UAAM,QAAQ,QAAQ,IAAI,oBAAoB,QAAQ,QAAQ,IAAI,WAAW,GAAG;AAChF,UAAM,gBAAgB,cAAc,UAAU,SAAS,gBAAgB,CAAC,CAAC;AACzE,UAAM,cAAc,cAAc,UAAU,SAAS,cAAc,CAAC,CAAC;AAErE,QAAI,SAAS,aAAa;AACxB,aAAO,UAAU,aAAa,SAAS,IAAI,IAAI,KAAK,QAAQ,GAAG,CAAC,CAAC;AAAA,IACnE;AAEA,QAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,aAAa;AAC5C,YAAM,OAAO,QAAQ,QAAQ,IAAI,MAAM,KAAK;AAC5C,YAAM,aAAa,MAAM,kBAAkB,iBAAiB,IAAI,EAAE,MAAM,MAAM,IAAI;AAClF,YAAM,cAAc,YAAY;AAChC,YAAM,wBAAwB,CAAC,CAAC,eAAe,cAAc,aAAa,IAAI;AAE9E,UAAI,eAAe,CAAC,uBAAuB;AACzC,gBAAQ,MAAM,2EAAqE;AAAA,UACjF;AAAA,UACA;AAAA,UACA,cAAc,YAAY;AAAA,UAC1B;AAAA,QACF,CAAC;AAAA,MACH;AAEA,YAAM,WAAW,wBACb,IAAI,IAAI,UAAU,WAAW,IAC7B,IAAI,IAAI,UAAU,QAAQ,GAAG;AAEjC,UAAI,aAAa,OAAO,QAAQ,QAAQ,QAAQ;AAG9C,cAAM,QACJ,QAAQ,QAAQ,IAAI,mBAAmB,KACvC,QAAQ,QAAQ,SAAS,QAAQ,MAAM,EAAE,KACzC;AACF,iBAAS,aAAa,IAAI,YAAY,GAAG,KAAK,MAAM,IAAI,GAAG,QAAQ,GAAG,QAAQ,QAAQ,MAAM,EAAE;AAAA,MAChG;AAEA,aAAO,UAAU,aAAa,SAAS,QAAQ,CAAC;AAAA,IAClD;AAEA,WAAO,cAAc;AAAA,EACvB;AACF;","names":[]}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
const ACCOUNT_HUB_SECTION_PARAM = "account";
|
|
2
2
|
const ACCOUNT_HUB_FLOW_PARAM = "flow";
|
|
3
3
|
const ACCOUNT_HUB_COUPON_PARAM = "coupon";
|
|
4
|
+
const ACCOUNT_HUB_PLAN_PARAM = "plan";
|
|
5
|
+
const ACCOUNT_HUB_TOTAL_PARAM = "total";
|
|
6
|
+
const ACCOUNT_HUB_PERIOD_PARAM = "period";
|
|
7
|
+
const ACCOUNT_HUB_CHARGE_PARAM = "charge";
|
|
4
8
|
export {
|
|
9
|
+
ACCOUNT_HUB_CHARGE_PARAM,
|
|
5
10
|
ACCOUNT_HUB_COUPON_PARAM,
|
|
6
11
|
ACCOUNT_HUB_FLOW_PARAM,
|
|
7
|
-
|
|
12
|
+
ACCOUNT_HUB_PERIOD_PARAM,
|
|
13
|
+
ACCOUNT_HUB_PLAN_PARAM,
|
|
14
|
+
ACCOUNT_HUB_SECTION_PARAM,
|
|
15
|
+
ACCOUNT_HUB_TOTAL_PARAM
|
|
8
16
|
};
|
|
9
17
|
//# sourceMappingURL=account-hub-link.constants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/accounts/constants/account-hub-link.constants.ts"],"sourcesContent":["export const ACCOUNT_HUB_SECTION_PARAM = 'account';\nexport const ACCOUNT_HUB_FLOW_PARAM = 'flow';\nexport const ACCOUNT_HUB_COUPON_PARAM = 'coupon';\n"],"mappings":"AAAO,MAAM,4BAA4B;AAClC,MAAM,yBAAyB;AAC/B,MAAM,2BAA2B;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/accounts/constants/account-hub-link.constants.ts"],"sourcesContent":["export const ACCOUNT_HUB_SECTION_PARAM = 'account';\nexport const ACCOUNT_HUB_FLOW_PARAM = 'flow';\nexport const ACCOUNT_HUB_COUPON_PARAM = 'coupon';\nexport const ACCOUNT_HUB_PLAN_PARAM = 'plan';\nexport const ACCOUNT_HUB_TOTAL_PARAM = 'total';\nexport const ACCOUNT_HUB_PERIOD_PARAM = 'period';\nexport const ACCOUNT_HUB_CHARGE_PARAM = 'charge';\n"],"mappings":"AAAO,MAAM,4BAA4B;AAClC,MAAM,yBAAyB;AAC/B,MAAM,2BAA2B;AACjC,MAAM,yBAAyB;AAC/B,MAAM,0BAA0B;AAChC,MAAM,2BAA2B;AACjC,MAAM,2BAA2B;","names":[]}
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ACCOUNT_HUB_CHARGE_PARAM,
|
|
2
3
|
ACCOUNT_HUB_COUPON_PARAM,
|
|
3
4
|
ACCOUNT_HUB_FLOW_PARAM,
|
|
4
|
-
|
|
5
|
+
ACCOUNT_HUB_PERIOD_PARAM,
|
|
6
|
+
ACCOUNT_HUB_PLAN_PARAM,
|
|
7
|
+
ACCOUNT_HUB_SECTION_PARAM,
|
|
8
|
+
ACCOUNT_HUB_TOTAL_PARAM
|
|
5
9
|
} from "../constants/account-hub-link.constants";
|
|
6
10
|
function buildAccountHubUrl(baseUrl, link, pathname = "/") {
|
|
7
11
|
const url = new URL(pathname, baseUrl);
|
|
8
12
|
url.searchParams.set(ACCOUNT_HUB_SECTION_PARAM, link.section);
|
|
9
13
|
if (link.flow) url.searchParams.set(ACCOUNT_HUB_FLOW_PARAM, link.flow);
|
|
10
14
|
if (link.couponCode) url.searchParams.set(ACCOUNT_HUB_COUPON_PARAM, link.couponCode);
|
|
15
|
+
if (link.purchase) {
|
|
16
|
+
url.searchParams.set(ACCOUNT_HUB_PLAN_PARAM, link.purchase.planName);
|
|
17
|
+
url.searchParams.set(ACCOUNT_HUB_TOTAL_PARAM, String(link.purchase.total));
|
|
18
|
+
url.searchParams.set(ACCOUNT_HUB_PERIOD_PARAM, link.purchase.billingPeriod);
|
|
19
|
+
if (link.purchase.immediateChargeTotal != null) {
|
|
20
|
+
url.searchParams.set(ACCOUNT_HUB_CHARGE_PARAM, String(link.purchase.immediateChargeTotal));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
11
23
|
return url.toString();
|
|
12
24
|
}
|
|
13
25
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/accounts/utils/build-account-hub-url.ts"],"sourcesContent":["import {\n ACCOUNT_HUB_COUPON_PARAM,\n ACCOUNT_HUB_FLOW_PARAM,\n ACCOUNT_HUB_SECTION_PARAM,\n} from '../constants/account-hub-link.constants';\nimport type { AccountHubLink } from '../types/account-hub-link.type';\n\nexport function buildAccountHubUrl(baseUrl: string, link: AccountHubLink, pathname = '/'): string {\n const url = new URL(pathname, baseUrl);\n url.searchParams.set(ACCOUNT_HUB_SECTION_PARAM, link.section);\n if (link.flow) url.searchParams.set(ACCOUNT_HUB_FLOW_PARAM, link.flow);\n if (link.couponCode) url.searchParams.set(ACCOUNT_HUB_COUPON_PARAM, link.couponCode);\n return url.toString();\n}\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGA,SAAS,mBAAmB,SAAiB,MAAsB,WAAW,KAAa;AAChG,QAAM,MAAM,IAAI,IAAI,UAAU,OAAO;AACrC,MAAI,aAAa,IAAI,2BAA2B,KAAK,OAAO;AAC5D,MAAI,KAAK,KAAM,KAAI,aAAa,IAAI,wBAAwB,KAAK,IAAI;AACrE,MAAI,KAAK,WAAY,KAAI,aAAa,IAAI,0BAA0B,KAAK,UAAU;
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/accounts/utils/build-account-hub-url.ts"],"sourcesContent":["import {\n ACCOUNT_HUB_CHARGE_PARAM,\n ACCOUNT_HUB_COUPON_PARAM,\n ACCOUNT_HUB_FLOW_PARAM,\n ACCOUNT_HUB_PERIOD_PARAM,\n ACCOUNT_HUB_PLAN_PARAM,\n ACCOUNT_HUB_SECTION_PARAM,\n ACCOUNT_HUB_TOTAL_PARAM,\n} from '../constants/account-hub-link.constants';\nimport type { AccountHubLink } from '../types/account-hub-link.type';\n\nexport function buildAccountHubUrl(baseUrl: string, link: AccountHubLink, pathname = '/'): string {\n const url = new URL(pathname, baseUrl);\n url.searchParams.set(ACCOUNT_HUB_SECTION_PARAM, link.section);\n if (link.flow) url.searchParams.set(ACCOUNT_HUB_FLOW_PARAM, link.flow);\n if (link.couponCode) url.searchParams.set(ACCOUNT_HUB_COUPON_PARAM, link.couponCode);\n\n if (link.purchase) {\n url.searchParams.set(ACCOUNT_HUB_PLAN_PARAM, link.purchase.planName);\n url.searchParams.set(ACCOUNT_HUB_TOTAL_PARAM, String(link.purchase.total));\n url.searchParams.set(ACCOUNT_HUB_PERIOD_PARAM, link.purchase.billingPeriod);\n if (link.purchase.immediateChargeTotal != null) {\n url.searchParams.set(ACCOUNT_HUB_CHARGE_PARAM, String(link.purchase.immediateChargeTotal));\n }\n }\n\n return url.toString();\n}\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGA,SAAS,mBAAmB,SAAiB,MAAsB,WAAW,KAAa;AAChG,QAAM,MAAM,IAAI,IAAI,UAAU,OAAO;AACrC,MAAI,aAAa,IAAI,2BAA2B,KAAK,OAAO;AAC5D,MAAI,KAAK,KAAM,KAAI,aAAa,IAAI,wBAAwB,KAAK,IAAI;AACrE,MAAI,KAAK,WAAY,KAAI,aAAa,IAAI,0BAA0B,KAAK,UAAU;AAEnF,MAAI,KAAK,UAAU;AACjB,QAAI,aAAa,IAAI,wBAAwB,KAAK,SAAS,QAAQ;AACnE,QAAI,aAAa,IAAI,yBAAyB,OAAO,KAAK,SAAS,KAAK,CAAC;AACzE,QAAI,aAAa,IAAI,0BAA0B,KAAK,SAAS,aAAa;AAC1E,QAAI,KAAK,SAAS,wBAAwB,MAAM;AAC9C,UAAI,aAAa,IAAI,0BAA0B,OAAO,KAAK,SAAS,oBAAoB,CAAC;AAAA,IAC3F;AAAA,EACF;AAEA,SAAO,IAAI,SAAS;AACtB;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/accounts/utils/is-billing-period.ts"],"sourcesContent":["import type { BillingPeriod } from '../../subscriptions/types/billing-period.type';\n\nconst BILLING_PERIODS: string[] = ['monthly', 'semiannual', 'annual'];\n\nexport function isBillingPeriod(value: string): value is BillingPeriod {\n return BILLING_PERIODS.includes(value);\n}\n"],"mappings":"AAEA,MAAM,kBAA4B,CAAC,WAAW,cAAc,QAAQ;AAE7D,SAAS,gBAAgB,OAAuC;AACrE,SAAO,gBAAgB,SAAS,KAAK;AACvC;","names":[]}
|
|
@@ -1,18 +1,37 @@
|
|
|
1
1
|
import { AccountHubFlow } from "../../../enums/AccountHubFlow";
|
|
2
2
|
import {
|
|
3
|
+
ACCOUNT_HUB_CHARGE_PARAM,
|
|
3
4
|
ACCOUNT_HUB_COUPON_PARAM,
|
|
4
5
|
ACCOUNT_HUB_FLOW_PARAM,
|
|
5
|
-
|
|
6
|
+
ACCOUNT_HUB_PERIOD_PARAM,
|
|
7
|
+
ACCOUNT_HUB_PLAN_PARAM,
|
|
8
|
+
ACCOUNT_HUB_SECTION_PARAM,
|
|
9
|
+
ACCOUNT_HUB_TOTAL_PARAM
|
|
6
10
|
} from "../constants/account-hub-link.constants";
|
|
7
11
|
import { isAccountHubFlow } from "./is-account-hub-flow";
|
|
12
|
+
import { isBillingPeriod } from "./is-billing-period";
|
|
8
13
|
import { isMyAccountSection } from "./is-my-account-section";
|
|
14
|
+
function readPurchase(searchParams, flow) {
|
|
15
|
+
if (flow !== AccountHubFlow.CONFIRMATION) return void 0;
|
|
16
|
+
const planName = searchParams.get(ACCOUNT_HUB_PLAN_PARAM);
|
|
17
|
+
const total = Number(searchParams.get(ACCOUNT_HUB_TOTAL_PARAM));
|
|
18
|
+
const period = searchParams.get(ACCOUNT_HUB_PERIOD_PARAM);
|
|
19
|
+
if (!planName || !Number.isFinite(total) || !period || !isBillingPeriod(period)) return void 0;
|
|
20
|
+
const charge = Number(searchParams.get(ACCOUNT_HUB_CHARGE_PARAM));
|
|
21
|
+
return {
|
|
22
|
+
planName,
|
|
23
|
+
total,
|
|
24
|
+
billingPeriod: period,
|
|
25
|
+
immediateChargeTotal: Number.isFinite(charge) && charge > 0 ? charge : null
|
|
26
|
+
};
|
|
27
|
+
}
|
|
9
28
|
function parseAccountHubLink(searchParams) {
|
|
10
29
|
const section = searchParams.get(ACCOUNT_HUB_SECTION_PARAM);
|
|
11
30
|
if (!section || !isMyAccountSection(section)) return null;
|
|
12
31
|
const flow = searchParams.get(ACCOUNT_HUB_FLOW_PARAM);
|
|
13
32
|
const resolvedFlow = flow && isAccountHubFlow(flow) ? flow : void 0;
|
|
14
33
|
const couponCode = resolvedFlow === AccountHubFlow.PLANS ? searchParams.get(ACCOUNT_HUB_COUPON_PARAM) ?? void 0 : void 0;
|
|
15
|
-
return { section, flow: resolvedFlow, couponCode };
|
|
34
|
+
return { section, flow: resolvedFlow, couponCode, purchase: readPurchase(searchParams, resolvedFlow) };
|
|
16
35
|
}
|
|
17
36
|
export {
|
|
18
37
|
parseAccountHubLink
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/accounts/utils/parse-account-hub-link.ts"],"sourcesContent":["import { AccountHubFlow } from '../../../enums/AccountHubFlow';\nimport {\n ACCOUNT_HUB_COUPON_PARAM,\n ACCOUNT_HUB_FLOW_PARAM,\n ACCOUNT_HUB_SECTION_PARAM,\n} from '../constants/account-hub-link.constants';\nimport type { AccountHubLink } from '../types/account-hub-link.type';\nimport { isAccountHubFlow } from './is-account-hub-flow';\nimport { isMyAccountSection } from './is-my-account-section';\n\nexport function parseAccountHubLink(searchParams: URLSearchParams): AccountHubLink | null {\n const section = searchParams.get(ACCOUNT_HUB_SECTION_PARAM);\n if (!section || !isMyAccountSection(section)) return null;\n\n const flow = searchParams.get(ACCOUNT_HUB_FLOW_PARAM);\n const resolvedFlow = flow && isAccountHubFlow(flow) ? flow : undefined;\n const couponCode =\n resolvedFlow === AccountHubFlow.PLANS ? (searchParams.get(ACCOUNT_HUB_COUPON_PARAM) ?? undefined) : undefined;\n\n return { section, flow: resolvedFlow, couponCode };\n}\n"],"mappings":"AAAA,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/accounts/utils/parse-account-hub-link.ts"],"sourcesContent":["import { AccountHubFlow } from '../../../enums/AccountHubFlow';\nimport {\n ACCOUNT_HUB_CHARGE_PARAM,\n ACCOUNT_HUB_COUPON_PARAM,\n ACCOUNT_HUB_FLOW_PARAM,\n ACCOUNT_HUB_PERIOD_PARAM,\n ACCOUNT_HUB_PLAN_PARAM,\n ACCOUNT_HUB_SECTION_PARAM,\n ACCOUNT_HUB_TOTAL_PARAM,\n} from '../constants/account-hub-link.constants';\nimport type { AccountHubLink, AccountHubPurchase } from '../types/account-hub-link.type';\nimport { isAccountHubFlow } from './is-account-hub-flow';\nimport { isBillingPeriod } from './is-billing-period';\nimport { isMyAccountSection } from './is-my-account-section';\n\nfunction readPurchase(searchParams: URLSearchParams, flow?: AccountHubFlow): AccountHubPurchase | undefined {\n if (flow !== AccountHubFlow.CONFIRMATION) return undefined;\n\n const planName = searchParams.get(ACCOUNT_HUB_PLAN_PARAM);\n const total = Number(searchParams.get(ACCOUNT_HUB_TOTAL_PARAM));\n const period = searchParams.get(ACCOUNT_HUB_PERIOD_PARAM);\n if (!planName || !Number.isFinite(total) || !period || !isBillingPeriod(period)) return undefined;\n\n const charge = Number(searchParams.get(ACCOUNT_HUB_CHARGE_PARAM));\n\n return {\n planName,\n total,\n billingPeriod: period,\n immediateChargeTotal: Number.isFinite(charge) && charge > 0 ? charge : null,\n };\n}\n\nexport function parseAccountHubLink(searchParams: URLSearchParams): AccountHubLink | null {\n const section = searchParams.get(ACCOUNT_HUB_SECTION_PARAM);\n if (!section || !isMyAccountSection(section)) return null;\n\n const flow = searchParams.get(ACCOUNT_HUB_FLOW_PARAM);\n const resolvedFlow = flow && isAccountHubFlow(flow) ? flow : undefined;\n const couponCode =\n resolvedFlow === AccountHubFlow.PLANS ? (searchParams.get(ACCOUNT_HUB_COUPON_PARAM) ?? undefined) : undefined;\n\n return { section, flow: resolvedFlow, couponCode, purchase: readPurchase(searchParams, resolvedFlow) };\n}\n"],"mappings":"AAAA,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AAEnC,SAAS,aAAa,cAA+B,MAAuD;AAC1G,MAAI,SAAS,eAAe,aAAc,QAAO;AAEjD,QAAM,WAAW,aAAa,IAAI,sBAAsB;AACxD,QAAM,QAAQ,OAAO,aAAa,IAAI,uBAAuB,CAAC;AAC9D,QAAM,SAAS,aAAa,IAAI,wBAAwB;AACxD,MAAI,CAAC,YAAY,CAAC,OAAO,SAAS,KAAK,KAAK,CAAC,UAAU,CAAC,gBAAgB,MAAM,EAAG,QAAO;AAExF,QAAM,SAAS,OAAO,aAAa,IAAI,wBAAwB,CAAC;AAEhE,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,sBAAsB,OAAO,SAAS,MAAM,KAAK,SAAS,IAAI,SAAS;AAAA,EACzE;AACF;AAEO,SAAS,oBAAoB,cAAsD;AACxF,QAAM,UAAU,aAAa,IAAI,yBAAyB;AAC1D,MAAI,CAAC,WAAW,CAAC,mBAAmB,OAAO,EAAG,QAAO;AAErD,QAAM,OAAO,aAAa,IAAI,sBAAsB;AACpD,QAAM,eAAe,QAAQ,iBAAiB,IAAI,IAAI,OAAO;AAC7D,QAAM,aACJ,iBAAiB,eAAe,QAAS,aAAa,IAAI,wBAAwB,KAAK,SAAa;AAEtG,SAAO,EAAE,SAAS,MAAM,cAAc,YAAY,UAAU,aAAa,cAAc,YAAY,EAAE;AACvG;","names":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { create } from "zustand";
|
|
3
|
+
const useAccountUnsavedChanges = create((set, get) => ({
|
|
4
|
+
dirtyForm: null,
|
|
5
|
+
pendingAction: null,
|
|
6
|
+
setDirtyForm: (dirtyForm) => set({ dirtyForm }),
|
|
7
|
+
guard: (action) => {
|
|
8
|
+
if (get().dirtyForm) {
|
|
9
|
+
set({ pendingAction: action });
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
action();
|
|
13
|
+
},
|
|
14
|
+
save: () => get().dirtyForm?.submit(),
|
|
15
|
+
completeSave: () => {
|
|
16
|
+
const { pendingAction } = get();
|
|
17
|
+
set({ pendingAction: null });
|
|
18
|
+
pendingAction?.();
|
|
19
|
+
},
|
|
20
|
+
discard: () => {
|
|
21
|
+
const { dirtyForm, pendingAction } = get();
|
|
22
|
+
dirtyForm?.discard();
|
|
23
|
+
set({ dirtyForm: null, pendingAction: null });
|
|
24
|
+
pendingAction?.();
|
|
25
|
+
},
|
|
26
|
+
dismiss: () => set({ pendingAction: null })
|
|
27
|
+
}));
|
|
28
|
+
export {
|
|
29
|
+
useAccountUnsavedChanges
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=useAccountUnsavedChanges.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/store/useAccountUnsavedChanges.ts"],"sourcesContent":["'use client';\n\nimport { create } from 'zustand';\n\ninterface DirtyAccountForm {\n submit: () => void;\n discard: () => void;\n}\n\ninterface AccountUnsavedChangesState {\n dirtyForm: DirtyAccountForm | null;\n pendingAction: (() => void) | null;\n\n setDirtyForm: (form: DirtyAccountForm | null) => void;\n guard: (action: () => void) => void;\n save: () => void;\n completeSave: () => void;\n discard: () => void;\n dismiss: () => void;\n}\n\nexport const useAccountUnsavedChanges = create<AccountUnsavedChangesState>((set, get) => ({\n dirtyForm: null,\n pendingAction: null,\n\n setDirtyForm: (dirtyForm) => set({ dirtyForm }),\n\n guard: (action) => {\n if (get().dirtyForm) {\n set({ pendingAction: action });\n return;\n }\n action();\n },\n\n save: () => get().dirtyForm?.submit(),\n\n completeSave: () => {\n const { pendingAction } = get();\n set({ pendingAction: null });\n pendingAction?.();\n },\n\n discard: () => {\n const { dirtyForm, pendingAction } = get();\n dirtyForm?.discard();\n set({ dirtyForm: null, pendingAction: null });\n pendingAction?.();\n },\n\n dismiss: () => set({ pendingAction: null }),\n}));\n"],"mappings":";AAEA,SAAS,cAAc;AAmBhB,MAAM,2BAA2B,OAAmC,CAAC,KAAK,SAAS;AAAA,EACxF,WAAW;AAAA,EACX,eAAe;AAAA,EAEf,cAAc,CAAC,cAAc,IAAI,EAAE,UAAU,CAAC;AAAA,EAE9C,OAAO,CAAC,WAAW;AACjB,QAAI,IAAI,EAAE,WAAW;AACnB,UAAI,EAAE,eAAe,OAAO,CAAC;AAC7B;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,MAAM,IAAI,EAAE,WAAW,OAAO;AAAA,EAEpC,cAAc,MAAM;AAClB,UAAM,EAAE,cAAc,IAAI,IAAI;AAC9B,QAAI,EAAE,eAAe,KAAK,CAAC;AAC3B,oBAAgB;AAAA,EAClB;AAAA,EAEA,SAAS,MAAM;AACb,UAAM,EAAE,WAAW,cAAc,IAAI,IAAI;AACzC,eAAW,QAAQ;AACnB,QAAI,EAAE,WAAW,MAAM,eAAe,KAAK,CAAC;AAC5C,oBAAgB;AAAA,EAClB;AAAA,EAEA,SAAS,MAAM,IAAI,EAAE,eAAe,KAAK,CAAC;AAC5C,EAAE;","names":[]}
|
package/package.json
CHANGED
|
@@ -4,9 +4,13 @@ import { useEffect, useRef } from 'react';
|
|
|
4
4
|
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
|
|
5
5
|
import useAccountHubActions from './hooks/useAccountHubActions';
|
|
6
6
|
import {
|
|
7
|
+
ACCOUNT_HUB_CHARGE_PARAM,
|
|
7
8
|
ACCOUNT_HUB_COUPON_PARAM,
|
|
8
9
|
ACCOUNT_HUB_FLOW_PARAM,
|
|
10
|
+
ACCOUNT_HUB_PERIOD_PARAM,
|
|
11
|
+
ACCOUNT_HUB_PLAN_PARAM,
|
|
9
12
|
ACCOUNT_HUB_SECTION_PARAM,
|
|
13
|
+
ACCOUNT_HUB_TOTAL_PARAM,
|
|
10
14
|
} from '../../modules/accounts/constants/account-hub-link.constants';
|
|
11
15
|
import { parseAccountHubLink } from '../../modules/accounts/utils/parse-account-hub-link';
|
|
12
16
|
|
|
@@ -28,9 +32,17 @@ export function AccountHubLinkHandler() {
|
|
|
28
32
|
openLink(link);
|
|
29
33
|
|
|
30
34
|
const remaining = new URLSearchParams(query);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
for (const param of [
|
|
36
|
+
ACCOUNT_HUB_SECTION_PARAM,
|
|
37
|
+
ACCOUNT_HUB_FLOW_PARAM,
|
|
38
|
+
ACCOUNT_HUB_COUPON_PARAM,
|
|
39
|
+
ACCOUNT_HUB_PLAN_PARAM,
|
|
40
|
+
ACCOUNT_HUB_TOTAL_PARAM,
|
|
41
|
+
ACCOUNT_HUB_PERIOD_PARAM,
|
|
42
|
+
ACCOUNT_HUB_CHARGE_PARAM,
|
|
43
|
+
]) {
|
|
44
|
+
remaining.delete(param);
|
|
45
|
+
}
|
|
34
46
|
const remainingQuery = remaining.toString();
|
|
35
47
|
router.replace(remainingQuery ? `${pathname}?${remainingQuery}` : pathname, { scroll: false });
|
|
36
48
|
}, [query, pathname, router, openLink]);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useTranslations } from 'next-intl';
|
|
4
|
+
import { IconAlertTriangle } from '@tabler/icons-react';
|
|
5
|
+
import { Button } from '../ui/buttons/Button';
|
|
6
|
+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '../ui/overlay/Dialog';
|
|
7
|
+
import { Separator } from '../ui/data-display/Separator';
|
|
8
|
+
import { useAccountUnsavedChanges } from '../../store/useAccountUnsavedChanges';
|
|
9
|
+
|
|
10
|
+
export default function AccountUnsavedChangesDialog() {
|
|
11
|
+
const translate = useTranslations();
|
|
12
|
+
const { pendingAction, save, discard, dismiss } = useAccountUnsavedChanges();
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Dialog open={pendingAction !== null} onOpenChange={(nextOpen) => !nextOpen && dismiss()}>
|
|
16
|
+
<DialogContent className="flex flex-col p-0 gap-0 md:w-[386px]! lg:w-[386px]! max-w-[386px]! max-[386px]:w-[calc(100%-32px)]">
|
|
17
|
+
<DialogHeader className="sr-only">
|
|
18
|
+
<DialogTitle>{translate('common.account.unsavedChanges.title')}</DialogTitle>
|
|
19
|
+
<DialogDescription>{translate('common.account.unsavedChanges.description')}</DialogDescription>
|
|
20
|
+
</DialogHeader>
|
|
21
|
+
|
|
22
|
+
<div className="flex flex-col gap-3 p-5">
|
|
23
|
+
<div className="flex items-center justify-center bg-gray-50 rounded-lg size-10">
|
|
24
|
+
<IconAlertTriangle size={24} className="text-gray-950" />
|
|
25
|
+
</div>
|
|
26
|
+
<div className="flex flex-col gap-2">
|
|
27
|
+
<span className="paragraph-medium-semibold text-gray-950">
|
|
28
|
+
{translate('common.account.unsavedChanges.title')}
|
|
29
|
+
</span>
|
|
30
|
+
<span className="paragraph-small-regular text-gray-600">
|
|
31
|
+
{translate('common.account.unsavedChanges.description')}
|
|
32
|
+
</span>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<Separator className="w-full" />
|
|
37
|
+
|
|
38
|
+
<div className="flex items-center gap-2 p-5">
|
|
39
|
+
<Button onClick={save} className="h-10!">
|
|
40
|
+
{translate('common.actions.save')}
|
|
41
|
+
</Button>
|
|
42
|
+
<Button variant="secondary" onClick={discard} className="h-10!">
|
|
43
|
+
{translate('common.account.unsavedChanges.discard')}
|
|
44
|
+
</Button>
|
|
45
|
+
</div>
|
|
46
|
+
</DialogContent>
|
|
47
|
+
</Dialog>
|
|
48
|
+
);
|
|
49
|
+
}
|