@fluid-topics/ft-reader-topic-content 1.0.54 → 1.0.55
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.
|
@@ -45,7 +45,7 @@ class FtReaderTopicContent extends FtReaderTopicComponent {
|
|
|
45
45
|
this.error = undefined;
|
|
46
46
|
this.content = undefined;
|
|
47
47
|
if (this.map && this.tocNode) {
|
|
48
|
-
(_a = this.service) === null || _a === void 0 ? void 0 : _a.getTopicContent(this.tocNode
|
|
48
|
+
(_a = this.service) === null || _a === void 0 ? void 0 : _a.getTopicContent(this.tocNode).then(content => this.content = content || "<div class=\"empty-topic\"></div>").catch(e => this.error = e);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
contentAvailableCallback(props) {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
</section>
|
|
86
86
|
`:i.html`
|
|
87
87
|
<section class="topic-loading"></section>
|
|
88
|
-
`}updated(t){super.updated(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode
|
|
88
|
+
`}updated(t){super.updated(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode).then((t=>this.content=t||'<div class="empty-topic"></div>')).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,i,s,o,n,a,r;if(super.contentAvailableCallback(t),!this.disableContextInteractions&&(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&(null===(i=this.tocNode)||void 0===i?void 0:i.tocId)&&(null===(s=this.tocNode)||void 0===s?void 0:s.tocId)===this.scrollTarget.tocId&&this.content){(null!==(n=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==n?n:this).scrollIntoView({block:"start"}),null===(a=this.stateManager)||void 0===a||a.scrollDone()}const l=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector("section.topic");l&&this.onContentAvailable(l,this.shadowRoot)}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,s,n;if(this.error)return i.html`
|
|
89
89
|
<div class="topic-on-error">
|
|
90
90
|
<ft-icon>WARNING</ft-icon>
|
|
91
91
|
<div>
|
|
@@ -192,7 +192,7 @@ function(t,e){return(({finisher:t,descriptor:e})=>(i,n)=>{var r;if(void 0===n){c
|
|
|
192
192
|
</section>
|
|
193
193
|
`:X`
|
|
194
194
|
<section class="topic-loading"></section>
|
|
195
|
-
`}updated(t){super.updated(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode
|
|
195
|
+
`}updated(t){super.updated(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode).then((t=>this.content=t||'<div class="empty-topic"></div>')).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,i,n,r,o,s,a;if(super.contentAvailableCallback(t),!this.disableContextInteractions&&(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&(null===(i=this.tocNode)||void 0===i?void 0:i.tocId)&&(null===(n=this.tocNode)||void 0===n?void 0:n.tocId)===this.scrollTarget.tocId&&this.content){(null!==(o=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==o?o:this).scrollIntoView({block:"start"}),null===(s=this.stateManager)||void 0===s||s.scrollDone()}const c=null===(a=this.shadowRoot)||void 0===a?void 0:a.querySelector("section.topic");c&&this.onContentAvailable(c,this.shadowRoot)}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,i,n;if(this.error)return X`
|
|
196
196
|
<div class="topic-on-error">
|
|
197
197
|
<ft-icon>WARNING</ft-icon>
|
|
198
198
|
<div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-topic-content",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"description": "Content of a topic in integrated reader.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-chip": "1.0.
|
|
23
|
-
"@fluid-topics/ft-i18n": "1.0.
|
|
24
|
-
"@fluid-topics/ft-reader-context": "1.0.
|
|
25
|
-
"@fluid-topics/ft-reader-topic-context": "1.0.
|
|
26
|
-
"@fluid-topics/ft-tooltip": "1.0.
|
|
27
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
28
|
-
"@fluid-topics/public-api": "1.0.
|
|
22
|
+
"@fluid-topics/ft-chip": "1.0.55",
|
|
23
|
+
"@fluid-topics/ft-i18n": "1.0.55",
|
|
24
|
+
"@fluid-topics/ft-reader-context": "1.0.55",
|
|
25
|
+
"@fluid-topics/ft-reader-topic-context": "1.0.55",
|
|
26
|
+
"@fluid-topics/ft-tooltip": "1.0.55",
|
|
27
|
+
"@fluid-topics/ft-wc-utils": "1.0.55",
|
|
28
|
+
"@fluid-topics/public-api": "1.0.45",
|
|
29
29
|
"lit": "2.7.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "4eca32ed1fec3fd25b6d76b26895a6318cfa8ca2"
|
|
32
32
|
}
|