@leavittsoftware/web 9.3.0 → 9.5.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/leavitt/error-page/error-page.d.ts +4 -4
- package/leavitt/error-page/error-page.js +2 -2
- package/leavitt/error-page/error-page.js.map +1 -1
- package/package.json +2 -2
- package/titanium/error-page/error-page.d.ts +3 -3
- package/titanium/error-page/error-page.js +1 -1
- package/titanium/error-page/error-page.js.map +1 -1
- package/titanium/helpers/helpers.d.ts +1 -0
- package/titanium/helpers/helpers.js +1 -0
- package/titanium/helpers/helpers.js.map +1 -1
- package/titanium/helpers/promise-tracking.d.ts +24 -0
- package/titanium/helpers/promise-tracking.js +45 -0
- package/titanium/helpers/promise-tracking.js.map +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
2
|
import '../app/app-main-content-container';
|
|
3
3
|
import '../app/app-width-limiter';
|
|
4
4
|
declare const LeavittErrorPage_base: import("../theme/theme-preference").Constructor<import("../theme/theme-preference").ThemePreferenceInterface> & typeof LitElement;
|
|
@@ -13,12 +13,12 @@ export declare class LeavittErrorPage extends LeavittErrorPage_base {
|
|
|
13
13
|
/**
|
|
14
14
|
* Reason text for the error
|
|
15
15
|
*/
|
|
16
|
-
accessor heading: string
|
|
17
|
-
accessor message: string
|
|
16
|
+
accessor heading: string | TemplateResult<1>;
|
|
17
|
+
accessor message: string | TemplateResult<1>;
|
|
18
18
|
private accessor particlesContainer;
|
|
19
19
|
firstUpdated(): Promise<void>;
|
|
20
20
|
static styles: import("lit").CSSResult;
|
|
21
|
-
render():
|
|
21
|
+
render(): TemplateResult<1>;
|
|
22
22
|
}
|
|
23
23
|
export {};
|
|
24
24
|
//# sourceMappingURL=error-page.d.ts.map
|
|
@@ -170,10 +170,10 @@ let LeavittErrorPage = class LeavittErrorPage extends ThemePreference(LitElement
|
|
|
170
170
|
}
|
|
171
171
|
};
|
|
172
172
|
__decorate([
|
|
173
|
-
property(
|
|
173
|
+
property()
|
|
174
174
|
], LeavittErrorPage.prototype, "heading", null);
|
|
175
175
|
__decorate([
|
|
176
|
-
property(
|
|
176
|
+
property()
|
|
177
177
|
], LeavittErrorPage.prototype, "message", null);
|
|
178
178
|
__decorate([
|
|
179
179
|
query('div[particles]')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-page.js","sourceRoot":"","sources":["error-page.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"error-page.js","sourceRoot":"","sources":["error-page.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,mCAAmC,CAAC;AAC3C,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAA2B,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAyB,MAAM,2BAA2B,CAAC;AACnF,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AAEnE;;;;;GAKG;AAGI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,eAAe,CAAC,UAAU,CAAC;IAI1C,4BAAsC,QAAQ,CAAC;IAHpE;;OAEG;IACkB,IAAA,OAAO,6CAAwC;IAA/C,IAAA,OAAO,mDAAwC;IAC/C,4BAAsC,wCAAwC,CAAC;IAA/E,IAAA,OAAO,6CAAwE;IAA/E,IAAA,OAAO,mDAAwE;IAE1D,qCAAmC;IAAnC,IAAA,kBAAkB,wDAAiB;IAAnC,IAAA,kBAAkB,8DAAiB;IAE7E,qBAAqB,CAAS;IAC9B,uBA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CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,0CAA0C,CAAC,CAAC;QACnG,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,eAAe,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IACzF,CAAC;aAEM,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFlB,AAjFY,CAiFX;IAEF,MAAM;QACJ,OAAO,IAAI,CAAA;;;;gBAIC,IAAI,CAAC,OAAO;gBACZ,IAAI,CAAC,OAAO;;;;;;;;;;;KAWvB,CAAC;IACJ,CAAC;;AAzJoB;IAApB,QAAQ,EAAE;+CAAyD;AAC/C;IAApB,QAAQ,EAAE;+CAAyF;AAE1D;IAAzC,KAAK,CAAC,gBAAgB,CAAC;0DAAqD;AAPlE,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CA8J5B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leavittsoftware/web",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"files": [
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"url": "https://github.com/LeavittSoftware/titanium-elements/issues"
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://github.com/LeavittSoftware/titanium-elements/#readme",
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "933088b394e271b9baca3b108076e85d67477acb"
|
|
48
48
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* A pre-styled error page
|
|
4
4
|
*
|
|
@@ -9,8 +9,8 @@ export declare class TitaniumErrorPage extends LitElement {
|
|
|
9
9
|
/**
|
|
10
10
|
* Reason text for the error
|
|
11
11
|
*/
|
|
12
|
-
accessor message: string
|
|
12
|
+
accessor message: string | TemplateResult<1>;
|
|
13
13
|
static styles: import("lit").CSSResult;
|
|
14
|
-
render():
|
|
14
|
+
render(): TemplateResult<1>;
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=error-page.d.ts.map
|
|
@@ -86,7 +86,7 @@ let TitaniumErrorPage = class TitaniumErrorPage extends LitElement {
|
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
__decorate([
|
|
89
|
-
property(
|
|
89
|
+
property()
|
|
90
90
|
], TitaniumErrorPage.prototype, "message", null);
|
|
91
91
|
TitaniumErrorPage = __decorate([
|
|
92
92
|
customElement('titanium-error-page')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-page.js","sourceRoot":"","sources":["error-page.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"error-page.js","sourceRoot":"","sources":["error-page.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;;;GAKG;AAGI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU;IAI1B,4BAAsC,wDAAwD,CAAC;IAHpH;;OAEG;IACkB,IAAA,OAAO,6CAAwF;IAA/F,IAAA,OAAO,mDAAwF;aAE7G,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DlB,AA5DY,CA4DX;IAEF,MAAM;QACJ,OAAO,IAAI,CAAA;;;cAGD,IAAI,CAAC,OAAO;;;KAGrB,CAAC;IACJ,CAAC;;AAxEoB;IAApB,QAAQ,EAAE;gDAAyG;AAJzG,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CA6E7B"}
|
|
@@ -6,6 +6,7 @@ export { installMediaQueryWatcher } from './install-media-query-watcher';
|
|
|
6
6
|
export { getSearchTokens } from './get-search-token';
|
|
7
7
|
export { Debouncer } from './debouncer';
|
|
8
8
|
export { LoadWhile } from './load-while';
|
|
9
|
+
export { promiseTracking } from './promise-tracking';
|
|
9
10
|
export { join } from './join';
|
|
10
11
|
export { delay } from './delay';
|
|
11
12
|
export { middleEllipsis } from './middle-ellipsis';
|
|
@@ -6,6 +6,7 @@ export { installMediaQueryWatcher } from './install-media-query-watcher';
|
|
|
6
6
|
export { getSearchTokens } from './get-search-token';
|
|
7
7
|
export { Debouncer } from './debouncer';
|
|
8
8
|
export { LoadWhile } from './load-while';
|
|
9
|
+
export { promiseTracking } from './promise-tracking';
|
|
9
10
|
export { join } from './join';
|
|
10
11
|
export { delay } from './delay';
|
|
11
12
|
export { middleEllipsis } from './middle-ellipsis';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decorates a reactive boolean accessor so that calling the generated method
|
|
3
|
+
* sets the property to `true` while the supplied promise is pending, and
|
|
4
|
+
* back to `false` once it resolves or rejects. Re-throws errors.
|
|
5
|
+
*
|
|
6
|
+
* Reentrancy: if the method is called multiple times concurrently, the
|
|
7
|
+
* property only flips back to `false` after ALL outstanding promises settle.
|
|
8
|
+
*
|
|
9
|
+
* Because the method name is a runtime string, TypeScript can't see it on
|
|
10
|
+
* the host class. Consumers add a one-line `declare` next to the accessor.
|
|
11
|
+
*
|
|
12
|
+
* @param methodName The name of the method to add to the host prototype.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* \@promiseTracking('trackLoadingPromise')
|
|
17
|
+
* \@state() accessor isLoading = false;
|
|
18
|
+
* declare trackLoadingPromise: (p: Promise<unknown>) => Promise<void>;
|
|
19
|
+
*
|
|
20
|
+
* await this.trackLoadingPromise(api.load());
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function promiseTracking(methodName: string): (target: object, propertyKey: string | symbol, _descriptor: PropertyDescriptor) => void;
|
|
24
|
+
//# sourceMappingURL=promise-tracking.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decorates a reactive boolean accessor so that calling the generated method
|
|
3
|
+
* sets the property to `true` while the supplied promise is pending, and
|
|
4
|
+
* back to `false` once it resolves or rejects. Re-throws errors.
|
|
5
|
+
*
|
|
6
|
+
* Reentrancy: if the method is called multiple times concurrently, the
|
|
7
|
+
* property only flips back to `false` after ALL outstanding promises settle.
|
|
8
|
+
*
|
|
9
|
+
* Because the method name is a runtime string, TypeScript can't see it on
|
|
10
|
+
* the host class. Consumers add a one-line `declare` next to the accessor.
|
|
11
|
+
*
|
|
12
|
+
* @param methodName The name of the method to add to the host prototype.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* \@promiseTracking('trackLoadingPromise')
|
|
17
|
+
* \@state() accessor isLoading = false;
|
|
18
|
+
* declare trackLoadingPromise: (p: Promise<unknown>) => Promise<void>;
|
|
19
|
+
*
|
|
20
|
+
* await this.trackLoadingPromise(api.load());
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export function promiseTracking(methodName) {
|
|
24
|
+
return function (target, propertyKey, _descriptor) {
|
|
25
|
+
const counterKey = Symbol(`__${String(propertyKey)}_count__`);
|
|
26
|
+
Object.defineProperty(target, methodName, {
|
|
27
|
+
configurable: true,
|
|
28
|
+
writable: true,
|
|
29
|
+
value: async function (promise) {
|
|
30
|
+
this[counterKey] = (this[counterKey] ?? 0) + 1;
|
|
31
|
+
this[propertyKey] = true;
|
|
32
|
+
try {
|
|
33
|
+
await promise;
|
|
34
|
+
}
|
|
35
|
+
finally {
|
|
36
|
+
this[counterKey]--;
|
|
37
|
+
if (this[counterKey] === 0) {
|
|
38
|
+
this[propertyKey] = false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=promise-tracking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promise-tracking.js","sourceRoot":"","sources":["promise-tracking.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,eAAe,CAAC,UAAkB;IAChD,OAAO,UAAU,MAAc,EAAE,WAA4B,EAAE,WAA+B;QAC5F,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAE9D,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE;YACxC,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,KAAK,WAAsB,OAAyB;gBACzD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;gBAC/C,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;gBACzB,IAAI,CAAC;oBACH,MAAM,OAAO,CAAC;gBAChB,CAAC;wBAAS,CAAC;oBACT,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;oBACnB,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;wBAC3B,IAAI,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;oBAC5B,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|