@fluid-topics/ft-reader-internal-link 2.2.16 → 2.2.18
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.
|
@@ -23,7 +23,7 @@ export class FtReaderInternalLink extends FtReaderComponent {
|
|
|
23
23
|
});
|
|
24
24
|
return html `
|
|
25
25
|
<a class="${classes}"
|
|
26
|
-
href="${(_a = this.service) === null || _a === void 0 ? void 0 : _a.
|
|
26
|
+
href="${(_a = this.service) === null || _a === void 0 ? void 0 : _a.getLinkWithFilter(this.tocId, this.pageNumber, this.section)}"
|
|
27
27
|
@click=${(e) => this.onLinkClick(e)}>
|
|
28
28
|
<slot></slot>
|
|
29
29
|
</a>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var B=Object.create;var C=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty;var
|
|
1
|
+
"use strict";(()=>{var B=Object.create;var C=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty;var d=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var q=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of D(e))!$.call(t,o)&&o!==r&&C(t,o,{get:()=>e[o],enumerable:!(s=j(e,o))||s.enumerable});return t};var a=(t,e,r)=>(r=t!=null?B(G(t)):{},q(e||!t||!t.__esModule?C(r,"default",{value:t,enumerable:!0}):r,t));var p=d((z,O)=>{O.exports=ftGlobals.wcUtils});var b=d((F,_)=>{_.exports=ftGlobals.lit});var y=d((J,I)=>{I.exports=ftGlobals.litDecorators});var S=d((Q,M)=>{M.exports=ftGlobals.litClassMap});var E=a(p());var P=a(b()),v=a(y()),K=a(S());var m=a(p()),N=a(y());var T;(function(t){t.clusteringHelperCreated="clustering-helper-created",t.mapAttachmentsUpdate="map-attachments-update",t.visibleTopicChange="visible-topic-change",t.requestedTopicNotFound="requested-topic-not-found",t.requestedTopicFiltered="requested-topic-filtered"})(T||(T={}));var k;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(k||(k={}));var V=function(t,e,r,s){var o=arguments.length,i=o<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,r):s,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,s);else for(var c=t.length-1;c>=0;c--)(n=t[c])&&(i=(o<3?n(i):o>3?n(e,r,i):n(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i},x=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},g=Symbol("registerInterval"),U=(0,m.applyMixinOnce)(Symbol("toFtReaderComponent"),function(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(o){this.clearStateManager(),this.stateManager=o,this.addStore(o.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var o;return(o=this.stateManager)===null||o===void 0?void 0:o.service}connectedCallback(){super.connectedCallback(),this[g]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[g]):this.dispatchEvent(new x)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=g,V([(0,N.state)()],r.prototype,"stateManager",void 0),r}),f=class extends U(m.FtLitElementRedux){};var u=a(p()),R=a(b()),H={outlineColor:u.FtCssVariableFactory.extend("--ft-reader-internal-link-outline-color","",u.designSystemVariables.colorPrimary)},L=R.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 A=a(p()),h=function(e,
|
|
15
|
-
<a class="${
|
|
16
|
-
href="${(
|
|
17
|
-
@click=${
|
|
14
|
+
`;var A=a(p()),h=function(t,e,r,s){var o=arguments.length,i=o<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,r):s,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,s);else for(var c=t.length-1;c>=0;c--)(n=t[c])&&(i=(o<3?n(i):o>3?n(e,r,i):n(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i},l=class extends f{constructor(){super(...arguments),this.removeStyle=!1}render(){var e;let r=(0,K.classMap)({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return P.html`
|
|
15
|
+
<a class="${r}"
|
|
16
|
+
href="${(e=this.service)===null||e===void 0?void 0:e.getLinkWithFilter(this.tocId,this.pageNumber,this.section)}"
|
|
17
|
+
@click=${s=>this.onLinkClick(s)}>
|
|
18
18
|
<slot></slot>
|
|
19
19
|
</a>
|
|
20
|
-
`}onLinkClick(
|
|
20
|
+
`}onLinkClick(e){var r;!e.ctrlKey&&!e.metaKey&&(e.stopPropagation(),e.preventDefault(),performance.mark(`fluid_topics__reader_link_click__${this.tocId}`),(r=this.stateManager)===null||r===void 0||r.navigateToTopic(this.tocId,this.section,this.pageNumber),this.click())}};l.styles=L;h([(0,v.property)()],l.prototype,"tocId",void 0);h([(0,v.property)()],l.prototype,"section",void 0);h([(0,A.numberProperty)()],l.prototype,"pageNumber",void 0);h([(0,v.property)({type:Boolean})],l.prototype,"removeStyle",void 0);var w={"ft-reader-internal-link":l};(0,E.customElements)(w);})();
|