@ory/elements-react 1.0.0-next.11 → 1.0.0-next.12
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/CHANGELOG.md +32 -0
- package/api-report/elements-react-theme.api.md +1 -0
- package/api-report/elements-react.api.json +710 -53
- package/api-report/elements-react.api.md +86 -3
- package/api-report/temp/elements-react-theme.api.md +1 -0
- package/api-report/temp/elements-react.api.md +86 -3
- package/dist/index.d.mts +96 -4
- package/dist/index.d.ts +96 -4
- package/dist/index.js +697 -124
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +695 -125
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +292 -29
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.js +993 -249
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +968 -214
- package/dist/theme/default/index.mjs.map +1 -1
- package/jest.config.ts +4 -3
- package/package.json +9 -7
- package/tailwind.config.ts +6 -1
- package/tsconfig.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { UiNodeGroupEnum, isUiNodeInputAttributes, isUiNodeAnchorAttributes, isUiNodeImageAttributes, isUiNodeScriptAttributes, FlowType, isUiNodeTextAttributes, Configuration, FrontendApi, UiNodeInputAttributesTypeEnum, handleFlowError, loginUrl, handleContinueWith, registrationUrl, verificationUrl, recoveryUrl, settingsUrl } from '@ory/client-fetch';
|
|
1
2
|
import { createContext, useContext, useState, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
2
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
4
|
import { useIntl, IntlProvider as IntlProvider$1 } from 'react-intl';
|
|
4
5
|
import { useFormContext, useForm, FormProvider } from 'react-hook-form';
|
|
5
|
-
import { isUiNodeInputAttributes, isUiNodeAnchorAttributes, isUiNodeImageAttributes, isUiNodeScriptAttributes, UiNodeGroupEnum, FlowType, isUiNodeTextAttributes, Configuration, FrontendApi, UiNodeInputAttributesTypeEnum, handleFlowError, loginUrl, handleContinueWith, registrationUrl, verificationUrl, recoveryUrl, settingsUrl } from '@ory/client-fetch';
|
|
6
6
|
import { create, useStore } from 'zustand';
|
|
7
7
|
import { subscribeWithSelector } from 'zustand/middleware';
|
|
8
8
|
|
|
@@ -5514,7 +5514,8 @@ var require_lodash = __commonJS({
|
|
|
5514
5514
|
var ComponentContext = createContext({
|
|
5515
5515
|
components: null,
|
|
5516
5516
|
// fine because we throw an error if it's not provided
|
|
5517
|
-
nodeSorter: () => 0
|
|
5517
|
+
nodeSorter: () => 0,
|
|
5518
|
+
groupSorter: () => 0
|
|
5518
5519
|
});
|
|
5519
5520
|
function useComponents() {
|
|
5520
5521
|
const ctx = useContext(ComponentContext);
|
|
@@ -5526,11 +5527,18 @@ function useComponents() {
|
|
|
5526
5527
|
function useNodeSorter() {
|
|
5527
5528
|
const ctx = useContext(ComponentContext);
|
|
5528
5529
|
if (!ctx) {
|
|
5529
|
-
throw new Error("
|
|
5530
|
+
throw new Error("useNodeSorter must be used within a ComponentProvider");
|
|
5530
5531
|
}
|
|
5531
5532
|
return ctx.nodeSorter;
|
|
5532
5533
|
}
|
|
5533
|
-
|
|
5534
|
+
function useGroupSorter() {
|
|
5535
|
+
const ctx = useContext(ComponentContext);
|
|
5536
|
+
if (!ctx) {
|
|
5537
|
+
throw new Error("useGroupSorter must be used within a ComponentProvider");
|
|
5538
|
+
}
|
|
5539
|
+
return ctx.groupSorter;
|
|
5540
|
+
}
|
|
5541
|
+
var defaultNodeOrder = [
|
|
5534
5542
|
"oidc",
|
|
5535
5543
|
"identifier_first",
|
|
5536
5544
|
"default",
|
|
@@ -5542,21 +5550,40 @@ var defaultGroupOrder = [
|
|
|
5542
5550
|
];
|
|
5543
5551
|
function defaultNodeSorter(a, b) {
|
|
5544
5552
|
var _a, _b;
|
|
5545
|
-
const aGroupWeight = (_a =
|
|
5546
|
-
const bGroupWeight = (_b =
|
|
5553
|
+
const aGroupWeight = (_a = defaultNodeOrder.indexOf(a.group)) != null ? _a : 999;
|
|
5554
|
+
const bGroupWeight = (_b = defaultNodeOrder.indexOf(b.group)) != null ? _b : 999;
|
|
5555
|
+
return aGroupWeight - bGroupWeight;
|
|
5556
|
+
}
|
|
5557
|
+
var defaultGroupOrder = [
|
|
5558
|
+
UiNodeGroupEnum.Default,
|
|
5559
|
+
UiNodeGroupEnum.Profile,
|
|
5560
|
+
UiNodeGroupEnum.Password,
|
|
5561
|
+
UiNodeGroupEnum.Oidc,
|
|
5562
|
+
UiNodeGroupEnum.Code,
|
|
5563
|
+
UiNodeGroupEnum.LookupSecret,
|
|
5564
|
+
UiNodeGroupEnum.Passkey,
|
|
5565
|
+
UiNodeGroupEnum.Webauthn,
|
|
5566
|
+
UiNodeGroupEnum.Totp
|
|
5567
|
+
];
|
|
5568
|
+
function defaultGroupSorter(a, b) {
|
|
5569
|
+
var _a, _b;
|
|
5570
|
+
const aGroupWeight = (_a = defaultGroupOrder.indexOf(a)) != null ? _a : 999;
|
|
5571
|
+
const bGroupWeight = (_b = defaultGroupOrder.indexOf(b)) != null ? _b : 999;
|
|
5547
5572
|
return aGroupWeight - bGroupWeight;
|
|
5548
5573
|
}
|
|
5549
5574
|
function OryComponentProvider({
|
|
5550
5575
|
children,
|
|
5551
5576
|
components,
|
|
5552
|
-
nodeSorter = defaultNodeSorter
|
|
5577
|
+
nodeSorter = defaultNodeSorter,
|
|
5578
|
+
groupSorter = defaultGroupSorter
|
|
5553
5579
|
}) {
|
|
5554
5580
|
return /* @__PURE__ */ jsx(
|
|
5555
5581
|
ComponentContext.Provider,
|
|
5556
5582
|
{
|
|
5557
5583
|
value: {
|
|
5558
5584
|
components,
|
|
5559
|
-
nodeSorter
|
|
5585
|
+
nodeSorter,
|
|
5586
|
+
groupSorter
|
|
5560
5587
|
},
|
|
5561
5588
|
children
|
|
5562
5589
|
}
|
|
@@ -5651,7 +5678,7 @@ var en_default = {
|
|
|
5651
5678
|
"identities.messages.1050005": "Authenticator app QR code",
|
|
5652
5679
|
"identities.messages.1050006": "{secret}",
|
|
5653
5680
|
"identities.messages.1050007": "Reveal backup recovery codes",
|
|
5654
|
-
"identities.messages.1050008": "
|
|
5681
|
+
"identities.messages.1050008": "Enable",
|
|
5655
5682
|
"identities.messages.1050009": "{secret}",
|
|
5656
5683
|
"identities.messages.1050010": "These are your back up recovery codes. Please keep them in a safe place!",
|
|
5657
5684
|
"identities.messages.1050011": "Confirm backup recovery codes",
|
|
@@ -5660,7 +5687,7 @@ var en_default = {
|
|
|
5660
5687
|
"identities.messages.1050014": "Secret was used at {used_at, date, long}",
|
|
5661
5688
|
"identities.messages.1050015": "{secrets_list}",
|
|
5662
5689
|
"identities.messages.1050016": "Disable this method",
|
|
5663
|
-
"identities.messages.1050017": "
|
|
5690
|
+
"identities.messages.1050017": "Authenticator Secret",
|
|
5664
5691
|
"identities.messages.1050018": 'Remove security key "{display_name}"',
|
|
5665
5692
|
"identities.messages.1050019": "Add passkey",
|
|
5666
5693
|
"identities.messages.1050020": 'Remove passkey "{display_name}"',
|
|
@@ -5784,7 +5811,6 @@ var en_default = {
|
|
|
5784
5811
|
"settings.navigation-webauthn": "Hardware Tokens",
|
|
5785
5812
|
"settings.navigation-passkey": "Passkeys",
|
|
5786
5813
|
"settings.subtitle-instructions": "Here you can manage settings related to your account. Keep in mind that certain actions require you to re-authenticate.",
|
|
5787
|
-
"settings.title": "Update your account",
|
|
5788
5814
|
"settings.subtitle": "Update your account settings",
|
|
5789
5815
|
"settings.title-lookup-secret": "Manage 2FA Backup Recovery Codes",
|
|
5790
5816
|
"settings.title-navigation": "Account Settings",
|
|
@@ -5794,6 +5820,14 @@ var en_default = {
|
|
|
5794
5820
|
"settings.title-totp": "Manage 2FA TOTP Authenticator App",
|
|
5795
5821
|
"settings.title-webauthn": "Manage Hardware Tokens",
|
|
5796
5822
|
"settings.title-passkey": "Manage Passkeys",
|
|
5823
|
+
"settings.title": "Account Settings",
|
|
5824
|
+
"settings.navigation.title": "Account Settings",
|
|
5825
|
+
"settings.password.title": "Change Password",
|
|
5826
|
+
"settings.password.description": "Modify your password",
|
|
5827
|
+
"settings.profile.title": "Profile Settings",
|
|
5828
|
+
"settings.profile.description": "Update your profile information",
|
|
5829
|
+
"settings.webauthn.title": "Manage Hardware Tokens",
|
|
5830
|
+
"settings.webauthn.description": "Manage your hardware token settings",
|
|
5797
5831
|
"verification.registration-button": "Sign up",
|
|
5798
5832
|
"verification.registration-label": "Don't have an account?",
|
|
5799
5833
|
"verification.title": "Verify your account",
|
|
@@ -5819,7 +5853,20 @@ var en_default = {
|
|
|
5819
5853
|
"card.header.description.login": "Sign in with {identifierLabel}",
|
|
5820
5854
|
"card.header.description.registration": "Sign up with {identifierLabel}",
|
|
5821
5855
|
"misc.or": "or",
|
|
5822
|
-
"forms.label.forgot-password": "Forgot Password?"
|
|
5856
|
+
"forms.label.forgot-password": "Forgot Password?",
|
|
5857
|
+
"settings.totp.title": "Authenticator App",
|
|
5858
|
+
"settings.totp.description": "Add a TOTP Authenticator App to your account to improve your account security. Popular Authenticator Apps are LastPass and Google Authenticator",
|
|
5859
|
+
"settings.totp.info.not-linked": "To enable scan the QR code with your authenticator and enter the code.",
|
|
5860
|
+
"settings.totp.info.linked": "You currently have an authenticator app connected.",
|
|
5861
|
+
"settings.lookup_secret.title": "Backup Recovery Codes (second factor)",
|
|
5862
|
+
"settings.lookup_secret.description": "Recovery codes are a secure backup for 2FA, allowing you to regain access to your account if you lose your 2FA device.",
|
|
5863
|
+
"settings.oidc.title": "Connected accounts",
|
|
5864
|
+
"settings.oidc.description": "Connect a social login provider with your account.",
|
|
5865
|
+
"settings.oidc.info": "Connected accounts from these providers can be used to login to your account",
|
|
5866
|
+
"settings.webauthn.info": "Hardware Tokens are used for second-factor authentication or as first-factor with Passkeys",
|
|
5867
|
+
"settings.passkey.title": "Manage Passkeys",
|
|
5868
|
+
"settings.passkey.description": "Manage your passkey settings",
|
|
5869
|
+
"settings.passkey.info": "Manage your passkey settings"
|
|
5823
5870
|
};
|
|
5824
5871
|
|
|
5825
5872
|
// src/locales/de.json
|
|
@@ -5975,25 +6022,6 @@ var de_default = {
|
|
|
5975
6022
|
"registration.login-label": "Sie haben bereits ein Konto?",
|
|
5976
6023
|
"registration.subtitle-oauth2": "Zur Authentifizierung bei {clientName}",
|
|
5977
6024
|
"registration.title": "Konto registrieren",
|
|
5978
|
-
"settings.navigation-back-button": "Zur\xFCck",
|
|
5979
|
-
"settings.navigation-backup-codes": "2FA-Backup-Codes",
|
|
5980
|
-
"settings.navigation-logout": "Abmelden",
|
|
5981
|
-
"settings.navigation-oidc": "Soziale Medien",
|
|
5982
|
-
"settings.navigation-password": "Passwort",
|
|
5983
|
-
"settings.navigation-profile": "Profil",
|
|
5984
|
-
"settings.navigation-totp": "Zwei-Faktor App",
|
|
5985
|
-
"settings.navigation-webauthn": "Sicherheitsschl\xFCssel",
|
|
5986
|
-
"settings.navigation-passkey": "Passkeys",
|
|
5987
|
-
"settings.subtitle-instructions": "Hier k\xF6nnen Sie Einstellungen zu Ihrem Konto vornehmen. F\xFCr manche Einstellungen m\xFCssen Sie Ihre Identit\xE4t erneut best\xE4tigen.",
|
|
5988
|
-
"settings.title": "Kontoeinstellungen",
|
|
5989
|
-
"settings.title-lookup-secret": "Manage 2FA Backup Recovery Codes",
|
|
5990
|
-
"settings.title-navigation": "Konto Einstellungen",
|
|
5991
|
-
"settings.title-oidc": "Anmeldung \xFCber soziale Medien",
|
|
5992
|
-
"settings.title-password": "Passwort \xE4ndern",
|
|
5993
|
-
"settings.title-profile": "Profil Einstellungen",
|
|
5994
|
-
"settings.title-totp": "Zwei-Faktor TOTP App",
|
|
5995
|
-
"settings.title-webauthn": "Sicherheitsschl\xFCssel verwalten",
|
|
5996
|
-
"settings.title-passkey": "Passkeys verwalten",
|
|
5997
6025
|
"verification.registration-button": "Registrieren",
|
|
5998
6026
|
"verification.registration-label": "Sie haben noch kein Konto?",
|
|
5999
6027
|
"verification.title": "Verifizieren Sie ihr Konto",
|
|
@@ -6022,7 +6050,7 @@ var de_default = {
|
|
|
6022
6050
|
"identities.messages.1040007": "",
|
|
6023
6051
|
"identities.messages.1040008": "",
|
|
6024
6052
|
"identities.messages.1040009": "",
|
|
6025
|
-
"identities.messages.1050019": "",
|
|
6053
|
+
"identities.messages.1050019": "Passkey hinzuf\xFCgen",
|
|
6026
6054
|
"identities.messages.1050020": "",
|
|
6027
6055
|
"identities.messages.4000037": "",
|
|
6028
6056
|
"identities.messages.4010009": "",
|
|
@@ -6036,7 +6064,6 @@ var de_default = {
|
|
|
6036
6064
|
"card.header.parts.password.registration": "Ihrer {identifierLabel} und einem Passwort",
|
|
6037
6065
|
"card.header.parts.webauthn": "ein Sicherheitsschl\xFCssel",
|
|
6038
6066
|
"recovery.subtitle": "Geben Sie die mit Ihrem Konto verkn\xFCpfte E-Mail-Adresse ein, um einen einmaligen Zugangscode zu erhalten",
|
|
6039
|
-
"settings.subtitle": "Aktualisieren Sie Ihre Kontoeinstellungen",
|
|
6040
6067
|
"verification.subtitle": "Geben Sie die mit Ihrem Konto verkn\xFCpfte E-Mail-Adresse ein, um es zu best\xE4tigen",
|
|
6041
6068
|
"card.header.description.login": "Melden Sie sich mit {identifierLabel} an",
|
|
6042
6069
|
"card.header.description.registration": "Registrieren Sie sich mit {identifierLabel}",
|
|
@@ -6044,7 +6071,47 @@ var de_default = {
|
|
|
6044
6071
|
"login.subtitle-refresh": "Best\xE4tigen Sie ihre Identit\xE4t mit {parts}",
|
|
6045
6072
|
"misc.or": "oder",
|
|
6046
6073
|
"registration.subtitle": "Registrieren Sie sich mit {parts}",
|
|
6047
|
-
"forms.label.forgot-password": "Passwort vergessen?"
|
|
6074
|
+
"forms.label.forgot-password": "Passwort vergessen?",
|
|
6075
|
+
"settings.title": "Kontoeinstellungen",
|
|
6076
|
+
"settings.navigation.title": "Kontoeinstellungen",
|
|
6077
|
+
"settings.subtitle": "Aktualisieren Sie Ihre Kontoeinstellungen",
|
|
6078
|
+
"settings.navigation-back-button": "Zur\xFCck",
|
|
6079
|
+
"settings.navigation-backup-codes": "2FA-Backup-Codes",
|
|
6080
|
+
"settings.navigation-logout": "Abmelden",
|
|
6081
|
+
"settings.navigation-oidc": "Soziale Medien",
|
|
6082
|
+
"settings.navigation-password": "Passwort",
|
|
6083
|
+
"settings.navigation-profile": "Profil",
|
|
6084
|
+
"settings.navigation-totp": "Zwei-Faktor App",
|
|
6085
|
+
"settings.navigation-webauthn": "Sicherheitsschl\xFCssel",
|
|
6086
|
+
"settings.navigation-passkey": "Passkeys",
|
|
6087
|
+
"settings.subtitle-instructions": "Hier k\xF6nnen Sie Einstellungen zu Ihrem Konto vornehmen. F\xFCr manche Einstellungen m\xFCssen Sie Ihre Identit\xE4t erneut best\xE4tigen.",
|
|
6088
|
+
"settings.totp.info.linked": "Sie haben derzeit eine Authenticator-App verbunden.",
|
|
6089
|
+
"settings.totp.info.not-linked": "Um dies zu erm\xF6glichen, scannen Sie den QR-Code mit Ihrem Authenticator und geben Sie den Code ein.",
|
|
6090
|
+
"settings.totp.title": "Authenticator App",
|
|
6091
|
+
"settings.totp.description": "F\xFCgen Sie eine TOTP Authenticator App zu Ihrem Konto hinzu, um die Sicherheit Ihres Kontos zu verbessern. Beliebte Authenticator Apps sind LastPass und Google Authenticator.",
|
|
6092
|
+
"settings.lookup_secret.description": "Verwalten Sie Ihre 2FA-Backup-Wiederherstellungscodes",
|
|
6093
|
+
"settings.lookup_secret.title": "Wiederherstellungscodes",
|
|
6094
|
+
"settings.oidc.description": "Verwalten Sie Ihre Einstellungen f\xFCr die soziale Anmeldung",
|
|
6095
|
+
"settings.oidc.title": "Soziales Anmelden",
|
|
6096
|
+
"settings.passkey.description": "Verwalten Sie Ihre Passworteinstellungen",
|
|
6097
|
+
"settings.passkey.title": "Passkeys verwalten",
|
|
6098
|
+
"settings.password.description": "\xC4ndern Sie Ihr Passwort",
|
|
6099
|
+
"settings.password.title": "Passwort \xE4ndern",
|
|
6100
|
+
"settings.profile.description": "Aktualisieren Sie Ihre Profilinformationen",
|
|
6101
|
+
"settings.profile.title": "Profileinstellungen",
|
|
6102
|
+
"settings.webauthn.description": "Verwalten Sie Ihre Hardware-Token-Einstellungen",
|
|
6103
|
+
"settings.webauthn.title": "Hardware-Token verwalten",
|
|
6104
|
+
"settings.oidc.info": "Verbundene Konten dieser Anbieter k\xF6nnen f\xFCr die Anmeldung bei Ihrem Konto verwendet werden",
|
|
6105
|
+
"settings.passkey.info": "Verwalten Sie Ihre Passkey-Einstellungen",
|
|
6106
|
+
"settings.title-lookup-secret": "Verwalten Sie 2FA-Backup-Wiederherstellungscodes",
|
|
6107
|
+
"settings.title-navigation": "Kontoeinstellungen",
|
|
6108
|
+
"settings.title-oidc": "Social Sign In",
|
|
6109
|
+
"settings.title-passkey": "Passkeys verwalten",
|
|
6110
|
+
"settings.title-password": "Kennwort \xE4ndern",
|
|
6111
|
+
"settings.title-profile": "Profileinstellungen",
|
|
6112
|
+
"settings.title-totp": "Verwalten Sie die 2FA TOTP Authenticator-App",
|
|
6113
|
+
"settings.title-webauthn": "Hardware-Token verwalten",
|
|
6114
|
+
"settings.webauthn.info": "Hardware-Tokens werden f\xFCr die Zweitfaktor-Authentifizierung oder als Erstfaktor-Authentifizierung mit Passkeys verwendet"
|
|
6048
6115
|
};
|
|
6049
6116
|
|
|
6050
6117
|
// src/locales/es.json
|
|
@@ -6211,14 +6278,6 @@ var es_default = {
|
|
|
6211
6278
|
"settings.navigation-passkey": "Passkeys",
|
|
6212
6279
|
"settings.subtitle-instructions": "Aqu\xED puede gestionar las configuraciones relacionadas con su cuenta. Tenga en cuenta que ciertas acciones requieren que vuelva a autenticarse.",
|
|
6213
6280
|
"settings.title": "Configuraciones de la Cuenta",
|
|
6214
|
-
"settings.title-lookup-secret": "Gestionar C\xF3digos de Recuperaci\xF3n de Respaldo de 2FA",
|
|
6215
|
-
"settings.title-navigation": "Configuraciones de la Cuenta",
|
|
6216
|
-
"settings.title-oidc": "Inicio de Sesi\xF3n Social",
|
|
6217
|
-
"settings.title-password": "Cambiar Contrase\xF1a",
|
|
6218
|
-
"settings.title-profile": "Configuraciones del Perfil",
|
|
6219
|
-
"settings.title-totp": "Gestionar Aplicaci\xF3n Autenticadora de 2FA",
|
|
6220
|
-
"settings.title-webauthn": "Gestionar Tokens de Hardware",
|
|
6221
|
-
"settings.title-passkey": "Gestionar Passkeys",
|
|
6222
6281
|
"verification.registration-button": "Registrarse",
|
|
6223
6282
|
"verification.registration-label": "\xBFNo tiene una cuenta?",
|
|
6224
6283
|
"verification.title": "Verificar su cuenta",
|
|
@@ -6269,7 +6328,35 @@ var es_default = {
|
|
|
6269
6328
|
"recovery.subtitle": "",
|
|
6270
6329
|
"registration.subtitle": "",
|
|
6271
6330
|
"settings.subtitle": "",
|
|
6272
|
-
"verification.subtitle": ""
|
|
6331
|
+
"verification.subtitle": "",
|
|
6332
|
+
"settings.totp.info.linked": "Actualmente tienes una aplicaci\xF3n de autenticaci\xF3n conectada.",
|
|
6333
|
+
"settings.totp.info.not-linked": "Para habilitar, escanea el c\xF3digo QR con tu autenticador e ingresa el c\xF3digo.",
|
|
6334
|
+
"settings.totp.title": "Aplicaci\xF3n Autenticadora",
|
|
6335
|
+
"settings.totp.description": "Agrega una aplicaci\xF3n de autenticaci\xF3n TOTP a tu cuenta para mejorar la seguridad de tu cuenta. Las aplicaciones de autenticaci\xF3n populares son LastPass y Google Authenticator.",
|
|
6336
|
+
"settings.lookup_secret.description": "Gestiona tus c\xF3digos de recuperaci\xF3n de respaldo 2FA",
|
|
6337
|
+
"settings.lookup_secret.title": "C\xF3digos de Recuperaci\xF3n",
|
|
6338
|
+
"settings.navigation.title": "Configuraci\xF3n de la Cuenta",
|
|
6339
|
+
"settings.oidc.description": "Administra la configuraci\xF3n de tu inicio de sesi\xF3n social",
|
|
6340
|
+
"settings.oidc.title": "Inicio de Sesi\xF3n Social",
|
|
6341
|
+
"settings.passkey.description": "Administra la configuraci\xF3n de tu clave de acceso",
|
|
6342
|
+
"settings.passkey.title": "Gestionar Claves de Acceso",
|
|
6343
|
+
"settings.password.description": "Modifica tu contrase\xF1a",
|
|
6344
|
+
"settings.password.title": "Cambiar Contrase\xF1a",
|
|
6345
|
+
"settings.profile.description": "Actualiza la informaci\xF3n de tu perfil",
|
|
6346
|
+
"settings.profile.title": "Configuraci\xF3n de Perfil",
|
|
6347
|
+
"settings.webauthn.description": "Administra la configuraci\xF3n de tu token de hardware",
|
|
6348
|
+
"settings.webauthn.title": "Gestionar Tokens de Hardware",
|
|
6349
|
+
"settings.oidc.info": "",
|
|
6350
|
+
"settings.passkey.info": "",
|
|
6351
|
+
"settings.title-lookup-secret": "",
|
|
6352
|
+
"settings.title-navigation": "",
|
|
6353
|
+
"settings.title-oidc": "",
|
|
6354
|
+
"settings.title-passkey": "",
|
|
6355
|
+
"settings.title-password": "",
|
|
6356
|
+
"settings.title-profile": "",
|
|
6357
|
+
"settings.title-totp": "",
|
|
6358
|
+
"settings.title-webauthn": "",
|
|
6359
|
+
"settings.webauthn.info": ""
|
|
6273
6360
|
};
|
|
6274
6361
|
|
|
6275
6362
|
// src/locales/fr.json
|
|
@@ -6436,14 +6523,6 @@ var fr_default = {
|
|
|
6436
6523
|
"settings.navigation-passkey": "Passkeys",
|
|
6437
6524
|
"settings.subtitle-instructions": "Ici, vous pouvez g\xE9rer les param\xE8tres li\xE9s \xE0 votre compte. Gardez \xE0 l'esprit que certaines actions n\xE9cessitent une nouvelle authentification.",
|
|
6438
6525
|
"settings.title": "Param\xE8tres du compte",
|
|
6439
|
-
"settings.title-lookup-secret": "G\xE9rer les codes de r\xE9cup\xE9ration 2FA",
|
|
6440
|
-
"settings.title-navigation": "Param\xE8tres du compte",
|
|
6441
|
-
"settings.title-oidc": "Connexion sociale",
|
|
6442
|
-
"settings.title-password": "Changer le mot de passe",
|
|
6443
|
-
"settings.title-profile": "Param\xE8tres de profil",
|
|
6444
|
-
"settings.title-totp": "G\xE9rer l'application d'authentification TOTP 2FA",
|
|
6445
|
-
"settings.title-webauthn": "G\xE9rer les tokens mat\xE9riels",
|
|
6446
|
-
"settings.title-passkey": "G\xE9rer les Passkeys",
|
|
6447
6526
|
"verification.registration-button": "S'inscrire",
|
|
6448
6527
|
"verification.registration-label": "Vous n'avez pas de compte ?",
|
|
6449
6528
|
"verification.title": "V\xE9rifiez votre compte",
|
|
@@ -6494,7 +6573,35 @@ var fr_default = {
|
|
|
6494
6573
|
"recovery.subtitle": "",
|
|
6495
6574
|
"registration.subtitle": "",
|
|
6496
6575
|
"settings.subtitle": "",
|
|
6497
|
-
"verification.subtitle": ""
|
|
6576
|
+
"verification.subtitle": "",
|
|
6577
|
+
"settings.totp.info.linked": "Vous avez actuellement une application d'authentification connect\xE9e.",
|
|
6578
|
+
"settings.totp.info.not-linked": "Pour activer, scannez le QR code avec votre authentificateur et entrez le code.",
|
|
6579
|
+
"settings.totp.title": "Application d'authentification",
|
|
6580
|
+
"settings.totp.description": "Ajoutez une application d'authentification TOTP \xE0 votre compte pour am\xE9liorer la s\xE9curit\xE9 de votre compte. Les applications d'authentification populaires sont LastPass et Google Authenticator.",
|
|
6581
|
+
"settings.lookup_secret.description": "",
|
|
6582
|
+
"settings.lookup_secret.title": "",
|
|
6583
|
+
"settings.navigation.title": "",
|
|
6584
|
+
"settings.oidc.description": "",
|
|
6585
|
+
"settings.oidc.info": "",
|
|
6586
|
+
"settings.oidc.title": "",
|
|
6587
|
+
"settings.passkey.description": "",
|
|
6588
|
+
"settings.passkey.info": "",
|
|
6589
|
+
"settings.passkey.title": "",
|
|
6590
|
+
"settings.password.description": "",
|
|
6591
|
+
"settings.password.title": "",
|
|
6592
|
+
"settings.profile.description": "",
|
|
6593
|
+
"settings.profile.title": "",
|
|
6594
|
+
"settings.title-lookup-secret": "",
|
|
6595
|
+
"settings.title-navigation": "",
|
|
6596
|
+
"settings.title-oidc": "",
|
|
6597
|
+
"settings.title-passkey": "",
|
|
6598
|
+
"settings.title-password": "",
|
|
6599
|
+
"settings.title-profile": "",
|
|
6600
|
+
"settings.title-totp": "",
|
|
6601
|
+
"settings.title-webauthn": "",
|
|
6602
|
+
"settings.webauthn.description": "",
|
|
6603
|
+
"settings.webauthn.info": "",
|
|
6604
|
+
"settings.webauthn.title": ""
|
|
6498
6605
|
};
|
|
6499
6606
|
|
|
6500
6607
|
// src/locales/nl.json
|
|
@@ -6661,14 +6768,6 @@ var nl_default = {
|
|
|
6661
6768
|
"settings.navigation-passkey": "Passkeys",
|
|
6662
6769
|
"settings.subtitle-instructions": "Hier kun je instellingen beheren die verband houden met je account. Houd er rekening mee dat bepaalde acties vereisen dat je opnieuw wordt geauthenticeerd.",
|
|
6663
6770
|
"settings.title": "Accountinstellingen",
|
|
6664
|
-
"settings.title-lookup-secret": "Beheer 2FA Backup Herstelcodes",
|
|
6665
|
-
"settings.title-navigation": "Accountinstellingen",
|
|
6666
|
-
"settings.title-oidc": "Sociaal Inloggen",
|
|
6667
|
-
"settings.title-password": "Wachtwoord wijzigen",
|
|
6668
|
-
"settings.title-profile": "Profielinstellingen",
|
|
6669
|
-
"settings.title-totp": "Beheer 2FA TOTP Authenticator App",
|
|
6670
|
-
"settings.title-webauthn": "Beheer Hardware Tokens",
|
|
6671
|
-
"settings.title-passkey": "Beheer Passkeys",
|
|
6672
6771
|
"verification.registration-button": "Registreren",
|
|
6673
6772
|
"verification.registration-label": "Heb je nog geen account?",
|
|
6674
6773
|
"verification.title": "Verifieer je account",
|
|
@@ -6719,7 +6818,35 @@ var nl_default = {
|
|
|
6719
6818
|
"recovery.subtitle": "",
|
|
6720
6819
|
"registration.subtitle": "",
|
|
6721
6820
|
"settings.subtitle": "",
|
|
6722
|
-
"verification.subtitle": ""
|
|
6821
|
+
"verification.subtitle": "",
|
|
6822
|
+
"settings.totp.info.linked": "U heeft momenteel een authenticator-app verbonden.",
|
|
6823
|
+
"settings.totp.info.not-linked": "Om te activeren, scan de QR-code met je authenticator en voer de code in.",
|
|
6824
|
+
"settings.totp.title": "",
|
|
6825
|
+
"settings.totp.description": "Voeg een TOTP Authenticator App toe aan uw account om de beveiliging van uw account te verbeteren. Populaire Authenticator Apps zijn LastPass en Google Authenticator.",
|
|
6826
|
+
"settings.lookup_secret.description": "",
|
|
6827
|
+
"settings.lookup_secret.title": "",
|
|
6828
|
+
"settings.navigation.title": "",
|
|
6829
|
+
"settings.oidc.description": "",
|
|
6830
|
+
"settings.oidc.info": "",
|
|
6831
|
+
"settings.oidc.title": "",
|
|
6832
|
+
"settings.passkey.description": "",
|
|
6833
|
+
"settings.passkey.info": "",
|
|
6834
|
+
"settings.passkey.title": "",
|
|
6835
|
+
"settings.password.description": "",
|
|
6836
|
+
"settings.password.title": "",
|
|
6837
|
+
"settings.profile.description": "",
|
|
6838
|
+
"settings.profile.title": "",
|
|
6839
|
+
"settings.title-lookup-secret": "",
|
|
6840
|
+
"settings.title-navigation": "",
|
|
6841
|
+
"settings.title-oidc": "",
|
|
6842
|
+
"settings.title-passkey": "",
|
|
6843
|
+
"settings.title-password": "",
|
|
6844
|
+
"settings.title-profile": "",
|
|
6845
|
+
"settings.title-totp": "",
|
|
6846
|
+
"settings.title-webauthn": "",
|
|
6847
|
+
"settings.webauthn.description": "",
|
|
6848
|
+
"settings.webauthn.info": "",
|
|
6849
|
+
"settings.webauthn.title": ""
|
|
6723
6850
|
};
|
|
6724
6851
|
|
|
6725
6852
|
// src/locales/pl.json
|
|
@@ -6886,14 +7013,6 @@ var pl_default = {
|
|
|
6886
7013
|
"settings.navigation-passkey": "Passkeys",
|
|
6887
7014
|
"settings.subtitle-instructions": "Tutaj mo\u017Cesz zarz\u0105dza\u0107 ustawieniami zwi\u0105zanymi z Twoim kontem. Miej na uwadze \u017Ce niekt\xF3re akcje mog\u0105 wymaga\u0107 ponownej uwierzytelnienia.",
|
|
6888
7015
|
"settings.title": "Ustawienia Konta",
|
|
6889
|
-
"settings.title-lookup-secret": "Zarz\u0105dzaj kodami odzyskiwania 2FA",
|
|
6890
|
-
"settings.title-navigation": "Ustawienia Konta",
|
|
6891
|
-
"settings.title-oidc": "Zewn\u0119trzne logowanie",
|
|
6892
|
-
"settings.title-password": "Zmie\u0144 Has\u0142o",
|
|
6893
|
-
"settings.title-profile": "Ustawienia Profilu",
|
|
6894
|
-
"settings.title-totp": "Zarz\u0105dzaj aplikacj\u0105 autentykator 2FA TOTP",
|
|
6895
|
-
"settings.title-webauthn": "Zarz\u0105dzaj tokenami sprz\u0119towymi",
|
|
6896
|
-
"settings.title-passkey": "Zarz\u0105dzaj Passkeys",
|
|
6897
7016
|
"verification.registration-button": "Zarejestruj si\u0119",
|
|
6898
7017
|
"verification.registration-label": "Nie posiadasz konta?",
|
|
6899
7018
|
"verification.title": "Zweryfikuj konto",
|
|
@@ -6944,7 +7063,35 @@ var pl_default = {
|
|
|
6944
7063
|
"recovery.subtitle": "",
|
|
6945
7064
|
"registration.subtitle": "",
|
|
6946
7065
|
"settings.subtitle": "",
|
|
6947
|
-
"verification.subtitle": ""
|
|
7066
|
+
"verification.subtitle": "",
|
|
7067
|
+
"settings.totp.info.linked": "Aktualnie masz pod\u0142\u0105czon\u0105 aplikacj\u0119 uwierzytelniaj\u0105c\u0105.",
|
|
7068
|
+
"settings.totp.info.not-linked": "Aby w\u0142\u0105czy\u0107, zeskanuj kod QR za pomoc\u0105 swojego uwierzytelniaj\u0105cego i wprowad\u017A kod.",
|
|
7069
|
+
"settings.totp.title": "",
|
|
7070
|
+
"settings.totp.description": "Dodaj aplikacj\u0119 do uwierzytelniania TOTP do swojego konta, aby poprawi\u0107 bezpiecze\u0144stwo swojego konta. Popularne aplikacje uwierzytelniaj\u0105ce to LastPass i Google Authenticator.",
|
|
7071
|
+
"settings.lookup_secret.description": "",
|
|
7072
|
+
"settings.lookup_secret.title": "",
|
|
7073
|
+
"settings.navigation.title": "",
|
|
7074
|
+
"settings.oidc.description": "",
|
|
7075
|
+
"settings.oidc.info": "",
|
|
7076
|
+
"settings.oidc.title": "",
|
|
7077
|
+
"settings.passkey.description": "",
|
|
7078
|
+
"settings.passkey.info": "",
|
|
7079
|
+
"settings.passkey.title": "",
|
|
7080
|
+
"settings.password.description": "",
|
|
7081
|
+
"settings.password.title": "",
|
|
7082
|
+
"settings.profile.description": "",
|
|
7083
|
+
"settings.profile.title": "",
|
|
7084
|
+
"settings.title-lookup-secret": "",
|
|
7085
|
+
"settings.title-navigation": "",
|
|
7086
|
+
"settings.title-oidc": "",
|
|
7087
|
+
"settings.title-passkey": "",
|
|
7088
|
+
"settings.title-password": "",
|
|
7089
|
+
"settings.title-profile": "",
|
|
7090
|
+
"settings.title-totp": "",
|
|
7091
|
+
"settings.title-webauthn": "",
|
|
7092
|
+
"settings.webauthn.description": "",
|
|
7093
|
+
"settings.webauthn.info": "",
|
|
7094
|
+
"settings.webauthn.title": ""
|
|
6948
7095
|
};
|
|
6949
7096
|
|
|
6950
7097
|
// src/locales/pt.json
|
|
@@ -7111,14 +7258,6 @@ var pt_default = {
|
|
|
7111
7258
|
"settings.navigation-passkey": "Passkeys",
|
|
7112
7259
|
"settings.subtitle-instructions": "Aqui pode gerar configura\xE7\xF5es relacionadas com a sua conta. Lembre-se de que certas a\xE7\xF5es exigem que efetue novamente login.",
|
|
7113
7260
|
"settings.title": "Configura\xE7\xF5es da Conta",
|
|
7114
|
-
"settings.title-lookup-secret": "Gerar C\xF3digos de Recupera\xE7\xE3o de Backup de 2FA",
|
|
7115
|
-
"settings.title-navigation": "Configura\xE7\xF5es da Conta",
|
|
7116
|
-
"settings.title-oidc": "login social",
|
|
7117
|
-
"settings.title-password": "Alterar password",
|
|
7118
|
-
"settings.title-profile": "Configura\xE7\xF5es de Perfil",
|
|
7119
|
-
"settings.title-totp": "Gerar Aplica\xE7\xE3o Autenticador 2FA",
|
|
7120
|
-
"settings.title-webauthn": "Gerar Tokens de Hardware",
|
|
7121
|
-
"settings.title-passkey": "Gerar Passkeys",
|
|
7122
7261
|
"verification.registration-button": "Registar",
|
|
7123
7262
|
"verification.registration-label": "N\xE3o tem uma conta?",
|
|
7124
7263
|
"verification.title": "Verifique a sua conta",
|
|
@@ -7169,7 +7308,35 @@ var pt_default = {
|
|
|
7169
7308
|
"recovery.subtitle": "",
|
|
7170
7309
|
"registration.subtitle": "",
|
|
7171
7310
|
"settings.subtitle": "",
|
|
7172
|
-
"verification.subtitle": ""
|
|
7311
|
+
"verification.subtitle": "",
|
|
7312
|
+
"settings.totp.info.linked": "Voc\xEA atualmente tem um aplicativo autenticador conectado.",
|
|
7313
|
+
"settings.totp.info.not-linked": "Para ativar, escaneie o c\xF3digo QR com seu autenticador e insira o c\xF3digo.",
|
|
7314
|
+
"settings.totp.title": "",
|
|
7315
|
+
"settings.totp.description": "Adicione um aplicativo autenticador TOTP \xE0 sua conta para melhorar a seguran\xE7a da sua conta. Aplicativos autenticadores populares s\xE3o LastPass e Google Authenticator.",
|
|
7316
|
+
"settings.lookup_secret.description": "",
|
|
7317
|
+
"settings.lookup_secret.title": "",
|
|
7318
|
+
"settings.navigation.title": "",
|
|
7319
|
+
"settings.oidc.description": "",
|
|
7320
|
+
"settings.oidc.info": "",
|
|
7321
|
+
"settings.oidc.title": "",
|
|
7322
|
+
"settings.passkey.description": "",
|
|
7323
|
+
"settings.passkey.info": "",
|
|
7324
|
+
"settings.passkey.title": "",
|
|
7325
|
+
"settings.password.description": "",
|
|
7326
|
+
"settings.password.title": "",
|
|
7327
|
+
"settings.profile.description": "",
|
|
7328
|
+
"settings.profile.title": "",
|
|
7329
|
+
"settings.title-lookup-secret": "",
|
|
7330
|
+
"settings.title-navigation": "",
|
|
7331
|
+
"settings.title-oidc": "",
|
|
7332
|
+
"settings.title-passkey": "",
|
|
7333
|
+
"settings.title-password": "",
|
|
7334
|
+
"settings.title-profile": "",
|
|
7335
|
+
"settings.title-totp": "",
|
|
7336
|
+
"settings.title-webauthn": "",
|
|
7337
|
+
"settings.webauthn.description": "",
|
|
7338
|
+
"settings.webauthn.info": "",
|
|
7339
|
+
"settings.webauthn.title": ""
|
|
7173
7340
|
};
|
|
7174
7341
|
|
|
7175
7342
|
// src/locales/sv.json
|
|
@@ -7354,14 +7521,6 @@ var sv_default = {
|
|
|
7354
7521
|
"settings.navigation-passkey": "Passkeys",
|
|
7355
7522
|
"settings.subtitle-instructions": "H\xE4r kan du hantera inst\xE4llningar relaterade till ditt konto. T\xE4nk p\xE5 att vissa \xE5tg\xE4rder kr\xE4ver att du autentiseras p\xE5 nytt.",
|
|
7356
7523
|
"settings.title": "Kontoinst\xE4llningar",
|
|
7357
|
-
"settings.title-lookup-secret": "Hantera 2FA backup-\xE5terst\xE4llningskoder",
|
|
7358
|
-
"settings.title-navigation": "Kontoinst\xE4llningar",
|
|
7359
|
-
"settings.title-oidc": "Social Inloggning",
|
|
7360
|
-
"settings.title-password": "Byt l\xF6senord",
|
|
7361
|
-
"settings.title-profile": "Profilinst\xE4llningar",
|
|
7362
|
-
"settings.title-totp": "Hantera 2FA TOTP Autentiserings App",
|
|
7363
|
-
"settings.title-webauthn": "Hantera H\xE5rdvaru Tokens",
|
|
7364
|
-
"settings.title-passkey": "Hantera Passkeys",
|
|
7365
7524
|
"verification.registration-button": "Skapa konto",
|
|
7366
7525
|
"verification.registration-label": "Har du inget konto?",
|
|
7367
7526
|
"verification.title": "Verifiera ditt konto",
|
|
@@ -7377,7 +7536,7 @@ var sv_default = {
|
|
|
7377
7536
|
"identities.messages.4000037": "Detta konto finns inte eller har ingen inloggningsmetod konfigurerad.",
|
|
7378
7537
|
"identities.messages.4000038": "Captcha-verifiering misslyckades, f\xF6rs\xF6k igen.",
|
|
7379
7538
|
"identities.messages.1010020": "",
|
|
7380
|
-
"input.placeholder": "Ange
|
|
7539
|
+
"input.placeholder": "Ange din {placeholder}",
|
|
7381
7540
|
"card.header.description.login": "Logga in med {identifierLabel}",
|
|
7382
7541
|
"card.header.description.registration": "Registrera dig med {identifierLabel}",
|
|
7383
7542
|
"card.header.parts.code": "en kod skickad till din e-post",
|
|
@@ -7394,7 +7553,35 @@ var sv_default = {
|
|
|
7394
7553
|
"recovery.subtitle": "Ange e-postadressen kopplad till ditt konto f\xF6r att f\xE5 en eng\xE5ngskod f\xF6r \xE5tkomst",
|
|
7395
7554
|
"registration.subtitle": "Registrera dig med {parts}",
|
|
7396
7555
|
"settings.subtitle": "Uppdatera dina kontoinst\xE4llningar",
|
|
7397
|
-
"verification.subtitle": "Ange e-postadressen kopplad till ditt konto f\xF6r att verifiera det"
|
|
7556
|
+
"verification.subtitle": "Ange e-postadressen kopplad till ditt konto f\xF6r att verifiera det",
|
|
7557
|
+
"settings.totp.info.linked": "Du har f\xF6r n\xE4rvarande en autentiseringsapp kopplad.",
|
|
7558
|
+
"settings.totp.info.not-linked": "F\xF6r att aktivera, skanna QR-koden med din autentiserare och ange koden.",
|
|
7559
|
+
"settings.totp.title": "",
|
|
7560
|
+
"settings.totp.description": "L\xE4gg till en TOTP-autentiseringsapp till ditt konto f\xF6r att f\xF6rb\xE4ttra s\xE4kerheten p\xE5 ditt konto. Popul\xE4ra autentiseringsappar \xE4r LastPass och Google Authenticator.",
|
|
7561
|
+
"settings.lookup_secret.description": "\xC5terst\xE4llningskoder \xE4r en s\xE4ker backup f\xF6r 2FA, vilket g\xF6r att du kan \xE5terf\xE5 \xE5tkomst till ditt konto om du tappar bort din 2FA-enhet.",
|
|
7562
|
+
"settings.lookup_secret.title": "Backup-\xE5terst\xE4llningskoder (andra faktorn)",
|
|
7563
|
+
"settings.navigation.title": "Kontoinst\xE4llningar",
|
|
7564
|
+
"settings.oidc.description": "Anslut en social inloggningsleverant\xF6r till ditt konto.",
|
|
7565
|
+
"settings.oidc.info": "Anslutna konton fr\xE5n dessa leverant\xF6rer kan anv\xE4ndas f\xF6r att logga in p\xE5 ditt konto",
|
|
7566
|
+
"settings.oidc.title": "Anslutna konton",
|
|
7567
|
+
"settings.passkey.description": "Hantera dina l\xF6senordsinst\xE4llningar",
|
|
7568
|
+
"settings.passkey.info": "Hantera dina l\xF6senordsinst\xE4llningar",
|
|
7569
|
+
"settings.passkey.title": "Hantera l\xF6senord",
|
|
7570
|
+
"settings.password.description": "\xC4ndra ditt l\xF6senord",
|
|
7571
|
+
"settings.password.title": "\xC4ndra l\xF6senord",
|
|
7572
|
+
"settings.profile.description": "Uppdatera din profilinformation",
|
|
7573
|
+
"settings.profile.title": "Profilinst\xE4llningar",
|
|
7574
|
+
"settings.title-lookup-secret": "Hantera 2FA Backup Recovery-koder",
|
|
7575
|
+
"settings.title-navigation": "Kontoinst\xE4llningar",
|
|
7576
|
+
"settings.title-oidc": "Social logga in",
|
|
7577
|
+
"settings.title-passkey": "Hantera l\xF6senord",
|
|
7578
|
+
"settings.title-password": "\xC4ndra l\xF6senord",
|
|
7579
|
+
"settings.title-profile": "Profilinst\xE4llningar",
|
|
7580
|
+
"settings.title-totp": "Hantera 2FA TOTP Authenticator-appen",
|
|
7581
|
+
"settings.title-webauthn": "Hantera maskinvarutokens",
|
|
7582
|
+
"settings.webauthn.description": "Hantera inst\xE4llningarna f\xF6r din maskinvarutoken",
|
|
7583
|
+
"settings.webauthn.info": "H\xE5rdvarutokens anv\xE4nds f\xF6r andrafaktorsautentisering eller som f\xF6rstafaktor med l\xF6senordsnycklar",
|
|
7584
|
+
"settings.webauthn.title": "Hantera maskinvarutokens"
|
|
7398
7585
|
};
|
|
7399
7586
|
|
|
7400
7587
|
// src/locales/index.ts
|
|
@@ -7496,6 +7683,7 @@ function triggerToFunction(trigger) {
|
|
|
7496
7683
|
return triggerFn;
|
|
7497
7684
|
}
|
|
7498
7685
|
function useNodesGroups(nodes) {
|
|
7686
|
+
const groupSorter = useGroupSorter();
|
|
7499
7687
|
const groups = useMemo(() => {
|
|
7500
7688
|
var _a;
|
|
7501
7689
|
const groups2 = {};
|
|
@@ -7506,13 +7694,22 @@ function useNodesGroups(nodes) {
|
|
|
7506
7694
|
}
|
|
7507
7695
|
return groups2;
|
|
7508
7696
|
}, [nodes]);
|
|
7509
|
-
|
|
7697
|
+
const entries = useMemo(
|
|
7698
|
+
() => Object.entries(groups).sort(([a], [b]) => groupSorter(a, b)),
|
|
7699
|
+
[groups, groupSorter]
|
|
7700
|
+
);
|
|
7701
|
+
return {
|
|
7702
|
+
groups,
|
|
7703
|
+
entries
|
|
7704
|
+
};
|
|
7510
7705
|
}
|
|
7511
7706
|
var NodeInput = ({
|
|
7512
7707
|
node,
|
|
7513
7708
|
attributes
|
|
7514
7709
|
}) => {
|
|
7710
|
+
var _a;
|
|
7515
7711
|
const { Node: Node2 } = useComponents();
|
|
7712
|
+
const { setValue } = useFormContext();
|
|
7516
7713
|
const nodeType = attributes.type;
|
|
7517
7714
|
const {
|
|
7518
7715
|
onloadTrigger,
|
|
@@ -7523,9 +7720,15 @@ var NodeInput = ({
|
|
|
7523
7720
|
//
|
|
7524
7721
|
...attrs
|
|
7525
7722
|
} = attributes;
|
|
7723
|
+
const setFormValue = () => {
|
|
7724
|
+
if (attrs.value) {
|
|
7725
|
+
setValue(attrs.name, attrs.value);
|
|
7726
|
+
}
|
|
7727
|
+
};
|
|
7526
7728
|
const hasRun = useRef(false);
|
|
7527
7729
|
useEffect(
|
|
7528
7730
|
() => {
|
|
7731
|
+
setFormValue();
|
|
7529
7732
|
if (!hasRun.current && onloadTrigger) {
|
|
7530
7733
|
hasRun.current = true;
|
|
7531
7734
|
triggerToWindowCall(onloadTrigger);
|
|
@@ -7536,13 +7739,14 @@ var NodeInput = ({
|
|
|
7536
7739
|
[]
|
|
7537
7740
|
);
|
|
7538
7741
|
const handleClick = () => {
|
|
7742
|
+
setFormValue();
|
|
7539
7743
|
if (onclickTrigger) {
|
|
7540
7744
|
triggerToWindowCall(onclickTrigger);
|
|
7541
7745
|
}
|
|
7542
7746
|
};
|
|
7543
7747
|
const isSocial = (attrs.name === "provider" || attrs.name === "link") && node.group === "oidc";
|
|
7544
7748
|
const isPinCodeInput = attrs.name === "code" && node.group === "code" || attrs.name === "totp_code" && node.group === "totp";
|
|
7545
|
-
const isResend =
|
|
7749
|
+
const isResend = ((_a = node.meta.label) == null ? void 0 : _a.id) === 1070008;
|
|
7546
7750
|
switch (nodeType) {
|
|
7547
7751
|
case UiNodeInputAttributesTypeEnum.Submit:
|
|
7548
7752
|
case UiNodeInputAttributesTypeEnum.Button:
|
|
@@ -7661,8 +7865,8 @@ function OryFormSocialButtonsForm() {
|
|
|
7661
7865
|
}
|
|
7662
7866
|
return /* @__PURE__ */ jsx(OryForm, { children: /* @__PURE__ */ jsx(OryFormOidcButtons, {}) });
|
|
7663
7867
|
}
|
|
7664
|
-
function computeDefaultValues(
|
|
7665
|
-
return
|
|
7868
|
+
function computeDefaultValues(nodes) {
|
|
7869
|
+
return nodes.reduce((acc, node) => {
|
|
7666
7870
|
var _a;
|
|
7667
7871
|
if (isUiNodeInputAttributes(node.attributes)) {
|
|
7668
7872
|
if (node.attributes.name === "method") {
|
|
@@ -7710,9 +7914,9 @@ async function onSubmitLogin({ config, flow }, {
|
|
|
7710
7914
|
},
|
|
7711
7915
|
onValidationError: (body2) => {
|
|
7712
7916
|
setFlowContainer({
|
|
7917
|
+
config,
|
|
7713
7918
|
flow: body2,
|
|
7714
|
-
flowType: FlowType.Login
|
|
7715
|
-
config
|
|
7919
|
+
flowType: FlowType.Login
|
|
7716
7920
|
});
|
|
7717
7921
|
},
|
|
7718
7922
|
onRedirect
|
|
@@ -7878,13 +8082,14 @@ async function onSubmitSettings({ config, flow }, {
|
|
|
7878
8082
|
})
|
|
7879
8083
|
);
|
|
7880
8084
|
}
|
|
7881
|
-
function OryForm({ children }) {
|
|
8085
|
+
function OryForm({ children, onAfterSubmit, nodes }) {
|
|
7882
8086
|
var _a;
|
|
7883
8087
|
const { Form } = useComponents();
|
|
7884
8088
|
const flowContainer = useOryFlow();
|
|
8089
|
+
const defaultNodes = nodes ? flowContainer.flow.ui.nodes.filter((node) => node.group === UiNodeGroupEnum.Default).concat(nodes) : flowContainer.flow.ui.nodes;
|
|
7885
8090
|
const methods = useForm({
|
|
7886
8091
|
// TODO: Generify this, so we have typesafety in the submit handler.
|
|
7887
|
-
defaultValues: computeDefaultValues(
|
|
8092
|
+
defaultValues: computeDefaultValues(defaultNodes)
|
|
7888
8093
|
});
|
|
7889
8094
|
const intl = useIntl();
|
|
7890
8095
|
const onRedirect = (url, external) => {
|
|
@@ -7896,7 +8101,7 @@ function OryForm({ children }) {
|
|
|
7896
8101
|
};
|
|
7897
8102
|
const handleSuccess = (flow) => {
|
|
7898
8103
|
flowContainer.setFlowContainer(flow);
|
|
7899
|
-
methods.reset(computeDefaultValues(flow));
|
|
8104
|
+
methods.reset(computeDefaultValues(flow.flow.ui.nodes));
|
|
7900
8105
|
};
|
|
7901
8106
|
const onSubmit = async (data) => {
|
|
7902
8107
|
switch (flowContainer.flowType) {
|
|
@@ -7907,7 +8112,6 @@ function OryForm({ children }) {
|
|
|
7907
8112
|
if (submitData.method === "code" && data.code) {
|
|
7908
8113
|
submitData.resend = "";
|
|
7909
8114
|
}
|
|
7910
|
-
console.log(submitData);
|
|
7911
8115
|
await onSubmitLogin(flowContainer, {
|
|
7912
8116
|
onRedirect,
|
|
7913
8117
|
setFlowContainer: handleSuccess,
|
|
@@ -7950,14 +8154,34 @@ function OryForm({ children }) {
|
|
|
7950
8154
|
});
|
|
7951
8155
|
break;
|
|
7952
8156
|
}
|
|
7953
|
-
case FlowType.Settings:
|
|
8157
|
+
case FlowType.Settings: {
|
|
8158
|
+
const submitData = {
|
|
8159
|
+
...data
|
|
8160
|
+
};
|
|
8161
|
+
if ("totp_unlink" in submitData) {
|
|
8162
|
+
submitData.method = "totp";
|
|
8163
|
+
}
|
|
8164
|
+
if ("lookup_secret_confirm" in submitData || "lookup_secret_reveal" in submitData || "lookup_secret_regenerate" in submitData) {
|
|
8165
|
+
submitData.method = "lookup_secret";
|
|
8166
|
+
}
|
|
8167
|
+
if ("link" in submitData || "unlink" in submitData) {
|
|
8168
|
+
submitData.method = "oidc";
|
|
8169
|
+
}
|
|
8170
|
+
if ("webauthn_remove" in submitData) {
|
|
8171
|
+
submitData.method = "webauthn";
|
|
8172
|
+
}
|
|
8173
|
+
if ("passkey_remove" in submitData) {
|
|
8174
|
+
submitData.method = "passkey";
|
|
8175
|
+
}
|
|
7954
8176
|
await onSubmitSettings(flowContainer, {
|
|
7955
8177
|
onRedirect,
|
|
7956
8178
|
setFlowContainer: handleSuccess,
|
|
7957
|
-
body:
|
|
8179
|
+
body: submitData
|
|
7958
8180
|
});
|
|
7959
8181
|
break;
|
|
8182
|
+
}
|
|
7960
8183
|
}
|
|
8184
|
+
onAfterSubmit == null ? void 0 : onAfterSubmit(data.method);
|
|
7961
8185
|
};
|
|
7962
8186
|
const hasMethods = flowContainer.flow.ui.nodes.filter((node) => {
|
|
7963
8187
|
if (isUiNodeInputAttributes(node.attributes)) {
|
|
@@ -8011,6 +8235,10 @@ function OryCardValidationMessages({ ...props }) {
|
|
|
8011
8235
|
}
|
|
8012
8236
|
return /* @__PURE__ */ jsx(Message.Root, { ...props, children: messages == null ? void 0 : messages.map((message) => /* @__PURE__ */ jsx(Message.Content, { message }, message.id)) });
|
|
8013
8237
|
}
|
|
8238
|
+
function OryFormSection({ children, nodes }) {
|
|
8239
|
+
const { Card } = useComponents();
|
|
8240
|
+
return /* @__PURE__ */ jsx(OryForm, { nodes, children: /* @__PURE__ */ jsx(Card.SettingsSection, { children }) });
|
|
8241
|
+
}
|
|
8014
8242
|
function OryCardContent({ children }) {
|
|
8015
8243
|
const { Card } = useComponents();
|
|
8016
8244
|
if (children) {
|
|
@@ -8055,7 +8283,7 @@ function OryCardFooter() {
|
|
|
8055
8283
|
}
|
|
8056
8284
|
function isChoosingMethod(uiNodes) {
|
|
8057
8285
|
return uiNodes.some(
|
|
8058
|
-
(node) => "value" in node.attributes && node.attributes.value === "
|
|
8286
|
+
(node) => "name" in node.attributes && node.attributes.name === "screen" && "value" in node.attributes && node.attributes.value === "previous"
|
|
8059
8287
|
) || uiNodes.some(
|
|
8060
8288
|
(node) => node.group === UiNodeGroupEnum.IdentifierFirst && "name" in node.attributes && node.attributes.name === "identifier" && node.attributes.type === "hidden"
|
|
8061
8289
|
);
|
|
@@ -8073,6 +8301,11 @@ function getFinalNodes(uniqueGroups, selectedGroup) {
|
|
|
8073
8301
|
(node) => "type" in node.attributes && node.attributes.type === "hidden"
|
|
8074
8302
|
).concat(selectedNodes);
|
|
8075
8303
|
}
|
|
8304
|
+
|
|
8305
|
+
// src/theme/default/utils/form.ts
|
|
8306
|
+
function isGroupImmediateSubmit(group) {
|
|
8307
|
+
return group === "code";
|
|
8308
|
+
}
|
|
8076
8309
|
function OryTwoStepCard() {
|
|
8077
8310
|
var _a;
|
|
8078
8311
|
const {
|
|
@@ -8081,14 +8314,14 @@ function OryTwoStepCard() {
|
|
|
8081
8314
|
} = useOryFlow();
|
|
8082
8315
|
const choosingMethod = isChoosingMethod(ui.nodes);
|
|
8083
8316
|
const [selectedGroup, setSelectedGroup] = useState();
|
|
8084
|
-
const { Form
|
|
8317
|
+
const { Form } = useComponents();
|
|
8085
8318
|
const { flowType } = useOryFlow();
|
|
8086
8319
|
const nodeSorter = useNodeSorter();
|
|
8087
8320
|
const sortNodes = (a, b) => nodeSorter(a, b, { flowType });
|
|
8088
8321
|
const uniqueGroups = useNodesGroups(ui.nodes);
|
|
8089
8322
|
const options = Object.values(UiNodeGroupEnum).filter((group) => {
|
|
8090
8323
|
var _a2;
|
|
8091
|
-
return (_a2 = uniqueGroups[group]) == null ? void 0 : _a2.length;
|
|
8324
|
+
return (_a2 = uniqueGroups.groups[group]) == null ? void 0 : _a2.length;
|
|
8092
8325
|
}).filter(
|
|
8093
8326
|
(group) => ![
|
|
8094
8327
|
UiNodeGroupEnum.Oidc,
|
|
@@ -8097,37 +8330,61 @@ function OryTwoStepCard() {
|
|
|
8097
8330
|
UiNodeGroupEnum.Profile
|
|
8098
8331
|
].includes(group)
|
|
8099
8332
|
);
|
|
8100
|
-
const hasOidc = Boolean((_a = uniqueGroups.
|
|
8333
|
+
const hasOidc = Boolean((_a = uniqueGroups.groups[UiNodeGroupEnum.Oidc]) == null ? void 0 : _a.length);
|
|
8101
8334
|
const zeroStepGroups = filterZeroStepGroups(ui.nodes);
|
|
8102
|
-
const finalNodes = getFinalNodes(uniqueGroups, selectedGroup);
|
|
8335
|
+
const finalNodes = getFinalNodes(uniqueGroups.groups, selectedGroup);
|
|
8103
8336
|
const step = selectedGroup ? 2 /* ExecuteAuthMethod */ : choosingMethod ? 1 /* ChooseAuthMethod */ : 0 /* ProvideIdentifier */;
|
|
8104
8337
|
return /* @__PURE__ */ jsxs(OryCard, { children: [
|
|
8105
8338
|
/* @__PURE__ */ jsx(OryCardHeader, {}),
|
|
8106
8339
|
/* @__PURE__ */ jsxs(OryCardContent, { children: [
|
|
8107
8340
|
/* @__PURE__ */ jsx(OryCardValidationMessages, {}),
|
|
8108
8341
|
step === 0 /* ProvideIdentifier */ && hasOidc && /* @__PURE__ */ jsx(OryFormSocialButtonsForm, {}),
|
|
8109
|
-
/* @__PURE__ */ jsx(
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
{
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8342
|
+
/* @__PURE__ */ jsx(
|
|
8343
|
+
OryForm,
|
|
8344
|
+
{
|
|
8345
|
+
onAfterSubmit: (method) => isGroupImmediateSubmit(method + "") ? setSelectedGroup(method) : void 0,
|
|
8346
|
+
children: /* @__PURE__ */ jsxs(Form.Group, { children: [
|
|
8347
|
+
step === 0 /* ProvideIdentifier */ && zeroStepGroups.sort(sortNodes).map((node, k) => /* @__PURE__ */ jsx(Node, { node }, k)),
|
|
8348
|
+
step === 1 /* ChooseAuthMethod */ && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8349
|
+
flowType === FlowType.Login && /* @__PURE__ */ jsx(BackButton, { href: config.project.login_ui_url }),
|
|
8350
|
+
/* @__PURE__ */ jsx(
|
|
8351
|
+
AuthMethodList,
|
|
8352
|
+
{
|
|
8353
|
+
options,
|
|
8354
|
+
setSelectedGroup
|
|
8355
|
+
}
|
|
8356
|
+
)
|
|
8357
|
+
] }),
|
|
8358
|
+
step === 2 /* ExecuteAuthMethod */ && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8359
|
+
/* @__PURE__ */ jsx(BackButton, { onClick: () => setSelectedGroup(void 0) }),
|
|
8360
|
+
finalNodes.sort(sortNodes).map((node, k) => /* @__PURE__ */ jsx(Node, { node }, k))
|
|
8361
|
+
] })
|
|
8362
|
+
] })
|
|
8363
|
+
}
|
|
8364
|
+
)
|
|
8127
8365
|
] }),
|
|
8128
8366
|
/* @__PURE__ */ jsx(OryCardFooter, {})
|
|
8129
8367
|
] });
|
|
8130
8368
|
}
|
|
8369
|
+
function AuthMethodList({ options, setSelectedGroup }) {
|
|
8370
|
+
const { Card } = useComponents();
|
|
8371
|
+
const { setValue } = useFormContext();
|
|
8372
|
+
const handleClick = (group) => {
|
|
8373
|
+
if (isGroupImmediateSubmit(group)) {
|
|
8374
|
+
setValue("method", group);
|
|
8375
|
+
} else {
|
|
8376
|
+
setSelectedGroup(group);
|
|
8377
|
+
}
|
|
8378
|
+
};
|
|
8379
|
+
return options.map((option) => /* @__PURE__ */ jsx(
|
|
8380
|
+
Card.AuthMethodListItem,
|
|
8381
|
+
{
|
|
8382
|
+
group: option,
|
|
8383
|
+
onClick: () => handleClick(option)
|
|
8384
|
+
},
|
|
8385
|
+
option
|
|
8386
|
+
));
|
|
8387
|
+
}
|
|
8131
8388
|
var BackButton = ({ onClick, href }) => {
|
|
8132
8389
|
const {
|
|
8133
8390
|
flow: { ui }
|
|
@@ -8168,6 +8425,319 @@ function OryFormGroupDivider() {
|
|
|
8168
8425
|
}
|
|
8169
8426
|
return null;
|
|
8170
8427
|
}
|
|
8428
|
+
var HeadlessPageHeader = () => {
|
|
8429
|
+
const { Page } = useComponents();
|
|
8430
|
+
return /* @__PURE__ */ jsx(Page.Header, {});
|
|
8431
|
+
};
|
|
8432
|
+
var getLinkButtons = (nodes) => nodes.filter(
|
|
8433
|
+
(node) => "name" in node.attributes && node.attributes.name === "link"
|
|
8434
|
+
);
|
|
8435
|
+
var getUnlinkButtons = (nodes) => nodes.filter(
|
|
8436
|
+
(node) => "name" in node.attributes && node.attributes.name === "unlink"
|
|
8437
|
+
);
|
|
8438
|
+
function OrySettingsOidc({ nodes }) {
|
|
8439
|
+
const { Card, Form } = useComponents();
|
|
8440
|
+
const intl = useIntl();
|
|
8441
|
+
const linkButtons = getLinkButtons(nodes);
|
|
8442
|
+
const unlinkButtons = getUnlinkButtons(nodes);
|
|
8443
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8444
|
+
/* @__PURE__ */ jsx(
|
|
8445
|
+
Card.SettingsSectionContent,
|
|
8446
|
+
{
|
|
8447
|
+
title: intl.formatMessage({ id: "settings.oidc.title" }),
|
|
8448
|
+
description: intl.formatMessage({ id: "settings.oidc.description" }),
|
|
8449
|
+
children: /* @__PURE__ */ jsx(
|
|
8450
|
+
Form.OidcSettings,
|
|
8451
|
+
{
|
|
8452
|
+
linkButtons,
|
|
8453
|
+
unlinkButtons
|
|
8454
|
+
}
|
|
8455
|
+
)
|
|
8456
|
+
}
|
|
8457
|
+
),
|
|
8458
|
+
/* @__PURE__ */ jsx(Card.SettingsSectionFooter, { children: /* @__PURE__ */ jsx("span", { children: intl.formatMessage({ id: "settings.oidc.info" }) }) })
|
|
8459
|
+
] });
|
|
8460
|
+
}
|
|
8461
|
+
var getTriggerNode = (nodes) => nodes.find(
|
|
8462
|
+
(node) => "name" in node.attributes && node.attributes.name === "passkey_register_trigger"
|
|
8463
|
+
);
|
|
8464
|
+
var getSettingsNodes = (nodes) => nodes.filter(
|
|
8465
|
+
(node) => "name" in node.attributes && (node.attributes.name === "passkey_settings_register" || node.attributes.name === "passkey_create_data")
|
|
8466
|
+
);
|
|
8467
|
+
var getRemoveNodes = (nodes) => nodes.filter(
|
|
8468
|
+
(node) => "name" in node.attributes && node.attributes.name === "passkey_remove"
|
|
8469
|
+
);
|
|
8470
|
+
function OrySettingsPasskey({ nodes }) {
|
|
8471
|
+
var _a;
|
|
8472
|
+
const { Card, Form } = useComponents();
|
|
8473
|
+
const intl = useIntl();
|
|
8474
|
+
const { flow } = useOryFlow();
|
|
8475
|
+
const { groups } = useNodesGroups(flow.ui.nodes);
|
|
8476
|
+
const triggerButton = getTriggerNode(nodes);
|
|
8477
|
+
const settingsNodes = getSettingsNodes(nodes);
|
|
8478
|
+
const removeNodes = getRemoveNodes(nodes);
|
|
8479
|
+
if (!triggerButton) {
|
|
8480
|
+
return null;
|
|
8481
|
+
}
|
|
8482
|
+
const {
|
|
8483
|
+
onclick: _onClick,
|
|
8484
|
+
onclickTrigger,
|
|
8485
|
+
...triggerAttributes
|
|
8486
|
+
} = triggerButton.attributes;
|
|
8487
|
+
const onTriggerClick = () => {
|
|
8488
|
+
triggerToWindowCall(onclickTrigger);
|
|
8489
|
+
};
|
|
8490
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8491
|
+
/* @__PURE__ */ jsxs(
|
|
8492
|
+
Card.SettingsSectionContent,
|
|
8493
|
+
{
|
|
8494
|
+
title: intl.formatMessage({ id: "settings.passkey.title" }),
|
|
8495
|
+
description: intl.formatMessage({
|
|
8496
|
+
id: "settings.passkey.description"
|
|
8497
|
+
}),
|
|
8498
|
+
children: [
|
|
8499
|
+
(_a = groups.default) == null ? void 0 : _a.map((node, i) => /* @__PURE__ */ jsx(Node, { node }, `passkey-default-nodes-${i}`)),
|
|
8500
|
+
settingsNodes.map((node, i) => /* @__PURE__ */ jsx(Node, { node }, `passkey-settings-nodes-${i}`)),
|
|
8501
|
+
/* @__PURE__ */ jsx(
|
|
8502
|
+
Form.PasskeySettings,
|
|
8503
|
+
{
|
|
8504
|
+
triggerButton: {
|
|
8505
|
+
...triggerButton,
|
|
8506
|
+
attributes: triggerAttributes,
|
|
8507
|
+
onClick: onTriggerClick
|
|
8508
|
+
},
|
|
8509
|
+
removeButtons: removeNodes
|
|
8510
|
+
}
|
|
8511
|
+
)
|
|
8512
|
+
]
|
|
8513
|
+
}
|
|
8514
|
+
),
|
|
8515
|
+
/* @__PURE__ */ jsx(Card.SettingsSectionFooter, { children: /* @__PURE__ */ jsx("span", { children: intl.formatMessage({ id: "settings.passkey.info" }) }) })
|
|
8516
|
+
] });
|
|
8517
|
+
}
|
|
8518
|
+
var getRegenerateNode = (nodes) => nodes.find(
|
|
8519
|
+
(node) => "name" in node.attributes && node.attributes.name === "lookup_secret_regenerate"
|
|
8520
|
+
);
|
|
8521
|
+
var getRevealNode = (nodes) => nodes.find(
|
|
8522
|
+
(node) => "name" in node.attributes && node.attributes.name === "lookup_secret_reveal"
|
|
8523
|
+
);
|
|
8524
|
+
var getRecoveryCodes = (nodes) => nodes.find(
|
|
8525
|
+
(node) => "id" in node.attributes && node.attributes.id === "lookup_secret_codes"
|
|
8526
|
+
);
|
|
8527
|
+
function OrySettingsRecoveryCodes({
|
|
8528
|
+
nodes
|
|
8529
|
+
}) {
|
|
8530
|
+
var _a, _b;
|
|
8531
|
+
const { Card, Form } = useComponents();
|
|
8532
|
+
const intl = useIntl();
|
|
8533
|
+
const codesNode = getRecoveryCodes(nodes);
|
|
8534
|
+
const revealNode = getRevealNode(nodes);
|
|
8535
|
+
const regenerateNode = getRegenerateNode(nodes);
|
|
8536
|
+
const codesContext = (_b = (_a = codesNode == null ? void 0 : codesNode.attributes) == null ? void 0 : _a.text.context) != null ? _b : {};
|
|
8537
|
+
const secrets = codesContext.secrets ? codesContext.secrets.map((i) => i.text) : [];
|
|
8538
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8539
|
+
/* @__PURE__ */ jsx(
|
|
8540
|
+
Card.SettingsSectionContent,
|
|
8541
|
+
{
|
|
8542
|
+
title: intl.formatMessage({ id: "settings.lookup_secret.title" }),
|
|
8543
|
+
description: intl.formatMessage({
|
|
8544
|
+
id: "settings.lookup_secret.description"
|
|
8545
|
+
}),
|
|
8546
|
+
children: /* @__PURE__ */ jsx(
|
|
8547
|
+
Form.RecoveryCodesSettings,
|
|
8548
|
+
{
|
|
8549
|
+
codes: secrets,
|
|
8550
|
+
revealButton: revealNode,
|
|
8551
|
+
regnerateButton: regenerateNode
|
|
8552
|
+
}
|
|
8553
|
+
)
|
|
8554
|
+
}
|
|
8555
|
+
),
|
|
8556
|
+
/* @__PURE__ */ jsx(Card.SettingsSectionFooter, { children: nodes.filter(
|
|
8557
|
+
(node) => "type" in node.attributes && node.attributes.type === "submit" && "name" in node.attributes && node.attributes.name !== "lookup_secret_reveal" && node.attributes.name !== "lookup_secret_regenerate"
|
|
8558
|
+
).map((node, k) => /* @__PURE__ */ jsx(Node, { node }, k)) })
|
|
8559
|
+
] });
|
|
8560
|
+
}
|
|
8561
|
+
var getQrCodeNode = (nodes) => nodes.find(
|
|
8562
|
+
(node) => "id" in node.attributes && node.attributes.id === "totp_qr"
|
|
8563
|
+
);
|
|
8564
|
+
var getTotpSecretNode = (nodes) => nodes.find(
|
|
8565
|
+
(node) => "id" in node.attributes && node.attributes.id === "totp_secret_key"
|
|
8566
|
+
);
|
|
8567
|
+
var getTotpInputNode = (nodes) => nodes.find(
|
|
8568
|
+
(node) => "name" in node.attributes && node.attributes.name === "totp_code"
|
|
8569
|
+
);
|
|
8570
|
+
var getTotpUnlinkInput = (nodes) => nodes.find(
|
|
8571
|
+
(node) => "name" in node.attributes && node.attributes.name === "totp_unlink"
|
|
8572
|
+
);
|
|
8573
|
+
var getTotpLinkButton = (nodes) => nodes.find(
|
|
8574
|
+
(node) => "name" in node.attributes && node.attributes.name === "method"
|
|
8575
|
+
);
|
|
8576
|
+
function OrySettingsTotp({ nodes }) {
|
|
8577
|
+
const { Card, Form, Node: Node2 } = useComponents();
|
|
8578
|
+
const intl = useIntl();
|
|
8579
|
+
const totpUnlink = getTotpUnlinkInput(nodes);
|
|
8580
|
+
const qrNode = getQrCodeNode(nodes);
|
|
8581
|
+
const secretNode = getTotpSecretNode(nodes);
|
|
8582
|
+
const totpCodeNode = getTotpInputNode(nodes);
|
|
8583
|
+
const totpLinkButton = getTotpLinkButton(nodes);
|
|
8584
|
+
const props = {
|
|
8585
|
+
totpImage: qrNode,
|
|
8586
|
+
totpSecret: secretNode,
|
|
8587
|
+
totpInput: totpCodeNode,
|
|
8588
|
+
totpUnlink
|
|
8589
|
+
};
|
|
8590
|
+
const content = /* @__PURE__ */ jsx(Form.TotpSettings, { ...props });
|
|
8591
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8592
|
+
/* @__PURE__ */ jsx(
|
|
8593
|
+
Card.SettingsSectionContent,
|
|
8594
|
+
{
|
|
8595
|
+
title: intl.formatMessage({ id: "settings.totp.title" }),
|
|
8596
|
+
description: intl.formatMessage({ id: "settings.totp.description" }),
|
|
8597
|
+
children: content
|
|
8598
|
+
}
|
|
8599
|
+
),
|
|
8600
|
+
/* @__PURE__ */ jsxs(Card.SettingsSectionFooter, { children: [
|
|
8601
|
+
/* @__PURE__ */ jsx("span", { children: totpUnlink ? intl.formatMessage({ id: "settings.totp.info.linked" }) : intl.formatMessage({ id: "settings.totp.info.not-linked" }) }),
|
|
8602
|
+
totpLinkButton && /* @__PURE__ */ jsx(
|
|
8603
|
+
Node2.Button,
|
|
8604
|
+
{
|
|
8605
|
+
node: totpLinkButton,
|
|
8606
|
+
attributes: totpLinkButton.attributes
|
|
8607
|
+
}
|
|
8608
|
+
)
|
|
8609
|
+
] })
|
|
8610
|
+
] });
|
|
8611
|
+
}
|
|
8612
|
+
var getInputNode = (nodes) => nodes.find(
|
|
8613
|
+
(node) => "name" in node.attributes && node.attributes.name === "webauthn_register_displayname"
|
|
8614
|
+
);
|
|
8615
|
+
var getTriggerNode2 = (nodes) => nodes.find(
|
|
8616
|
+
(node) => "name" in node.attributes && node.attributes.name === "webauthn_register_trigger"
|
|
8617
|
+
);
|
|
8618
|
+
var getRemoveButtons = (nodes) => nodes.filter(
|
|
8619
|
+
(node) => "name" in node.attributes && node.attributes.name === "webauthn_remove"
|
|
8620
|
+
);
|
|
8621
|
+
var getScriptNode = (nodes) => nodes.find(
|
|
8622
|
+
(node) => "id" in node.attributes && node.attributes.id === "webauthn_script"
|
|
8623
|
+
);
|
|
8624
|
+
var getRegisterNode = (nodes) => nodes.find(
|
|
8625
|
+
(node) => "name" in node.attributes && node.attributes.name === "webauthn_register"
|
|
8626
|
+
);
|
|
8627
|
+
function OrySettingsWebauthn({ nodes }) {
|
|
8628
|
+
var _a;
|
|
8629
|
+
const { Card, Form } = useComponents();
|
|
8630
|
+
const intl = useIntl();
|
|
8631
|
+
const { flow } = useOryFlow();
|
|
8632
|
+
const { groups } = useNodesGroups(flow.ui.nodes);
|
|
8633
|
+
const triggerButton = getTriggerNode2(nodes);
|
|
8634
|
+
const inputNode = getInputNode(nodes);
|
|
8635
|
+
const removeButtons = getRemoveButtons(nodes);
|
|
8636
|
+
const scriptNode = getScriptNode(nodes);
|
|
8637
|
+
const registerNode = getRegisterNode(nodes);
|
|
8638
|
+
if (!inputNode || !triggerButton) {
|
|
8639
|
+
return null;
|
|
8640
|
+
}
|
|
8641
|
+
const {
|
|
8642
|
+
onclick: _onClick,
|
|
8643
|
+
onclickTrigger,
|
|
8644
|
+
...triggerAttributes
|
|
8645
|
+
} = triggerButton.attributes;
|
|
8646
|
+
const onTriggerClick = () => {
|
|
8647
|
+
triggerToWindowCall(onclickTrigger);
|
|
8648
|
+
};
|
|
8649
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8650
|
+
/* @__PURE__ */ jsxs(
|
|
8651
|
+
Card.SettingsSectionContent,
|
|
8652
|
+
{
|
|
8653
|
+
title: intl.formatMessage({ id: "settings.webauthn.title" }),
|
|
8654
|
+
description: intl.formatMessage({
|
|
8655
|
+
id: "settings.webauthn.description"
|
|
8656
|
+
}),
|
|
8657
|
+
children: [
|
|
8658
|
+
(_a = groups.default) == null ? void 0 : _a.map((node, i) => /* @__PURE__ */ jsx(Node, { node }, `webauthn-default-${i}`)),
|
|
8659
|
+
scriptNode && /* @__PURE__ */ jsx(Node, { node: scriptNode }),
|
|
8660
|
+
registerNode && /* @__PURE__ */ jsx(Node, { node: registerNode }),
|
|
8661
|
+
/* @__PURE__ */ jsx(
|
|
8662
|
+
Form.WebauthnSettings,
|
|
8663
|
+
{
|
|
8664
|
+
nameInput: inputNode,
|
|
8665
|
+
triggerButton: {
|
|
8666
|
+
...triggerButton,
|
|
8667
|
+
attributes: triggerAttributes,
|
|
8668
|
+
onClick: onTriggerClick
|
|
8669
|
+
},
|
|
8670
|
+
removeButtons
|
|
8671
|
+
}
|
|
8672
|
+
)
|
|
8673
|
+
]
|
|
8674
|
+
}
|
|
8675
|
+
),
|
|
8676
|
+
/* @__PURE__ */ jsx(Card.SettingsSectionFooter, { children: /* @__PURE__ */ jsx("span", { children: intl.formatMessage({ id: "settings.webauthn.info" }) }) })
|
|
8677
|
+
] });
|
|
8678
|
+
}
|
|
8679
|
+
function SettingsSectionContent({ group, nodes }) {
|
|
8680
|
+
var _a, _b, _c, _d, _e, _f;
|
|
8681
|
+
const { Card } = useComponents();
|
|
8682
|
+
const intl = useIntl();
|
|
8683
|
+
const { flow } = useOryFlow();
|
|
8684
|
+
const uniqueGroups = useNodesGroups(flow.ui.nodes);
|
|
8685
|
+
if (group === UiNodeGroupEnum.Totp) {
|
|
8686
|
+
return /* @__PURE__ */ jsx(OryFormSection, { nodes: uniqueGroups.groups.totp, children: /* @__PURE__ */ jsx(OrySettingsTotp, { nodes: (_a = uniqueGroups.groups.totp) != null ? _a : [] }) });
|
|
8687
|
+
}
|
|
8688
|
+
if (group === UiNodeGroupEnum.LookupSecret) {
|
|
8689
|
+
return /* @__PURE__ */ jsx(OryFormSection, { nodes: uniqueGroups.groups.lookup_secret, children: /* @__PURE__ */ jsx(
|
|
8690
|
+
OrySettingsRecoveryCodes,
|
|
8691
|
+
{
|
|
8692
|
+
nodes: (_b = uniqueGroups.groups.lookup_secret) != null ? _b : []
|
|
8693
|
+
}
|
|
8694
|
+
) });
|
|
8695
|
+
}
|
|
8696
|
+
if (group === UiNodeGroupEnum.Oidc) {
|
|
8697
|
+
return /* @__PURE__ */ jsx(OryFormSection, { nodes: uniqueGroups.groups.oidc, children: /* @__PURE__ */ jsx(OrySettingsOidc, { nodes: (_c = uniqueGroups.groups.oidc) != null ? _c : [] }) });
|
|
8698
|
+
}
|
|
8699
|
+
if (group === UiNodeGroupEnum.Webauthn) {
|
|
8700
|
+
return /* @__PURE__ */ jsx(OryFormSection, { nodes: uniqueGroups.groups.webauthn, children: /* @__PURE__ */ jsx(OrySettingsWebauthn, { nodes: (_d = uniqueGroups.groups.webauthn) != null ? _d : [] }) });
|
|
8701
|
+
}
|
|
8702
|
+
if (group === UiNodeGroupEnum.Passkey) {
|
|
8703
|
+
return /* @__PURE__ */ jsx(OryFormSection, { nodes: uniqueGroups.groups.passkey, children: /* @__PURE__ */ jsx(OrySettingsPasskey, { nodes: (_e = uniqueGroups.groups.passkey) != null ? _e : [] }) });
|
|
8704
|
+
}
|
|
8705
|
+
return /* @__PURE__ */ jsxs(OryFormSection, { nodes, children: [
|
|
8706
|
+
/* @__PURE__ */ jsxs(
|
|
8707
|
+
Card.SettingsSectionContent,
|
|
8708
|
+
{
|
|
8709
|
+
title: intl.formatMessage({
|
|
8710
|
+
id: `settings.${group}.title`
|
|
8711
|
+
}),
|
|
8712
|
+
description: intl.formatMessage({
|
|
8713
|
+
id: `settings.${group}.description`
|
|
8714
|
+
}),
|
|
8715
|
+
children: [
|
|
8716
|
+
(_f = uniqueGroups.groups.default) == null ? void 0 : _f.map((node, k) => /* @__PURE__ */ jsx(Node, { node }, k)),
|
|
8717
|
+
nodes.filter(
|
|
8718
|
+
(node) => "type" in node.attributes && node.attributes.type !== "submit"
|
|
8719
|
+
).map((node, k) => /* @__PURE__ */ jsx(Node, { node }, k))
|
|
8720
|
+
]
|
|
8721
|
+
}
|
|
8722
|
+
),
|
|
8723
|
+
/* @__PURE__ */ jsx(Card.SettingsSectionFooter, { children: nodes.filter(
|
|
8724
|
+
(node) => "type" in node.attributes && node.attributes.type === "submit"
|
|
8725
|
+
).map((node, k) => /* @__PURE__ */ jsx(Node, { node }, k)) })
|
|
8726
|
+
] });
|
|
8727
|
+
}
|
|
8728
|
+
function OrySettingsCard() {
|
|
8729
|
+
const { flow } = useOryFlow();
|
|
8730
|
+
const uniqueGroups = useNodesGroups(flow.ui.nodes);
|
|
8731
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8732
|
+
/* @__PURE__ */ jsx(OryCardValidationMessages, {}),
|
|
8733
|
+
uniqueGroups.entries.map(([group, nodes]) => {
|
|
8734
|
+
if (group === UiNodeGroupEnum.Default) {
|
|
8735
|
+
return null;
|
|
8736
|
+
}
|
|
8737
|
+
return /* @__PURE__ */ jsx(SettingsSectionContent, { group, nodes }, group);
|
|
8738
|
+
})
|
|
8739
|
+
] });
|
|
8740
|
+
}
|
|
8171
8741
|
|
|
8172
8742
|
// src/util/i18n/index.ts
|
|
8173
8743
|
var uiTextToFormattedMessage = ({ id, context = {}, text }, intl) => {
|
|
@@ -8273,6 +8843,6 @@ lodash/lodash.js:
|
|
|
8273
8843
|
*)
|
|
8274
8844
|
*/
|
|
8275
8845
|
|
|
8276
|
-
export { OryCard, OryCardContent, OryCardFooter, OryCardHeader, OryCardValidationMessages, OryForm, OryFormGroupDivider, OryFormGroups, OryFormOidcButtons, OryFormSocialButtonsForm, locales as OryLocales, OryProvider, OryTwoStepCard, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow, useSession };
|
|
8846
|
+
export { HeadlessPageHeader, OryCard, OryCardContent, OryCardFooter, OryCardHeader, OryCardValidationMessages, OryForm, OryFormGroupDivider, OryFormGroups, OryFormOidcButtons, OryFormSection, OryFormSocialButtonsForm, locales as OryLocales, OryProvider, OrySettingsCard, OryTwoStepCard, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow, useSession };
|
|
8277
8847
|
//# sourceMappingURL=index.mjs.map
|
|
8278
8848
|
//# sourceMappingURL=index.mjs.map
|