@fluid-topics/ft-reader-internal-link 1.1.25 → 1.1.26

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,6 +33,7 @@ class FtReaderInternalLink extends FtReaderComponent {
33
33
  if (!e.ctrlKey && !e.metaKey) {
34
34
  e.stopPropagation();
35
35
  e.preventDefault();
36
+ performance.mark(`fluid_topics__reader_link_click__${this.tocId}`);
36
37
  (_a = this.stateManager) === null || _a === void 0 ? void 0 : _a.navigateToTopic(this.tocId, this.section, this.pageNumber);
37
38
  this.click();
38
39
  }
@@ -1,4 +1,4 @@
1
- !function(t,e,r,s,o){var n;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(n||(n={}));var i=function(t,e,r,s){for(var o,n=arguments.length,i=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s,l=t.length-1;l>=0;l--)(o=t[l])&&(i=(n<3?o(i):n>3?o(e,r,i):o(e,r))||i);return n>3&&i&&Object.defineProperty(e,r,i),i};class l extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const a=Symbol("registerInterval");class c extends(function(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[a]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[a]):this.dispatchEvent(new l)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=a,i([s.state()],r.prototype,"stateManager",void 0),r}(e.FtLitElementRedux)){}const d={outlineColor:e.FtCssVariableFactory.extend("--ft-reader-internal-link-outline-color","",e.designSystemVariables.colorPrimary)},u=r.css`
1
+ !function(t,e,r,s,i){var o;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(o||(o={}));var n=function(t,e,r,s){for(var i,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s,l=t.length-1;l>=0;l--)(i=t[l])&&(n=(o<3?i(n):o>3?i(e,r,n):i(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n};class l extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const a=Symbol("registerInterval");class c extends(function(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[a]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[a]):this.dispatchEvent(new l)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=a,n([s.state()],r.prototype,"stateManager",void 0),r}(e.FtLitElementRedux)){}const d={outlineColor:e.FtCssVariableFactory.extend("--ft-reader-internal-link-outline-color","",e.designSystemVariables.colorPrimary)},u=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 h=function(t,e,r,s){for(var o,n=arguments.length,i=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s,l=t.length-1;l>=0;l--)(o=t[l])&&(i=(n<3?o(i):n>3?o(e,r,i):o(e,r))||i);return n>3&&i&&Object.defineProperty(e,r,i),i};class v extends c{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`
14
+ `;var h=function(t,e,r,s){for(var i,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s,l=t.length-1;l>=0;l--)(i=t[l])&&(n=(o<3?i(n):o>3?i(e,r,n):i(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n};class v extends c{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=i.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(),null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber),this.click())}}v.styles=u,h([s.property()],v.prototype,"tocId",void 0),h([s.property()],v.prototype,"section",void 0),h([s.property({type:Number})],v.prototype,"pageNumber",void 0),h([s.property({type:Boolean})],v.prototype,"removeStyle",void 0),e.customElement("ft-reader-internal-link")(v),t.FtReaderInternalLink=v,t.FtReaderInternalLinkCssVariables=d,t.styles=u}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
20
+ `}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),performance.mark(`fluid_topics__reader_link_click__${this.tocId}`),null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber),this.click())}}v.styles=u,h([s.property()],v.prototype,"tocId",void 0),h([s.property()],v.prototype,"section",void 0),h([s.property({type:Number})],v.prototype,"pageNumber",void 0),h([s.property({type:Boolean})],v.prototype,"removeStyle",void 0),e.customElement("ft-reader-internal-link")(v),t.FtReaderInternalLink=v,t.FtReaderInternalLinkCssVariables=d,t.styles=u}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
@@ -133,4 +133,4 @@ const Bo=1;class Po{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,e)
133
133
  @click=${t=>this.onLinkClick(t)}>
134
134
  <slot></slot>
135
135
  </a>
136
- `}onLinkClick(t){var o;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),null===(o=this.stateManager)||void 0===o||o.navigateToTopic(this.tocId,this.section,this.pageNumber),this.click())}}qo.styles=Yo,Vo([x()],qo.prototype,"tocId",void 0),Vo([x()],qo.prototype,"section",void 0),Vo([x({type:Number})],qo.prototype,"pageNumber",void 0),Vo([x({type:Boolean})],qo.prototype,"removeStyle",void 0),(Jo="ft-reader-internal-link",t=>{window.customElements.get(Jo)||window.customElements.define(Jo,t)})(qo),t.FtReaderInternalLink=qo,t.FtReaderInternalLinkCssVariables=jo,t.styles=Yo}({});
136
+ `}onLinkClick(t){var o;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),performance.mark(`fluid_topics__reader_link_click__${this.tocId}`),null===(o=this.stateManager)||void 0===o||o.navigateToTopic(this.tocId,this.section,this.pageNumber),this.click())}}qo.styles=Yo,Vo([x()],qo.prototype,"tocId",void 0),Vo([x()],qo.prototype,"section",void 0),Vo([x({type:Number})],qo.prototype,"pageNumber",void 0),Vo([x({type:Boolean})],qo.prototype,"removeStyle",void 0),(Jo="ft-reader-internal-link",t=>{window.customElements.get(Jo)||window.customElements.define(Jo,t)})(qo),t.FtReaderInternalLink=qo,t.FtReaderInternalLinkCssVariables=jo,t.styles=Yo}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-internal-link",
3
- "version": "1.1.25",
3
+ "version": "1.1.26",
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.1.25",
22
+ "@fluid-topics/ft-wc-utils": "1.1.26",
23
23
  "lit": "3.1.0"
24
24
  },
25
- "gitHead": "d09eebf7a9bd09694505b987bc2645eee91b47a6"
25
+ "gitHead": "6734976f5a7f6b986917a085be0c38ca3ae562a0"
26
26
  }