@greatapps/common 1.1.666 → 1.1.668
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 +37 -22
- package/dist/components/account/sections/MyProfileSection.mjs.map +1 -1
- package/dist/components/account/sections/PreferencesSection.mjs +48 -24
- 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/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 +219 -0
- package/dist/i18n/messages/en-us.mjs.map +1 -0
- package/dist/i18n/messages/es-es.mjs +219 -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 +224 -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 +37 -23
- package/src/components/account/sections/PreferencesSection.tsx +52 -25
- package/src/components/account/sections/SecuritySection.tsx +19 -10
- package/src/components/account/sections/TokenSection.tsx +22 -10
- package/src/i18n/config.ts +17 -0
- package/src/i18n/country-language.ts +60 -0
- package/src/i18n/messages/en-us.ts +234 -0
- package/src/i18n/messages/es-es.ts +235 -0
- package/src/i18n/messages/index.ts +24 -0
- package/src/i18n/messages/pt-br.ts +244 -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,YAtBF;AA7BR,SAAS,mBAAmB,6BAA6B;AACzD,SAAS,uBAAuB;AAChC,SAAS,aAAa;AACtB,SAAS,sBAAsB;AAC/B,SAAS,e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AAA,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":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const LOCALES = ["pt-br", "en-us", "es-es"];
|
|
2
|
+
const DEFAULT_LOCALE = "pt-br";
|
|
3
|
+
const LOCALE_COOKIE = "NEXT_LOCALE";
|
|
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,219 @@
|
|
|
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
|
+
timeFormatOptions: {
|
|
43
|
+
h24: "24 hours",
|
|
44
|
+
h12: "12 hours (AM/PM)"
|
|
45
|
+
},
|
|
46
|
+
savedSuccess: "Preferences saved successfully",
|
|
47
|
+
saveError: "Error saving preferences"
|
|
48
|
+
},
|
|
49
|
+
account: {
|
|
50
|
+
deleteAccount: {
|
|
51
|
+
title: "Delete account",
|
|
52
|
+
description: "This action is <b>irreversible</b>. By confirming, your account and all your data will be deleted.",
|
|
53
|
+
reasonLabel: "Reason for cancellation",
|
|
54
|
+
reasonPlaceholder: "Select",
|
|
55
|
+
descriptionLabel: "Describe what led you to make this decision",
|
|
56
|
+
descriptionPlaceholder: "Explain your decision...",
|
|
57
|
+
charactersCount: "{count}/400 characters",
|
|
58
|
+
passwordLabel: "Password",
|
|
59
|
+
passwordPlaceholder: "Enter your password",
|
|
60
|
+
submit: "Delete account",
|
|
61
|
+
requiredFields: "Fill in all required fields",
|
|
62
|
+
reasons: {
|
|
63
|
+
noFeature: "The tool lacks a feature I need",
|
|
64
|
+
technical: "I encountered technical issues or errors in the system",
|
|
65
|
+
support: "I had issues with support or customer service",
|
|
66
|
+
updates: "Updates take longer than expected",
|
|
67
|
+
temporary: "The cancellation is temporary",
|
|
68
|
+
other: "Other reason"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
confirmDelete: {
|
|
72
|
+
title: "Sorry to see you go!",
|
|
73
|
+
warning: "All your <b>{count} pages</b> will be permanently deleted. This action is <b>irreversible!</b>",
|
|
74
|
+
sessionExpired: "Session expired. Fill in the fields again.",
|
|
75
|
+
success: "Account deleted successfully",
|
|
76
|
+
error: "Error deleting account. Please try again.",
|
|
77
|
+
keepAccount: "Keep my account",
|
|
78
|
+
deleteAnyway: "Delete anyway",
|
|
79
|
+
deleting: "Deleting..."
|
|
80
|
+
},
|
|
81
|
+
cantDelete: {
|
|
82
|
+
title: "Unable to delete account",
|
|
83
|
+
description: "You have an active subscription. To delete your account, <b>first cancel your subscription</b> on the Subscription page and then try again.",
|
|
84
|
+
confirm: "Ok, I understand",
|
|
85
|
+
goToSubscription: "Go to subscription"
|
|
86
|
+
},
|
|
87
|
+
twoFactor: {
|
|
88
|
+
title: "Two-factor authentication",
|
|
89
|
+
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.",
|
|
90
|
+
qrAlt: "QR Code for two-factor authentication",
|
|
91
|
+
retry: "Try again",
|
|
92
|
+
pasteDigits: "Paste the 6 digits below",
|
|
93
|
+
activating: "Activating...",
|
|
94
|
+
activate: "Activate authentication",
|
|
95
|
+
recoveryTitle: "Security codes",
|
|
96
|
+
recoveryHeading: "Save these emergency recovery codes",
|
|
97
|
+
recoveryText1: "If you lose access to your phone, you will not be able to log into your account without a two-factor code.",
|
|
98
|
+
recoveryText2: "Print, copy, or write the codes below in a safe location.",
|
|
99
|
+
copyCodes: "Copy codes",
|
|
100
|
+
finish: "Finish",
|
|
101
|
+
codesCopied: "Codes copied successfully",
|
|
102
|
+
generateError: "Error generating QR Code. Try again.",
|
|
103
|
+
confirmError: "Error confirming code. Try again.",
|
|
104
|
+
disableTitle: "Disable 2FA authentication",
|
|
105
|
+
disableDescription: "Enter the 6-digit code from your authenticator app to confirm disabling.",
|
|
106
|
+
authenticatorCode: "Authenticator code",
|
|
107
|
+
disabling: "Disabling...",
|
|
108
|
+
disable: "Disable 2FA",
|
|
109
|
+
disabledSuccess: "Two-factor authentication disabled",
|
|
110
|
+
disableError: "Error disabling 2FA. Try again.",
|
|
111
|
+
invalidCode: "Invalid code",
|
|
112
|
+
codeResent: "Code resent",
|
|
113
|
+
resendError: "Error resending code. Try again."
|
|
114
|
+
},
|
|
115
|
+
profile: {
|
|
116
|
+
title: "My profile",
|
|
117
|
+
avatarAlt: "User photo",
|
|
118
|
+
changePhoto: "Change photo",
|
|
119
|
+
name: "First name",
|
|
120
|
+
namePlaceholder: "Enter your first name",
|
|
121
|
+
lastName: "Last name",
|
|
122
|
+
lastNamePlaceholder: "Enter your last name",
|
|
123
|
+
gender: "Gender",
|
|
124
|
+
genderPlaceholder: "Select your gender",
|
|
125
|
+
genderOptions: {
|
|
126
|
+
male: "Male",
|
|
127
|
+
female: "Female"
|
|
128
|
+
},
|
|
129
|
+
phone: "Phone",
|
|
130
|
+
change: "Change",
|
|
131
|
+
accessData: "Access data",
|
|
132
|
+
email: "Email",
|
|
133
|
+
savedSuccess: "Profile updated successfully",
|
|
134
|
+
saveError: "Error updating profile"
|
|
135
|
+
},
|
|
136
|
+
otp: {
|
|
137
|
+
validationCode: "Validation code",
|
|
138
|
+
incorrectCode: "Incorrect code",
|
|
139
|
+
resend: "Resend code",
|
|
140
|
+
resendIn: "Resend in <b>{time}</b>",
|
|
141
|
+
validating: "Validating..."
|
|
142
|
+
},
|
|
143
|
+
changeEmail: {
|
|
144
|
+
title: "Change email",
|
|
145
|
+
confirm: "Change email",
|
|
146
|
+
sentCodeTo: "We sent a validation code to email <b>{email}.</b>",
|
|
147
|
+
updateTitle: "Update contact email",
|
|
148
|
+
updateDescription: "Enter your new email to keep your contact information updated.",
|
|
149
|
+
newEmail: "New email",
|
|
150
|
+
newEmailPlaceholder: "Enter your new email",
|
|
151
|
+
emailChanged: "Email changed successfully",
|
|
152
|
+
emailExistsError: "Email already exists or an error occurred. Please try again later."
|
|
153
|
+
},
|
|
154
|
+
changePhone: {
|
|
155
|
+
titleEdit: "Change phone",
|
|
156
|
+
titleAdd: "Add phone",
|
|
157
|
+
sentCodeTo: "We sent a validation code to your current number <b>{phone}.</b>",
|
|
158
|
+
confirm: "Change phone",
|
|
159
|
+
updateTitle: "Update contact phone",
|
|
160
|
+
addTitle: "Add contact phone",
|
|
161
|
+
updateDescription: "Enter the new number to keep your contact information updated.",
|
|
162
|
+
addDescription: "Enter your phone number for contact.",
|
|
163
|
+
newNumber: "New number",
|
|
164
|
+
numberLabel: "Phone number",
|
|
165
|
+
phoneChanged: "Phone changed",
|
|
166
|
+
phoneAdded: "Phone added",
|
|
167
|
+
invalidNumber: "Invalid phone number",
|
|
168
|
+
saveError: "An error occurred while saving the phone number. Please try again later.",
|
|
169
|
+
numberExistsError: "Number already exists or an error occurred. Please try again later."
|
|
170
|
+
},
|
|
171
|
+
security: {
|
|
172
|
+
title: "Security",
|
|
173
|
+
googleLinkedTitle: "Google account linked",
|
|
174
|
+
googleLinkedDescription: 'Your account is linked to Google. If you unlink it, use "Forgot my password" to reset an email access password.',
|
|
175
|
+
unlinking: "Unlinking...",
|
|
176
|
+
unlinkGoogle: "Unlink Google",
|
|
177
|
+
unlinkError: "Error unlinking Google account.",
|
|
178
|
+
deleteAccountDescription: "This action is permanent and cannot be undone. All your data, projects, and settings will be permanently removed.",
|
|
179
|
+
deleteMyAccount: "Delete my account"
|
|
180
|
+
},
|
|
181
|
+
token: {
|
|
182
|
+
title: "Account token",
|
|
183
|
+
label: "Token",
|
|
184
|
+
copySuccess: "Token copied successfully",
|
|
185
|
+
copyError: "Failed to copy token",
|
|
186
|
+
info: "This token is unique to your account and allows API access. Do not share with third parties.",
|
|
187
|
+
docsLink: "Access documentation"
|
|
188
|
+
},
|
|
189
|
+
changePassword: {
|
|
190
|
+
title: "Change password",
|
|
191
|
+
currentPassword: "Current password",
|
|
192
|
+
currentPasswordPlaceholder: "Enter your current password",
|
|
193
|
+
newPassword: "New password",
|
|
194
|
+
newPasswordPlaceholder: "Enter your new password",
|
|
195
|
+
submit: "Save new password",
|
|
196
|
+
changeError: "Error changing password",
|
|
197
|
+
changedSuccess: "Password changed successfully",
|
|
198
|
+
genericError: "Error changing password. Try again."
|
|
199
|
+
},
|
|
200
|
+
globalPreferences: {
|
|
201
|
+
title: "Change global preferences",
|
|
202
|
+
srDescription: "Confirmation of global account preferences change",
|
|
203
|
+
warning: "You are changing settings that impact <b>all account users</b>. Do you want to confirm?"
|
|
204
|
+
},
|
|
205
|
+
configurations: {
|
|
206
|
+
title: "Settings"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
languages: {
|
|
210
|
+
"pt-br": "Portuguese (Brazil)",
|
|
211
|
+
"en-us": "English (US)",
|
|
212
|
+
"es-es": "Spanish"
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
var en_us_default = messages;
|
|
216
|
+
export {
|
|
217
|
+
en_us_default as default
|
|
218
|
+
};
|
|
219
|
+
//# sourceMappingURL=en-us.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/i18n/messages/en-us.ts"],"sourcesContent":["/**\n * en-us translation catalog for @greatapps/common components.\n * Consumer apps merge this object under the `common` namespace.\n * Mirror the module structure of `pt-br.ts` (the source of truth).\n */\nconst messages = {\n actions: {\n save: 'Save',\n saveChanges: 'Save changes',\n cancel: 'Cancel',\n confirm: 'Confirm',\n delete: 'Delete',\n edit: 'Edit',\n close: 'Close',\n back: 'Back',\n continue: 'Continue',\n add: 'Add',\n remove: 'Remove',\n search: 'Search',\n loading: 'Loading...',\n saving: 'Saving...',\n sending: 'Sending...',\n copy: 'Copy',\n copied: 'Copied',\n },\n\n validations: {\n required: 'Required field',\n invalidEmail: 'Invalid email',\n invalidPhone: 'Invalid phone number',\n },\n\n preferences: {\n title: 'Preferences',\n companyName: 'Company name',\n companyNamePlaceholder: 'Enter the company name',\n language: 'Language',\n languagePlaceholder: 'Select the language',\n languageSearch: 'Search language...',\n currency: 'Currency',\n currencyPlaceholder: 'Select the currency',\n currencySearch: 'Search currency...',\n timeDisplay: 'Time display',\n timezone: 'Time zone',\n timezonePlaceholder: 'Select the time zone',\n timezoneSearch: 'Search time zone...',\n timeFormat: 'Time format',\n timeFormatPlaceholder: 'Select the format',\n timeFormatOptions: {\n h24: '24 hours',\n h12: '12 hours (AM/PM)',\n },\n savedSuccess: 'Preferences saved successfully',\n saveError: 'Error saving preferences',\n },\n\n account: {\n deleteAccount: {\n title: 'Delete account',\n description:\n 'This action is <b>irreversible</b>. By confirming, your account and all your data will be deleted.',\n reasonLabel: 'Reason for cancellation',\n reasonPlaceholder: 'Select',\n descriptionLabel: 'Describe what led you to make this decision',\n descriptionPlaceholder: 'Explain your decision...',\n charactersCount: '{count}/400 characters',\n passwordLabel: 'Password',\n passwordPlaceholder: 'Enter your password',\n submit: 'Delete account',\n requiredFields: 'Fill in all required fields',\n reasons: {\n noFeature: 'The tool lacks a feature I need',\n technical: 'I encountered technical issues or errors in the system',\n support: 'I had issues with support or customer service',\n updates: 'Updates take longer than expected',\n temporary: 'The cancellation is temporary',\n other: 'Other reason',\n },\n },\n confirmDelete: {\n title: 'Sorry to see you go!',\n warning:\n 'All your <b>{count} pages</b> will be permanently deleted. This action is <b>irreversible!</b>',\n sessionExpired: 'Session expired. Fill in the fields again.',\n success: 'Account deleted successfully',\n error: 'Error deleting account. Please try again.',\n keepAccount: 'Keep my account',\n deleteAnyway: 'Delete anyway',\n deleting: 'Deleting...',\n },\n cantDelete: {\n title: 'Unable to delete account',\n description:\n 'You have an active subscription. To delete your account, <b>first cancel your subscription</b> on the Subscription page and then try again.',\n confirm: 'Ok, I understand',\n goToSubscription: 'Go to subscription',\n },\n twoFactor: {\n title: 'Two-factor authentication',\n instructions:\n '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.',\n qrAlt: 'QR Code for two-factor authentication',\n retry: 'Try again',\n pasteDigits: 'Paste the 6 digits below',\n activating: 'Activating...',\n activate: 'Activate authentication',\n recoveryTitle: 'Security codes',\n recoveryHeading: 'Save these emergency recovery codes',\n recoveryText1:\n 'If you lose access to your phone, you will not be able to log into your account without a two-factor code.',\n recoveryText2: 'Print, copy, or write the codes below in a safe location.',\n copyCodes: 'Copy codes',\n finish: 'Finish',\n codesCopied: 'Codes copied successfully',\n generateError: 'Error generating QR Code. Try again.',\n confirmError: 'Error confirming code. Try again.',\n disableTitle: 'Disable 2FA authentication',\n disableDescription:\n 'Enter the 6-digit code from your authenticator app to confirm disabling.',\n authenticatorCode: 'Authenticator code',\n disabling: 'Disabling...',\n disable: 'Disable 2FA',\n disabledSuccess: 'Two-factor authentication disabled',\n disableError: 'Error disabling 2FA. Try again.',\n invalidCode: 'Invalid code',\n codeResent: 'Code resent',\n resendError: 'Error resending code. Try again.',\n },\n profile: {\n title: 'My profile',\n avatarAlt: 'User photo',\n changePhoto: 'Change photo',\n name: 'First name',\n namePlaceholder: 'Enter your first name',\n lastName: 'Last name',\n lastNamePlaceholder: 'Enter your last name',\n gender: 'Gender',\n genderPlaceholder: 'Select your gender',\n genderOptions: {\n male: 'Male',\n female: 'Female',\n },\n phone: 'Phone',\n change: 'Change',\n accessData: 'Access data',\n email: 'Email',\n savedSuccess: 'Profile updated successfully',\n saveError: 'Error updating profile',\n },\n otp: {\n validationCode: 'Validation code',\n incorrectCode: 'Incorrect code',\n resend: 'Resend code',\n resendIn: 'Resend in <b>{time}</b>',\n validating: 'Validating...',\n },\n changeEmail: {\n title: 'Change email',\n confirm: 'Change email',\n sentCodeTo: 'We sent a validation code to email <b>{email}.</b>',\n updateTitle: 'Update contact email',\n updateDescription: 'Enter your new email to keep your contact information updated.',\n newEmail: 'New email',\n newEmailPlaceholder: 'Enter your new email',\n emailChanged: 'Email changed successfully',\n emailExistsError: 'Email already exists or an error occurred. Please try again later.',\n },\n changePhone: {\n titleEdit: 'Change phone',\n titleAdd: 'Add phone',\n sentCodeTo: 'We sent a validation code to your current number <b>{phone}.</b>',\n confirm: 'Change phone',\n updateTitle: 'Update contact phone',\n addTitle: 'Add contact phone',\n updateDescription: 'Enter the new number to keep your contact information updated.',\n addDescription: 'Enter your phone number for contact.',\n newNumber: 'New number',\n numberLabel: 'Phone number',\n phoneChanged: 'Phone changed',\n phoneAdded: 'Phone added',\n invalidNumber: 'Invalid phone number',\n saveError: 'An error occurred while saving the phone number. Please try again later.',\n numberExistsError: 'Number already exists or an error occurred. Please try again later.',\n },\n security: {\n title: 'Security',\n googleLinkedTitle: 'Google account linked',\n googleLinkedDescription:\n 'Your account is linked to Google. If you unlink it, use \"Forgot my password\" to reset an email access password.',\n unlinking: 'Unlinking...',\n unlinkGoogle: 'Unlink Google',\n unlinkError: 'Error unlinking Google account.',\n deleteAccountDescription:\n 'This action is permanent and cannot be undone. All your data, projects, and settings will be permanently removed.',\n deleteMyAccount: 'Delete my account',\n },\n token: {\n title: 'Account token',\n label: 'Token',\n copySuccess: 'Token copied successfully',\n copyError: 'Failed to copy token',\n info: 'This token is unique to your account and allows API access. Do not share with third parties.',\n docsLink: 'Access documentation',\n },\n changePassword: {\n title: 'Change password',\n currentPassword: 'Current password',\n currentPasswordPlaceholder: 'Enter your current password',\n newPassword: 'New password',\n newPasswordPlaceholder: 'Enter your new password',\n submit: 'Save new password',\n changeError: 'Error changing password',\n changedSuccess: 'Password changed successfully',\n genericError: 'Error changing password. Try again.',\n },\n globalPreferences: {\n title: 'Change global preferences',\n srDescription: 'Confirmation of global account preferences change',\n warning:\n 'You are changing settings that impact <b>all account users</b>. Do you want to confirm?',\n },\n configurations: {\n title: 'Settings',\n },\n },\n\n languages: {\n 'pt-br': 'Portuguese (Brazil)',\n 'en-us': 'English (US)',\n 'es-es': 'Spanish',\n },\n} as const;\n\nexport default messages;\n"],"mappings":"AAKA,MAAM,WAAW;AAAA,EACf,SAAS;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,QAAQ;AAAA,I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