@a11d/lit-application 0.11.0 → 0.11.2
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 +187 -0
- package/README.md +99 -0
- package/dist/Application.d.ts +50 -0
- package/dist/Application.d.ts.map +1 -1
- package/dist/Application.js +51 -3
- package/dist/ApplicationTopLayer.d.ts +6 -0
- package/dist/ApplicationTopLayer.d.ts.map +1 -1
- package/dist/ApplicationTopLayer.js +6 -0
- package/dist/Dialog/Dialog.d.ts +13 -0
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +1 -0
- package/dist/Dialog/DialogCancelledError.d.ts +1 -0
- package/dist/Dialog/DialogCancelledError.d.ts.map +1 -1
- package/dist/Dialog/DialogCancelledError.js +1 -0
- package/dist/Dialog/DialogComponent.d.ts +36 -0
- package/dist/Dialog/DialogComponent.d.ts.map +1 -1
- package/dist/Dialog/DialogComponent.js +31 -0
- package/dist/Dialog/ErrorHandlers/DialogComponentNoOpErrorHandler.d.ts +1 -0
- package/dist/Dialog/ErrorHandlers/DialogComponentNoOpErrorHandler.d.ts.map +1 -1
- package/dist/Dialog/ErrorHandlers/DialogComponentNoOpErrorHandler.js +1 -0
- package/dist/Dialog/ErrorHandlers/DialogComponentNotificationErrorHandler.d.ts +1 -0
- package/dist/Dialog/ErrorHandlers/DialogComponentNotificationErrorHandler.d.ts.map +1 -1
- package/dist/Dialog/ErrorHandlers/DialogComponentNotificationErrorHandler.js +1 -0
- package/dist/Notification/NotificationComponent.d.ts +14 -0
- package/dist/Notification/NotificationComponent.d.ts.map +1 -1
- package/dist/Notification/NotificationComponent.js +10 -0
- package/dist/Page/Page.d.ts +3 -1
- package/dist/Page/Page.d.ts.map +1 -1
- package/dist/Page/PageComponent.d.ts +11 -0
- package/dist/Page/PageComponent.d.ts.map +1 -1
- package/dist/Page/PageComponent.js +9 -0
- package/dist/Page/PageError.d.ts +1 -0
- package/dist/Page/PageError.d.ts.map +1 -1
- package/dist/Page/PageError.js +1 -0
- package/dist/Page/PageHost.d.ts +1 -0
- package/dist/Page/PageHost.d.ts.map +1 -1
- package/dist/Page/PageHost.js +7 -6
- package/dist/PwaHelper/Manifest.d.ts +2 -0
- package/dist/PwaHelper/Manifest.d.ts.map +1 -1
- package/dist/PwaHelper/ManifestProvider.d.ts +1 -0
- package/dist/PwaHelper/ManifestProvider.d.ts.map +1 -1
- package/dist/PwaHelper/PwaHelper.d.ts +4 -0
- package/dist/PwaHelper/PwaHelper.d.ts.map +1 -1
- package/dist/PwaHelper/PwaHelper.js +3 -0
- package/dist/Router/RoutableComponent.d.ts.map +1 -1
- package/dist/Router/RoutableComponent.js +4 -3
- package/dist/Router/RouterController.d.ts +6 -0
- package/dist/Router/RouterController.d.ts.map +1 -1
- package/dist/Router/RouterController.js +6 -0
- package/dist/Router/path.d.ts +1 -3
- package/dist/Router/path.d.ts.map +1 -1
- package/dist/Router/path.js +1 -1
- package/dist/Router/route.d.ts +5 -0
- package/dist/Router/route.d.ts.map +1 -1
- package/dist/Router/route.js +5 -0
- package/dist/Router/routerLink.d.ts +12 -0
- package/dist/Router/routerLink.d.ts.map +1 -1
- package/dist/Router/routerLink.js +6 -0
- package/dist/utilities/HookSet.d.ts +2 -0
- package/dist/utilities/HookSet.d.ts.map +1 -1
- package/dist/utilities/HookSet.js +3 -1
- package/dist/utilities/HttpError.d.ts +1 -0
- package/dist/utilities/HttpError.d.ts.map +1 -1
- package/dist/utilities/HttpError.js +1 -0
- package/dist/utilities/HttpErrorCode.d.ts +1 -0
- package/dist/utilities/HttpErrorCode.d.ts.map +1 -1
- package/dist/utilities/HttpErrorCode.js +1 -0
- package/dist/utilities/Key.d.ts +3 -4
- package/dist/utilities/Key.d.ts.map +1 -1
- package/dist/utilities/Key.js +3 -4
- package/dist/utilities/WindowHelper.d.ts +3 -0
- package/dist/utilities/WindowHelper.d.ts.map +1 -1
- package/dist/utilities/WindowHelper.js +3 -0
- package/dist/utilities/queryInstanceElement.d.ts +1 -0
- package/dist/utilities/queryInstanceElement.d.ts.map +1 -1
- package/dist/utilities/queryInstanceElement.js +2 -1
- package/dist/utilities/querySymbolizedElement.d.ts +5 -0
- package/dist/utilities/querySymbolizedElement.d.ts.map +1 -1
- package/dist/utilities/querySymbolizedElement.js +6 -1
- package/package.json +19 -15
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -2,52 +2,88 @@ import { type PropertyValues } from '@a11d/lit';
|
|
|
2
2
|
import { LocalStorage } from '@a11d/local-storage';
|
|
3
3
|
import { HookSet, RoutableComponent, NavigationStrategy } from '../index.js';
|
|
4
4
|
import { type Dialog, DialogActionKey } from './index.js';
|
|
5
|
+
/** The parameters of a dialog, passed to its constructor and mapped to its URL if it has a route. */
|
|
5
6
|
export type DialogParameters = void | Record<string, any>;
|
|
7
|
+
/** The outcome of a dialog action: the result resolving the confirmation, or an `Error` rejecting it. */
|
|
6
8
|
export type DialogResult<TResult> = TResult | Error;
|
|
9
|
+
/** What a dialog action returns: a `DialogResult`, or a promise of one. */
|
|
7
10
|
export type DialogAction<TResult> = DialogResult<TResult> | PromiseLike<DialogResult<TResult>>;
|
|
11
|
+
/** Where a dialog opens: in place, or popped out into a new tab or window. */
|
|
8
12
|
export declare enum DialogConfirmationStrategy {
|
|
9
13
|
Dialog = 0,
|
|
10
14
|
Tab = 1,
|
|
11
15
|
Window = 2
|
|
12
16
|
}
|
|
17
|
+
/** The confirmation strategies that pop a dialog out into a new tab or window. */
|
|
13
18
|
export type PopupConfirmationStrategy = Exclude<DialogConfirmationStrategy, DialogConfirmationStrategy.Dialog>;
|
|
19
|
+
/**
|
|
20
|
+
* The base class of a handler for the errors thrown by dialog actions, registered with `DialogComponent.errorHandler()`.
|
|
21
|
+
*
|
|
22
|
+
* Declare its key in the global `DialogComponentErrorHandlers` interface for dialog elements to refer to it by `errorHandler`.
|
|
23
|
+
*/
|
|
14
24
|
export declare abstract class DialogComponentErrorHandler {
|
|
15
25
|
protected readonly dialogComponent: DialogComponent<any, any>;
|
|
16
26
|
constructor(dialogComponent: DialogComponent<any, any>);
|
|
17
27
|
abstract handle(error: Error): void | Promise<void>;
|
|
18
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* The base class of a dialog, opened by `confirm`, which resolves with the dialog's result once it closes.
|
|
31
|
+
*
|
|
32
|
+
* Its template renders a dialog element, such as `lit-dialog`, whose heading defaults to the component's `label` metadata.
|
|
33
|
+
* An action resolves `confirm` with the value it returns or rejects it with the `Error` it returns, and cancelling rejects it
|
|
34
|
+
* with a `DialogCancelledError`. An error thrown by an action keeps the dialog open and goes to the dialog element's `errorHandler`.
|
|
35
|
+
* A dialog with a `@route` can also pop out into a tab or window.
|
|
36
|
+
*/
|
|
19
37
|
export declare abstract class DialogComponent<T extends DialogParameters = void, TResult = void> extends RoutableComponent<T> {
|
|
38
|
+
/** Hooks awaited with each dialog before it connects. */
|
|
20
39
|
static readonly connectingHooks: HookSet<DialogComponent<any, any>>;
|
|
21
40
|
private static readonly errorHandlers;
|
|
22
41
|
private static defaultErrorHandler;
|
|
42
|
+
/** Marks the decorated element class as a dialog element, which `dialogElement` finds in a dialog component's render root. */
|
|
23
43
|
static dialogElement(): (constructor: Constructor<Dialog>) => void;
|
|
44
|
+
/** Registers the decorated class as the error handler of the key, and as the default one if `isDefault` is set. */
|
|
24
45
|
static errorHandler(key: string, isDefault?: boolean): (ErrorHandlerConstructor: Constructor<DialogComponentErrorHandler>) => void;
|
|
46
|
+
/** The strategy poppable dialogs open with unless `confirm` is given one, persisted in local storage. */
|
|
25
47
|
static readonly poppableConfirmationStrategy: LocalStorage<DialogConfirmationStrategy>;
|
|
48
|
+
/** Resolves the element dialogs are appended to, the application's top layer by default. */
|
|
26
49
|
static getHost(): Promise<HTMLElement>;
|
|
50
|
+
/** The dialog element in the render root; accessing it throws when there is none. */
|
|
27
51
|
readonly dialogElement: Dialog & HTMLElement;
|
|
28
52
|
get primaryActionElement(): HTMLElement | undefined;
|
|
29
53
|
get secondaryActionElement(): HTMLElement | undefined;
|
|
30
54
|
get cancellationActionElement(): HTMLElement | undefined;
|
|
55
|
+
/** The window that opened the window the dialog popped out into, or the current window otherwise. */
|
|
31
56
|
get opener(): Window & typeof globalThis;
|
|
32
57
|
protected handleBeforeUnload(): Promise<void>;
|
|
33
58
|
protected handleKeyDown(e: KeyboardEvent): Promise<void>;
|
|
34
59
|
connectedCallback(): Promise<void>;
|
|
60
|
+
/** Opens the dialog like `confirm`, taking the navigation strategy as the confirmation strategy. */
|
|
35
61
|
navigate(strategy?: NavigationStrategy, force?: boolean): Promise<TResult>;
|
|
62
|
+
/** Opens the dialog and resolves with its result once it closes; poppable dialogs open with `poppableConfirmationStrategy` by default. */
|
|
36
63
|
confirm(strategy?: DialogConfirmationStrategy): Promise<TResult>;
|
|
37
64
|
private _confirmationPromiseExecutor?;
|
|
38
65
|
private confirmAsDialog;
|
|
39
66
|
private confirmAsPopup;
|
|
67
|
+
/** Copies the reactive properties of this dialog to its counterpart in the window it pops out into; override it to copy more. */
|
|
40
68
|
protected cloned(other: DialogComponent<T, TResult>): void;
|
|
69
|
+
/** Closes the dialog and reopens it in a new tab or window, whose result then settles the original confirmation. */
|
|
41
70
|
protected pop(strategy?: Exclude<DialogConfirmationStrategy, DialogConfirmationStrategy.Dialog>): Promise<void>;
|
|
71
|
+
/** Closes the dialog, resolving its confirmation with the result, or rejecting it if the result is an `Error`. */
|
|
42
72
|
protected close(result: TResult | Error): void;
|
|
43
73
|
private get open();
|
|
44
74
|
private set open(value);
|
|
75
|
+
/** Whether the dialog can pop out into a tab or window, which requires a route that the current URL does not match. */
|
|
45
76
|
get poppable(): boolean;
|
|
46
77
|
protected firstUpdated(props: PropertyValues): void;
|
|
78
|
+
/** Returns the result to close the dialog with when its primary action is invoked; throws unless overridden. */
|
|
47
79
|
protected primaryAction(): DialogAction<TResult>;
|
|
80
|
+
/** Returns the result to close the dialog with when its secondary action is invoked; cancels the dialog by default. */
|
|
48
81
|
protected secondaryAction(): DialogAction<TResult>;
|
|
82
|
+
/** Returns the result to close the dialog with when it is cancelled, a `DialogCancelledError` by default. */
|
|
49
83
|
protected cancellationAction(): DialogAction<TResult>;
|
|
84
|
+
/** Runs the action of the key and closes the dialog with its result, unless `manualClose` keeps it open. */
|
|
50
85
|
protected readonly handleAction: (actionKey: DialogActionKey) => Promise<void>;
|
|
86
|
+
/** Passes an error thrown by an action to the dialog element's `errorHandler`, or to the default error handler without one. */
|
|
51
87
|
protected handleError(error: Error): void | Promise<void>;
|
|
52
88
|
}
|
|
53
89
|
//# sourceMappingURL=DialogComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogComponent.d.ts","sourceRoot":"","sources":["../../Dialog/DialogComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,WAAW,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAe,OAAO,EAA0B,iBAAiB,EAAqC,kBAAkB,EAAE,MAAM,aAAa,CAAA;AACpJ,OAAO,EAAE,KAAK,MAAM,EAAE,eAAe,EAAwB,MAAM,YAAY,CAAA;AAE/E,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAEzD,MAAM,MAAM,YAAY,CAAC,OAAO,IAAI,OAAO,GAAG,KAAK,CAAA;AAEnD,MAAM,MAAM,YAAY,CAAC,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAA;AAE9F,oBAAY,0BAA0B;IACrC,MAAM,IAA0B;IAChC,GAAG,IAAyB;IAC5B,MAAM,IAA4B;CAClC;AAED,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC,0BAA0B,EAAE,0BAA0B,CAAC,MAAM,CAAC,CAAA;AAE9G,8BAAsB,2BAA2B;IACpC,SA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Ae,CAAC,CAAC,EAAE,OAAO,CAAC,QAQlD;IAED,oHAAoH;IACpH,UAAgB,GAAG,CAAC,QAAQ,GAAE,OAAO,CAAC,0BAA0B,EAAE,0BAA0B,CAAC,MAAM,CAAkC,iBASpI;IAED,kHAAkH;IAClH,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,KAAK,QAetC;IAED,OAAO,KAAK,IAAI,GAA8C;IAC9D,OAAO,KAAK,IAAI,QAIf;IAED,uHAAuH;IACvH,IAAI,QAAQ,YAEX;IAED,UAAmB,YAAY,CAAC,KAAK,EAAE,cAAc,QASpD;IAED,gHAAgH;IAChH,SAAS,CAAC,aAAa,IAAI,YAAY,CAAC,OAAO,CAAC,CAE/C;IAED,uHAAuH;IACvH,SAAS,CAAC,eAAe,IAAI,YAAY,CAAC,OAAO,CAAC,CAEjD;IAED,6GAA6G;IAC7G,SAAS,CAAC,kBAAkB,IAAI,YAAY,CAAC,OAAO,CAAC,CAEpD;IAED,4GAA4G;IAC5G,SAAS,CAAC,QAAQ,CAAC,YAAY,cAAqB,eAAe,mBAyBlE;IAED,+HAA+H;IAC/H,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,wBAoBjC;CACD"}
|
|
@@ -3,21 +3,36 @@ import { eventListener } from '@a11d/lit';
|
|
|
3
3
|
import { LocalStorage } from '@a11d/local-storage';
|
|
4
4
|
import { Application, HookSet, querySymbolizedElement, RoutableComponent, WindowHelper, WindowOpenMode, Key, NavigationStrategy } from '../index.js';
|
|
5
5
|
import { DialogActionKey, DialogCancelledError } from './index.js';
|
|
6
|
+
/** Where a dialog opens: in place, or popped out into a new tab or window. */
|
|
6
7
|
export var DialogConfirmationStrategy;
|
|
7
8
|
(function (DialogConfirmationStrategy) {
|
|
8
9
|
DialogConfirmationStrategy[DialogConfirmationStrategy["Dialog"] = 0] = "Dialog";
|
|
9
10
|
DialogConfirmationStrategy[DialogConfirmationStrategy["Tab"] = 1] = "Tab";
|
|
10
11
|
DialogConfirmationStrategy[DialogConfirmationStrategy["Window"] = 2] = "Window";
|
|
11
12
|
})(DialogConfirmationStrategy || (DialogConfirmationStrategy = {}));
|
|
13
|
+
/**
|
|
14
|
+
* The base class of a handler for the errors thrown by dialog actions, registered with `DialogComponent.errorHandler()`.
|
|
15
|
+
*
|
|
16
|
+
* Declare its key in the global `DialogComponentErrorHandlers` interface for dialog elements to refer to it by `errorHandler`.
|
|
17
|
+
*/
|
|
12
18
|
export class DialogComponentErrorHandler {
|
|
13
19
|
constructor(dialogComponent) {
|
|
14
20
|
this.dialogComponent = dialogComponent;
|
|
15
21
|
}
|
|
16
22
|
}
|
|
17
23
|
const dialogElementConstructorSymbol = Symbol('DialogComponent.DialogElementConstructor');
|
|
24
|
+
/**
|
|
25
|
+
* The base class of a dialog, opened by `confirm`, which resolves with the dialog's result once it closes.
|
|
26
|
+
*
|
|
27
|
+
* Its template renders a dialog element, such as `lit-dialog`, whose heading defaults to the component's `label` metadata.
|
|
28
|
+
* An action resolves `confirm` with the value it returns or rejects it with the `Error` it returns, and cancelling rejects it
|
|
29
|
+
* with a `DialogCancelledError`. An error thrown by an action keeps the dialog open and goes to the dialog element's `errorHandler`.
|
|
30
|
+
* A dialog with a `@route` can also pop out into a tab or window.
|
|
31
|
+
*/
|
|
18
32
|
export class DialogComponent extends RoutableComponent {
|
|
19
33
|
constructor() {
|
|
20
34
|
super(...arguments);
|
|
35
|
+
/** Runs the action of the key and closes the dialog with its result, unless `manualClose` keeps it open. */
|
|
21
36
|
this.handleAction = async (actionKey) => {
|
|
22
37
|
const actionByKey = new Map([
|
|
23
38
|
[DialogActionKey.Primary, this.primaryAction],
|
|
@@ -44,13 +59,16 @@ export class DialogComponent extends RoutableComponent {
|
|
|
44
59
|
}
|
|
45
60
|
};
|
|
46
61
|
}
|
|
62
|
+
/** Hooks awaited with each dialog before it connects. */
|
|
47
63
|
static { this.connectingHooks = new HookSet(); }
|
|
48
64
|
static { this.errorHandlers = new Map(); }
|
|
65
|
+
/** Marks the decorated element class as a dialog element, which `dialogElement` finds in a dialog component's render root. */
|
|
49
66
|
static dialogElement() {
|
|
50
67
|
return (constructor) => {
|
|
51
68
|
constructor[dialogElementConstructorSymbol] = true;
|
|
52
69
|
};
|
|
53
70
|
}
|
|
71
|
+
/** Registers the decorated class as the error handler of the key, and as the default one if `isDefault` is set. */
|
|
54
72
|
static errorHandler(key, isDefault = false) {
|
|
55
73
|
return (ErrorHandlerConstructor) => {
|
|
56
74
|
DialogComponent.errorHandlers.set(key, ErrorHandlerConstructor);
|
|
@@ -59,7 +77,9 @@ export class DialogComponent extends RoutableComponent {
|
|
|
59
77
|
}
|
|
60
78
|
};
|
|
61
79
|
}
|
|
80
|
+
/** The strategy poppable dialogs open with unless `confirm` is given one, persisted in local storage. */
|
|
62
81
|
static { this.poppableConfirmationStrategy = new LocalStorage('DialogComponent.PoppableConfirmationStrategy', DialogConfirmationStrategy.Dialog); }
|
|
82
|
+
/** Resolves the element dialogs are appended to, the application's top layer by default. */
|
|
63
83
|
static getHost() {
|
|
64
84
|
return Promise.resolve(Application.topLayer);
|
|
65
85
|
}
|
|
@@ -72,6 +92,7 @@ export class DialogComponent extends RoutableComponent {
|
|
|
72
92
|
get cancellationActionElement() {
|
|
73
93
|
return this.dialogElement.cancellationActionElement;
|
|
74
94
|
}
|
|
95
|
+
/** The window that opened the window the dialog popped out into, or the current window otherwise. */
|
|
75
96
|
get opener() {
|
|
76
97
|
return !this.dialogElement.boundToWindow
|
|
77
98
|
? window
|
|
@@ -97,10 +118,12 @@ export class DialogComponent extends RoutableComponent {
|
|
|
97
118
|
await DialogComponent.connectingHooks.execute(this);
|
|
98
119
|
super.connectedCallback();
|
|
99
120
|
}
|
|
121
|
+
/** Opens the dialog like `confirm`, taking the navigation strategy as the confirmation strategy. */
|
|
100
122
|
navigate(strategy, force) {
|
|
101
123
|
force;
|
|
102
124
|
return this.confirm(strategy);
|
|
103
125
|
}
|
|
126
|
+
/** Opens the dialog and resolves with its result once it closes; poppable dialogs open with `poppableConfirmationStrategy` by default. */
|
|
104
127
|
confirm(strategy) {
|
|
105
128
|
strategy ??= !this.poppable
|
|
106
129
|
? DialogConfirmationStrategy.Dialog
|
|
@@ -134,6 +157,7 @@ export class DialogComponent extends RoutableComponent {
|
|
|
134
157
|
this.cloned(other);
|
|
135
158
|
return other.confirmAsDialog();
|
|
136
159
|
}
|
|
160
|
+
/** Copies the reactive properties of this dialog to its counterpart in the window it pops out into; override it to copy more. */
|
|
137
161
|
cloned(other) {
|
|
138
162
|
if (this.isConnected) {
|
|
139
163
|
// Copy the dialog's properties to the dialog in the new window
|
|
@@ -143,6 +167,7 @@ export class DialogComponent extends RoutableComponent {
|
|
|
143
167
|
other.requestUpdate();
|
|
144
168
|
}
|
|
145
169
|
}
|
|
170
|
+
/** Closes the dialog and reopens it in a new tab or window, whose result then settles the original confirmation. */
|
|
146
171
|
async pop(strategy = DialogConfirmationStrategy.Tab) {
|
|
147
172
|
this.open = false;
|
|
148
173
|
const [resolve, reject] = this._confirmationPromiseExecutor ?? [];
|
|
@@ -154,6 +179,7 @@ export class DialogComponent extends RoutableComponent {
|
|
|
154
179
|
reject?.(error);
|
|
155
180
|
}
|
|
156
181
|
}
|
|
182
|
+
/** Closes the dialog, resolving its confirmation with the result, or rejecting it if the result is an `Error`. */
|
|
157
183
|
close(result) {
|
|
158
184
|
this.open = false;
|
|
159
185
|
const [resolve, reject] = this._confirmationPromiseExecutor ?? [];
|
|
@@ -174,6 +200,7 @@ export class DialogComponent extends RoutableComponent {
|
|
|
174
200
|
this.dialogElement.open = value;
|
|
175
201
|
}
|
|
176
202
|
}
|
|
203
|
+
/** Whether the dialog can pop out into a tab or window, which requires a route that the current URL does not match. */
|
|
177
204
|
get poppable() {
|
|
178
205
|
return !!this.route && !this.urlMatches();
|
|
179
206
|
}
|
|
@@ -186,15 +213,19 @@ export class DialogComponent extends RoutableComponent {
|
|
|
186
213
|
this.open = true;
|
|
187
214
|
super.firstUpdated(props);
|
|
188
215
|
}
|
|
216
|
+
/** Returns the result to close the dialog with when its primary action is invoked; throws unless overridden. */
|
|
189
217
|
primaryAction() {
|
|
190
218
|
throw new Error('Not implemented.');
|
|
191
219
|
}
|
|
220
|
+
/** Returns the result to close the dialog with when its secondary action is invoked; cancels the dialog by default. */
|
|
192
221
|
secondaryAction() {
|
|
193
222
|
return this.cancellationAction();
|
|
194
223
|
}
|
|
224
|
+
/** Returns the result to close the dialog with when it is cancelled, a `DialogCancelledError` by default. */
|
|
195
225
|
cancellationAction() {
|
|
196
226
|
return new DialogCancelledError(this);
|
|
197
227
|
}
|
|
228
|
+
/** Passes an error thrown by an action to the dialog element's `errorHandler`, or to the default error handler without one. */
|
|
198
229
|
handleError(error) {
|
|
199
230
|
if (error instanceof DialogCancelledError) {
|
|
200
231
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogComponentNoOpErrorHandler.d.ts","sourceRoot":"","sources":["../../../Dialog/ErrorHandlers/DialogComponentNoOpErrorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AAEpF,qBACa,+BAAgC,SAAQ,2BAA2B;IACtE,MAAM;
|
|
1
|
+
{"version":3,"file":"DialogComponentNoOpErrorHandler.d.ts","sourceRoot":"","sources":["../../../Dialog/ErrorHandlers/DialogComponentNoOpErrorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AAEpF,8DAA8D;AAC9D,qBACa,+BAAgC,SAAQ,2BAA2B;IACtE,MAAM,SAAM;CACrB;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,4BAA4B;QACrC,OAAO,EAAE,+BAA+B,CAAA;KACxC;CACD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { DialogComponent, DialogComponentErrorHandler } from '../DialogComponent.js';
|
|
3
|
+
/** The `no-op` dialog error handler, which ignores errors. */
|
|
3
4
|
let DialogComponentNoOpErrorHandler = class DialogComponentNoOpErrorHandler extends DialogComponentErrorHandler {
|
|
4
5
|
handle() { }
|
|
5
6
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DialogComponentErrorHandler } from '../DialogComponent.js';
|
|
2
|
+
/** The default `notification` dialog error handler, which shows errors as error notifications. */
|
|
2
3
|
export declare class DialogComponentNotificationErrorHandler extends DialogComponentErrorHandler {
|
|
3
4
|
handle(error: Error): Promise<void>;
|
|
4
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogComponentNotificationErrorHandler.d.ts","sourceRoot":"","sources":["../../../Dialog/ErrorHandlers/DialogComponentNotificationErrorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AAGpF,qBACa,uCAAwC,SAAQ,2BAA2B;IAC9E,MAAM,CAAC,KAAK,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"DialogComponentNotificationErrorHandler.d.ts","sourceRoot":"","sources":["../../../Dialog/ErrorHandlers/DialogComponentNotificationErrorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AAGpF,kGAAkG;AAClG,qBACa,uCAAwC,SAAQ,2BAA2B;IAC9E,MAAM,CAAC,KAAK,EAAE,KAAK,iBAE3B;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,4BAA4B;QACrC,cAAc,EAAE,uCAAuC,CAAA;KACvD;CACD"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { DialogComponent, DialogComponentErrorHandler } from '../DialogComponent.js';
|
|
3
3
|
import { NotificationComponent } from '../../Notification/NotificationComponent.js';
|
|
4
|
+
/** The default `notification` dialog error handler, which shows errors as error notifications. */
|
|
4
5
|
let DialogComponentNotificationErrorHandler = class DialogComponentNotificationErrorHandler extends DialogComponentErrorHandler {
|
|
5
6
|
handle(error) {
|
|
6
7
|
return NotificationComponent.notifyError(error.message);
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { NonInertableComponent } from '@a11d/non-inertable-component';
|
|
2
|
+
/** The kinds of notifications. */
|
|
2
3
|
export declare enum NotificationType {
|
|
3
4
|
Info = "info",
|
|
4
5
|
Success = "success",
|
|
5
6
|
Warning = "warning",
|
|
6
7
|
Error = "error"
|
|
7
8
|
}
|
|
9
|
+
/** A notification to show: its message, with an optional type and actions. */
|
|
8
10
|
export type Notification = {
|
|
9
11
|
type?: NotificationType;
|
|
10
12
|
message: string;
|
|
11
13
|
actions?: Array<NotificationAction>;
|
|
12
14
|
};
|
|
15
|
+
/** An action of a notification, with the title of its button and what clicking it does. */
|
|
13
16
|
type NotificationAction = {
|
|
14
17
|
title: string;
|
|
15
18
|
handleClick: () => void | PromiseLike<void>;
|
|
@@ -17,17 +20,28 @@ type NotificationAction = {
|
|
|
17
20
|
type NonTypedNotification = Omit<Notification, 'type'>;
|
|
18
21
|
type NonTypedNotificationParameters = [notification: NonTypedNotification] | [message: string, ...actions: Array<NotificationAction>];
|
|
19
22
|
type NonTypedNotificationWithErrorParameters = [notification: NonTypedNotification] | [errorMessage: string, ...actions: Array<NotificationAction>] | [error: Error, ...actions: Array<NotificationAction>];
|
|
23
|
+
/**
|
|
24
|
+
* The base class of the element showing notifications, whose static `notify` methods send them.
|
|
25
|
+
*
|
|
26
|
+
* Implement `show` to show the `notification`, and register the implementation with `@NotificationComponent.defaultComponent()`.
|
|
27
|
+
* Each notification gets its own instance, appended to the application's top layer while it is shown.
|
|
28
|
+
*/
|
|
20
29
|
export declare abstract class NotificationComponent extends NonInertableComponent {
|
|
21
30
|
static readonly shownNotifications: Set<Notification>;
|
|
22
31
|
private static DefaultComponentConstructor?;
|
|
32
|
+
/** Registers the decorated class as the component that notifications sent through `NotificationComponent` are shown with. */
|
|
23
33
|
static defaultComponent: () => <T extends NotificationComponent>(Constructor: Constructor<T>) => void;
|
|
24
34
|
static notifyInfo(...parameters: NonTypedNotificationParameters): Promise<void>;
|
|
25
35
|
static notifySuccess(...parameters: NonTypedNotificationParameters): Promise<void>;
|
|
26
36
|
static notifyWarning(...parameters: NonTypedNotificationParameters): Promise<void>;
|
|
27
37
|
static notifyError(...parameters: NonTypedNotificationParameters): Promise<void>;
|
|
38
|
+
/** Shows an error notification, then throws the given error, or an `Error` with the given message. */
|
|
28
39
|
static notifyAndThrowError(...parameters: NonTypedNotificationWithErrorParameters): void;
|
|
40
|
+
/** Shows the notification with this class, or with the default component if called on `NotificationComponent` itself. */
|
|
29
41
|
static notify(notification: Notification): Promise<void>;
|
|
42
|
+
/** The notification to show, set before `show` is called. */
|
|
30
43
|
abstract notification: Notification;
|
|
44
|
+
/** Shows the `notification`, resolving once it is done showing. */
|
|
31
45
|
abstract show(): Promise<void>;
|
|
32
46
|
}
|
|
33
47
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationComponent.d.ts","sourceRoot":"","sources":["../../Notification/NotificationComponent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAErE,oBAAY,gBAAgB;IAC3B,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;CACf;AAED,MAAM,MAAM,YAAY,GAAG;IAC1B,IAAI,CAAC,EAAE,gBAAgB,CAAA;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAA;CACnC,CAAA;AAED,KAAK,kBAAkB,GAAG;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAA;CAC3C,CAAA;AAED,KAAK,oBAAoB,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA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
|
|
1
1
|
import { LitElement } from '@a11d/lit';
|
|
2
2
|
import { Application } from '../Application.js';
|
|
3
3
|
import { NonInertableComponent } from '@a11d/non-inertable-component';
|
|
4
|
+
/** The kinds of notifications. */
|
|
4
5
|
export var NotificationType;
|
|
5
6
|
(function (NotificationType) {
|
|
6
7
|
NotificationType["Info"] = "info";
|
|
@@ -14,8 +15,15 @@ function normalizeNonTypedNotificationParameters(...parameters) {
|
|
|
14
15
|
actions: parameters.slice(1),
|
|
15
16
|
};
|
|
16
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* The base class of the element showing notifications, whose static `notify` methods send them.
|
|
20
|
+
*
|
|
21
|
+
* Implement `show` to show the `notification`, and register the implementation with `@NotificationComponent.defaultComponent()`.
|
|
22
|
+
* Each notification gets its own instance, appended to the application's top layer while it is shown.
|
|
23
|
+
*/
|
|
17
24
|
export class NotificationComponent extends NonInertableComponent {
|
|
18
25
|
static { this.shownNotifications = new Set(); }
|
|
26
|
+
/** Registers the decorated class as the component that notifications sent through `NotificationComponent` are shown with. */
|
|
19
27
|
static { this.defaultComponent = () => {
|
|
20
28
|
return (Constructor) => {
|
|
21
29
|
NotificationComponent.DefaultComponentConstructor = Constructor;
|
|
@@ -33,6 +41,7 @@ export class NotificationComponent extends NonInertableComponent {
|
|
|
33
41
|
static notifyError(...parameters) {
|
|
34
42
|
return this.notify({ type: NotificationType.Error, ...normalizeNonTypedNotificationParameters(...parameters) });
|
|
35
43
|
}
|
|
44
|
+
/** Shows an error notification, then throws the given error, or an `Error` with the given message. */
|
|
36
45
|
static notifyAndThrowError(...parameters) {
|
|
37
46
|
let error;
|
|
38
47
|
if (parameters[0] instanceof Error) {
|
|
@@ -50,6 +59,7 @@ export class NotificationComponent extends NonInertableComponent {
|
|
|
50
59
|
}
|
|
51
60
|
throw error;
|
|
52
61
|
}
|
|
62
|
+
/** Shows the notification with this class, or with the default component if called on `NotificationComponent` itself. */
|
|
53
63
|
static async notify(notification) {
|
|
54
64
|
const notificationComponent = this !== NotificationComponent
|
|
55
65
|
? new this()
|
package/dist/Page/Page.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type LitElement } from '@a11d/lit';
|
|
2
|
+
/** The element a page component renders its content into, such as `lit-page`, marked with `PageComponent.pageElement()`. */
|
|
2
3
|
export interface Page extends LitElement {
|
|
3
|
-
/**
|
|
4
|
+
/** Dispatches the heading whenever it changes, as a `composed`, bubbling and `cancelable` event. */
|
|
4
5
|
readonly pageHeadingChange: EventDispatcher<string>;
|
|
6
|
+
/** The heading of the page, which the application shows in the document title. */
|
|
5
7
|
heading: string;
|
|
6
8
|
}
|
|
7
9
|
//# sourceMappingURL=Page.d.ts.map
|
package/dist/Page/Page.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../Page/Page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,WAAW,IAAK,SAAQ,UAAU;IACvC,
|
|
1
|
+
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../Page/Page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,4HAA4H;AAC5H,MAAM,WAAW,IAAK,SAAQ,UAAU;IACvC,oGAAoG;IACpG,QAAQ,CAAC,iBAAiB,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IACnD,kFAAkF;IAClF,OAAO,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import { type PropertyValues } from '@a11d/lit';
|
|
2
2
|
import { RoutableComponent, HookSet, type RoutableParameters } from '../index.js';
|
|
3
3
|
import { type Page } from './index.js';
|
|
4
|
+
/** The parameters of a page, mapped to the path and query string of its URL. */
|
|
4
5
|
export type PageParameters = RoutableParameters;
|
|
6
|
+
/**
|
|
7
|
+
* The base class of a page, rendered by the application when its route matches.
|
|
8
|
+
*
|
|
9
|
+
* Its template renders a page element, such as `lit-page`, whose heading defaults to the component's `label` metadata.
|
|
10
|
+
* Navigate to a page with `new PageUser({ id: 1 }).navigate()`, or link to it with `routerLink`.
|
|
11
|
+
*/
|
|
5
12
|
export declare abstract class PageComponent<T extends PageParameters = void> extends RoutableComponent<T> {
|
|
13
|
+
/** Hooks awaited with each page before it connects, such as to check permissions. */
|
|
6
14
|
static readonly connectingHooks: HookSet<PageComponent<any>>;
|
|
15
|
+
/** The tag of the page element that built-in pages such as `PageError` render, `lit-page` by default. */
|
|
7
16
|
static defaultPageElementTag: import("lit-html/static.js").StaticValue;
|
|
17
|
+
/** Marks the decorated element class as a page element, which `pageElement` finds in a page component's render root. */
|
|
8
18
|
static pageElement(): (constructor: Constructor<Page>) => void;
|
|
9
19
|
navigate(...args: Parameters<RoutableComponent['navigate']>): Promise<void>;
|
|
20
|
+
/** The page element in the render root; accessing it throws when there is none. */
|
|
10
21
|
readonly pageElement: Page & HTMLElement;
|
|
11
22
|
connectedCallback(): Promise<void>;
|
|
12
23
|
protected firstUpdated(props: PropertyValues): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageComponent.d.ts","sourceRoot":"","sources":["../../Page/PageComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAA;AAExD,OAAO,EAA0B,iBAAiB,EAAE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAA;AACzG,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC,MAAM,MAAM,cAAc,GAAG,kBAAkB,CAAA;AAI/C,8BAAsB,aAAa,CAAC,CAAC,SAAS,cAAc,GAAG,IAAI,CAAE,SAAQ,iBAAiB,CAAC,CAAC,CAAC;IAChG,MAAM,CAAC,QAAQ,CAAC,eAAe,8BAAoC;IAEnE,MAAM,CAAC,qBAAqB,2CAAoB;IAEhD,MAAM,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"PageComponent.d.ts","sourceRoot":"","sources":["../../Page/PageComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAA;AAExD,OAAO,EAA0B,iBAAiB,EAAE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAA;AACzG,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC,gFAAgF;AAChF,MAAM,MAAM,cAAc,GAAG,kBAAkB,CAAA;AAI/C;;;;;GAKG;AACH,8BAAsB,aAAa,CAAC,CAAC,SAAS,cAAc,GAAG,IAAI,CAAE,SAAQ,iBAAiB,CAAC,CAAC,CAAC;IAChG,qFAAqF;IACrF,MAAM,CAAC,QAAQ,CAAC,eAAe,8BAAoC;IAEnE,yGAAyG;IACzG,MAAM,CAAC,qBAAqB,2CAAoB;IAEhD,wHAAwH;IACxH,MAAM,CAAC,WAAW,kBACI,WAAW,CAAC,IAAI,CAAC,UAGtC;IAEc,QAAQ,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,iBAEzE;IAED,mFAAmF;IAC7B,QAAQ,CAAC,WAAW,EAAG,IAAI,GAAG,WAAW,CAAA;IAEhF,iBAAiB,kBAG/B;IAED,UAAmB,YAAY,CAAC,KAAK,EAAE,cAAc,QAGpD;CACD"}
|
|
@@ -3,9 +3,18 @@ import { literal } from '@a11d/lit';
|
|
|
3
3
|
import { label } from '@a11d/metadata';
|
|
4
4
|
import { querySymbolizedElement, RoutableComponent, HookSet } from '../index.js';
|
|
5
5
|
const pageElementConstructorSymbol = Symbol('PageComponent.PageElementConstructor');
|
|
6
|
+
/**
|
|
7
|
+
* The base class of a page, rendered by the application when its route matches.
|
|
8
|
+
*
|
|
9
|
+
* Its template renders a page element, such as `lit-page`, whose heading defaults to the component's `label` metadata.
|
|
10
|
+
* Navigate to a page with `new PageUser({ id: 1 }).navigate()`, or link to it with `routerLink`.
|
|
11
|
+
*/
|
|
6
12
|
export class PageComponent extends RoutableComponent {
|
|
13
|
+
/** Hooks awaited with each page before it connects, such as to check permissions. */
|
|
7
14
|
static { this.connectingHooks = new HookSet(); }
|
|
15
|
+
/** The tag of the page element that built-in pages such as `PageError` render, `lit-page` by default. */
|
|
8
16
|
static { this.defaultPageElementTag = literal `lit-page`; }
|
|
17
|
+
/** Marks the decorated element class as a page element, which `pageElement` finds in a page component's render root. */
|
|
9
18
|
static pageElement() {
|
|
10
19
|
return (constructor) => {
|
|
11
20
|
constructor[pageElementConstructorSymbol] = true;
|
package/dist/Page/PageError.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type HTMLTemplateResult } from '@a11d/lit';
|
|
2
2
|
import { HttpErrorCode } from '../index.js';
|
|
3
3
|
import { PageComponent } from './PageComponent.js';
|
|
4
|
+
/** The page showing an HTTP error, routed at `/error/:error` and rendered by the application when no route matches. */
|
|
4
5
|
export declare class PageError extends PageComponent<{
|
|
5
6
|
readonly error: HttpErrorCode;
|
|
6
7
|
readonly message?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageError.d.ts","sourceRoot":"","sources":["../../Page/PageError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,kBAAkB,EAAqB,MAAM,WAAW,CAAA;AAC5F,OAAO,EAAa,aAAa,EAAE,MAAM,aAAa,CAAA;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,qBAEa,SAAU,SAAQ,aAAa,CAAC;IAAE,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;IACzG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAoBxC;IAEF,WAAoB,MAAM,kCAazB;IAED,cAAuB,QAAQ,IAUzB,kBAAkB,CACvB;IAED,OAAO,KAAK,aAAa,GAQxB;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,gBAAgB,EAAE,SAAS,CAAA;KAC3B;CACD"}
|
|
1
|
+
{"version":3,"file":"PageError.d.ts","sourceRoot":"","sources":["../../Page/PageError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,kBAAkB,EAAqB,MAAM,WAAW,CAAA;AAC5F,OAAO,EAAa,aAAa,EAAE,MAAM,aAAa,CAAA;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,uHAAuH;AACvH,qBAEa,SAAU,SAAQ,aAAa,CAAC;IAAE,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;IACzG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAoBxC;IAEF,WAAoB,MAAM,kCAazB;IAED,cAAuB,QAAQ,IAUzB,kBAAkB,CACvB;IAED,OAAO,KAAK,aAAa,GAQxB;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,gBAAgB,EAAE,SAAS,CAAA;KAC3B;CACD"}
|
package/dist/Page/PageError.js
CHANGED
|
@@ -4,6 +4,7 @@ import { component, css, html, staticHtml, style } from '@a11d/lit';
|
|
|
4
4
|
import { HttpError, HttpErrorCode } from '../index.js';
|
|
5
5
|
import { route } from '../Router/route.js';
|
|
6
6
|
import { PageComponent } from './PageComponent.js';
|
|
7
|
+
/** The page showing an HTTP error, routed at `/error/:error` and rendered by the application when no route matches. */
|
|
7
8
|
let PageError = class PageError extends PageComponent {
|
|
8
9
|
static { PageError_1 = this; }
|
|
9
10
|
static { this.emojisByErrorCodes = new Map([
|
package/dist/Page/PageHost.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from '@a11d/lit';
|
|
2
|
+
/** The element hosting the current page, rendered by the application. */
|
|
2
3
|
export declare class PageHost extends Component {
|
|
3
4
|
static get styles(): import("@a11d/lit").CSSResult;
|
|
4
5
|
protected get template(): import("lit-html").HTMLTemplateResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHost.d.ts","sourceRoot":"","sources":["../../Page/PageHost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAwB,MAAM,WAAW,CAAA;AAE3D,qBACa,QAAS,SAAQ,SAAS;IACtC,WAAoB,MAAM,kCAQzB;IAED,cAAuB,QAAQ,0CAE9B;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,eAAe,EAAE,QAAQ,CAAA;KACzB;CACD"}
|
|
1
|
+
{"version":3,"file":"PageHost.d.ts","sourceRoot":"","sources":["../../Page/PageHost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAwB,MAAM,WAAW,CAAA;AAE3D,yEAAyE;AACzE,qBACa,QAAS,SAAQ,SAAS;IACtC,WAAoB,MAAM,kCAQzB;IAED,cAAuB,QAAQ,0CAE9B;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,eAAe,EAAE,QAAQ,CAAA;KACzB;CACD"}
|
package/dist/Page/PageHost.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { Component, component, css, html } from '@a11d/lit';
|
|
3
|
+
/** The element hosting the current page, rendered by the application. */
|
|
3
4
|
let PageHost = class PageHost extends Component {
|
|
4
5
|
static get styles() {
|
|
5
|
-
return css `
|
|
6
|
-
:host {
|
|
7
|
-
display: grid;
|
|
8
|
-
grid-template-rows: 1fr;
|
|
9
|
-
width: 100%;
|
|
10
|
-
}
|
|
6
|
+
return css `
|
|
7
|
+
:host {
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-rows: 1fr;
|
|
10
|
+
width: 100%;
|
|
11
|
+
}
|
|
11
12
|
`;
|
|
12
13
|
}
|
|
13
14
|
get template() {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** The web app manifest of the application, as linked in the document's head. */
|
|
1
2
|
export type Manifest = {
|
|
2
3
|
readonly name: string;
|
|
3
4
|
readonly short_name: string;
|
|
@@ -10,6 +11,7 @@ export type Manifest = {
|
|
|
10
11
|
readonly icons: Array<ManifestIcon>;
|
|
11
12
|
readonly version?: string;
|
|
12
13
|
};
|
|
14
|
+
/** An icon of the web app manifest. */
|
|
13
15
|
export type ManifestIcon = {
|
|
14
16
|
readonly src: string;
|
|
15
17
|
readonly sizes: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Manifest.d.ts","sourceRoot":"","sources":["../../PwaHelper/Manifest.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACzC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,CAAA;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACrB,CAAA"}
|
|
1
|
+
{"version":3,"file":"Manifest.d.ts","sourceRoot":"","sources":["../../PwaHelper/Manifest.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,MAAM,QAAQ,GAAG;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACzC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,CAAA;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,uCAAuC;AACvC,MAAM,MAAM,YAAY,GAAG;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManifestProvider.d.ts","sourceRoot":"","sources":["../../PwaHelper/ManifestProvider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"ManifestProvider.d.ts","sourceRoot":"","sources":["../../PwaHelper/ManifestProvider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAmB7C,OAAO,CAAC,MAAM,CAAC;IAEd,kGAAkG;IAClG,MAAM,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAA;CACpC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** The `beforeinstallprompt` event, dispatched when the browser offers to install the application. */
|
|
1
2
|
export interface BeforeInstallPromptEvent extends Event {
|
|
2
3
|
readonly platforms: Array<string>;
|
|
3
4
|
readonly userChoice: Promise<{
|
|
@@ -6,9 +7,12 @@ export interface BeforeInstallPromptEvent extends Event {
|
|
|
6
7
|
}>;
|
|
7
8
|
prompt(): Promise<void>;
|
|
8
9
|
}
|
|
10
|
+
/** Registers service workers, and prompts to install the application as a progressive web app. */
|
|
9
11
|
export declare class PwaHelper {
|
|
10
12
|
private static pwaPrompt?;
|
|
13
|
+
/** The service worker container, if the browser supports service workers. */
|
|
11
14
|
static get serviceWorkerContainer(): ServiceWorkerContainer | undefined;
|
|
15
|
+
/** Registers the service worker at the path for the whole origin and prompts to install the application, logging any error. */
|
|
12
16
|
static registerServiceWorker(absolutePath: string): Promise<void>;
|
|
13
17
|
static unregisterServiceWorkers(): Promise<void>;
|
|
14
18
|
private static requestInstallation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PwaHelper.d.ts","sourceRoot":"","sources":["../../PwaHelper/PwaHelper.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAyB,SAAQ,KAAK;IACtD,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACjC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;QAC5B,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,WAAW,CAAA;QAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KACzB,CAAC,CAAA;IACF,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACvB;AAED,qBAAa,SAAS;IACrB,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAA0B;IASnD,MAAM,KAAK,sBAAsB,IACE,sBAAsB,GAAG,SAAS,CACpE;
|
|
1
|
+
{"version":3,"file":"PwaHelper.d.ts","sourceRoot":"","sources":["../../PwaHelper/PwaHelper.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,WAAW,wBAAyB,SAAQ,KAAK;IACtD,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACjC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;QAC5B,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,WAAW,CAAA;QAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KACzB,CAAC,CAAA;IACF,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACvB;AAED,kGAAkG;AAClG,qBAAa,SAAS;IACrB,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAA0B;IASnD,6EAA6E;IAC7E,MAAM,KAAK,sBAAsB,IACE,sBAAsB,GAAG,SAAS,CACpE;IAED,+HAA+H;IAC/H,OAAa,qBAAqB,CAAC,YAAY,EAAE,MAAM,iBAQtD;IAED,OAAa,wBAAwB,kBAKpC;mBAEoB,mBAAmB;CAaxC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Registers service workers, and prompts to install the application as a progressive web app. */
|
|
1
2
|
export class PwaHelper {
|
|
2
3
|
static {
|
|
3
4
|
window?.addEventListener('beforeinstallprompt', e => {
|
|
@@ -5,9 +6,11 @@ export class PwaHelper {
|
|
|
5
6
|
e.preventDefault();
|
|
6
7
|
});
|
|
7
8
|
}
|
|
9
|
+
/** The service worker container, if the browser supports service workers. */
|
|
8
10
|
static get serviceWorkerContainer() {
|
|
9
11
|
return navigator.serviceWorker;
|
|
10
12
|
}
|
|
13
|
+
/** Registers the service worker at the path for the whole origin and prompts to install the application, logging any error. */
|
|
11
14
|
static async registerServiceWorker(absolutePath) {
|
|
12
15
|
try {
|
|
13
16
|
await this.serviceWorkerContainer?.register(absolutePath, { scope: '/' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoutableComponent.d.ts","sourceRoot":"","sources":["../../Router/RoutableComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkE,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAM9H,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAA;AAEnF,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,mBAAmB,CAAA;AAEtD,oBAAY,kBAAkB;IAAG,IAAI,IAAA;IAAE,GAAG,IAAA;IAAE,MAAM,IAAA;CAAE;AAEpD,8BAAsB,iBAAiB,CAAC,CAAC,SAAS,kBAAkB,GAAG,IAAI,CAAE,SAAQ,SAAS;IAC7F,MAAM,CAAC,QAAQ,SAAK;IACpB,MAAM,CAAC,QAAQ,CAAC,SAAS,oCAA0C;IAEnE,MAAM,CAAC,IAAI,EAAE,mBAAmB,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC,WAAW,CAAC,CAAc;IAEtF,OAAO,CAAC,MAAM,CAAC,OAAO,CAAsB;IAC5C,MAAM,KAAK,MAAM,aAA2E;IAC5F,MAAM,KAAK,MAAM,CAAC,KAAK,UAAA,EAA0B;IAEjD,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"RoutableComponent.d.ts","sourceRoot":"","sources":["../../Router/RoutableComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkE,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAM9H,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAA;AAEnF,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,mBAAmB,CAAA;AAEtD,oBAAY,kBAAkB;IAAG,IAAI,IAAA;IAAE,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