@fluid-topics/ft-reader-navigation-button 1.1.7 → 1.1.8
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.
|
@@ -123,7 +123,7 @@ class bo extends Kt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
123
123
|
display: inline-block;
|
|
124
124
|
width: 0;
|
|
125
125
|
}
|
|
126
|
-
`;function Ao(t){var o;return null!==(o=null==t?void 0:t.isFtReduxStore)&&void 0!==o&&o}var Mo,Do,Po;const Ho=Symbol("internalReduxEventsUnsubscribers"),To=Symbol("internalStoresUnsubscribers"),jo=Symbol("internalStores");class _o extends Fo{constructor(){super(...arguments),this[Mo]=new Map,this[Do]=new Map,this[Po]=[]}update(t){
|
|
126
|
+
`;function Ao(t){var o;return null!==(o=null==t?void 0:t.isFtReduxStore)&&void 0!==o&&o}var Mo,Do,Po;const Ho=Symbol("internalReduxEventsUnsubscribers"),To=Symbol("internalStoresUnsubscribers"),jo=Symbol("internalStores");class _o extends Fo{constructor(){super(...arguments),this[Mo]=new Map,this[Do]=new Map,this[Po]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some((o=>t.has(o)))&&this.updateFromStores()}getUnnamedStore(){if(this[jo].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[jo].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[jo].get(t)}addStore(t,o){var e;o=null!==(e=null!=o?o:Ao(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[jo].delete(o)}setupStore(t,o){this[jo].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[jo].forEach(((t,o)=>this.subscribeToStore(o,t))),this.updateFromStores()}updateFromStores(){this.reduxConstructor.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[To].has(t.store):this[To].size>0)&&(this[o]=t.selector(e.getState(),this))}}))}subscribeToStore(t,o){var e;this[To].set(t,o.subscribe((()=>this.updateFromStores()))),Ao(o)&&o.eventBus&&(null===(e=this.reduxConstructor.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[Ho].push((()=>o.eventBus.removeEventListener(t.eventName,r)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[To].forEach(((t,o)=>this.unsubscribeFromStore(o))),this[Ho].forEach((t=>t())),this[Ho]=[]}unsubscribeFromStore(t){this[To].has(t)&&this[To].get(t)(),this[To].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}Mo=To,Do=jo,Po=Ho,_o.reduxProperties=new Map,_o.reduxReactiveProperties=new Set,_o.reduxEventListeners=new Map,window.ftReduxStores||(window.ftReduxStores={});const Go=Symbol("elementInternals");var Yo,Vo,Jo;const qo=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Jo=null===(Vo=null===(Yo=window.safari)||void 0===Yo?void 0:Yo.pushNotification)||void 0===Vo?void 0:Vo.toString())&&void 0!==Jo?Jo:""),Xo={outlineColor:Oo.extend("--ft-reader-internal-link-outline-color","",$o.colorPrimary)},Qo=mt`
|
|
127
127
|
:host {
|
|
128
128
|
display: contents;
|
|
129
129
|
}
|
|
@@ -965,4 +965,4 @@ class cn extends Pr{constructor(t){if(super(t),this.et=Q,t.type!==Mr)throw Error
|
|
|
965
965
|
<ft-reader-internal-link .tocId=${null===(i=this.targetPage)||void 0===i?void 0:i.rootTocId} removestyle>
|
|
966
966
|
${n}
|
|
967
967
|
</ft-reader-internal-link>
|
|
968
|
-
`}update(t){super.update(t),t.has("currentPage")&&(this.targetPage=void 0,this.isReady=!1,this.debouncer.run((()=>this.updateTarget())))}async updateTarget(){var t,o;if(this.currentPage){const e=this.currentPage.number+("next"===this.target?1:-1);this.targetPage=await(null===(t=this.service)||void 0===t?void 0:t.getPage(e)),(null===(o=this.targetPage)||void 0===o?void 0:o.number)!==e&&(this.targetPage=void 0)}else this.targetPage=void 0;this.isReady=!0}}Ln.elementDefinitions={"ft-button":On,"ft-reader-internal-link":kn},Ln.styles=te,In([w()],Ln.prototype,"target",void 0),In([w()],Ln.prototype,"content",void 0),In([w()],Ln.prototype,"tooltipPosition",void 0),In([w({type:Boolean})],Ln.prototype,"hideTooltip",void 0),In([w()],Ln.prototype,"iconVariant",void 0),In([w()],Ln.prototype,"icon",void 0),In([w({type:Boolean})],Ln.prototype,"trailingIcon",void 0),In([w({type:Boolean,attribute:!1})],Ln.prototype,"editorMode",void 0),In([(t=>{const o=null!=t?t:{};return(t,e)=>{var r;const i={hasChanged:(t,o)=>!k(t,o),attribute:!1,...o};w(i)(t,e);const n=t;n.reduxProperties=n.reduxProperties
|
|
968
|
+
`}update(t){super.update(t),t.has("currentPage")&&(this.targetPage=void 0,this.isReady=!1,this.debouncer.run((()=>this.updateTarget())))}async updateTarget(){var t,o;if(this.currentPage){const e=this.currentPage.number+("next"===this.target?1:-1);this.targetPage=await(null===(t=this.service)||void 0===t?void 0:t.getPage(e)),(null===(o=this.targetPage)||void 0===o?void 0:o.number)!==e&&(this.targetPage=void 0)}else this.targetPage=void 0;this.isReady=!0}}Ln.elementDefinitions={"ft-button":On,"ft-reader-internal-link":kn},Ln.styles=te,In([w()],Ln.prototype,"target",void 0),In([w()],Ln.prototype,"content",void 0),In([w()],Ln.prototype,"tooltipPosition",void 0),In([w({type:Boolean})],Ln.prototype,"hideTooltip",void 0),In([w()],Ln.prototype,"iconVariant",void 0),In([w()],Ln.prototype,"icon",void 0),In([w({type:Boolean})],Ln.prototype,"trailingIcon",void 0),In([w({type:Boolean,attribute:!1})],Ln.prototype,"editorMode",void 0),In([(t=>{const o=null!=t?t:{};return(t,e)=>{var r;const i={hasChanged:(t,o)=>!k(t,o),attribute:!1,...o};w(i)(t,e);const n=t.constructor;n.reduxProperties=new Map(n.reduxProperties),n.reduxProperties.set(e,{selector:null!==(r=o.selector)&&void 0!==r?r:t=>t[e],store:o.store})}})()],Ln.prototype,"currentPage",void 0),In([C()],Ln.prototype,"targetPage",void 0),I("ft-reader-navigation-button")(Ln),t.FtReaderNavigationButton=Ln,t.FtReaderNavigationButtonCssVariables={},t.styles=te}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-navigation-button",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
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.1.
|
|
23
|
-
"@fluid-topics/ft-reader-context": "1.1.
|
|
24
|
-
"@fluid-topics/ft-reader-internal-link": "1.1.
|
|
25
|
-
"@fluid-topics/ft-tooltip": "1.1.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-button": "1.1.8",
|
|
23
|
+
"@fluid-topics/ft-reader-context": "1.1.8",
|
|
24
|
+
"@fluid-topics/ft-reader-internal-link": "1.1.8",
|
|
25
|
+
"@fluid-topics/ft-tooltip": "1.1.8",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "1.1.8",
|
|
27
27
|
"lit": "3.1.0"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "95fb2d06899d700513970ac830958922b98539df"
|
|
30
30
|
}
|