@ory/elements-react 1.0.0-rc.3 → 1.0.0-rc.4
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 +13 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +199 -49
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +197 -47
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.js +153 -121
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +62 -32
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +6 -6
- package/tsconfig.json +1 -1
|
@@ -92,12 +92,12 @@ function DefaultCardContent({ children }) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// src/theme/default/components/card/footer.tsx
|
|
95
|
-
var
|
|
95
|
+
var import_client_fetch29 = require("@ory/client-fetch");
|
|
96
96
|
var import_elements_react3 = require("@ory/elements-react");
|
|
97
97
|
var import_react_intl10 = require("react-intl");
|
|
98
98
|
|
|
99
99
|
// src/components/card/two-step/state-select-method.tsx
|
|
100
|
-
var
|
|
100
|
+
var import_client_fetch28 = require("@ory/client-fetch");
|
|
101
101
|
|
|
102
102
|
// src/context/component.tsx
|
|
103
103
|
var import_client_fetch = require("@ory/client-fetch");
|
|
@@ -297,46 +297,52 @@ function getSDKUrl() {
|
|
|
297
297
|
var import_react_intl8 = require("react-intl");
|
|
298
298
|
|
|
299
299
|
// src/components/form/form.tsx
|
|
300
|
-
var
|
|
300
|
+
var import_client_fetch16 = require("@ory/client-fetch");
|
|
301
301
|
var import_react_hook_form2 = require("react-hook-form");
|
|
302
302
|
var import_react_intl = require("react-intl");
|
|
303
303
|
|
|
304
304
|
// src/components/form/useOryFormSubmit.ts
|
|
305
|
-
var
|
|
305
|
+
var import_client_fetch15 = require("@ory/client-fetch");
|
|
306
306
|
var import_react_hook_form = require("react-hook-form");
|
|
307
307
|
|
|
308
308
|
// src/util/onSubmitLogin.ts
|
|
309
|
+
var import_client_fetch9 = require("@ory/client-fetch");
|
|
310
|
+
|
|
311
|
+
// src/util/sdk-helpers/error.ts
|
|
309
312
|
var import_client_fetch7 = require("@ory/client-fetch");
|
|
310
313
|
|
|
311
|
-
// src/util/
|
|
314
|
+
// src/util/sdk-helpers/utils.ts
|
|
312
315
|
var import_client_fetch8 = require("@ory/client-fetch");
|
|
313
316
|
|
|
317
|
+
// src/util/onSubmitRecovery.ts
|
|
318
|
+
var import_client_fetch10 = require("@ory/client-fetch");
|
|
319
|
+
|
|
314
320
|
// src/util/onSubmitRegistration.ts
|
|
315
|
-
var
|
|
321
|
+
var import_client_fetch11 = require("@ory/client-fetch");
|
|
316
322
|
|
|
317
323
|
// src/util/onSubmitSettings.ts
|
|
318
|
-
var
|
|
324
|
+
var import_client_fetch12 = require("@ory/client-fetch");
|
|
319
325
|
|
|
320
326
|
// src/util/onSubmitVerification.ts
|
|
321
|
-
var
|
|
327
|
+
var import_client_fetch13 = require("@ory/client-fetch");
|
|
322
328
|
|
|
323
329
|
// src/components/form/form-helpers.ts
|
|
324
|
-
var
|
|
330
|
+
var import_client_fetch14 = require("@ory/client-fetch");
|
|
325
331
|
|
|
326
332
|
// src/components/form/form.tsx
|
|
327
333
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
328
334
|
|
|
329
335
|
// src/components/form/groups.tsx
|
|
330
|
-
var
|
|
336
|
+
var import_client_fetch19 = require("@ory/client-fetch");
|
|
331
337
|
|
|
332
338
|
// src/components/form/nodes/input.tsx
|
|
333
|
-
var
|
|
339
|
+
var import_client_fetch17 = require("@ory/client-fetch");
|
|
334
340
|
var import_react6 = require("react");
|
|
335
341
|
var import_react_hook_form3 = require("react-hook-form");
|
|
336
342
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
337
343
|
|
|
338
344
|
// src/components/form/nodes/node.tsx
|
|
339
|
-
var
|
|
345
|
+
var import_client_fetch18 = require("@ory/client-fetch");
|
|
340
346
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
341
347
|
|
|
342
348
|
// src/components/form/groups.tsx
|
|
@@ -346,15 +352,15 @@ var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
|
346
352
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
347
353
|
|
|
348
354
|
// src/components/form/social.tsx
|
|
349
|
-
var
|
|
355
|
+
var import_client_fetch22 = require("@ory/client-fetch");
|
|
350
356
|
var import_react_hook_form5 = require("react-hook-form");
|
|
351
357
|
|
|
352
358
|
// src/components/form/form-provider.tsx
|
|
353
|
-
var
|
|
359
|
+
var import_client_fetch21 = require("@ory/client-fetch");
|
|
354
360
|
var import_react_hook_form4 = require("react-hook-form");
|
|
355
361
|
|
|
356
362
|
// src/components/form/form-resolver.ts
|
|
357
|
-
var
|
|
363
|
+
var import_client_fetch20 = require("@ory/client-fetch");
|
|
358
364
|
|
|
359
365
|
// src/components/form/form-provider.tsx
|
|
360
366
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
@@ -367,14 +373,14 @@ var import_react_hook_form6 = require("react-hook-form");
|
|
|
367
373
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
368
374
|
|
|
369
375
|
// src/components/generic/divider.tsx
|
|
370
|
-
var
|
|
376
|
+
var import_client_fetch23 = require("@ory/client-fetch");
|
|
371
377
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
372
378
|
|
|
373
379
|
// src/components/generic/page-header.tsx
|
|
374
380
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
375
381
|
|
|
376
382
|
// src/components/settings/settings-card.tsx
|
|
377
|
-
var
|
|
383
|
+
var import_client_fetch24 = require("@ory/client-fetch");
|
|
378
384
|
var import_react_intl7 = require("react-intl");
|
|
379
385
|
|
|
380
386
|
// src/components/settings/oidc-settings.tsx
|
|
@@ -2814,11 +2820,11 @@ var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
|
2814
2820
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2815
2821
|
|
|
2816
2822
|
// src/components/card/two-step/state-method-active.tsx
|
|
2817
|
-
var
|
|
2823
|
+
var import_client_fetch25 = require("@ory/client-fetch");
|
|
2818
2824
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2819
2825
|
|
|
2820
2826
|
// src/components/card/two-step/state-provide-identifier.tsx
|
|
2821
|
-
var
|
|
2827
|
+
var import_client_fetch26 = require("@ory/client-fetch");
|
|
2822
2828
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2823
2829
|
|
|
2824
2830
|
// src/components/card/card-two-step.tsx
|
|
@@ -2826,7 +2832,7 @@ var import_elements_react = require("@ory/elements-react");
|
|
|
2826
2832
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2827
2833
|
|
|
2828
2834
|
// src/components/card/card-consent.tsx
|
|
2829
|
-
var
|
|
2835
|
+
var import_client_fetch27 = require("@ory/client-fetch");
|
|
2830
2836
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2831
2837
|
|
|
2832
2838
|
// src/components/card/two-step/state-select-method.tsx
|
|
@@ -2841,17 +2847,17 @@ var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
|
2841
2847
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2842
2848
|
function toAuthMethodPickerOptions(visibleGroups) {
|
|
2843
2849
|
return Object.fromEntries(
|
|
2844
|
-
Object.values(
|
|
2850
|
+
Object.values(import_client_fetch28.UiNodeGroupEnum).filter((group) => {
|
|
2845
2851
|
var _a;
|
|
2846
2852
|
return (_a = visibleGroups[group]) == null ? void 0 : _a.length;
|
|
2847
2853
|
}).filter(
|
|
2848
2854
|
(group) => ![
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
+
import_client_fetch28.UiNodeGroupEnum.Oidc,
|
|
2856
|
+
import_client_fetch28.UiNodeGroupEnum.Saml,
|
|
2857
|
+
import_client_fetch28.UiNodeGroupEnum.Default,
|
|
2858
|
+
import_client_fetch28.UiNodeGroupEnum.IdentifierFirst,
|
|
2859
|
+
import_client_fetch28.UiNodeGroupEnum.Profile,
|
|
2860
|
+
import_client_fetch28.UiNodeGroupEnum.Captcha
|
|
2855
2861
|
].includes(group)
|
|
2856
2862
|
).map((g) => [g, {}])
|
|
2857
2863
|
);
|
|
@@ -2926,26 +2932,42 @@ var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
|
2926
2932
|
function DefaultCardFooter() {
|
|
2927
2933
|
const oryFlow = (0, import_elements_react3.useOryFlow)();
|
|
2928
2934
|
switch (oryFlow.flowType) {
|
|
2929
|
-
case
|
|
2935
|
+
case import_client_fetch29.FlowType.Login:
|
|
2930
2936
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LoginCardFooter, {});
|
|
2931
|
-
case
|
|
2937
|
+
case import_client_fetch29.FlowType.Registration:
|
|
2932
2938
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RegistrationCardFooter, {});
|
|
2933
|
-
case
|
|
2939
|
+
case import_client_fetch29.FlowType.Recovery:
|
|
2934
2940
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RecoveryCardFooter, {});
|
|
2935
|
-
case
|
|
2941
|
+
case import_client_fetch29.FlowType.Verification:
|
|
2936
2942
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(VerificationCardFooter, {});
|
|
2937
|
-
case
|
|
2943
|
+
case import_client_fetch29.FlowType.OAuth2Consent:
|
|
2938
2944
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ConsentCardFooter, { flow: oryFlow.flow });
|
|
2939
2945
|
default:
|
|
2940
2946
|
return null;
|
|
2941
2947
|
}
|
|
2942
2948
|
}
|
|
2949
|
+
function shouldShowLogoutButton(flow, formState, authMethods) {
|
|
2950
|
+
if (flow.refresh) {
|
|
2951
|
+
return true;
|
|
2952
|
+
}
|
|
2953
|
+
if (flow.requested_aal === "aal2") {
|
|
2954
|
+
if (formState.current === "select_method") {
|
|
2955
|
+
return true;
|
|
2956
|
+
}
|
|
2957
|
+
if (formState.current === "method_active" && flow.active === "code") {
|
|
2958
|
+
return true;
|
|
2959
|
+
}
|
|
2960
|
+
if (formState.current === "method_active" && authMethods.length === 1) {
|
|
2961
|
+
return true;
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
return false;
|
|
2965
|
+
}
|
|
2943
2966
|
function LoginCardFooter() {
|
|
2944
|
-
const { formState, flow, flowType } = (0, import_elements_react3.useOryFlow)();
|
|
2967
|
+
const { formState, flow, flowType, dispatchFormState } = (0, import_elements_react3.useOryFlow)();
|
|
2945
2968
|
const config = (0, import_elements_react3.useOryConfiguration)();
|
|
2946
|
-
const { logoutFlow: logout, didLoad: didLoadLogout } = useClientLogout(config);
|
|
2947
2969
|
const intl = (0, import_react_intl10.useIntl)();
|
|
2948
|
-
if (flowType !==
|
|
2970
|
+
if (flowType !== import_client_fetch29.FlowType.Login) {
|
|
2949
2971
|
return null;
|
|
2950
2972
|
}
|
|
2951
2973
|
const authMethods = nodesToAuthMethodGroups(flow.ui.nodes);
|
|
@@ -2959,27 +2981,8 @@ function LoginCardFooter() {
|
|
|
2959
2981
|
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
2960
2982
|
);
|
|
2961
2983
|
}
|
|
2962
|
-
if (flow
|
|
2963
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.
|
|
2964
|
-
intl.formatMessage({
|
|
2965
|
-
id: "login.2fa.go-back"
|
|
2966
|
-
}),
|
|
2967
|
-
" ",
|
|
2968
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2969
|
-
"a",
|
|
2970
|
-
{
|
|
2971
|
-
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2972
|
-
href: logout ? logout == null ? void 0 : logout.logout_url : returnTo,
|
|
2973
|
-
"data-testid": (
|
|
2974
|
-
// Only add the test-id when the logout link has loaded.
|
|
2975
|
-
didLoadLogout ? "ory/screen/login/action/logout" : void 0
|
|
2976
|
-
),
|
|
2977
|
-
children: intl.formatMessage({
|
|
2978
|
-
id: !didLoadLogout || logout ? "login.logout-button" : "login.2fa.go-back.link"
|
|
2979
|
-
})
|
|
2980
|
-
}
|
|
2981
|
-
)
|
|
2982
|
-
] });
|
|
2984
|
+
if (shouldShowLogoutButton(flow, formState, authMethods)) {
|
|
2985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LogoutButton, { returnTo });
|
|
2983
2986
|
}
|
|
2984
2987
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
2985
2988
|
formState.current === "provide_identifier" && config.project.registration_enabled && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
@@ -3002,10 +3005,14 @@ function LoginCardFooter() {
|
|
|
3002
3005
|
)
|
|
3003
3006
|
] }),
|
|
3004
3007
|
authMethods.length > 1 && formState.current === "method_active" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3005
|
-
"
|
|
3008
|
+
"button",
|
|
3006
3009
|
{
|
|
3007
3010
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
3008
|
-
|
|
3011
|
+
onClick: () => {
|
|
3012
|
+
dispatchFormState({
|
|
3013
|
+
type: "action_clear_active_method"
|
|
3014
|
+
});
|
|
3015
|
+
},
|
|
3009
3016
|
"data-testid": "ory/screen/login/mfa/action/selectMethod",
|
|
3010
3017
|
children: intl.formatMessage({
|
|
3011
3018
|
id: "login.2fa.method.go-back"
|
|
@@ -3025,6 +3032,31 @@ function LoginCardFooter() {
|
|
|
3025
3032
|
) })
|
|
3026
3033
|
] });
|
|
3027
3034
|
}
|
|
3035
|
+
function LogoutButton({ returnTo }) {
|
|
3036
|
+
const config = (0, import_elements_react3.useOryConfiguration)();
|
|
3037
|
+
const intl = (0, import_react_intl10.useIntl)();
|
|
3038
|
+
const { logoutFlow: logout, didLoad: didLoadLogout } = useClientLogout(config);
|
|
3039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
3040
|
+
intl.formatMessage({
|
|
3041
|
+
id: "login.2fa.go-back"
|
|
3042
|
+
}),
|
|
3043
|
+
" ",
|
|
3044
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3045
|
+
"a",
|
|
3046
|
+
{
|
|
3047
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
3048
|
+
href: logout ? logout == null ? void 0 : logout.logout_url : returnTo,
|
|
3049
|
+
"data-testid": (
|
|
3050
|
+
// Only add the test-id when the logout link has loaded.
|
|
3051
|
+
didLoadLogout ? "ory/screen/login/action/logout" : void 0
|
|
3052
|
+
),
|
|
3053
|
+
children: intl.formatMessage({
|
|
3054
|
+
id: !didLoadLogout || logout ? "login.logout-button" : "login.2fa.go-back.link"
|
|
3055
|
+
})
|
|
3056
|
+
}
|
|
3057
|
+
)
|
|
3058
|
+
] });
|
|
3059
|
+
}
|
|
3028
3060
|
function RegistrationCardFooter() {
|
|
3029
3061
|
const intl = (0, import_react_intl10.useIntl)();
|
|
3030
3062
|
const { flow, formState } = (0, import_elements_react3.useOryFlow)();
|
|
@@ -3128,7 +3160,7 @@ function ConsentCardFooter({ flow }) {
|
|
|
3128
3160
|
var import_elements_react5 = require("@ory/elements-react");
|
|
3129
3161
|
|
|
3130
3162
|
// src/theme/default/utils/constructCardHeader.ts
|
|
3131
|
-
var
|
|
3163
|
+
var import_client_fetch30 = require("@ory/client-fetch");
|
|
3132
3164
|
var import_react_intl11 = require("react-intl");
|
|
3133
3165
|
function joinWithCommaOr(list, orText = "or") {
|
|
3134
3166
|
if (list.length === 0) {
|
|
@@ -3145,7 +3177,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3145
3177
|
const nodes = container.nodes;
|
|
3146
3178
|
const intl = (0, import_react_intl11.useIntl)();
|
|
3147
3179
|
switch (opts.flowType) {
|
|
3148
|
-
case
|
|
3180
|
+
case import_client_fetch30.FlowType.Recovery:
|
|
3149
3181
|
if (nodes.find(
|
|
3150
3182
|
(node) => "name" in node.attributes && node.attributes.name === "code"
|
|
3151
3183
|
)) {
|
|
@@ -3167,7 +3199,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3167
3199
|
id: "recovery.subtitle"
|
|
3168
3200
|
})
|
|
3169
3201
|
};
|
|
3170
|
-
case
|
|
3202
|
+
case import_client_fetch30.FlowType.Settings:
|
|
3171
3203
|
return {
|
|
3172
3204
|
title: intl.formatMessage({
|
|
3173
3205
|
id: "settings.title"
|
|
@@ -3176,7 +3208,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3176
3208
|
id: "settings.subtitle"
|
|
3177
3209
|
})
|
|
3178
3210
|
};
|
|
3179
|
-
case
|
|
3211
|
+
case import_client_fetch30.FlowType.Verification:
|
|
3180
3212
|
if (nodes.find(
|
|
3181
3213
|
(node) => "name" in node.attributes && node.attributes.name === "code"
|
|
3182
3214
|
)) {
|
|
@@ -3198,7 +3230,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3198
3230
|
id: "verification.subtitle"
|
|
3199
3231
|
})
|
|
3200
3232
|
};
|
|
3201
|
-
case
|
|
3233
|
+
case import_client_fetch30.FlowType.Login: {
|
|
3202
3234
|
const accountLinkingMessage = (_a = container.messages) == null ? void 0 : _a.find(
|
|
3203
3235
|
(m) => m.id === 1010016
|
|
3204
3236
|
);
|
|
@@ -3221,7 +3253,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3221
3253
|
const parts = [];
|
|
3222
3254
|
if (nodes.find((node) => node.group === "password")) {
|
|
3223
3255
|
switch (opts.flowType) {
|
|
3224
|
-
case
|
|
3256
|
+
case import_client_fetch30.FlowType.Registration:
|
|
3225
3257
|
parts.push(
|
|
3226
3258
|
intl.formatMessage(
|
|
3227
3259
|
{ id: "card.header.parts.password.registration" },
|
|
@@ -3264,7 +3296,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3264
3296
|
}
|
|
3265
3297
|
if (nodes.find((node) => node.group === "identifier_first")) {
|
|
3266
3298
|
const identifier = nodes.find(
|
|
3267
|
-
(node) => (0,
|
|
3299
|
+
(node) => (0, import_client_fetch30.isUiNodeInputAttributes)(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
|
|
3268
3300
|
);
|
|
3269
3301
|
if (identifier) {
|
|
3270
3302
|
parts.push(
|
|
@@ -3280,7 +3312,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3280
3312
|
}
|
|
3281
3313
|
}
|
|
3282
3314
|
switch (opts.flowType) {
|
|
3283
|
-
case
|
|
3315
|
+
case import_client_fetch30.FlowType.Login:
|
|
3284
3316
|
if (opts.flow.refresh) {
|
|
3285
3317
|
return {
|
|
3286
3318
|
title: intl.formatMessage({
|
|
@@ -3321,7 +3353,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3321
3353
|
}
|
|
3322
3354
|
) : ""
|
|
3323
3355
|
};
|
|
3324
|
-
case
|
|
3356
|
+
case import_client_fetch30.FlowType.Registration:
|
|
3325
3357
|
return {
|
|
3326
3358
|
title: intl.formatMessage({
|
|
3327
3359
|
id: "registration.title"
|
|
@@ -3338,7 +3370,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3338
3370
|
}
|
|
3339
3371
|
) : ""
|
|
3340
3372
|
};
|
|
3341
|
-
case
|
|
3373
|
+
case import_client_fetch30.FlowType.OAuth2Consent:
|
|
3342
3374
|
return {
|
|
3343
3375
|
title: intl.formatMessage(
|
|
3344
3376
|
{
|
|
@@ -3365,7 +3397,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3365
3397
|
}
|
|
3366
3398
|
|
|
3367
3399
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
3368
|
-
var
|
|
3400
|
+
var import_client_fetch31 = require("@ory/client-fetch");
|
|
3369
3401
|
var import_elements_react4 = require("@ory/elements-react");
|
|
3370
3402
|
var import_react8 = require("react");
|
|
3371
3403
|
var import_react_hook_form13 = require("react-hook-form");
|
|
@@ -3422,7 +3454,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3422
3454
|
if (formState.current === "provide_identifier") {
|
|
3423
3455
|
return null;
|
|
3424
3456
|
}
|
|
3425
|
-
if (flowType ===
|
|
3457
|
+
if (flowType === import_client_fetch31.FlowType.Login && flow.requested_aal === "aal2") {
|
|
3426
3458
|
return null;
|
|
3427
3459
|
}
|
|
3428
3460
|
const nodeBackButton = getBackButtonNodeAttributes(flowType, ui.nodes);
|
|
@@ -3437,7 +3469,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3437
3469
|
if (screenSelectionNode) {
|
|
3438
3470
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("form", { action: flow.ui.action, method: flow.ui.method, children: [
|
|
3439
3471
|
flow.ui.nodes.filter((n) => {
|
|
3440
|
-
if ((0,
|
|
3472
|
+
if ((0, import_client_fetch31.isUiNodeInputAttributes)(n.attributes)) {
|
|
3441
3473
|
return n.attributes.type === "hidden";
|
|
3442
3474
|
}
|
|
3443
3475
|
return false;
|
|
@@ -3515,18 +3547,18 @@ function getBackButtonNodeAttributes(flowType, nodes) {
|
|
|
3515
3547
|
var _a, _b;
|
|
3516
3548
|
let nodeBackButtonAttributes;
|
|
3517
3549
|
switch (flowType) {
|
|
3518
|
-
case
|
|
3550
|
+
case import_client_fetch31.FlowType.Login:
|
|
3519
3551
|
nodeBackButtonAttributes = (_a = nodes.find(
|
|
3520
|
-
(node) => (0,
|
|
3552
|
+
(node) => (0, import_client_fetch31.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
|
|
3521
3553
|
)) == null ? void 0 : _a.attributes;
|
|
3522
3554
|
break;
|
|
3523
|
-
case
|
|
3555
|
+
case import_client_fetch31.FlowType.Registration:
|
|
3524
3556
|
nodeBackButtonAttributes = guessRegistrationBackButton(nodes);
|
|
3525
3557
|
break;
|
|
3526
|
-
case
|
|
3527
|
-
case
|
|
3558
|
+
case import_client_fetch31.FlowType.Recovery:
|
|
3559
|
+
case import_client_fetch31.FlowType.Verification:
|
|
3528
3560
|
nodeBackButtonAttributes = (_b = nodes.find(
|
|
3529
|
-
(n) => (0,
|
|
3561
|
+
(n) => (0, import_client_fetch31.isUiNodeInputAttributes)(n.attributes) && n.attributes.name === "email"
|
|
3530
3562
|
)) == null ? void 0 : _b.attributes;
|
|
3531
3563
|
break;
|
|
3532
3564
|
}
|
|
@@ -3543,7 +3575,7 @@ var backButtonCandiates = [
|
|
|
3543
3575
|
function guessRegistrationBackButton(uiNodes) {
|
|
3544
3576
|
var _a;
|
|
3545
3577
|
return (_a = uiNodes.find(
|
|
3546
|
-
(node) => (0,
|
|
3578
|
+
(node) => (0, import_client_fetch31.isUiNodeInputAttributes)(node.attributes) && backButtonCandiates.includes(node.attributes.name) && node.group === "default"
|
|
3547
3579
|
)) == null ? void 0 : _a.attributes;
|
|
3548
3580
|
}
|
|
3549
3581
|
|
|
@@ -3624,7 +3656,7 @@ function cn(...inputs) {
|
|
|
3624
3656
|
// src/theme/default/components/form/index.tsx
|
|
3625
3657
|
var import_react_intl13 = require("react-intl");
|
|
3626
3658
|
var import_elements_react8 = require("@ory/elements-react");
|
|
3627
|
-
var
|
|
3659
|
+
var import_client_fetch33 = require("@ory/client-fetch");
|
|
3628
3660
|
|
|
3629
3661
|
// src/theme/default/components/form/social.tsx
|
|
3630
3662
|
var import_elements_react7 = require("@ory/elements-react");
|
|
@@ -3847,7 +3879,7 @@ function Spinner({ className }) {
|
|
|
3847
3879
|
}
|
|
3848
3880
|
|
|
3849
3881
|
// src/theme/default/components/form/social.tsx
|
|
3850
|
-
var
|
|
3882
|
+
var import_client_fetch32 = require("@ory/client-fetch");
|
|
3851
3883
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3852
3884
|
function extractProvider(context) {
|
|
3853
3885
|
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
@@ -3874,7 +3906,7 @@ function DefaultButtonSocial({
|
|
|
3874
3906
|
formState: { isSubmitting }
|
|
3875
3907
|
} = (0, import_react_hook_form14.useFormContext)();
|
|
3876
3908
|
const oidcNodeCount = (_a = ui.nodes.filter(
|
|
3877
|
-
(node2) => node2.group ===
|
|
3909
|
+
(node2) => node2.group === import_client_fetch32.UiNodeGroupEnum.Oidc || node2.group === import_client_fetch32.UiNodeGroupEnum.Saml
|
|
3878
3910
|
).length) != null ? _a : 0;
|
|
3879
3911
|
const Logo = logos2[attributes.value.split("-")[0]];
|
|
3880
3912
|
const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
|
|
@@ -3965,7 +3997,7 @@ function DefaultMessageContainer({ children }) {
|
|
|
3965
3997
|
"section",
|
|
3966
3998
|
{
|
|
3967
3999
|
className: cn(
|
|
3968
|
-
flowType ===
|
|
4000
|
+
flowType === import_client_fetch33.FlowType.Settings ? "text-center" : "text-left"
|
|
3969
4001
|
),
|
|
3970
4002
|
children
|
|
3971
4003
|
}
|
|
@@ -4117,7 +4149,7 @@ function DefaultAuthMethodListItem({
|
|
|
4117
4149
|
}
|
|
4118
4150
|
|
|
4119
4151
|
// src/theme/default/components/form/button.tsx
|
|
4120
|
-
var
|
|
4152
|
+
var import_client_fetch34 = require("@ory/client-fetch");
|
|
4121
4153
|
var import_elements_react9 = require("@ory/elements-react");
|
|
4122
4154
|
var import_class_variance_authority = require("class-variance-authority");
|
|
4123
4155
|
var import_react_hook_form15 = require("react-hook-form");
|
|
@@ -4165,7 +4197,7 @@ var DefaultButton = ({
|
|
|
4165
4197
|
const { type, name, value, ...rest } = attributes;
|
|
4166
4198
|
const [clicked, setClicked] = (0, import_react10.useState)(false);
|
|
4167
4199
|
const intl = (0, import_react_intl15.useIntl)();
|
|
4168
|
-
const label = (0,
|
|
4200
|
+
const label = (0, import_client_fetch34.getNodeLabel)(node);
|
|
4169
4201
|
const {
|
|
4170
4202
|
formState: { isSubmitting },
|
|
4171
4203
|
setValue
|
|
@@ -4205,7 +4237,7 @@ var DefaultButton = ({
|
|
|
4205
4237
|
DefaultButton.displayName = "DefaultButton";
|
|
4206
4238
|
|
|
4207
4239
|
// src/theme/default/components/form/checkbox.tsx
|
|
4208
|
-
var
|
|
4240
|
+
var import_client_fetch35 = require("@ory/client-fetch");
|
|
4209
4241
|
var import_elements_react10 = require("@ory/elements-react");
|
|
4210
4242
|
var import_react_hook_form16 = require("react-hook-form");
|
|
4211
4243
|
var import_react_intl17 = require("react-intl");
|
|
@@ -4285,7 +4317,7 @@ var DefaultCheckbox = ({
|
|
|
4285
4317
|
}) => {
|
|
4286
4318
|
const { value, name, ...attributes } = initialAttributes;
|
|
4287
4319
|
const intl = (0, import_react_intl17.useIntl)();
|
|
4288
|
-
const label = (0,
|
|
4320
|
+
const label = (0, import_client_fetch35.getNodeLabel)(node);
|
|
4289
4321
|
const { register } = (0, import_react_hook_form16.useFormContext)();
|
|
4290
4322
|
const hasError = node.messages.some((m) => m.type === "error");
|
|
4291
4323
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
|
|
@@ -4326,7 +4358,7 @@ var DefaultCheckbox = ({
|
|
|
4326
4358
|
|
|
4327
4359
|
// src/theme/default/components/form/group-container.tsx
|
|
4328
4360
|
var import_elements_react11 = require("@ory/elements-react");
|
|
4329
|
-
var
|
|
4361
|
+
var import_client_fetch36 = require("@ory/client-fetch");
|
|
4330
4362
|
|
|
4331
4363
|
// src/util/childCounter.ts
|
|
4332
4364
|
var import_react11 = require("react");
|
|
@@ -4352,7 +4384,7 @@ function DefaultGroupContainer({ children }) {
|
|
|
4352
4384
|
{
|
|
4353
4385
|
className: cn(
|
|
4354
4386
|
"grid",
|
|
4355
|
-
flowType ===
|
|
4387
|
+
flowType === import_client_fetch36.FlowType.OAuth2Consent ? "grid-cols-2 gap-2" : "grid-cols-1 gap-8"
|
|
4356
4388
|
),
|
|
4357
4389
|
children
|
|
4358
4390
|
}
|
|
@@ -4379,7 +4411,7 @@ function DefaultImage({ attributes, node }) {
|
|
|
4379
4411
|
}
|
|
4380
4412
|
|
|
4381
4413
|
// src/theme/default/components/form/input.tsx
|
|
4382
|
-
var
|
|
4414
|
+
var import_client_fetch37 = require("@ory/client-fetch");
|
|
4383
4415
|
var import_elements_react12 = require("@ory/elements-react");
|
|
4384
4416
|
var import_react12 = require("react");
|
|
4385
4417
|
var import_react_hook_form17 = require("react-hook-form");
|
|
@@ -4421,7 +4453,7 @@ var DefaultInput = ({
|
|
|
4421
4453
|
attributes,
|
|
4422
4454
|
onClick
|
|
4423
4455
|
}) => {
|
|
4424
|
-
const label = (0,
|
|
4456
|
+
const label = (0, import_client_fetch37.getNodeLabel)(node);
|
|
4425
4457
|
const { register } = (0, import_react_hook_form17.useFormContext)();
|
|
4426
4458
|
const { value, autocomplete, name, maxlength, ...rest } = attributes;
|
|
4427
4459
|
const intl = (0, import_react_intl18.useIntl)();
|
|
@@ -4457,7 +4489,7 @@ var DefaultInput = ({
|
|
|
4457
4489
|
className: cn(
|
|
4458
4490
|
"relative flex justify-stretch",
|
|
4459
4491
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
4460
|
-
flowType ===
|
|
4492
|
+
flowType === import_client_fetch37.FlowType.Settings && "max-w-[488px]"
|
|
4461
4493
|
),
|
|
4462
4494
|
children: [
|
|
4463
4495
|
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
@@ -4505,7 +4537,7 @@ function PasswordToggle({
|
|
|
4505
4537
|
}
|
|
4506
4538
|
|
|
4507
4539
|
// src/theme/default/components/form/label.tsx
|
|
4508
|
-
var
|
|
4540
|
+
var import_client_fetch38 = require("@ory/client-fetch");
|
|
4509
4541
|
var import_elements_react13 = require("@ory/elements-react");
|
|
4510
4542
|
var import_react_hook_form18 = require("react-hook-form");
|
|
4511
4543
|
var import_react_intl19 = require("react-intl");
|
|
@@ -4522,7 +4554,7 @@ function DefaultLabel({
|
|
|
4522
4554
|
...rest
|
|
4523
4555
|
}) {
|
|
4524
4556
|
const intl = (0, import_react_intl19.useIntl)();
|
|
4525
|
-
const label = (0,
|
|
4557
|
+
const label = (0, import_client_fetch38.getNodeLabel)(node);
|
|
4526
4558
|
const { Message } = (0, import_elements_react13.useComponents)();
|
|
4527
4559
|
const { flowType, flow } = (0, import_elements_react13.useOryFlow)();
|
|
4528
4560
|
const config = (0, import_elements_react13.useOryConfiguration)();
|
|
@@ -4548,7 +4580,7 @@ function DefaultLabel({
|
|
|
4548
4580
|
children: (0, import_elements_react13.uiTextToFormattedMessage)(label, intl)
|
|
4549
4581
|
}
|
|
4550
4582
|
),
|
|
4551
|
-
isPassword && config.project.recovery_enabled && flowType ===
|
|
4583
|
+
isPassword && config.project.recovery_enabled && flowType === import_client_fetch38.FlowType.Login && // TODO: make it possible to override with a custom component
|
|
4552
4584
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4553
4585
|
"a",
|
|
4554
4586
|
{
|
|
@@ -4574,19 +4606,19 @@ function DefaultLabel({
|
|
|
4574
4606
|
] }),
|
|
4575
4607
|
children,
|
|
4576
4608
|
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Message.Content, { message }, message.id)),
|
|
4577
|
-
fieldError && (0,
|
|
4609
|
+
fieldError && (0, import_client_fetch38.instanceOfUiText)(fieldError) && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Message.Content, { message: fieldError })
|
|
4578
4610
|
] });
|
|
4579
4611
|
}
|
|
4580
4612
|
|
|
4581
4613
|
// src/theme/default/components/form/link-button.tsx
|
|
4582
|
-
var
|
|
4614
|
+
var import_client_fetch39 = require("@ory/client-fetch");
|
|
4583
4615
|
var import_elements_react14 = require("@ory/elements-react");
|
|
4584
4616
|
var import_react13 = require("react");
|
|
4585
4617
|
var import_react_intl20 = require("react-intl");
|
|
4586
4618
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4587
4619
|
var DefaultLinkButton = (0, import_react13.forwardRef)(({ attributes, node }, ref) => {
|
|
4588
4620
|
const intl = (0, import_react_intl20.useIntl)();
|
|
4589
|
-
const label = (0,
|
|
4621
|
+
const label = (0, import_client_fetch39.getNodeLabel)(node);
|
|
4590
4622
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4591
4623
|
"a",
|
|
4592
4624
|
{
|
|
@@ -4650,7 +4682,7 @@ InputOTPSlot.displayName = "InputOTPSlot";
|
|
|
4650
4682
|
|
|
4651
4683
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
4652
4684
|
var import_elements_react15 = require("@ory/elements-react");
|
|
4653
|
-
var
|
|
4685
|
+
var import_client_fetch40 = require("@ory/client-fetch");
|
|
4654
4686
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4655
4687
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
4656
4688
|
const { setValue, watch } = (0, import_react_hook_form19.useFormContext)();
|
|
@@ -4674,7 +4706,7 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
4674
4706
|
className: cn(
|
|
4675
4707
|
"w-full flex gap-2 justify-stretch",
|
|
4676
4708
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
4677
|
-
flowType ===
|
|
4709
|
+
flowType === import_client_fetch40.FlowType.Settings && "max-w-[488px]"
|
|
4678
4710
|
),
|
|
4679
4711
|
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(InputOTPSlot, { index }, index))
|
|
4680
4712
|
}
|
|
@@ -5495,7 +5527,7 @@ function DefaultAuthMethodListContainer({
|
|
|
5495
5527
|
}
|
|
5496
5528
|
|
|
5497
5529
|
// src/theme/default/components/form/captcha.tsx
|
|
5498
|
-
var
|
|
5530
|
+
var import_client_fetch41 = require("@ory/client-fetch");
|
|
5499
5531
|
var import_react_turnstile = require("@marsidev/react-turnstile");
|
|
5500
5532
|
var import_react17 = require("react");
|
|
5501
5533
|
var import_react_hook_form25 = require("react-hook-form");
|
|
@@ -5514,7 +5546,7 @@ var DefaultCaptcha = ({ node }) => {
|
|
|
5514
5546
|
}, 100);
|
|
5515
5547
|
}
|
|
5516
5548
|
}, [formState.submitCount, formState.isSubmitSuccessful]);
|
|
5517
|
-
if (!(0,
|
|
5549
|
+
if (!(0, import_client_fetch41.isUiNodeInputAttributes)(node.attributes)) {
|
|
5518
5550
|
return null;
|
|
5519
5551
|
}
|
|
5520
5552
|
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
@@ -5672,7 +5704,7 @@ function getOryComponents(overrides) {
|
|
|
5672
5704
|
}
|
|
5673
5705
|
|
|
5674
5706
|
// src/theme/default/flows/error.tsx
|
|
5675
|
-
var
|
|
5707
|
+
var import_client_fetch42 = require("@ory/client-fetch");
|
|
5676
5708
|
var import_elements_react22 = require("@ory/elements-react");
|
|
5677
5709
|
var import_react18 = require("react");
|
|
5678
5710
|
var import_react_intl24 = require("react-intl");
|
|
@@ -5695,14 +5727,14 @@ function useStandardize(error) {
|
|
|
5695
5727
|
timestamp: /* @__PURE__ */ new Date()
|
|
5696
5728
|
};
|
|
5697
5729
|
}
|
|
5698
|
-
if ((0,
|
|
5730
|
+
if ((0, import_client_fetch42.instanceOfFlowError)(error)) {
|
|
5699
5731
|
const parsed = error.error;
|
|
5700
5732
|
return {
|
|
5701
5733
|
...parsed,
|
|
5702
5734
|
id: error.id,
|
|
5703
5735
|
timestamp: error.created_at
|
|
5704
5736
|
};
|
|
5705
|
-
} else if (error.error && (0,
|
|
5737
|
+
} else if (error.error && (0, import_client_fetch42.instanceOfGenericError)(error.error)) {
|
|
5706
5738
|
return {
|
|
5707
5739
|
code: (_a = error.error.code) != null ? _a : 500,
|
|
5708
5740
|
message: error.error.message,
|
|
@@ -5826,7 +5858,7 @@ function ErrorLogo() {
|
|
|
5826
5858
|
}
|
|
5827
5859
|
|
|
5828
5860
|
// src/theme/default/flows/login.tsx
|
|
5829
|
-
var
|
|
5861
|
+
var import_client_fetch43 = require("@ory/client-fetch");
|
|
5830
5862
|
var import_elements_react23 = require("@ory/elements-react");
|
|
5831
5863
|
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
5832
5864
|
function Login({
|
|
@@ -5841,7 +5873,7 @@ function Login({
|
|
|
5841
5873
|
{
|
|
5842
5874
|
config,
|
|
5843
5875
|
flow,
|
|
5844
|
-
flowType:
|
|
5876
|
+
flowType: import_client_fetch43.FlowType.Login,
|
|
5845
5877
|
components,
|
|
5846
5878
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_elements_react23.OryTwoStepCard, {})
|
|
5847
5879
|
}
|
|
@@ -5849,7 +5881,7 @@ function Login({
|
|
|
5849
5881
|
}
|
|
5850
5882
|
|
|
5851
5883
|
// src/theme/default/flows/recovery.tsx
|
|
5852
|
-
var
|
|
5884
|
+
var import_client_fetch44 = require("@ory/client-fetch");
|
|
5853
5885
|
var import_elements_react24 = require("@ory/elements-react");
|
|
5854
5886
|
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
5855
5887
|
function Recovery({
|
|
@@ -5864,7 +5896,7 @@ function Recovery({
|
|
|
5864
5896
|
{
|
|
5865
5897
|
config,
|
|
5866
5898
|
flow,
|
|
5867
|
-
flowType:
|
|
5899
|
+
flowType: import_client_fetch44.FlowType.Recovery,
|
|
5868
5900
|
components,
|
|
5869
5901
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_elements_react24.OryTwoStepCard, {})
|
|
5870
5902
|
}
|
|
@@ -5872,7 +5904,7 @@ function Recovery({
|
|
|
5872
5904
|
}
|
|
5873
5905
|
|
|
5874
5906
|
// src/theme/default/flows/registration.tsx
|
|
5875
|
-
var
|
|
5907
|
+
var import_client_fetch45 = require("@ory/client-fetch");
|
|
5876
5908
|
var import_elements_react25 = require("@ory/elements-react");
|
|
5877
5909
|
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
5878
5910
|
function Registration({
|
|
@@ -5887,7 +5919,7 @@ function Registration({
|
|
|
5887
5919
|
{
|
|
5888
5920
|
config,
|
|
5889
5921
|
flow,
|
|
5890
|
-
flowType:
|
|
5922
|
+
flowType: import_client_fetch45.FlowType.Registration,
|
|
5891
5923
|
components,
|
|
5892
5924
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_elements_react25.OryTwoStepCard, {})
|
|
5893
5925
|
}
|
|
@@ -5895,7 +5927,7 @@ function Registration({
|
|
|
5895
5927
|
}
|
|
5896
5928
|
|
|
5897
5929
|
// src/theme/default/flows/settings.tsx
|
|
5898
|
-
var
|
|
5930
|
+
var import_client_fetch46 = require("@ory/client-fetch");
|
|
5899
5931
|
var import_elements_react26 = require("@ory/elements-react");
|
|
5900
5932
|
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
5901
5933
|
function Settings({
|
|
@@ -5910,7 +5942,7 @@ function Settings({
|
|
|
5910
5942
|
{
|
|
5911
5943
|
config,
|
|
5912
5944
|
flow,
|
|
5913
|
-
flowType:
|
|
5945
|
+
flowType: import_client_fetch46.FlowType.Settings,
|
|
5914
5946
|
components,
|
|
5915
5947
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(import_jsx_runtime108.Fragment, { children: [
|
|
5916
5948
|
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_elements_react26.HeadlessPageHeader, {}),
|
|
@@ -5921,7 +5953,7 @@ function Settings({
|
|
|
5921
5953
|
}
|
|
5922
5954
|
|
|
5923
5955
|
// src/theme/default/flows/verification.tsx
|
|
5924
|
-
var
|
|
5956
|
+
var import_client_fetch47 = require("@ory/client-fetch");
|
|
5925
5957
|
var import_elements_react27 = require("@ory/elements-react");
|
|
5926
5958
|
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
5927
5959
|
function Verification({
|
|
@@ -5936,7 +5968,7 @@ function Verification({
|
|
|
5936
5968
|
{
|
|
5937
5969
|
config,
|
|
5938
5970
|
flow,
|
|
5939
|
-
flowType:
|
|
5971
|
+
flowType: import_client_fetch47.FlowType.Verification,
|
|
5940
5972
|
components,
|
|
5941
5973
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_elements_react27.OryTwoStepCard, {})
|
|
5942
5974
|
}
|
|
@@ -5944,11 +5976,11 @@ function Verification({
|
|
|
5944
5976
|
}
|
|
5945
5977
|
|
|
5946
5978
|
// src/theme/default/flows/consent.tsx
|
|
5947
|
-
var
|
|
5979
|
+
var import_client_fetch49 = require("@ory/client-fetch");
|
|
5948
5980
|
var import_elements_react28 = require("@ory/elements-react");
|
|
5949
5981
|
|
|
5950
5982
|
// src/theme/default/utils/oauth2.ts
|
|
5951
|
-
var
|
|
5983
|
+
var import_client_fetch48 = require("@ory/client-fetch");
|
|
5952
5984
|
var rememberCheckbox = {
|
|
5953
5985
|
type: "input",
|
|
5954
5986
|
group: "oauth2_consent",
|
|
@@ -5956,7 +5988,7 @@ var rememberCheckbox = {
|
|
|
5956
5988
|
label: {
|
|
5957
5989
|
id: 9999111,
|
|
5958
5990
|
text: "Remember my decision",
|
|
5959
|
-
type:
|
|
5991
|
+
type: import_client_fetch48.UiTextTypeEnum.Info
|
|
5960
5992
|
}
|
|
5961
5993
|
},
|
|
5962
5994
|
attributes: {
|
|
@@ -5975,7 +6007,7 @@ var acceptButton = {
|
|
|
5975
6007
|
label: {
|
|
5976
6008
|
id: 9999111,
|
|
5977
6009
|
text: "Accept",
|
|
5978
|
-
type:
|
|
6010
|
+
type: import_client_fetch48.UiTextTypeEnum.Info
|
|
5979
6011
|
}
|
|
5980
6012
|
},
|
|
5981
6013
|
attributes: {
|
|
@@ -5994,7 +6026,7 @@ var rejectButton = {
|
|
|
5994
6026
|
label: {
|
|
5995
6027
|
id: 9999111,
|
|
5996
6028
|
text: "Reject",
|
|
5997
|
-
type:
|
|
6029
|
+
type: import_client_fetch48.UiTextTypeEnum.Info
|
|
5998
6030
|
}
|
|
5999
6031
|
},
|
|
6000
6032
|
attributes: {
|
|
@@ -6041,7 +6073,7 @@ function scopesToUiNodes(scopes) {
|
|
|
6041
6073
|
label: {
|
|
6042
6074
|
id: 9999111,
|
|
6043
6075
|
text: scope,
|
|
6044
|
-
type:
|
|
6076
|
+
type: import_client_fetch48.UiTextTypeEnum.Info
|
|
6045
6077
|
}
|
|
6046
6078
|
},
|
|
6047
6079
|
attributes: {
|
|
@@ -6108,7 +6140,7 @@ function Consent({
|
|
|
6108
6140
|
{
|
|
6109
6141
|
config,
|
|
6110
6142
|
flow,
|
|
6111
|
-
flowType:
|
|
6143
|
+
flowType: import_client_fetch49.FlowType.OAuth2Consent,
|
|
6112
6144
|
components,
|
|
6113
6145
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_elements_react28.OryConsentCard, {})
|
|
6114
6146
|
}
|