@fluid-topics/ft-reader-navigation-button 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.
@@ -575,7 +575,7 @@ const ot=Symbol.for(""),nt=t=>{if((null==t?void 0:t.r)===ot)return null==t?void
575
575
  @click=${t=>this.onLinkClick(t)}>
576
576
  <slot></slot>
577
577
  </a>
578
- `}onLinkClick(t){var i;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(i=this.stateManager)||void 0===i||i.navigateToTopic(this.tocId,this.section,this.pageNumber)),this.click())}}le.styles=l,re([o.property()],le.prototype,"tocId",void 0),re([o.property()],le.prototype,"section",void 0),re([o.property({type:Number})],le.prototype,"pageNumber",void 0),re([o.property({type:Boolean})],le.prototype,"removeStyle",void 0),i.customElement("ft-reader-internal-link")(le);var ae=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class pe extends se{constructor(){super(...arguments),this.target="next",this.tooltipPosition="bottom",this.hideTooltip=!1,this.trailingIcon=!1,this.editorMode=!1,this.isReady=!1,this.debouncer=new i.Debouncer(10)}get defaultContent(){return this.target.substring(0,1).toUpperCase()+this.target.substring(1)}get defaultIcon(){return"next"===this.target?Zi.THIN_ARROW_RIGHT:Zi.THIN_ARROW_LEFT}render(){var t,i,o,n,s;if(null==this.targetPage&&!this.editorMode)return e.nothing;const r=e.html`
578
+ `}onLinkClick(t){var i;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),null===(i=this.stateManager)||void 0===i||i.navigateToTopic(this.tocId,this.section,this.pageNumber),this.click())}}le.styles=l,re([o.property()],le.prototype,"tocId",void 0),re([o.property()],le.prototype,"section",void 0),re([o.property({type:Number})],le.prototype,"pageNumber",void 0),re([o.property({type:Boolean})],le.prototype,"removeStyle",void 0),i.customElement("ft-reader-internal-link")(le);var ae=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class pe extends se{constructor(){super(...arguments),this.target="next",this.tooltipPosition="bottom",this.hideTooltip=!1,this.trailingIcon=!1,this.editorMode=!1,this.isReady=!1,this.debouncer=new i.Debouncer(10)}get defaultContent(){return this.target.substring(0,1).toUpperCase()+this.target.substring(1)}get defaultIcon(){return"next"===this.target?Zi.THIN_ARROW_RIGHT:Zi.THIN_ARROW_LEFT}render(){var t,i,o,n,s;if(null==this.targetPage&&!this.editorMode)return e.nothing;const r=e.html`
579
579
  <ft-button ?forceTooltip=${!this.hideTooltip}
580
580
  ?hideTooltip=${this.hideTooltip}
581
581
  ?trailingIcon=${this.trailingIcon}
@@ -94,7 +94,7 @@ var dt,ft;let ut=class extends E{constructor(){super(...arguments),this.renderOp
94
94
  display: inline-block;
95
95
  width: 0;
96
96
  }
97
- `;function Et(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Rt,Mt,Ut;const jt=Symbol("internalReduxEventsUnsubscribers"),Ft=Symbol("internalStoresUnsubscribers"),zt=Symbol("internalStores");class Bt extends kt{constructor(){super(...arguments),this[Rt]=new Map,this[Mt]=new Map,this[Ut]=[]}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[zt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[zt].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[zt].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:Et(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[zt].delete(e)}setupStore(t,e){this[zt].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[zt].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[Ft].has(t.store):this[Ft].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[Ft].set(t,e.subscribe((()=>this.updateFromStores()))),Et(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[jt].push((()=>e.eventBus.removeEventListener(t.eventName,o)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Ft].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[jt].forEach((t=>t())),this[jt]=[]}unsubscribeFromStore(t){this[Ft].has(t)&&this[Ft].get(t)(),this[Ft].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}Rt=Ft,Mt=zt,Ut=jt;var Tt,Pt,At;const Lt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(At=null===(Pt=null===(Tt=window.safari)||void 0===Tt?void 0:Tt.pushNotification)||void 0===Pt?void 0:Pt.toString())&&void 0!==At?At:""),It={outlineColor:bt.extend("--ft-reader-internal-link-outline-color",xt.colorPrimary)},_t=y`
97
+ `;function Et(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Rt,Mt,Ut;const jt=Symbol("internalReduxEventsUnsubscribers"),Ft=Symbol("internalStoresUnsubscribers"),zt=Symbol("internalStores");class Bt extends kt{constructor(){super(...arguments),this[Rt]=new Map,this[Mt]=new Map,this[Ut]=[]}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[zt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[zt].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[zt].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:Et(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[zt].delete(e)}setupStore(t,e){this[zt].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[zt].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[Ft].has(t.store):this[Ft].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[Ft].set(t,e.subscribe((()=>this.updateFromStores()))),Et(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[jt].push((()=>e.eventBus.removeEventListener(t.eventName,o)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Ft].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[jt].forEach((t=>t())),this[jt]=[]}unsubscribeFromStore(t){this[Ft].has(t)&&this[Ft].get(t)(),this[Ft].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}Rt=Ft,Mt=zt,Ut=jt,window.ftReduxStores||(window.ftReduxStores={});var Tt,Pt,At;const Lt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(At=null===(Pt=null===(Tt=window.safari)||void 0===Tt?void 0:Tt.pushNotification)||void 0===Pt?void 0:Pt.toString())&&void 0!==At?At:""),It={outlineColor:bt.extend("--ft-reader-internal-link-outline-color",xt.colorPrimary)},_t=y`
98
98
  :host {
99
99
  display: contents;
100
100
  }
@@ -693,7 +693,7 @@ class Ii extends Zt{constructor(t){if(super(t),this.et=Y,t.type!==Ht)throw Error
693
693
  @click=${t=>this.onLinkClick(t)}>
694
694
  <slot></slot>
695
695
  </a>
696
- `}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)),this.click())}}po.styles=_t,co([o()],po.prototype,"tocId",void 0),co([o()],po.prototype,"section",void 0),co([o({type:Number})],po.prototype,"pageNumber",void 0),co([o({type:Boolean})],po.prototype,"removeStyle",void 0),c("ft-reader-internal-link")(po);var fo=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class uo extends ho{constructor(){super(...arguments),this.target="next",this.tooltipPosition="bottom",this.hideTooltip=!1,this.trailingIcon=!1,this.editorMode=!1,this.isReady=!1,this.debouncer=new e(10)}get defaultContent(){return this.target.substring(0,1).toUpperCase()+this.target.substring(1)}get defaultIcon(){return"next"===this.target?Di.THIN_ARROW_RIGHT:Di.THIN_ARROW_LEFT}render(){var t,e,i,o,n;if(null==this.targetPage&&!this.editorMode)return Y;const s=q`
696
+ `}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())}}po.styles=_t,co([o()],po.prototype,"tocId",void 0),co([o()],po.prototype,"section",void 0),co([o({type:Number})],po.prototype,"pageNumber",void 0),co([o({type:Boolean})],po.prototype,"removeStyle",void 0),c("ft-reader-internal-link")(po);var fo=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class uo extends ho{constructor(){super(...arguments),this.target="next",this.tooltipPosition="bottom",this.hideTooltip=!1,this.trailingIcon=!1,this.editorMode=!1,this.isReady=!1,this.debouncer=new e(10)}get defaultContent(){return this.target.substring(0,1).toUpperCase()+this.target.substring(1)}get defaultIcon(){return"next"===this.target?Di.THIN_ARROW_RIGHT:Di.THIN_ARROW_LEFT}render(){var t,e,i,o,n;if(null==this.targetPage&&!this.editorMode)return Y;const s=q`
697
697
  <ft-button ?forceTooltip=${!this.hideTooltip}
698
698
  ?hideTooltip=${this.hideTooltip}
699
699
  ?trailingIcon=${this.trailingIcon}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-navigation-button",
3
- "version": "1.0.48",
3
+ "version": "1.0.50",
4
4
  "description": "Button used to navigate between pages in an integrated reader context.",
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-button": "1.0.48",
23
- "@fluid-topics/ft-reader-context": "1.0.48",
24
- "@fluid-topics/ft-reader-internal-link": "1.0.48",
25
- "@fluid-topics/ft-tooltip": "1.0.48",
26
- "@fluid-topics/ft-wc-utils": "1.0.48",
22
+ "@fluid-topics/ft-button": "1.0.50",
23
+ "@fluid-topics/ft-reader-context": "1.0.50",
24
+ "@fluid-topics/ft-reader-internal-link": "1.0.50",
25
+ "@fluid-topics/ft-tooltip": "1.0.50",
26
+ "@fluid-topics/ft-wc-utils": "1.0.50",
27
27
  "lit": "2.7.2"
28
28
  },
29
- "gitHead": "a07dca06ede4358afbfe00c06b1ea1da90e3ff51"
29
+ "gitHead": "a5089c2cb78f1b703cfcaa915b24938d58abd420"
30
30
  }