@ory/elements-react 1.0.0-next.34 → 1.0.0-next.37
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 +30 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +74 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +74 -19
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.d.mts +18 -4
- package/dist/theme/default/index.d.ts +18 -4
- package/dist/theme/default/index.js +2572 -71
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +2623 -72
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
## 1.0.0-next.37 (2025-03-12)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- correctly render test id for error card ([#386](https://github.com/ory/elements/pull/386))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Jonas Hungershausen
|
|
10
|
+
|
|
11
|
+
## 1.0.0-next.36 (2025-03-12)
|
|
12
|
+
|
|
13
|
+
### 🩹 Fixes
|
|
14
|
+
|
|
15
|
+
- handle error messages for selected methods ([#385](https://github.com/ory/elements/pull/385))
|
|
16
|
+
|
|
17
|
+
### ❤️ Thank You
|
|
18
|
+
|
|
19
|
+
- Pierre Caillaud @pcaillaudm
|
|
20
|
+
|
|
21
|
+
## 1.0.0-next.35 (2025-03-12)
|
|
22
|
+
|
|
23
|
+
### 🚀 Features
|
|
24
|
+
|
|
25
|
+
- add more intelligent error screen ([#383](https://github.com/ory/elements/pull/383))
|
|
26
|
+
|
|
27
|
+
### ❤️ Thank You
|
|
28
|
+
|
|
29
|
+
- Jonas Hungershausen
|
|
30
|
+
|
|
1
31
|
## 1.0.0-next.34 (2025-03-12)
|
|
2
32
|
|
|
3
33
|
### 🩹 Fixes
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -264,17 +264,24 @@ function parseStateFromFlow(flow) {
|
|
|
264
264
|
);
|
|
265
265
|
throw new Error("Unknown form state");
|
|
266
266
|
}
|
|
267
|
-
function formStateReducer(state, action) {
|
|
268
|
-
switch (action.type) {
|
|
269
|
-
case "action_flow_update":
|
|
270
|
-
return parseStateFromFlow(action.flow);
|
|
271
|
-
case "action_select_method":
|
|
272
|
-
return { current: "method_active", method: action.method };
|
|
273
|
-
}
|
|
274
|
-
return state;
|
|
275
|
-
}
|
|
276
267
|
function useFormStateReducer(flow) {
|
|
277
|
-
|
|
268
|
+
const action = parseStateFromFlow(flow);
|
|
269
|
+
const [selectedMethod, setSelectedMethod] = react.useState();
|
|
270
|
+
const formStateReducer = (state, action2) => {
|
|
271
|
+
switch (action2.type) {
|
|
272
|
+
case "action_flow_update": {
|
|
273
|
+
if (selectedMethod)
|
|
274
|
+
return { current: "method_active", method: selectedMethod };
|
|
275
|
+
return parseStateFromFlow(action2.flow);
|
|
276
|
+
}
|
|
277
|
+
case "action_select_method": {
|
|
278
|
+
setSelectedMethod(action2.method);
|
|
279
|
+
return { current: "method_active", method: action2.method };
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return state;
|
|
283
|
+
};
|
|
284
|
+
return react.useReducer(formStateReducer, action);
|
|
278
285
|
}
|
|
279
286
|
function useOryFlow() {
|
|
280
287
|
const ctx = react.useContext(OryFlowContext);
|
|
@@ -2003,7 +2010,13 @@ var en_default = {
|
|
|
2003
2010
|
"property.phone": "phone",
|
|
2004
2011
|
"property.username": "username",
|
|
2005
2012
|
"property.identifier": "identifier",
|
|
2006
|
-
"property.code": "code"
|
|
2013
|
+
"property.code": "code",
|
|
2014
|
+
"error.title.what-happened": "What happened?",
|
|
2015
|
+
"error.title.what-can-i-do": "What can I do?",
|
|
2016
|
+
"error.instructions": "Please try again in a few minutes or contact the website operator.",
|
|
2017
|
+
"error.footer.text": "When reporting this error, please include the following information:",
|
|
2018
|
+
"error.footer.copy": "Copy",
|
|
2019
|
+
"error.action.go-back": "Go back"
|
|
2007
2020
|
};
|
|
2008
2021
|
|
|
2009
2022
|
// src/locales/de.json
|
|
@@ -2268,7 +2281,13 @@ var de_default = {
|
|
|
2268
2281
|
"property.password": "Passwort",
|
|
2269
2282
|
"property.phone": "Telefon",
|
|
2270
2283
|
"property.code": "Code",
|
|
2271
|
-
"property.username": "Benutzername"
|
|
2284
|
+
"property.username": "Benutzername",
|
|
2285
|
+
"error.title.what-happened": "Was ist passiert?",
|
|
2286
|
+
"error.footer.copy": "Kopieren",
|
|
2287
|
+
"error.footer.text": "Bitte f\xFCgen Sie bei der Meldung dieses Fehlers die folgenden Informationen hinzu:",
|
|
2288
|
+
"error.instructions": "Bitte versuchen Sie es in wenigen Minuten erneut oder wenden Sie sich an den Website-Betreiber.",
|
|
2289
|
+
"error.title.what-can-i-do": "Was kann ich tun?",
|
|
2290
|
+
"error.action.go-back": "Zur\xFCck"
|
|
2272
2291
|
};
|
|
2273
2292
|
|
|
2274
2293
|
// src/locales/es.json
|
|
@@ -2284,7 +2303,7 @@ var es_default = {
|
|
|
2284
2303
|
"error.back-button": "Regresar",
|
|
2285
2304
|
"error.description": "Ocurri\xF3 un error con el siguiente mensaje:",
|
|
2286
2305
|
"error.support-email-link": "Si el problema persiste, por favor contacte a <a>{contactSupportEmail}</a>",
|
|
2287
|
-
"error.title": "
|
|
2306
|
+
"error.title": "",
|
|
2288
2307
|
"error.title-internal-server-error": "Error Interno del Servidor",
|
|
2289
2308
|
"error.title-not-found": "404 - P\xE1gina no encontrada",
|
|
2290
2309
|
"identities.messages.1010001": "Iniciar sesi\xF3n",
|
|
@@ -2533,7 +2552,13 @@ var es_default = {
|
|
|
2533
2552
|
"property.identifier": "",
|
|
2534
2553
|
"property.password": "",
|
|
2535
2554
|
"property.phone": "",
|
|
2536
|
-
"property.username": ""
|
|
2555
|
+
"property.username": "",
|
|
2556
|
+
"error.action.go-back": "",
|
|
2557
|
+
"error.footer.copy": "",
|
|
2558
|
+
"error.footer.text": "",
|
|
2559
|
+
"error.instructions": "",
|
|
2560
|
+
"error.title.what-can-i-do": "",
|
|
2561
|
+
"error.title.what-happened": ""
|
|
2537
2562
|
};
|
|
2538
2563
|
|
|
2539
2564
|
// src/locales/fr.json
|
|
@@ -2798,7 +2823,13 @@ var fr_default = {
|
|
|
2798
2823
|
"property.identifier": "",
|
|
2799
2824
|
"property.password": "",
|
|
2800
2825
|
"property.phone": "",
|
|
2801
|
-
"property.username": ""
|
|
2826
|
+
"property.username": "",
|
|
2827
|
+
"error.action.go-back": "",
|
|
2828
|
+
"error.footer.copy": "",
|
|
2829
|
+
"error.footer.text": "",
|
|
2830
|
+
"error.title.what-can-i-do": "",
|
|
2831
|
+
"error.title.what-happened": "",
|
|
2832
|
+
"error.instructions": ""
|
|
2802
2833
|
};
|
|
2803
2834
|
|
|
2804
2835
|
// src/locales/nl.json
|
|
@@ -3063,7 +3094,13 @@ var nl_default = {
|
|
|
3063
3094
|
"property.identifier": "",
|
|
3064
3095
|
"property.password": "",
|
|
3065
3096
|
"property.phone": "",
|
|
3066
|
-
"property.username": ""
|
|
3097
|
+
"property.username": "",
|
|
3098
|
+
"error.action.go-back": "",
|
|
3099
|
+
"error.footer.copy": "",
|
|
3100
|
+
"error.footer.text": "",
|
|
3101
|
+
"error.title.what-can-i-do": "",
|
|
3102
|
+
"error.title.what-happened": "",
|
|
3103
|
+
"error.instructions": ""
|
|
3067
3104
|
};
|
|
3068
3105
|
|
|
3069
3106
|
// src/locales/pl.json
|
|
@@ -3328,7 +3365,13 @@ var pl_default = {
|
|
|
3328
3365
|
"property.password": "",
|
|
3329
3366
|
"property.phone": "",
|
|
3330
3367
|
"property.username": "",
|
|
3331
|
-
"property.identifier": ""
|
|
3368
|
+
"property.identifier": "",
|
|
3369
|
+
"error.action.go-back": "",
|
|
3370
|
+
"error.footer.copy": "",
|
|
3371
|
+
"error.footer.text": "",
|
|
3372
|
+
"error.title.what-can-i-do": "",
|
|
3373
|
+
"error.title.what-happened": "",
|
|
3374
|
+
"error.instructions": ""
|
|
3332
3375
|
};
|
|
3333
3376
|
|
|
3334
3377
|
// src/locales/pt.json
|
|
@@ -3593,7 +3636,13 @@ var pt_default = {
|
|
|
3593
3636
|
"property.identifier": "",
|
|
3594
3637
|
"property.password": "",
|
|
3595
3638
|
"property.phone": "",
|
|
3596
|
-
"property.username": ""
|
|
3639
|
+
"property.username": "",
|
|
3640
|
+
"error.action.go-back": "",
|
|
3641
|
+
"error.footer.copy": "",
|
|
3642
|
+
"error.footer.text": "",
|
|
3643
|
+
"error.title.what-can-i-do": "",
|
|
3644
|
+
"error.title.what-happened": "",
|
|
3645
|
+
"error.instructions": ""
|
|
3597
3646
|
};
|
|
3598
3647
|
|
|
3599
3648
|
// src/locales/sv.json
|
|
@@ -3858,7 +3907,13 @@ var sv_default = {
|
|
|
3858
3907
|
"property.phone": "telefon",
|
|
3859
3908
|
"property.username": "anv\xE4ndarnamn",
|
|
3860
3909
|
"property.identifier": "identifier",
|
|
3861
|
-
"property.code": "kod"
|
|
3910
|
+
"property.code": "kod",
|
|
3911
|
+
"error.action.go-back": "",
|
|
3912
|
+
"error.footer.copy": "",
|
|
3913
|
+
"error.footer.text": "",
|
|
3914
|
+
"error.title.what-can-i-do": "",
|
|
3915
|
+
"error.title.what-happened": "",
|
|
3916
|
+
"error.instructions": ""
|
|
3862
3917
|
};
|
|
3863
3918
|
|
|
3864
3919
|
// src/locales/index.ts
|