@pontive/pontkit-core 1.7.2 → 1.7.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/catalog.json +1 -1
- package/custom-elements.json +1 -1
- package/dist/components/widgets/flow-widget.d.ts +32 -0
- package/dist/components/widgets/pont-invitation/pont-invitation.d.ts +3 -15
- package/dist/components/widgets/pont-signin/pont-signin.d.ts +3 -15
- package/dist/components/widgets/pont-signup/pont-signup.d.ts +3 -15
- package/dist/components/wrappers/layout/layout.d.ts +24 -0
- package/dist/index.js +3423 -3427
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14405 -14376
- package/dist/index.mjs.map +1 -1
- package/dist/utils/flow-error.d.ts +19 -0
- package/dist/utils/login-hint.d.ts +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { BrandingEntitlements } from '../../context';
|
|
3
|
+
/**
|
|
4
|
+
* A widget that runs one flow: sign-in, sign-up or invitation.
|
|
5
|
+
*
|
|
6
|
+
* It starts the flow once Auth is configured, starts it again when the locale
|
|
7
|
+
* changes or the layout asks for it, and renders whatever the flow's render
|
|
8
|
+
* spec says. When the flow cannot be started it says so, with a way to try
|
|
9
|
+
* again. It used to log the failure and render nothing, so the page stayed
|
|
10
|
+
* blank, or on its loading fallback, with nothing to tell the person why.
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class PontFlowWidget extends LitElement {
|
|
13
|
+
renderSpec: string | null;
|
|
14
|
+
branding: BrandingEntitlements;
|
|
15
|
+
locales: string;
|
|
16
|
+
/** Why the flow could not be started, as the person should read it. */
|
|
17
|
+
private startError?;
|
|
18
|
+
/** Starts this widget's flow. */
|
|
19
|
+
protected abstract startFlow(): Promise<unknown>;
|
|
20
|
+
createRenderRoot(): this;
|
|
21
|
+
private __flowStarted;
|
|
22
|
+
private __initialized;
|
|
23
|
+
private __previousLocale;
|
|
24
|
+
connectedCallback(): void;
|
|
25
|
+
disconnectedCallback(): void;
|
|
26
|
+
protected firstUpdated(): void;
|
|
27
|
+
protected updated(changedProperties: Map<string, unknown>): void;
|
|
28
|
+
private restart;
|
|
29
|
+
private startAuthFlow;
|
|
30
|
+
private tryRemoveFallback;
|
|
31
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
32
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BrandingEntitlements } from '../../../context';
|
|
1
|
+
import { PontFlowWidget } from '../flow-widget';
|
|
3
2
|
/**
|
|
4
3
|
* Accepting an invitation.
|
|
5
4
|
*
|
|
@@ -19,17 +18,6 @@ import { BrandingEntitlements } from '../../../context';
|
|
|
19
18
|
* sign-in and sign-up: the instance's own invitation widgets, if it has
|
|
20
19
|
* published any, and otherwise the built-in ones.
|
|
21
20
|
*/
|
|
22
|
-
export declare class PontInvitation extends
|
|
23
|
-
|
|
24
|
-
branding: BrandingEntitlements;
|
|
25
|
-
locales: string;
|
|
26
|
-
createRenderRoot(): this;
|
|
27
|
-
private __flowStarted;
|
|
28
|
-
private __initialized;
|
|
29
|
-
private __previousLocale;
|
|
30
|
-
protected firstUpdated(): void;
|
|
31
|
-
protected updated(changedProperties: Map<string, unknown>): void;
|
|
32
|
-
private startAuthFlow;
|
|
33
|
-
private tryRemoveFallback;
|
|
34
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
21
|
+
export declare class PontInvitation extends PontFlowWidget {
|
|
22
|
+
protected startFlow(): Promise<import('@pontive/oidc-client').StartLoginflowResponse>;
|
|
35
23
|
}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
renderSpec: string | null;
|
|
5
|
-
branding: BrandingEntitlements;
|
|
6
|
-
locales: string;
|
|
7
|
-
createRenderRoot(): this;
|
|
8
|
-
private __flowStarted;
|
|
9
|
-
private __initialized;
|
|
10
|
-
private __previousLocale;
|
|
11
|
-
protected firstUpdated(): void;
|
|
12
|
-
protected updated(changedProperties: Map<string, unknown>): void;
|
|
13
|
-
private startAuthFlow;
|
|
14
|
-
private tryRemoveFallback;
|
|
15
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
1
|
+
import { PontFlowWidget } from '../flow-widget';
|
|
2
|
+
export declare class PontSignIn extends PontFlowWidget {
|
|
3
|
+
protected startFlow(): Promise<import('@pontive/oidc-client').StartLoginflowResponse>;
|
|
16
4
|
}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
renderSpec: string | null;
|
|
5
|
-
branding: BrandingEntitlements;
|
|
6
|
-
locales: string;
|
|
7
|
-
createRenderRoot(): this;
|
|
8
|
-
private __flowStarted;
|
|
9
|
-
private __initialized;
|
|
10
|
-
private __previousLocale;
|
|
11
|
-
protected firstUpdated(): void;
|
|
12
|
-
protected updated(changedProperties: Map<string, unknown>): void;
|
|
13
|
-
private startAuthFlow;
|
|
14
|
-
private tryRemoveFallback;
|
|
15
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
1
|
+
import { PontFlowWidget } from '../flow-widget';
|
|
2
|
+
export declare class PontSignUp extends PontFlowWidget {
|
|
3
|
+
protected startFlow(): Promise<import('@pontive/oidc-client').StartLoginflowResponse>;
|
|
16
4
|
}
|
|
@@ -33,6 +33,23 @@ export declare class PontKitLayout extends LitElement {
|
|
|
33
33
|
*/
|
|
34
34
|
branding: BrandingEntitlements;
|
|
35
35
|
createRenderRoot(): this;
|
|
36
|
+
/**
|
|
37
|
+
* Asks the widget hosting this layout to start its flow again. Fired from the
|
|
38
|
+
* banner of a flow that has ended, whose screen takes no more events.
|
|
39
|
+
*/
|
|
40
|
+
static readonly RESTART_EVENT = "pont-layout:restart";
|
|
41
|
+
/**
|
|
42
|
+
* Every element that talks to the flow reports a failed call with one of
|
|
43
|
+
* these. A failure the flow can recover from comes back as a screen with the
|
|
44
|
+
* server's banner already in it; these are the rest — the request failed, or
|
|
45
|
+
* the flow is over — and each must reach the screen, or the person is left
|
|
46
|
+
* on a page that does nothing when they press it.
|
|
47
|
+
*/
|
|
48
|
+
private static readonly ERROR_EVENTS;
|
|
49
|
+
/** Marks the elements of a banner this layout put on the screen. */
|
|
50
|
+
private static readonly BANNER_ATTR;
|
|
51
|
+
connectedCallback(): void;
|
|
52
|
+
disconnectedCallback(): void;
|
|
36
53
|
updated(): void;
|
|
37
54
|
private renderDynamicContent;
|
|
38
55
|
/** Tags already reported on this page, so a re-render does not repeat them. */
|
|
@@ -54,4 +71,11 @@ export declare class PontKitLayout extends LitElement {
|
|
|
54
71
|
private static reportUnregistered;
|
|
55
72
|
render(): import('lit-html').TemplateResult<1>;
|
|
56
73
|
private handleError;
|
|
74
|
+
/**
|
|
75
|
+
* Shows a failure as the server shows one: an error alert at the top of the
|
|
76
|
+
* widget's block, below its logo and header. It replaces any banner already
|
|
77
|
+
* there, so the screen holds one error at a time, and goes with the screen
|
|
78
|
+
* when the next render spec replaces the content.
|
|
79
|
+
*/
|
|
80
|
+
private showError;
|
|
57
81
|
}
|