@ory/elements-react 1.0.0-rc.1 → 1.0.0-rc.3
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 +49 -0
- package/dist/index.d.mts +75 -43
- package/dist/index.d.ts +75 -43
- package/dist/index.js +181 -97
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +182 -100
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +9 -3
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.js +713 -547
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +698 -518
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -50,13 +50,18 @@ var defaultNodeOrder = [
|
|
|
50
50
|
];
|
|
51
51
|
function defaultNodeSorter(a, b) {
|
|
52
52
|
var _a, _b;
|
|
53
|
+
const aIsCaptcha = a.group === "captcha";
|
|
54
|
+
const bIsCaptcha = b.group === "captcha";
|
|
55
|
+
const aIsSubmit = clientFetch.isUiNodeInputAttributes(a.attributes) && a.attributes.type === "submit";
|
|
56
|
+
const bIsSubmit = clientFetch.isUiNodeInputAttributes(b.attributes) && b.attributes.type === "submit";
|
|
57
|
+
if (aIsCaptcha && bIsSubmit) {
|
|
58
|
+
return -1;
|
|
59
|
+
}
|
|
60
|
+
if (bIsCaptcha && aIsSubmit) {
|
|
61
|
+
return 1;
|
|
62
|
+
}
|
|
53
63
|
const aGroupWeight = (_a = defaultNodeOrder.indexOf(a.group)) != null ? _a : 999;
|
|
54
64
|
const bGroupWeight = (_b = defaultNodeOrder.indexOf(b.group)) != null ? _b : 999;
|
|
55
|
-
if (b.group === "captcha" && clientFetch.isUiNodeInputAttributes(a.attributes) && a.attributes.type === "submit") {
|
|
56
|
-
return aGroupWeight - (bGroupWeight - 2);
|
|
57
|
-
} else if (a.group === "captcha" && clientFetch.isUiNodeInputAttributes(b.attributes) && b.attributes.type === "submit") {
|
|
58
|
-
return aGroupWeight - 2 - bGroupWeight;
|
|
59
|
-
}
|
|
60
65
|
return aGroupWeight - bGroupWeight;
|
|
61
66
|
}
|
|
62
67
|
var defaultGroupOrder = [
|
|
@@ -403,6 +408,110 @@ function OryFlowProvider({
|
|
|
403
408
|
}
|
|
404
409
|
);
|
|
405
410
|
}
|
|
411
|
+
|
|
412
|
+
// src/client/config.ts
|
|
413
|
+
function isProduction() {
|
|
414
|
+
var _a, _b;
|
|
415
|
+
return ["production", "prod"].indexOf(
|
|
416
|
+
(_b = (_a = process.env.VERCEL_ENV) != null ? _a : process.env.NODE_ENV) != null ? _b : ""
|
|
417
|
+
) > -1;
|
|
418
|
+
}
|
|
419
|
+
function frontendClient(sdkUrl, opts = {}) {
|
|
420
|
+
const config = new clientFetch.Configuration({
|
|
421
|
+
...opts,
|
|
422
|
+
basePath: sdkUrl,
|
|
423
|
+
credentials: "include",
|
|
424
|
+
headers: {
|
|
425
|
+
Accept: "application/json",
|
|
426
|
+
...opts.headers
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
return new clientFetch.FrontendApi(config);
|
|
430
|
+
}
|
|
431
|
+
var defaultProject = {
|
|
432
|
+
name: "Ory",
|
|
433
|
+
registration_enabled: true,
|
|
434
|
+
verification_enabled: true,
|
|
435
|
+
recovery_enabled: true,
|
|
436
|
+
recovery_ui_url: "/ui/recovery",
|
|
437
|
+
registration_ui_url: "/ui/registration",
|
|
438
|
+
verification_ui_url: "/ui/verification",
|
|
439
|
+
login_ui_url: "/ui/login",
|
|
440
|
+
settings_ui_url: "/ui/settings",
|
|
441
|
+
default_redirect_url: "/ui/welcome",
|
|
442
|
+
error_ui_url: "/ui/error",
|
|
443
|
+
default_locale: "en",
|
|
444
|
+
locale_behavior: "force_default"
|
|
445
|
+
};
|
|
446
|
+
function useOryConfiguration() {
|
|
447
|
+
const configCtx = react.useContext(OryConfigurationContext);
|
|
448
|
+
return {
|
|
449
|
+
sdk: {
|
|
450
|
+
...configCtx.sdk,
|
|
451
|
+
frontend: frontendClient(configCtx.sdk.url, configCtx.sdk.options)
|
|
452
|
+
},
|
|
453
|
+
project: {
|
|
454
|
+
...configCtx.project
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
var OryConfigurationContext = react.createContext({
|
|
459
|
+
sdk: computeSdkConfig({}),
|
|
460
|
+
project: defaultProject
|
|
461
|
+
});
|
|
462
|
+
function OryConfigurationProvider({
|
|
463
|
+
children,
|
|
464
|
+
sdk: initialConfig,
|
|
465
|
+
project
|
|
466
|
+
}) {
|
|
467
|
+
const configRef = react.useRef({
|
|
468
|
+
sdk: computeSdkConfig(initialConfig),
|
|
469
|
+
project: {
|
|
470
|
+
...defaultProject,
|
|
471
|
+
...project
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
return /* @__PURE__ */ jsxRuntime.jsx(OryConfigurationContext.Provider, { value: configRef.current, children });
|
|
475
|
+
}
|
|
476
|
+
function computeSdkConfig(config) {
|
|
477
|
+
if ((config == null ? void 0 : config.url) && typeof config.url === "string") {
|
|
478
|
+
console.debug("Using sdk url from config");
|
|
479
|
+
return {
|
|
480
|
+
url: config.url.replace(/\/$/, ""),
|
|
481
|
+
options: config.options || {}
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
return {
|
|
485
|
+
url: getSDKUrl(),
|
|
486
|
+
options: (config == null ? void 0 : config.options) || {}
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
function getSDKUrl() {
|
|
490
|
+
var _a;
|
|
491
|
+
if (typeof process !== "undefined" && process.versions && process.versions.node) {
|
|
492
|
+
if (isProduction()) {
|
|
493
|
+
const sdkUrl = (_a = process.env["NEXT_PUBLIC_ORY_SDK_URL"]) != null ? _a : process.env["ORY_SDK_URL"];
|
|
494
|
+
if (!sdkUrl) {
|
|
495
|
+
throw new Error(
|
|
496
|
+
"Unable to determine SDK URL. Please set NEXT_PUBLIC_ORY_SDK_URL and/or ORY_SDK_URL in production environments."
|
|
497
|
+
);
|
|
498
|
+
}
|
|
499
|
+
return sdkUrl.replace(/\/$/, "");
|
|
500
|
+
} else {
|
|
501
|
+
if (process.env["__NEXT_PRIVATE_ORIGIN"]) {
|
|
502
|
+
return process.env["__NEXT_PRIVATE_ORIGIN"].replace(/\/$/, "");
|
|
503
|
+
} else if (process.env["VERCEL_URL"]) {
|
|
504
|
+
return `https://${process.env["VERCEL_URL"]}`.replace(/\/$/, "");
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
if (typeof window !== "undefined") {
|
|
509
|
+
return window.location.origin;
|
|
510
|
+
}
|
|
511
|
+
throw new Error(
|
|
512
|
+
"Unable to determine SDK URL. Please set NEXT_PUBLIC_ORY_SDK_URL and/or ORY_SDK_URL or supply the sdk.url parameter in the Ory configuration."
|
|
513
|
+
);
|
|
514
|
+
}
|
|
406
515
|
function mergeTranslations(customTranslations) {
|
|
407
516
|
return Object.keys(customTranslations).reduce((acc, key) => {
|
|
408
517
|
acc[key] = { ...OryLocales[key], ...customTranslations[key] };
|
|
@@ -432,17 +541,18 @@ var IntlProvider = ({
|
|
|
432
541
|
function OryProvider({
|
|
433
542
|
children,
|
|
434
543
|
components: Components,
|
|
544
|
+
config,
|
|
435
545
|
...oryFlowProps
|
|
436
546
|
}) {
|
|
437
547
|
var _a, _b, _c;
|
|
438
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
548
|
+
return /* @__PURE__ */ jsxRuntime.jsx(OryConfigurationProvider, { sdk: config.sdk, project: config.project, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
439
549
|
IntlProvider,
|
|
440
550
|
{
|
|
441
|
-
locale: (_b = (_a =
|
|
442
|
-
customTranslations: (_c =
|
|
551
|
+
locale: (_b = (_a = config.intl) == null ? void 0 : _a.locale) != null ? _b : "en",
|
|
552
|
+
customTranslations: (_c = config.intl) == null ? void 0 : _c.customTranslations,
|
|
443
553
|
children: /* @__PURE__ */ jsxRuntime.jsx(OryFlowProvider, { ...oryFlowProps, children: /* @__PURE__ */ jsxRuntime.jsx(OryComponentProvider, { components: Components, children }) })
|
|
444
554
|
}
|
|
445
|
-
);
|
|
555
|
+
) });
|
|
446
556
|
}
|
|
447
557
|
function OryCardHeader() {
|
|
448
558
|
const { Card } = useComponents();
|
|
@@ -561,17 +671,6 @@ function OryCardContent({ children }) {
|
|
|
561
671
|
const { Card } = useComponents();
|
|
562
672
|
return /* @__PURE__ */ jsxRuntime.jsx(Card.Content, { children });
|
|
563
673
|
}
|
|
564
|
-
function frontendClient(sdkUrl, opts = {}) {
|
|
565
|
-
const config = new clientFetch.Configuration({
|
|
566
|
-
...opts,
|
|
567
|
-
basePath: sdkUrl,
|
|
568
|
-
headers: {
|
|
569
|
-
Accept: "application/json",
|
|
570
|
-
...opts.headers
|
|
571
|
-
}
|
|
572
|
-
});
|
|
573
|
-
return new clientFetch.FrontendApi(config);
|
|
574
|
-
}
|
|
575
674
|
|
|
576
675
|
// src/util/internal.ts
|
|
577
676
|
function replaceWindowFlowId(flow) {
|
|
@@ -581,7 +680,7 @@ function replaceWindowFlowId(flow) {
|
|
|
581
680
|
}
|
|
582
681
|
|
|
583
682
|
// src/util/onSubmitLogin.ts
|
|
584
|
-
async function onSubmitLogin({
|
|
683
|
+
async function onSubmitLogin({ flow }, config, {
|
|
585
684
|
setFlowContainer,
|
|
586
685
|
body,
|
|
587
686
|
onRedirect
|
|
@@ -610,7 +709,6 @@ async function onSubmitLogin({ config, flow }, {
|
|
|
610
709
|
},
|
|
611
710
|
onValidationError: (body2) => {
|
|
612
711
|
setFlowContainer({
|
|
613
|
-
config,
|
|
614
712
|
flow: body2,
|
|
615
713
|
flowType: clientFetch.FlowType.Login
|
|
616
714
|
});
|
|
@@ -619,18 +717,12 @@ async function onSubmitLogin({ config, flow }, {
|
|
|
619
717
|
})
|
|
620
718
|
);
|
|
621
719
|
}
|
|
622
|
-
async function onSubmitRecovery({
|
|
720
|
+
async function onSubmitRecovery({ flow }, config, {
|
|
623
721
|
setFlowContainer,
|
|
624
722
|
body,
|
|
625
723
|
onRedirect
|
|
626
724
|
}) {
|
|
627
|
-
|
|
628
|
-
if (!config.sdk.url) {
|
|
629
|
-
throw new Error(
|
|
630
|
-
`Please supply your Ory Network SDK url to the Ory Elements configuration.`
|
|
631
|
-
);
|
|
632
|
-
}
|
|
633
|
-
await frontendClient(config.sdk.url, (_a = config.sdk.options) != null ? _a : {}).updateRecoveryFlowRaw({
|
|
725
|
+
await config.sdk.frontend.updateRecoveryFlowRaw({
|
|
634
726
|
flow: flow.id,
|
|
635
727
|
updateRecoveryFlowBody: body
|
|
636
728
|
}).then(async (res) => {
|
|
@@ -643,8 +735,7 @@ async function onSubmitRecovery({ config, flow }, {
|
|
|
643
735
|
}
|
|
644
736
|
setFlowContainer({
|
|
645
737
|
flow: flow2,
|
|
646
|
-
flowType: clientFetch.FlowType.Recovery
|
|
647
|
-
config
|
|
738
|
+
flowType: clientFetch.FlowType.Recovery
|
|
648
739
|
});
|
|
649
740
|
}).catch(
|
|
650
741
|
clientFetch.handleFlowError({
|
|
@@ -662,8 +753,7 @@ async function onSubmitRecovery({ config, flow }, {
|
|
|
662
753
|
} else {
|
|
663
754
|
setFlowContainer({
|
|
664
755
|
flow: body2,
|
|
665
|
-
flowType: clientFetch.FlowType.Recovery
|
|
666
|
-
config
|
|
756
|
+
flowType: clientFetch.FlowType.Recovery
|
|
667
757
|
});
|
|
668
758
|
}
|
|
669
759
|
},
|
|
@@ -684,19 +774,12 @@ function handleContinueWithRecoveryUIError(error, config, onRedirect) {
|
|
|
684
774
|
}
|
|
685
775
|
onRedirect(clientFetch.recoveryUrl(config), true);
|
|
686
776
|
}
|
|
687
|
-
async function onSubmitRegistration({
|
|
777
|
+
async function onSubmitRegistration({ flow }, config, {
|
|
688
778
|
setFlowContainer,
|
|
689
779
|
body,
|
|
690
780
|
onRedirect
|
|
691
781
|
}) {
|
|
692
|
-
|
|
693
|
-
if (!config.sdk.url) {
|
|
694
|
-
throw new Error(
|
|
695
|
-
`Please supply your Ory Network SDK url to the Ory Elements configuration.`
|
|
696
|
-
);
|
|
697
|
-
}
|
|
698
|
-
const client = frontendClient(config.sdk.url, (_a = config.sdk.options) != null ? _a : {});
|
|
699
|
-
await client.updateRegistrationFlowRaw({
|
|
782
|
+
await config.sdk.frontend.updateRegistrationFlowRaw({
|
|
700
783
|
flow: flow.id,
|
|
701
784
|
updateRegistrationFlowBody: body
|
|
702
785
|
}).then(async (res) => {
|
|
@@ -720,27 +803,19 @@ async function onSubmitRegistration({ config, flow }, {
|
|
|
720
803
|
onValidationError: (body2) => {
|
|
721
804
|
setFlowContainer({
|
|
722
805
|
flow: body2,
|
|
723
|
-
flowType: clientFetch.FlowType.Registration
|
|
724
|
-
config
|
|
806
|
+
flowType: clientFetch.FlowType.Registration
|
|
725
807
|
});
|
|
726
808
|
},
|
|
727
809
|
onRedirect
|
|
728
810
|
})
|
|
729
811
|
);
|
|
730
812
|
}
|
|
731
|
-
async function onSubmitSettings({
|
|
813
|
+
async function onSubmitSettings({ flow }, config, {
|
|
732
814
|
setFlowContainer,
|
|
733
815
|
body,
|
|
734
816
|
onRedirect
|
|
735
817
|
}) {
|
|
736
|
-
|
|
737
|
-
if (!config.sdk.url) {
|
|
738
|
-
throw new Error(
|
|
739
|
-
`Please supply your Ory Network SDK url to the Ory Elements configuration.`
|
|
740
|
-
);
|
|
741
|
-
}
|
|
742
|
-
const client = frontendClient(config.sdk.url, (_a = config.sdk.options) != null ? _a : {});
|
|
743
|
-
await client.updateSettingsFlowRaw({
|
|
818
|
+
await config.sdk.frontend.updateSettingsFlowRaw({
|
|
744
819
|
flow: flow.id,
|
|
745
820
|
updateSettingsFlowBody: body
|
|
746
821
|
}).then(async (res) => {
|
|
@@ -753,8 +828,7 @@ async function onSubmitSettings({ config, flow }, {
|
|
|
753
828
|
}
|
|
754
829
|
setFlowContainer({
|
|
755
830
|
flow: body2,
|
|
756
|
-
flowType: clientFetch.FlowType.Settings
|
|
757
|
-
config
|
|
831
|
+
flowType: clientFetch.FlowType.Settings
|
|
758
832
|
});
|
|
759
833
|
}).catch(
|
|
760
834
|
clientFetch.handleFlowError({
|
|
@@ -768,8 +842,7 @@ async function onSubmitSettings({ config, flow }, {
|
|
|
768
842
|
onValidationError: (body2) => {
|
|
769
843
|
setFlowContainer({
|
|
770
844
|
flow: body2,
|
|
771
|
-
flowType: clientFetch.FlowType.Settings
|
|
772
|
-
config
|
|
845
|
+
flowType: clientFetch.FlowType.Settings
|
|
773
846
|
});
|
|
774
847
|
},
|
|
775
848
|
onRedirect
|
|
@@ -786,25 +859,18 @@ async function onSubmitSettings({ config, flow }, {
|
|
|
786
859
|
}
|
|
787
860
|
});
|
|
788
861
|
}
|
|
789
|
-
async function onSubmitVerification({
|
|
862
|
+
async function onSubmitVerification({ flow }, config, {
|
|
790
863
|
setFlowContainer,
|
|
791
864
|
body,
|
|
792
865
|
onRedirect
|
|
793
866
|
}) {
|
|
794
|
-
|
|
795
|
-
if (!config.sdk.url) {
|
|
796
|
-
throw new Error(
|
|
797
|
-
`Please supply your Ory Network SDK URL to the Ory Elements configuration.`
|
|
798
|
-
);
|
|
799
|
-
}
|
|
800
|
-
await frontendClient(config.sdk.url, (_a = config.sdk.options) != null ? _a : {}).updateVerificationFlowRaw({
|
|
867
|
+
await config.sdk.frontend.updateVerificationFlowRaw({
|
|
801
868
|
flow: flow.id,
|
|
802
869
|
updateVerificationFlowBody: body
|
|
803
870
|
}).then(
|
|
804
871
|
async (res) => setFlowContainer({
|
|
805
872
|
flow: await res.value(),
|
|
806
|
-
flowType: clientFetch.FlowType.Verification
|
|
807
|
-
config
|
|
873
|
+
flowType: clientFetch.FlowType.Verification
|
|
808
874
|
})
|
|
809
875
|
).catch(
|
|
810
876
|
clientFetch.handleFlowError({
|
|
@@ -818,8 +884,7 @@ async function onSubmitVerification({ config, flow }, {
|
|
|
818
884
|
onValidationError: (body2) => {
|
|
819
885
|
setFlowContainer({
|
|
820
886
|
flow: body2,
|
|
821
|
-
flowType: clientFetch.FlowType.Verification
|
|
822
|
-
config
|
|
887
|
+
flowType: clientFetch.FlowType.Verification
|
|
823
888
|
});
|
|
824
889
|
},
|
|
825
890
|
onRedirect
|
|
@@ -832,6 +897,7 @@ var supportsSelectAccountPrompt = ["google", "github"];
|
|
|
832
897
|
function useOryFormSubmit(onAfterSubmit) {
|
|
833
898
|
const flowContainer = useOryFlow();
|
|
834
899
|
const methods = reactHookForm.useFormContext();
|
|
900
|
+
const config = useOryConfiguration();
|
|
835
901
|
const handleSuccess = (flow) => {
|
|
836
902
|
flowContainer.setFlowContainer(flow);
|
|
837
903
|
methods.reset(computeDefaultValues(flow.flow.ui.nodes));
|
|
@@ -848,7 +914,7 @@ function useOryFormSubmit(onAfterSubmit) {
|
|
|
848
914
|
if (submitData.method === "code" && data.code) {
|
|
849
915
|
submitData.resend = "";
|
|
850
916
|
}
|
|
851
|
-
await onSubmitLogin(flowContainer, {
|
|
917
|
+
await onSubmitLogin(flowContainer, config, {
|
|
852
918
|
onRedirect,
|
|
853
919
|
setFlowContainer: handleSuccess,
|
|
854
920
|
body: submitData
|
|
@@ -862,7 +928,7 @@ function useOryFormSubmit(onAfterSubmit) {
|
|
|
862
928
|
if (submitData.method === "code" && submitData.code) {
|
|
863
929
|
submitData.resend = "";
|
|
864
930
|
}
|
|
865
|
-
await onSubmitRegistration(flowContainer, {
|
|
931
|
+
await onSubmitRegistration(flowContainer, config, {
|
|
866
932
|
onRedirect,
|
|
867
933
|
setFlowContainer: handleSuccess,
|
|
868
934
|
body: submitData
|
|
@@ -870,7 +936,7 @@ function useOryFormSubmit(onAfterSubmit) {
|
|
|
870
936
|
break;
|
|
871
937
|
}
|
|
872
938
|
case clientFetch.FlowType.Verification:
|
|
873
|
-
await onSubmitVerification(flowContainer, {
|
|
939
|
+
await onSubmitVerification(flowContainer, config, {
|
|
874
940
|
onRedirect,
|
|
875
941
|
setFlowContainer: handleSuccess,
|
|
876
942
|
body: data
|
|
@@ -883,7 +949,7 @@ function useOryFormSubmit(onAfterSubmit) {
|
|
|
883
949
|
if (data.code) {
|
|
884
950
|
submitData.email = "";
|
|
885
951
|
}
|
|
886
|
-
await onSubmitRecovery(flowContainer, {
|
|
952
|
+
await onSubmitRecovery(flowContainer, config, {
|
|
887
953
|
onRedirect,
|
|
888
954
|
setFlowContainer: handleSuccess,
|
|
889
955
|
body: submitData
|
|
@@ -911,7 +977,7 @@ function useOryFormSubmit(onAfterSubmit) {
|
|
|
911
977
|
if ("passkey_remove" in submitData) {
|
|
912
978
|
submitData.method = "passkey";
|
|
913
979
|
}
|
|
914
|
-
await onSubmitSettings(flowContainer, {
|
|
980
|
+
await onSubmitSettings(flowContainer, config, {
|
|
915
981
|
onRedirect,
|
|
916
982
|
setFlowContainer: handleSuccess,
|
|
917
983
|
body: submitData
|
|
@@ -1180,7 +1246,7 @@ function OryFormOidcButtons() {
|
|
|
1180
1246
|
if (filteredNodes.length === 0) {
|
|
1181
1247
|
return null;
|
|
1182
1248
|
}
|
|
1183
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Form.OidcRoot, { nodes: filteredNodes, children: filteredNodes.map((node
|
|
1249
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Form.OidcRoot, { nodes: filteredNodes, children: filteredNodes.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1184
1250
|
Node2.OidcButton,
|
|
1185
1251
|
{
|
|
1186
1252
|
node,
|
|
@@ -1193,7 +1259,7 @@ function OryFormOidcButtons() {
|
|
|
1193
1259
|
setValue("method", node.group);
|
|
1194
1260
|
}
|
|
1195
1261
|
},
|
|
1196
|
-
|
|
1262
|
+
clientFetch.getNodeId(node)
|
|
1197
1263
|
)) });
|
|
1198
1264
|
}
|
|
1199
1265
|
function OryFormSocialButtonsForm() {
|
|
@@ -1231,7 +1297,7 @@ function OryTwoStepCardStateMethodActive({
|
|
|
1231
1297
|
onAfterSubmit: handleAfterFormSubmit(dispatchFormState),
|
|
1232
1298
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Form.Group, { children: [
|
|
1233
1299
|
ui.nodes.filter(
|
|
1234
|
-
(n) => clientFetch.isUiNodeScriptAttributes(n.attributes) || n.group === clientFetch.UiNodeGroupEnum.
|
|
1300
|
+
(n) => clientFetch.isUiNodeScriptAttributes(n.attributes) || n.group === clientFetch.UiNodeGroupEnum.Default || n.group === clientFetch.UiNodeGroupEnum.Profile
|
|
1235
1301
|
).map((node, k) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, k)),
|
|
1236
1302
|
finalNodes.sort(sortNodes).map((node, k) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, k))
|
|
1237
1303
|
] })
|
|
@@ -1410,8 +1476,8 @@ function OryFormGroups({ groups }) {
|
|
|
1410
1476
|
const { flowType } = useOryFlow();
|
|
1411
1477
|
const { Form } = useComponents();
|
|
1412
1478
|
const nodes = ui.nodes.filter((node) => groups.indexOf(node.group) > -1).sort((a, b) => nodeSorter(a, b, { flowType }));
|
|
1413
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Form.Group, { children: nodes.map((node
|
|
1414
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Node, { node },
|
|
1479
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Form.Group, { children: nodes.map((node) => {
|
|
1480
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, clientFetch.getNodeId(node));
|
|
1415
1481
|
}) });
|
|
1416
1482
|
}
|
|
1417
1483
|
function OryFormSection({
|
|
@@ -1447,7 +1513,7 @@ function OryConsentCard() {
|
|
|
1447
1513
|
/* @__PURE__ */ jsxRuntime.jsx(OryCardHeader, {}),
|
|
1448
1514
|
/* @__PURE__ */ jsxRuntime.jsx(OryCardContent, { children: /* @__PURE__ */ jsxRuntime.jsxs(OryForm, { children: [
|
|
1449
1515
|
/* @__PURE__ */ jsxRuntime.jsx(Card.Divider, {}),
|
|
1450
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form.Group, { children: flow.flow.ui.nodes.map((node
|
|
1516
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form.Group, { children: flow.flow.ui.nodes.map((node) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, clientFetch.getNodeId(node))) }),
|
|
1451
1517
|
/* @__PURE__ */ jsxRuntime.jsx(Card.Divider, {}),
|
|
1452
1518
|
/* @__PURE__ */ jsxRuntime.jsx(OryCardFooter, {})
|
|
1453
1519
|
] }) })
|
|
@@ -1818,7 +1884,7 @@ function SettingsSectionContent({ group, nodes }) {
|
|
|
1818
1884
|
"data-testid": "ory/screen/settings/group/totp",
|
|
1819
1885
|
children: [
|
|
1820
1886
|
/* @__PURE__ */ jsxRuntime.jsx(OrySettingsTotp, { nodes: (_a = groupedNodes.groups.totp) != null ? _a : [] }),
|
|
1821
|
-
(_b = groupedNodes.groups.default) == null ? void 0 : _b.map((node
|
|
1887
|
+
(_b = groupedNodes.groups.default) == null ? void 0 : _b.map((node) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, clientFetch.getNodeId(node)))
|
|
1822
1888
|
]
|
|
1823
1889
|
}
|
|
1824
1890
|
);
|
|
@@ -1836,7 +1902,7 @@ function SettingsSectionContent({ group, nodes }) {
|
|
|
1836
1902
|
nodes: (_c = groupedNodes.groups.lookup_secret) != null ? _c : []
|
|
1837
1903
|
}
|
|
1838
1904
|
),
|
|
1839
|
-
(_d = groupedNodes.groups.default) == null ? void 0 : _d.map((node
|
|
1905
|
+
(_d = groupedNodes.groups.default) == null ? void 0 : _d.map((node) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, clientFetch.getNodeId(node)))
|
|
1840
1906
|
]
|
|
1841
1907
|
}
|
|
1842
1908
|
);
|
|
@@ -1849,7 +1915,7 @@ function SettingsSectionContent({ group, nodes }) {
|
|
|
1849
1915
|
"data-testid": "ory/screen/settings/group/oidc",
|
|
1850
1916
|
children: [
|
|
1851
1917
|
/* @__PURE__ */ jsxRuntime.jsx(OrySettingsOidc, { nodes: (_e = groupedNodes.groups.oidc) != null ? _e : [] }),
|
|
1852
|
-
(_f = groupedNodes.groups.default) == null ? void 0 : _f.map((node
|
|
1918
|
+
(_f = groupedNodes.groups.default) == null ? void 0 : _f.map((node) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, clientFetch.getNodeId(node)))
|
|
1853
1919
|
]
|
|
1854
1920
|
}
|
|
1855
1921
|
);
|
|
@@ -1862,7 +1928,7 @@ function SettingsSectionContent({ group, nodes }) {
|
|
|
1862
1928
|
"data-testid": "ory/screen/settings/group/webauthn",
|
|
1863
1929
|
children: [
|
|
1864
1930
|
/* @__PURE__ */ jsxRuntime.jsx(OrySettingsWebauthn, { nodes: (_g = groupedNodes.groups.webauthn) != null ? _g : [] }),
|
|
1865
|
-
(_h = groupedNodes.groups.default) == null ? void 0 : _h.map((node
|
|
1931
|
+
(_h = groupedNodes.groups.default) == null ? void 0 : _h.map((node) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, clientFetch.getNodeId(node)))
|
|
1866
1932
|
]
|
|
1867
1933
|
}
|
|
1868
1934
|
);
|
|
@@ -1875,7 +1941,7 @@ function SettingsSectionContent({ group, nodes }) {
|
|
|
1875
1941
|
"data-testid": "ory/screen/settings/group/passkey",
|
|
1876
1942
|
children: [
|
|
1877
1943
|
/* @__PURE__ */ jsxRuntime.jsx(OrySettingsPasskey, { nodes: (_i = groupedNodes.groups.passkey) != null ? _i : [] }),
|
|
1878
|
-
(_j = groupedNodes.groups.default) == null ? void 0 : _j.map((node
|
|
1944
|
+
(_j = groupedNodes.groups.default) == null ? void 0 : _j.map((node) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, clientFetch.getNodeId(node)))
|
|
1879
1945
|
]
|
|
1880
1946
|
}
|
|
1881
1947
|
);
|
|
@@ -1896,16 +1962,16 @@ function SettingsSectionContent({ group, nodes }) {
|
|
|
1896
1962
|
id: `settings.${group}.description`
|
|
1897
1963
|
}),
|
|
1898
1964
|
children: [
|
|
1899
|
-
(_k = groupedNodes.groups.default) == null ? void 0 : _k.map((node
|
|
1965
|
+
(_k = groupedNodes.groups.default) == null ? void 0 : _k.map((node) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, clientFetch.getNodeId(node))),
|
|
1900
1966
|
nodes.filter(
|
|
1901
1967
|
(node) => "type" in node.attributes && node.attributes.type !== "submit"
|
|
1902
|
-
).map((node
|
|
1968
|
+
).map((node) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, clientFetch.getNodeId(node)))
|
|
1903
1969
|
]
|
|
1904
1970
|
}
|
|
1905
1971
|
),
|
|
1906
1972
|
/* @__PURE__ */ jsxRuntime.jsx(Card.SettingsSectionFooter, { children: nodes.filter(
|
|
1907
1973
|
(node) => "type" in node.attributes && node.attributes.type === "submit"
|
|
1908
|
-
).map((node
|
|
1974
|
+
).map((node) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, clientFetch.getNodeId(node))) })
|
|
1909
1975
|
]
|
|
1910
1976
|
}
|
|
1911
1977
|
);
|
|
@@ -1919,7 +1985,7 @@ function OrySettingsCard() {
|
|
|
1919
1985
|
const scriptNodes = onlyScriptNodes(flow.ui.nodes);
|
|
1920
1986
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1921
1987
|
/* @__PURE__ */ jsxRuntime.jsx(OryCardValidationMessages, {}),
|
|
1922
|
-
scriptNodes.map((n) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node: n })),
|
|
1988
|
+
scriptNodes.map((n) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node: n }, clientFetch.getNodeId(n))),
|
|
1923
1989
|
uniqueGroups.entries.map(([group, nodes]) => {
|
|
1924
1990
|
if (group === clientFetch.UiNodeGroupEnum.Default) {
|
|
1925
1991
|
return null;
|
|
@@ -2226,9 +2292,11 @@ var en_default = {
|
|
|
2226
2292
|
"card.header.parts.oidc": "a social provider",
|
|
2227
2293
|
"card.header.parts.password.registration": "your {identifierLabel} and a password",
|
|
2228
2294
|
"card.header.parts.password.login": "your {identifierLabel} and password",
|
|
2229
|
-
"card.header.parts.code": "a code sent to
|
|
2295
|
+
"card.header.parts.code": "a code sent to you",
|
|
2230
2296
|
"card.header.parts.passkey": "a Passkey",
|
|
2231
2297
|
"card.header.parts.webauthn": "a security key",
|
|
2298
|
+
"card.header.parts.totp": "your authenticator app",
|
|
2299
|
+
"card.header.parts.lookup_secret": "a backup recovery code",
|
|
2232
2300
|
"card.header.parts.identifier-first": "your {identifierLabel}",
|
|
2233
2301
|
"card.header.description.login": "Sign in with {identifierLabel}",
|
|
2234
2302
|
"card.header.description.registration": "Sign up with {identifierLabel}",
|
|
@@ -2476,13 +2544,15 @@ var de_default = {
|
|
|
2476
2544
|
"identities.messages.4010009": "Die Authentifizierungsmethode stimmt nicht mit der vorherigen Authentifizierungsmethode \xFCberein. Bitte versuchen Sie es erneut.",
|
|
2477
2545
|
"identities.messages.4010010": "Die eingegebene Adresse stimmt nicht mit der Adresse \xFCberein, die Sie bei der Registrierung angegeben haben. Bitte versuchen Sie es erneut.",
|
|
2478
2546
|
"input.placeholder": "{placeholder} eingeben",
|
|
2479
|
-
"card.header.parts.code": "
|
|
2547
|
+
"card.header.parts.code": "ein an Sie gesendeter Code",
|
|
2480
2548
|
"card.header.parts.identifier-first": "Ihr {identifierLabel}",
|
|
2481
2549
|
"card.header.parts.oidc": "ein sozialer Anbieter",
|
|
2482
2550
|
"card.header.parts.passkey": "ein Passkey",
|
|
2483
2551
|
"card.header.parts.password.login": "Ihrer {identifierLabel} und Ihrem Passwort",
|
|
2484
2552
|
"card.header.parts.password.registration": "Ihrer {identifierLabel} und einem Passwort",
|
|
2485
2553
|
"card.header.parts.webauthn": "ein Sicherheitsschl\xFCssel",
|
|
2554
|
+
"card.header.parts.totp": "deine Authentifikator-App",
|
|
2555
|
+
"card.header.parts.lookup_secret": "ein Backup-Wiederherstellungscode",
|
|
2486
2556
|
"recovery.subtitle": "Geben Sie die mit Ihrem Konto verkn\xFCpfte E-Mail-Adresse ein, um einen einmaligen Zugangscode zu erhalten",
|
|
2487
2557
|
"verification.subtitle": "Geben Sie die mit Ihrem Konto verkn\xFCpfte E-Mail-Adresse ein, um es zu best\xE4tigen",
|
|
2488
2558
|
"card.header.description.login": "Melden Sie sich mit {identifierLabel} an",
|
|
@@ -2821,6 +2891,8 @@ var es_default = {
|
|
|
2821
2891
|
"card.header.parts.code": "un c\xF3digo enviado a tu correo electr\xF3nico",
|
|
2822
2892
|
"card.header.parts.passkey": "una clave de acceso",
|
|
2823
2893
|
"card.header.parts.webauthn": "una clave de seguridad",
|
|
2894
|
+
"card.header.parts.totp": "su aplicaci\xF3n de autenticaci\xF3n",
|
|
2895
|
+
"card.header.parts.lookup_secret": "un c\xF3digo de recuperaci\xF3n de copia de seguridad",
|
|
2824
2896
|
"card.header.parts.identifier-first": "tu {identifierLabel}",
|
|
2825
2897
|
"card.header.description.login": "Iniciar sesi\xF3n con {identifierLabel}",
|
|
2826
2898
|
"card.header.description.registration": "Registrarse con {identifierLabel}",
|
|
@@ -3098,10 +3170,12 @@ var fr_default = {
|
|
|
3098
3170
|
"card.header.parts.oidc": "un fournisseur de r\xE9seaux sociaux",
|
|
3099
3171
|
"card.header.parts.password.registration": "votre {identifierLabel} et un mot de passe",
|
|
3100
3172
|
"card.header.parts.password.login": "votre {identifierLabel} et votre mot de passe",
|
|
3101
|
-
"card.header.parts.code": "un code envoy\xE9 \xE0 votre adresse e-mail",
|
|
3102
3173
|
"card.header.parts.passkey": "une cl\xE9 d'acc\xE8s",
|
|
3103
3174
|
"card.header.parts.webauthn": "une cl\xE9 de s\xE9curit\xE9",
|
|
3104
3175
|
"card.header.parts.identifier-first": "votre {identifierLabel}",
|
|
3176
|
+
"card.header.parts.code": "un code qui vous a \xE9t\xE9 envoy\xE9",
|
|
3177
|
+
"card.header.parts.totp": "votre application d'authentification",
|
|
3178
|
+
"card.header.parts.lookup_secret": "un code de r\xE9cup\xE9ration de secours",
|
|
3105
3179
|
"card.header.description.login": "Se connecter avec {identifierLabel}",
|
|
3106
3180
|
"card.header.description.registration": "S'inscrire avec {identifierLabel}",
|
|
3107
3181
|
"misc.or": "ou",
|
|
@@ -3344,7 +3418,9 @@ var nl_default = {
|
|
|
3344
3418
|
"input.placeholder": "",
|
|
3345
3419
|
"card.header.description.login": "",
|
|
3346
3420
|
"card.header.description.registration": "",
|
|
3347
|
-
"card.header.parts.code": "",
|
|
3421
|
+
"card.header.parts.code": "een code die naar je is verzonden",
|
|
3422
|
+
"card.header.parts.totp": "je authenticator-app",
|
|
3423
|
+
"card.header.parts.lookup_secret": "een backup herstelcode",
|
|
3348
3424
|
"card.header.parts.identifier-first": "",
|
|
3349
3425
|
"card.header.parts.oidc": "",
|
|
3350
3426
|
"card.header.parts.passkey": "",
|
|
@@ -3629,13 +3705,15 @@ var pl_default = {
|
|
|
3629
3705
|
"input.placeholder": "",
|
|
3630
3706
|
"card.header.description.login": "",
|
|
3631
3707
|
"card.header.description.registration": "",
|
|
3632
|
-
"card.header.parts.code": "",
|
|
3633
3708
|
"card.header.parts.identifier-first": "",
|
|
3634
3709
|
"card.header.parts.oidc": "",
|
|
3635
3710
|
"card.header.parts.passkey": "",
|
|
3636
3711
|
"card.header.parts.password.login": "",
|
|
3637
3712
|
"card.header.parts.password.registration": "",
|
|
3638
3713
|
"card.header.parts.webauthn": "",
|
|
3714
|
+
"card.header.parts.code": "kod wys\u0142any do Ciebie",
|
|
3715
|
+
"card.header.parts.totp": "Twoja aplikacja uwierzytelniaj\u0105ca",
|
|
3716
|
+
"card.header.parts.lookup_secret": "kod odzyskiwania kopii zapasowej",
|
|
3639
3717
|
"forms.label.forgot-password": "",
|
|
3640
3718
|
"login.subtitle": "",
|
|
3641
3719
|
"login.subtitle-refresh": "",
|
|
@@ -3914,7 +3992,9 @@ var pt_default = {
|
|
|
3914
3992
|
"input.placeholder": "",
|
|
3915
3993
|
"card.header.description.login": "",
|
|
3916
3994
|
"card.header.description.registration": "",
|
|
3917
|
-
"card.header.parts.code": "",
|
|
3995
|
+
"card.header.parts.code": "um c\xF3digo enviado para voc\xEA",
|
|
3996
|
+
"card.header.parts.totp": "seu aplicativo autenticador",
|
|
3997
|
+
"card.header.parts.lookup_secret": "um c\xF3digo de recupera\xE7\xE3o de backup",
|
|
3918
3998
|
"card.header.parts.identifier-first": "",
|
|
3919
3999
|
"card.header.parts.oidc": "",
|
|
3920
4000
|
"card.header.parts.passkey": "",
|
|
@@ -4199,7 +4279,9 @@ var sv_default = {
|
|
|
4199
4279
|
"input.placeholder": "Ange din {placeholder}",
|
|
4200
4280
|
"card.header.description.login": "Logga in med {identifierLabel}",
|
|
4201
4281
|
"card.header.description.registration": "Registrera dig med {identifierLabel}",
|
|
4202
|
-
"card.header.parts.code": "en kod skickad till
|
|
4282
|
+
"card.header.parts.code": "en kod skickad till dig",
|
|
4283
|
+
"card.header.parts.totp": "din autentiseringsapp",
|
|
4284
|
+
"card.header.parts.lookup_secret": "en s\xE4kerhetskopieringskod",
|
|
4203
4285
|
"card.header.parts.identifier-first": "din {identifierLabel}",
|
|
4204
4286
|
"card.header.parts.oidc": "en social leverant\xF6r",
|
|
4205
4287
|
"card.header.parts.passkey": "en Passkey",
|
|
@@ -4290,6 +4372,7 @@ exports.OryCardContent = OryCardContent;
|
|
|
4290
4372
|
exports.OryCardFooter = OryCardFooter;
|
|
4291
4373
|
exports.OryCardHeader = OryCardHeader;
|
|
4292
4374
|
exports.OryCardValidationMessages = OryCardValidationMessages;
|
|
4375
|
+
exports.OryConfigurationProvider = OryConfigurationProvider;
|
|
4293
4376
|
exports.OryConsentCard = OryConsentCard;
|
|
4294
4377
|
exports.OryForm = OryForm;
|
|
4295
4378
|
exports.OryFormGroupDivider = OryFormGroupDivider;
|
|
@@ -4305,6 +4388,7 @@ exports.messageTestId = messageTestId;
|
|
|
4305
4388
|
exports.uiTextToFormattedMessage = uiTextToFormattedMessage;
|
|
4306
4389
|
exports.useComponents = useComponents;
|
|
4307
4390
|
exports.useNodeSorter = useNodeSorter;
|
|
4391
|
+
exports.useOryConfiguration = useOryConfiguration;
|
|
4308
4392
|
exports.useOryFlow = useOryFlow;
|
|
4309
4393
|
//# sourceMappingURL=index.js.map
|
|
4310
4394
|
//# sourceMappingURL=index.js.map
|