@fluid-topics/ft-reader-navigation-button 1.1.0 → 1.1.2

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.
@@ -815,7 +815,7 @@ const Bo=Symbol.for(""),Do=t=>{if(t?.r===Bo)return t?._$litStatic$},Ao=t=>({_$li
815
815
  width: ${S.smallIconOnlyWidth};
816
816
  padding: unset;
817
817
  }
818
- `,o.noTextSelect];var de,he=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,l=t.length-1;l>=0;l--)(i=t[l])&&(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 ye extends ce{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?jo.caption1medium:jo.body2medium}}ye.styles=[o.safariEllipsisFix,fe],he([r.property({type:Boolean})],ye.prototype,"primary",void 0),he([r.property({type:Boolean})],ye.prototype,"secondary",void 0),he([r.property({type:Boolean})],ye.prototype,"tertiary",void 0),he([r.property({type:Boolean})],ye.prototype,"neutral",void 0),he([r.property({type:Boolean})],ye.prototype,"small",void 0),o.customElement("ft-button")(se),o.customElement("ftds-button")(ye),function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS"}(de||(de={}));var ge=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,l=t.length-1;l>=0;l--)(i=t[l])&&(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 be extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const ue=Symbol("registerInterval");class me 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[ue]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[ue]):this.dispatchEvent(new be)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=ue,ge([r.state()],e.prototype,"stateManager",void 0),e}(o.FtLitElementRedux)){}var xe=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,l=t.length-1;l>=0;l--)(i=t[l])&&(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 Oe extends me{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let o=i.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return e.html`
818
+ `,o.noTextSelect];var de,he=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,l=t.length-1;l>=0;l--)(i=t[l])&&(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 ye extends ce{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?jo.caption1medium:jo.body2medium}}ye.styles=[o.safariEllipsisFix,fe],he([r.property({type:Boolean})],ye.prototype,"primary",void 0),he([r.property({type:Boolean})],ye.prototype,"secondary",void 0),he([r.property({type:Boolean})],ye.prototype,"tertiary",void 0),he([r.property({type:Boolean})],ye.prototype,"neutral",void 0),he([r.property({type:Boolean})],ye.prototype,"small",void 0),o.customElement("ft-button")(se),o.customElement("ftds-button")(ye),function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(de||(de={}));var ge=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,l=t.length-1;l>=0;l--)(i=t[l])&&(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 be extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const ue=Symbol("registerInterval");class me 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[ue]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[ue]):this.dispatchEvent(new be)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=ue,ge([r.state()],e.prototype,"stateManager",void 0),e}(o.FtLitElementRedux)){}var xe=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,l=t.length-1;l>=0;l--)(i=t[l])&&(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 Oe extends me{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let o=i.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return e.html`
819
819
  <a class=${o}
820
820
  href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
821
821
  @click=${t=>this.onLinkClick(t)}>