@ory/elements-react 1.0.0-next.33 → 1.0.0-next.34
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 +10 -0
- package/dist/theme/default/index.js +51 -338
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +65 -399
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -154,13 +154,6 @@ var ComponentContext = (0, import_react.createContext)({
|
|
|
154
154
|
nodeSorter: () => 0,
|
|
155
155
|
groupSorter: () => 0
|
|
156
156
|
});
|
|
157
|
-
function useComponents() {
|
|
158
|
-
const ctx = (0, import_react.useContext)(ComponentContext);
|
|
159
|
-
if (!ctx) {
|
|
160
|
-
throw new Error("useComponents must be used within a ComponentProvider");
|
|
161
|
-
}
|
|
162
|
-
return ctx.components;
|
|
163
|
-
}
|
|
164
157
|
var defaultGroupOrder = [
|
|
165
158
|
import_client_fetch.UiNodeGroupEnum.Default,
|
|
166
159
|
import_client_fetch.UiNodeGroupEnum.Profile,
|
|
@@ -174,54 +167,6 @@ var defaultGroupOrder = [
|
|
|
174
167
|
];
|
|
175
168
|
|
|
176
169
|
// src/util/ui/index.ts
|
|
177
|
-
function triggerToWindowCall(trigger) {
|
|
178
|
-
if (!trigger) {
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
const fn = triggerToFunction(trigger);
|
|
182
|
-
if (fn) {
|
|
183
|
-
fn();
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
let i = 0;
|
|
187
|
-
const ms = 100;
|
|
188
|
-
const interval = setInterval(() => {
|
|
189
|
-
i++;
|
|
190
|
-
if (i > 100) {
|
|
191
|
-
clearInterval(interval);
|
|
192
|
-
throw new Error(
|
|
193
|
-
"Unable to load Ory's WebAuthn script. Is it being blocked or otherwise failing to load? If you are running an old version of Ory Elements, please upgrade. For more information, please check your browser's developer console."
|
|
194
|
-
);
|
|
195
|
-
}
|
|
196
|
-
const fn2 = triggerToFunction(trigger);
|
|
197
|
-
if (fn2) {
|
|
198
|
-
clearInterval(interval);
|
|
199
|
-
return fn2();
|
|
200
|
-
}
|
|
201
|
-
}, ms);
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
function triggerToFunction(trigger) {
|
|
205
|
-
if (typeof window === "undefined") {
|
|
206
|
-
console.debug(
|
|
207
|
-
"The Ory SDK is missing a required function: window is undefined."
|
|
208
|
-
);
|
|
209
|
-
return void 0;
|
|
210
|
-
}
|
|
211
|
-
const typedWindow = window;
|
|
212
|
-
if (!(trigger in typedWindow) || !typedWindow[trigger]) {
|
|
213
|
-
console.debug(`The Ory SDK is missing a required function: ${trigger}.`);
|
|
214
|
-
return void 0;
|
|
215
|
-
}
|
|
216
|
-
const triggerFn = typedWindow[trigger];
|
|
217
|
-
if (typeof triggerFn !== "function") {
|
|
218
|
-
console.debug(
|
|
219
|
-
`The Ory SDK is missing a required function: ${trigger}. It is not a function.`
|
|
220
|
-
);
|
|
221
|
-
return void 0;
|
|
222
|
-
}
|
|
223
|
-
return triggerFn;
|
|
224
|
-
}
|
|
225
170
|
function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
|
|
226
171
|
var _a;
|
|
227
172
|
const groups = {};
|
|
@@ -2265,11 +2210,11 @@ function DefaultSettingsPasskey({
|
|
|
2265
2210
|
const {
|
|
2266
2211
|
formState: { isSubmitting }
|
|
2267
2212
|
} = (0, import_react_hook_form9.useFormContext)();
|
|
2268
|
-
const { Node
|
|
2213
|
+
const { Node } = (0, import_elements_react16.useComponents)();
|
|
2269
2214
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
2270
2215
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
2271
2216
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2272
|
-
|
|
2217
|
+
Node.Button,
|
|
2273
2218
|
{
|
|
2274
2219
|
node: triggerButton,
|
|
2275
2220
|
attributes: triggerButton.attributes,
|
|
@@ -2467,7 +2412,7 @@ function DefaultSettingsTotp({
|
|
|
2467
2412
|
totpUnlink,
|
|
2468
2413
|
onUnlink
|
|
2469
2414
|
}) {
|
|
2470
|
-
const { Node
|
|
2415
|
+
const { Node, Card } = (0, import_elements_react17.useComponents)();
|
|
2471
2416
|
const {
|
|
2472
2417
|
formState: { isSubmitting }
|
|
2473
2418
|
} = (0, import_react_hook_form11.useFormContext)();
|
|
@@ -2507,7 +2452,7 @@ function DefaultSettingsTotp({
|
|
|
2507
2452
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
2508
2453
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DefaultHorizontalDivider, {}) }),
|
|
2509
2454
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2510
|
-
|
|
2455
|
+
Node.Image,
|
|
2511
2456
|
{
|
|
2512
2457
|
node: totpImage,
|
|
2513
2458
|
attributes: {
|
|
@@ -2517,12 +2462,12 @@ function DefaultSettingsTotp({
|
|
|
2517
2462
|
) }) }) }),
|
|
2518
2463
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
2519
2464
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2520
|
-
|
|
2465
|
+
Node.Label,
|
|
2521
2466
|
{
|
|
2522
2467
|
node: totpSecret,
|
|
2523
2468
|
attributes: totpSecret.attributes,
|
|
2524
2469
|
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2525
|
-
|
|
2470
|
+
Node.Input,
|
|
2526
2471
|
{
|
|
2527
2472
|
node: totpSecret,
|
|
2528
2473
|
attributes: {
|
|
@@ -2537,12 +2482,12 @@ function DefaultSettingsTotp({
|
|
|
2537
2482
|
}
|
|
2538
2483
|
),
|
|
2539
2484
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2540
|
-
|
|
2485
|
+
Node.Label,
|
|
2541
2486
|
{
|
|
2542
2487
|
attributes: totpInput.attributes,
|
|
2543
2488
|
node: totpInput,
|
|
2544
2489
|
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2545
|
-
|
|
2490
|
+
Node.CodeInput,
|
|
2546
2491
|
{
|
|
2547
2492
|
node: totpInput,
|
|
2548
2493
|
attributes: totpInput.attributes
|
|
@@ -2578,17 +2523,17 @@ function DefaultSettingsWebauthn({
|
|
|
2578
2523
|
const {
|
|
2579
2524
|
formState: { isSubmitting }
|
|
2580
2525
|
} = (0, import_react_hook_form12.useFormContext)();
|
|
2581
|
-
const { Node
|
|
2526
|
+
const { Node, Card } = (0, import_elements_react18.useComponents)();
|
|
2582
2527
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
2583
2528
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
2584
2529
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
|
|
2585
2530
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2586
|
-
|
|
2531
|
+
Node.Label,
|
|
2587
2532
|
{
|
|
2588
2533
|
node: nameInput,
|
|
2589
2534
|
attributes: nameInput.attributes,
|
|
2590
2535
|
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2591
|
-
|
|
2536
|
+
Node.Input,
|
|
2592
2537
|
{
|
|
2593
2538
|
node: nameInput,
|
|
2594
2539
|
attributes: nameInput.attributes
|
|
@@ -2597,7 +2542,7 @@ function DefaultSettingsWebauthn({
|
|
|
2597
2542
|
}
|
|
2598
2543
|
) }),
|
|
2599
2544
|
triggerButton ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2600
|
-
|
|
2545
|
+
Node.Button,
|
|
2601
2546
|
{
|
|
2602
2547
|
node: triggerButton,
|
|
2603
2548
|
attributes: triggerButton.attributes,
|
|
@@ -2671,258 +2616,26 @@ function DefaultAuthMethodListContainer({
|
|
|
2671
2616
|
}
|
|
2672
2617
|
|
|
2673
2618
|
// src/theme/default/components/form/captcha.tsx
|
|
2674
|
-
var
|
|
2619
|
+
var import_client_fetch14 = require("@ory/client-fetch");
|
|
2675
2620
|
var import_react_turnstile = require("@marsidev/react-turnstile");
|
|
2676
|
-
var import_react14 = require("react");
|
|
2677
|
-
var import_react_hook_form25 = require("react-hook-form");
|
|
2678
|
-
|
|
2679
|
-
// src/context/flow-context.tsx
|
|
2680
|
-
var import_react12 = require("react");
|
|
2681
|
-
|
|
2682
|
-
// src/context/form-state.ts
|
|
2683
|
-
var import_client_fetch15 = require("@ory/client-fetch");
|
|
2684
2621
|
var import_react11 = require("react");
|
|
2685
|
-
|
|
2686
|
-
// src/components/card/card-two-step.utils.ts
|
|
2687
|
-
var import_client_fetch14 = require("@ory/client-fetch");
|
|
2688
|
-
|
|
2689
|
-
// src/context/flow-context.tsx
|
|
2690
|
-
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2691
|
-
var OryFlowContext = (0, import_react12.createContext)(null);
|
|
2692
|
-
|
|
2693
|
-
// src/context/intl-context.tsx
|
|
2694
|
-
var import_react_intl20 = require("react-intl");
|
|
2695
|
-
|
|
2696
|
-
// src/components/card/header.tsx
|
|
2697
|
-
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2698
|
-
|
|
2699
|
-
// src/components/form/form-provider.tsx
|
|
2700
|
-
var import_client_fetch18 = require("@ory/client-fetch");
|
|
2701
2622
|
var import_react_hook_form13 = require("react-hook-form");
|
|
2702
|
-
|
|
2703
|
-
// src/components/form/form-helpers.ts
|
|
2704
|
-
var import_client_fetch16 = require("@ory/client-fetch");
|
|
2705
|
-
|
|
2706
|
-
// src/components/form/form-resolver.ts
|
|
2707
|
-
var import_client_fetch17 = require("@ory/client-fetch");
|
|
2708
|
-
|
|
2709
|
-
// src/components/form/form-provider.tsx
|
|
2710
|
-
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
2711
|
-
|
|
2712
|
-
// src/components/card/card.tsx
|
|
2713
|
-
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
2714
|
-
|
|
2715
|
-
// src/components/card/footer.tsx
|
|
2716
|
-
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
2717
|
-
|
|
2718
|
-
// src/components/card/content.tsx
|
|
2719
|
-
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
2720
|
-
|
|
2721
|
-
// src/components/card/card-two-step.tsx
|
|
2722
|
-
var import_client_fetch27 = require("@ory/client-fetch");
|
|
2723
|
-
var import_react_hook_form17 = require("react-hook-form");
|
|
2724
|
-
|
|
2725
|
-
// src/components/form/form.tsx
|
|
2726
|
-
var import_client_fetch25 = require("@ory/client-fetch");
|
|
2727
|
-
var import_react_hook_form15 = require("react-hook-form");
|
|
2728
|
-
var import_react_intl13 = require("react-intl");
|
|
2729
|
-
|
|
2730
|
-
// src/components/form/useOryFormSubmit.ts
|
|
2731
|
-
var import_client_fetch24 = require("@ory/client-fetch");
|
|
2732
|
-
var import_react_hook_form14 = require("react-hook-form");
|
|
2733
|
-
|
|
2734
|
-
// src/util/onSubmitLogin.ts
|
|
2735
|
-
var import_client_fetch19 = require("@ory/client-fetch");
|
|
2736
|
-
|
|
2737
|
-
// src/util/onSubmitRecovery.ts
|
|
2738
|
-
var import_client_fetch20 = require("@ory/client-fetch");
|
|
2739
|
-
|
|
2740
|
-
// src/util/onSubmitRegistration.ts
|
|
2741
|
-
var import_client_fetch21 = require("@ory/client-fetch");
|
|
2742
|
-
|
|
2743
|
-
// src/util/onSubmitSettings.ts
|
|
2744
|
-
var import_client_fetch22 = require("@ory/client-fetch");
|
|
2745
|
-
|
|
2746
|
-
// src/util/onSubmitVerification.ts
|
|
2747
|
-
var import_client_fetch23 = require("@ory/client-fetch");
|
|
2748
|
-
|
|
2749
|
-
// src/components/form/form.tsx
|
|
2750
|
-
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
2751
|
-
|
|
2752
|
-
// src/components/form/messages.tsx
|
|
2753
|
-
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
2754
|
-
|
|
2755
|
-
// src/components/form/nodes/node.tsx
|
|
2756
|
-
var import_client_fetch26 = require("@ory/client-fetch");
|
|
2757
|
-
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
2758
|
-
|
|
2759
|
-
// src/components/form/social.tsx
|
|
2760
|
-
var import_react_hook_form16 = require("react-hook-form");
|
|
2761
|
-
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
2762
|
-
|
|
2763
|
-
// src/components/card/card-two-step.tsx
|
|
2764
|
-
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
2765
|
-
|
|
2766
|
-
// src/components/form/groups.tsx
|
|
2767
|
-
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
2768
|
-
|
|
2769
|
-
// src/components/form/section.tsx
|
|
2770
|
-
var import_react_hook_form18 = require("react-hook-form");
|
|
2771
|
-
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
2772
|
-
|
|
2773
|
-
// src/components/generic/divider.tsx
|
|
2774
|
-
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
2775
|
-
|
|
2776
|
-
// src/components/generic/page-header.tsx
|
|
2777
|
-
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
2778
|
-
|
|
2779
|
-
// src/components/settings/settings-card.tsx
|
|
2780
|
-
var import_client_fetch28 = require("@ory/client-fetch");
|
|
2781
|
-
var import_react_intl19 = require("react-intl");
|
|
2782
|
-
|
|
2783
|
-
// src/components/settings/oidc-settings.tsx
|
|
2784
|
-
var import_react_intl14 = require("react-intl");
|
|
2785
|
-
var import_react_hook_form19 = require("react-hook-form");
|
|
2786
|
-
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
2787
|
-
|
|
2788
|
-
// src/components/settings/passkey-settings.tsx
|
|
2789
|
-
var import_react_hook_form20 = require("react-hook-form");
|
|
2790
|
-
var import_react_intl15 = require("react-intl");
|
|
2791
|
-
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
2792
|
-
|
|
2793
|
-
// src/components/settings/recovery-codes-settings.tsx
|
|
2794
|
-
var import_react_intl16 = require("react-intl");
|
|
2795
|
-
var import_react_hook_form21 = require("react-hook-form");
|
|
2796
|
-
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
2797
|
-
|
|
2798
|
-
// src/components/settings/totp-settings.tsx
|
|
2799
|
-
var import_react_hook_form22 = require("react-hook-form");
|
|
2800
|
-
var import_react_intl17 = require("react-intl");
|
|
2801
|
-
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
2802
|
-
|
|
2803
|
-
// src/components/settings/webauthn-settings.tsx
|
|
2804
|
-
var import_react_hook_form23 = require("react-hook-form");
|
|
2805
|
-
var import_react_intl18 = require("react-intl");
|
|
2806
|
-
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
2807
|
-
|
|
2808
|
-
// src/components/settings/settings-card.tsx
|
|
2809
|
-
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
2810
|
-
|
|
2811
|
-
// src/context/intl-context.tsx
|
|
2812
|
-
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
2813
|
-
|
|
2814
|
-
// src/context/provider.tsx
|
|
2815
|
-
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
2816
|
-
|
|
2817
|
-
// src/components/form/nodes/input.tsx
|
|
2818
|
-
var import_client_fetch29 = require("@ory/client-fetch");
|
|
2819
|
-
var import_react13 = require("react");
|
|
2820
|
-
var import_react_hook_form24 = require("react-hook-form");
|
|
2821
|
-
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
2822
|
-
var NodeInput = ({
|
|
2823
|
-
node,
|
|
2824
|
-
attributes
|
|
2825
|
-
}) => {
|
|
2826
|
-
var _a;
|
|
2827
|
-
const { Node: Node2 } = useComponents();
|
|
2828
|
-
const { setValue } = (0, import_react_hook_form24.useFormContext)();
|
|
2829
|
-
const {
|
|
2830
|
-
onloadTrigger,
|
|
2831
|
-
onclickTrigger,
|
|
2832
|
-
// These properties do not exist on input fields so we remove them (as we already have handled them).
|
|
2833
|
-
onclick: _ignoredOnclick,
|
|
2834
|
-
onload: _ignoredOnload,
|
|
2835
|
-
//
|
|
2836
|
-
...attrs
|
|
2837
|
-
} = attributes;
|
|
2838
|
-
const isResendNode = ((_a = node.meta.label) == null ? void 0 : _a.id) === 1070008;
|
|
2839
|
-
const isScreenSelectionNode = "name" in node.attributes && node.attributes.name === "screen";
|
|
2840
|
-
const setFormValue = () => {
|
|
2841
|
-
if (attrs.value && !(isResendNode || isScreenSelectionNode)) {
|
|
2842
|
-
setValue(attrs.name, attrs.value);
|
|
2843
|
-
}
|
|
2844
|
-
};
|
|
2845
|
-
const hasRun = (0, import_react13.useRef)(false);
|
|
2846
|
-
(0, import_react13.useEffect)(
|
|
2847
|
-
() => {
|
|
2848
|
-
setFormValue();
|
|
2849
|
-
if (!hasRun.current && onloadTrigger) {
|
|
2850
|
-
hasRun.current = true;
|
|
2851
|
-
triggerToWindowCall(onloadTrigger);
|
|
2852
|
-
}
|
|
2853
|
-
},
|
|
2854
|
-
// TODO(jonas): make sure onloadTrigger is stable
|
|
2855
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps -- ignore onloadTrigger for now, until we make sure this is stable
|
|
2856
|
-
[]
|
|
2857
|
-
);
|
|
2858
|
-
const handleClick = () => {
|
|
2859
|
-
setFormValue();
|
|
2860
|
-
if (onclickTrigger) {
|
|
2861
|
-
triggerToWindowCall(onclickTrigger);
|
|
2862
|
-
}
|
|
2863
|
-
};
|
|
2864
|
-
const isSocial = (attrs.name === "provider" || attrs.name === "link") && node.group === "oidc";
|
|
2865
|
-
const isPinCodeInput = attrs.name === "code" && node.group === "code" || attrs.name === "totp_code" && node.group === "totp";
|
|
2866
|
-
switch (attributes.type) {
|
|
2867
|
-
case import_client_fetch29.UiNodeInputAttributesTypeEnum.Submit:
|
|
2868
|
-
case import_client_fetch29.UiNodeInputAttributesTypeEnum.Button:
|
|
2869
|
-
if (isSocial) {
|
|
2870
|
-
return null;
|
|
2871
|
-
}
|
|
2872
|
-
if (isResendNode || isScreenSelectionNode) {
|
|
2873
|
-
return null;
|
|
2874
|
-
}
|
|
2875
|
-
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
2876
|
-
Node2.Label,
|
|
2877
|
-
{
|
|
2878
|
-
attributes: { ...attrs, label: void 0 },
|
|
2879
|
-
node: { ...node, meta: { ...node.meta, label: void 0 } },
|
|
2880
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Node2.Button, { attributes: attrs, node, onClick: handleClick })
|
|
2881
|
-
}
|
|
2882
|
-
);
|
|
2883
|
-
case import_client_fetch29.UiNodeInputAttributesTypeEnum.DatetimeLocal:
|
|
2884
|
-
throw new Error("Not implemented");
|
|
2885
|
-
case import_client_fetch29.UiNodeInputAttributesTypeEnum.Checkbox:
|
|
2886
|
-
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
2887
|
-
Node2.Label,
|
|
2888
|
-
{
|
|
2889
|
-
attributes: { ...attrs, label: void 0 },
|
|
2890
|
-
node: { ...node, meta: { ...node.meta, label: void 0 } },
|
|
2891
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Node2.Checkbox, { attributes: attrs, node, onClick: handleClick })
|
|
2892
|
-
}
|
|
2893
|
-
);
|
|
2894
|
-
case import_client_fetch29.UiNodeInputAttributesTypeEnum.Hidden:
|
|
2895
|
-
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Node2.Input, { attributes: attrs, node, onClick: handleClick });
|
|
2896
|
-
default:
|
|
2897
|
-
if (isPinCodeInput) {
|
|
2898
|
-
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Node2.Label, { attributes: attrs, node, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
2899
|
-
Node2.CodeInput,
|
|
2900
|
-
{
|
|
2901
|
-
attributes: attrs,
|
|
2902
|
-
node,
|
|
2903
|
-
onClick: handleClick
|
|
2904
|
-
}
|
|
2905
|
-
) });
|
|
2906
|
-
}
|
|
2907
|
-
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Node2.Label, { attributes: attrs, node, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Node2.Input, { attributes: attrs, node, onClick: handleClick }) });
|
|
2908
|
-
}
|
|
2909
|
-
};
|
|
2910
|
-
|
|
2911
|
-
// src/theme/default/components/form/captcha.tsx
|
|
2912
|
-
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
2623
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2913
2624
|
var DefaultCaptcha = ({ node }) => {
|
|
2914
|
-
const { setValue } = (0,
|
|
2915
|
-
const ref = (0,
|
|
2625
|
+
const { setValue } = (0, import_react_hook_form13.useFormContext)();
|
|
2626
|
+
const ref = (0, import_react11.useRef)();
|
|
2916
2627
|
const nodes = [];
|
|
2917
|
-
if ((0,
|
|
2628
|
+
if ((0, import_client_fetch14.isUiNodeInputAttributes)(node.attributes)) {
|
|
2918
2629
|
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
2919
|
-
nodes.push(
|
|
2630
|
+
nodes.push(
|
|
2631
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DefaultInput, { node, attributes: node.attributes }, 1)
|
|
2632
|
+
);
|
|
2920
2633
|
}
|
|
2921
2634
|
}
|
|
2922
|
-
if ((0,
|
|
2635
|
+
if ((0, import_client_fetch14.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
|
|
2923
2636
|
const options = JSON.parse(node.attributes.value);
|
|
2924
2637
|
nodes.push(
|
|
2925
|
-
/* @__PURE__ */ (0,
|
|
2638
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
2926
2639
|
import_react_turnstile.Turnstile,
|
|
2927
2640
|
{
|
|
2928
2641
|
ref,
|
|
@@ -2999,18 +2712,18 @@ function getOryComponents(overrides) {
|
|
|
2999
2712
|
}
|
|
3000
2713
|
|
|
3001
2714
|
// src/theme/default/flows/error.tsx
|
|
3002
|
-
var
|
|
2715
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3003
2716
|
function Error2({
|
|
3004
2717
|
error,
|
|
3005
2718
|
children
|
|
3006
2719
|
}) {
|
|
3007
|
-
return /* @__PURE__ */ (0,
|
|
2720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { "data-testid": "ory/screen/error/raw", children: JSON.stringify(error) || children });
|
|
3008
2721
|
}
|
|
3009
2722
|
|
|
3010
2723
|
// src/theme/default/flows/login.tsx
|
|
3011
|
-
var
|
|
2724
|
+
var import_client_fetch15 = require("@ory/client-fetch");
|
|
3012
2725
|
var import_elements_react19 = require("@ory/elements-react");
|
|
3013
|
-
var
|
|
2726
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3014
2727
|
function Login({
|
|
3015
2728
|
flow,
|
|
3016
2729
|
config,
|
|
@@ -3018,22 +2731,22 @@ function Login({
|
|
|
3018
2731
|
components: flowOverrideComponents
|
|
3019
2732
|
}) {
|
|
3020
2733
|
const components = getOryComponents(flowOverrideComponents);
|
|
3021
|
-
return /* @__PURE__ */ (0,
|
|
2734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3022
2735
|
import_elements_react19.OryProvider,
|
|
3023
2736
|
{
|
|
3024
2737
|
config,
|
|
3025
2738
|
flow,
|
|
3026
|
-
flowType:
|
|
2739
|
+
flowType: import_client_fetch15.FlowType.Login,
|
|
3027
2740
|
components,
|
|
3028
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
2741
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_elements_react19.OryTwoStepCard, {})
|
|
3029
2742
|
}
|
|
3030
2743
|
);
|
|
3031
2744
|
}
|
|
3032
2745
|
|
|
3033
2746
|
// src/theme/default/flows/recovery.tsx
|
|
3034
|
-
var
|
|
2747
|
+
var import_client_fetch16 = require("@ory/client-fetch");
|
|
3035
2748
|
var import_elements_react20 = require("@ory/elements-react");
|
|
3036
|
-
var
|
|
2749
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3037
2750
|
function Recovery({
|
|
3038
2751
|
flow,
|
|
3039
2752
|
config,
|
|
@@ -3041,22 +2754,22 @@ function Recovery({
|
|
|
3041
2754
|
components: flowOverrideComponents
|
|
3042
2755
|
}) {
|
|
3043
2756
|
const components = getOryComponents(flowOverrideComponents);
|
|
3044
|
-
return /* @__PURE__ */ (0,
|
|
2757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3045
2758
|
import_elements_react20.OryProvider,
|
|
3046
2759
|
{
|
|
3047
2760
|
config,
|
|
3048
2761
|
flow,
|
|
3049
|
-
flowType:
|
|
2762
|
+
flowType: import_client_fetch16.FlowType.Recovery,
|
|
3050
2763
|
components,
|
|
3051
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
2764
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_elements_react20.OryTwoStepCard, {})
|
|
3052
2765
|
}
|
|
3053
2766
|
);
|
|
3054
2767
|
}
|
|
3055
2768
|
|
|
3056
2769
|
// src/theme/default/flows/registration.tsx
|
|
3057
|
-
var
|
|
2770
|
+
var import_client_fetch17 = require("@ory/client-fetch");
|
|
3058
2771
|
var import_elements_react21 = require("@ory/elements-react");
|
|
3059
|
-
var
|
|
2772
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3060
2773
|
function Registration({
|
|
3061
2774
|
flow,
|
|
3062
2775
|
children,
|
|
@@ -3064,22 +2777,22 @@ function Registration({
|
|
|
3064
2777
|
config
|
|
3065
2778
|
}) {
|
|
3066
2779
|
const components = getOryComponents(flowOverrideComponents);
|
|
3067
|
-
return /* @__PURE__ */ (0,
|
|
2780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3068
2781
|
import_elements_react21.OryProvider,
|
|
3069
2782
|
{
|
|
3070
2783
|
config,
|
|
3071
2784
|
flow,
|
|
3072
|
-
flowType:
|
|
2785
|
+
flowType: import_client_fetch17.FlowType.Registration,
|
|
3073
2786
|
components,
|
|
3074
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
2787
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_elements_react21.OryTwoStepCard, {})
|
|
3075
2788
|
}
|
|
3076
2789
|
);
|
|
3077
2790
|
}
|
|
3078
2791
|
|
|
3079
2792
|
// src/theme/default/flows/settings.tsx
|
|
3080
|
-
var
|
|
2793
|
+
var import_client_fetch18 = require("@ory/client-fetch");
|
|
3081
2794
|
var import_elements_react22 = require("@ory/elements-react");
|
|
3082
|
-
var
|
|
2795
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3083
2796
|
function Settings({
|
|
3084
2797
|
flow,
|
|
3085
2798
|
config,
|
|
@@ -3087,25 +2800,25 @@ function Settings({
|
|
|
3087
2800
|
components: flowOverrideComponents
|
|
3088
2801
|
}) {
|
|
3089
2802
|
const components = getOryComponents(flowOverrideComponents);
|
|
3090
|
-
return /* @__PURE__ */ (0,
|
|
2803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3091
2804
|
import_elements_react22.OryProvider,
|
|
3092
2805
|
{
|
|
3093
2806
|
config,
|
|
3094
2807
|
flow,
|
|
3095
|
-
flowType:
|
|
2808
|
+
flowType: import_client_fetch18.FlowType.Settings,
|
|
3096
2809
|
components,
|
|
3097
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
3098
|
-
/* @__PURE__ */ (0,
|
|
3099
|
-
/* @__PURE__ */ (0,
|
|
2810
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
2811
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_elements_react22.HeadlessPageHeader, {}),
|
|
2812
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_elements_react22.OrySettingsCard, {})
|
|
3100
2813
|
] })
|
|
3101
2814
|
}
|
|
3102
2815
|
);
|
|
3103
2816
|
}
|
|
3104
2817
|
|
|
3105
2818
|
// src/theme/default/flows/verification.tsx
|
|
3106
|
-
var
|
|
2819
|
+
var import_client_fetch19 = require("@ory/client-fetch");
|
|
3107
2820
|
var import_elements_react23 = require("@ory/elements-react");
|
|
3108
|
-
var
|
|
2821
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3109
2822
|
function Verification({
|
|
3110
2823
|
flow,
|
|
3111
2824
|
config,
|
|
@@ -3113,14 +2826,14 @@ function Verification({
|
|
|
3113
2826
|
components: flowOverrideComponents
|
|
3114
2827
|
}) {
|
|
3115
2828
|
const components = getOryComponents(flowOverrideComponents);
|
|
3116
|
-
return /* @__PURE__ */ (0,
|
|
2829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3117
2830
|
import_elements_react23.OryProvider,
|
|
3118
2831
|
{
|
|
3119
2832
|
config,
|
|
3120
2833
|
flow,
|
|
3121
|
-
flowType:
|
|
2834
|
+
flowType: import_client_fetch19.FlowType.Verification,
|
|
3122
2835
|
components,
|
|
3123
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
2836
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_elements_react23.OryTwoStepCard, {})
|
|
3124
2837
|
}
|
|
3125
2838
|
);
|
|
3126
2839
|
}
|