@fluid-topics/ft-reader-content 1.0.54 → 1.0.56
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.
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
<article id=${this.tocId}>
|
|
58
58
|
<slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
|
|
59
59
|
</article>
|
|
60
|
-
`}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode,t.disableContextInteractions=this.disableContextInteractions}
|
|
60
|
+
`}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode,t.disableContextInteractions=this.disableContextInteractions}update(t){super.update(t),["mapId","tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}x.styles=I,w([e.redux({selector:t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.id}})],x.prototype,"mapId",void 0),w([s.property()],x.prototype,"tocId",void 0),w([s.property({type:Boolean})],x.prototype,"disableContextInteractions",void 0),w([s.state()],x.prototype,"tocNode",void 0),e.customElement("ft-reader-topic-context")(x);var $=function(t,e,i,s){for(var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(r=t[l])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class y extends a{constructor(){super(...arguments),this.renderTopic=()=>i.html`
|
|
61
61
|
<ft-reader-topic-title></ft-reader-topic-title>
|
|
62
62
|
<ft-reader-topic-content></ft-reader-topic-content>
|
|
63
63
|
`,this.disableContextInteractions=!1,this.renderBeforeFirst=5,this.renderAfterLast=10,this.visibleTopicsDebouncer=new e.Debouncer(100)}render(){var t;const e=(null===(t=this.currentPage)||void 0===t?void 0:t.topics)||[];return 0===e.length?i.nothing:i.html`
|
|
@@ -95,7 +95,7 @@ var ut,pt;let vt=class extends ${constructor(){super(...arguments),this.renderOp
|
|
|
95
95
|
display: inline-block;
|
|
96
96
|
width: 0;
|
|
97
97
|
}
|
|
98
|
-
`;const Rt=Symbol("internalReduxEventsUnsubscribers"),Mt=Symbol("internalStoresUnsubscribers"),kt=Symbol("internalStores");class Ut extends St{constructor(){super(...arguments),this[Nt]=new Map,this[$t]=new Map,this[Et]=[]}
|
|
98
|
+
`;const Rt=Symbol("internalReduxEventsUnsubscribers"),Mt=Symbol("internalStoresUnsubscribers"),kt=Symbol("internalStores");class Ut extends St{constructor(){super(...arguments),this[Nt]=new Map,this[$t]=new Map,this[Et]=[]}update(t){var e;super.update(t),(null===(e=this.reduxReactiveProperties)||void 0===e?void 0:e.some((e=>t.has(e))))&&this.updateFromStores()}getUnnamedStore(){if(this[kt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[kt].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[kt].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:Ct(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[kt].delete(e)}setupStore(t,e){this[kt].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[kt].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[Mt].has(t.store):this[Mt].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[Mt].set(t,e.subscribe((()=>this.updateFromStores()))),Ct(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 s=t=>this[i](t);e.eventBus.addEventListener(t.eventName,s),this[Rt].push((()=>e.eventBus.removeEventListener(t.eventName,s)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Mt].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[Rt].forEach((t=>t())),this[Rt]=[]}unsubscribeFromStore(t){this[Mt].has(t)&&this[Mt].get(t)(),this[Mt].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}Nt=Mt,$t=kt,Et=Rt,window.ftReduxStores||(window.ftReduxStores={});const Ft=t=>{const e=null!=t?t:{};return(t,i)=>{var n;const r={hasChanged:(t,e)=>!l(t,e),attribute:!1,...e};s(r)(t,i);const o=t;o.reduxProperties=o.reduxProperties||new Map,o.reduxProperties.set(i,{selector:null!==(n=e.selector)&&void 0!==n?n:t=>t[i],store:e.store})}};var It,Tt;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Tt=null===(It=window.safari)||void 0===It?void 0:It.pushNotification)||void 0===Tt||Tt.toString());var At=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class jt extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const Lt=Symbol("registerInterval");class Bt extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[Lt]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Lt]):this.dispatchEvent(new jt)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Lt,At([n()],i.prototype,"stateManager",void 0),i}(Ut)){}
|
|
99
99
|
/**
|
|
100
100
|
* @license
|
|
101
101
|
* Copyright 2017 Google LLC
|
|
@@ -175,7 +175,7 @@ class Xt extends Kt{constructor(t){if(super(t),this.et=X,t.type!==_t)throw Error
|
|
|
175
175
|
<article id=${this.tocId}>
|
|
176
176
|
<slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
|
|
177
177
|
</article>
|
|
178
|
-
`}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode,t.disableContextInteractions=this.disableContextInteractions}
|
|
178
|
+
`}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode,t.disableContextInteractions=this.disableContextInteractions}update(t){super.update(t),["mapId","tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}ae.styles=le,he([Ft({selector:t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.id}})],ae.prototype,"mapId",void 0),he([s()],ae.prototype,"tocId",void 0),he([s({type:Boolean})],ae.prototype,"disableContextInteractions",void 0),he([n()],ae.prototype,"tocNode",void 0),h("ft-reader-topic-context")(ae);var ce=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class de extends Bt{constructor(){super(...arguments),this.renderTopic=()=>J`
|
|
179
179
|
<ft-reader-topic-title></ft-reader-topic-title>
|
|
180
180
|
<ft-reader-topic-content></ft-reader-topic-content>
|
|
181
181
|
`,this.disableContextInteractions=!1,this.renderBeforeFirst=5,this.renderAfterLast=10,this.visibleTopicsDebouncer=new e(100)}render(){var t;const e=(null===(t=this.currentPage)||void 0===t?void 0:t.topics)||[];return 0===e.length?X:J`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-content",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.56",
|
|
4
4
|
"description": "Main 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-infinite-scroll": "1.0.
|
|
23
|
-
"@fluid-topics/ft-reader-topic-content": "1.0.
|
|
24
|
-
"@fluid-topics/ft-reader-topic-context": "1.0.
|
|
25
|
-
"@fluid-topics/ft-reader-topic-title": "1.0.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-infinite-scroll": "1.0.56",
|
|
23
|
+
"@fluid-topics/ft-reader-topic-content": "1.0.56",
|
|
24
|
+
"@fluid-topics/ft-reader-topic-context": "1.0.56",
|
|
25
|
+
"@fluid-topics/ft-reader-topic-title": "1.0.56",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "1.0.56",
|
|
27
27
|
"lit": "2.7.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "da00d6ea6bfc74fef8c6687f383355e35a26289b"
|
|
30
30
|
}
|