@startinblox/boilerplate 4.1.0 → 4.2.1
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/dist/index.js
CHANGED
|
@@ -691,13 +691,13 @@ class $ extends lt {
|
|
|
691
691
|
} = {}) {
|
|
692
692
|
super(), this.cherryPickedProperties = [], this.currentRoute = "";
|
|
693
693
|
const i = () => {
|
|
694
|
-
this._attach(t, e, r).then(
|
|
694
|
+
document.readyState === "complete" && this._attach(t, e, r).then(
|
|
695
695
|
(o) => {
|
|
696
696
|
o && this.requestUpdate();
|
|
697
697
|
}
|
|
698
698
|
);
|
|
699
699
|
};
|
|
700
|
-
document.
|
|
700
|
+
document.addEventListener("readystatechange", i);
|
|
701
701
|
}
|
|
702
702
|
async _attach(t, e, r) {
|
|
703
703
|
return !this.orbit && window.orbit && (this.orbit = window.orbit, e) ? (be({
|
|
@@ -748,7 +748,7 @@ class $ extends lt {
|
|
|
748
748
|
o[n.value],
|
|
749
749
|
e,
|
|
750
750
|
r
|
|
751
|
-
)), n.cast && (o[n.value] = n.cast(o[n.value])));
|
|
751
|
+
)), n.cast && (o[n.value] = await n.cast(o[n.value])));
|
|
752
752
|
return await this._responseAdaptator(o);
|
|
753
753
|
}
|
|
754
754
|
async _getProxyValue(t, e = !0, r = this.cherryPickedProperties) {
|
package/package.json
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { nothing } from "lit";
|
|
2
|
-
import { property, state } from "lit/decorators.js";
|
|
3
|
-
|
|
4
1
|
import {
|
|
5
2
|
CLIENT_CONTEXT,
|
|
6
3
|
requestNavigation,
|
|
7
4
|
setupComponentSubscriptions,
|
|
8
5
|
} from "@helpers";
|
|
9
|
-
|
|
10
6
|
import { ComponentObjectsHandler } from "@helpers/components/componentObjectsHandler";
|
|
11
|
-
|
|
12
7
|
import type {
|
|
13
8
|
Container,
|
|
14
9
|
LiveOrbit,
|
|
@@ -17,6 +12,8 @@ import type {
|
|
|
17
12
|
Resource,
|
|
18
13
|
UnknownResource,
|
|
19
14
|
} from "@src/component";
|
|
15
|
+
import { nothing } from "lit";
|
|
16
|
+
import { property, state } from "lit/decorators.js";
|
|
20
17
|
|
|
21
18
|
export default class extends ComponentObjectsHandler {
|
|
22
19
|
constructor({
|
|
@@ -26,19 +23,17 @@ export default class extends ComponentObjectsHandler {
|
|
|
26
23
|
} = {}) {
|
|
27
24
|
super();
|
|
28
25
|
const attach = () => {
|
|
29
|
-
|
|
30
|
-
(
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
if (document.readyState === "complete") {
|
|
27
|
+
this._attach(defaultRoute, setupSubscriptions, ignoreRouter).then(
|
|
28
|
+
(attach: boolean) => {
|
|
29
|
+
if (attach) {
|
|
30
|
+
this.requestUpdate();
|
|
31
|
+
}
|
|
33
32
|
}
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
);
|
|
34
|
+
}
|
|
36
35
|
};
|
|
37
|
-
|
|
38
|
-
document.addEventListener("DOMContentLoaded", attach);
|
|
39
|
-
} else {
|
|
40
|
-
attach();
|
|
41
|
-
}
|
|
36
|
+
document.addEventListener("readystatechange", attach);
|
|
42
37
|
}
|
|
43
38
|
|
|
44
39
|
@property({ attribute: "default-data-src", reflect: true })
|
|
@@ -168,7 +163,7 @@ export default class extends ComponentObjectsHandler {
|
|
|
168
163
|
);
|
|
169
164
|
}
|
|
170
165
|
if (prop.cast) {
|
|
171
|
-
response[prop.value] = prop.cast(response[prop.value]);
|
|
166
|
+
response[prop.value] = await prop.cast(response[prop.value]);
|
|
172
167
|
}
|
|
173
168
|
}
|
|
174
169
|
}
|