@greatapps/common 1.1.792 → 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/hooks/useAccountHubActions.mjs +15 -0
- package/dist/components/account/hooks/useAccountHubActions.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/index.mjs +9 -1
- package/dist/index.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/package.json +1 -1
- package/src/components/account/AccountHubLinkHandler.tsx +15 -3
- package/src/components/account/hooks/useAccountHubActions.ts +17 -1
- 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/index.ts +5 -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
|
@@ -3,9 +3,13 @@ import { useEffect, useRef } from "react";
|
|
|
3
3
|
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
|
4
4
|
import useAccountHubActions from "./hooks/useAccountHubActions";
|
|
5
5
|
import {
|
|
6
|
+
ACCOUNT_HUB_CHARGE_PARAM,
|
|
6
7
|
ACCOUNT_HUB_COUPON_PARAM,
|
|
7
8
|
ACCOUNT_HUB_FLOW_PARAM,
|
|
8
|
-
|
|
9
|
+
ACCOUNT_HUB_PERIOD_PARAM,
|
|
10
|
+
ACCOUNT_HUB_PLAN_PARAM,
|
|
11
|
+
ACCOUNT_HUB_SECTION_PARAM,
|
|
12
|
+
ACCOUNT_HUB_TOTAL_PARAM
|
|
9
13
|
} from "../../modules/accounts/constants/account-hub-link.constants";
|
|
10
14
|
import { parseAccountHubLink } from "../../modules/accounts/utils/parse-account-hub-link";
|
|
11
15
|
function AccountHubLinkHandler() {
|
|
@@ -22,9 +26,17 @@ function AccountHubLinkHandler() {
|
|
|
22
26
|
if (!link) return;
|
|
23
27
|
openLink(link);
|
|
24
28
|
const remaining = new URLSearchParams(query);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
for (const param of [
|
|
30
|
+
ACCOUNT_HUB_SECTION_PARAM,
|
|
31
|
+
ACCOUNT_HUB_FLOW_PARAM,
|
|
32
|
+
ACCOUNT_HUB_COUPON_PARAM,
|
|
33
|
+
ACCOUNT_HUB_PLAN_PARAM,
|
|
34
|
+
ACCOUNT_HUB_TOTAL_PARAM,
|
|
35
|
+
ACCOUNT_HUB_PERIOD_PARAM,
|
|
36
|
+
ACCOUNT_HUB_CHARGE_PARAM
|
|
37
|
+
]) {
|
|
38
|
+
remaining.delete(param);
|
|
39
|
+
}
|
|
28
40
|
const remainingQuery = remaining.toString();
|
|
29
41
|
router.replace(remainingQuery ? `${pathname}?${remainingQuery}` : pathname, { scroll: false });
|
|
30
42
|
}, [query, pathname, router, openLink]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/account/AccountHubLinkHandler.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef } from 'react';\nimport { usePathname, useRouter, useSearchParams } from 'next/navigation';\nimport useAccountHubActions from './hooks/useAccountHubActions';\nimport {\n ACCOUNT_HUB_COUPON_PARAM,\n ACCOUNT_HUB_FLOW_PARAM,\n ACCOUNT_HUB_SECTION_PARAM,\n} from '../../modules/accounts/constants/account-hub-link.constants';\nimport { parseAccountHubLink } from '../../modules/accounts/utils/parse-account-hub-link';\n\nexport function AccountHubLinkHandler() {\n const searchParams = useSearchParams();\n const pathname = usePathname();\n const router = useRouter();\n const { openLink } = useAccountHubActions();\n const handledQueryRef = useRef<string | null>(null);\n const query = searchParams.toString();\n\n useEffect(() => {\n if (handledQueryRef.current === query) return;\n handledQueryRef.current = query;\n\n const link = parseAccountHubLink(new URLSearchParams(query));\n if (!link) return;\n\n openLink(link);\n\n const remaining = new URLSearchParams(query);\n
|
|
1
|
+
{"version":3,"sources":["../../../src/components/account/AccountHubLinkHandler.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef } from 'react';\nimport { usePathname, useRouter, useSearchParams } from 'next/navigation';\nimport useAccountHubActions from './hooks/useAccountHubActions';\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 '../../modules/accounts/constants/account-hub-link.constants';\nimport { parseAccountHubLink } from '../../modules/accounts/utils/parse-account-hub-link';\n\nexport function AccountHubLinkHandler() {\n const searchParams = useSearchParams();\n const pathname = usePathname();\n const router = useRouter();\n const { openLink } = useAccountHubActions();\n const handledQueryRef = useRef<string | null>(null);\n const query = searchParams.toString();\n\n useEffect(() => {\n if (handledQueryRef.current === query) return;\n handledQueryRef.current = query;\n\n const link = parseAccountHubLink(new URLSearchParams(query));\n if (!link) return;\n\n openLink(link);\n\n const remaining = new URLSearchParams(query);\n for (const param of [\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 ]) {\n remaining.delete(param);\n }\n const remainingQuery = remaining.toString();\n router.replace(remainingQuery ? `${pathname}?${remainingQuery}` : pathname, { scroll: false });\n }, [query, pathname, router, openLink]);\n\n return null;\n}\n"],"mappings":";AAEA,SAAS,WAAW,cAAc;AAClC,SAAS,aAAa,WAAW,uBAAuB;AACxD,OAAO,0BAA0B;AACjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,2BAA2B;AAE7B,SAAS,wBAAwB;AACtC,QAAM,eAAe,gBAAgB;AACrC,QAAM,WAAW,YAAY;AAC7B,QAAM,SAAS,UAAU;AACzB,QAAM,EAAE,SAAS,IAAI,qBAAqB;AAC1C,QAAM,kBAAkB,OAAsB,IAAI;AAClD,QAAM,QAAQ,aAAa,SAAS;AAEpC,YAAU,MAAM;AACd,QAAI,gBAAgB,YAAY,MAAO;AACvC,oBAAgB,UAAU;AAE1B,UAAM,OAAO,oBAAoB,IAAI,gBAAgB,KAAK,CAAC;AAC3D,QAAI,CAAC,KAAM;AAEX,aAAS,IAAI;AAEb,UAAM,YAAY,IAAI,gBAAgB,KAAK;AAC3C,eAAW,SAAS;AAAA,MAClB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,GAAG;AACD,gBAAU,OAAO,KAAK;AAAA,IACxB;AACA,UAAM,iBAAiB,UAAU,SAAS;AAC1C,WAAO,QAAQ,iBAAiB,GAAG,QAAQ,IAAI,cAAc,KAAK,UAAU,EAAE,QAAQ,MAAM,CAAC;AAAA,EAC/F,GAAG,CAAC,OAAO,UAAU,QAAQ,QAAQ,CAAC;AAEtC,SAAO;AACT;","names":[]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { AccountHubFlow } from "../../../enums/AccountHubFlow";
|
|
3
3
|
import { WorkspaceSectionType } from "../../../enums/WorkspaceSectionType";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
4
5
|
import { useCouponByCode } from "../../../modules/coupons/hooks/use-coupon-by-code.hook";
|
|
5
6
|
import { isAccountSectionType } from "../../../modules/accounts/utils/is-account-section";
|
|
7
|
+
import { getBillingPeriodSuffix } from "../../../modules/subscriptions/utils/periodicity";
|
|
6
8
|
import { useExternalContracting } from "../../../providers/whitelabel.provider";
|
|
7
9
|
import { useAccountModals } from "../../../store/useAccountModals";
|
|
8
10
|
import { useProjectFlows } from "../../../store/useProjectFlows";
|
|
@@ -16,7 +18,9 @@ function useAccountHubActions() {
|
|
|
16
18
|
const requestOverdueReceipt = useSubscriptionFlows((state) => state.requestOverdueReceipt);
|
|
17
19
|
const openCreateProjectFlow = useProjectFlows((state) => state.openCreateProject);
|
|
18
20
|
const openAddUserFlow = useTeamFlows((state) => state.openAddUser);
|
|
21
|
+
const openPaymentConfirmationFlow = useSubscriptionFlows((state) => state.openPaymentConfirmation);
|
|
19
22
|
const { redirectToExternal } = useExternalContracting();
|
|
23
|
+
const translate = useTranslations();
|
|
20
24
|
const { mutate: findCouponByCode } = useCouponByCode();
|
|
21
25
|
const openSection = (section) => {
|
|
22
26
|
if (isAccountSectionType(section)) {
|
|
@@ -59,6 +63,15 @@ function useAccountHubActions() {
|
|
|
59
63
|
openWorkspace(WorkspaceSectionType.TEAM);
|
|
60
64
|
openAddUserFlow();
|
|
61
65
|
};
|
|
66
|
+
const openPaymentConfirmation = (purchase) => {
|
|
67
|
+
openWorkspace(WorkspaceSectionType.SUBSCRIPTION);
|
|
68
|
+
openPaymentConfirmationFlow({
|
|
69
|
+
planName: purchase.planName,
|
|
70
|
+
total: purchase.total,
|
|
71
|
+
periodLabel: getBillingPeriodSuffix(purchase.billingPeriod, translate),
|
|
72
|
+
immediateChargeTotal: purchase.immediateChargeTotal
|
|
73
|
+
});
|
|
74
|
+
};
|
|
62
75
|
const openLink = (link) => {
|
|
63
76
|
if (link.flow === AccountHubFlow.PLANS) return openPlansCatalog(link.couponCode);
|
|
64
77
|
if (link.flow === AccountHubFlow.ADDONS) return openAddons();
|
|
@@ -66,6 +79,7 @@ function useAccountHubActions() {
|
|
|
66
79
|
if (link.flow === AccountHubFlow.RECEIPT) return openOverdueReceipt();
|
|
67
80
|
if (link.flow === AccountHubFlow.CREATE_PROJECT) return openCreateProject();
|
|
68
81
|
if (link.flow === AccountHubFlow.ADD_USER) return openAddUser();
|
|
82
|
+
if (link.flow === AccountHubFlow.CONFIRMATION && link.purchase) return openPaymentConfirmation(link.purchase);
|
|
69
83
|
openSection(link.section);
|
|
70
84
|
};
|
|
71
85
|
return {
|
|
@@ -76,6 +90,7 @@ function useAccountHubActions() {
|
|
|
76
90
|
openOverdueReceipt,
|
|
77
91
|
openCreateProject,
|
|
78
92
|
openAddUser,
|
|
93
|
+
openPaymentConfirmation,
|
|
79
94
|
openLink
|
|
80
95
|
};
|
|
81
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/account/hooks/useAccountHubActions.ts"],"sourcesContent":["'use client';\n\nimport { AccountHubFlow } from '../../../enums/AccountHubFlow';\nimport { WorkspaceSectionType } from '../../../enums/WorkspaceSectionType';\nimport { useCouponByCode } from '../../../modules/coupons/hooks/use-coupon-by-code.hook';\nimport { isAccountSectionType } from '../../../modules/accounts/utils/is-account-section';\nimport type { AccountHubLink } from '../../../modules/accounts/types/account-hub-link.type';\nimport { useExternalContracting } from '../../../providers/whitelabel.provider';\nimport { useAccountModals, type MyAccountSection } from '../../../store/useAccountModals';\nimport { useProjectFlows } from '../../../store/useProjectFlows';\nimport { useSubscriptionFlows } from '../../../store/useSubscriptionFlows';\nimport { useTeamFlows } from '../../../store/useTeamFlows';\n\nexport default function useAccountHubActions() {\n const openConfigurations = useAccountModals((state) => state.openConfigurations);\n const openWorkspace = useAccountModals((state) => state.openWorkspace);\n const openChangePlan = useSubscriptionFlows((state) => state.openChangePlan);\n const openPlansCatalogFlow = useSubscriptionFlows((state) => state.openPlansCatalog);\n const requestOverdueReceipt = useSubscriptionFlows((state) => state.requestOverdueReceipt);\n const openCreateProjectFlow = useProjectFlows((state) => state.openCreateProject);\n const openAddUserFlow = useTeamFlows((state) => state.openAddUser);\n const { redirectToExternal } = useExternalContracting();\n const { mutate: findCouponByCode } = useCouponByCode();\n\n const openSection = (section: MyAccountSection) => {\n if (isAccountSectionType(section)) {\n openConfigurations(section);\n return;\n }\n openWorkspace(section);\n };\n\n const openPlansCatalog = (couponCode?: string) => {\n if (redirectToExternal('plans')) return;\n openWorkspace(WorkspaceSectionType.SUBSCRIPTION);\n\n if (!couponCode) {\n openPlansCatalogFlow();\n return;\n }\n\n findCouponByCode(couponCode, {\n onSuccess: (coupon) => openPlansCatalogFlow({ appliedCouponStripeData: coupon?.stripe_data }),\n onError: () => openPlansCatalogFlow(),\n });\n };\n\n const openAddons = () => {\n if (redirectToExternal('contracting')) return;\n openWorkspace(WorkspaceSectionType.SUBSCRIPTION);\n openChangePlan();\n };\n\n const openReactivate = () => {\n if (redirectToExternal('contracting')) return;\n openWorkspace(WorkspaceSectionType.SUBSCRIPTION);\n openChangePlan({ isReactivation: true });\n };\n\n const openOverdueReceipt = () => {\n openWorkspace(WorkspaceSectionType.SUBSCRIPTION);\n requestOverdueReceipt();\n };\n\n const openCreateProject = () => {\n openWorkspace(WorkspaceSectionType.PROJECTS);\n openCreateProjectFlow();\n };\n\n const openAddUser = () => {\n openWorkspace(WorkspaceSectionType.TEAM);\n openAddUserFlow();\n };\n\n const openLink = (link: AccountHubLink) => {\n if (link.flow === AccountHubFlow.PLANS) return openPlansCatalog(link.couponCode);\n if (link.flow === AccountHubFlow.ADDONS) return openAddons();\n if (link.flow === AccountHubFlow.REACTIVATE) return openReactivate();\n if (link.flow === AccountHubFlow.RECEIPT) return openOverdueReceipt();\n if (link.flow === AccountHubFlow.CREATE_PROJECT) return openCreateProject();\n if (link.flow === AccountHubFlow.ADD_USER) return openAddUser();\n openSection(link.section);\n };\n\n return {\n openSection,\n openPlansCatalog,\n openAddons,\n openReactivate,\n openOverdueReceipt,\n openCreateProject,\n openAddUser,\n openLink,\n };\n}\n"],"mappings":";AAEA,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,4BAA4B;AAErC,SAAS,8BAA8B;AACvC,SAAS,wBAA+C;AACxD,SAAS,uBAAuB;AAChC,SAAS,4BAA4B;AACrC,SAAS,oBAAoB;AAEd,SAAR,uBAAwC;AAC7C,QAAM,qBAAqB,iBAAiB,CAAC,UAAU,MAAM,kBAAkB;AAC/E,QAAM,gBAAgB,iBAAiB,CAAC,UAAU,MAAM,aAAa;AACrE,QAAM,iBAAiB,qBAAqB,CAAC,UAAU,MAAM,cAAc;AAC3E,QAAM,uBAAuB,qBAAqB,CAAC,UAAU,MAAM,gBAAgB;AACnF,QAAM,wBAAwB,qBAAqB,CAAC,UAAU,MAAM,qBAAqB;AACzF,QAAM,wBAAwB,gBAAgB,CAAC,UAAU,MAAM,iBAAiB;AAChF,QAAM,kBAAkB,aAAa,CAAC,UAAU,MAAM,WAAW;AACjE,QAAM,EAAE,mBAAmB,IAAI,uBAAuB;AACtD,QAAM,EAAE,QAAQ,iBAAiB,IAAI,gBAAgB;AAErD,QAAM,cAAc,CAAC,YAA8B;AACjD,QAAI,qBAAqB,OAAO,G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AY,KAAK,OAAO;AAAA,EAC1B;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/account/hooks/useAccountHubActions.ts"],"sourcesContent":["'use client';\n\nimport { AccountHubFlow } from '../../../enums/AccountHubFlow';\nimport { WorkspaceSectionType } from '../../../enums/WorkspaceSectionType';\nimport { useTranslations } from 'next-intl';\nimport { useCouponByCode } from '../../../modules/coupons/hooks/use-coupon-by-code.hook';\nimport { isAccountSectionType } from '../../../modules/accounts/utils/is-account-section';\nimport type { AccountHubLink, AccountHubPurchase } from '../../../modules/accounts/types/account-hub-link.type';\nimport { getBillingPeriodSuffix } from '../../../modules/subscriptions/utils/periodicity';\nimport { useExternalContracting } from '../../../providers/whitelabel.provider';\nimport { useAccountModals, type MyAccountSection } from '../../../store/useAccountModals';\nimport { useProjectFlows } from '../../../store/useProjectFlows';\nimport { useSubscriptionFlows } from '../../../store/useSubscriptionFlows';\nimport { useTeamFlows } from '../../../store/useTeamFlows';\n\nexport default function useAccountHubActions() {\n const openConfigurations = useAccountModals((state) => state.openConfigurations);\n const openWorkspace = useAccountModals((state) => state.openWorkspace);\n const openChangePlan = useSubscriptionFlows((state) => state.openChangePlan);\n const openPlansCatalogFlow = useSubscriptionFlows((state) => state.openPlansCatalog);\n const requestOverdueReceipt = useSubscriptionFlows((state) => state.requestOverdueReceipt);\n const openCreateProjectFlow = useProjectFlows((state) => state.openCreateProject);\n const openAddUserFlow = useTeamFlows((state) => state.openAddUser);\n const openPaymentConfirmationFlow = useSubscriptionFlows((state) => state.openPaymentConfirmation);\n const { redirectToExternal } = useExternalContracting();\n const translate = useTranslations();\n const { mutate: findCouponByCode } = useCouponByCode();\n\n const openSection = (section: MyAccountSection) => {\n if (isAccountSectionType(section)) {\n openConfigurations(section);\n return;\n }\n openWorkspace(section);\n };\n\n const openPlansCatalog = (couponCode?: string) => {\n if (redirectToExternal('plans')) return;\n openWorkspace(WorkspaceSectionType.SUBSCRIPTION);\n\n if (!couponCode) {\n openPlansCatalogFlow();\n return;\n }\n\n findCouponByCode(couponCode, {\n onSuccess: (coupon) => openPlansCatalogFlow({ appliedCouponStripeData: coupon?.stripe_data }),\n onError: () => openPlansCatalogFlow(),\n });\n };\n\n const openAddons = () => {\n if (redirectToExternal('contracting')) return;\n openWorkspace(WorkspaceSectionType.SUBSCRIPTION);\n openChangePlan();\n };\n\n const openReactivate = () => {\n if (redirectToExternal('contracting')) return;\n openWorkspace(WorkspaceSectionType.SUBSCRIPTION);\n openChangePlan({ isReactivation: true });\n };\n\n const openOverdueReceipt = () => {\n openWorkspace(WorkspaceSectionType.SUBSCRIPTION);\n requestOverdueReceipt();\n };\n\n const openCreateProject = () => {\n openWorkspace(WorkspaceSectionType.PROJECTS);\n openCreateProjectFlow();\n };\n\n const openAddUser = () => {\n openWorkspace(WorkspaceSectionType.TEAM);\n openAddUserFlow();\n };\n\n const openPaymentConfirmation = (purchase: AccountHubPurchase) => {\n openWorkspace(WorkspaceSectionType.SUBSCRIPTION);\n openPaymentConfirmationFlow({\n planName: purchase.planName,\n total: purchase.total,\n periodLabel: getBillingPeriodSuffix(purchase.billingPeriod, translate),\n immediateChargeTotal: purchase.immediateChargeTotal,\n });\n };\n\n const openLink = (link: AccountHubLink) => {\n if (link.flow === AccountHubFlow.PLANS) return openPlansCatalog(link.couponCode);\n if (link.flow === AccountHubFlow.ADDONS) return openAddons();\n if (link.flow === AccountHubFlow.REACTIVATE) return openReactivate();\n if (link.flow === AccountHubFlow.RECEIPT) return openOverdueReceipt();\n if (link.flow === AccountHubFlow.CREATE_PROJECT) return openCreateProject();\n if (link.flow === AccountHubFlow.ADD_USER) return openAddUser();\n if (link.flow === AccountHubFlow.CONFIRMATION && link.purchase) return openPaymentConfirmation(link.purchase);\n openSection(link.section);\n };\n\n return {\n openSection,\n openPlansCatalog,\n open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AAK,QAAQ;AAC5G,gBAAY,KAAK,OAAO;AAAA,EAC1B;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { IconInfoCircle } from "@tabler/icons-react";
|
|
4
4
|
import { useTranslations } from "next-intl";
|
|
5
5
|
import { Dialog, DialogContent, DialogTitle } from "../../../ui/overlay/Dialog";
|
|
6
|
+
import { SuccessConfettiIcon } from "../../../ui/data-display/SuccessConfettiIcon";
|
|
6
7
|
import { useCurrencyFormatter } from "../../../../modules/accounts/hooks/use-currency-formatter.hook";
|
|
7
8
|
import { useIsDefaultWhitelabel } from "../../../../providers/whitelabel.provider";
|
|
8
9
|
import { cn } from "../../../../infra/utils/clsx";
|
|
@@ -18,7 +19,7 @@ function PaymentConfirmationDialog() {
|
|
|
18
19
|
const immediateChargeTotal = confirmation?.immediateChargeTotal;
|
|
19
20
|
const hasImmediateCharge = immediateChargeTotal != null && immediateChargeTotal > 0;
|
|
20
21
|
return /* @__PURE__ */ jsx(Dialog, { open: !!confirmation, onOpenChange: (nextOpen) => !nextOpen && close(), children: /* @__PURE__ */ jsxs(DialogContent, { className: "flex flex-col p-4 lg:p-6 gap-4 items-center max-w-[calc(100%-32px)]! h-auto! rounded-lg border top-[50%]! left-[50%]! right-auto! bottom-auto! translate-x-[-50%]! translate-y-[-50%]! lg:max-w-[386px]!", children: [
|
|
21
|
-
/* @__PURE__ */ jsx(
|
|
22
|
+
/* @__PURE__ */ jsx(SuccessConfettiIcon, {}),
|
|
22
23
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
23
24
|
/* @__PURE__ */ jsx(DialogTitle, { className: "paragraph-medium-semibold text-zinc-950", children: translate("subscriptionConfirmed") }),
|
|
24
25
|
/* @__PURE__ */ jsxs("p", { className: "paragraph-small-regular text-zinc-500", children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/account/sections/subscription/PaymentConfirmationDialog.tsx"],"sourcesContent":["'use client';\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/subscription/PaymentConfirmationDialog.tsx"],"sourcesContent":["'use client';\n\nimport { IconInfoCircle } from '@tabler/icons-react';\nimport { useTranslations } from 'next-intl';\nimport { Dialog, DialogContent, DialogTitle } from '../../../ui/overlay/Dialog';\nimport { SuccessConfettiIcon } from '../../../ui/data-display/SuccessConfettiIcon';\nimport { useCurrencyFormatter } from '../../../../modules/accounts/hooks/use-currency-formatter.hook';\nimport { useIsDefaultWhitelabel } from '../../../../providers/whitelabel.provider';\nimport { cn } from '../../../../infra/utils/clsx';\nimport { useSubscriptionFlows } from '../../../../store/useSubscriptionFlows';\n\n/** Confirmação depois da cobrança no cartão da troca de plano. */\nexport function PaymentConfirmationDialog() {\n const translate = useTranslations('common.account.workspace.subscription.paymentConfirmation');\n const { formatCurrencyNumber } = useCurrencyFormatter();\n const isDefaultWhitelabel = useIsDefaultWhitelabel();\n\n const confirmation = useSubscriptionFlows((state) => state.paymentConfirmation);\n const close = useSubscriptionFlows((state) => state.closePaymentConfirmation);\n\n const formattedTotal = formatCurrencyNumber(confirmation?.total ?? 0);\n const priceDisplay = confirmation?.periodLabel\n ? `${formattedTotal}${confirmation.periodLabel}`\n : formattedTotal;\n const immediateChargeTotal = confirmation?.immediateChargeTotal;\n const hasImmediateCharge = immediateChargeTotal != null && immediateChargeTotal > 0;\n\n return (\n <Dialog open={!!confirmation} onOpenChange={(nextOpen) => !nextOpen && close()}>\n <DialogContent className=\"flex flex-col p-4 lg:p-6 gap-4 items-center max-w-[calc(100%-32px)]! h-auto! rounded-lg border top-[50%]! left-[50%]! right-auto! bottom-auto! translate-x-[-50%]! translate-y-[-50%]! lg:max-w-[386px]!\">\n <SuccessConfettiIcon />\n\n <div className=\"flex flex-col gap-2 text-center\">\n <DialogTitle className=\"paragraph-medium-semibold text-zinc-950\">\n {translate('subscriptionConfirmed')}\n </DialogTitle>\n <p className=\"paragraph-small-regular text-zinc-500\">\n {translate.rich('youSubscribed', {\n planName: confirmation?.planName ?? '',\n b: (chunks) => <span className=\"font-semibold text-zinc-950\">{chunks}</span>,\n })}\n <br />\n {translate.rich('price', {\n price: priceDisplay,\n b: (chunks) => <span className=\"font-semibold text-zinc-950\">{chunks}</span>,\n })}\n {hasImmediateCharge && (\n <>\n <br />\n {translate.rich('immediateCharge', {\n amount: formatCurrencyNumber(immediateChargeTotal),\n b: (chunks) => <span className=\"font-semibold text-zinc-950\">{chunks}</span>,\n })}\n </>\n )}\n </p>\n </div>\n\n <div\n className={cn(\n 'flex items-center gap-3 p-4 rounded-lg w-full',\n isDefaultWhitelabel ? 'bg-cyan-50' : 'bg-zinc-50'\n )}\n >\n <IconInfoCircle size={16} className=\"shrink-0 text-zinc-950\" />\n <p className=\"paragraph-small-regular text-zinc-950\">{translate('manageInfo')}</p>\n </div>\n </DialogContent>\n </Dialog>\n );\n}\n"],"mappings":";AA8BQ,SAiBM,UAjBN,KAiBM,YAjBN;AA5BR,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,QAAQ,eAAe,mBAAmB;AACnD,SAAS,2BAA2B;AACpC,SAAS,4BAA4B;AACrC,SAAS,8BAA8B;AACvC,SAAS,UAAU;AACnB,SAAS,4BAA4B;AAG9B,SAAS,4BAA4B;AAC1C,QAAM,YAAY,gBAAgB,2DAA2D;AAC7F,QAAM,EAAE,qBAAqB,IAAI,qBAAqB;AACtD,QAAM,sBAAsB,uBAAuB;AAEnD,QAAM,eAAe,qBAAqB,CAAC,UAAU,MAAM,mBAAmB;AAC9E,QAAM,QAAQ,qBAAqB,CAAC,UAAU,MAAM,wBAAwB;AAE5E,QA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names":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
function SuccessConfettiIcon({ className }) {
|
|
3
|
+
return /* @__PURE__ */ jsxs(
|
|
4
|
+
"svg",
|
|
5
|
+
{
|
|
6
|
+
width: "149",
|
|
7
|
+
height: "83",
|
|
8
|
+
viewBox: "0 0 149 83",
|
|
9
|
+
fill: "none",
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
+
className,
|
|
12
|
+
"aria-hidden": true,
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ jsx("path", { opacity: "0.4", d: "M18.6348 28.4102C18.6348 30.574 19.9096 30.8716 21.7838 31.1393", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
15
|
+
/* @__PURE__ */ jsx("path", { opacity: "0.4", d: "M109.117 41.4266C110.106 41.3745 110.639 40.9023 110.797 39.957", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
16
|
+
/* @__PURE__ */ jsx("path", { opacity: "0.4", d: "M64.6035 75.1963C62.2234 77.2378 61.7986 79.4524 63.2302 82.1283", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
17
|
+
/* @__PURE__ */ jsx("path", { opacity: "0.4", d: "M108.953 6.33984C106.531 6.40444 105.075 7.59006 104.965 10.072C104.898 11.5735 105.114 12.692 103.285 13.0577", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
18
|
+
/* @__PURE__ */ jsx("path", { opacity: "0.4", d: "M131.021 51.2682C130.631 53.6598 129.26 54.9429 126.786 54.7178C125.289 54.5817 124.21 54.217 123.601 55.9798", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
19
|
+
/* @__PURE__ */ jsx("path", { opacity: "0.4", d: "M34.1753 59.0104C33.2963 61.0245 32.8213 61.1372 30.7893 61.1213C29.7394 61.1131 28.0011 61.8028 27.5653 62.8448", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
20
|
+
/* @__PURE__ */ jsx("path", { d: "M112.314 25.2715L113.514 24.7026", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
21
|
+
/* @__PURE__ */ jsx("path", { d: "M51.492 49.2344C51.0065 49.3838 50.6337 49.7823 50.2324 50.0741", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
22
|
+
/* @__PURE__ */ jsx("path", { opacity: "0.4", d: "M77.8867 9.72656C77.4011 9.87596 77.3223 10.0019 77.3223 10.0019", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
23
|
+
/* @__PURE__ */ jsx("path", { opacity: "0.4", d: "M10.7246 56.0059C10.239 56.1553 10.1602 56.2812 10.1602 56.2812", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
24
|
+
/* @__PURE__ */ jsx("path", { opacity: "0.4", d: "M28.3302 80.1108C28.6726 79.7356 28.6766 79.587 28.6766 79.587", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
25
|
+
/* @__PURE__ */ jsx("path", { opacity: "0.4", d: "M128.043 49.0421C127.77 48.6138 127.627 48.5713 127.627 48.5713", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
26
|
+
/* @__PURE__ */ jsx("path", { opacity: "0.4", d: "M135.461 29.4915C134.972 29.6314 134.891 29.7558 134.891 29.7558", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
27
|
+
/* @__PURE__ */ jsx("path", { opacity: "0.4", d: "M52.3396 22.1222C52.0664 21.6939 51.924 21.6514 51.924 21.6514", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
28
|
+
/* @__PURE__ */ jsx("path", { d: "M45.9383 40.1115L45.1508 39.1744", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
29
|
+
/* @__PURE__ */ jsx("path", { opacity: "0.8", d: "M97.7421 69.0733C97.1523 69.9712 97.989 71.6124 98.5913 72.3132C99.7005 73.6036 100.945 73.8145 102.199 73.9149C103.234 73.9977 105.21 73.5621 105.476 72.3174C105.948 71.1367 104.935 69.8432 103.934 70.3872C102.571 71.1277 103.112 72.7192 103.73 73.7787C104.604 75.2776 105.879 76.6545 107.249 77.7108C108.333 78.5474 109.732 79.029 110.308 79.0142", stroke: "#12B76A", strokeWidth: "1.41098", strokeLinecap: "round" }),
|
|
30
|
+
/* @__PURE__ */ jsx("path", { d: "M55.1022 11.4613C55.7297 11.187 55.8499 9.89737 55.7699 9.24592C55.6225 8.04626 55.0286 7.4129 54.3908 6.83895C53.8646 6.36537 52.6539 5.803 52.0797 6.41026C51.4175 6.89618 51.5122 8.05793 52.2377 8.15673C53.2253 8.2912 53.4868 7.15184 53.5227 6.28731C53.5734 5.06421 53.367 3.74644 52.9989 2.5746C52.7073 1.64647 52.1242 0.793399 51.8104 0.565035", stroke: "#12B76A", strokeWidth: "1.12879", strokeLinecap: "round" }),
|
|
31
|
+
/* @__PURE__ */ jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M58.1139 44.0572L60.4163 47.0706L60.9134 50.8219C61.1889 52.9028 62.8247 54.5405 64.9056 54.818L68.6666 55.3208L71.678 57.6214C73.3446 58.8949 75.6548 58.8949 77.3214 57.6214L80.3348 55.3189H80.3309L84.0842 54.8218C86.1651 54.5463 87.8028 52.9105 88.0802 50.8297L88.5812 47.0687C88.5812 47.0706 89.7449 45.5466 90.8836 44.0572C92.1572 42.3906 92.1553 40.0805 90.8836 38.4138L88.585 35.3985L88.0879 31.6472C87.8124 29.5663 86.1766 27.9286 84.0958 27.6512L80.3329 27.1502L77.3214 24.8497C75.6548 23.5761 73.3446 23.5761 71.678 24.8497L68.6646 27.1502H68.6685L64.9152 27.6492C62.8344 27.9248 61.1966 29.5605 60.9192 31.6414L60.4163 35.4024C60.4163 35.4004 59.2526 36.9245 58.1139 38.4138C56.8422 40.0785 56.8422 42.3906 58.1139 44.0572V44.0572Z", stroke: "#12B76A", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
32
|
+
/* @__PURE__ */ jsx("path", { d: "M79.9009 38.541L73.1554 45.2865L69.1035 41.2384", stroke: "#12B76A", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
SuccessConfettiIcon
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=SuccessConfettiIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/data-display/SuccessConfettiIcon.tsx"],"sourcesContent":["export function SuccessConfettiIcon({ className }: { className?: string }) {\n return (\n <svg\n width=\"149\"\n height=\"83\"\n viewBox=\"0 0 149 83\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n aria-hidden\n >\n <path opacity=\"0.4\" d=\"M18.6348 28.4102C18.6348 30.574 19.9096 30.8716 21.7838 31.1393\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path opacity=\"0.4\" d=\"M109.117 41.4266C110.106 41.3745 110.639 40.9023 110.797 39.957\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path opacity=\"0.4\" d=\"M64.6035 75.1963C62.2234 77.2378 61.7986 79.4524 63.2302 82.1283\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path opacity=\"0.4\" d=\"M108.953 6.33984C106.531 6.40444 105.075 7.59006 104.965 10.072C104.898 11.5735 105.114 12.692 103.285 13.0577\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path opacity=\"0.4\" d=\"M131.021 51.2682C130.631 53.6598 129.26 54.9429 126.786 54.7178C125.289 54.5817 124.21 54.217 123.601 55.9798\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path opacity=\"0.4\" d=\"M34.1753 59.0104C33.2963 61.0245 32.8213 61.1372 30.7893 61.1213C29.7394 61.1131 28.0011 61.8028 27.5653 62.8448\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path d=\"M112.314 25.2715L113.514 24.7026\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path d=\"M51.492 49.2344C51.0065 49.3838 50.6337 49.7823 50.2324 50.0741\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path opacity=\"0.4\" d=\"M77.8867 9.72656C77.4011 9.87596 77.3223 10.0019 77.3223 10.0019\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path opacity=\"0.4\" d=\"M10.7246 56.0059C10.239 56.1553 10.1602 56.2812 10.1602 56.2812\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path opacity=\"0.4\" d=\"M28.3302 80.1108C28.6726 79.7356 28.6766 79.587 28.6766 79.587\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path opacity=\"0.4\" d=\"M128.043 49.0421C127.77 48.6138 127.627 48.5713 127.627 48.5713\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path opacity=\"0.4\" d=\"M135.461 29.4915C134.972 29.6314 134.891 29.7558 134.891 29.7558\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path opacity=\"0.4\" d=\"M52.3396 22.1222C52.0664 21.6939 51.924 21.6514 51.924 21.6514\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path d=\"M45.9383 40.1115L45.1508 39.1744\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path opacity=\"0.8\" d=\"M97.7421 69.0733C97.1523 69.9712 97.989 71.6124 98.5913 72.3132C99.7005 73.6036 100.945 73.8145 102.199 73.9149C103.234 73.9977 105.21 73.5621 105.476 72.3174C105.948 71.1367 104.935 69.8432 103.934 70.3872C102.571 71.1277 103.112 72.7192 103.73 73.7787C104.604 75.2776 105.879 76.6545 107.249 77.7108C108.333 78.5474 109.732 79.029 110.308 79.0142\" stroke=\"#12B76A\" strokeWidth=\"1.41098\" strokeLinecap=\"round\"/>\n <path d=\"M55.1022 11.4613C55.7297 11.187 55.8499 9.89737 55.7699 9.24592C55.6225 8.04626 55.0286 7.4129 54.3908 6.83895C53.8646 6.36537 52.6539 5.803 52.0797 6.41026C51.4175 6.89618 51.5122 8.05793 52.2377 8.15673C53.2253 8.2912 53.4868 7.15184 53.5227 6.28731C53.5734 5.06421 53.367 3.74644 52.9989 2.5746C52.7073 1.64647 52.1242 0.793399 51.8104 0.565035\" stroke=\"#12B76A\" strokeWidth=\"1.12879\" strokeLinecap=\"round\"/>\n <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M58.1139 44.0572L60.4163 47.0706L60.9134 50.8219C61.1889 52.9028 62.8247 54.5405 64.9056 54.818L68.6666 55.3208L71.678 57.6214C73.3446 58.8949 75.6548 58.8949 77.3214 57.6214L80.3348 55.3189H80.3309L84.0842 54.8218C86.1651 54.5463 87.8028 52.9105 88.0802 50.8297L88.5812 47.0687C88.5812 47.0706 89.7449 45.5466 90.8836 44.0572C92.1572 42.3906 92.1553 40.0805 90.8836 38.4138L88.585 35.3985L88.0879 31.6472C87.8124 29.5663 86.1766 27.9286 84.0958 27.6512L80.3329 27.1502L77.3214 24.8497C75.6548 23.5761 73.3446 23.5761 71.678 24.8497L68.6646 27.1502H68.6685L64.9152 27.6492C62.8344 27.9248 61.1966 29.5605 60.9192 31.6414L60.4163 35.4024C60.4163 35.4004 59.2526 36.9245 58.1139 38.4138C56.8422 40.0785 56.8422 42.3906 58.1139 44.0572V44.0572Z\" stroke=\"#12B76A\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <path d=\"M79.9009 38.541L73.1554 45.2865L69.1035 41.2384\" stroke=\"#12B76A\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n </svg>\n );\n}\n"],"mappings":"AAEI,SASE,KATF;AAFG,SAAS,oBAAoB,EAAE,UAAU,GAA2B;AACzE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MACN;AAAA,MACA,eAAW;AAAA,MAEX;AAAA,4BAAC,UAAK,SAAQ,OAAM,GAAE,mEAAkE,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACpJ,oBAAC,UAAK,SAAQ,OAAM,GAAE,mEAAkE,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACpJ,oBAAC,UAAK,SAAQ,OAAM,GAAE,oEAAmE,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACrJ,oBAAC,UAAK,SAAQ,OAAM,GAAE,kHAAiH,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACnM,oBAAC,UAAK,SAAQ,OAAM,GAAE,iHAAgH,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QAClM,oBAAC,UAAK,SAAQ,OAAM,GAAE,oHAAmH,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACrM,oBAAC,UAAK,GAAE,oCAAmC,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACvG,oBAAC,UAAK,GAAE,mEAAkE,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACtI,oBAAC,UAAK,SAAQ,OAAM,GAAE,oEAAmE,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACrJ,oBAAC,UAAK,SAAQ,OAAM,GAAE,mEAAkE,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACpJ,oBAAC,UAAK,SAAQ,OAAM,GAAE,kEAAiE,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACnJ,oBAAC,UAAK,SAAQ,OAAM,GAAE,mEAAkE,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACpJ,oBAAC,UAAK,SAAQ,OAAM,GAAE,oEAAmE,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACrJ,oBAAC,UAAK,SAAQ,OAAM,GAAE,kEAAiE,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACnJ,oBAAC,UAAK,GAAE,oCAAmC,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACvG,oBAAC,UAAK,SAAQ,OAAM,GAAE,gWAA+V,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACjb,oBAAC,UAAK,GAAE,+VAA8V,QAAO,WAAU,aAAY,WAAU,eAAc,SAAO;AAAA,QACla,oBAAC,UAAK,UAAS,WAAU,UAAS,WAAU,GAAE,yuBAAwuB,QAAO,WAAU,aAAY,KAAI,eAAc,SAAQ,gBAAe,SAAO;AAAA,QACn2B,oBAAC,UAAK,GAAE,mDAAkD,QAAO,WAAU,aAAY,KAAI,eAAc,SAAQ,gBAAe,SAAO;AAAA;AAAA;AAAA,EACzI;AAEJ;","names":[]}
|
|
@@ -5,6 +5,7 @@ var AccountHubFlow = /* @__PURE__ */ ((AccountHubFlow2) => {
|
|
|
5
5
|
AccountHubFlow2["RECEIPT"] = "receipt";
|
|
6
6
|
AccountHubFlow2["CREATE_PROJECT"] = "create-project";
|
|
7
7
|
AccountHubFlow2["ADD_USER"] = "add-user";
|
|
8
|
+
AccountHubFlow2["CONFIRMATION"] = "confirmation";
|
|
8
9
|
return AccountHubFlow2;
|
|
9
10
|
})(AccountHubFlow || {});
|
|
10
11
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/enums/AccountHubFlow.ts"],"sourcesContent":["export enum AccountHubFlow {\n PLANS = 'plans',\n ADDONS = 'addons',\n REACTIVATE = 'reactivate',\n RECEIPT = 'receipt',\n CREATE_PROJECT = 'create-project',\n ADD_USER = 'add-user',\n}\n"],"mappings":"AAAO,IAAK,iBAAL,kBAAKA,oBAAL;AACL,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,YAAS;AACT,EAAAA,gBAAA,gBAAa;AACb,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,oBAAiB;AACjB,EAAAA,gBAAA,cAAW;
|
|
1
|
+
{"version":3,"sources":["../../src/enums/AccountHubFlow.ts"],"sourcesContent":["export enum AccountHubFlow {\n PLANS = 'plans',\n ADDONS = 'addons',\n REACTIVATE = 'reactivate',\n RECEIPT = 'receipt',\n CREATE_PROJECT = 'create-project',\n ADD_USER = 'add-user',\n CONFIRMATION = 'confirmation',\n}\n"],"mappings":"AAAO,IAAK,iBAAL,kBAAKA,oBAAL;AACL,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,YAAS;AACT,EAAAA,gBAAA,gBAAa;AACb,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,oBAAiB;AACjB,EAAAA,gBAAA,cAAW;AACX,EAAAA,gBAAA,kBAAe;AAPL,SAAAA;AAAA,GAAA;","names":["AccountHubFlow"]}
|
package/dist/index.mjs
CHANGED
|
@@ -479,7 +479,11 @@ import { AccountHubFlow } from "./enums/AccountHubFlow";
|
|
|
479
479
|
import {
|
|
480
480
|
ACCOUNT_HUB_SECTION_PARAM,
|
|
481
481
|
ACCOUNT_HUB_FLOW_PARAM,
|
|
482
|
-
ACCOUNT_HUB_COUPON_PARAM
|
|
482
|
+
ACCOUNT_HUB_COUPON_PARAM,
|
|
483
|
+
ACCOUNT_HUB_PLAN_PARAM,
|
|
484
|
+
ACCOUNT_HUB_TOTAL_PARAM,
|
|
485
|
+
ACCOUNT_HUB_PERIOD_PARAM,
|
|
486
|
+
ACCOUNT_HUB_CHARGE_PARAM
|
|
483
487
|
} from "./modules/accounts/constants/account-hub-link.constants";
|
|
484
488
|
import { LEGACY_ACCOUNT_ROUTES } from "./modules/accounts/constants/legacy-account-routes.constants";
|
|
485
489
|
import { parseAccountHubLink } from "./modules/accounts/utils/parse-account-hub-link";
|
|
@@ -534,9 +538,13 @@ export {
|
|
|
534
538
|
ACCEPTED_IMAGE_FORMATS,
|
|
535
539
|
ACCEPTED_IMAGE_FORMATS_STRING,
|
|
536
540
|
ACCOUNT_FREEZE_AFTER_DAYS,
|
|
541
|
+
ACCOUNT_HUB_CHARGE_PARAM,
|
|
537
542
|
ACCOUNT_HUB_COUPON_PARAM,
|
|
538
543
|
ACCOUNT_HUB_FLOW_PARAM,
|
|
544
|
+
ACCOUNT_HUB_PERIOD_PARAM,
|
|
545
|
+
ACCOUNT_HUB_PLAN_PARAM,
|
|
539
546
|
ACCOUNT_HUB_SECTION_PARAM,
|
|
547
|
+
ACCOUNT_HUB_TOTAL_PARAM,
|
|
540
548
|
ACCOUNT_QUERY_KEY,
|
|
541
549
|
ACCOUNT_USERS_QUERY_KEY,
|
|
542
550
|
ADDON_IDS,
|
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;A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,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;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;AACn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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":[]}
|
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]);
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import { AccountHubFlow } from '../../../enums/AccountHubFlow';
|
|
4
4
|
import { WorkspaceSectionType } from '../../../enums/WorkspaceSectionType';
|
|
5
|
+
import { useTranslations } from 'next-intl';
|
|
5
6
|
import { useCouponByCode } from '../../../modules/coupons/hooks/use-coupon-by-code.hook';
|
|
6
7
|
import { isAccountSectionType } from '../../../modules/accounts/utils/is-account-section';
|
|
7
|
-
import type { AccountHubLink } from '../../../modules/accounts/types/account-hub-link.type';
|
|
8
|
+
import type { AccountHubLink, AccountHubPurchase } from '../../../modules/accounts/types/account-hub-link.type';
|
|
9
|
+
import { getBillingPeriodSuffix } from '../../../modules/subscriptions/utils/periodicity';
|
|
8
10
|
import { useExternalContracting } from '../../../providers/whitelabel.provider';
|
|
9
11
|
import { useAccountModals, type MyAccountSection } from '../../../store/useAccountModals';
|
|
10
12
|
import { useProjectFlows } from '../../../store/useProjectFlows';
|
|
@@ -19,7 +21,9 @@ export default function useAccountHubActions() {
|
|
|
19
21
|
const requestOverdueReceipt = useSubscriptionFlows((state) => state.requestOverdueReceipt);
|
|
20
22
|
const openCreateProjectFlow = useProjectFlows((state) => state.openCreateProject);
|
|
21
23
|
const openAddUserFlow = useTeamFlows((state) => state.openAddUser);
|
|
24
|
+
const openPaymentConfirmationFlow = useSubscriptionFlows((state) => state.openPaymentConfirmation);
|
|
22
25
|
const { redirectToExternal } = useExternalContracting();
|
|
26
|
+
const translate = useTranslations();
|
|
23
27
|
const { mutate: findCouponByCode } = useCouponByCode();
|
|
24
28
|
|
|
25
29
|
const openSection = (section: MyAccountSection) => {
|
|
@@ -72,6 +76,16 @@ export default function useAccountHubActions() {
|
|
|
72
76
|
openAddUserFlow();
|
|
73
77
|
};
|
|
74
78
|
|
|
79
|
+
const openPaymentConfirmation = (purchase: AccountHubPurchase) => {
|
|
80
|
+
openWorkspace(WorkspaceSectionType.SUBSCRIPTION);
|
|
81
|
+
openPaymentConfirmationFlow({
|
|
82
|
+
planName: purchase.planName,
|
|
83
|
+
total: purchase.total,
|
|
84
|
+
periodLabel: getBillingPeriodSuffix(purchase.billingPeriod, translate),
|
|
85
|
+
immediateChargeTotal: purchase.immediateChargeTotal,
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
|
|
75
89
|
const openLink = (link: AccountHubLink) => {
|
|
76
90
|
if (link.flow === AccountHubFlow.PLANS) return openPlansCatalog(link.couponCode);
|
|
77
91
|
if (link.flow === AccountHubFlow.ADDONS) return openAddons();
|
|
@@ -79,6 +93,7 @@ export default function useAccountHubActions() {
|
|
|
79
93
|
if (link.flow === AccountHubFlow.RECEIPT) return openOverdueReceipt();
|
|
80
94
|
if (link.flow === AccountHubFlow.CREATE_PROJECT) return openCreateProject();
|
|
81
95
|
if (link.flow === AccountHubFlow.ADD_USER) return openAddUser();
|
|
96
|
+
if (link.flow === AccountHubFlow.CONFIRMATION && link.purchase) return openPaymentConfirmation(link.purchase);
|
|
82
97
|
openSection(link.section);
|
|
83
98
|
};
|
|
84
99
|
|
|
@@ -90,6 +105,7 @@ export default function useAccountHubActions() {
|
|
|
90
105
|
openOverdueReceipt,
|
|
91
106
|
openCreateProject,
|
|
92
107
|
openAddUser,
|
|
108
|
+
openPaymentConfirmation,
|
|
93
109
|
openLink,
|
|
94
110
|
};
|
|
95
111
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { IconInfoCircle } from '@tabler/icons-react';
|
|
4
4
|
import { useTranslations } from 'next-intl';
|
|
5
5
|
import { Dialog, DialogContent, DialogTitle } from '../../../ui/overlay/Dialog';
|
|
6
|
+
import { SuccessConfettiIcon } from '../../../ui/data-display/SuccessConfettiIcon';
|
|
6
7
|
import { useCurrencyFormatter } from '../../../../modules/accounts/hooks/use-currency-formatter.hook';
|
|
7
8
|
import { useIsDefaultWhitelabel } from '../../../../providers/whitelabel.provider';
|
|
8
9
|
import { cn } from '../../../../infra/utils/clsx';
|
|
@@ -27,7 +28,7 @@ export function PaymentConfirmationDialog() {
|
|
|
27
28
|
return (
|
|
28
29
|
<Dialog open={!!confirmation} onOpenChange={(nextOpen) => !nextOpen && close()}>
|
|
29
30
|
<DialogContent className="flex flex-col p-4 lg:p-6 gap-4 items-center max-w-[calc(100%-32px)]! h-auto! rounded-lg border top-[50%]! left-[50%]! right-auto! bottom-auto! translate-x-[-50%]! translate-y-[-50%]! lg:max-w-[386px]!">
|
|
30
|
-
<
|
|
31
|
+
<SuccessConfettiIcon />
|
|
31
32
|
|
|
32
33
|
<div className="flex flex-col gap-2 text-center">
|
|
33
34
|
<DialogTitle className="paragraph-medium-semibold text-zinc-950">
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export function SuccessConfettiIcon({ className }: { className?: string }) {
|
|
2
|
+
return (
|
|
3
|
+
<svg
|
|
4
|
+
width="149"
|
|
5
|
+
height="83"
|
|
6
|
+
viewBox="0 0 149 83"
|
|
7
|
+
fill="none"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
className={className}
|
|
10
|
+
aria-hidden
|
|
11
|
+
>
|
|
12
|
+
<path opacity="0.4" d="M18.6348 28.4102C18.6348 30.574 19.9096 30.8716 21.7838 31.1393" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
13
|
+
<path opacity="0.4" d="M109.117 41.4266C110.106 41.3745 110.639 40.9023 110.797 39.957" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
14
|
+
<path opacity="0.4" d="M64.6035 75.1963C62.2234 77.2378 61.7986 79.4524 63.2302 82.1283" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
15
|
+
<path opacity="0.4" d="M108.953 6.33984C106.531 6.40444 105.075 7.59006 104.965 10.072C104.898 11.5735 105.114 12.692 103.285 13.0577" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
16
|
+
<path opacity="0.4" d="M131.021 51.2682C130.631 53.6598 129.26 54.9429 126.786 54.7178C125.289 54.5817 124.21 54.217 123.601 55.9798" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
17
|
+
<path opacity="0.4" d="M34.1753 59.0104C33.2963 61.0245 32.8213 61.1372 30.7893 61.1213C29.7394 61.1131 28.0011 61.8028 27.5653 62.8448" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
18
|
+
<path d="M112.314 25.2715L113.514 24.7026" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
19
|
+
<path d="M51.492 49.2344C51.0065 49.3838 50.6337 49.7823 50.2324 50.0741" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
20
|
+
<path opacity="0.4" d="M77.8867 9.72656C77.4011 9.87596 77.3223 10.0019 77.3223 10.0019" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
21
|
+
<path opacity="0.4" d="M10.7246 56.0059C10.239 56.1553 10.1602 56.2812 10.1602 56.2812" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
22
|
+
<path opacity="0.4" d="M28.3302 80.1108C28.6726 79.7356 28.6766 79.587 28.6766 79.587" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
23
|
+
<path opacity="0.4" d="M128.043 49.0421C127.77 48.6138 127.627 48.5713 127.627 48.5713" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
24
|
+
<path opacity="0.4" d="M135.461 29.4915C134.972 29.6314 134.891 29.7558 134.891 29.7558" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
25
|
+
<path opacity="0.4" d="M52.3396 22.1222C52.0664 21.6939 51.924 21.6514 51.924 21.6514" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
26
|
+
<path d="M45.9383 40.1115L45.1508 39.1744" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
27
|
+
<path opacity="0.8" d="M97.7421 69.0733C97.1523 69.9712 97.989 71.6124 98.5913 72.3132C99.7005 73.6036 100.945 73.8145 102.199 73.9149C103.234 73.9977 105.21 73.5621 105.476 72.3174C105.948 71.1367 104.935 69.8432 103.934 70.3872C102.571 71.1277 103.112 72.7192 103.73 73.7787C104.604 75.2776 105.879 76.6545 107.249 77.7108C108.333 78.5474 109.732 79.029 110.308 79.0142" stroke="#12B76A" strokeWidth="1.41098" strokeLinecap="round"/>
|
|
28
|
+
<path d="M55.1022 11.4613C55.7297 11.187 55.8499 9.89737 55.7699 9.24592C55.6225 8.04626 55.0286 7.4129 54.3908 6.83895C53.8646 6.36537 52.6539 5.803 52.0797 6.41026C51.4175 6.89618 51.5122 8.05793 52.2377 8.15673C53.2253 8.2912 53.4868 7.15184 53.5227 6.28731C53.5734 5.06421 53.367 3.74644 52.9989 2.5746C52.7073 1.64647 52.1242 0.793399 51.8104 0.565035" stroke="#12B76A" strokeWidth="1.12879" strokeLinecap="round"/>
|
|
29
|
+
<path fillRule="evenodd" clipRule="evenodd" d="M58.1139 44.0572L60.4163 47.0706L60.9134 50.8219C61.1889 52.9028 62.8247 54.5405 64.9056 54.818L68.6666 55.3208L71.678 57.6214C73.3446 58.8949 75.6548 58.8949 77.3214 57.6214L80.3348 55.3189H80.3309L84.0842 54.8218C86.1651 54.5463 87.8028 52.9105 88.0802 50.8297L88.5812 47.0687C88.5812 47.0706 89.7449 45.5466 90.8836 44.0572C92.1572 42.3906 92.1553 40.0805 90.8836 38.4138L88.585 35.3985L88.0879 31.6472C87.8124 29.5663 86.1766 27.9286 84.0958 27.6512L80.3329 27.1502L77.3214 24.8497C75.6548 23.5761 73.3446 23.5761 71.678 24.8497L68.6646 27.1502H68.6685L64.9152 27.6492C62.8344 27.9248 61.1966 29.5605 60.9192 31.6414L60.4163 35.4024C60.4163 35.4004 59.2526 36.9245 58.1139 38.4138C56.8422 40.0785 56.8422 42.3906 58.1139 44.0572V44.0572Z" stroke="#12B76A" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
30
|
+
<path d="M79.9009 38.541L73.1554 45.2865L69.1035 41.2384" stroke="#12B76A" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
31
|
+
</svg>
|
|
32
|
+
);
|
|
33
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -659,9 +659,13 @@ export {
|
|
|
659
659
|
ACCOUNT_HUB_SECTION_PARAM,
|
|
660
660
|
ACCOUNT_HUB_FLOW_PARAM,
|
|
661
661
|
ACCOUNT_HUB_COUPON_PARAM,
|
|
662
|
+
ACCOUNT_HUB_PLAN_PARAM,
|
|
663
|
+
ACCOUNT_HUB_TOTAL_PARAM,
|
|
664
|
+
ACCOUNT_HUB_PERIOD_PARAM,
|
|
665
|
+
ACCOUNT_HUB_CHARGE_PARAM,
|
|
662
666
|
} from "./modules/accounts/constants/account-hub-link.constants";
|
|
663
667
|
export { LEGACY_ACCOUNT_ROUTES } from "./modules/accounts/constants/legacy-account-routes.constants";
|
|
664
|
-
export type { AccountHubLink, LegacyAccountRouteTarget } from "./modules/accounts/types/account-hub-link.type";
|
|
668
|
+
export type { AccountHubLink, AccountHubPurchase, LegacyAccountRouteTarget } from "./modules/accounts/types/account-hub-link.type";
|
|
665
669
|
export { parseAccountHubLink } from "./modules/accounts/utils/parse-account-hub-link";
|
|
666
670
|
export { buildAccountHubUrl } from "./modules/accounts/utils/build-account-hub-url";
|
|
667
671
|
export { mapLegacyAccountRoute } from "./modules/accounts/utils/map-legacy-account-route";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export const ACCOUNT_HUB_SECTION_PARAM = 'account';
|
|
2
2
|
export const ACCOUNT_HUB_FLOW_PARAM = 'flow';
|
|
3
3
|
export const ACCOUNT_HUB_COUPON_PARAM = 'coupon';
|
|
4
|
+
export const ACCOUNT_HUB_PLAN_PARAM = 'plan';
|
|
5
|
+
export const ACCOUNT_HUB_TOTAL_PARAM = 'total';
|
|
6
|
+
export const ACCOUNT_HUB_PERIOD_PARAM = 'period';
|
|
7
|
+
export const ACCOUNT_HUB_CHARGE_PARAM = 'charge';
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import type { AccountHubFlow } from '../../../enums/AccountHubFlow';
|
|
2
|
+
import type { BillingPeriod } from '../../subscriptions/types/billing-period.type';
|
|
2
3
|
import type { MyAccountSection } from '../../../store/useAccountModals';
|
|
3
4
|
|
|
5
|
+
export interface AccountHubPurchase {
|
|
6
|
+
planName: string;
|
|
7
|
+
total: number;
|
|
8
|
+
billingPeriod: BillingPeriod;
|
|
9
|
+
immediateChargeTotal: number | null;
|
|
10
|
+
}
|
|
11
|
+
|
|
4
12
|
export interface AccountHubLink {
|
|
5
13
|
section: MyAccountSection;
|
|
6
14
|
flow?: AccountHubFlow;
|
|
7
15
|
couponCode?: string;
|
|
16
|
+
purchase?: AccountHubPurchase;
|
|
8
17
|
}
|
|
9
18
|
|
|
10
19
|
export interface LegacyAccountRouteTarget {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ACCOUNT_HUB_CHARGE_PARAM,
|
|
2
3
|
ACCOUNT_HUB_COUPON_PARAM,
|
|
3
4
|
ACCOUNT_HUB_FLOW_PARAM,
|
|
5
|
+
ACCOUNT_HUB_PERIOD_PARAM,
|
|
6
|
+
ACCOUNT_HUB_PLAN_PARAM,
|
|
4
7
|
ACCOUNT_HUB_SECTION_PARAM,
|
|
8
|
+
ACCOUNT_HUB_TOTAL_PARAM,
|
|
5
9
|
} from '../constants/account-hub-link.constants';
|
|
6
10
|
import type { AccountHubLink } from '../types/account-hub-link.type';
|
|
7
11
|
|
|
@@ -10,5 +14,15 @@ export function buildAccountHubUrl(baseUrl: string, link: AccountHubLink, pathna
|
|
|
10
14
|
url.searchParams.set(ACCOUNT_HUB_SECTION_PARAM, link.section);
|
|
11
15
|
if (link.flow) url.searchParams.set(ACCOUNT_HUB_FLOW_PARAM, link.flow);
|
|
12
16
|
if (link.couponCode) url.searchParams.set(ACCOUNT_HUB_COUPON_PARAM, link.couponCode);
|
|
17
|
+
|
|
18
|
+
if (link.purchase) {
|
|
19
|
+
url.searchParams.set(ACCOUNT_HUB_PLAN_PARAM, link.purchase.planName);
|
|
20
|
+
url.searchParams.set(ACCOUNT_HUB_TOTAL_PARAM, String(link.purchase.total));
|
|
21
|
+
url.searchParams.set(ACCOUNT_HUB_PERIOD_PARAM, link.purchase.billingPeriod);
|
|
22
|
+
if (link.purchase.immediateChargeTotal != null) {
|
|
23
|
+
url.searchParams.set(ACCOUNT_HUB_CHARGE_PARAM, String(link.purchase.immediateChargeTotal));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
13
27
|
return url.toString();
|
|
14
28
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BillingPeriod } from '../../subscriptions/types/billing-period.type';
|
|
2
|
+
|
|
3
|
+
const BILLING_PERIODS: string[] = ['monthly', 'semiannual', 'annual'];
|
|
4
|
+
|
|
5
|
+
export function isBillingPeriod(value: string): value is BillingPeriod {
|
|
6
|
+
return BILLING_PERIODS.includes(value);
|
|
7
|
+
}
|
|
@@ -1,13 +1,36 @@
|
|
|
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,
|
|
6
|
+
ACCOUNT_HUB_PERIOD_PARAM,
|
|
7
|
+
ACCOUNT_HUB_PLAN_PARAM,
|
|
5
8
|
ACCOUNT_HUB_SECTION_PARAM,
|
|
9
|
+
ACCOUNT_HUB_TOTAL_PARAM,
|
|
6
10
|
} from '../constants/account-hub-link.constants';
|
|
7
|
-
import type { AccountHubLink } from '../types/account-hub-link.type';
|
|
11
|
+
import type { AccountHubLink, AccountHubPurchase } from '../types/account-hub-link.type';
|
|
8
12
|
import { isAccountHubFlow } from './is-account-hub-flow';
|
|
13
|
+
import { isBillingPeriod } from './is-billing-period';
|
|
9
14
|
import { isMyAccountSection } from './is-my-account-section';
|
|
10
15
|
|
|
16
|
+
function readPurchase(searchParams: URLSearchParams, flow?: AccountHubFlow): AccountHubPurchase | undefined {
|
|
17
|
+
if (flow !== AccountHubFlow.CONFIRMATION) return undefined;
|
|
18
|
+
|
|
19
|
+
const planName = searchParams.get(ACCOUNT_HUB_PLAN_PARAM);
|
|
20
|
+
const total = Number(searchParams.get(ACCOUNT_HUB_TOTAL_PARAM));
|
|
21
|
+
const period = searchParams.get(ACCOUNT_HUB_PERIOD_PARAM);
|
|
22
|
+
if (!planName || !Number.isFinite(total) || !period || !isBillingPeriod(period)) return undefined;
|
|
23
|
+
|
|
24
|
+
const charge = Number(searchParams.get(ACCOUNT_HUB_CHARGE_PARAM));
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
planName,
|
|
28
|
+
total,
|
|
29
|
+
billingPeriod: period,
|
|
30
|
+
immediateChargeTotal: Number.isFinite(charge) && charge > 0 ? charge : null,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
11
34
|
export function parseAccountHubLink(searchParams: URLSearchParams): AccountHubLink | null {
|
|
12
35
|
const section = searchParams.get(ACCOUNT_HUB_SECTION_PARAM);
|
|
13
36
|
if (!section || !isMyAccountSection(section)) return null;
|
|
@@ -17,5 +40,5 @@ export function parseAccountHubLink(searchParams: URLSearchParams): AccountHubLi
|
|
|
17
40
|
const couponCode =
|
|
18
41
|
resolvedFlow === AccountHubFlow.PLANS ? (searchParams.get(ACCOUNT_HUB_COUPON_PARAM) ?? undefined) : undefined;
|
|
19
42
|
|
|
20
|
-
return { section, flow: resolvedFlow, couponCode };
|
|
43
|
+
return { section, flow: resolvedFlow, couponCode, purchase: readPurchase(searchParams, resolvedFlow) };
|
|
21
44
|
}
|