@fluid-topics/ft-reader-toc 1.3.19 → 1.3.20
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.
|
@@ -1223,7 +1223,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
|
|
|
1223
1223
|
<span class="ft-i18n">
|
|
1224
1224
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
1225
1225
|
</span>
|
|
1226
|
-
`}update(r){var o;super.update(r),["context","key","defaultMessage"].some(n=>r.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(o=this.defaultMessage)!==null&&o!==void 0?o:""})}};Fe.elementDefinitions={};Fe.styles=Ns;kr([(0,Lo.redux)()],Fe.prototype,"editorMode",void 0);kr([(0,Io.property)()],Fe.prototype,"context",void 0);kr([(0,Io.property)()],Fe.prototype,"key",void 0);kr([(0,Lo.jsonProperty)([])],Fe.prototype,"args",void 0);kr([(0,Io.property)()],Fe.prototype,"defaultMessage",void 0);var _o=class e{static build(r){return new e(r)}static buildCustom(r){return new e(r,!0)}static fromGwt(r){return new e(r)}get service(){return this.custom?no:rr}constructor(r,o=!1){this.name=r,this.custom=o,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return c=>({context:this.name,key:i,custom:this.custom,args:typeof c=="function"?void 0:c,argsProvider:typeof c=="function"?c:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)})}};(0,fl.customElement)("ft-i18n")(Fe);var vt=_o.build("designedReaderToc"),hl={expand:"Expand {0}",collapse:"Collapse {0}",expandAll:"Expand all",expandAllLong:"Expand all table of contents",collapseAll:"Collapse all",collapseAllLong:"Collapse all table of contents"};var H=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},$=class extends No(Mt){get isCurrentPageToc(){return this.scope==="current-page"}constructor(){super(),this.expanded=!1,this.iconVariant=Ee.fluid_topics,this.collapseIcon="MINUS",this.expandIcon="PLUS",this.leafNodeIconVariant=Ee.fluid_topics,this.leafNodeIcon="DOT",this.expandCollapseAll=!1,this.expandCollapseAllHideLabel=!1,this.expandCollapseAllTrailingIcon=!1,this.expandCollapseAllAlignment="left",this.expandCollapseAllHideIcon=!1,this.collapseAllIcon="ICON_COLLAPSE",this.expandAllIcon="ICON_EXPAND",this.autoCollapse=!1,this.scrollCurrentTopicIntoView=!1,this.scope="pages",this.empty=!0,this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set,this.expandAll=!1,this.viewportSize=ve.M,this.nodesToExpandExist=!1,this.addI18nContext(vt,hl)}update(r){var o,n,a;super.update(r),r.has("toc")&&(this.nodesToExpandExist=((o=this.toc)!==null&&o!==void 0?o:[]).some(i=>i.children.length>0)),r.has("highlightedTocIds")&&!this.expanded&&(this.automaticallyExpandedNodes=this.buildAutomaticallyExpandedNodes((n=this.highlightedTocIds)!==null&&n!==void 0?n:[])),this.empty=((a=this.toc)!==null&&a!==void 0?a:[]).length===0}contentAvailableCallback(r){var o,n;if(super.contentAvailableCallback(r),this.scrollCurrentTopicIntoView&&r.has("highlightedTocIds")&&this.highlightedTocIds&&((o=this.highlightedTocIds)===null||o===void 0?void 0:o.length)>0){let a=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelector(`[tocId="${this.highlightedTocIds[0]}"]`);a&&ze.scrollHelper.scrollIntoViewIfPossible(a,{behavior:"instant",position:.25})}}render(){var r;let o={"ft-reader-toc":!0,"ft-reader-toc-mobile":this.viewportSize===ve.S,"ft-reader-toc-desktop":this.viewportSize!==ve.S,"ft-reader-toc-loaded":this.currentPage!=null,"ft-reader-toc-expanded":this.expanded};return Ce.html`
|
|
1226
|
+
`}update(r){var o;super.update(r),["context","key","defaultMessage"].some(n=>r.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(o=this.defaultMessage)!==null&&o!==void 0?o:""})}};Fe.elementDefinitions={};Fe.styles=Ns;kr([(0,Lo.redux)()],Fe.prototype,"editorMode",void 0);kr([(0,Io.property)()],Fe.prototype,"context",void 0);kr([(0,Io.property)()],Fe.prototype,"key",void 0);kr([(0,Lo.jsonProperty)([])],Fe.prototype,"args",void 0);kr([(0,Io.property)()],Fe.prototype,"defaultMessage",void 0);var _o=class e{static build(r){return new e(r)}static buildCustom(r){return new e(r,!0)}static fromGwt(r){return new e(r)}get service(){return this.custom?no:rr}constructor(r,o=!1){this.name=r,this.custom=o,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return c=>({context:this.name,key:i,custom:this.custom,args:typeof c=="function"?void 0:c,argsProvider:typeof c=="function"?c:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(n,a)=>()=>a})}};(0,fl.customElement)("ft-i18n")(Fe);var vt=_o.build("designedReaderToc"),hl={expand:"Expand {0}",collapse:"Collapse {0}",expandAll:"Expand all",expandAllLong:"Expand all table of contents",collapseAll:"Collapse all",collapseAllLong:"Collapse all table of contents"};var H=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},$=class extends No(Mt){get isCurrentPageToc(){return this.scope==="current-page"}constructor(){super(),this.expanded=!1,this.iconVariant=Ee.fluid_topics,this.collapseIcon="MINUS",this.expandIcon="PLUS",this.leafNodeIconVariant=Ee.fluid_topics,this.leafNodeIcon="DOT",this.expandCollapseAll=!1,this.expandCollapseAllHideLabel=!1,this.expandCollapseAllTrailingIcon=!1,this.expandCollapseAllAlignment="left",this.expandCollapseAllHideIcon=!1,this.collapseAllIcon="ICON_COLLAPSE",this.expandAllIcon="ICON_EXPAND",this.autoCollapse=!1,this.scrollCurrentTopicIntoView=!1,this.scope="pages",this.empty=!0,this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set,this.expandAll=!1,this.viewportSize=ve.M,this.nodesToExpandExist=!1,this.addI18nContext(vt,hl)}update(r){var o,n,a;super.update(r),r.has("toc")&&(this.nodesToExpandExist=((o=this.toc)!==null&&o!==void 0?o:[]).some(i=>i.children.length>0)),r.has("highlightedTocIds")&&!this.expanded&&(this.automaticallyExpandedNodes=this.buildAutomaticallyExpandedNodes((n=this.highlightedTocIds)!==null&&n!==void 0?n:[])),this.empty=((a=this.toc)!==null&&a!==void 0?a:[]).length===0}contentAvailableCallback(r){var o,n;if(super.contentAvailableCallback(r),this.scrollCurrentTopicIntoView&&r.has("highlightedTocIds")&&this.highlightedTocIds&&((o=this.highlightedTocIds)===null||o===void 0?void 0:o.length)>0){let a=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelector(`[tocId="${this.highlightedTocIds[0]}"]`);a&&ze.scrollHelper.scrollIntoViewIfPossible(a,{behavior:"instant",position:.25})}}render(){var r;let o={"ft-reader-toc":!0,"ft-reader-toc-mobile":this.viewportSize===ve.S,"ft-reader-toc-desktop":this.viewportSize!==ve.S,"ft-reader-toc-loaded":this.currentPage!=null,"ft-reader-toc-expanded":this.expanded};return Ce.html`
|
|
1227
1227
|
<div class=${(0,yl.classMap)(o)}>
|
|
1228
1228
|
<ft-size-watcher @change=${this.onViewportSizeChange}></ft-size-watcher>
|
|
1229
1229
|
${this.renderExpandCollapseAll()}
|
|
@@ -1290,7 +1290,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1290
1290
|
<span class="ft-i18n">
|
|
1291
1291
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
1292
1292
|
</span>
|
|
1293
|
-
`}update(e){var o;super.update(e),["context","key","defaultMessage"].some(n=>e.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(o=this.defaultMessage)!==null&&o!==void 0?o:""})}};Fe.elementDefinitions={};Fe.styles=Kc;no([nt()],Fe.prototype,"editorMode",void 0);no([w()],Fe.prototype,"context",void 0);no([w()],Fe.prototype,"key",void 0);no([Ge([])],Fe.prototype,"args",void 0);no([w()],Fe.prototype,"defaultMessage",void 0);var en=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Ko:wr}constructor(e,o=!1){this.name=e,this.custom=o,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)})}};Q("ft-i18n")(Fe);var St=en.build("designedReaderToc"),nd={expand:"Expand {0}",collapse:"Collapse {0}",expandAll:"Expand all",expandAllLong:"Expand all table of contents",collapseAll:"Collapse all",collapseAllLong:"Collapse all table of contents"};var Y=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},j=class extends Qo(fr){get isCurrentPageToc(){return this.scope==="current-page"}constructor(){super(),this.expanded=!1,this.iconVariant=Re.fluid_topics,this.collapseIcon="MINUS",this.expandIcon="PLUS",this.leafNodeIconVariant=Re.fluid_topics,this.leafNodeIcon="DOT",this.expandCollapseAll=!1,this.expandCollapseAllHideLabel=!1,this.expandCollapseAllTrailingIcon=!1,this.expandCollapseAllAlignment="left",this.expandCollapseAllHideIcon=!1,this.collapseAllIcon="ICON_COLLAPSE",this.expandAllIcon="ICON_EXPAND",this.autoCollapse=!1,this.scrollCurrentTopicIntoView=!1,this.scope="pages",this.empty=!0,this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set,this.expandAll=!1,this.viewportSize=Se.M,this.nodesToExpandExist=!1,this.addI18nContext(St,nd)}update(e){var o,n,a;super.update(e),e.has("toc")&&(this.nodesToExpandExist=((o=this.toc)!==null&&o!==void 0?o:[]).some(i=>i.children.length>0)),e.has("highlightedTocIds")&&!this.expanded&&(this.automaticallyExpandedNodes=this.buildAutomaticallyExpandedNodes((n=this.highlightedTocIds)!==null&&n!==void 0?n:[])),this.empty=((a=this.toc)!==null&&a!==void 0?a:[]).length===0}contentAvailableCallback(e){var o,n;if(super.contentAvailableCallback(e),this.scrollCurrentTopicIntoView&&e.has("highlightedTocIds")&&this.highlightedTocIds&&((o=this.highlightedTocIds)===null||o===void 0?void 0:o.length)>0){let a=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelector(`[tocId="${this.highlightedTocIds[0]}"]`);a&&fi.scrollIntoViewIfPossible(a,{behavior:"instant",position:.25})}}render(){var e;let o={"ft-reader-toc":!0,"ft-reader-toc-mobile":this.viewportSize===Se.S,"ft-reader-toc-desktop":this.viewportSize!==Se.S,"ft-reader-toc-loaded":this.currentPage!=null,"ft-reader-toc-expanded":this.expanded};return U`
|
|
1293
|
+
`}update(e){var o;super.update(e),["context","key","defaultMessage"].some(n=>e.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(o=this.defaultMessage)!==null&&o!==void 0?o:""})}};Fe.elementDefinitions={};Fe.styles=Kc;no([nt()],Fe.prototype,"editorMode",void 0);no([w()],Fe.prototype,"context",void 0);no([w()],Fe.prototype,"key",void 0);no([Ge([])],Fe.prototype,"args",void 0);no([w()],Fe.prototype,"defaultMessage",void 0);var en=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Ko:wr}constructor(e,o=!1){this.name=e,this.custom=o,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(n,a)=>()=>a})}};Q("ft-i18n")(Fe);var St=en.build("designedReaderToc"),nd={expand:"Expand {0}",collapse:"Collapse {0}",expandAll:"Expand all",expandAllLong:"Expand all table of contents",collapseAll:"Collapse all",collapseAllLong:"Collapse all table of contents"};var Y=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},j=class extends Qo(fr){get isCurrentPageToc(){return this.scope==="current-page"}constructor(){super(),this.expanded=!1,this.iconVariant=Re.fluid_topics,this.collapseIcon="MINUS",this.expandIcon="PLUS",this.leafNodeIconVariant=Re.fluid_topics,this.leafNodeIcon="DOT",this.expandCollapseAll=!1,this.expandCollapseAllHideLabel=!1,this.expandCollapseAllTrailingIcon=!1,this.expandCollapseAllAlignment="left",this.expandCollapseAllHideIcon=!1,this.collapseAllIcon="ICON_COLLAPSE",this.expandAllIcon="ICON_EXPAND",this.autoCollapse=!1,this.scrollCurrentTopicIntoView=!1,this.scope="pages",this.empty=!0,this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set,this.expandAll=!1,this.viewportSize=Se.M,this.nodesToExpandExist=!1,this.addI18nContext(St,nd)}update(e){var o,n,a;super.update(e),e.has("toc")&&(this.nodesToExpandExist=((o=this.toc)!==null&&o!==void 0?o:[]).some(i=>i.children.length>0)),e.has("highlightedTocIds")&&!this.expanded&&(this.automaticallyExpandedNodes=this.buildAutomaticallyExpandedNodes((n=this.highlightedTocIds)!==null&&n!==void 0?n:[])),this.empty=((a=this.toc)!==null&&a!==void 0?a:[]).length===0}contentAvailableCallback(e){var o,n;if(super.contentAvailableCallback(e),this.scrollCurrentTopicIntoView&&e.has("highlightedTocIds")&&this.highlightedTocIds&&((o=this.highlightedTocIds)===null||o===void 0?void 0:o.length)>0){let a=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelector(`[tocId="${this.highlightedTocIds[0]}"]`);a&&fi.scrollIntoViewIfPossible(a,{behavior:"instant",position:.25})}}render(){var e;let o={"ft-reader-toc":!0,"ft-reader-toc-mobile":this.viewportSize===Se.S,"ft-reader-toc-desktop":this.viewportSize!==Se.S,"ft-reader-toc-loaded":this.currentPage!=null,"ft-reader-toc-expanded":this.expanded};return U`
|
|
1294
1294
|
<div class=${He(o)}>
|
|
1295
1295
|
<ft-size-watcher @change=${this.onViewportSizeChange}></ft-size-watcher>
|
|
1296
1296
|
${this.renderExpandCollapseAll()}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-toc",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.20",
|
|
4
4
|
"description": "Main table of content for integrated reader",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-icon": "1.3.
|
|
23
|
-
"@fluid-topics/ft-reader-context": "1.3.
|
|
24
|
-
"@fluid-topics/ft-size-watcher": "1.3.
|
|
25
|
-
"@fluid-topics/ft-typography": "1.3.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "1.3.
|
|
22
|
+
"@fluid-topics/ft-icon": "1.3.20",
|
|
23
|
+
"@fluid-topics/ft-reader-context": "1.3.20",
|
|
24
|
+
"@fluid-topics/ft-size-watcher": "1.3.20",
|
|
25
|
+
"@fluid-topics/ft-typography": "1.3.20",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "1.3.20",
|
|
27
27
|
"lit": "3.1.0"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "1bb0c50fc5a4fdb4f14d22b728ab719faddfc15e"
|
|
30
30
|
}
|