@fluid-topics/ft-reader-topic-context 1.1.0 → 1.1.1
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
!function(t,e,s,r){const i=s.css`
|
|
2
|
-
`;var o;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS"}(o||(o={}));var n=function(t,e,s,r){for(var i,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,s):r,a=t.length-1;a>=0;a--)(i=t[a])&&(n=(o<3?i(n):o>3?i(e,s,n):i(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class a extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const c=Symbol("registerInterval");class d extends(function(t){var e;class s 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[c]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[c]):this.dispatchEvent(new a)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=c,n([r.state()],s.prototype,"stateManager",void 0),s}(e.FtLitElementRedux)){}var l=function(t,e,s,r){for(var i,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,s):r,a=t.length-1;a>=0;a--)(i=t[a])&&(n=(o<3?i(n):o>3?i(e,s,n):i(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class h extends d{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registeredComponents=[]}render(){return s.html`
|
|
2
|
+
`;var o;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(o||(o={}));var n=function(t,e,s,r){for(var i,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,s):r,a=t.length-1;a>=0;a--)(i=t[a])&&(n=(o<3?i(n):o>3?i(e,s,n):i(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class a extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const c=Symbol("registerInterval");class d extends(function(t){var e;class s 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[c]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[c]):this.dispatchEvent(new a)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=c,n([r.state()],s.prototype,"stateManager",void 0),s}(e.FtLitElementRedux)){}var l=function(t,e,s,r){for(var i,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,s):r,a=t.length-1;a>=0;a--)(i=t[a])&&(n=(o<3?i(n):o>3?i(e,s,n):i(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class h extends d{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registeredComponents=[]}render(){return s.html`
|
|
3
3
|
<article id=${this.tocId}>
|
|
4
4
|
<slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
|
|
5
5
|
</article>
|
|
@@ -101,7 +101,7 @@ const mo=window,Oo=mo.ShadowRoot&&(void 0===mo.ShadyCSS||mo.ShadyCSS.nativeShado
|
|
|
101
101
|
width: 0;
|
|
102
102
|
}
|
|
103
103
|
`;const Wo=Symbol("internalReduxEventsUnsubscribers"),ko=Symbol("internalStoresUnsubscribers"),Ko=Symbol("internalStores");class Zo extends Ro{constructor(){super(...arguments),this[Eo]=new Map,this[Io]=new Map,this[Lo]=[]}update(t){var o;super.update(t),(null===(o=this.reduxReactiveProperties)||void 0===o?void 0:o.some((o=>t.has(o))))&&this.updateFromStores()}getUnnamedStore(){if(this[Ko].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ko].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[Ko].get(t)}addStore(t,o){var e;o=null!==(e=null!=o?o:Uo(t)?t.name:void 0)&&void 0!==e?e:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){const o="string"==typeof t?t:t.name;this.unsubscribeFromStore(o),this[Ko].delete(o)}setupStore(t,o){this[Ko].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Ko].forEach(((t,o)=>this.subscribeToStore(o,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,o)=>{const e=this.constructor.getPropertyOptions(o);if(!(null==e?void 0:e.attribute)||!this.hasAttribute("string"==typeof(null==e?void 0:e.attribute)?e.attribute:o)){const e=this.getStore(t.store);e&&(t.store?this[ko].has(t.store):this[ko].size>0)&&(this[o]=t.selector(e.getState(),this))}}))}subscribeToStore(t,o){var e;this[ko].set(t,o.subscribe((()=>this.updateFromStores()))),Uo(o)&&o.eventBus&&(null===(e=this.reduxEventListeners)||void 0===e||e.forEach(((t,e)=>{if("function"==typeof this[e]&&(!t.store||o.name===t.store)){const r=t=>this[e](t);o.eventBus.addEventListener(t.eventName,r),this[Wo].push((()=>o.eventBus.removeEventListener(t.eventName,r)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ko].forEach(((t,o)=>this.unsubscribeFromStore(o))),this[Wo].forEach((t=>t())),this[Wo]=[]}unsubscribeFromStore(t){this[ko].has(t)&&this[ko].get(t)(),this[ko].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}Eo=ko,Io=Ko,Lo=Wo,window.ftReduxStores||(window.ftReduxStores={});var Ao,$o;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===($o=null===(Ao=window.safari)||void 0===Ao?void 0:Ao.pushNotification)||void 0===$o||$o.toString());const Mo=dt`
|
|
104
|
-
`;var Fo;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS"}(Fo||(Fo={}));var Bo=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};class zo extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const Do=Symbol("registerInterval");class Po extends(function(t){var o;class e extends t{constructor(){super(...arguments),this[o]=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[Do]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Do]):this.dispatchEvent(new zo)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=Do,Bo([R()],e.prototype,"stateManager",void 0),e}(Zo)){}var _o,To=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};class Go extends Po{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registeredComponents=[]}render(){return Jt`
|
|
104
|
+
`;var Fo;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(Fo||(Fo={}));var Bo=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};class zo extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const Do=Symbol("registerInterval");class Po extends(function(t){var o;class e extends t{constructor(){super(...arguments),this[o]=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[Do]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Do]):this.dispatchEvent(new zo)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=Do,Bo([R()],e.prototype,"stateManager",void 0),e}(Zo)){}var _o,To=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};class Go extends Po{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registeredComponents=[]}render(){return Jt`
|
|
105
105
|
<article id=${this.tocId}>
|
|
106
106
|
<slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
|
|
107
107
|
</article>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-topic-context",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Context block for integrated reader topic components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "1.1.1",
|
|
23
23
|
"lit": "3.1.0"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "ceae4aed142c27cbf6034f45bb6e3f562163cc15"
|
|
26
26
|
}
|