@blockquote-web-components/blockquote-base-embedded-webview 1.4.0 → 1.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockquote-web-components/blockquote-base-embedded-webview",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Webcomponent blockquote-base-embedded-webview following open-wc recommendations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lit",
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
".": {
|
|
15
15
|
"default": "./index.js"
|
|
16
16
|
},
|
|
17
|
-
"./package.json":
|
|
17
|
+
"./package.json": {
|
|
18
|
+
"default": "./package.json"
|
|
19
|
+
},
|
|
18
20
|
"./src/BlockquoteBaseEmbeddedWebview.js": {
|
|
19
21
|
"default": "./src/BlockquoteBaseEmbeddedWebview.js"
|
|
20
22
|
},
|
|
@@ -168,7 +170,7 @@
|
|
|
168
170
|
"lit": "^2.0.2"
|
|
169
171
|
},
|
|
170
172
|
"devDependencies": {
|
|
171
|
-
"@blockquote-web-components/blockquote-base-common-dev-dependencies": "^1.4.
|
|
173
|
+
"@blockquote-web-components/blockquote-base-common-dev-dependencies": "^1.4.2",
|
|
172
174
|
"@blockquote-web-components/blockquote-foundations-sass": "^1.0.0",
|
|
173
175
|
"@polymer/iron-test-helpers": "^3.0.1"
|
|
174
176
|
},
|
|
@@ -176,5 +178,5 @@
|
|
|
176
178
|
"access": "public"
|
|
177
179
|
},
|
|
178
180
|
"customElements": "custom-elements.json",
|
|
179
|
-
"gitHead": "
|
|
181
|
+
"gitHead": "1e2c4a8e7117f9d24e0eb303f34b7d93ab461e54"
|
|
180
182
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html, LitElement } from 'lit';
|
|
1
|
+
import { html, LitElement, render as LitHtmlRender } from 'lit';
|
|
2
2
|
import { ref, createRef } from 'lit/directives/ref.js';
|
|
3
3
|
import '../define/blockquote-base-embedded-webview-size.js';
|
|
4
4
|
import '../define/blockquote-base-embedded-webview-resize.js';
|
|
@@ -195,7 +195,6 @@ export class BlockquoteBaseEmbeddedWebview extends LitElement {
|
|
|
195
195
|
this._controlBottom = parseFloat(
|
|
196
196
|
window.getComputedStyle(this._embeddedResizeRef.value).paddingBottom,
|
|
197
197
|
);
|
|
198
|
-
this.append(this.embedded);
|
|
199
198
|
}
|
|
200
199
|
|
|
201
200
|
_updateSize({ detail }) {
|
|
@@ -217,7 +216,15 @@ export class BlockquoteBaseEmbeddedWebview extends LitElement {
|
|
|
217
216
|
}
|
|
218
217
|
|
|
219
218
|
render() {
|
|
220
|
-
return html` ${this._headerTpl} ${this._mainTpl} `;
|
|
219
|
+
return html` ${this._headerTpl} ${this._mainTpl} ${this._litHtmlRender()}`;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
_litHtmlRender() {
|
|
223
|
+
LitHtmlRender(this._lightDomTpl, this);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
get _lightDomTpl() {
|
|
227
|
+
return this.embedded;
|
|
221
228
|
}
|
|
222
229
|
|
|
223
230
|
get _headerTpl() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html, LitElement } from 'lit';
|
|
1
|
+
import { html, LitElement, render as LitHtmlRender } from 'lit';
|
|
2
2
|
import { styles } from './styles/blockquote-base-embedded-webview-element-styles.css.js';
|
|
3
3
|
/**
|
|
4
4
|

|
|
@@ -70,21 +70,26 @@ export class BlockquoteBaseEmbeddedWebviewElement extends LitElement {
|
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
this._embeddedElement.addEventListener('load', this._onLoadElement);
|
|
73
|
-
|
|
74
|
-
// append element after add listener `load`
|
|
75
|
-
this.append(this._embeddedElement);
|
|
76
73
|
}
|
|
77
74
|
|
|
78
75
|
willUpdate(props) {
|
|
79
76
|
super.willUpdate && super.willUpdate(props);
|
|
80
77
|
|
|
81
|
-
if (props.has('src') && this.src !== '') {
|
|
78
|
+
if ((props.has('src') || props.has('embeddedTitle')) && this.src !== '') {
|
|
82
79
|
this._fetch(this.src);
|
|
83
80
|
}
|
|
84
81
|
}
|
|
85
82
|
|
|
86
83
|
render() {
|
|
87
|
-
return html` ${this._embeddedTpl} `;
|
|
84
|
+
return html` ${this._embeddedTpl} ${this._litHtmlRender()} `;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
_litHtmlRender() {
|
|
88
|
+
LitHtmlRender(this._lightDomTpl, this);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
get _lightDomTpl() {
|
|
92
|
+
return this._embeddedElement;
|
|
88
93
|
}
|
|
89
94
|
|
|
90
95
|
get _loadResource() {
|