@atls/react-kratos-browser-flows 0.0.2 → 0.1.0
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 +23 -0
- package/dist/flows/abstract.flow.d.ts +29 -0
- package/dist/flows/abstract.flow.js +26 -31
- package/dist/flows/errors.flow.d.ts +5 -0
- package/dist/flows/errors.flow.js +1 -1
- package/dist/flows/flow.interfaces.d.ts +32 -0
- package/dist/flows/index.d.ts +8 -0
- package/dist/flows/index.js +5 -2
- package/dist/flows/kratos.client.d.ts +4 -0
- package/dist/flows/login.flow.d.ts +7 -0
- package/dist/flows/login.flow.js +2 -1
- package/dist/flows/logout.flow.d.ts +5 -0
- package/dist/flows/recovery.flow.d.ts +7 -0
- package/dist/flows/recovery.flow.js +2 -1
- package/dist/flows/registration.flow.d.ts +7 -0
- package/dist/flows/registration.flow.js +2 -1
- package/dist/flows/settings.flow.d.ts +7 -0
- package/dist/flows/settings.flow.js +2 -1
- package/dist/flows/verification.flow.d.ts +7 -0
- package/dist/flows/verification.flow.js +2 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +5 -1
- package/dist/providers/flows.context.d.ts +3 -0
- package/dist/providers/index.d.ts +9 -0
- package/dist/providers/index.js +5 -1
- package/dist/providers/kraots-logout-flow.provider.d.ts +3 -0
- package/dist/providers/kraots-logout-flow.provider.js +2 -5
- package/dist/providers/kratos-errors-flow.provider.d.ts +3 -0
- package/dist/providers/kratos-errors-flow.provider.js +2 -5
- package/dist/providers/kratos-flow.provider.d.ts +9 -0
- package/dist/providers/kratos-flow.provider.js +23 -30
- package/dist/providers/kratos-login-flow.provider.d.ts +3 -0
- package/dist/providers/kratos-login-flow.provider.js +2 -5
- package/dist/providers/kratos-recovery-flow.provider.d.ts +3 -0
- package/dist/providers/kratos-recovery-flow.provider.js +2 -5
- package/dist/providers/kratos-registration-flow.provider.d.ts +3 -0
- package/dist/providers/kratos-registration-flow.provider.js +2 -5
- package/dist/providers/kratos-settings-flow.provider.d.ts +3 -0
- package/dist/providers/kratos-settings-flow.provider.js +2 -5
- package/dist/providers/kratos-verification-flow.provider.d.ts +3 -0
- package/dist/providers/kratos-verification-flow.provider.js +2 -5
- package/dist/providers/use-flow.hook.d.ts +2 -0
- package/dist/providers/use-flow.hook.js +1 -1
- package/dist/ui/flow-error.component.d.ts +13 -0
- package/dist/ui/flow-form.component.d.ts +6 -0
- package/dist/ui/flow-form.component.js +4 -7
- package/dist/ui/flow-messages.component.d.ts +7 -0
- package/dist/ui/flow-messages.component.js +1 -1
- package/dist/ui/flow-node-messages.component.d.ts +8 -0
- package/dist/ui/flow-node.component.d.ts +11 -0
- package/dist/ui/flow-node.component.js +1 -1
- package/dist/ui/flow-nodes-group.component.d.ts +8 -0
- package/dist/ui/flow-submit.component.d.ts +8 -0
- package/dist/ui/flow-submit.component.js +1 -1
- package/dist/ui/index.d.ts +7 -0
- package/dist/ui/index.js +5 -1
- package/package.json +11 -14
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Unreleased
|
|
2
|
+
|
|
3
|
+
### Migration notes
|
|
4
|
+
|
|
5
|
+
- `Flow#getState()` is now typed as `State | undefined`, reflecting its existing runtime value before a flow is loaded. Repository consumers use `hasState()`, optional handling, or the guarded submit paths; external consumers must handle the pre-load state explicitly.
|
|
6
|
+
- `FlowName` now includes `logout`, matching the existing logout provider without a type assertion. External exhaustive `FlowName` handling must include the new member.
|
|
7
|
+
|
|
8
|
+
## 0.0.3 (2025-01-22)
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
- **react:** lint and typecheck errors ([a090051](https://github.com/atls/reactjs/commit/a090051d1007e171df8066e85f15fcf8fd44c4ed))
|
|
13
|
+
- upgrade react, types fixes ([34feb02](https://github.com/atls/reactjs/commit/34feb027a2e2d7e5741509fd1ff846755d217b97))
|
|
14
|
+
- upgrade yarn, typescript, set resolutions ([b235334](https://github.com/atls/reactjs/commit/b23533417af6fb323187ef281b83d8dc5e7bd9dd))
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
- add emotion as deps, bump @types/react ([1ce29b3](https://github.com/atls/reactjs/commit/1ce29b384640d9be0550d9c6f4dc07083821137a))
|
|
19
|
+
- **common:** bump yarn ([#143](https://github.com/atls/reactjs/issues/143)) ([8239f82](https://github.com/atls/reactjs/commit/8239f82f1c85d872a99613d3693babc761703b05))
|
|
20
|
+
- **kratos:** remove form, add browser flow ([65f61dd](https://github.com/atls/reactjs/commit/65f61dd5e8e80fd1b3eb0dc848ba4d7a7b8b0e9c))
|
|
21
|
+
- react bump ([#144](https://github.com/atls/reactjs/issues/144)) ([9770fa1](https://github.com/atls/reactjs/commit/9770fa10451b647ed48e226270da68228714d174))
|
|
22
|
+
- update kratos browser flows to client 0.8.2 ([52f9c0f](https://github.com/atls/reactjs/commit/52f9c0fa129cd7d4567ab826c754483a6ddd6817))
|
|
23
|
+
- upgraded ([71a06f6](https://github.com/atls/reactjs/commit/71a06f6f498c928ed33b79f93af5d398a32af487))
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { UiNode } from '@ory/kratos-client';
|
|
2
|
+
import type { UiText } from '@ory/kratos-client';
|
|
3
|
+
import type { SubmitSelfServiceFlowBody } from './flow.interfaces';
|
|
4
|
+
import type { SelfServiceFlow } from './flow.interfaces';
|
|
5
|
+
import type { Flow } from './flow.interfaces';
|
|
6
|
+
import type { KratosClient } from './kratos.client';
|
|
7
|
+
import { EventEmitter } from 'events';
|
|
8
|
+
export declare abstract class AbstractFlow<State extends SelfServiceFlow, Body extends SubmitSelfServiceFlowBody> extends EventEmitter implements Flow {
|
|
9
|
+
#private;
|
|
10
|
+
protected readonly client: KratosClient;
|
|
11
|
+
constructor(client: KratosClient);
|
|
12
|
+
setLoading(loading: boolean): void;
|
|
13
|
+
isLoading(): boolean;
|
|
14
|
+
setState(state: SelfServiceFlow): void;
|
|
15
|
+
hasState(): boolean;
|
|
16
|
+
getState(): State | undefined;
|
|
17
|
+
getMessages(): Array<UiText>;
|
|
18
|
+
getNode(name: string): UiNode | undefined;
|
|
19
|
+
getNodes(name: string): Array<UiNode>;
|
|
20
|
+
getNodesGroup(group: string): Array<UiNode>;
|
|
21
|
+
getValue(name: string): string;
|
|
22
|
+
getValues(): Body;
|
|
23
|
+
setValue(name: string, value: string): void;
|
|
24
|
+
protected setValues(state: State): void;
|
|
25
|
+
protected requireState(): State;
|
|
26
|
+
protected complete(href?: string): void;
|
|
27
|
+
abstract load(): Promise<void>;
|
|
28
|
+
abstract submit(method?: string): Promise<void>;
|
|
29
|
+
}
|
|
@@ -1,75 +1,70 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
-
};
|
|
8
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
-
};
|
|
13
|
-
var _AbstractFlow_values, _AbstractFlow_state, _AbstractFlow_loading;
|
|
14
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
3
|
exports.AbstractFlow = void 0;
|
|
16
4
|
const events_1 = require("events");
|
|
17
5
|
class AbstractFlow extends events_1.EventEmitter {
|
|
6
|
+
client;
|
|
7
|
+
#values = {};
|
|
8
|
+
#state;
|
|
9
|
+
#loading = false;
|
|
18
10
|
constructor(client) {
|
|
19
11
|
super();
|
|
20
12
|
this.client = client;
|
|
21
|
-
_AbstractFlow_values.set(this, {});
|
|
22
|
-
_AbstractFlow_state.set(this, void 0);
|
|
23
|
-
_AbstractFlow_loading.set(this, false);
|
|
24
13
|
this.setMaxListeners(50);
|
|
25
14
|
}
|
|
26
15
|
setLoading(loading) {
|
|
27
|
-
|
|
16
|
+
this.#loading = loading;
|
|
28
17
|
}
|
|
29
18
|
isLoading() {
|
|
30
|
-
return
|
|
19
|
+
return this.#loading;
|
|
31
20
|
}
|
|
32
21
|
setState(state) {
|
|
33
|
-
|
|
22
|
+
this.#state = state;
|
|
34
23
|
}
|
|
35
24
|
hasState() {
|
|
36
|
-
return Boolean(
|
|
25
|
+
return Boolean(this.#state);
|
|
37
26
|
}
|
|
38
27
|
getState() {
|
|
39
|
-
return
|
|
28
|
+
return this.#state;
|
|
40
29
|
}
|
|
41
30
|
getMessages() {
|
|
42
|
-
return
|
|
31
|
+
return this.#state?.ui.messages || [];
|
|
43
32
|
}
|
|
44
33
|
getNode(name) {
|
|
45
|
-
return
|
|
34
|
+
return this.#state?.ui.nodes.find((node) => node.attributes.name === name);
|
|
46
35
|
}
|
|
47
36
|
getNodes(name) {
|
|
48
|
-
return (
|
|
37
|
+
return (this.#state?.ui.nodes.filter((node) => node.attributes.name === name) || []);
|
|
49
38
|
}
|
|
50
39
|
getNodesGroup(group) {
|
|
51
|
-
return
|
|
40
|
+
return this.#state?.ui.nodes.filter((node) => node.group === group) || [];
|
|
52
41
|
}
|
|
53
42
|
getValue(name) {
|
|
54
|
-
return
|
|
43
|
+
return this.#values[name];
|
|
55
44
|
}
|
|
56
45
|
getValues() {
|
|
57
|
-
return
|
|
46
|
+
return this.#values;
|
|
58
47
|
}
|
|
59
48
|
setValue(name, value) {
|
|
60
|
-
|
|
49
|
+
this.#values[name] = value;
|
|
61
50
|
}
|
|
62
51
|
setValues(state) {
|
|
63
|
-
state
|
|
64
|
-
if (!
|
|
65
|
-
|
|
52
|
+
state.ui.nodes.forEach(({ attributes }) => {
|
|
53
|
+
if (!this.#values[attributes.name]) {
|
|
54
|
+
this.#values[attributes.name] =
|
|
66
55
|
attributes.value || '';
|
|
67
56
|
}
|
|
68
57
|
});
|
|
69
58
|
}
|
|
59
|
+
requireState() {
|
|
60
|
+
const state = this.getState();
|
|
61
|
+
if (!state) {
|
|
62
|
+
throw new Error('Flow state is not loaded');
|
|
63
|
+
}
|
|
64
|
+
return state;
|
|
65
|
+
}
|
|
70
66
|
complete(href = '/') {
|
|
71
67
|
window.location.href = href;
|
|
72
68
|
}
|
|
73
69
|
}
|
|
74
70
|
exports.AbstractFlow = AbstractFlow;
|
|
75
|
-
_AbstractFlow_values = new WeakMap(), _AbstractFlow_state = new WeakMap(), _AbstractFlow_loading = new WeakMap();
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SelfServiceRegistrationFlow } from '@ory/kratos-client';
|
|
2
|
+
import type { SelfServiceVerificationFlow } from '@ory/kratos-client';
|
|
3
|
+
import type { SelfServiceRecoveryFlow } from '@ory/kratos-client';
|
|
4
|
+
import type { SelfServiceSettingsFlow } from '@ory/kratos-client';
|
|
5
|
+
import type { SelfServiceLoginFlow } from '@ory/kratos-client';
|
|
6
|
+
import type { SubmitSelfServiceRegistrationFlowBody } from '@ory/kratos-client';
|
|
7
|
+
import type { SubmitSelfServiceVerificationFlowBody } from '@ory/kratos-client';
|
|
8
|
+
import type { SubmitSelfServiceRecoveryFlowBody } from '@ory/kratos-client';
|
|
9
|
+
import type { SubmitSelfServiceSettingsFlowBody } from '@ory/kratos-client';
|
|
10
|
+
import type { SubmitSelfServiceLoginFlowBody } from '@ory/kratos-client';
|
|
11
|
+
import type { UiText } from '@ory/kratos-client';
|
|
12
|
+
import type { UiNode } from '@ory/kratos-client';
|
|
13
|
+
import type { EventEmitter } from 'events';
|
|
14
|
+
export type FlowName = 'errors' | 'login' | 'logout' | 'recovery' | 'registration' | 'settings' | 'verification';
|
|
15
|
+
export type SelfServiceFlow = SelfServiceLoginFlow | SelfServiceRecoveryFlow | SelfServiceRegistrationFlow | SelfServiceSettingsFlow | SelfServiceVerificationFlow;
|
|
16
|
+
export type SubmitSelfServiceFlowBody = SubmitSelfServiceLoginFlowBody | SubmitSelfServiceRecoveryFlowBody | SubmitSelfServiceRegistrationFlowBody | SubmitSelfServiceSettingsFlowBody | SubmitSelfServiceVerificationFlowBody;
|
|
17
|
+
export interface Flow extends EventEmitter {
|
|
18
|
+
setLoading: (loading: boolean) => void;
|
|
19
|
+
isLoading: () => boolean;
|
|
20
|
+
setState: (state: SelfServiceFlow) => void;
|
|
21
|
+
hasState: () => boolean;
|
|
22
|
+
getState: () => SelfServiceFlow | undefined;
|
|
23
|
+
getMessages: () => Array<UiText>;
|
|
24
|
+
getNode: (name: string) => UiNode | undefined;
|
|
25
|
+
getNodes: (name: string) => Array<UiNode>;
|
|
26
|
+
getNodesGroup: (group: string) => Array<UiNode>;
|
|
27
|
+
getValue: (name: string) => any;
|
|
28
|
+
setValue: (name: string, value: string) => void;
|
|
29
|
+
getValues: () => SubmitSelfServiceFlowBody;
|
|
30
|
+
load: () => Promise<void>;
|
|
31
|
+
submit: (method?: string) => Promise<void>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type * from './flow.interfaces';
|
|
2
|
+
export * from './registration.flow';
|
|
3
|
+
export * from './verification.flow';
|
|
4
|
+
export * from './recovery.flow';
|
|
5
|
+
export * from './settings.flow';
|
|
6
|
+
export * from './errors.flow';
|
|
7
|
+
export * from './login.flow';
|
|
8
|
+
export * from './logout.flow';
|
package/dist/flows/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -10,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./flow.interfaces"), exports);
|
|
14
17
|
__exportStar(require("./registration.flow"), exports);
|
|
15
18
|
__exportStar(require("./verification.flow"), exports);
|
|
16
19
|
__exportStar(require("./recovery.flow"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SelfServiceLoginFlow } from '@ory/kratos-client';
|
|
2
|
+
import type { SubmitSelfServiceLoginFlowBody } from '@ory/kratos-client';
|
|
3
|
+
import { AbstractFlow } from './abstract.flow';
|
|
4
|
+
export declare class LoginFlow extends AbstractFlow<SelfServiceLoginFlow, SubmitSelfServiceLoginFlowBody> {
|
|
5
|
+
load(): Promise<void>;
|
|
6
|
+
submit(method?: string): Promise<void>;
|
|
7
|
+
}
|
package/dist/flows/login.flow.js
CHANGED
|
@@ -39,12 +39,13 @@ class LoginFlow extends abstract_flow_1.AbstractFlow {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
async submit(method) {
|
|
42
|
+
const state = this.requireState();
|
|
42
43
|
const body = this.getValues();
|
|
43
44
|
if (method) {
|
|
44
45
|
body.method = method;
|
|
45
46
|
}
|
|
46
47
|
try {
|
|
47
|
-
await this.client.submitSelfServiceLoginFlow(
|
|
48
|
+
await this.client.submitSelfServiceLoginFlow(state.id, undefined, body, {
|
|
48
49
|
withCredentials: true,
|
|
49
50
|
});
|
|
50
51
|
this.complete();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SelfServiceRecoveryFlow } from '@ory/kratos-client';
|
|
2
|
+
import type { SubmitSelfServiceRecoveryFlowBody } from '@ory/kratos-client';
|
|
3
|
+
import { AbstractFlow } from './abstract.flow';
|
|
4
|
+
export declare class RecoveryFlow extends AbstractFlow<SelfServiceRecoveryFlow, SubmitSelfServiceRecoveryFlowBody> {
|
|
5
|
+
load(): Promise<void>;
|
|
6
|
+
submit(method?: string): Promise<void>;
|
|
7
|
+
}
|
|
@@ -44,12 +44,13 @@ class RecoveryFlow extends abstract_flow_1.AbstractFlow {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
async submit(method) {
|
|
47
|
+
const state = this.requireState();
|
|
47
48
|
const body = this.getValues();
|
|
48
49
|
if (method) {
|
|
49
50
|
body.method = method;
|
|
50
51
|
}
|
|
51
52
|
try {
|
|
52
|
-
const { data } = await this.client.submitSelfServiceRecoveryFlow(
|
|
53
|
+
const { data } = await this.client.submitSelfServiceRecoveryFlow(state.id, undefined, body, {
|
|
53
54
|
withCredentials: true,
|
|
54
55
|
});
|
|
55
56
|
this.setState(data);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SelfServiceRegistrationFlow } from '@ory/kratos-client';
|
|
2
|
+
import type { SubmitSelfServiceRegistrationFlowBody } from '@ory/kratos-client';
|
|
3
|
+
import { AbstractFlow } from './abstract.flow';
|
|
4
|
+
export declare class RegistrationFlow extends AbstractFlow<SelfServiceRegistrationFlow, SubmitSelfServiceRegistrationFlowBody> {
|
|
5
|
+
load(): Promise<void>;
|
|
6
|
+
submit(method?: string): Promise<void>;
|
|
7
|
+
}
|
|
@@ -44,12 +44,13 @@ class RegistrationFlow extends abstract_flow_1.AbstractFlow {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
async submit(method) {
|
|
47
|
+
const state = this.requireState();
|
|
47
48
|
const body = this.getValues();
|
|
48
49
|
if (method) {
|
|
49
50
|
body.method = method;
|
|
50
51
|
}
|
|
51
52
|
try {
|
|
52
|
-
await this.client.submitSelfServiceRegistrationFlow(
|
|
53
|
+
await this.client.submitSelfServiceRegistrationFlow(state.id, body, {
|
|
53
54
|
withCredentials: true,
|
|
54
55
|
});
|
|
55
56
|
this.complete();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SelfServiceSettingsFlow } from '@ory/kratos-client';
|
|
2
|
+
import type { SubmitSelfServiceSettingsFlowBody } from '@ory/kratos-client';
|
|
3
|
+
import { AbstractFlow } from './abstract.flow';
|
|
4
|
+
export declare class SettingsFlow extends AbstractFlow<SelfServiceSettingsFlow, SubmitSelfServiceSettingsFlowBody> {
|
|
5
|
+
load(): Promise<void>;
|
|
6
|
+
submit(method?: string): Promise<void>;
|
|
7
|
+
}
|
|
@@ -42,12 +42,13 @@ class SettingsFlow extends abstract_flow_1.AbstractFlow {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
async submit(method) {
|
|
45
|
+
const state = this.requireState();
|
|
45
46
|
const body = this.getValues();
|
|
46
47
|
if (method) {
|
|
47
48
|
body.method = method;
|
|
48
49
|
}
|
|
49
50
|
try {
|
|
50
|
-
const { data } = await this.client.submitSelfServiceSettingsFlow(
|
|
51
|
+
const { data } = await this.client.submitSelfServiceSettingsFlow(state.id, undefined, body, {
|
|
51
52
|
withCredentials: true,
|
|
52
53
|
});
|
|
53
54
|
this.setState(data);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SelfServiceVerificationFlow } from '@ory/kratos-client';
|
|
2
|
+
import type { SubmitSelfServiceVerificationFlowBody } from '@ory/kratos-client';
|
|
3
|
+
import { AbstractFlow } from './abstract.flow';
|
|
4
|
+
export declare class VerificationFlow extends AbstractFlow<SelfServiceVerificationFlow, SubmitSelfServiceVerificationFlowBody> {
|
|
5
|
+
load(): Promise<void>;
|
|
6
|
+
submit(method?: string): Promise<void>;
|
|
7
|
+
}
|
|
@@ -42,12 +42,13 @@ class VerificationFlow extends abstract_flow_1.AbstractFlow {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
async submit(method) {
|
|
45
|
+
const state = this.requireState();
|
|
45
46
|
const body = this.getValues();
|
|
46
47
|
if (method) {
|
|
47
48
|
body.method = method;
|
|
48
49
|
}
|
|
49
50
|
try {
|
|
50
|
-
const { data } = await this.client.submitSelfServiceVerificationFlow(
|
|
51
|
+
const { data } = await this.client.submitSelfServiceVerificationFlow(state.id, undefined, body, {
|
|
51
52
|
withCredentials: true,
|
|
52
53
|
});
|
|
53
54
|
this.setState(data);
|
package/dist/index.d.ts
ADDED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './kratos-registration-flow.provider';
|
|
2
|
+
export * from './kratos-verification-flow.provider';
|
|
3
|
+
export * from './kratos-recovery-flow.provider';
|
|
4
|
+
export * from './kratos-settings-flow.provider';
|
|
5
|
+
export * from './kratos-errors-flow.provider';
|
|
6
|
+
export * from './kraots-logout-flow.provider';
|
|
7
|
+
export * from './kratos-login-flow.provider';
|
|
8
|
+
export * from './kratos-flow.provider';
|
|
9
|
+
export * from './use-flow.hook';
|
package/dist/providers/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.KratosLogoutFlowProvider = void 0;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const kratos_flow_provider_1 = require("./kratos-flow.provider");
|
|
9
|
-
const KratosLogoutFlowProvider = (props) =>
|
|
6
|
+
const KratosLogoutFlowProvider = (props) => ((0, jsx_runtime_1.jsx)(kratos_flow_provider_1.KratosFlowProvider, { ...props, name: 'logout' }));
|
|
10
7
|
exports.KratosLogoutFlowProvider = KratosLogoutFlowProvider;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.KratosErrorsFlowProvider = void 0;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const kratos_flow_provider_1 = require("./kratos-flow.provider");
|
|
9
|
-
const KratosErrorsFlowProvider = (props) =>
|
|
6
|
+
const KratosErrorsFlowProvider = (props) => ((0, jsx_runtime_1.jsx)(kratos_flow_provider_1.KratosFlowProvider, { ...props, name: 'errors' }));
|
|
10
7
|
exports.KratosErrorsFlowProvider = KratosErrorsFlowProvider;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { FC } from 'react';
|
|
3
|
+
import type { FlowName } from '../flows/flow.interfaces';
|
|
4
|
+
export interface KratosFlowProviderProps {
|
|
5
|
+
basePath?: string;
|
|
6
|
+
name: FlowName;
|
|
7
|
+
children: Array<ReactNode> | ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const KratosFlowProvider: FC<KratosFlowProviderProps>;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.KratosFlowProvider = void 0;
|
|
7
|
-
const
|
|
8
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
9
6
|
const errors_flow_1 = require("../flows/errors.flow");
|
|
10
7
|
const kratos_client_1 = require("../flows/kratos.client");
|
|
11
8
|
const login_flow_1 = require("../flows/login.flow");
|
|
@@ -15,32 +12,28 @@ const registration_flow_1 = require("../flows/registration.flow");
|
|
|
15
12
|
const settings_flow_1 = require("../flows/settings.flow");
|
|
16
13
|
const verification_flow_1 = require("../flows/verification.flow");
|
|
17
14
|
const flows_context_1 = require("./flows.context");
|
|
18
|
-
const KratosFlowProvider = ({ name, basePath, children }) => {
|
|
19
|
-
const client = (0,
|
|
20
|
-
const flow = (0,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
if (name === 'logout') {
|
|
40
|
-
return new logout_flow_1.LogoutFlow(client);
|
|
15
|
+
const KratosFlowProvider = ({ name, basePath, children, }) => {
|
|
16
|
+
const client = (0, react_1.useMemo)(() => new kratos_client_1.KratosClient(basePath), [basePath]);
|
|
17
|
+
const flow = (0, react_1.useMemo)(() => {
|
|
18
|
+
switch (name) {
|
|
19
|
+
case 'login':
|
|
20
|
+
return new login_flow_1.LoginFlow(client);
|
|
21
|
+
case 'registration':
|
|
22
|
+
return new registration_flow_1.RegistrationFlow(client);
|
|
23
|
+
case 'verification':
|
|
24
|
+
return new verification_flow_1.VerificationFlow(client);
|
|
25
|
+
case 'recovery':
|
|
26
|
+
return new recovery_flow_1.RecoveryFlow(client);
|
|
27
|
+
case 'settings':
|
|
28
|
+
return new settings_flow_1.SettingsFlow(client);
|
|
29
|
+
case 'errors':
|
|
30
|
+
return new errors_flow_1.ErrorsFlow(client);
|
|
31
|
+
case 'logout':
|
|
32
|
+
return new logout_flow_1.LogoutFlow(client);
|
|
33
|
+
default:
|
|
34
|
+
throw new Error(`Unkown flow: ${name}`);
|
|
41
35
|
}
|
|
42
|
-
throw new Error(`Unkown flow: ${name}`);
|
|
43
36
|
}, [name, client]);
|
|
44
|
-
return
|
|
37
|
+
return (0, jsx_runtime_1.jsx)(flows_context_1.Provider, { value: flow, children: children });
|
|
45
38
|
};
|
|
46
39
|
exports.KratosFlowProvider = KratosFlowProvider;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.KratosLoginFlowProvider = void 0;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const kratos_flow_provider_1 = require("./kratos-flow.provider");
|
|
9
|
-
const KratosLoginFlowProvider = (props) =>
|
|
6
|
+
const KratosLoginFlowProvider = (props) => ((0, jsx_runtime_1.jsx)(kratos_flow_provider_1.KratosFlowProvider, { ...props, name: 'login' }));
|
|
10
7
|
exports.KratosLoginFlowProvider = KratosLoginFlowProvider;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.KratosRecoveryFlowProvider = void 0;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const kratos_flow_provider_1 = require("./kratos-flow.provider");
|
|
9
|
-
const KratosRecoveryFlowProvider = (props) => (
|
|
6
|
+
const KratosRecoveryFlowProvider = (props) => ((0, jsx_runtime_1.jsx)(kratos_flow_provider_1.KratosFlowProvider, { ...props, name: 'recovery' }));
|
|
10
7
|
exports.KratosRecoveryFlowProvider = KratosRecoveryFlowProvider;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.KratosRegistrationFlowProvider = void 0;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const kratos_flow_provider_1 = require("./kratos-flow.provider");
|
|
9
|
-
const KratosRegistrationFlowProvider = (props) => (
|
|
6
|
+
const KratosRegistrationFlowProvider = (props) => (0, jsx_runtime_1.jsx)(kratos_flow_provider_1.KratosFlowProvider, { ...props, name: 'registration' });
|
|
10
7
|
exports.KratosRegistrationFlowProvider = KratosRegistrationFlowProvider;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.KratosSettingsFlowProvider = void 0;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const kratos_flow_provider_1 = require("./kratos-flow.provider");
|
|
9
|
-
const KratosSettingsFlowProvider = (props) => (
|
|
6
|
+
const KratosSettingsFlowProvider = (props) => ((0, jsx_runtime_1.jsx)(kratos_flow_provider_1.KratosFlowProvider, { ...props, name: 'settings' }));
|
|
10
7
|
exports.KratosSettingsFlowProvider = KratosSettingsFlowProvider;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.KratosVerificationFlowProvider = void 0;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const kratos_flow_provider_1 = require("./kratos-flow.provider");
|
|
9
|
-
const KratosVerificationFlowProvider = (props) => (
|
|
6
|
+
const KratosVerificationFlowProvider = (props) => (0, jsx_runtime_1.jsx)(kratos_flow_provider_1.KratosFlowProvider, { ...props, name: 'verification' });
|
|
10
7
|
exports.KratosVerificationFlowProvider = KratosVerificationFlowProvider;
|
|
@@ -10,7 +10,7 @@ const useFlow = () => {
|
|
|
10
10
|
if (!flow) {
|
|
11
11
|
throw new Error('Missing <KratosFlowProvider>');
|
|
12
12
|
}
|
|
13
|
-
const [, setState] = (0, react_3.useState)(null);
|
|
13
|
+
const [state, setState] = (0, react_3.useState)(null);
|
|
14
14
|
(0, react_2.useEffect)(() => {
|
|
15
15
|
flow.load();
|
|
16
16
|
const callback = (flowState) => {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { FC } from 'react';
|
|
3
|
+
interface SelfServiceErrorProps {
|
|
4
|
+
code?: number;
|
|
5
|
+
status?: string;
|
|
6
|
+
reason?: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface FlowErrorProps {
|
|
10
|
+
children: (error: SelfServiceErrorProps) => ReactElement;
|
|
11
|
+
}
|
|
12
|
+
export declare const FlowError: FC<FlowErrorProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
import type { FC } from 'react';
|
|
4
|
+
export interface FlowFormProps extends HTMLAttributes<HTMLFormElement> {
|
|
5
|
+
}
|
|
6
|
+
export declare const FlowForm: FC<PropsWithChildren<FlowFormProps>>;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.FlowForm = void 0;
|
|
7
|
-
const
|
|
8
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
9
6
|
const providers_1 = require("../providers");
|
|
10
7
|
const FlowForm = ({ children, ...props }) => {
|
|
11
8
|
const flow = (0, providers_1.useFlow)();
|
|
12
|
-
const ui = (0,
|
|
9
|
+
const ui = (0, react_1.useMemo)(() => flow.getState()?.ui, [flow.getState()]);
|
|
13
10
|
if (!ui) {
|
|
14
11
|
return null;
|
|
15
12
|
}
|
|
16
|
-
return (
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("form", { ...props, action: ui.action, method: ui.method, children: children }));
|
|
17
14
|
};
|
|
18
15
|
exports.FlowForm = FlowForm;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UiText } from '@ory/kratos-client';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import type { FC } from 'react';
|
|
4
|
+
export interface FlowMessagesProps {
|
|
5
|
+
children: (messages: Array<UiText>) => ReactElement;
|
|
6
|
+
}
|
|
7
|
+
export declare const FlowMessages: FC<FlowMessagesProps>;
|
|
@@ -5,7 +5,7 @@ const providers_1 = require("../providers");
|
|
|
5
5
|
const FlowMessages = ({ children }) => {
|
|
6
6
|
const flow = (0, providers_1.useFlow)();
|
|
7
7
|
const messages = flow.getMessages();
|
|
8
|
-
if (typeof children === 'function'
|
|
8
|
+
if (typeof children === 'function') {
|
|
9
9
|
return children(messages);
|
|
10
10
|
}
|
|
11
11
|
return null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { UiText } from '@ory/kratos-client';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import type { FC } from 'react';
|
|
4
|
+
export interface FlowNodeMessagesProps {
|
|
5
|
+
name: string;
|
|
6
|
+
children: (messages: Array<UiText>) => ReactElement;
|
|
7
|
+
}
|
|
8
|
+
export declare const FlowNodeMessages: FC<FlowNodeMessagesProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { UiNode } from '@ory/kratos-client';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import type { FC } from 'react';
|
|
4
|
+
import type { FormEvent } from 'react';
|
|
5
|
+
type OnChangeCallback = (event: string | FormEvent<HTMLInputElement>) => void;
|
|
6
|
+
export interface FlowNodeProps {
|
|
7
|
+
name: string;
|
|
8
|
+
children: (node: UiNode, value: any, callback: OnChangeCallback) => ReactElement;
|
|
9
|
+
}
|
|
10
|
+
export declare const FlowNode: FC<FlowNodeProps>;
|
|
11
|
+
export {};
|
|
@@ -10,7 +10,7 @@ const FlowNode = ({ name, children }) => {
|
|
|
10
10
|
const node = (0, react_1.useMemo)(() => flow.getNode(name), [name, flow, flow.getState()]);
|
|
11
11
|
const [value = '', setValue] = (0, react_2.useState)(flow.getValue(name));
|
|
12
12
|
const onChange = (0, react_3.useCallback)((event) => {
|
|
13
|
-
if (event && event.target) {
|
|
13
|
+
if (typeof event === 'object' && 'value' in event.target && event.target.value) {
|
|
14
14
|
setValue(event.target.value);
|
|
15
15
|
flow.setValue(name, event.target.value);
|
|
16
16
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { UiNode } from '@ory/kratos-client';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import type { FC } from 'react';
|
|
4
|
+
export interface FlowNodesGroupProps {
|
|
5
|
+
name: string;
|
|
6
|
+
children: (node: Array<UiNode>) => ReactElement;
|
|
7
|
+
}
|
|
8
|
+
export declare const FlowNodesGroup: FC<FlowNodesGroupProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { FC } from 'react';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
export interface FlowSubmitProps {
|
|
5
|
+
method: string;
|
|
6
|
+
children: (submit: (method: string) => void) => ReactElement | ReactNode | null;
|
|
7
|
+
}
|
|
8
|
+
export declare const FlowSubmit: FC<FlowSubmitProps>;
|
|
@@ -7,7 +7,7 @@ const providers_1 = require("../providers");
|
|
|
7
7
|
const FlowSubmit = ({ method, children }) => {
|
|
8
8
|
const flow = (0, providers_1.useFlow)();
|
|
9
9
|
if (typeof children === 'function') {
|
|
10
|
-
return children((mtd) => flow.submit(mtd));
|
|
10
|
+
return children(async (mtd) => flow.submit(mtd));
|
|
11
11
|
}
|
|
12
12
|
if ((0, react_1.isValidElement)(children)) {
|
|
13
13
|
return (0, react_2.cloneElement)(children, {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './flow-form.component';
|
|
2
|
+
export * from './flow-node.component';
|
|
3
|
+
export * from './flow-error.component';
|
|
4
|
+
export * from './flow-submit.component';
|
|
5
|
+
export * from './flow-messages.component';
|
|
6
|
+
export * from './flow-nodes-group.component';
|
|
7
|
+
export * from './flow-node-messages.component';
|
package/dist/ui/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atls/react-kratos-browser-flows",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -11,16 +11,17 @@
|
|
|
11
11
|
"prepack": "yarn run build",
|
|
12
12
|
"postpack": "rm -rf dist"
|
|
13
13
|
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@ory/kratos-client": "^0.8.2-alpha.1",
|
|
16
|
+
"events": "3.3.0"
|
|
17
|
+
},
|
|
14
18
|
"devDependencies": {
|
|
15
|
-
"@
|
|
16
|
-
"@
|
|
17
|
-
"@types/
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"axios": "^0.21.4",
|
|
22
|
-
"react": "^17.0.2",
|
|
23
|
-
"react-dom": "^17.0.2"
|
|
19
|
+
"@types/events": "3.0.3",
|
|
20
|
+
"@types/react": "18.3.6",
|
|
21
|
+
"@types/react-dom": "18.2.7",
|
|
22
|
+
"axios": "1.7.7",
|
|
23
|
+
"react": "18.3.1",
|
|
24
|
+
"react-dom": "18.3.1"
|
|
24
25
|
},
|
|
25
26
|
"peerDependencies": {
|
|
26
27
|
"react": "^17.0.1"
|
|
@@ -30,9 +31,5 @@
|
|
|
30
31
|
"main": "dist/index.js",
|
|
31
32
|
"typings": "dist/index.d.ts"
|
|
32
33
|
},
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"@ory/kratos-client": "^0.8.2-alpha.1",
|
|
35
|
-
"events": "^3.3.0"
|
|
36
|
-
},
|
|
37
34
|
"typings": "dist/index.d.ts"
|
|
38
35
|
}
|