@claspo/document-connector 16.1.0-rc2 → 16.1.0

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.
@@ -2,6 +2,6 @@ export default class GlobalScrollBlocker {
2
2
  private static globalScrollBlockClass;
3
3
  private static activeBlockersCount;
4
4
  private static savedParams;
5
- static block(): boolean;
5
+ static block(): void;
6
6
  static restore(): void;
7
7
  }
@@ -1 +1 @@
1
- class GlobalScrollBlocker{static block(){const l=document.documentElement;if(l.scrollHeight<=l.clientHeight)return!1;if(this.activeBlockersCount++,console.log(" block this.activeBlockersCount",this.activeBlockersCount),1===this.activeBlockersCount){const o=window.scrollY,t=window.scrollX,e=l.style;this.savedParams={scrollTopPosition:o,scrollLeftPosition:t,htmlElemTop:e.top||"",htmlElemLeft:e.left||"",htmlElemPosition:e.position||"",htmlElemWidth:e.width||"",htmlElemOverflowY:e.overflowY||""},e.top=-o+"px",e.left=-t+"px",e.position="fixed",e.width="100%",e.overflowY="scroll",l.classList.add(GlobalScrollBlocker.globalScrollBlockClass)}return!0}static restore(){if(console.log("restore this.activeBlockersCount",this.activeBlockersCount),0===this.activeBlockersCount)return;if(this.activeBlockersCount--,this.activeBlockersCount>0||!this.savedParams)return;const l=this.savedParams;this.savedParams=null;const o=document.documentElement,t=document.body,e=o.style,s=t.style,c=e.scrollBehavior||"",r=s.scrollBehavior||"";e.top=l.htmlElemTop,e.left=l.htmlElemLeft,e.position=l.htmlElemPosition,e.width=l.htmlElemWidth,e.overflowY=l.htmlElemOverflowY,o.classList.remove(GlobalScrollBlocker.globalScrollBlockClass),e.scrollBehavior=s.scrollBehavior="auto",window.scroll(l.scrollLeftPosition,l.scrollTopPosition),e.scrollBehavior=c,s.scrollBehavior=r}}GlobalScrollBlocker.globalScrollBlockClass="cl-global-scroll-block",GlobalScrollBlocker.activeBlockersCount=0,GlobalScrollBlocker.savedParams=null;export default GlobalScrollBlocker;
1
+ class GlobalScrollBlocker{static block(){this.activeBlockersCount++;const l=document.documentElement;if(this.activeBlockersCount>1||l.scrollHeight<=l.clientHeight)return;const o=window.scrollY,t=window.scrollX,e=l.style;this.savedParams={scrollTopPosition:o,scrollLeftPosition:t,htmlElemTop:e.top||"",htmlElemLeft:e.left||"",htmlElemPosition:e.position||"",htmlElemWidth:e.width||"",htmlElemOverflowY:e.overflowY||""},e.top=-o+"px",e.left=-t+"px",e.position="fixed",e.width="100%",e.overflowY="scroll",l.classList.add(GlobalScrollBlocker.globalScrollBlockClass)}static restore(){if(0===this.activeBlockersCount)return;if(this.activeBlockersCount--,this.activeBlockersCount>0||!this.savedParams)return;const l=this.savedParams;this.savedParams=null;const o=document.documentElement,t=document.body,e=o.style,s=t.style,c=e.scrollBehavior||"",r=s.scrollBehavior||"";e.top=l.htmlElemTop,e.left=l.htmlElemLeft,e.position=l.htmlElemPosition,e.width=l.htmlElemWidth,e.overflowY=l.htmlElemOverflowY,o.classList.remove(GlobalScrollBlocker.globalScrollBlockClass),e.scrollBehavior=s.scrollBehavior="auto",window.scroll(l.scrollLeftPosition,l.scrollTopPosition),e.scrollBehavior=c,s.scrollBehavior=r}}GlobalScrollBlocker.globalScrollBlockClass="cl-global-scroll-block",GlobalScrollBlocker.activeBlockersCount=0,GlobalScrollBlocker.savedParams=null;export default GlobalScrollBlocker;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claspo/document-connector",
3
- "version": "16.1.0-rc2",
3
+ "version": "16.1.0",
4
4
  "scripts": {
5
5
  "test": "jest --no-cache --coverage",
6
6
  "build": "rm -rf out && tsc --project tsconfig.json && npm run minify",