@greatapps/common 1.1.523 → 1.1.525
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/ConfigurationsMyAccountModal.mjs +4 -10
- package/dist/components/account/ConfigurationsMyAccountModal.mjs.map +1 -1
- package/dist/components/account/hooks/useDisableTwoFactorAuthForm.mjs +1 -3
- package/dist/components/account/hooks/useDisableTwoFactorAuthForm.mjs.map +1 -1
- package/dist/components/account/sections/ChangeEmailModal.mjs +1 -3
- package/dist/components/account/sections/ChangeEmailModal.mjs.map +1 -1
- package/dist/components/account/sections/ChangePhoneModal.mjs +1 -3
- package/dist/components/account/sections/ChangePhoneModal.mjs.map +1 -1
- package/dist/components/account/sections/MyProfileSection.mjs +1 -2
- package/dist/components/account/sections/MyProfileSection.mjs.map +1 -1
- package/dist/components/embeds/EmbedWidgets.mjs +1 -3
- package/dist/components/embeds/EmbedWidgets.mjs.map +1 -1
- package/dist/components/layouts/AppMobileNavBar.mjs +1 -3
- package/dist/components/layouts/AppMobileNavBar.mjs.map +1 -1
- package/dist/components/layouts/AppNavBar.mjs +8 -4
- package/dist/components/layouts/AppNavBar.mjs.map +1 -1
- package/dist/components/layouts/NavBar.mjs +9 -10
- package/dist/components/layouts/NavBar.mjs.map +1 -1
- package/dist/components/layouts/NotificationsPopover.mjs +2 -5
- package/dist/components/layouts/NotificationsPopover.mjs.map +1 -1
- package/dist/components/layouts/ProfilePopover.mjs +2 -4
- package/dist/components/layouts/ProfilePopover.mjs.map +1 -1
- package/dist/components/layouts/SideBarNavigation.mjs +1 -4
- package/dist/components/layouts/SideBarNavigation.mjs.map +1 -1
- package/dist/components/modals/BuyCreditsModal.mjs +9 -26
- package/dist/components/modals/BuyCreditsModal.mjs.map +1 -1
- package/dist/components/modals/cards/AddCardModal.mjs +1 -3
- package/dist/components/modals/cards/AddCardModal.mjs.map +1 -1
- package/dist/components/navigation/CancelledSubscriptionBanner.mjs +1 -1
- package/dist/components/navigation/CancelledSubscriptionBanner.mjs.map +1 -1
- package/dist/components/navigation/ProjectSelectorPopover.mjs +6 -7
- package/dist/components/navigation/ProjectSelectorPopover.mjs.map +1 -1
- package/dist/components/navigation/subcomponents/ProjectSelector.mjs +19 -39
- package/dist/components/navigation/subcomponents/ProjectSelector.mjs.map +1 -1
- package/dist/components/navigation/types.mjs +1 -0
- package/dist/components/navigation/types.mjs.map +1 -0
- package/dist/components/pages/NotFoundPage.mjs +2 -2
- package/dist/components/pages/NotFoundPage.mjs.map +1 -1
- package/dist/components/ui/buttons/Button.mjs +2 -7
- package/dist/components/ui/buttons/Button.mjs.map +1 -1
- package/dist/components/ui/data-display/CardItem.mjs +1 -1
- package/dist/components/ui/data-display/CardItem.mjs.map +1 -1
- package/dist/components/ui/data-display/PaymentInfoCard.mjs +2 -4
- package/dist/components/ui/data-display/PaymentInfoCard.mjs.map +1 -1
- package/dist/components/ui/data-display/UserAvatar.mjs +2 -6
- package/dist/components/ui/data-display/UserAvatar.mjs.map +1 -1
- package/dist/components/ui/feedback/DefaultCircularProgress.mjs +1 -4
- package/dist/components/ui/feedback/DefaultCircularProgress.mjs.map +1 -1
- package/dist/components/ui/feedback/Toast.mjs +2 -7
- package/dist/components/ui/feedback/Toast.mjs.map +1 -1
- package/dist/components/ui/form/FormField.mjs +1 -1
- package/dist/components/ui/form/FormField.mjs.map +1 -1
- package/dist/components/ui/form/Select.mjs +1 -1
- package/dist/components/ui/form/Select.mjs.map +1 -1
- package/dist/components/ui/overlay/Popover.mjs +1 -1
- package/dist/components/ui/overlay/Popover.mjs.map +1 -1
- package/dist/components/ui/overlay/Sheet.mjs +6 -8
- package/dist/components/ui/overlay/Sheet.mjs.map +1 -1
- package/dist/components/widgets/ImageUpload/ImageUpload.mjs +1 -2
- package/dist/components/widgets/ImageUpload/ImageUpload.mjs.map +1 -1
- package/dist/components/widgets/notifications/NotificationCard.mjs +1 -4
- package/dist/components/widgets/notifications/NotificationCard.mjs.map +1 -1
- package/dist/enums/AccountSectionType.mjs +0 -1
- package/dist/enums/AccountSectionType.mjs.map +1 -1
- package/dist/index.mjs +8 -90
- package/dist/index.mjs.map +1 -1
- package/dist/modules/accounts/hooks/current-account.hook.mjs +2 -5
- package/dist/modules/accounts/hooks/current-account.hook.mjs.map +1 -1
- package/dist/modules/accounts/hooks/useAccountManagement.mjs +9 -19
- package/dist/modules/accounts/hooks/useAccountManagement.mjs.map +1 -1
- package/dist/modules/accounts/hooks/useCurrencies.mjs +1 -3
- package/dist/modules/accounts/hooks/useCurrencies.mjs.map +1 -1
- package/dist/modules/accounts/hooks/useTimezones.mjs +1 -3
- package/dist/modules/accounts/hooks/useTimezones.mjs.map +1 -1
- package/dist/modules/auth/hooks/useUserQuery.mjs +6 -15
- package/dist/modules/auth/hooks/useUserQuery.mjs.map +1 -1
- package/dist/modules/cards/hooks/cards.hook.mjs +3 -11
- package/dist/modules/cards/hooks/cards.hook.mjs.map +1 -1
- package/dist/modules/cards/hooks/create-card.hook.mjs +2 -13
- package/dist/modules/cards/hooks/create-card.hook.mjs.map +1 -1
- package/dist/modules/cards/services/cards.service.mjs +4 -45
- package/dist/modules/cards/services/cards.service.mjs.map +1 -1
- package/dist/modules/cards/types.mjs +3 -11
- package/dist/modules/cards/types.mjs.map +1 -1
- package/dist/modules/ia-credits/hooks/ia-credits.hook.mjs +1 -3
- package/dist/modules/ia-credits/hooks/ia-credits.hook.mjs.map +1 -1
- package/dist/modules/plans/hooks/list-plans.hook.mjs +1 -3
- package/dist/modules/plans/hooks/list-plans.hook.mjs.map +1 -1
- package/dist/modules/plans/hooks/use-plan-by-id.hook.mjs +2 -4
- package/dist/modules/plans/hooks/use-plan-by-id.hook.mjs.map +1 -1
- package/dist/modules/plans/services/plans.service.mjs +2 -4
- package/dist/modules/plans/services/plans.service.mjs.map +1 -1
- package/dist/modules/plans/types/plan.type.mjs.map +1 -1
- package/dist/modules/plans/utils/map-api-plan-to-ui.mjs +10 -20
- package/dist/modules/plans/utils/map-api-plan-to-ui.mjs.map +1 -1
- package/dist/modules/projects/hooks/add-project-user.hook.mjs +12 -15
- package/dist/modules/projects/hooks/add-project-user.hook.mjs.map +1 -1
- package/dist/modules/projects/hooks/list-all-account-users.hook.mjs +1 -3
- package/dist/modules/projects/hooks/list-all-account-users.hook.mjs.map +1 -1
- package/dist/modules/projects/hooks/list-available-users.hook.mjs +1 -3
- package/dist/modules/projects/hooks/list-available-users.hook.mjs.map +1 -1
- package/dist/modules/projects/hooks/list-project-users.hook.mjs +1 -3
- package/dist/modules/projects/hooks/list-project-users.hook.mjs.map +1 -1
- package/dist/modules/projects/hooks/remove-project-user.hook.mjs +12 -15
- package/dist/modules/projects/hooks/remove-project-user.hook.mjs.map +1 -1
- package/dist/modules/projects/types.mjs +4 -19
- package/dist/modules/projects/types.mjs.map +1 -1
- package/dist/modules/subscriptions/constants/query-keys.constants.mjs +0 -2
- package/dist/modules/subscriptions/constants/query-keys.constants.mjs.map +1 -1
- package/dist/modules/subscriptions/hooks/find-active-subscription.hook.mjs +2 -5
- package/dist/modules/subscriptions/hooks/find-active-subscription.hook.mjs.map +1 -1
- package/dist/modules/subscriptions/hooks/list-subscriptions.hook.mjs +1 -3
- package/dist/modules/subscriptions/hooks/list-subscriptions.hook.mjs.map +1 -1
- package/dist/modules/subscriptions/hooks/update-subscription-plan.hook.mjs +3 -6
- package/dist/modules/subscriptions/hooks/update-subscription-plan.hook.mjs.map +1 -1
- package/dist/modules/subscriptions/types/calculate-subscription.type.mjs +2 -29
- package/dist/modules/subscriptions/types/calculate-subscription.type.mjs.map +1 -1
- package/dist/modules/subscriptions/utils/periodicity.mjs +0 -7
- package/dist/modules/subscriptions/utils/periodicity.mjs.map +1 -1
- package/dist/modules/users/action/list-messages.action.mjs +2 -14
- package/dist/modules/users/action/list-messages.action.mjs.map +1 -1
- package/dist/modules/users/hooks/messages.hook.mjs +4 -9
- package/dist/modules/users/hooks/messages.hook.mjs.map +1 -1
- package/dist/modules/users/services/messages.service.mjs.map +1 -1
- package/dist/providers/auth.provider.mjs +4 -6
- package/dist/providers/auth.provider.mjs.map +1 -1
- package/dist/providers/query.provider.mjs +2 -2
- package/dist/providers/query.provider.mjs.map +1 -1
- package/dist/providers/whitelabel.provider.mjs +0 -5
- package/dist/providers/whitelabel.provider.mjs.map +1 -1
- package/dist/server.mjs +0 -14
- package/dist/server.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/widgets/ImageUpload/ImageCropModal.tsx +10 -37
- package/dist/components/account/sections/TokenSection.mjs +0 -72
- package/dist/components/account/sections/TokenSection.mjs.map +0 -1
- package/dist/components/embeds/ClarityEmbed.mjs +0 -55
- package/dist/components/embeds/ClarityEmbed.mjs.map +0 -1
- package/dist/hooks/useAuthQueryKey.mjs +0 -23
- package/dist/hooks/useAuthQueryKey.mjs.map +0 -1
- package/dist/infra/utils/array.mjs +0 -34
- package/dist/infra/utils/array.mjs.map +0 -1
- package/dist/modules/accounts/actions/get-account-token.action.mjs +0 -10
- package/dist/modules/accounts/actions/get-account-token.action.mjs.map +0 -1
- package/dist/modules/accounts/hooks/use-account-token.hook.mjs +0 -15
- package/dist/modules/accounts/hooks/use-account-token.hook.mjs.map +0 -1
- package/dist/modules/accounts/services/account-token.service.mjs +0 -32
- package/dist/modules/accounts/services/account-token.service.mjs.map +0 -1
- package/dist/modules/cards/actions/delete-card.action.mjs +0 -10
- package/dist/modules/cards/actions/delete-card.action.mjs.map +0 -1
- package/dist/modules/cards/actions/find-card-by-id.action.mjs +0 -10
- package/dist/modules/cards/actions/find-card-by-id.action.mjs.map +0 -1
- package/dist/modules/cards/actions/set-default-card.action.mjs +0 -10
- package/dist/modules/cards/actions/set-default-card.action.mjs.map +0 -1
- package/dist/modules/cards/hooks/card-by-id.hook.mjs +0 -22
- package/dist/modules/cards/hooks/card-by-id.hook.mjs.map +0 -1
- package/dist/modules/cards/hooks/delete-card.hook.mjs +0 -50
- package/dist/modules/cards/hooks/delete-card.hook.mjs.map +0 -1
- package/dist/modules/cards/hooks/set-default-card.hook.mjs +0 -51
- package/dist/modules/cards/hooks/set-default-card.hook.mjs.map +0 -1
- package/dist/modules/projects/actions/create-project.action.mjs +0 -10
- package/dist/modules/projects/actions/create-project.action.mjs.map +0 -1
- package/dist/modules/projects/actions/delete-project.action.mjs +0 -10
- package/dist/modules/projects/actions/delete-project.action.mjs.map +0 -1
- package/dist/modules/projects/actions/find-project.action.mjs +0 -10
- package/dist/modules/projects/actions/find-project.action.mjs.map +0 -1
- package/dist/modules/projects/actions/list-projects.action.mjs +0 -10
- package/dist/modules/projects/actions/list-projects.action.mjs.map +0 -1
- package/dist/modules/projects/actions/update-project.action.mjs +0 -10
- package/dist/modules/projects/actions/update-project.action.mjs.map +0 -1
- package/dist/modules/projects/hooks/create-project.hook.mjs +0 -71
- package/dist/modules/projects/hooks/create-project.hook.mjs.map +0 -1
- package/dist/modules/projects/hooks/delete-project.hook.mjs +0 -53
- package/dist/modules/projects/hooks/delete-project.hook.mjs.map +0 -1
- package/dist/modules/projects/hooks/find-project.hook.mjs +0 -19
- package/dist/modules/projects/hooks/find-project.hook.mjs.map +0 -1
- package/dist/modules/projects/hooks/list-infinite-projects.hook.mjs +0 -39
- package/dist/modules/projects/hooks/list-infinite-projects.hook.mjs.map +0 -1
- package/dist/modules/projects/hooks/list-projects.hook.mjs +0 -22
- package/dist/modules/projects/hooks/list-projects.hook.mjs.map +0 -1
- package/dist/modules/projects/hooks/update-project.hook.mjs +0 -70
- package/dist/modules/projects/hooks/update-project.hook.mjs.map +0 -1
- package/dist/modules/projects/services/projects.service.mjs +0 -99
- package/dist/modules/projects/services/projects.service.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -15,25 +15,6 @@ import {
|
|
|
15
15
|
LIST_AVAILABLE_USERS_QUERY_KEY,
|
|
16
16
|
LIST_AVAILABLE_USERS_BASE_KEY
|
|
17
17
|
} from "./modules/projects/hooks/list-available-users.hook";
|
|
18
|
-
import {
|
|
19
|
-
useListAllAccountUsers,
|
|
20
|
-
LIST_ALL_ACCOUNT_USERS_QUERY_KEY,
|
|
21
|
-
LIST_ALL_ACCOUNT_USERS_BASE_KEY
|
|
22
|
-
} from "./modules/projects/hooks/list-all-account-users.hook";
|
|
23
|
-
import {
|
|
24
|
-
useProjects,
|
|
25
|
-
PROJECTS_BASE_KEY,
|
|
26
|
-
PROJECTS_QUERY_KEY
|
|
27
|
-
} from "./modules/projects/hooks/list-projects.hook";
|
|
28
|
-
import {
|
|
29
|
-
useInfiniteProjects,
|
|
30
|
-
INFINITE_PROJECTS_QUERY_KEY
|
|
31
|
-
} from "./modules/projects/hooks/list-infinite-projects.hook";
|
|
32
|
-
import { useProject } from "./modules/projects/hooks/find-project.hook";
|
|
33
|
-
import { useCreateProject } from "./modules/projects/hooks/create-project.hook";
|
|
34
|
-
import { useUpdateProject } from "./modules/projects/hooks/update-project.hook";
|
|
35
|
-
import { useDeleteProject } from "./modules/projects/hooks/delete-project.hook";
|
|
36
|
-
import { ProjectSchema } from "./modules/projects/types";
|
|
37
18
|
import {
|
|
38
19
|
useUserQuery,
|
|
39
20
|
useUserValidateSession,
|
|
@@ -44,10 +25,7 @@ import {
|
|
|
44
25
|
} from "./modules/auth/hooks/useUserQuery";
|
|
45
26
|
import { useManagementPermissions } from "./modules/auth/hooks/useManagementPermissions";
|
|
46
27
|
import { useSubscriptions } from "./modules/subscriptions/hooks/list-subscriptions.hook";
|
|
47
|
-
import {
|
|
48
|
-
SUBSCRIPTIONS_QUERY_KEY,
|
|
49
|
-
CHARGES_QUERY_KEY
|
|
50
|
-
} from "./modules/subscriptions/constants/query-keys.constants";
|
|
28
|
+
import { SUBSCRIPTIONS_QUERY_KEY } from "./modules/subscriptions/constants/query-keys.constants";
|
|
51
29
|
import { useActiveSubscription } from "./modules/subscriptions/hooks/find-active-subscription.hook";
|
|
52
30
|
import { useCancelledSubscriptionGuard } from "./modules/subscriptions/hooks/use-cancelled-subscription-guard";
|
|
53
31
|
import { usePlanById } from "./modules/plans/hooks/use-plan-by-id.hook";
|
|
@@ -55,47 +33,26 @@ import { useHasPlanAddon } from "./modules/plans/hooks/use-has-plan-addon.hook";
|
|
|
55
33
|
import { useCalculateSubscription } from "./modules/subscriptions/hooks/calculate-subscription.hook";
|
|
56
34
|
import { useUpdateSubscriptionPlan } from "./modules/subscriptions/hooks/update-subscription-plan.hook";
|
|
57
35
|
import { useCards, CARDS_QUERY_KEY } from "./modules/cards/hooks/cards.hook";
|
|
58
|
-
import { useCardById } from "./modules/cards/hooks/card-by-id.hook";
|
|
59
36
|
import { useCreateCard } from "./modules/cards/hooks/create-card.hook";
|
|
60
|
-
import { useSetDefaultCard } from "./modules/cards/hooks/set-default-card.hook";
|
|
61
|
-
import { useDeleteCard } from "./modules/cards/hooks/delete-card.hook";
|
|
62
37
|
import { useIaCredits } from "./modules/ia-credits/hooks/ia-credits.hook";
|
|
63
38
|
import {
|
|
64
39
|
SubscriptionSchema,
|
|
65
40
|
SubscriptionItemSchema
|
|
66
41
|
} from "./modules/subscriptions/types/subscription.type";
|
|
67
|
-
import {
|
|
68
|
-
ADDON_IDS,
|
|
69
|
-
AI_CREDIT_OPTIONS,
|
|
70
|
-
AI_CREDIT_VALUES
|
|
71
|
-
} from "./modules/subscriptions/constants/addons.constants";
|
|
42
|
+
import { ADDON_IDS, AI_CREDIT_OPTIONS, AI_CREDIT_VALUES } from "./modules/subscriptions/constants/addons.constants";
|
|
72
43
|
import { PlanSchema, PlanItemSchema } from "./modules/plans/types/plan.type";
|
|
73
44
|
import { mapApiPlanToUiPlan } from "./modules/plans/utils/map-api-plan-to-ui";
|
|
74
|
-
import {
|
|
75
|
-
|
|
76
|
-
PLANS_QUERY_KEY
|
|
77
|
-
} from "./modules/plans/hooks/list-plans.hook";
|
|
78
|
-
import {
|
|
79
|
-
CardSchema,
|
|
80
|
-
CreateCardRequestSchema,
|
|
81
|
-
FindCardsParamsSchema
|
|
82
|
-
} from "./modules/cards/types";
|
|
45
|
+
import { usePlans, PLANS_QUERY_KEY } from "./modules/plans/hooks/list-plans.hook";
|
|
46
|
+
import { CardSchema, CreateCardRequestSchema } from "./modules/cards/types";
|
|
83
47
|
import { buildPlanExtras } from "./modules/subscriptions/utils/build-plan-extras";
|
|
84
48
|
import { hasSubscriptionExpired } from "./modules/subscriptions/utils/has-subscription-expired";
|
|
85
|
-
import {
|
|
86
|
-
getPriceFromCalculatedData,
|
|
87
|
-
getOriginalPriceFromCalculatedData,
|
|
88
|
-
periodicityToBillingPeriod
|
|
89
|
-
} from "./modules/subscriptions/utils/periodicity";
|
|
49
|
+
import { getPriceFromCalculatedData, periodicityToBillingPeriod } from "./modules/subscriptions/utils/periodicity";
|
|
90
50
|
import { useBuyCreditsModal } from "./store/useBuyCreditsModal";
|
|
91
51
|
import { usePaidPlanRequiredModal } from "./store/usePaidPlanRequiredModal";
|
|
92
52
|
import { default as default2 } from "./components/modals/BuyCreditsModal";
|
|
93
53
|
import { default as default3 } from "./components/modals/PaidPlanRequiredModal";
|
|
94
54
|
import { default as default4 } from "./components/modals/cards/AddCardModal";
|
|
95
|
-
import {
|
|
96
|
-
CardFormFields,
|
|
97
|
-
cardFormSchema
|
|
98
|
-
} from "./components/modals/cards/CardFormFields";
|
|
55
|
+
import { CardFormFields, cardFormSchema } from "./components/modals/cards/CardFormFields";
|
|
99
56
|
import { Skeleton } from "./components/ui/feedback/Skeleton";
|
|
100
57
|
import { PaymentInfoCard } from "./components/ui/data-display/PaymentInfoCard";
|
|
101
58
|
import { CardBrandIcon } from "./components/ui/data-display/CardBrandIcons";
|
|
@@ -131,11 +88,6 @@ import { NavBarItem } from "./components/layouts/NavBarItem";
|
|
|
131
88
|
import { AppNavigation } from "./components/navigation/AppNavigation";
|
|
132
89
|
import { CancelledSubscriptionBanner } from "./components/navigation/CancelledSubscriptionBanner";
|
|
133
90
|
import { useMobileNavbarSheet } from "./store/useMobileNavbarSheet";
|
|
134
|
-
import {
|
|
135
|
-
useAuthQueryKey,
|
|
136
|
-
useWlQueryKey,
|
|
137
|
-
useWlId
|
|
138
|
-
} from "./hooks/useAuthQueryKey";
|
|
139
91
|
import { default as default7 } from "./hooks/copy-to-clipboard.hook";
|
|
140
92
|
import { Button, buttonVariants } from "./components/ui/buttons/Button";
|
|
141
93
|
import { CopyButton } from "./components/ui/buttons/CopyButton";
|
|
@@ -265,15 +217,8 @@ import {
|
|
|
265
217
|
TooltipProvider
|
|
266
218
|
} from "./components/ui/overlay/Tooltip";
|
|
267
219
|
import { FrillEmbed } from "./components/embeds/FrillEmbed";
|
|
268
|
-
import {
|
|
269
|
-
CrispEmbed,
|
|
270
|
-
openCrispHelpdesk,
|
|
271
|
-
hideCrisp,
|
|
272
|
-
showCrisp,
|
|
273
|
-
updateCrispUser
|
|
274
|
-
} from "./components/embeds/CrispEmbed";
|
|
220
|
+
import { CrispEmbed, openCrispHelpdesk, hideCrisp, showCrisp, updateCrispUser } from "./components/embeds/CrispEmbed";
|
|
275
221
|
import { EmbedWidgets } from "./components/embeds/EmbedWidgets";
|
|
276
|
-
import { ClarityEmbed } from "./components/embeds/ClarityEmbed";
|
|
277
222
|
import { useMdSidebarStore } from "./store/useMdSidebarStore";
|
|
278
223
|
import { useDesktopSidebarStore } from "./store/useDesktopSidebarStore";
|
|
279
224
|
import { useModalManager } from "./store/useModalManager";
|
|
@@ -314,11 +259,9 @@ import {
|
|
|
314
259
|
useUpdateAccountUser,
|
|
315
260
|
useUpdateAccountUserById,
|
|
316
261
|
useDeleteAccountUser,
|
|
317
|
-
useDeleteAccount
|
|
318
|
-
ACCOUNT_USERS_QUERY_KEY
|
|
262
|
+
useDeleteAccount
|
|
319
263
|
} from "./modules/accounts/hooks/useAccountManagement";
|
|
320
264
|
import { useViaCep } from "./modules/accounts/hooks/useViaCep";
|
|
321
|
-
import { useAccountToken } from "./modules/accounts/hooks/use-account-token.hook";
|
|
322
265
|
import { default as default16 } from "./components/account/AccountModals";
|
|
323
266
|
import { useAccountModals } from "./store/useAccountModals";
|
|
324
267
|
import { ModalManager } from "./components/modals/ModalManager";
|
|
@@ -365,7 +308,6 @@ export {
|
|
|
365
308
|
ACCEPTED_IMAGE_FORMATS,
|
|
366
309
|
ACCEPTED_IMAGE_FORMATS_STRING,
|
|
367
310
|
ACCOUNT_QUERY_KEY,
|
|
368
|
-
ACCOUNT_USERS_QUERY_KEY,
|
|
369
311
|
ADDON_IDS,
|
|
370
312
|
AI_CREDIT_OPTIONS,
|
|
371
313
|
AI_CREDIT_VALUES,
|
|
@@ -384,7 +326,6 @@ export {
|
|
|
384
326
|
Button,
|
|
385
327
|
default2 as BuyCreditsModal,
|
|
386
328
|
CARDS_QUERY_KEY,
|
|
387
|
-
CHARGES_QUERY_KEY,
|
|
388
329
|
CURRENCY_OPTIONS,
|
|
389
330
|
Calendar,
|
|
390
331
|
CalendarDayButton,
|
|
@@ -405,7 +346,6 @@ export {
|
|
|
405
346
|
ChangePhoneModal,
|
|
406
347
|
Checkbox,
|
|
407
348
|
default9 as CircularProgress,
|
|
408
|
-
ClarityEmbed,
|
|
409
349
|
ComboboxField,
|
|
410
350
|
Command,
|
|
411
351
|
CommandDialog,
|
|
@@ -435,11 +375,9 @@ export {
|
|
|
435
375
|
DialogTrigger,
|
|
436
376
|
default18 as DisableTwoFactorAuthModal,
|
|
437
377
|
EmbedWidgets,
|
|
438
|
-
FindCardsParamsSchema,
|
|
439
378
|
FormField,
|
|
440
379
|
FrillEmbed,
|
|
441
380
|
GENDER_OPTIONS,
|
|
442
|
-
INFINITE_PROJECTS_QUERY_KEY,
|
|
443
381
|
ImageCropModal,
|
|
444
382
|
ImageTooSmallModal,
|
|
445
383
|
ImageUpload,
|
|
@@ -449,8 +387,6 @@ export {
|
|
|
449
387
|
InputOTPSeparator,
|
|
450
388
|
InputOTPSlot,
|
|
451
389
|
LANGUAGE_OPTIONS2 as LANGUAGE_OPTIONS,
|
|
452
|
-
LIST_ALL_ACCOUNT_USERS_BASE_KEY,
|
|
453
|
-
LIST_ALL_ACCOUNT_USERS_QUERY_KEY,
|
|
454
390
|
LIST_AVAILABLE_USERS_BASE_KEY,
|
|
455
391
|
LIST_AVAILABLE_USERS_QUERY_KEY,
|
|
456
392
|
LIST_PROJECT_USERS_BASE_KEY,
|
|
@@ -474,8 +410,6 @@ export {
|
|
|
474
410
|
NotificationPageContent,
|
|
475
411
|
NotificationsPopover,
|
|
476
412
|
PLANS_QUERY_KEY,
|
|
477
|
-
PROJECTS_BASE_KEY,
|
|
478
|
-
PROJECTS_QUERY_KEY,
|
|
479
413
|
Pagination,
|
|
480
414
|
PaginationContent,
|
|
481
415
|
PaginationEllipsis,
|
|
@@ -496,7 +430,6 @@ export {
|
|
|
496
430
|
PreferencesSection,
|
|
497
431
|
ProfilePopover,
|
|
498
432
|
Progress,
|
|
499
|
-
ProjectSchema,
|
|
500
433
|
QueryProvider,
|
|
501
434
|
RadioGroup,
|
|
502
435
|
RadioGroupItem,
|
|
@@ -580,7 +513,6 @@ export {
|
|
|
580
513
|
formatShortDate,
|
|
581
514
|
formatTimer,
|
|
582
515
|
getImageDimensions,
|
|
583
|
-
getOriginalPriceFromCalculatedData,
|
|
584
516
|
getPriceFromCalculatedData,
|
|
585
517
|
hasSubscriptionExpired,
|
|
586
518
|
hideCrisp,
|
|
@@ -596,34 +528,26 @@ export {
|
|
|
596
528
|
toastVariants,
|
|
597
529
|
updateCrispUser,
|
|
598
530
|
useAccountModals,
|
|
599
|
-
useAccountToken,
|
|
600
531
|
useActiveSubscription,
|
|
601
|
-
useAuthQueryKey,
|
|
602
532
|
useBuyCreditsModal,
|
|
603
533
|
useCalculateSubscription,
|
|
604
534
|
useCancelledSubscriptionGuard,
|
|
605
|
-
useCardById,
|
|
606
535
|
useCards,
|
|
607
536
|
default7 as useCopyToClipboard,
|
|
608
537
|
default12 as useCountdownTimer,
|
|
609
538
|
useCreateCard,
|
|
610
|
-
useCreateProject,
|
|
611
539
|
useCurrentAccount,
|
|
612
540
|
useDebounce,
|
|
613
541
|
useDebounceState,
|
|
614
542
|
useDebouncedEffect,
|
|
615
543
|
useDeleteAccount,
|
|
616
544
|
useDeleteAccountUser,
|
|
617
|
-
useDeleteCard,
|
|
618
|
-
useDeleteProject,
|
|
619
545
|
useDesktopSidebarStore,
|
|
620
546
|
useHasPlanAddon,
|
|
621
547
|
useIaCredits,
|
|
622
548
|
useImageUpload,
|
|
623
|
-
useInfiniteProjects,
|
|
624
549
|
useInvalidateUser,
|
|
625
550
|
default13 as useIsMobile,
|
|
626
|
-
useListAllAccountUsers,
|
|
627
551
|
useListAvailableUsers,
|
|
628
552
|
useListProjectUsers,
|
|
629
553
|
useManagementPermissions,
|
|
@@ -634,22 +558,16 @@ export {
|
|
|
634
558
|
default11 as usePasswordVisibility,
|
|
635
559
|
usePlanById,
|
|
636
560
|
usePlans,
|
|
637
|
-
useProject,
|
|
638
|
-
useProjects,
|
|
639
|
-
useSetDefaultCard,
|
|
640
561
|
useSetUserData,
|
|
641
562
|
useSubscriptions,
|
|
642
563
|
useTwoFactorVerify,
|
|
643
564
|
useUpdateAccount,
|
|
644
565
|
useUpdateAccountUser,
|
|
645
566
|
useUpdateAccountUserById,
|
|
646
|
-
useUpdateProject,
|
|
647
567
|
useUpdateSubscriptionPlan,
|
|
648
568
|
useUserQuery,
|
|
649
569
|
useUserValidateSession,
|
|
650
570
|
useViaCep,
|
|
651
|
-
useWlId,
|
|
652
|
-
useWlQueryKey,
|
|
653
571
|
validateImage,
|
|
654
572
|
validateImageFormat,
|
|
655
573
|
validateImageSize,
|
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\";\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 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 { useSubscriptions } from \"./modules/subscriptions/hooks/list-subscriptions.hook\";\nexport {\n SUBSCRIPTIONS_QUERY_KEY,\n CHARGES_QUERY_KEY,\n} from \"./modules/subscriptions/constants/query-keys.constants\";\nexport { useActiveSubscription } from \"./modules/subscriptions/hooks/find-active-subscription.hook\";\nexport { useCancelledSubscriptionGuard } from \"./modules/subscriptions/hooks/use-cancelled-subscription-guard\";\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 { 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 { useSetDefaultCard } from \"./modules/cards/hooks/set-default-card.hook\";\nexport { useDeleteCard } from \"./modules/cards/hooks/delete-card.hook\";\nexport { useIaCredits } from \"./modules/ia-credits/hooks/ia-credits.hook\";\nexport type {\n IaCreditsSummary,\n IaCreditOperation,\n} from \"./modules/ia-credits/types\";\nexport type {\n Subscription,\n SubscriptionItem,\n FindSubscriptionsParams,\n} from \"./modules/subscriptions/types/subscription.type\";\nexport {\n SubscriptionSchema,\n SubscriptionItemSchema,\n} from \"./modules/subscriptions/types/subscription.type\";\nexport {\n ADDON_IDS,\n AI_CREDIT_OPTIONS,\n AI_CREDIT_VALUES,\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 { mapApiPlanToUiPlan } 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 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 type {\n Card as PaymentCard,\n CreateCardRequest,\n FindCardsParams,\n} from \"./modules/cards/types\";\nexport {\n CardSchema as PaymentCardSchema,\n CreateCardRequestSchema,\n FindCardsParamsSchema,\n} from \"./modules/cards/types\";\nexport { buildPlanExtras } from \"./modules/subscriptions/utils/build-plan-extras\";\nexport { hasSubscriptionExpired } from \"./modules/subscriptions/utils/has-subscription-expired\";\nexport {\n getPriceFromCalculatedData,\n getOriginalPriceFromCalculatedData,\n periodicityToBillingPeriod,\n} from \"./modules/subscriptions/utils/periodicity\";\nexport { useBuyCreditsModal } from \"./store/useBuyCreditsModal\";\nexport { usePaidPlanRequiredModal } from \"./store/usePaidPlanRequiredModal\";\nexport { default as BuyCreditsModal } from \"./components/modals/BuyCreditsModal\";\nexport { default as PaidPlanRequiredModal } from \"./components/modals/PaidPlanRequiredModal\";\nexport { default as AddCardModal } from \"./components/modals/cards/AddCardModal\";\nexport {\n CardFormFields,\n cardFormSchema,\n} from \"./components/modals/cards/CardFormFields\";\nexport type { CardFormData } from \"./components/modals/cards/CardFormFields\";\nexport { Skeleton } from \"./components/ui/feedback/Skeleton\";\nexport { PaymentInfoCard } from \"./components/ui/data-display/PaymentInfoCard\";\nexport { CardBrandIcon } from \"./components/ui/data-display/CardBrandIcons\";\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 } from \"./infra/utils/date\";\nexport { buildQueryParams } from \"./infra/utils/params\";\nexport { parseSchema, parseResult } from \"./infra/utils/parser\";\nexport { withAction } from \"./utils/withAction\";\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 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 {\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 {\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\";\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 { 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 { formatCurrencyNumber } from \"./utils/format/currency\";\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 {\n useUpdateAccount,\n useUpdateAccountUser,\n useUpdateAccountUserById,\n useDeleteAccountUser,\n useDeleteAccount,\n ACCOUNT_USERS_QUERY_KEY,\n} from \"./modules/accounts/hooks/useAccountManagement\";\nexport { useViaCep } from \"./modules/accounts/hooks/useViaCep\";\nexport { useAccountToken } from \"./modules/accounts/hooks/use-account-token.hook\";\n\n// Account Types\nexport type {\n UpdateAccountRequest,\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 } from \"./store/useAccountModals\";\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 { 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;AAGd;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;AAYjC,SAAS,qBAAqB;AAE9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gCAAgC;AAEzC,SAAS,wBAAwB;AACjC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,6BAA6B;AACtC,SAAS,qCAAqC;AAC9C,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS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ACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB;AAC1B,SAAS,uBAAuB;AAgBhC,SAAoB,WAAXA,iBAAgC;AACzC,SAAS,wBAAwB;AAGjC,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AAEvB,SAAoB,WAAXA,iBAAqC;AAC9C,SAAoB,WAAXA,iBAA4C;AACrD,SAAoB,WAAXA,iBAAgD;AACzD,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AACnC,SAAS,uBAAuB;AAChC,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AAGjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAAC;AAAA,OACK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOP,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,cAAc,oBAAoB;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":["default","LANGUAGE_OPTIONS"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Types\nexport * from \"./modules/auth/schema\";\nexport * from \"./modules/users/schema\";\nexport * from \"./modules/whitelabel/schema\";\n// Style types now come from whitelabel schema directly\nexport * from \"./infra/api/types\";\n\n// Contexts\nexport * from \"./providers/query.provider\";\nexport * from \"./providers/auth.provider\";\nexport * from \"./providers/whitelabel.provider\";\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 type {\n ProjectUser,\n AccountUser,\n AddRemoveProjectUsersParams,\n ListUsersParams,\n UsersPage,\n} from \"./modules/projects/types\";\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 { useSubscriptions } from \"./modules/subscriptions/hooks/list-subscriptions.hook\";\nexport { SUBSCRIPTIONS_QUERY_KEY } from \"./modules/subscriptions/constants/query-keys.constants\";\nexport { useActiveSubscription } from \"./modules/subscriptions/hooks/find-active-subscription.hook\";\nexport { useCancelledSubscriptionGuard } from \"./modules/subscriptions/hooks/use-cancelled-subscription-guard\";\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 { useCards, CARDS_QUERY_KEY } from \"./modules/cards/hooks/cards.hook\";\nexport { useCreateCard } from \"./modules/cards/hooks/create-card.hook\";\nexport { useIaCredits } from \"./modules/ia-credits/hooks/ia-credits.hook\";\nexport type {\n IaCreditsSummary,\n IaCreditOperation,\n} from \"./modules/ia-credits/types\";\nexport type {\n Subscription,\n SubscriptionItem,\n FindSubscriptionsParams,\n} from \"./modules/subscriptions/types/subscription.type\";\nexport {\n SubscriptionSchema,\n SubscriptionItemSchema,\n} from \"./modules/subscriptions/types/subscription.type\";\nexport { ADDON_IDS, AI_CREDIT_OPTIONS, AI_CREDIT_VALUES } from \"./modules/subscriptions/constants/addons.constants\";\nexport type { AddonKindEnum, AiCreditOption } from \"./modules/subscriptions/constants/addons.constants\";\nexport type { Plan, PlanItem, UiPlan, PlanFeature, PlanMainFeatures, PlanPricingByPeriod, PlanTooltips } from \"./modules/plans/types/plan.type\";\nexport { PlanSchema, PlanItemSchema } from \"./modules/plans/types/plan.type\";\nexport { mapApiPlanToUiPlan } from \"./modules/plans/utils/map-api-plan-to-ui\";\nexport type { PlanBillingPeriod } from \"./modules/plans/utils/map-api-plan-to-ui\";\nexport { usePlans, PLANS_QUERY_KEY } from \"./modules/plans/hooks/list-plans.hook\";\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 type { Card as PaymentCard, CreateCardRequest } from \"./modules/cards/types\";\nexport { CardSchema as PaymentCardSchema, CreateCardRequestSchema } from \"./modules/cards/types\";\nexport { buildPlanExtras } from \"./modules/subscriptions/utils/build-plan-extras\";\nexport { hasSubscriptionExpired } from \"./modules/subscriptions/utils/has-subscription-expired\";\nexport { getPriceFromCalculatedData, periodicityToBillingPeriod } from \"./modules/subscriptions/utils/periodicity\";\nexport { useBuyCreditsModal } from \"./store/useBuyCreditsModal\";\nexport { usePaidPlanRequiredModal } from \"./store/usePaidPlanRequiredModal\";\nexport { default as BuyCreditsModal } from \"./components/modals/BuyCreditsModal\";\nexport { default as PaidPlanRequiredModal } from \"./components/modals/PaidPlanRequiredModal\";\nexport { default as AddCardModal } from \"./components/modals/cards/AddCardModal\";\nexport { CardFormFields, cardFormSchema } from \"./components/modals/cards/CardFormFields\";\nexport type { CardFormData } from \"./components/modals/cards/CardFormFields\";\nexport { Skeleton } from \"./components/ui/feedback/Skeleton\";\nexport { PaymentInfoCard } from \"./components/ui/data-display/PaymentInfoCard\";\nexport { CardBrandIcon } from \"./components/ui/data-display/CardBrandIcons\";\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 } from \"./infra/utils/date\";\nexport { buildQueryParams } from \"./infra/utils/params\";\nexport { parseSchema, parseResult } from \"./infra/utils/parser\";\nexport { withAction } from \"./utils/withAction\";\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 type { NavItemConfig } from './components/navigation/subcomponents/NavItems';\nexport type { NavigationProject } from './components/navigation/types';\nexport { useMobileNavbarSheet } from './store/useMobileNavbarSheet';\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 {\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 {\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 { CrispEmbed, openCrispHelpdesk, hideCrisp, showCrisp, updateCrispUser } from \"./components/embeds/CrispEmbed\";\nexport { EmbedWidgets } from \"./components/embeds/EmbedWidgets\";\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\";\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 { 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 { formatCurrencyNumber } from \"./utils/format/currency\";\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 {\n useUpdateAccount,\n useUpdateAccountUser,\n useUpdateAccountUserById,\n useDeleteAccountUser,\n useDeleteAccount,\n} from \"./modules/accounts/hooks/useAccountManagement\";\nexport { useViaCep } from \"./modules/accounts/hooks/useViaCep\";\n\n// Account Types\nexport type {\n UpdateAccountRequest,\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 } from \"./store/useAccountModals\";\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 { 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;AAGd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAQP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gCAAgC;AAEzC,SAAS,wBAAwB;AACjC,SAAS,+BAA+B;AACxC,SAAS,6BAA6B;AACtC,SAAS,qCAAqC;AAC9C,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,gCAAgC;AACzC,SAAS,iCAAiC;AAC1C,SAAS,UAAU,uBAAuB;AAC1C,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAU7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,WAAW,mBAAmB,wBAAwB;AAG/D,SAAS,YAAY,sBAAsB;AAC3C,SAAS,0BAA0B;AA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ACA;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"]}
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { findCurrentAccount } from "../actions/find-current-account.action";
|
|
4
4
|
import { withAction } from "../../../utils/withAction";
|
|
5
|
-
import { useWlQueryKey } from "../../../hooks/useAuthQueryKey";
|
|
6
5
|
const ACCOUNT_QUERY_KEY = ["account"];
|
|
7
6
|
function useCurrentAccount() {
|
|
8
|
-
const queryKey = useWlQueryKey([...ACCOUNT_QUERY_KEY]);
|
|
9
7
|
return useQuery({
|
|
10
|
-
queryKey,
|
|
8
|
+
queryKey: ACCOUNT_QUERY_KEY,
|
|
11
9
|
queryFn: withAction(findCurrentAccount),
|
|
12
10
|
staleTime: 0,
|
|
13
11
|
gcTime: 10 * 60 * 1e3,
|
|
@@ -16,8 +14,7 @@ function useCurrentAccount() {
|
|
|
16
14
|
}
|
|
17
15
|
function useInvalidateAccount() {
|
|
18
16
|
const queryClient = useQueryClient();
|
|
19
|
-
|
|
20
|
-
return () => queryClient.invalidateQueries({ queryKey: accountKey });
|
|
17
|
+
return () => queryClient.invalidateQueries({ queryKey: ACCOUNT_QUERY_KEY });
|
|
21
18
|
}
|
|
22
19
|
export {
|
|
23
20
|
ACCOUNT_QUERY_KEY,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/accounts/hooks/current-account.hook.tsx"],"sourcesContent":["'use client';\n\nimport { useQuery, useQueryClient } from '@tanstack/react-query';\nimport { findCurrentAccount } from '../actions/find-current-account.action';\nimport { withAction } from '../../../utils/withAction';\
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/accounts/hooks/current-account.hook.tsx"],"sourcesContent":["'use client';\n\nimport { useQuery, useQueryClient } from '@tanstack/react-query';\nimport { findCurrentAccount } from '../actions/find-current-account.action';\nimport { withAction } from '../../../utils/withAction';\n\nexport const ACCOUNT_QUERY_KEY = ['account'];\n\nexport function useCurrentAccount() {\n return useQuery({\n queryKey: ACCOUNT_QUERY_KEY,\n queryFn: withAction(findCurrentAccount),\n staleTime: 0,\n gcTime: 10 * 60 * 1000,\n retry: false,\n });\n}\n\nexport function useInvalidateAccount() {\n const queryClient = useQueryClient();\n return () => queryClient.invalidateQueries({ queryKey: ACCOUNT_QUERY_KEY });\n}\n"],"mappings":";AAEA,SAAS,UAAU,sBAAsB;AACzC,SAAS,0BAA0B;AACnC,SAAS,kBAAkB;AAEpB,MAAM,oBAAoB,CAAC,SAAS;AAEpC,SAAS,oBAAoB;AAClC,SAAO,SAAS;AAAA,IACd,UAAU;AAAA,IACV,SAAS,WAAW,kBAAkB;AAAA,IACtC,WAAW;AAAA,IACX,QAAQ,KAAK,KAAK;AAAA,IAClB,OAAO;AAAA,EACT,CAAC;AACH;AAEO,SAAS,uBAAuB;AACrC,QAAM,cAAc,eAAe;AACnC,SAAO,MAAM,YAAY,kBAAkB,EAAE,UAAU,kBAAkB,CAAC;AAC5E;","names":[]}
|
|
@@ -10,57 +10,48 @@ import {
|
|
|
10
10
|
deleteAccountAction
|
|
11
11
|
} from "../actions/account-management.action";
|
|
12
12
|
import { withAction } from "../../../utils/withAction";
|
|
13
|
-
import { useAuthQueryKey, useWlQueryKey } from "../../../hooks/useAuthQueryKey";
|
|
14
13
|
const ACCOUNT_USERS_QUERY_KEY = ["account-users"];
|
|
15
14
|
function useUpdateAccount() {
|
|
16
15
|
const queryClient = useQueryClient();
|
|
17
|
-
const accountUsersKey = useAuthQueryKey([...ACCOUNT_USERS_QUERY_KEY]);
|
|
18
|
-
const accountKey = useWlQueryKey([...ACCOUNT_QUERY_KEY]);
|
|
19
|
-
const userKey = useWlQueryKey([...USER_QUERY_KEY]);
|
|
20
16
|
return useMutation({
|
|
21
17
|
mutationFn: withAction(updateAccountAction),
|
|
22
18
|
onSuccess: () => {
|
|
23
|
-
queryClient.invalidateQueries({ queryKey:
|
|
24
|
-
queryClient.invalidateQueries({ queryKey:
|
|
25
|
-
queryClient.invalidateQueries({ queryKey:
|
|
19
|
+
queryClient.invalidateQueries({ queryKey: ACCOUNT_USERS_QUERY_KEY });
|
|
20
|
+
queryClient.invalidateQueries({ queryKey: ACCOUNT_QUERY_KEY });
|
|
21
|
+
queryClient.invalidateQueries({ queryKey: USER_QUERY_KEY });
|
|
26
22
|
}
|
|
27
23
|
});
|
|
28
24
|
}
|
|
29
25
|
function useUpdateAccountUser() {
|
|
30
26
|
const queryClient = useQueryClient();
|
|
31
|
-
const accountUsersKey = useAuthQueryKey([...ACCOUNT_USERS_QUERY_KEY]);
|
|
32
|
-
const accountKey = useWlQueryKey([...ACCOUNT_QUERY_KEY]);
|
|
33
|
-
const userKey = useWlQueryKey([...USER_QUERY_KEY]);
|
|
34
27
|
return useMutation({
|
|
35
28
|
mutationFn: withAction(updateUserAction),
|
|
36
29
|
onSuccess: () => {
|
|
37
|
-
queryClient.invalidateQueries({ queryKey:
|
|
38
|
-
queryClient.invalidateQueries({ queryKey:
|
|
39
|
-
queryClient.invalidateQueries({ queryKey:
|
|
30
|
+
queryClient.invalidateQueries({ queryKey: ACCOUNT_USERS_QUERY_KEY });
|
|
31
|
+
queryClient.invalidateQueries({ queryKey: ACCOUNT_QUERY_KEY });
|
|
32
|
+
queryClient.invalidateQueries({ queryKey: USER_QUERY_KEY });
|
|
40
33
|
}
|
|
41
34
|
});
|
|
42
35
|
}
|
|
43
36
|
function useUpdateAccountUserById() {
|
|
44
37
|
const queryClient = useQueryClient();
|
|
45
|
-
const accountUsersKey = useAuthQueryKey([...ACCOUNT_USERS_QUERY_KEY]);
|
|
46
38
|
return useMutation({
|
|
47
39
|
mutationFn: withAction(
|
|
48
|
-
({ userId
|
|
40
|
+
({ userId, ...user }) => updateAccountUserByIdAction(userId, user)
|
|
49
41
|
),
|
|
50
42
|
onSuccess: () => {
|
|
51
|
-
queryClient.invalidateQueries({ queryKey:
|
|
43
|
+
queryClient.invalidateQueries({ queryKey: ACCOUNT_USERS_QUERY_KEY });
|
|
52
44
|
}
|
|
53
45
|
});
|
|
54
46
|
}
|
|
55
47
|
function useDeleteAccountUser(options) {
|
|
56
48
|
const queryClient = useQueryClient();
|
|
57
|
-
const accountUsersKey = useAuthQueryKey([...ACCOUNT_USERS_QUERY_KEY]);
|
|
58
49
|
return useMutation({
|
|
59
50
|
mutationFn: withAction(deleteAccountUserAction),
|
|
60
51
|
...options,
|
|
61
52
|
onSuccess: (...params) => {
|
|
62
53
|
options?.onSuccess?.(...params);
|
|
63
|
-
queryClient.invalidateQueries({ queryKey:
|
|
54
|
+
queryClient.invalidateQueries({ queryKey: ACCOUNT_USERS_QUERY_KEY });
|
|
64
55
|
}
|
|
65
56
|
});
|
|
66
57
|
}
|
|
@@ -71,7 +62,6 @@ function useDeleteAccount(options) {
|
|
|
71
62
|
});
|
|
72
63
|
}
|
|
73
64
|
export {
|
|
74
|
-
ACCOUNT_USERS_QUERY_KEY,
|
|
75
65
|
useDeleteAccount,
|
|
76
66
|
useDeleteAccountUser,
|
|
77
67
|
useUpdateAccount,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/accounts/hooks/useAccountManagement.ts"],"sourcesContent":["'use client';\n\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { USER_QUERY_KEY } from '../../auth/hooks/useUserQuery';\nimport { ACCOUNT_QUERY_KEY } from './current-account.hook';\nimport type {\n UpdateAccountRequest,\n UpdateAccountUserRequest,\n DeleteAccountUserResponse,\n DeleteAccountResponse,\n} from '../types';\nimport {\n updateUserAction,\n updateAccountAction,\n updateAccountUserByIdAction,\n deleteAccountUserAction,\n deleteAccountAction,\n} from '../actions/account-management.action';\nimport { withAction } from '../../../utils/withAction';\nimport type { UseMutationOptions } from '@tanstack/react-query';\
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/accounts/hooks/useAccountManagement.ts"],"sourcesContent":["'use client';\n\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { USER_QUERY_KEY } from '../../auth/hooks/useUserQuery';\nimport { ACCOUNT_QUERY_KEY } from './current-account.hook';\nimport type {\n UpdateAccountRequest,\n UpdateAccountUserRequest,\n DeleteAccountUserResponse,\n DeleteAccountResponse,\n} from '../types';\nimport {\n updateUserAction,\n updateAccountAction,\n updateAccountUserByIdAction,\n deleteAccountUserAction,\n deleteAccountAction,\n} from '../actions/account-management.action';\nimport { withAction } from '../../../utils/withAction';\nimport type { UseMutationOptions } from '@tanstack/react-query';\n\nconst ACCOUNT_USERS_QUERY_KEY = ['account-users'];\n\nexport function useUpdateAccount() {\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: withAction(updateAccountAction),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ACCOUNT_USERS_QUERY_KEY });\n queryClient.invalidateQueries({ queryKey: ACCOUNT_QUERY_KEY });\n queryClient.invalidateQueries({ queryKey: USER_QUERY_KEY });\n },\n });\n}\n\nexport function useUpdateAccountUser() {\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: withAction(updateUserAction),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ACCOUNT_USERS_QUERY_KEY });\n queryClient.invalidateQueries({ queryKey: ACCOUNT_QUERY_KEY });\n queryClient.invalidateQueries({ queryKey: USER_QUERY_KEY });\n },\n });\n}\n\nexport function useUpdateAccountUserById() {\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: withAction(({ userId, ...user }: UpdateAccountUserRequest & { userId: number }) =>\n updateAccountUserByIdAction(userId, user)\n ),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ACCOUNT_USERS_QUERY_KEY });\n },\n });\n}\n\nexport function useDeleteAccountUser(\n options?: UseMutationOptions<DeleteAccountUserResponse, Error, number>\n) {\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: withAction(deleteAccountUserAction),\n ...options,\n onSuccess: (...params) => {\n options?.onSuccess?.(...params);\n queryClient.invalidateQueries({ queryKey: ACCOUNT_USERS_QUERY_KEY });\n },\n });\n}\n\nexport function useDeleteAccount(\n options?: UseMutationOptions<DeleteAccountResponse, Error, void>\n) {\n return useMutation({\n mutationFn: withAction(deleteAccountAction),\n ...options,\n });\n}\n"],"mappings":";AAEA,SAAS,aAAa,sBAAsB;AAC5C,SAAS,sBAAsB;AAC/B,SAAS,yBAAyB;AAOlC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAG3B,MAAM,0BAA0B,CAAC,eAAe;AAEzC,SAAS,mBAAmB;AACjC,QAAM,cAAc,eAAe;AAEnC,SAAO,YAAY;AAAA,IACjB,YAAY,WAAW,mBAAmB;AAAA,IAC1C,WAAW,MAAM;AACf,kBAAY,kBAAkB,EAAE,UAAU,wBAAwB,CAAC;AACnE,kBAAY,kBAAkB,EAAE,UAAU,kBAAkB,CAAC;AAC7D,kBAAY,kBAAkB,EAAE,UAAU,eAAe,CAAC;AAAA,IAC5D;AAAA,EACF,CAAC;AACH;AAEO,SAAS,uBAAuB;AACrC,QAAM,cAAc,eAAe;AAEnC,SAAO,YAAY;AAAA,IACjB,YAAY,WAAW,gBAAgB;AAAA,IACvC,WAAW,MAAM;AACf,kBAAY,kBAAkB,EAAE,UAAU,wBAAwB,CAAC;AACnE,kBAAY,kBAAkB,EAAE,UAAU,kBAAkB,CAAC;AAC7D,kBAAY,kBAAkB,EAAE,UAAU,eAAe,CAAC;AAAA,IAC5D;AAAA,EACF,CAAC;AACH;AAEO,SAAS,2BAA2B;AACzC,QAAM,cAAc,eAAe;AAEnC,SAAO,YAAY;AAAA,IACjB,YAAY;AAAA,MAAW,CAAC,EAAE,QAAQ,GAAG,KAAK,MACxC,4BAA4B,QAAQ,IAAI;AAAA,IAC1C;AAAA,IACA,WAAW,MAAM;AACf,kBAAY,kBAAkB,EAAE,UAAU,wBAAwB,CAAC;AAAA,IACrE;AAAA,EACF,CAAC;AACH;AAEO,SAAS,qBACd,SACA;AACA,QAAM,cAAc,eAAe;AAEnC,SAAO,YAAY;AAAA,IACjB,YAAY,WAAW,uBAAuB;AAAA,IAC9C,GAAG;AAAA,IACH,WAAW,IAAI,WAAW;AACxB,eAAS,YAAY,GAAG,MAAM;AAC9B,kBAAY,kBAAkB,EAAE,UAAU,wBAAwB,CAAC;AAAA,IACrE;AAAA,EACF,CAAC;AACH;AAEO,SAAS,iBACd,SACA;AACA,SAAO,YAAY;AAAA,IACjB,YAAY,WAAW,mBAAmB;AAAA,IAC1C,GAAG;AAAA,EACL,CAAC;AACH;","names":[]}
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
import { useQuery } from "@tanstack/react-query";
|
|
3
3
|
import { listCurrenciesAction } from "../actions/list-currencies.action";
|
|
4
4
|
import { withAction } from "../../../utils/withAction";
|
|
5
|
-
import { useWlQueryKey } from "../../../hooks/useAuthQueryKey";
|
|
6
5
|
const CURRENCIES_QUERY_KEY = ["currencies"];
|
|
7
6
|
function useCurrencies() {
|
|
8
|
-
const queryKey = useWlQueryKey([...CURRENCIES_QUERY_KEY]);
|
|
9
7
|
return useQuery({
|
|
10
|
-
queryKey,
|
|
8
|
+
queryKey: CURRENCIES_QUERY_KEY,
|
|
11
9
|
queryFn: withAction(listCurrenciesAction),
|
|
12
10
|
staleTime: Infinity
|
|
13
11
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/accounts/hooks/useCurrencies.ts"],"sourcesContent":["'use client';\n\nimport { useQuery } from '@tanstack/react-query';\nimport { listCurrenciesAction } from '../actions/list-currencies.action';\nimport { withAction } from '../../../utils/withAction';\
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/accounts/hooks/useCurrencies.ts"],"sourcesContent":["'use client';\n\nimport { useQuery } from '@tanstack/react-query';\nimport { listCurrenciesAction } from '../actions/list-currencies.action';\nimport { withAction } from '../../../utils/withAction';\n\nexport const CURRENCIES_QUERY_KEY = ['currencies'];\n\nexport function useCurrencies() {\n return useQuery({\n queryKey: CURRENCIES_QUERY_KEY,\n queryFn: withAction(listCurrenciesAction),\n staleTime: Infinity,\n });\n}\n"],"mappings":";AAEA,SAAS,gBAAgB;AACzB,SAAS,4BAA4B;AACrC,SAAS,kBAAkB;AAEpB,MAAM,uBAAuB,CAAC,YAAY;AAE1C,SAAS,gBAAgB;AAC9B,SAAO,SAAS;AAAA,IACd,UAAU;AAAA,IACV,SAAS,WAAW,oBAAoB;AAAA,IACxC,WAAW;AAAA,EACb,CAAC;AACH;","names":[]}
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
import { useQuery } from "@tanstack/react-query";
|
|
3
3
|
import { listTimezonesAction } from "../actions/list-timezones.action";
|
|
4
4
|
import { withAction } from "../../../utils/withAction";
|
|
5
|
-
import { useWlQueryKey } from "../../../hooks/useAuthQueryKey";
|
|
6
5
|
const TIMEZONES_QUERY_KEY = ["timezones"];
|
|
7
6
|
function useTimezones() {
|
|
8
|
-
const queryKey = useWlQueryKey([...TIMEZONES_QUERY_KEY]);
|
|
9
7
|
return useQuery({
|
|
10
|
-
queryKey,
|
|
8
|
+
queryKey: TIMEZONES_QUERY_KEY,
|
|
11
9
|
queryFn: withAction(listTimezonesAction),
|
|
12
10
|
staleTime: Infinity
|
|
13
11
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/accounts/hooks/useTimezones.ts"],"sourcesContent":["'use client';\n\nimport { useQuery } from '@tanstack/react-query';\nimport { listTimezonesAction } from '../actions/list-timezones.action';\nimport { withAction } from '../../../utils/withAction';\
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/accounts/hooks/useTimezones.ts"],"sourcesContent":["'use client';\n\nimport { useQuery } from '@tanstack/react-query';\nimport { listTimezonesAction } from '../actions/list-timezones.action';\nimport { withAction } from '../../../utils/withAction';\n\nexport const TIMEZONES_QUERY_KEY = ['timezones'];\n\nexport function useTimezones() {\n return useQuery({\n queryKey: TIMEZONES_QUERY_KEY,\n queryFn: withAction(listTimezonesAction),\n staleTime: Infinity,\n });\n}\n"],"mappings":";AAEA,SAAS,gBAAgB;AACzB,SAAS,2BAA2B;AACpC,SAAS,kBAAkB;AAEpB,MAAM,sBAAsB,CAAC,WAAW;AAExC,SAAS,eAAe;AAC7B,SAAO,SAAS;AAAA,IACd,UAAU;AAAA,IACV,SAAS,WAAW,mBAAmB;AAAA,IACvC,WAAW;AAAA,EACb,CAAC;AACH;","names":[]}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { withAction } from "../../../utils/withAction";
|
|
4
|
-
import { useWlQueryKey } from "../../../hooks/useAuthQueryKey";
|
|
5
4
|
const USER_QUERY_KEY = ["user"];
|
|
6
|
-
const USER_VALIDATE_SESSION_KEY = ["user-validate-session"];
|
|
7
5
|
async function fetchUser() {
|
|
8
6
|
const { findUserById: getUserDataAction } = await import("../../users/action/find-user-by-id.action");
|
|
9
7
|
const result = await getUserDataAction();
|
|
@@ -14,9 +12,8 @@ async function validateUserSession() {
|
|
|
14
12
|
return await validateSessionAction();
|
|
15
13
|
}
|
|
16
14
|
function useUserQuery() {
|
|
17
|
-
const queryKey = useWlQueryKey([...USER_QUERY_KEY]);
|
|
18
15
|
return useQuery({
|
|
19
|
-
queryKey,
|
|
16
|
+
queryKey: USER_QUERY_KEY,
|
|
20
17
|
queryFn: fetchUser,
|
|
21
18
|
staleTime: 5 * 60 * 1e3,
|
|
22
19
|
gcTime: 10 * 60 * 1e3,
|
|
@@ -24,9 +21,8 @@ function useUserQuery() {
|
|
|
24
21
|
});
|
|
25
22
|
}
|
|
26
23
|
function useUserValidateSession(options) {
|
|
27
|
-
const queryKey = useWlQueryKey([...USER_VALIDATE_SESSION_KEY]);
|
|
28
24
|
return useQuery({
|
|
29
|
-
queryKey,
|
|
25
|
+
queryKey: ["user-validate-session"],
|
|
30
26
|
queryFn: validateUserSession,
|
|
31
27
|
retry: false,
|
|
32
28
|
staleTime: 5 * 60 * 1e3,
|
|
@@ -37,32 +33,27 @@ function useUserValidateSession(options) {
|
|
|
37
33
|
}
|
|
38
34
|
function useTwoFactorVerify() {
|
|
39
35
|
const queryClient = useQueryClient();
|
|
40
|
-
const userKey = useWlQueryKey([...USER_QUERY_KEY]);
|
|
41
|
-
const twoFactorKey = useWlQueryKey(["two-factor-pending"]);
|
|
42
36
|
return useMutation({
|
|
43
37
|
mutationFn: async ({ cookie, code, window }) => {
|
|
44
38
|
const { verifyTwoFactorAction } = await import("../actions/verify-two-factor.action");
|
|
45
39
|
return withAction(() => verifyTwoFactorAction(cookie, code, window))();
|
|
46
40
|
},
|
|
47
41
|
onSuccess: () => {
|
|
48
|
-
queryClient.invalidateQueries({ queryKey:
|
|
49
|
-
queryClient.invalidateQueries({ queryKey:
|
|
42
|
+
queryClient.invalidateQueries({ queryKey: USER_QUERY_KEY });
|
|
43
|
+
queryClient.invalidateQueries({ queryKey: ["two-factor-pending"] });
|
|
50
44
|
}
|
|
51
45
|
});
|
|
52
46
|
}
|
|
53
47
|
function useInvalidateUser() {
|
|
54
48
|
const queryClient = useQueryClient();
|
|
55
|
-
|
|
56
|
-
return () => queryClient.invalidateQueries({ queryKey: userKey });
|
|
49
|
+
return () => queryClient.invalidateQueries({ queryKey: USER_QUERY_KEY });
|
|
57
50
|
}
|
|
58
51
|
function useSetUserData() {
|
|
59
52
|
const queryClient = useQueryClient();
|
|
60
|
-
|
|
61
|
-
return (user) => queryClient.setQueryData(userKey, user);
|
|
53
|
+
return (user) => queryClient.setQueryData(USER_QUERY_KEY, user);
|
|
62
54
|
}
|
|
63
55
|
export {
|
|
64
56
|
USER_QUERY_KEY,
|
|
65
|
-
USER_VALIDATE_SESSION_KEY,
|
|
66
57
|
useInvalidateUser,
|
|
67
58
|
useSetUserData,
|
|
68
59
|
useTwoFactorVerify,
|