@fluid-topics/ft-reader-internal-link 1.0.48 → 1.0.49

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.
@@ -84,7 +84,7 @@ var lt,ct;class ht extends C{constructor(){super(...arguments),this.renderOption
84
84
  display: inline-block;
85
85
  width: 0;
86
86
  }
87
- `;const Nt=Symbol("internalReduxEventsUnsubscribers"),Et=Symbol("internalStoresUnsubscribers"),Rt=Symbol("internalStores");class Mt extends wt{constructor(){super(...arguments),this[Ot]=new Map,this[St]=new Map,this[Ct]=[]}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[Rt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Rt].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[Rt].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:gt(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[Rt].delete(e)}setupStore(t,e){this[Rt].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Rt].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[Et].has(t.store):this[Et].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[Et].set(t,e.subscribe((()=>this.updateFromStores()))),gt(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[Nt].push((()=>e.eventBus.removeEventListener(t.eventName,s)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Et].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[Nt].forEach((t=>t())),this[Nt]=[]}unsubscribeFromStore(t){this[Et].has(t)&&this[Et].get(t)(),this[Et].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}var kt,$t;Ot=Et,St=Rt,Ct=Nt,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===($t=null===(kt=window.safari)||void 0===kt?void 0:kt.pushNotification)||void 0===$t||$t.toString());
87
+ `;const Nt=Symbol("internalReduxEventsUnsubscribers"),Et=Symbol("internalStoresUnsubscribers"),Rt=Symbol("internalStores");class Mt extends wt{constructor(){super(...arguments),this[Ot]=new Map,this[St]=new Map,this[Ct]=[]}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[Rt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Rt].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[Rt].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:gt(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[Rt].delete(e)}setupStore(t,e){this[Rt].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Rt].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[Et].has(t.store):this[Et].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[Et].set(t,e.subscribe((()=>this.updateFromStores()))),gt(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[Nt].push((()=>e.eventBus.removeEventListener(t.eventName,s)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Et].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[Nt].forEach((t=>t())),this[Nt]=[]}unsubscribeFromStore(t){this[Et].has(t)&&this[Et].get(t)(),this[Et].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}var kt,$t;Ot=Et,St=Rt,Ct=Nt,window.ftReduxStores||(window.ftReduxStores={}),navigator.vendor&&navigator.vendor.match(/apple/i)||(null===($t=null===(kt=window.safari)||void 0===kt?void 0:kt.pushNotification)||void 0===$t||$t.toString());
88
88
  /**
89
89
  * @license
90
90
  * Copyright 2017 Google LLC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-internal-link",
3
- "version": "1.0.48",
3
+ "version": "1.0.49",
4
4
  "description": "Reader internal link for integrated reader",
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.0.48",
22
+ "@fluid-topics/ft-wc-utils": "1.0.49",
23
23
  "lit": "2.7.2"
24
24
  },
25
- "gitHead": "a07dca06ede4358afbfe00c06b1ea1da90e3ff51"
25
+ "gitHead": "77eac237aeec17a50f5bcc09890746d9a9f097f0"
26
26
  }