@greatapps/common 1.1.665 → 1.1.667
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 +8 -6
- package/dist/components/account/ConfigurationsMyAccountModal.mjs.map +1 -1
- package/dist/components/account/ConfirmDeleteAccountModal.mjs +20 -19
- package/dist/components/account/ConfirmDeleteAccountModal.mjs.map +1 -1
- package/dist/components/account/ConfirmGlobalPreferencesModal.mjs +10 -11
- package/dist/components/account/ConfirmGlobalPreferencesModal.mjs.map +1 -1
- package/dist/components/account/DeleteAccountModal.mjs +34 -28
- package/dist/components/account/DeleteAccountModal.mjs.map +1 -1
- package/dist/components/account/DisableTwoFactorAuthModal.mjs +7 -5
- package/dist/components/account/DisableTwoFactorAuthModal.mjs.map +1 -1
- package/dist/components/account/IsntPossibleDeleteAccountModal.mjs +8 -9
- package/dist/components/account/IsntPossibleDeleteAccountModal.mjs.map +1 -1
- package/dist/components/account/TwoFactorAuthModal.mjs +22 -23
- package/dist/components/account/TwoFactorAuthModal.mjs.map +1 -1
- package/dist/components/account/hooks/useChangeEmailForm.mjs +5 -3
- package/dist/components/account/hooks/useChangeEmailForm.mjs.map +1 -1
- package/dist/components/account/hooks/useChangePasswordForm.mjs +26 -3
- package/dist/components/account/hooks/useChangePasswordForm.mjs.map +1 -1
- package/dist/components/account/hooks/useChangePhoneForm.mjs +18 -9
- package/dist/components/account/hooks/useChangePhoneForm.mjs.map +1 -1
- package/dist/components/account/hooks/useDisableTwoFactorAuthForm.mjs +26 -3
- package/dist/components/account/hooks/useDisableTwoFactorAuthForm.mjs.map +1 -1
- package/dist/components/account/hooks/useOtpVerification.mjs +19 -3
- package/dist/components/account/hooks/useOtpVerification.mjs.map +1 -1
- package/dist/components/account/hooks/useTwoFactorAuthForm.mjs +27 -4
- package/dist/components/account/hooks/useTwoFactorAuthForm.mjs.map +1 -1
- package/dist/components/account/sections/ChangeEmailModal.mjs +25 -28
- package/dist/components/account/sections/ChangeEmailModal.mjs.map +1 -1
- package/dist/components/account/sections/ChangePasswordSection.mjs +8 -6
- package/dist/components/account/sections/ChangePasswordSection.mjs.map +1 -1
- package/dist/components/account/sections/ChangePhoneModal.mjs +24 -27
- package/dist/components/account/sections/ChangePhoneModal.mjs.map +1 -1
- package/dist/components/account/sections/MyProfileSection.mjs +30 -21
- package/dist/components/account/sections/MyProfileSection.mjs.map +1 -1
- package/dist/components/account/sections/PreferencesSection.mjs +41 -23
- package/dist/components/account/sections/PreferencesSection.mjs.map +1 -1
- package/dist/components/account/sections/SecuritySection.mjs +11 -9
- package/dist/components/account/sections/SecuritySection.mjs.map +1 -1
- package/dist/components/account/sections/TokenSection.mjs +24 -8
- package/dist/components/account/sections/TokenSection.mjs.map +1 -1
- package/dist/components/embeds/CrispEmbed.mjs +9 -6
- package/dist/components/embeds/CrispEmbed.mjs.map +1 -1
- package/dist/i18n/config.mjs +13 -0
- package/dist/i18n/config.mjs.map +1 -0
- package/dist/i18n/country-language.mjs +74 -0
- package/dist/i18n/country-language.mjs.map +1 -0
- package/dist/i18n/messages/en-us.mjs +211 -0
- package/dist/i18n/messages/en-us.mjs.map +1 -0
- package/dist/i18n/messages/es-es.mjs +211 -0
- package/dist/i18n/messages/es-es.mjs.map +1 -0
- package/dist/i18n/messages/index.mjs +16 -0
- package/dist/i18n/messages/index.mjs.map +1 -0
- package/dist/i18n/messages/pt-br.mjs +216 -0
- package/dist/i18n/messages/pt-br.mjs.map +1 -0
- package/dist/i18n/normalize.mjs +12 -0
- package/dist/i18n/normalize.mjs.map +1 -0
- package/dist/i18n/resolve-locale.mjs +42 -0
- package/dist/i18n/resolve-locale.mjs.map +1 -0
- package/dist/i18n.mjs +14 -0
- package/dist/i18n.mjs.map +1 -0
- package/dist/providers/auth.provider.mjs +9 -1
- package/dist/providers/auth.provider.mjs.map +1 -1
- package/dist/server.mjs +2 -0
- package/dist/server.mjs.map +1 -1
- package/dist/utils/intl/cookie-domain.mjs +17 -0
- package/dist/utils/intl/cookie-domain.mjs.map +1 -0
- package/dist/utils/intl/locale-cookie.mjs +13 -0
- package/dist/utils/intl/locale-cookie.mjs.map +1 -0
- package/dist/utils/intl/locales.mjs +3 -2
- package/dist/utils/intl/locales.mjs.map +1 -1
- package/package.json +7 -1
- package/src/components/account/ConfigurationsMyAccountModal.tsx +10 -6
- package/src/components/account/ConfirmDeleteAccountModal.tsx +22 -13
- package/src/components/account/ConfirmGlobalPreferencesModal.tsx +12 -10
- package/src/components/account/DeleteAccountModal.tsx +34 -24
- package/src/components/account/DisableTwoFactorAuthModal.tsx +11 -6
- package/src/components/account/IsntPossibleDeleteAccountModal.tsx +8 -6
- package/src/components/account/TwoFactorAuthModal.tsx +33 -29
- package/src/components/account/hooks/useChangeEmailForm.tsx +5 -3
- package/src/components/account/hooks/useChangePasswordForm.tsx +20 -6
- package/src/components/account/hooks/useChangePhoneForm.tsx +16 -10
- package/src/components/account/hooks/useDisableTwoFactorAuthForm.tsx +20 -6
- package/src/components/account/hooks/useOtpVerification.tsx +16 -4
- package/src/components/account/hooks/useTwoFactorAuthForm.tsx +21 -7
- package/src/components/account/sections/ChangeEmailModal.tsx +35 -21
- package/src/components/account/sections/ChangePasswordSection.tsx +10 -6
- package/src/components/account/sections/ChangePhoneModal.tsx +50 -22
- package/src/components/account/sections/MyProfileSection.tsx +30 -22
- package/src/components/account/sections/PreferencesSection.tsx +45 -24
- package/src/components/account/sections/SecuritySection.tsx +19 -10
- package/src/components/account/sections/TokenSection.tsx +22 -10
- package/src/components/embeds/CrispEmbed.tsx +12 -8
- package/src/i18n/config.ts +17 -0
- package/src/i18n/country-language.ts +60 -0
- package/src/i18n/messages/en-us.ts +226 -0
- package/src/i18n/messages/es-es.ts +227 -0
- package/src/i18n/messages/index.ts +24 -0
- package/src/i18n/messages/pt-br.ts +236 -0
- package/src/i18n/normalize.ts +15 -0
- package/src/i18n/resolve-locale.ts +77 -0
- package/src/i18n.ts +10 -0
- package/src/providers/auth.provider.tsx +13 -1
- package/src/server.ts +2 -0
- package/src/utils/intl/cookie-domain.ts +29 -0
- package/src/utils/intl/locale-cookie.ts +18 -0
- package/src/utils/intl/locales.ts +3 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { IconAlertTriangle, IconBrandGoogleFilled } from "@tabler/icons-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
4
5
|
import { toast } from "sonner";
|
|
5
6
|
import { useQueryClient } from "@tanstack/react-query";
|
|
6
7
|
import { useAuth } from "../../../providers/auth.provider";
|
|
@@ -10,6 +11,7 @@ import { Toast } from "../../ui/feedback/Toast";
|
|
|
10
11
|
function SecuritySection({
|
|
11
12
|
onDeleteAccount
|
|
12
13
|
}) {
|
|
14
|
+
const translate = useTranslations();
|
|
13
15
|
const { user } = useAuth();
|
|
14
16
|
const queryClient = useQueryClient();
|
|
15
17
|
const { mutateAsync: unlinkGoogle, isPending: isUnlinking } = useUnlinkGoogle();
|
|
@@ -20,17 +22,17 @@ function SecuritySection({
|
|
|
20
22
|
toast.custom((t) => /* @__PURE__ */ jsx(Toast, { variant: "success", message: result.message, toastId: t }));
|
|
21
23
|
queryClient.invalidateQueries({ queryKey: USER_QUERY_KEY });
|
|
22
24
|
} catch (error) {
|
|
23
|
-
const message = error instanceof Error ? error.message : "
|
|
24
|
-
toast.custom((
|
|
25
|
+
const message = error instanceof Error ? error.message : translate("common.account.security.unlinkError");
|
|
26
|
+
toast.custom((toastId) => /* @__PURE__ */ jsx(Toast, { variant: "error", message, toastId }));
|
|
25
27
|
}
|
|
26
28
|
};
|
|
27
29
|
return /* @__PURE__ */ jsxs("div", { className: "h-full overflow-y-auto overscroll-contain px-4 pb-20 lg:p-5 lg:pt-5 flex flex-col gap-5 lg:gap-6 lg:pb-31 lg:overscroll-auto", children: [
|
|
28
|
-
/* @__PURE__ */ jsx("span", { className: "paragraph-medium-semibold text-gray-950 hidden lg:block", children: "
|
|
30
|
+
/* @__PURE__ */ jsx("span", { className: "paragraph-medium-semibold text-gray-950 hidden lg:block", children: translate("common.account.security.title") }),
|
|
29
31
|
hasGoogleLinked && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center lg:items-start gap-4", children: [
|
|
30
32
|
/* @__PURE__ */ jsx("div", { className: "size-10 rounded-lg bg-blue-50 flex items-center justify-center", children: /* @__PURE__ */ jsx(IconBrandGoogleFilled, { size: 20, className: "text-blue-500" }) }),
|
|
31
33
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
32
|
-
/* @__PURE__ */ jsx("span", { className: "paragraph-medium-semibold text-gray-950", children: "
|
|
33
|
-
/* @__PURE__ */ jsx("span", { className: "paragraph-small-regular text-gray-600", children:
|
|
34
|
+
/* @__PURE__ */ jsx("span", { className: "paragraph-medium-semibold text-gray-950", children: translate("common.account.security.googleLinkedTitle") }),
|
|
35
|
+
/* @__PURE__ */ jsx("span", { className: "paragraph-small-regular text-gray-600", children: translate("common.account.security.googleLinkedDescription") })
|
|
34
36
|
] }),
|
|
35
37
|
/* @__PURE__ */ jsx(
|
|
36
38
|
"button",
|
|
@@ -39,15 +41,15 @@ function SecuritySection({
|
|
|
39
41
|
disabled: isUnlinking,
|
|
40
42
|
className: "paragraph-small-semibold text-zinc-700 bg-zinc-100 rounded-lg px-3 py-2 cursor-pointer hover:bg-zinc-200 transition-colors w-fit disabled:opacity-50 disabled:cursor-not-allowed",
|
|
41
43
|
onClick: handleUnlinkGoogle,
|
|
42
|
-
children: isUnlinking ? "
|
|
44
|
+
children: isUnlinking ? translate("common.account.security.unlinking") : translate("common.account.security.unlinkGoogle")
|
|
43
45
|
}
|
|
44
46
|
)
|
|
45
47
|
] }),
|
|
46
48
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center lg:items-start gap-4", children: [
|
|
47
49
|
/* @__PURE__ */ jsx("div", { className: "size-10 rounded-lg bg-red-50 flex items-center justify-center", children: /* @__PURE__ */ jsx(IconAlertTriangle, { size: 20, className: "text-red-500" }) }),
|
|
48
50
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
49
|
-
/* @__PURE__ */ jsx("span", { className: "paragraph-medium-semibold text-gray-950", children: "
|
|
50
|
-
/* @__PURE__ */ jsx("span", { className: "paragraph-small-regular text-gray-600", children: "
|
|
51
|
+
/* @__PURE__ */ jsx("span", { className: "paragraph-medium-semibold text-gray-950", children: translate("common.account.deleteAccount.title") }),
|
|
52
|
+
/* @__PURE__ */ jsx("span", { className: "paragraph-small-regular text-gray-600", children: translate("common.account.security.deleteAccountDescription") })
|
|
51
53
|
] }),
|
|
52
54
|
onDeleteAccount && /* @__PURE__ */ jsx(
|
|
53
55
|
"button",
|
|
@@ -55,7 +57,7 @@ function SecuritySection({
|
|
|
55
57
|
type: "button",
|
|
56
58
|
className: "paragraph-small-semibold text-red-600 bg-red-50 rounded-lg px-3 py-2 cursor-pointer hover:bg-red-100 transition-colors w-fit",
|
|
57
59
|
onClick: onDeleteAccount,
|
|
58
|
-
children: "
|
|
60
|
+
children: translate("common.account.security.deleteMyAccount")
|
|
59
61
|
}
|
|
60
62
|
)
|
|
61
63
|
] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/account/sections/SecuritySection.tsx"],"sourcesContent":["'use client';\n\nimport { IconAlertTriangle, IconBrandGoogleFilled } from '@tabler/icons-react';\nimport { toast } from 'sonner';\nimport { useQueryClient } from '@tanstack/react-query';\nimport { useAuth } from '../../../providers/auth.provider';\nimport { AccountSectionType } from '../../../enums/AccountSectionType';\nimport { useUnlinkGoogle } from '../../../modules/auth/hooks/unlink-google.hook';\nimport { USER_QUERY_KEY } from '../../../modules/auth/hooks/useUserQuery';\nimport { Toast } from '../../ui/feedback/Toast';\n\ninterface SecuritySectionProps {\n setActiveSection: (section: AccountSectionType) => void;\n onClose: () => void;\n onDeleteAccount?: () => void;\n}\n\nexport function SecuritySection({\n onDeleteAccount,\n}: SecuritySectionProps) {\n const { user } = useAuth();\n const queryClient = useQueryClient();\n const { mutateAsync: unlinkGoogle, isPending: isUnlinking } = useUnlinkGoogle();\n const hasGoogleLinked = !!user?.google_sub;\n\n const handleUnlinkGoogle = async () => {\n try {\n const result = await unlinkGoogle();\n toast.custom((t) => (\n <Toast variant=\"success\" message={result.message} toastId={t} />\n ));\n queryClient.invalidateQueries({ queryKey: USER_QUERY_KEY });\n } catch (error) {\n const message =\n error instanceof Error ? error.message : '
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/account/sections/SecuritySection.tsx"],"sourcesContent":["'use client';\n\nimport { IconAlertTriangle, IconBrandGoogleFilled } from '@tabler/icons-react';\nimport { useTranslations } from 'next-intl';\nimport { toast } from 'sonner';\nimport { useQueryClient } from '@tanstack/react-query';\nimport { useAuth } from '../../../providers/auth.provider';\nimport { AccountSectionType } from '../../../enums/AccountSectionType';\nimport { useUnlinkGoogle } from '../../../modules/auth/hooks/unlink-google.hook';\nimport { USER_QUERY_KEY } from '../../../modules/auth/hooks/useUserQuery';\nimport { Toast } from '../../ui/feedback/Toast';\n\ninterface SecuritySectionProps {\n setActiveSection: (section: AccountSectionType) => void;\n onClose: () => void;\n onDeleteAccount?: () => void;\n}\n\nexport function SecuritySection({\n onDeleteAccount,\n}: SecuritySectionProps) {\n const translate = useTranslations();\n const { user } = useAuth();\n const queryClient = useQueryClient();\n const { mutateAsync: unlinkGoogle, isPending: isUnlinking } = useUnlinkGoogle();\n const hasGoogleLinked = !!user?.google_sub;\n\n const handleUnlinkGoogle = async () => {\n try {\n const result = await unlinkGoogle();\n toast.custom((t) => (\n <Toast variant=\"success\" message={result.message} toastId={t} />\n ));\n queryClient.invalidateQueries({ queryKey: USER_QUERY_KEY });\n } catch (error) {\n const message =\n error instanceof Error ? error.message : translate('common.account.security.unlinkError');\n toast.custom((toastId) => <Toast variant=\"error\" message={message} toastId={toastId} />);\n }\n };\n\n return (\n <div className=\"h-full overflow-y-auto overscroll-contain px-4 pb-20 lg:p-5 lg:pt-5 flex flex-col gap-5 lg:gap-6 lg:pb-31 lg:overscroll-auto\">\n <span className=\"paragraph-medium-semibold text-gray-950 hidden lg:block\">\n {translate('common.account.security.title')}\n </span>\n\n {hasGoogleLinked && (\n <div className=\"flex flex-col items-center lg:items-start gap-4\">\n <div className=\"size-10 rounded-lg bg-blue-50 flex items-center justify-center\">\n <IconBrandGoogleFilled size={20} className=\"text-blue-500\" />\n </div>\n\n <div className=\"flex flex-col gap-2\">\n <span className=\"paragraph-medium-semibold text-gray-950\">\n {translate('common.account.security.googleLinkedTitle')}\n </span>\n <span className=\"paragraph-small-regular text-gray-600\">\n {translate('common.account.security.googleLinkedDescription')}\n </span>\n </div>\n\n <button\n type=\"button\"\n disabled={isUnlinking}\n className=\"paragraph-small-semibold text-zinc-700 bg-zinc-100 rounded-lg px-3 py-2 cursor-pointer hover:bg-zinc-200 transition-colors w-fit disabled:opacity-50 disabled:cursor-not-allowed\"\n onClick={handleUnlinkGoogle}\n >\n {isUnlinking\n ? translate('common.account.security.unlinking')\n : translate('common.account.security.unlinkGoogle')}\n </button>\n </div>\n )}\n\n <div className=\"flex flex-col items-center lg:items-start gap-4\">\n <div className=\"size-10 rounded-lg bg-red-50 flex items-center justify-center\">\n <IconAlertTriangle size={20} className=\"text-red-500\" />\n </div>\n\n <div className=\"flex flex-col gap-2\">\n <span className=\"paragraph-medium-semibold text-gray-950\">\n {translate('common.account.deleteAccount.title')}\n </span>\n <span className=\"paragraph-small-regular text-gray-600\">\n {translate('common.account.security.deleteAccountDescription')}\n </span>\n </div>\n\n {onDeleteAccount && (\n <button\n type=\"button\"\n className=\"paragraph-small-semibold text-red-600 bg-red-50 rounded-lg px-3 py-2 cursor-pointer hover:bg-red-100 transition-colors w-fit\"\n onClick={onDeleteAccount}\n >\n {translate('common.account.security.deleteMyAccount')}\n </button>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";AA+BQ,cAsBE,YAtB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AAAA,UACV,WAAU;AAAA,UACV,SAAS;AAAA,UAER,wBACG,UAAU,mCAAmC,IAC7C,UAAU,sCAAsC;AAAA;AAAA,MACtD;AAAA,OACF;AAAA,IAGF,qBAAC,SAAI,WAAU,mDACb;AAAA,0BAAC,SAAI,WAAU,iEACb,8BAAC,qBAAkB,MAAM,IAAI,WAAU,gBAAe,GACxD;AAAA,MAEA,qBAAC,SAAI,WAAU,uBACb;AAAA,4BAAC,UAAK,WAAU,2CACb,oBAAU,oCAAoC,GACjD;AAAA,QACA,oBAAC,UAAK,WAAU,yCACb,oBAAU,kDAAkD,GAC/D;AAAA,SACF;AAAA,MAEC,mBACC;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,SAAS;AAAA,UAER,oBAAU,yCAAyC;AAAA;AAAA,MACtD;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { IconCheck, IconCopy, IconInfoCircle } from "@tabler/icons-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
4
5
|
import { toast } from "sonner";
|
|
5
6
|
import { Toast } from "../../ui/feedback/Toast";
|
|
6
7
|
import { Button } from "../../ui/buttons/Button";
|
|
@@ -9,25 +10,40 @@ import useCopyToClipboard from "../../../hooks/copy-to-clipboard.hook";
|
|
|
9
10
|
import { useAccountToken } from "../../../modules/accounts/hooks/use-account-token.hook";
|
|
10
11
|
import { useIsDefaultWhitelabel } from "../../../providers/whitelabel.provider";
|
|
11
12
|
function TokenSection() {
|
|
13
|
+
const translate = useTranslations();
|
|
12
14
|
const { data: token = "", isLoading } = useAccountToken();
|
|
13
15
|
const isDefaultWl = useIsDefaultWhitelabel();
|
|
14
16
|
const { isCopied, copy } = useCopyToClipboard({
|
|
15
17
|
onSuccess: () => {
|
|
16
|
-
toast.custom((
|
|
18
|
+
toast.custom((toastId) => /* @__PURE__ */ jsx(
|
|
19
|
+
Toast,
|
|
20
|
+
{
|
|
21
|
+
variant: "success",
|
|
22
|
+
message: translate("common.account.token.copySuccess"),
|
|
23
|
+
toastId
|
|
24
|
+
}
|
|
25
|
+
));
|
|
17
26
|
},
|
|
18
27
|
onError: () => {
|
|
19
|
-
toast.custom((
|
|
28
|
+
toast.custom((toastId) => /* @__PURE__ */ jsx(
|
|
29
|
+
Toast,
|
|
30
|
+
{
|
|
31
|
+
variant: "error",
|
|
32
|
+
message: translate("common.account.token.copyError"),
|
|
33
|
+
toastId
|
|
34
|
+
}
|
|
35
|
+
));
|
|
20
36
|
}
|
|
21
37
|
});
|
|
22
38
|
return /* @__PURE__ */ jsxs("div", { className: "h-full overflow-y-auto overscroll-contain px-4 pb-20 lg:p-5 lg:pt-5 flex flex-col gap-5 lg:gap-6 lg:pb-31 lg:overscroll-auto", children: [
|
|
23
|
-
/* @__PURE__ */ jsx("span", { className: "paragraph-medium-semibold text-gray-950", children: "
|
|
39
|
+
/* @__PURE__ */ jsx("span", { className: "paragraph-medium-semibold text-gray-950", children: translate("common.account.token.title") }),
|
|
24
40
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
25
41
|
/* @__PURE__ */ jsxs("div", { className: "flex items-end gap-3", children: [
|
|
26
42
|
/* @__PURE__ */ jsx(
|
|
27
43
|
FormField,
|
|
28
44
|
{
|
|
29
|
-
label: "
|
|
30
|
-
value: isLoading ? "
|
|
45
|
+
label: translate("common.account.token.label"),
|
|
46
|
+
value: isLoading ? translate("common.actions.loading") : token,
|
|
31
47
|
disabled: true,
|
|
32
48
|
readOnly: true,
|
|
33
49
|
classnameContainer: "bg-gray-50 cursor-default opacity-100!",
|
|
@@ -44,14 +60,14 @@ function TokenSection() {
|
|
|
44
60
|
disabled: isLoading || !token,
|
|
45
61
|
children: [
|
|
46
62
|
isCopied ? /* @__PURE__ */ jsx(IconCheck, { size: 16 }) : /* @__PURE__ */ jsx(IconCopy, { size: 16 }),
|
|
47
|
-
isCopied ? "
|
|
63
|
+
isCopied ? translate("common.actions.copied") : translate("common.actions.copy")
|
|
48
64
|
]
|
|
49
65
|
}
|
|
50
66
|
)
|
|
51
67
|
] }),
|
|
52
68
|
/* @__PURE__ */ jsxs("div", { className: `flex items-center gap-3 p-4 rounded-lg ${isDefaultWl ? "bg-cyan-50" : "bg-zinc-50"}`, children: [
|
|
53
69
|
/* @__PURE__ */ jsx(IconInfoCircle, { className: "size-4 text-zinc-950 shrink-0" }),
|
|
54
|
-
/* @__PURE__ */ jsx("span", { className: "paragraph-small-regular text-zinc-950 max-w-[420px]", children: "
|
|
70
|
+
/* @__PURE__ */ jsx("span", { className: "paragraph-small-regular text-zinc-950 max-w-[420px]", children: translate("common.account.token.info") })
|
|
55
71
|
] }),
|
|
56
72
|
/* @__PURE__ */ jsx(
|
|
57
73
|
"a",
|
|
@@ -60,7 +76,7 @@ function TokenSection() {
|
|
|
60
76
|
target: "_blank",
|
|
61
77
|
rel: "noopener noreferrer",
|
|
62
78
|
className: "paragraph-small-medium text-gray-500 underline hover:text-gray-700 transition-colors w-fit",
|
|
63
|
-
children: "
|
|
79
|
+
children: translate("common.account.token.docsLink")
|
|
64
80
|
}
|
|
65
81
|
)
|
|
66
82
|
] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/account/sections/TokenSection.tsx"],"sourcesContent":["'use client';\n\nimport { IconCheck, IconCopy, IconInfoCircle } from '@tabler/icons-react';\nimport { toast } from 'sonner';\nimport { Toast } from '../../ui/feedback/Toast';\nimport { Button } from '../../ui/buttons/Button';\nimport { FormField } from '../../ui/form/FormField';\nimport useCopyToClipboard from '../../../hooks/copy-to-clipboard.hook';\nimport { useAccountToken } from '../../../modules/accounts/hooks/use-account-token.hook';\nimport { useIsDefaultWhitelabel } from '../../../providers/whitelabel.provider';\n\nexport function TokenSection() {\n const { data: token = '', isLoading } = useAccountToken();\n const isDefaultWl = useIsDefaultWhitelabel();\n\n const { isCopied, copy } = useCopyToClipboard({\n onSuccess: () => {\n toast.custom((
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/account/sections/TokenSection.tsx"],"sourcesContent":["'use client';\n\nimport { IconCheck, IconCopy, IconInfoCircle } from '@tabler/icons-react';\nimport { useTranslations } from 'next-intl';\nimport { toast } from 'sonner';\nimport { Toast } from '../../ui/feedback/Toast';\nimport { Button } from '../../ui/buttons/Button';\nimport { FormField } from '../../ui/form/FormField';\nimport useCopyToClipboard from '../../../hooks/copy-to-clipboard.hook';\nimport { useAccountToken } from '../../../modules/accounts/hooks/use-account-token.hook';\nimport { useIsDefaultWhitelabel } from '../../../providers/whitelabel.provider';\n\nexport function TokenSection() {\n const translate = useTranslations();\n const { data: token = '', isLoading } = useAccountToken();\n const isDefaultWl = useIsDefaultWhitelabel();\n\n const { isCopied, copy } = useCopyToClipboard({\n onSuccess: () => {\n toast.custom((toastId) => (\n <Toast\n variant=\"success\"\n message={translate('common.account.token.copySuccess')}\n toastId={toastId}\n />\n ));\n },\n onError: () => {\n toast.custom((toastId) => (\n <Toast\n variant=\"error\"\n message={translate('common.account.token.copyError')}\n toastId={toastId}\n />\n ));\n },\n });\n\n return (\n <div className=\"h-full overflow-y-auto overscroll-contain px-4 pb-20 lg:p-5 lg:pt-5 flex flex-col gap-5 lg:gap-6 lg:pb-31 lg:overscroll-auto\">\n <span className=\"paragraph-medium-semibold text-gray-950\">\n {translate('common.account.token.title')}\n </span>\n\n <div className=\"flex flex-col gap-3\">\n <div className=\"flex items-end gap-3\">\n <FormField\n label={translate('common.account.token.label')}\n value={isLoading ? translate('common.actions.loading') : token}\n disabled\n readOnly\n classnameContainer=\"bg-gray-50 cursor-default opacity-100!\"\n className=\"text-gray-950/50\"\n />\n <Button\n type=\"button\"\n variant=\"secondary\"\n className=\"h-10! shrink-0 gap-2\"\n onClick={() => copy(token)}\n disabled={isLoading || !token}\n >\n {isCopied ? <IconCheck size={16} /> : <IconCopy size={16} />}\n {isCopied ? translate('common.actions.copied') : translate('common.actions.copy')}\n </Button>\n </div>\n\n <div className={`flex items-center gap-3 p-4 rounded-lg ${isDefaultWl ? 'bg-cyan-50' : 'bg-zinc-50'}`}>\n <IconInfoCircle className=\"size-4 text-zinc-950 shrink-0\" />\n <span className=\"paragraph-small-regular text-zinc-950 max-w-[420px]\">\n {translate('common.account.token.info')}\n </span>\n </div>\n\n <a\n href=\"https://documenter.getpostman.com/view/4861938/T1Djiz8H\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"paragraph-small-medium text-gray-500 underline hover:text-gray-700 transition-colors w-fit\"\n >\n {translate('common.account.token.docsLink')}\n </a>\n </div>\n </div>\n );\n}\n"],"mappings":";AAoBQ,cAkCE,YAlCF;AAlBR,SAAS,WAAW,UAAU,sBAAsB;AACpD,SAAS,uBAAuB;AAChC,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B,OAAO,wBAAwB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,8BAA8B;AAEhC,SAAS,eAAe;AAC7B,QAAM,YAAY,gBAAgB;AAClC,QAAM,EAAE,MAAM,QAAQ,IAAI,UAAU,IAAI,gBAAgB;AACxD,QAAM,cAAc,uBAAuB;AAE3C,QAAM,EAAE,UAAU,KAAK,IAAI,mBAAmB;AAAA,IAC5C,WAAW,MAAM;AACf,YAAM,OAAO,CAAC,YACZ;AAAA,QAAC;AAAA;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,UAAU,kCAAkC;AAAA,UACrD;AAAA;AAAA,MACF,CACD;AAAA,IACH;AAAA,IACA,SAAS,MAAM;AACb,YAAM,OAAO,CAAC,YACZ;AAAA,QAAC;AAAA;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,UAAU,gCAAgC;AAAA,UACnD;AAAA;AAAA,MACF,CACD;AAAA,IACH;AAAA,EACF,CAAC;AAED,SACE,qBAAC,SAAI,WAAU,gIACb;AAAA,wBAAC,UAAK,WAAU,2CACb,oBAAU,4BAA4B,GACzC;AAAA,IAEA,qBAAC,SAAI,WAAU,uBACb;AAAA,2BAAC,SAAI,WAAU,wBACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,UAAU,4BAA4B;AAAA,YAC7C,OAAO,YAAY,UAAU,wBAAwB,IAAI;AAAA,YACzD,UAAQ;AAAA,YACR,UAAQ;AAAA,YACR,oBAAmB;AAAA,YACnB,WAAU;AAAA;AAAA,QACZ;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,SAAS,MAAM,KAAK,KAAK;AAAA,YACzB,UAAU,aAAa,CAAC;AAAA,YAEvB;AAAA,yBAAW,oBAAC,aAAU,MAAM,IAAI,IAAK,oBAAC,YAAS,MAAM,IAAI;AAAA,cACzD,WAAW,UAAU,uBAAuB,IAAI,UAAU,qBAAqB;AAAA;AAAA;AAAA,QAClF;AAAA,SACF;AAAA,MAEA,qBAAC,SAAI,WAAW,0CAA0C,cAAc,eAAe,YAAY,IACjG;AAAA,4BAAC,kBAAe,WAAU,iCAAgC;AAAA,QAC1D,oBAAC,UAAK,WAAU,uDACb,oBAAU,2BAA2B,GACxC;AAAA,SACF;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,QAAO;AAAA,UACP,KAAI;AAAA,UACJ,WAAU;AAAA,UAET,oBAAU,+BAA+B;AAAA;AAAA,MAC5C;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -30,6 +30,9 @@ function crispSegment(segment) {
|
|
|
30
30
|
function crispSessionData(key, value) {
|
|
31
31
|
safeCrispPush(["set", "session:data", [[[key, value]]]]);
|
|
32
32
|
}
|
|
33
|
+
function crispEvent(name, data, color = "blue") {
|
|
34
|
+
safeCrispPush(["set", "session:event", [[[name, data ?? {}, color]]]]);
|
|
35
|
+
}
|
|
33
36
|
function openCrispHelpdesk() {
|
|
34
37
|
crispDo("helpdesk:search");
|
|
35
38
|
}
|
|
@@ -41,8 +44,8 @@ function showCrisp() {
|
|
|
41
44
|
}
|
|
42
45
|
const FREE_PLAN_ID = 5;
|
|
43
46
|
const FREE_PLAN_SIGNUP_QUERY_FLAG = "createNew";
|
|
44
|
-
const
|
|
45
|
-
const
|
|
47
|
+
const FREE_PLAN_SIGNUP_EVENT = "cadastro_plano_free";
|
|
48
|
+
const FREE_PLAN_SIGNUP_FIRED_KEY = "crisp:free-plan-signup:fired";
|
|
46
49
|
function updateCrispUser(data) {
|
|
47
50
|
try {
|
|
48
51
|
if (data.email) safeCrispPush(["set", "user:email", data.email]);
|
|
@@ -134,10 +137,10 @@ function CrispEmbed() {
|
|
|
134
137
|
if (!user || !shouldLoadCrisp || !isFreshSignup) return;
|
|
135
138
|
if (subscription?.id_plan !== FREE_PLAN_ID) return;
|
|
136
139
|
try {
|
|
137
|
-
const
|
|
138
|
-
if (window.localStorage.getItem(
|
|
139
|
-
|
|
140
|
-
window.localStorage.setItem(
|
|
140
|
+
const firedKey = `${FREE_PLAN_SIGNUP_FIRED_KEY}:${user.id}`;
|
|
141
|
+
if (window.localStorage.getItem(firedKey)) return;
|
|
142
|
+
crispEvent(FREE_PLAN_SIGNUP_EVENT, { id_plan: FREE_PLAN_ID });
|
|
143
|
+
window.localStorage.setItem(firedKey, "1");
|
|
141
144
|
} catch {
|
|
142
145
|
}
|
|
143
146
|
}, [user, shouldLoadCrisp, isFreshSignup, subscription?.id_plan]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/embeds/CrispEmbed.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, useState } from 'react';\nimport { useAuth } from '../../providers/auth.provider';\nimport { useIsDefaultWhitelabel, useWhitelabel } from '../../providers/whitelabel.provider';\nimport { useActiveSubscription } from '../../modules/subscriptions/hooks/find-active-subscription.hook';\n\nconst V4_WHITELABEL_ID = 367568;\n\nconst PROFILE_LABELS: Record<string, string> = {\n owner: 'Proprietário',\n admin: 'Administrador',\n editor: 'Colaborador',\n viewer: 'Visualizador',\n};\n\nconst CRISP_WEBSITE_ID = '3339a3ec-b4c6-4aac-8b86-45668fb7655c';\nconst CRISP_SCRIPT_URL = 'https://client.crisp.chat/l.js';\nconst CRISP_LOAD_DELAY = 800;\n\n// ── Crisp helpers ──────────────────────────────────────────────\n\nfunction safeCrispPush(args: unknown[]) {\n try {\n const win = window as any;\n if (!win.$crisp) win.$crisp = [];\n win.$crisp.push(args);\n } catch {}\n}\n\nfunction crispDo(action: string) {\n safeCrispPush(['do', action]);\n}\n\nfunction crispSegment(segment: string) {\n safeCrispPush(['set', 'session:segments', [[segment]]]);\n}\n\nfunction crispSessionData(key: string, value: string) {\n safeCrispPush(['set', 'session:data', [[[key, value]]]]);\n}\n\n// ── Public API ─────────────────────────────────────────────────\n\nexport function openCrispHelpdesk() {\n crispDo('helpdesk:search');\n}\n\nexport function hideCrisp() {\n crispDo('chat:hide');\n}\n\nexport function showCrisp() {\n crispDo('chat:show');\n}\n\nconst FREE_PLAN_ID = 5;\nconst FREE_PLAN_SIGNUP_QUERY_FLAG = 'createNew';\nconst
|
|
1
|
+
{"version":3,"sources":["../../../src/components/embeds/CrispEmbed.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, useState } from 'react';\nimport { useAuth } from '../../providers/auth.provider';\nimport { useIsDefaultWhitelabel, useWhitelabel } from '../../providers/whitelabel.provider';\nimport { useActiveSubscription } from '../../modules/subscriptions/hooks/find-active-subscription.hook';\n\nconst V4_WHITELABEL_ID = 367568;\n\nconst PROFILE_LABELS: Record<string, string> = {\n owner: 'Proprietário',\n admin: 'Administrador',\n editor: 'Colaborador',\n viewer: 'Visualizador',\n};\n\nconst CRISP_WEBSITE_ID = '3339a3ec-b4c6-4aac-8b86-45668fb7655c';\nconst CRISP_SCRIPT_URL = 'https://client.crisp.chat/l.js';\nconst CRISP_LOAD_DELAY = 800;\n\n// ── Crisp helpers ──────────────────────────────────────────────\n\nfunction safeCrispPush(args: unknown[]) {\n try {\n const win = window as any;\n if (!win.$crisp) win.$crisp = [];\n win.$crisp.push(args);\n } catch {}\n}\n\nfunction crispDo(action: string) {\n safeCrispPush(['do', action]);\n}\n\nfunction crispSegment(segment: string) {\n safeCrispPush(['set', 'session:segments', [[segment]]]);\n}\n\nfunction crispSessionData(key: string, value: string) {\n safeCrispPush(['set', 'session:data', [[[key, value]]]]);\n}\n\nfunction crispEvent(name: string, data?: Record<string, unknown>, color = 'blue') {\n safeCrispPush(['set', 'session:event', [[[name, data ?? {}, color]]]]);\n}\n\n// ── Public API ─────────────────────────────────────────────────\n\nexport function openCrispHelpdesk() {\n crispDo('helpdesk:search');\n}\n\nexport function hideCrisp() {\n crispDo('chat:hide');\n}\n\nexport function showCrisp() {\n crispDo('chat:show');\n}\n\nconst FREE_PLAN_ID = 5;\nconst FREE_PLAN_SIGNUP_QUERY_FLAG = 'createNew';\nconst FREE_PLAN_SIGNUP_EVENT = 'cadastro_plano_free';\nconst FREE_PLAN_SIGNUP_FIRED_KEY = 'crisp:free-plan-signup:fired';\n\nexport function updateCrispUser(data: {\n email?: string;\n name?: string;\n lastName?: string;\n company?: string;\n ddi?: string;\n phone?: string;\n photo?: string;\n}) {\n try {\n if (data.email) safeCrispPush(['set', 'user:email', data.email]);\n\n const fullName = `${data.name ?? ''} ${data.lastName ?? ''}`.trim();\n if (fullName) safeCrispPush(['set', 'user:nickname', fullName]);\n\n if (data.company) safeCrispPush(['set', 'user:company', data.company]);\n\n const phone = `${data.ddi ?? ''}${data.phone ?? ''}`.trim();\n if (phone) safeCrispPush(['set', 'user:phone', phone]);\n\n if (data.photo?.startsWith('http')) {\n safeCrispPush(['set', 'user:avatar', data.photo]);\n }\n } catch {}\n}\n\n// ── Component ──────────────────────────────────────────────────\n\nexport function CrispEmbed() {\n const { user, account } = useAuth();\n const { whitelabel } = useWhitelabel();\n const { data: subscriptionData } = useActiveSubscription();\n const scriptLoadedRef = useRef(false);\n\n const isGreat = useIsDefaultWhitelabel();\n const subscription = subscriptionData?.data?.[0] ?? null;\n const isV4 = whitelabel?.id === V4_WHITELABEL_ID;\n const shouldLoadCrisp = isV4 || isGreat;\n\n // Load Crisp script (once, with 800ms delay)\n useEffect(() => {\n if (!user || !shouldLoadCrisp || scriptLoadedRef.current) return;\n\n try {\n const win = window as any;\n\n if (!win.$crisp) {\n win.$crisp = [];\n win.CRISP_WEBSITE_ID = CRISP_WEBSITE_ID;\n win.$crisp.push(['config', 'container:index', [100]]);\n }\n\n if (document.querySelector(`script[src=\"${CRISP_SCRIPT_URL}\"]`)) {\n scriptLoadedRef.current = true;\n return;\n }\n\n const timeout = setTimeout(() => {\n try {\n if (document.querySelector(`script[src=\"${CRISP_SCRIPT_URL}\"]`)) return;\n const s = document.createElement('script');\n s.src = CRISP_SCRIPT_URL;\n s.async = true;\n document.head.appendChild(s);\n scriptLoadedRef.current = true;\n } catch {}\n }, CRISP_LOAD_DELAY);\n\n return () => clearTimeout(timeout);\n } catch {}\n }, [user, shouldLoadCrisp]);\n\n // Identify user\n useEffect(() => {\n try {\n if (!user || !shouldLoadCrisp || !(window as any)?.$crisp) return;\n\n updateCrispUser({\n email: user.email,\n name: user.name,\n lastName: user.last_name,\n company: account?.name,\n ddi: user.ddi,\n phone: user.phone,\n photo: user.photo ?? undefined,\n });\n\n if (isV4) {\n crispSegment('company_v4');\n crispSessionData('Company', 'V4');\n } else {\n const planName = subscription?.plan_name ?? '';\n const profileLabel = PROFILE_LABELS[user.profile ?? ''] ?? user.profile ?? '';\n if (planName) crispSegment(`plano_${planName}`);\n if (profileLabel) crispSegment(`usuario_${profileLabel}`);\n if (planName) crispSessionData('Plano', planName);\n if (profileLabel) crispSessionData('Usuario', profileLabel);\n }\n } catch {}\n }, [user, account, isV4, shouldLoadCrisp, subscription?.plan_name]);\n\n // Captura `?createNew=true` da URL inicial. O register do gapps redireciona\n // para pages com esse flag, e localStorage não cruza origens — então o\n // sinal de \"acabou de se cadastrar\" vem via query string.\n const [isFreshSignup, setIsFreshSignup] = useState(false);\n useEffect(() => {\n try {\n const params = new URLSearchParams(window.location.search);\n if (params.get(FREE_PLAN_SIGNUP_QUERY_FLAG) === 'true') {\n setIsFreshSignup(true);\n }\n } catch {}\n }, []);\n\n // Dispara user event de cadastro free para o trigger do Crisp.\n // A mensagem em si é configurada lá no Crisp (Message Trigger com condição\n // \"User Event = cadastro_plano_free\").\n useEffect(() => {\n if (!user || !shouldLoadCrisp || !isFreshSignup) return;\n if (subscription?.id_plan !== FREE_PLAN_ID) return;\n try {\n const firedKey = `${FREE_PLAN_SIGNUP_FIRED_KEY}:${user.id}`;\n if (window.localStorage.getItem(firedKey)) return;\n crispEvent(FREE_PLAN_SIGNUP_EVENT, { id_plan: FREE_PLAN_ID });\n window.localStorage.setItem(firedKey, '1');\n } catch {}\n }, [user, shouldLoadCrisp, isFreshSignup, subscription?.id_plan]);\n\n return null;\n}\n"],"mappings":";AAEA,SAAS,WAAW,QAAQ,gBAAgB;AAC5C,SAAS,eAAe;AACxB,SAAS,wBAAwB,qBAAqB;AACtD,SAAS,6BAA6B;AAEtC,MAAM,mBAAmB;AAEzB,MAAM,iBAAyC;AAAA,EAC7C,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AACV;AAEA,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AAIzB,SAAS,cAAc,MAAiB;AACtC,MAAI;AACF,UAAM,MAAM;AACZ,QAAI,CAAC,IAAI,OAAQ,KAAI,SAAS,CAAC;AAC/B,QAAI,OAAO,KAAK,IAAI;AAAA,EACtB,QAAQ;AAAA,EAAC;AACX;AAEA,SAAS,QAAQ,QAAgB;AAC/B,gBAAc,CAAC,MAAM,MAAM,CAAC;AAC9B;AAEA,SAAS,aAAa,SAAiB;AACrC,gBAAc,CAAC,OAAO,oBAAoB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;A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ALE";
|
|
4
|
+
function isLocale(value) {
|
|
5
|
+
return typeof value === "string" && LOCALES.includes(value);
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
DEFAULT_LOCALE,
|
|
9
|
+
LOCALES,
|
|
10
|
+
LOCALE_COOKIE,
|
|
11
|
+
isLocale
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=config.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/config.ts"],"sourcesContent":["/**\n * Locales suportados pela plataforma GreatApps.\n * Identificadores no padrão `idioma-REGIÃO` em minúsculas: `pt-br`, `en-us`, `es-es`.\n */\nexport const LOCALES = ['pt-br', 'en-us', 'es-es'] as const;\n\nexport type Locale = (typeof LOCALES)[number];\n\n/** Idioma padrão — fallback final (o produto nasce em pt-BR). */\nexport const DEFAULT_LOCALE: Locale = 'pt-br';\n\n/** Nome do cookie onde o locale resolvido é persistido (convenção next-intl). */\nexport const LOCALE_COOKIE = 'NEXT_LOCALE';\n\nexport function isLocale(value: unknown): value is Locale {\n return typeof value === 'string' && (LOCALES as readonly string[]).includes(value);\n}\n"],"mappings":"AAIO,MAAM,UAAU,CAAC,SAAS,SAAS,OAAO;AAK1C,MAAM,iBAAyB;AAG/B,MAAM,gBAAgB;AAEtB,SAAS,SAAS,OAAiC;AACxD,SAAO,OAAO,UAAU,YAAa,QAA8B,SAAS,KAAK;AACnF;","names":[]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
const PORTUGUESE_COUNTRIES = /* @__PURE__ */ new Set([
|
|
2
|
+
"BR",
|
|
3
|
+
// Brasil
|
|
4
|
+
"PT",
|
|
5
|
+
// Portugal
|
|
6
|
+
"AO",
|
|
7
|
+
// Angola
|
|
8
|
+
"MZ",
|
|
9
|
+
// Moçambique
|
|
10
|
+
"CV",
|
|
11
|
+
// Cabo Verde
|
|
12
|
+
"GW",
|
|
13
|
+
// Guiné-Bissau
|
|
14
|
+
"ST",
|
|
15
|
+
// São Tomé e Príncipe
|
|
16
|
+
"TL"
|
|
17
|
+
// Timor-Leste
|
|
18
|
+
]);
|
|
19
|
+
const SPANISH_COUNTRIES = /* @__PURE__ */ new Set([
|
|
20
|
+
"ES",
|
|
21
|
+
// Espanha
|
|
22
|
+
"MX",
|
|
23
|
+
// México
|
|
24
|
+
"AR",
|
|
25
|
+
// Argentina
|
|
26
|
+
"CO",
|
|
27
|
+
// Colômbia
|
|
28
|
+
"PE",
|
|
29
|
+
// Peru
|
|
30
|
+
"VE",
|
|
31
|
+
// Venezuela
|
|
32
|
+
"CL",
|
|
33
|
+
// Chile
|
|
34
|
+
"EC",
|
|
35
|
+
// Equador
|
|
36
|
+
"GT",
|
|
37
|
+
// Guatemala
|
|
38
|
+
"CU",
|
|
39
|
+
// Cuba
|
|
40
|
+
"BO",
|
|
41
|
+
// Bolívia
|
|
42
|
+
"DO",
|
|
43
|
+
// República Dominicana
|
|
44
|
+
"HN",
|
|
45
|
+
// Honduras
|
|
46
|
+
"PY",
|
|
47
|
+
// Paraguai
|
|
48
|
+
"SV",
|
|
49
|
+
// El Salvador
|
|
50
|
+
"NI",
|
|
51
|
+
// Nicarágua
|
|
52
|
+
"CR",
|
|
53
|
+
// Costa Rica
|
|
54
|
+
"PA",
|
|
55
|
+
// Panamá
|
|
56
|
+
"UY",
|
|
57
|
+
// Uruguai
|
|
58
|
+
"PR",
|
|
59
|
+
// Porto Rico
|
|
60
|
+
"GQ"
|
|
61
|
+
// Guiné Equatorial
|
|
62
|
+
]);
|
|
63
|
+
function localeFromCountry(country) {
|
|
64
|
+
if (!country) return null;
|
|
65
|
+
const code = country.trim().toUpperCase();
|
|
66
|
+
if (code === "XX" || code === "T1") return null;
|
|
67
|
+
if (PORTUGUESE_COUNTRIES.has(code)) return "pt-br";
|
|
68
|
+
if (SPANISH_COUNTRIES.has(code)) return "es-es";
|
|
69
|
+
return "en-us";
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
localeFromCountry
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=country-language.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/country-language.ts"],"sourcesContent":["import { Locale } from './config';\n\n/**\n * Países de língua portuguesa (ISO 3166-1 alpha-2).\n */\nconst PORTUGUESE_COUNTRIES = new Set<string>([\n 'BR', // Brasil\n 'PT', // Portugal\n 'AO', // Angola\n 'MZ', // Moçambique\n 'CV', // Cabo Verde\n 'GW', // Guiné-Bissau\n 'ST', // São Tomé e Príncipe\n 'TL', // Timor-Leste\n]);\n\n/**\n * Países de língua espanhola (ISO 3166-1 alpha-2).\n */\nconst SPANISH_COUNTRIES = new Set<string>([\n 'ES', // Espanha\n 'MX', // México\n 'AR', // Argentina\n 'CO', // Colômbia\n 'PE', // Peru\n 'VE', // Venezuela\n 'CL', // Chile\n 'EC', // Equador\n 'GT', // Guatemala\n 'CU', // Cuba\n 'BO', // Bolívia\n 'DO', // República Dominicana\n 'HN', // Honduras\n 'PY', // Paraguai\n 'SV', // El Salvador\n 'NI', // Nicarágua\n 'CR', // Costa Rica\n 'PA', // Panamá\n 'UY', // Uruguai\n 'PR', // Porto Rico\n 'GQ', // Guiné Equatorial\n]);\n\n/**\n * Infere o idioma a partir do código de país (ex.: header `CF-IPCountry` da Cloudflare\n * ou `session.location.country` do JWT):\n * - país lusófono → `pt`\n * - país hispanófono → `es`\n * - demais países → `en`\n *\n * Retorna `null` quando o país é desconhecido/ausente (deixa o fallback de locale decidir).\n */\nexport function localeFromCountry(country?: string | null): Locale | null {\n if (!country) return null;\n const code = country.trim().toUpperCase();\n if (code === 'XX' || code === 'T1') return null; // Cloudflare: desconhecido / Tor\n if (PORTUGUESE_COUNTRIES.has(code)) return 'pt-br';\n if (SPANISH_COUNTRIES.has(code)) return 'es-es';\n return 'en-us';\n}\n"],"mappings":"AAKA,MAAM,uBAAuB,oBAAI,IAAY;AAAA,EAC3C;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AACF,CAAC;AAKD,MAAM,oBAAoB,oBAAI,IAAY;AAAA,EACxC;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AACF,CAAC;AAWM,SAAS,kBAAkB,SAAwC;AACxE,MAAI,CAAC,QAAS,QAAO;AACrB,QAAM,OAAO,QAAQ,KAAK,EAAE,YAAY;AACxC,MAAI,SAAS,QAAQ,SAAS,KAAM,QAAO;AAC3C,MAAI,qBAAqB,IAAI,IAAI,EAAG,QAAO;AAC3C,MAAI,kBAAkB,IAAI,IAAI,EAAG,QAAO;AACxC,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
const messages = {
|
|
2
|
+
actions: {
|
|
3
|
+
save: "Save",
|
|
4
|
+
saveChanges: "Save changes",
|
|
5
|
+
cancel: "Cancel",
|
|
6
|
+
confirm: "Confirm",
|
|
7
|
+
delete: "Delete",
|
|
8
|
+
edit: "Edit",
|
|
9
|
+
close: "Close",
|
|
10
|
+
back: "Back",
|
|
11
|
+
continue: "Continue",
|
|
12
|
+
add: "Add",
|
|
13
|
+
remove: "Remove",
|
|
14
|
+
search: "Search",
|
|
15
|
+
loading: "Loading...",
|
|
16
|
+
saving: "Saving...",
|
|
17
|
+
sending: "Sending...",
|
|
18
|
+
copy: "Copy",
|
|
19
|
+
copied: "Copied"
|
|
20
|
+
},
|
|
21
|
+
validations: {
|
|
22
|
+
required: "Required field",
|
|
23
|
+
invalidEmail: "Invalid email",
|
|
24
|
+
invalidPhone: "Invalid phone number"
|
|
25
|
+
},
|
|
26
|
+
preferences: {
|
|
27
|
+
title: "Preferences",
|
|
28
|
+
companyName: "Company name",
|
|
29
|
+
companyNamePlaceholder: "Enter the company name",
|
|
30
|
+
language: "Language",
|
|
31
|
+
languagePlaceholder: "Select the language",
|
|
32
|
+
languageSearch: "Search language...",
|
|
33
|
+
currency: "Currency",
|
|
34
|
+
currencyPlaceholder: "Select the currency",
|
|
35
|
+
currencySearch: "Search currency...",
|
|
36
|
+
timeDisplay: "Time display",
|
|
37
|
+
timezone: "Time zone",
|
|
38
|
+
timezonePlaceholder: "Select the time zone",
|
|
39
|
+
timezoneSearch: "Search time zone...",
|
|
40
|
+
timeFormat: "Time format",
|
|
41
|
+
timeFormatPlaceholder: "Select the format",
|
|
42
|
+
savedSuccess: "Preferences saved successfully",
|
|
43
|
+
saveError: "Error saving preferences"
|
|
44
|
+
},
|
|
45
|
+
account: {
|
|
46
|
+
deleteAccount: {
|
|
47
|
+
title: "Delete account",
|
|
48
|
+
description: "This action is <b>irreversible</b>. By confirming, your account and all your data will be deleted.",
|
|
49
|
+
reasonLabel: "Reason for cancellation",
|
|
50
|
+
reasonPlaceholder: "Select",
|
|
51
|
+
descriptionLabel: "Describe what led you to make this decision",
|
|
52
|
+
descriptionPlaceholder: "Explain your decision...",
|
|
53
|
+
charactersCount: "{count}/400 characters",
|
|
54
|
+
passwordLabel: "Password",
|
|
55
|
+
passwordPlaceholder: "Enter your password",
|
|
56
|
+
submit: "Delete account",
|
|
57
|
+
requiredFields: "Fill in all required fields",
|
|
58
|
+
reasons: {
|
|
59
|
+
noFeature: "The tool lacks a feature I need",
|
|
60
|
+
technical: "I encountered technical issues or errors in the system",
|
|
61
|
+
support: "I had issues with support or customer service",
|
|
62
|
+
updates: "Updates take longer than expected",
|
|
63
|
+
temporary: "The cancellation is temporary",
|
|
64
|
+
other: "Other reason"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
confirmDelete: {
|
|
68
|
+
title: "Sorry to see you go!",
|
|
69
|
+
warning: "All your <b>{count} pages</b> will be permanently deleted. This action is <b>irreversible!</b>",
|
|
70
|
+
sessionExpired: "Session expired. Fill in the fields again.",
|
|
71
|
+
success: "Account deleted successfully",
|
|
72
|
+
error: "Error deleting account. Please try again.",
|
|
73
|
+
keepAccount: "Keep my account",
|
|
74
|
+
deleteAnyway: "Delete anyway",
|
|
75
|
+
deleting: "Deleting..."
|
|
76
|
+
},
|
|
77
|
+
cantDelete: {
|
|
78
|
+
title: "Unable to delete account",
|
|
79
|
+
description: "You have an active subscription. To delete your account, <b>first cancel your subscription</b> on the Subscription page and then try again.",
|
|
80
|
+
confirm: "Ok, I understand",
|
|
81
|
+
goToSubscription: "Go to subscription"
|
|
82
|
+
},
|
|
83
|
+
twoFactor: {
|
|
84
|
+
title: "Two-factor authentication",
|
|
85
|
+
instructions: "Install an authenticator app on your mobile device (e.g., <link>Google Authenticator</link>), scan the QR Code on the side or copy the key in the app, and then enter the 6-digit code generated to continue.",
|
|
86
|
+
qrAlt: "QR Code for two-factor authentication",
|
|
87
|
+
retry: "Try again",
|
|
88
|
+
pasteDigits: "Paste the 6 digits below",
|
|
89
|
+
activating: "Activating...",
|
|
90
|
+
activate: "Activate authentication",
|
|
91
|
+
recoveryTitle: "Security codes",
|
|
92
|
+
recoveryHeading: "Save these emergency recovery codes",
|
|
93
|
+
recoveryText1: "If you lose access to your phone, you will not be able to log into your account without a two-factor code.",
|
|
94
|
+
recoveryText2: "Print, copy, or write the codes below in a safe location.",
|
|
95
|
+
copyCodes: "Copy codes",
|
|
96
|
+
finish: "Finish",
|
|
97
|
+
codesCopied: "Codes copied successfully",
|
|
98
|
+
generateError: "Error generating QR Code. Try again.",
|
|
99
|
+
confirmError: "Error confirming code. Try again.",
|
|
100
|
+
disableTitle: "Disable 2FA authentication",
|
|
101
|
+
disableDescription: "Enter the 6-digit code from your authenticator app to confirm disabling.",
|
|
102
|
+
authenticatorCode: "Authenticator code",
|
|
103
|
+
disabling: "Disabling...",
|
|
104
|
+
disable: "Disable 2FA",
|
|
105
|
+
disabledSuccess: "Two-factor authentication disabled",
|
|
106
|
+
disableError: "Error disabling 2FA. Try again.",
|
|
107
|
+
invalidCode: "Invalid code",
|
|
108
|
+
codeResent: "Code resent",
|
|
109
|
+
resendError: "Error resending code. Try again."
|
|
110
|
+
},
|
|
111
|
+
profile: {
|
|
112
|
+
title: "My profile",
|
|
113
|
+
avatarAlt: "User photo",
|
|
114
|
+
changePhoto: "Change photo",
|
|
115
|
+
name: "First name",
|
|
116
|
+
namePlaceholder: "Enter your first name",
|
|
117
|
+
lastName: "Last name",
|
|
118
|
+
lastNamePlaceholder: "Enter your last name",
|
|
119
|
+
gender: "Gender",
|
|
120
|
+
genderPlaceholder: "Select your gender",
|
|
121
|
+
phone: "Phone",
|
|
122
|
+
change: "Change",
|
|
123
|
+
accessData: "Access data",
|
|
124
|
+
email: "Email",
|
|
125
|
+
savedSuccess: "Profile updated successfully",
|
|
126
|
+
saveError: "Error updating profile"
|
|
127
|
+
},
|
|
128
|
+
otp: {
|
|
129
|
+
validationCode: "Validation code",
|
|
130
|
+
incorrectCode: "Incorrect code",
|
|
131
|
+
resend: "Resend code",
|
|
132
|
+
resendIn: "Resend in <b>{time}</b>",
|
|
133
|
+
validating: "Validating..."
|
|
134
|
+
},
|
|
135
|
+
changeEmail: {
|
|
136
|
+
title: "Change email",
|
|
137
|
+
confirm: "Change email",
|
|
138
|
+
sentCodeTo: "We sent a validation code to email <b>{email}.</b>",
|
|
139
|
+
updateTitle: "Update contact email",
|
|
140
|
+
updateDescription: "Enter your new email to keep your contact information updated.",
|
|
141
|
+
newEmail: "New email",
|
|
142
|
+
newEmailPlaceholder: "Enter your new email",
|
|
143
|
+
emailChanged: "Email changed successfully",
|
|
144
|
+
emailExistsError: "Email already exists or an error occurred. Please try again later."
|
|
145
|
+
},
|
|
146
|
+
changePhone: {
|
|
147
|
+
titleEdit: "Change phone",
|
|
148
|
+
titleAdd: "Add phone",
|
|
149
|
+
sentCodeTo: "We sent a validation code to your current number <b>{phone}.</b>",
|
|
150
|
+
confirm: "Change phone",
|
|
151
|
+
updateTitle: "Update contact phone",
|
|
152
|
+
addTitle: "Add contact phone",
|
|
153
|
+
updateDescription: "Enter the new number to keep your contact information updated.",
|
|
154
|
+
addDescription: "Enter your phone number for contact.",
|
|
155
|
+
newNumber: "New number",
|
|
156
|
+
numberLabel: "Phone number",
|
|
157
|
+
phoneChanged: "Phone changed",
|
|
158
|
+
phoneAdded: "Phone added",
|
|
159
|
+
invalidNumber: "Invalid phone number",
|
|
160
|
+
saveError: "An error occurred while saving the phone number. Please try again later.",
|
|
161
|
+
numberExistsError: "Number already exists or an error occurred. Please try again later."
|
|
162
|
+
},
|
|
163
|
+
security: {
|
|
164
|
+
title: "Security",
|
|
165
|
+
googleLinkedTitle: "Google account linked",
|
|
166
|
+
googleLinkedDescription: 'Your account is linked to Google. If you unlink it, use "Forgot my password" to reset an email access password.',
|
|
167
|
+
unlinking: "Unlinking...",
|
|
168
|
+
unlinkGoogle: "Unlink Google",
|
|
169
|
+
unlinkError: "Error unlinking Google account.",
|
|
170
|
+
deleteAccountDescription: "This action is permanent and cannot be undone. All your data, projects, and settings will be permanently removed.",
|
|
171
|
+
deleteMyAccount: "Delete my account"
|
|
172
|
+
},
|
|
173
|
+
token: {
|
|
174
|
+
title: "Account token",
|
|
175
|
+
label: "Token",
|
|
176
|
+
copySuccess: "Token copied successfully",
|
|
177
|
+
copyError: "Failed to copy token",
|
|
178
|
+
info: "This token is unique to your account and allows API access. Do not share with third parties.",
|
|
179
|
+
docsLink: "Access documentation"
|
|
180
|
+
},
|
|
181
|
+
changePassword: {
|
|
182
|
+
title: "Change password",
|
|
183
|
+
currentPassword: "Current password",
|
|
184
|
+
currentPasswordPlaceholder: "Enter your current password",
|
|
185
|
+
newPassword: "New password",
|
|
186
|
+
newPasswordPlaceholder: "Enter your new password",
|
|
187
|
+
submit: "Save new password",
|
|
188
|
+
changeError: "Error changing password",
|
|
189
|
+
changedSuccess: "Password changed successfully",
|
|
190
|
+
genericError: "Error changing password. Try again."
|
|
191
|
+
},
|
|
192
|
+
globalPreferences: {
|
|
193
|
+
title: "Change global preferences",
|
|
194
|
+
srDescription: "Confirmation of global account preferences change",
|
|
195
|
+
warning: "You are changing settings that impact <b>all account users</b>. Do you want to confirm?"
|
|
196
|
+
},
|
|
197
|
+
configurations: {
|
|
198
|
+
title: "Settings"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
languages: {
|
|
202
|
+
"pt-br": "Portuguese (Brazil)",
|
|
203
|
+
"en-us": "English (US)",
|
|
204
|
+
"es-es": "Spanish"
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
var en_us_default = messages;
|
|
208
|
+
export {
|
|
209
|
+
en_us_default as default
|
|
210
|
+
};
|
|
211
|
+
//# sourceMappingURL=en-us.mjs.map
|