@fluid-topics/ft-reader-navigation-button 0.3.21 → 0.3.23
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.
|
@@ -546,7 +546,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
546
546
|
</ft-tooltip>
|
|
547
547
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
548
548
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
549
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Xi.elementDefinitions={"ft-ripple":m,"ft-tooltip":Bi,"ft-typography":ki,"ft-icon":Di,"ft-loader":Fi},Xi.styles=Vi,qi([o.property({type:Boolean})],Xi.prototype,"primary",void 0),qi([o.property({type:Boolean})],Xi.prototype,"outlined",void 0),qi([o.property({type:Boolean})],Xi.prototype,"disabled",void 0),qi([o.property({type:Boolean})],Xi.prototype,"dense",void 0),qi([o.property({type:Boolean})],Xi.prototype,"round",void 0),qi([o.property({type:String})],Xi.prototype,"label",void 0),qi([o.property({type:String})],Xi.prototype,"icon",void 0),qi([o.property({type:String})],Xi.prototype,"iconVariant",void 0),qi([o.property({type:Boolean})],Xi.prototype,"trailingIcon",void 0),qi([o.property({type:Boolean})],Xi.prototype,"loading",void 0),qi([o.property({type:String})],Xi.prototype,"tooltipPosition",void 0),qi([o.property({type:Boolean})],Xi.prototype,"hideTooltip",void 0),qi([o.property({type:Boolean})],Xi.prototype,"forceTooltip",void 0),qi([o.query(".ft-button")],Xi.prototype,"button",void 0),qi([o.query(".ft-button--label slot")],Xi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Xi);var Yi=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 Ji extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class Qi extends i
|
|
549
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Xi.elementDefinitions={"ft-ripple":m,"ft-tooltip":Bi,"ft-typography":ki,"ft-icon":Di,"ft-loader":Fi},Xi.styles=Vi,qi([o.property({type:Boolean})],Xi.prototype,"primary",void 0),qi([o.property({type:Boolean})],Xi.prototype,"outlined",void 0),qi([o.property({type:Boolean})],Xi.prototype,"disabled",void 0),qi([o.property({type:Boolean})],Xi.prototype,"dense",void 0),qi([o.property({type:Boolean})],Xi.prototype,"round",void 0),qi([o.property({type:String})],Xi.prototype,"label",void 0),qi([o.property({type:String})],Xi.prototype,"icon",void 0),qi([o.property({type:String})],Xi.prototype,"iconVariant",void 0),qi([o.property({type:Boolean})],Xi.prototype,"trailingIcon",void 0),qi([o.property({type:Boolean})],Xi.prototype,"loading",void 0),qi([o.property({type:String})],Xi.prototype,"tooltipPosition",void 0),qi([o.property({type:Boolean})],Xi.prototype,"hideTooltip",void 0),qi([o.property({type:Boolean})],Xi.prototype,"forceTooltip",void 0),qi([o.query(".ft-button")],Xi.prototype,"button",void 0),qi([o.query(".ft-button--label slot")],Xi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Xi);var Yi=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 Ji extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class Qi extends(function(t){class i extends t{setReaderStateManager(t){this.stateManager=t,this.store=t.store}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),setTimeout((()=>this.dispatchEvent(new Ji)),10)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}return Yi([o.state()],i.prototype,"stateManager",void 0),i}(i.FtLitElementRedux)){}var te=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 ie extends Qi{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let i=n.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return e.html`
|
|
550
550
|
<a class=${i}
|
|
551
551
|
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
552
552
|
@click=${t=>this.onClick(t)}>
|
|
@@ -66,12 +66,12 @@ var pt,ct;class ft extends E{constructor(){super(...arguments),this.renderOption
|
|
|
66
66
|
* @license
|
|
67
67
|
* Copyright 2021 Google LLC
|
|
68
68
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
69
|
-
*/var bt=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class xt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const n=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return x(n,this.constructor.elementStyles),n}}}(ft)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),V`
|
|
69
|
+
*/var bt=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class xt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const n=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return x(n,this.constructor.elementStyles),n}}}(ft)){constructor(){super(...arguments),this.exportpartsDebouncer=new e(5)}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),V`
|
|
70
70
|
${t.map((t=>V`
|
|
71
71
|
<style>${t}</style>
|
|
72
72
|
`))}
|
|
73
73
|
${this.getTemplate()}
|
|
74
|
-
`}updated(t){super.updated(t),setTimeout((()=>{
|
|
74
|
+
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,n,r,s;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(n=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==n?n:[],i=null!==(s=null===(r=t.getAttribute("exportparts"))||void 0===r?void 0:r.split(",").map((t=>t.split(":")[1])))&&void 0!==s?s:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const p=[...h.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...p].join(", "))}}bt([o()],xt.prototype,"exportpartsPrefix",void 0),bt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}([])],xt.prototype,"exportpartsPrefixes",void 0);const gt=b`
|
|
75
75
|
.ft-no-text-select {
|
|
76
76
|
-webkit-touch-callout: none;
|
|
77
77
|
-webkit-user-select: none;
|
|
@@ -662,7 +662,7 @@ class Si extends jt{constructor(t){if(super(t),this.it=q,t.type!==Rt)throw Error
|
|
|
662
662
|
</ft-tooltip>
|
|
663
663
|
`:t}resolveIcon(){return this.loading?V`
|
|
664
664
|
<ft-loader></ft-loader> `:this.icon?V`
|
|
665
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:q}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Di.elementDefinitions={"ft-ripple":Wt,"ft-tooltip":wi,"ft-typography":fi,"ft-icon":Fi,"ft-loader":ki},Di.styles=Pi,_i([o({type:Boolean})],Di.prototype,"primary",void 0),_i([o({type:Boolean})],Di.prototype,"outlined",void 0),_i([o({type:Boolean})],Di.prototype,"disabled",void 0),_i([o({type:Boolean})],Di.prototype,"dense",void 0),_i([o({type:Boolean})],Di.prototype,"round",void 0),_i([o({type:String})],Di.prototype,"label",void 0),_i([o({type:String})],Di.prototype,"icon",void 0),_i([o({type:String})],Di.prototype,"iconVariant",void 0),_i([o({type:Boolean})],Di.prototype,"trailingIcon",void 0),_i([o({type:Boolean})],Di.prototype,"loading",void 0),_i([o({type:String})],Di.prototype,"tooltipPosition",void 0),_i([o({type:Boolean})],Di.prototype,"hideTooltip",void 0),_i([o({type:Boolean})],Di.prototype,"forceTooltip",void 0),_i([s(".ft-button")],Di.prototype,"button",void 0),_i([s(".ft-button--label slot")],Di.prototype,"slottedContent",void 0),h("ft-button")(Di);var Ii=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Wi extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class Hi extends
|
|
665
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:q}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Di.elementDefinitions={"ft-ripple":Wt,"ft-tooltip":wi,"ft-typography":fi,"ft-icon":Fi,"ft-loader":ki},Di.styles=Pi,_i([o({type:Boolean})],Di.prototype,"primary",void 0),_i([o({type:Boolean})],Di.prototype,"outlined",void 0),_i([o({type:Boolean})],Di.prototype,"disabled",void 0),_i([o({type:Boolean})],Di.prototype,"dense",void 0),_i([o({type:Boolean})],Di.prototype,"round",void 0),_i([o({type:String})],Di.prototype,"label",void 0),_i([o({type:String})],Di.prototype,"icon",void 0),_i([o({type:String})],Di.prototype,"iconVariant",void 0),_i([o({type:Boolean})],Di.prototype,"trailingIcon",void 0),_i([o({type:Boolean})],Di.prototype,"loading",void 0),_i([o({type:String})],Di.prototype,"tooltipPosition",void 0),_i([o({type:Boolean})],Di.prototype,"hideTooltip",void 0),_i([o({type:Boolean})],Di.prototype,"forceTooltip",void 0),_i([s(".ft-button")],Di.prototype,"button",void 0),_i([s(".ft-button--label slot")],Di.prototype,"slottedContent",void 0),h("ft-button")(Di);var Ii=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Wi extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class Hi extends(function(t){class e extends t{setReaderStateManager(t){this.stateManager=t,this.store=t.store}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),setTimeout((()=>this.dispatchEvent(new Wi)),10)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}return Ii([n()],e.prototype,"stateManager",void 0),e}(mt)){}var Ki=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Zi extends Hi{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=zt({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return V`
|
|
666
666
|
<a class=${e}
|
|
667
667
|
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
668
668
|
@click=${t=>this.onClick(t)}>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-navigation-button",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.23",
|
|
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": "0.3.
|
|
23
|
-
"@fluid-topics/ft-reader-context": "0.3.
|
|
24
|
-
"@fluid-topics/ft-reader-internal-link": "0.3.
|
|
25
|
-
"@fluid-topics/ft-tooltip": "0.3.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-button": "0.3.23",
|
|
23
|
+
"@fluid-topics/ft-reader-context": "0.3.23",
|
|
24
|
+
"@fluid-topics/ft-reader-internal-link": "0.3.23",
|
|
25
|
+
"@fluid-topics/ft-tooltip": "0.3.23",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "0.3.23",
|
|
27
27
|
"lit": "2.2.8"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "7fb0bb52d064423f63bfd9c36c5454d65aa890d6"
|
|
30
30
|
}
|