@fluid-topics/ft-reader-toc 1.0.48 → 1.0.50
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.
|
@@ -130,7 +130,7 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
130
130
|
@click=${t=>this.onLinkClick(t)}>
|
|
131
131
|
<slot></slot>
|
|
132
132
|
</a>
|
|
133
|
-
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),
|
|
133
|
+
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber),this.click())}}ke.styles=be,we([r.property()],ke.prototype,"tocId",void 0),we([r.property()],ke.prototype,"section",void 0),we([r.property({type:Number})],ke.prototype,"pageNumber",void 0),we([r.property({type:Boolean})],ke.prototype,"removeStyle",void 0),e.customElement("ft-reader-internal-link")(ke),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(me||(me={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}($e||($e={})),new Map([...["abw"].map((t=>[t,$e.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,$e.AUDIO])),...["avi"].map((t=>[t,$e.AVI])),...["chm","xhs"].map((t=>[t,$e.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,$e.CODE])),...["csv"].map((t=>[t,$e.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,$e.DITA])),...["epub"].map((t=>[t,$e.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,$e.EXCEL])),...["flac"].map((t=>[t,$e.FLAC])),...["gif"].map((t=>[t,$e.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,$e.GZIP])),...["html","htm","xhtml"].map((t=>[t,$e.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,$e.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,$e.JPEG])),...["json"].map((t=>[t,$e.JSON])),...["m4a","m4p"].map((t=>[t,$e.M4A])),...["mov","qt"].map((t=>[t,$e.MOV])),...["mp3"].map((t=>[t,$e.MP3])),...["mp4","m4v"].map((t=>[t,$e.MP4])),...["ogg","oga"].map((t=>[t,$e.OGG])),...["pdf","ps"].map((t=>[t,$e.PDF])),...["png"].map((t=>[t,$e.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,$e.POWERPOINT])),...["rar"].map((t=>[t,$e.RAR])),...["stp"].map((t=>[t,$e.STP])),...["txt","rtf","md","mdown"].map((t=>[t,$e.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,$e.VIDEO])),...["wav"].map((t=>[t,$e.WAV])),...["wma"].map((t=>[t,$e.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,$e.WORD])),...["xml","xsl","rdf"].map((t=>[t,$e.XML])),...["yaml","yml","x-yaml"].map((t=>[t,$e.YAML])),...["zip"].map((t=>[t,$e.ZIP]))]);const ze={size:e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},Se=i.css`
|
|
134
134
|
:host, i.ft-icon {
|
|
135
135
|
display: inline-flex;
|
|
136
136
|
align-items: center;
|
|
@@ -93,7 +93,7 @@ var vt,xt;let yt=class extends R{constructor(){super(...arguments),this.renderOp
|
|
|
93
93
|
display: inline-block;
|
|
94
94
|
width: 0;
|
|
95
95
|
}
|
|
96
|
-
`;class zt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;t=this.resolvePluralKey(t,e);let n=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>n=n.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),n}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${String(t)}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function At(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Ut,jt,Ft;const Lt=Symbol("internalReduxEventsUnsubscribers"),It=Symbol("internalStoresUnsubscribers"),Tt=Symbol("internalStores");class Bt extends Et{constructor(){super(...arguments),this[Ut]=new Map,this[jt]=new Map,this[Ft]=[]}updated(t){var e;super.updated(t),(null===(e=this.reduxReactiveProperties)||void 0===e?void 0:e.some((e=>t.has(e))))&&this.updateFromStores()}getUnnamedStore(){if(this[Tt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Tt].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[Tt].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:At(t)?t.name:void 0)&&void 0!==i?i:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[Tt].delete(e)}setupStore(t,e){this[Tt].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Tt].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(t.store?this[It].has(t.store):this[It].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[It].set(t,e.subscribe((()=>this.updateFromStores()))),At(e)&&e.eventBus&&(null===(i=this.reduxEventListeners)||void 0===i||i.forEach(((t,i)=>{if("function"==typeof this[i]&&(!t.store||e.name===t.store)){const o=t=>this[i](t);e.eventBus.addEventListener(t.eventName,o),this[Lt].push((()=>e.eventBus.removeEventListener(t.eventName,o)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[It].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[Lt].forEach((t=>t())),this[Lt]=[]}unsubscribeFromStore(t){this[It].has(t)&&this[It].get(t)(),this[It].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}Ut=It,jt=Tt,Ft=Lt;const Pt=t=>{const e=null!=t?t:{};return(t,i)=>{var n;const s={hasChanged:(t,e)=>!h(t,e),attribute:!1,...e};o(s)(t,i);const r=t;r.reduxProperties=r.reduxProperties||new Map,r.reduxProperties.set(i,{selector:null!==(n=e.selector)&&void 0!==n?n:t=>t[i],store:e.store})}};var _t,Dt,Wt;const Ht=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Wt=null===(Dt=null===(_t=window.safari)||void 0===_t?void 0:_t.pushNotification)||void 0===Dt?void 0:Dt.toString())&&void 0!==Wt?Wt:""),Kt=1,Zt=2,Vt=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
96
|
+
`;class zt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;t=this.resolvePluralKey(t,e);let n=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>n=n.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),n}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${String(t)}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function At(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Ut,jt,Ft;const Lt=Symbol("internalReduxEventsUnsubscribers"),It=Symbol("internalStoresUnsubscribers"),Tt=Symbol("internalStores");class Bt extends Et{constructor(){super(...arguments),this[Ut]=new Map,this[jt]=new Map,this[Ft]=[]}updated(t){var e;super.updated(t),(null===(e=this.reduxReactiveProperties)||void 0===e?void 0:e.some((e=>t.has(e))))&&this.updateFromStores()}getUnnamedStore(){if(this[Tt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Tt].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[Tt].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:At(t)?t.name:void 0)&&void 0!==i?i:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[Tt].delete(e)}setupStore(t,e){this[Tt].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Tt].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(t.store?this[It].has(t.store):this[It].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[It].set(t,e.subscribe((()=>this.updateFromStores()))),At(e)&&e.eventBus&&(null===(i=this.reduxEventListeners)||void 0===i||i.forEach(((t,i)=>{if("function"==typeof this[i]&&(!t.store||e.name===t.store)){const o=t=>this[i](t);e.eventBus.addEventListener(t.eventName,o),this[Lt].push((()=>e.eventBus.removeEventListener(t.eventName,o)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[It].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[Lt].forEach((t=>t())),this[Lt]=[]}unsubscribeFromStore(t){this[It].has(t)&&this[It].get(t)(),this[It].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}Ut=It,jt=Tt,Ft=Lt,window.ftReduxStores||(window.ftReduxStores={});const Pt=t=>{const e=null!=t?t:{};return(t,i)=>{var n;const s={hasChanged:(t,e)=>!h(t,e),attribute:!1,...e};o(s)(t,i);const r=t;r.reduxProperties=r.reduxProperties||new Map,r.reduxProperties.set(i,{selector:null!==(n=e.selector)&&void 0!==n?n:t=>t[i],store:e.store})}};var _t,Dt,Wt;const Ht=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Wt=null===(Dt=null===(_t=window.safari)||void 0===_t?void 0:_t.pushNotification)||void 0===Dt?void 0:Dt.toString())&&void 0!==Wt?Wt:""),Kt=1,Zt=2,Vt=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
97
97
|
/**
|
|
98
98
|
* @license
|
|
99
99
|
* Copyright 2017 Google LLC
|
|
@@ -234,7 +234,7 @@ var vt,xt;let yt=class extends R{constructor(){super(...arguments),this.renderOp
|
|
|
234
234
|
@click=${t=>this.onLinkClick(t)}>
|
|
235
235
|
<slot></slot>
|
|
236
236
|
</a>
|
|
237
|
-
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),
|
|
237
|
+
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber),this.click())}}Ii.styles=Fi,Li([o()],Ii.prototype,"tocId",void 0),Li([o()],Ii.prototype,"section",void 0),Li([o({type:Number})],Ii.prototype,"pageNumber",void 0),Li([o({type:Boolean})],Ii.prototype,"removeStyle",void 0),c("ft-reader-internal-link")(Ii);
|
|
238
238
|
/**
|
|
239
239
|
* @license
|
|
240
240
|
* Copyright 2017 Google LLC
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-toc",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.50",
|
|
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.0.
|
|
23
|
-
"@fluid-topics/ft-reader-context": "1.0.
|
|
24
|
-
"@fluid-topics/ft-size-watcher": "1.0.
|
|
25
|
-
"@fluid-topics/ft-typography": "1.0.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-icon": "1.0.50",
|
|
23
|
+
"@fluid-topics/ft-reader-context": "1.0.50",
|
|
24
|
+
"@fluid-topics/ft-size-watcher": "1.0.50",
|
|
25
|
+
"@fluid-topics/ft-typography": "1.0.50",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "1.0.50",
|
|
27
27
|
"lit": "2.7.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "a5089c2cb78f1b703cfcaa915b24938d58abd420"
|
|
30
30
|
}
|