@reidelsaltres/pureper 0.1.78 → 0.1.79
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/out/foundation/component_api/UniHtml.d.ts +0 -2
- package/out/foundation/component_api/UniHtml.d.ts.map +1 -1
- package/out/foundation/component_api/UniHtml.js +1 -6
- package/out/foundation/component_api/UniHtml.js.map +1 -1
- package/package.json +1 -1
- package/src/foundation/component_api/UniHtml.ts +1 -8
|
@@ -10,14 +10,12 @@ import IElementHolder from "../api/ElementHolder.js";
|
|
|
10
10
|
* Use static factory methods for instantiation.
|
|
11
11
|
*/
|
|
12
12
|
export default class UniHtml {
|
|
13
|
-
private originalLocation;
|
|
14
13
|
/**
|
|
15
14
|
* Unified component lifecycle entrypoint.
|
|
16
15
|
* Loads HTML, then calls preLoadJS, render, and postLoadJS hooks in order.
|
|
17
16
|
* @param element Target container (usually shadowRoot.host)
|
|
18
17
|
*/
|
|
19
18
|
load(element: HTMLElement | ShadowRoot): Promise<void>;
|
|
20
|
-
reload(element?: HTMLElement | ShadowRoot): Promise<void>;
|
|
21
19
|
private _postInit;
|
|
22
20
|
private _init;
|
|
23
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UniHtml.d.ts","sourceRoot":"","sources":["../../../src/foundation/component_api/UniHtml.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AACH,OAAO,cAAc,MAAM,yBAAyB,CAAC;AAGrD;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,OAAO;IACxB
|
|
1
|
+
{"version":3,"file":"UniHtml.d.ts","sourceRoot":"","sources":["../../../src/foundation/component_api/UniHtml.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AACH,OAAO,cAAc,MAAM,yBAAyB,CAAC;AAGrD;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,OAAO;IACxB;;;;OAIG;IACU,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;YAuBrD,SAAS;YAGT,KAAK;IAGnB;;;;;OAKG;cACa,OAAO,CAAC,MAAM,EAAG,cAAc;IAC/C;;;;;OAKG;cACa,QAAQ,CAAC,MAAM,EAAE,cAAc;IAC/C;;;;;OAKG;cACa,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,GAAG,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAaxG"}
|
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
* Use static factory methods for instantiation.
|
|
4
4
|
*/
|
|
5
5
|
export default class UniHtml {
|
|
6
|
-
originalLocation;
|
|
7
6
|
/**
|
|
8
7
|
* Unified component lifecycle entrypoint.
|
|
9
8
|
* Loads HTML, then calls preLoadJS, render, and postLoadJS hooks in order.
|
|
10
9
|
* @param element Target container (usually shadowRoot.host)
|
|
11
10
|
*/
|
|
12
11
|
async load(element) {
|
|
13
|
-
|
|
12
|
+
;
|
|
14
13
|
const preHtml = await this._init();
|
|
15
14
|
const html = await this._postInit(preHtml);
|
|
16
15
|
const localRoot = document.createElement('div');
|
|
@@ -28,10 +27,6 @@ export default class UniHtml {
|
|
|
28
27
|
// внутрь shadowRoot, и можно безопасно работать с this.shadowRoot, измерениями layout и т.п.
|
|
29
28
|
await this.postLoad(holder);
|
|
30
29
|
}
|
|
31
|
-
//NEW
|
|
32
|
-
async reload(element = this.originalLocation) {
|
|
33
|
-
return this.load(element);
|
|
34
|
-
}
|
|
35
30
|
async _postInit(html) {
|
|
36
31
|
throw new Error("Method not implemented.");
|
|
37
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UniHtml.js","sourceRoot":"","sources":["../../../src/foundation/component_api/UniHtml.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,OAAO;
|
|
1
|
+
{"version":3,"file":"UniHtml.js","sourceRoot":"","sources":["../../../src/foundation/component_api/UniHtml.ts"],"names":[],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AAC;QAED,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACvD,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;YAC3B,YAAY,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;QAEA,MAAc,CAAC,OAAO,GAAG,IAAI,CAAC;QAC/B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -13,14 +13,12 @@ import IElementHolder from "../api/ElementHolder.js";
|
|
|
13
13
|
* Use static factory methods for instantiation.
|
|
14
14
|
*/
|
|
15
15
|
export default class UniHtml {
|
|
16
|
-
private originalLocation: HTMLElement | ShadowRoot;
|
|
17
16
|
/**
|
|
18
17
|
* Unified component lifecycle entrypoint.
|
|
19
18
|
* Loads HTML, then calls preLoadJS, render, and postLoadJS hooks in order.
|
|
20
19
|
* @param element Target container (usually shadowRoot.host)
|
|
21
20
|
*/
|
|
22
|
-
public async load(element: HTMLElement | ShadowRoot): Promise<void> {
|
|
23
|
-
this.originalLocation = element;
|
|
21
|
+
public async load(element: HTMLElement | ShadowRoot): Promise<void> {;
|
|
24
22
|
|
|
25
23
|
const preHtml: string = await this._init();
|
|
26
24
|
const html: string = await this._postInit(preHtml);
|
|
@@ -43,11 +41,6 @@ export default class UniHtml {
|
|
|
43
41
|
await this.postLoad(holder);
|
|
44
42
|
}
|
|
45
43
|
|
|
46
|
-
//NEW
|
|
47
|
-
public async reload(element: HTMLElement | ShadowRoot = this.originalLocation): Promise<void> {
|
|
48
|
-
return this.load(element);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
44
|
private async _postInit(html: string): Promise<string> {
|
|
52
45
|
throw new Error("Method not implemented.");
|
|
53
46
|
}
|