@zitadel/sdk-react 0.1.0-alpha.13 → 0.1.0-alpha.14
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/dist/index.d.ts +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +47 -26
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { configureZitadel, getApi, getZitadelConfig, ZitadelConfig, ZitadelProject } from '@zitadel/api/config';
|
|
2
|
-
import { ZitadelLogin as ZitadelLoginElement, ZitadelLogout as ZitadelLogoutElement } from '@zitadel/components';
|
|
2
|
+
import { ZitadelLogin as ZitadelLoginElement, ZitadelLogout as ZitadelLogoutElement, ZitadelSession as ZitadelSessionElement } from '@zitadel/components';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
export { configureZitadel, getApi, getZitadelConfig };
|
|
5
5
|
export type { ZitadelConfig, ZitadelProject };
|
|
@@ -24,4 +24,13 @@ export declare const ZitadelLogin: React.ForwardRefExoticComponent<import('@zita
|
|
|
24
24
|
* so consumers can imperatively access the upgraded web component.
|
|
25
25
|
*/
|
|
26
26
|
export declare const ZitadelLogout: React.ForwardRefExoticComponent<import('@zitadel/sdk-core/types').ZitadelLogoutConfig & import('@zitadel/sdk-core/types').ZitadelLogoutHandlers & React.RefAttributes<ZitadelLogoutElement>>;
|
|
27
|
+
/**
|
|
28
|
+
* React component wrapping the `<zitadel-session>` web component — the
|
|
29
|
+
* post-sign-in "signed in as" card. Binds the `ZitadelProject` handle as a DOM
|
|
30
|
+
* property (or the discrete project id / proxy path as attributes) and forwards
|
|
31
|
+
* the widget's `zitadel-signout` event as an optional callback.
|
|
32
|
+
*
|
|
33
|
+
* A forwarded `ref` resolves to the underlying `<zitadel-session>` DOM element.
|
|
34
|
+
*/
|
|
35
|
+
export declare const ZitadelSession: React.ForwardRefExoticComponent<import('@zitadel/sdk-core/types').ZitadelSessionConfig & import('@zitadel/sdk-core/types').ZitadelSessionHandlers & React.RefAttributes<ZitadelSessionElement>>;
|
|
27
36
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,aAAa,IAAI,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,aAAa,IAAI,oBAAoB,EACrC,cAAc,IAAI,qBAAqB,EACxC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC;AAC9C,cAAc,SAAS,CAAC;AA0DxB;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,2LAiBxB,CAAC;AAIF;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,8LAUzB,CAAC;AAIF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,iMAU1B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,59 +1,80 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { createComponent as
|
|
3
|
-
import { configureZitadel as
|
|
4
|
-
import { ZitadelLogin as
|
|
2
|
+
import { createComponent as d } from "@lit/react";
|
|
3
|
+
import { configureZitadel as v, getApi as x, getZitadelConfig as y } from "@zitadel/api/config";
|
|
4
|
+
import { ZitadelLogin as m, ZitadelLogout as u, ZitadelSession as f } from "@zitadel/components";
|
|
5
5
|
import * as l from "react";
|
|
6
|
-
const
|
|
6
|
+
const c = d({
|
|
7
7
|
react: l,
|
|
8
8
|
tagName: "zitadel-login",
|
|
9
|
-
elementClass:
|
|
9
|
+
elementClass: m,
|
|
10
10
|
events: {
|
|
11
11
|
onZitadelFlowStep: "zitadel-flow-step",
|
|
12
12
|
onZitadelFlowInput: "zitadel-flow-input",
|
|
13
13
|
onZitadelFlowComplete: "zitadel-flow-complete",
|
|
14
14
|
onZitadelFlowError: "zitadel-flow-error"
|
|
15
15
|
}
|
|
16
|
-
}),
|
|
16
|
+
}), p = d({
|
|
17
17
|
react: l,
|
|
18
18
|
tagName: "zitadel-logout",
|
|
19
|
-
elementClass:
|
|
19
|
+
elementClass: u,
|
|
20
20
|
events: {
|
|
21
21
|
onZitadelSignout: "zitadel-signout"
|
|
22
22
|
}
|
|
23
|
-
}),
|
|
24
|
-
|
|
23
|
+
}), L = d({
|
|
24
|
+
react: l,
|
|
25
|
+
tagName: "zitadel-session",
|
|
26
|
+
elementClass: f,
|
|
27
|
+
events: {
|
|
28
|
+
onZitadelSignout: "zitadel-signout"
|
|
29
|
+
}
|
|
30
|
+
}), w = l.forwardRef(
|
|
31
|
+
function({ purpose: e, onFlowStep: i, onFlowInput: o, onFlowComplete: a, onFlowError: r, ...Z }, g) {
|
|
25
32
|
return /* @__PURE__ */ n(
|
|
26
|
-
|
|
33
|
+
c,
|
|
27
34
|
{
|
|
28
|
-
...
|
|
29
|
-
ref:
|
|
35
|
+
...Z,
|
|
36
|
+
ref: g,
|
|
30
37
|
purpose: e ?? "login",
|
|
31
|
-
onZitadelFlowStep:
|
|
32
|
-
onZitadelFlowInput:
|
|
38
|
+
onZitadelFlowStep: i && ((t) => i(t.detail)),
|
|
39
|
+
onZitadelFlowInput: o && ((t) => o(t.detail)),
|
|
33
40
|
onZitadelFlowComplete: a && ((t) => a(t.detail)),
|
|
34
|
-
onZitadelFlowError:
|
|
41
|
+
onZitadelFlowError: r && ((t) => r(t.detail))
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
w.displayName = "ZitadelLogin";
|
|
47
|
+
const z = l.forwardRef(
|
|
48
|
+
function({ onSignout: e, ...i }, o) {
|
|
49
|
+
return /* @__PURE__ */ n(
|
|
50
|
+
p,
|
|
51
|
+
{
|
|
52
|
+
...i,
|
|
53
|
+
ref: o,
|
|
54
|
+
onZitadelSignout: e && ((a) => e(a.detail))
|
|
35
55
|
}
|
|
36
56
|
);
|
|
37
57
|
}
|
|
38
58
|
);
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
function({ onSignout: e, ...
|
|
59
|
+
z.displayName = "ZitadelLogout";
|
|
60
|
+
const S = l.forwardRef(
|
|
61
|
+
function({ onSignout: e, ...i }, o) {
|
|
42
62
|
return /* @__PURE__ */ n(
|
|
43
|
-
|
|
63
|
+
L,
|
|
44
64
|
{
|
|
45
|
-
...
|
|
46
|
-
ref:
|
|
65
|
+
...i,
|
|
66
|
+
ref: o,
|
|
47
67
|
onZitadelSignout: e && ((a) => e(a.detail))
|
|
48
68
|
}
|
|
49
69
|
);
|
|
50
70
|
}
|
|
51
71
|
);
|
|
52
|
-
|
|
72
|
+
S.displayName = "ZitadelSession";
|
|
53
73
|
export {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
74
|
+
w as ZitadelLogin,
|
|
75
|
+
z as ZitadelLogout,
|
|
76
|
+
S as ZitadelSession,
|
|
77
|
+
v as configureZitadel,
|
|
57
78
|
x as getApi,
|
|
58
|
-
|
|
79
|
+
y as getZitadelConfig
|
|
59
80
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zitadel/sdk-react",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.14",
|
|
4
4
|
"description": "React components for the Zitadel auth UI (client-side SPA).",
|
|
5
5
|
"homepage": "https://github.com/zitadel/nextgen/tree/main/packages/sdk-react#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@lit/react": "^1.0.8",
|
|
30
|
-
"@zitadel/
|
|
31
|
-
"@zitadel/
|
|
32
|
-
"@zitadel/components": "0.1.0-alpha.
|
|
30
|
+
"@zitadel/api": "0.1.0-alpha.14",
|
|
31
|
+
"@zitadel/sdk-core": "0.1.0-alpha.14",
|
|
32
|
+
"@zitadel/components": "0.1.0-alpha.14"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": ">=18",
|