@fluid-topics/ft-reader-topic-context 0.3.48 → 0.3.49

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,7 @@ export declare class FtReaderTopicContext extends FtReaderComponent implements F
7
7
  static styles: import("lit").CSSResult;
8
8
  mapId?: string;
9
9
  tocId?: string;
10
+ disableContextInteractions: boolean;
10
11
  tocNode?: FtReaderTocNode;
11
12
  private registeredComponents;
12
13
  protected render(): import("lit-html").TemplateResult<1>;
@@ -16,6 +16,7 @@ export class FtReaderTopicContext extends FtReaderComponent {
16
16
  // // Put all web component dependencies here
17
17
  // }
18
18
  super(...arguments);
19
+ this.disableContextInteractions = false;
19
20
  this.registeredComponents = [];
20
21
  }
21
22
  render() {
@@ -33,6 +34,7 @@ export class FtReaderTopicContext extends FtReaderComponent {
33
34
  register(component) {
34
35
  this.registeredComponents.push(component);
35
36
  component.tocNode = this.tocNode;
37
+ component.disableContextInteractions = this.disableContextInteractions;
36
38
  }
37
39
  updated(changedProperties) {
38
40
  super.updated(changedProperties);
@@ -60,6 +62,9 @@ __decorate([
60
62
  __decorate([
61
63
  property()
62
64
  ], FtReaderTopicContext.prototype, "tocId", void 0);
65
+ __decorate([
66
+ property({ type: Boolean })
67
+ ], FtReaderTopicContext.prototype, "disableContextInteractions", void 0);
63
68
  __decorate([
64
69
  state()
65
70
  ], FtReaderTopicContext.prototype, "tocNode", void 0);
@@ -4,8 +4,8 @@
4
4
  color: ${r.textColor};
5
5
  background-color: ${r.colorSurface};
6
6
  }
7
- `;var n=function(t,e,o,s){for(var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s,c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class c extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class a extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=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.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.store?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new c)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}return n([s.state()],e.prototype,"stateManager",void 0),e}(e.FtLitElementRedux)){}var d=function(t,e,o,s){for(var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s,c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class l extends a{constructor(){super(...arguments),this.registeredComponents=[]}render(){return o.html`
7
+ `;var n=function(t,e,o,s){for(var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s,c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class c extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class a extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=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.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.store?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new c)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}return n([s.state()],e.prototype,"stateManager",void 0),e}(e.FtLitElementRedux)){}var d=function(t,e,o,s){for(var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s,c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class l extends a{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registeredComponents=[]}render(){return o.html`
8
8
  <article id=${this.tocId}>
9
9
  <slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
10
10
  </article>
11
- `}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode}updated(t){super.updated(t),["mapId","tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}l.styles=i,d([e.redux((t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.id}))],l.prototype,"mapId",void 0),d([s.property()],l.prototype,"tocId",void 0),d([s.state()],l.prototype,"tocNode",void 0),e.customElement("ft-reader-topic-context")(l),t.FtReaderTopicContext=l,t.FtReaderTopicContextCssVariables=r,t.styles=i,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators);
11
+ `}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode,t.disableContextInteractions=this.disableContextInteractions}updated(t){super.updated(t),["mapId","tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}l.styles=i,d([e.redux((t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.id}))],l.prototype,"mapId",void 0),d([s.property()],l.prototype,"tocId",void 0),d([s.property({type:Boolean})],l.prototype,"disableContextInteractions",void 0),d([s.state()],l.prototype,"tocNode",void 0),e.customElement("ft-reader-topic-context")(l),t.FtReaderTopicContext=l,t.FtReaderTopicContextCssVariables=r,t.styles=i,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators);
@@ -88,8 +88,8 @@ var nt,at;class ct extends C{constructor(){super(...arguments),this.renderOption
88
88
  color: ${yt.textColor};
89
89
  background-color: ${yt.colorSurface};
90
90
  }
91
- `;var xt=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 gt extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class wt extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=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.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.store?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new gt)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}return xt([o()],e.prototype,"stateManager",void 0),e}(ft)){}var Ot,St,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 wt{constructor(){super(...arguments),this.registeredComponents=[]}render(){return I`
91
+ `;var xt=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 gt extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class wt extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=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.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.store?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new gt)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}return xt([o()],e.prototype,"stateManager",void 0),e}(ft)){}var Ot,St,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 wt{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registeredComponents=[]}render(){return I`
92
92
  <article id=${this.tocId}>
93
93
  <slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
94
94
  </article>
95
- `}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode}updated(t){super.updated(t),["mapId","tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}Rt.styles=mt,Nt([(Ot=t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.id},(t,e)=>{t.constructor.createProperty(e,{attribute:!1,hasChanged:null!=St?St:(t,e)=>!n(t,e)});const i=t;i.reduxProperties=i.reduxProperties||new Map,i.reduxProperties.set(e,null!=Ot?Ot:t=>t[e])})],Rt.prototype,"mapId",void 0),Nt([s()],Rt.prototype,"tocId",void 0),Nt([o()],Rt.prototype,"tocNode",void 0),(Ct="ft-reader-topic-context",t=>{window.customElements.get(Ct)||window.customElements.define(Ct,t)})(Rt),t.FtReaderTopicContext=Rt,t.FtReaderTopicContextCssVariables=yt,t.styles=mt,Object.defineProperty(t,"i",{value:!0})}({});
95
+ `}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode,t.disableContextInteractions=this.disableContextInteractions}updated(t){super.updated(t),["mapId","tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}Rt.styles=mt,Nt([(Ot=t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.id},(t,e)=>{t.constructor.createProperty(e,{attribute:!1,hasChanged:null!=St?St:(t,e)=>!n(t,e)});const i=t;i.reduxProperties=i.reduxProperties||new Map,i.reduxProperties.set(e,null!=Ot?Ot:t=>t[e])})],Rt.prototype,"mapId",void 0),Nt([s()],Rt.prototype,"tocId",void 0),Nt([s({type:Boolean})],Rt.prototype,"disableContextInteractions",void 0),Nt([o()],Rt.prototype,"tocNode",void 0),(Ct="ft-reader-topic-context",t=>{window.customElements.get(Ct)||window.customElements.define(Ct,t)})(Rt),t.FtReaderTopicContext=Rt,t.FtReaderTopicContextCssVariables=yt,t.styles=mt,Object.defineProperty(t,"i",{value:!0})}({});
@@ -6,6 +6,7 @@ export declare class RegisterReaderTopicComponentEvent extends Event {
6
6
  }
7
7
  export declare type FtReaderTopicComponentInterface = {
8
8
  tocNode?: FtReaderTocNode;
9
+ disableContextInteractions: boolean;
9
10
  };
10
11
  declare type Constructor<T> = new (...args: any[]) => T;
11
12
  export declare function toFtReaderTopicComponent<T extends Constructor<FtLitElement>>(ReduxClass: T): T & Constructor<FtReaderTopicComponentInterface>;
@@ -15,6 +15,7 @@ export function toFtReaderTopicComponent(ReduxClass) {
15
15
  class FtReaderTopicComponentClass extends ReduxClass {
16
16
  constructor() {
17
17
  super(...arguments);
18
+ this.disableContextInteractions = false;
18
19
  this.registerIntervalTopic = 0;
19
20
  }
20
21
  connectedCallback() {
@@ -37,6 +38,9 @@ export function toFtReaderTopicComponent(ReduxClass) {
37
38
  __decorate([
38
39
  state()
39
40
  ], FtReaderTopicComponentClass.prototype, "tocNode", void 0);
41
+ __decorate([
42
+ state()
43
+ ], FtReaderTopicComponentClass.prototype, "disableContextInteractions", void 0);
40
44
  return FtReaderTopicComponentClass;
41
45
  }
42
46
  export class FtReaderTopicComponent extends toFtReaderTopicComponent(FtReaderComponent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-topic-context",
3
- "version": "0.3.48",
3
+ "version": "0.3.49",
4
4
  "description": "Context block for integrated reader topic components.",
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.48",
22
+ "@fluid-topics/ft-wc-utils": "0.3.49",
23
23
  "lit": "2.2.8"
24
24
  },
25
- "gitHead": "d3c000ead2ed2e15f291d09b303ad8aaa7f1ce98"
25
+ "gitHead": "3584a4f0b3edc500a360c2afe2ef3e5cdbb604b6"
26
26
  }