@fluid-topics/ft-reader-internal-link 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.
|
@@ -33,9 +33,7 @@ class FtReaderInternalLink extends FtReaderComponent {
|
|
|
33
33
|
if (!e.ctrlKey && !e.metaKey) {
|
|
34
34
|
e.stopPropagation();
|
|
35
35
|
e.preventDefault();
|
|
36
|
-
|
|
37
|
-
(_a = this.stateManager) === null || _a === void 0 ? void 0 : _a.navigateToTopic(this.tocId, this.section, this.pageNumber);
|
|
38
|
-
}
|
|
36
|
+
(_a = this.stateManager) === null || _a === void 0 ? void 0 : _a.navigateToTopic(this.tocId, this.section, this.pageNumber);
|
|
39
37
|
this.click();
|
|
40
38
|
}
|
|
41
39
|
}
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
text-decoration: none;
|
|
12
12
|
color: inherit;
|
|
13
13
|
}
|
|
14
|
-
`;var
|
|
14
|
+
`;var u=function(t,e,r,s){for(var o,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(i<3?o(n):i>3?o(e,r,n):o(e,r))||n);return i>3&&n&&Object.defineProperty(e,r,n),n};class h extends a{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=o.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return r.html`
|
|
15
15
|
<a class=${e}
|
|
16
16
|
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
17
17
|
@click=${t=>this.onLinkClick(t)}>
|
|
18
18
|
<slot></slot>
|
|
19
19
|
</a>
|
|
20
|
-
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),
|
|
20
|
+
`}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())}}h.styles=d,u([s.property()],h.prototype,"tocId",void 0),u([s.property()],h.prototype,"section",void 0),u([s.property({type:Number})],h.prototype,"pageNumber",void 0),u([s.property({type:Boolean})],h.prototype,"removeStyle",void 0),e.customElement("ft-reader-internal-link")(h),t.FtReaderInternalLink=h,t.FtReaderInternalLinkCssVariables=c,t.styles=d}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
|
|
@@ -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
|
|
@@ -114,4 +114,4 @@ const Ut=1;class Ft{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i)
|
|
|
114
114
|
@click=${t=>this.onLinkClick(t)}>
|
|
115
115
|
<slot></slot>
|
|
116
116
|
</a>
|
|
117
|
-
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),
|
|
117
|
+
`}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())}}Ht.styles=Bt,Wt([s()],Ht.prototype,"tocId",void 0),Wt([s()],Ht.prototype,"section",void 0),Wt([s({type:Number})],Ht.prototype,"pageNumber",void 0),Wt([s({type:Boolean})],Ht.prototype,"removeStyle",void 0),(Dt="ft-reader-internal-link",t=>{window.customElements.get(Dt)||window.customElements.define(Dt,t)})(Ht),t.FtReaderInternalLink=Ht,t.FtReaderInternalLinkCssVariables=_t,t.styles=Bt}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-internal-link",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.50",
|
|
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.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "1.0.50",
|
|
23
23
|
"lit": "2.7.2"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "a5089c2cb78f1b703cfcaa915b24938d58abd420"
|
|
26
26
|
}
|