@ory/elements-react 0.0.0-pr.5cdcf132 → 0.0.0-pr.6ecad3e0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/dist/index.d.mts +45 -18
- package/dist/index.d.ts +45 -18
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -6
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.js +138 -98
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +123 -83
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -48,13 +48,18 @@ var defaultNodeOrder = [
|
|
|
48
48
|
];
|
|
49
49
|
function defaultNodeSorter(a, b) {
|
|
50
50
|
var _a, _b;
|
|
51
|
+
const aIsCaptcha = a.group === "captcha";
|
|
52
|
+
const bIsCaptcha = b.group === "captcha";
|
|
53
|
+
const aIsSubmit = isUiNodeInputAttributes(a.attributes) && a.attributes.type === "submit";
|
|
54
|
+
const bIsSubmit = isUiNodeInputAttributes(b.attributes) && b.attributes.type === "submit";
|
|
55
|
+
if (aIsCaptcha && bIsSubmit) {
|
|
56
|
+
return -1;
|
|
57
|
+
}
|
|
58
|
+
if (bIsCaptcha && aIsSubmit) {
|
|
59
|
+
return 1;
|
|
60
|
+
}
|
|
51
61
|
const aGroupWeight = (_a = defaultNodeOrder.indexOf(a.group)) != null ? _a : 999;
|
|
52
62
|
const bGroupWeight = (_b = defaultNodeOrder.indexOf(b.group)) != null ? _b : 999;
|
|
53
|
-
if (b.group === "captcha" && isUiNodeInputAttributes(a.attributes) && a.attributes.type === "submit") {
|
|
54
|
-
return aGroupWeight - (bGroupWeight - 2);
|
|
55
|
-
} else if (a.group === "captcha" && isUiNodeInputAttributes(b.attributes) && b.attributes.type === "submit") {
|
|
56
|
-
return aGroupWeight - 2 - bGroupWeight;
|
|
57
|
-
}
|
|
58
63
|
return aGroupWeight - bGroupWeight;
|
|
59
64
|
}
|
|
60
65
|
var defaultGroupOrder = [
|
|
@@ -563,6 +568,7 @@ function frontendClient(sdkUrl, opts = {}) {
|
|
|
563
568
|
const config = new Configuration({
|
|
564
569
|
...opts,
|
|
565
570
|
basePath: sdkUrl,
|
|
571
|
+
credentials: "include",
|
|
566
572
|
headers: {
|
|
567
573
|
Accept: "application/json",
|
|
568
574
|
...opts.headers
|
|
@@ -1229,7 +1235,7 @@ function OryTwoStepCardStateMethodActive({
|
|
|
1229
1235
|
onAfterSubmit: handleAfterFormSubmit(dispatchFormState),
|
|
1230
1236
|
children: /* @__PURE__ */ jsxs(Form.Group, { children: [
|
|
1231
1237
|
ui.nodes.filter(
|
|
1232
|
-
(n) => isUiNodeScriptAttributes(n.attributes) || n.group === UiNodeGroupEnum.
|
|
1238
|
+
(n) => isUiNodeScriptAttributes(n.attributes) || n.group === UiNodeGroupEnum.Default || n.group === UiNodeGroupEnum.Profile
|
|
1233
1239
|
).map((node, k) => /* @__PURE__ */ jsx(Node, { node }, k)),
|
|
1234
1240
|
finalNodes.sort(sortNodes).map((node, k) => /* @__PURE__ */ jsx(Node, { node }, k))
|
|
1235
1241
|
] })
|