@fluid-topics/ft-reader-internal-link 0.3.34 → 0.3.35
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.
|
@@ -7,6 +7,6 @@ export declare class FtReaderInternalLink extends FtReaderComponent implements F
|
|
|
7
7
|
pageNumber?: number;
|
|
8
8
|
removeStyle: boolean;
|
|
9
9
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
10
|
-
private
|
|
10
|
+
private onLinkClick;
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=ft-reader-internal-link.d.ts.map
|
|
@@ -23,12 +23,12 @@ export class FtReaderInternalLink extends FtReaderComponent {
|
|
|
23
23
|
return html `
|
|
24
24
|
<a class=${classes}
|
|
25
25
|
href="${(_a = this.service) === null || _a === void 0 ? void 0 : _a.getLink(this.tocId, this.pageNumber, this.section)}"
|
|
26
|
-
@click=${(e) => this.
|
|
26
|
+
@click=${(e) => this.onLinkClick(e)}>
|
|
27
27
|
<slot></slot>
|
|
28
28
|
</a>
|
|
29
29
|
`;
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
onLinkClick(e) {
|
|
32
32
|
var _a;
|
|
33
33
|
if (!e.ctrlKey && !e.metaKey) {
|
|
34
34
|
e.stopPropagation();
|
|
@@ -36,6 +36,7 @@ export class FtReaderInternalLink extends FtReaderComponent {
|
|
|
36
36
|
if (this.tocId) {
|
|
37
37
|
(_a = this.stateManager) === null || _a === void 0 ? void 0 : _a.navigateToTopic(this.tocId, this.section, this.pageNumber);
|
|
38
38
|
}
|
|
39
|
+
this.click();
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e,o,
|
|
1
|
+
!function(t,e,s,o,r){var i=function(t,e,s,o){for(var r,i=arguments.length,n=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,s):o,l=t.length-1;l>=0;l--)(r=t[l])&&(n=(i<3?r(n):i>3?r(e,s,n):r(e,s))||n);return i>3&&n&&Object.defineProperty(e,s,n),n};class n extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class l extends(function(t){class e extends t{constructor(){super(...arguments),this.registerInterval=0}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(),this.registerInterval=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.store?window.clearInterval(this.registerInterval):this.dispatchEvent(new n)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}return i([o.state()],e.prototype,"stateManager",void 0),e}(e.FtLitElementRedux)){}const a={outlineColor:e.FtCssVariableFactory.extend("--ft-reader-internal-link-outline-color",e.designSystemVariables.colorPrimary)},c=s.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
text-decoration: none;
|
|
12
12
|
color: inherit;
|
|
13
13
|
}
|
|
14
|
-
`;var d=function(t,e,o
|
|
14
|
+
`;var d=function(t,e,s,o){for(var r,i=arguments.length,n=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,s):o,l=t.length-1;l>=0;l--)(r=t[l])&&(n=(i<3?r(n):i>3?r(e,s,n):r(e,s))||n);return i>3&&n&&Object.defineProperty(e,s,n),n};class u extends l{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=r.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return s.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
|
-
@click=${t=>this.
|
|
17
|
+
@click=${t=>this.onLinkClick(t)}>
|
|
18
18
|
<slot></slot>
|
|
19
19
|
</a>
|
|
20
|
-
`}
|
|
20
|
+
`}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())}}u.styles=c,d([o.property()],u.prototype,"tocId",void 0),d([o.property()],u.prototype,"section",void 0),d([o.property({type:Number})],u.prototype,"pageNumber",void 0),d([o.property({type:Boolean})],u.prototype,"removeStyle",void 0),e.customElement("ft-reader-internal-link")(u),t.FtReaderInternalLink=u,t.FtReaderInternalLinkCssVariables=a,t.styles=c,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
|
|
@@ -110,7 +110,7 @@ const yt=1;class bt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i)
|
|
|
110
110
|
`;var Ct,Nt=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Rt extends gt{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=mt({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return H`
|
|
111
111
|
<a class=${e}
|
|
112
112
|
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
113
|
-
@click=${t=>this.
|
|
113
|
+
@click=${t=>this.onLinkClick(t)}>
|
|
114
114
|
<slot></slot>
|
|
115
115
|
</a>
|
|
116
|
-
`}
|
|
116
|
+
`}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())}}Rt.styles=St,Nt([s()],Rt.prototype,"tocId",void 0),Nt([s()],Rt.prototype,"section",void 0),Nt([s({type:Number})],Rt.prototype,"pageNumber",void 0),Nt([s({type:Boolean})],Rt.prototype,"removeStyle",void 0),(Ct="ft-reader-internal-link",t=>{window.customElements.get(Ct)||window.customElements.define(Ct,t)})(Rt),t.FtReaderInternalLink=Rt,t.FtReaderInternalLinkCssVariables=Ot,t.styles=St,Object.defineProperty(t,"i",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-internal-link",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.35",
|
|
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": "0.3.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "0.3.35",
|
|
23
23
|
"lit": "2.2.8"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "f780f3462eced4952dc5bbf1085af29172b23265"
|
|
26
26
|
}
|