@leavittsoftware/web 1.15.0 → 1.16.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leavittsoftware/web",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"files": [
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"url": "https://github.com/LeavittSoftware/titanium-elements/issues"
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://github.com/LeavittSoftware/titanium-elements/#readme",
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "9ca670a054674cbc1d59af2a7993a47764a1b14d"
|
|
43
43
|
}
|
|
@@ -9,9 +9,7 @@ import '@material/web/progress/linear-progress';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class TitaniumFullPageLoadingIndicator extends LitElement {
|
|
11
11
|
#private;
|
|
12
|
-
|
|
13
|
-
protected accessor opening: boolean;
|
|
14
|
-
protected accessor closing: boolean;
|
|
12
|
+
private accessor open;
|
|
15
13
|
firstUpdated(): void;
|
|
16
14
|
static styles: import("lit").CSSResult;
|
|
17
15
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { css, html, LitElement } from 'lit';
|
|
3
|
-
import {
|
|
3
|
+
import { customElement, state } from 'lit/decorators.js';
|
|
4
4
|
import { PendingStateEvent } from '../types/pending-state-event';
|
|
5
5
|
import '@material/web/progress/linear-progress';
|
|
6
6
|
/**
|
|
@@ -11,17 +11,9 @@ import '@material/web/progress/linear-progress';
|
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
let TitaniumFullPageLoadingIndicator = class TitaniumFullPageLoadingIndicator extends LitElement {
|
|
14
|
-
#
|
|
15
|
-
get
|
|
16
|
-
set
|
|
17
|
-
#opening_accessor_storage;
|
|
18
|
-
get opening() { return this.#opening_accessor_storage; }
|
|
19
|
-
set opening(value) { this.#opening_accessor_storage = value; }
|
|
20
|
-
#closing_accessor_storage;
|
|
21
|
-
get closing() { return this.#closing_accessor_storage; }
|
|
22
|
-
set closing(value) { this.#closing_accessor_storage = value; }
|
|
23
|
-
#animationTimer;
|
|
24
|
-
#animationFrame;
|
|
14
|
+
#open_accessor_storage;
|
|
15
|
+
get open() { return this.#open_accessor_storage; }
|
|
16
|
+
set open(value) { this.#open_accessor_storage = value; }
|
|
25
17
|
#openDelayTimer;
|
|
26
18
|
#closeDelayTimer;
|
|
27
19
|
//Promises faster than this do not cause the scrim to open at all
|
|
@@ -32,6 +24,8 @@ let TitaniumFullPageLoadingIndicator = class TitaniumFullPageLoadingIndicator ex
|
|
|
32
24
|
#timeOpen;
|
|
33
25
|
#openCount = 0;
|
|
34
26
|
firstUpdated() {
|
|
27
|
+
this.popover = 'manual';
|
|
28
|
+
this.addEventListener('toggle', (e) => (this.open = e.newState === 'open'));
|
|
35
29
|
window.addEventListener(PendingStateEvent.eventType, async (e) => {
|
|
36
30
|
this.#open();
|
|
37
31
|
this.#openCount++;
|
|
@@ -54,19 +48,8 @@ let TitaniumFullPageLoadingIndicator = class TitaniumFullPageLoadingIndicator ex
|
|
|
54
48
|
window.clearTimeout(this.#closeDelayTimer);
|
|
55
49
|
this.#openDelayTimer = window.setTimeout(() => {
|
|
56
50
|
this.#timeOpen = performance.now();
|
|
57
|
-
this.
|
|
58
|
-
this.opened = false;
|
|
59
|
-
this.opening = true;
|
|
51
|
+
this.showPopover();
|
|
60
52
|
document.body.style.overflow = 'hidden';
|
|
61
|
-
this.#runNextAnimationFrame_(() => {
|
|
62
|
-
if (this.closing) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
this.opened = true;
|
|
66
|
-
this.#animationTimer = window.setTimeout(() => {
|
|
67
|
-
this.#handleAnimationTimerEnd_();
|
|
68
|
-
}, 50);
|
|
69
|
-
});
|
|
70
53
|
}, this.#openDelay);
|
|
71
54
|
}
|
|
72
55
|
#close() {
|
|
@@ -74,72 +57,35 @@ let TitaniumFullPageLoadingIndicator = class TitaniumFullPageLoadingIndicator ex
|
|
|
74
57
|
const totalTimeOpened = performance.now() - this.#timeOpen;
|
|
75
58
|
const closeDelay = Math.max(this.#minTimeOpen - totalTimeOpened, 0);
|
|
76
59
|
this.#closeDelayTimer = window.setTimeout(() => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
this.closing = true;
|
|
80
|
-
this.opened = false;
|
|
81
|
-
this.opening = false;
|
|
82
|
-
clearTimeout(this.#animationTimer);
|
|
83
|
-
this.#animationTimer = window.setTimeout(() => {
|
|
84
|
-
this.#handleAnimationTimerEnd_();
|
|
85
|
-
document.body.style.overflow = '';
|
|
86
|
-
}, 150);
|
|
60
|
+
this.hidePopover();
|
|
61
|
+
document.body.style.overflow = '';
|
|
87
62
|
}, closeDelay);
|
|
88
63
|
}
|
|
89
|
-
#handleAnimationTimerEnd_() {
|
|
90
|
-
this.opening = false;
|
|
91
|
-
this.closing = false;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Runs the given logic on the next animation frame, using setTimeout to factor in Firefox reflow behavior.
|
|
95
|
-
*/
|
|
96
|
-
#runNextAnimationFrame_(callback) {
|
|
97
|
-
cancelAnimationFrame(this.#animationFrame);
|
|
98
|
-
this.#animationFrame = requestAnimationFrame(() => {
|
|
99
|
-
this.#animationFrame = 0;
|
|
100
|
-
clearTimeout(this.#animationFrame);
|
|
101
|
-
this.#animationFrame = window.setTimeout(callback, 0);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
64
|
static { this.styles = css `
|
|
105
65
|
:host {
|
|
106
|
-
display: none;
|
|
107
|
-
position: relative;
|
|
108
|
-
position: fixed;
|
|
109
|
-
z-index: 19;
|
|
110
|
-
top: 0;
|
|
111
|
-
left: 0;
|
|
112
66
|
width: 100%;
|
|
113
67
|
height: 100%;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-webkit-transition: opacity 75ms linear;
|
|
117
|
-
-o-transition: opacity 75ms linear;
|
|
118
|
-
transition: opacity 75ms linear;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
:host([opening]),
|
|
122
|
-
:host([closing]),
|
|
123
|
-
:host([opened]) {
|
|
124
|
-
display: block;
|
|
125
|
-
z-index: 7;
|
|
126
|
-
}
|
|
68
|
+
max-width: 100vw;
|
|
69
|
+
max-height: 100vh;
|
|
127
70
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
71
|
+
border: 0;
|
|
72
|
+
inset: unset;
|
|
73
|
+
top: 0;
|
|
74
|
+
right: 0;
|
|
75
|
+
left: 0;
|
|
76
|
+
bottom: 0;
|
|
77
|
+
margin: 0;
|
|
78
|
+
padding: 0;
|
|
79
|
+
background: transparent;
|
|
132
80
|
}
|
|
133
81
|
|
|
134
|
-
:host
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
transition: opacity 150ms linear;
|
|
82
|
+
:host::backdrop {
|
|
83
|
+
background-color: var(--md-sys-color-scrim, #000);
|
|
84
|
+
backdrop-filter: blur(6px);
|
|
138
85
|
}
|
|
139
86
|
|
|
140
|
-
:host(
|
|
87
|
+
:host(:popover-open)::backdrop {
|
|
141
88
|
opacity: 0.32;
|
|
142
|
-
backdrop-filter: blur(6px);
|
|
143
89
|
}
|
|
144
90
|
|
|
145
91
|
md-linear-progress {
|
|
@@ -151,18 +97,12 @@ let TitaniumFullPageLoadingIndicator = class TitaniumFullPageLoadingIndicator ex
|
|
|
151
97
|
}
|
|
152
98
|
`; }
|
|
153
99
|
render() {
|
|
154
|
-
return html ` <md-linear-progress ?indeterminate=${this.
|
|
100
|
+
return html ` <md-linear-progress ?indeterminate=${this.open} ?hide=${!this.open}></md-linear-progress> `;
|
|
155
101
|
}
|
|
156
102
|
};
|
|
157
103
|
__decorate([
|
|
158
|
-
|
|
159
|
-
], TitaniumFullPageLoadingIndicator.prototype, "
|
|
160
|
-
__decorate([
|
|
161
|
-
property({ type: Boolean, reflect: true })
|
|
162
|
-
], TitaniumFullPageLoadingIndicator.prototype, "opening", null);
|
|
163
|
-
__decorate([
|
|
164
|
-
property({ type: Boolean, reflect: true })
|
|
165
|
-
], TitaniumFullPageLoadingIndicator.prototype, "closing", null);
|
|
104
|
+
state()
|
|
105
|
+
], TitaniumFullPageLoadingIndicator.prototype, "open", null);
|
|
166
106
|
TitaniumFullPageLoadingIndicator = __decorate([
|
|
167
107
|
customElement('titanium-full-page-loading-indicator')
|
|
168
108
|
], TitaniumFullPageLoadingIndicator);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"full-page-loading-indicator.js","sourceRoot":"","sources":["full-page-loading-indicator.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"full-page-loading-indicator.js","sourceRoot":"","sources":["full-page-loading-indicator.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,wCAAwC,CAAC;AAEhD;;;;;;GAMG;AAEI,IAAM,gCAAgC,GAAtC,MAAM,gCAAiC,SAAQ,UAAU;IACpC,uBAAc;IAAd,IAAA,IAAI,0CAAU;IAAd,IAAA,IAAI,gDAAU;IAExC,eAAe,CAAS;IACxB,gBAAgB,CAAS;IAEzB,iEAAiE;IACjE,oCAAoC;IACpC,UAAU,GAAW,EAAE,CAAC;IAExB,oCAAoC;IACpC,YAAY,GAAW,GAAG,CAAC;I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