@claspo/document-connector 16.8.0 → 16.8.1

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.
@@ -4,4 +4,5 @@ export default class GlobalScrollBlocker {
4
4
  private static savedParams;
5
5
  static block(): void;
6
6
  static restore(): void;
7
+ private static scrollWindowTo;
7
8
  }
@@ -1 +1 @@
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||"",htmlElemHeight:e.height||"",htmlElemOverflowY:e.overflowY||""},e.top=-o+"px",e.left=-t+"px",e.position="fixed",e.width="100%",e.height="auto",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.height=l.htmlElemHeight,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||"",htmlElemHeight:e.height||"",htmlElemOverflowY:e.overflowY||""},e.top=-o+"px",e.left=-t+"px",e.position="fixed",e.width="100%",e.height="auto",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.height=l.htmlElemHeight,e.overflowY=l.htmlElemOverflowY,o.classList.remove(GlobalScrollBlocker.globalScrollBlockClass),e.scrollBehavior=s.scrollBehavior="auto",GlobalScrollBlocker.scrollWindowTo(l.scrollLeftPosition,l.scrollTopPosition),e.scrollBehavior=c,s.scrollBehavior=r}static scrollWindowTo(l,o){if("function"==typeof window.scroll)return void window.scroll(l,o);if("function"==typeof window.scrollTo)return void window.scrollTo(l,o);const t=document.documentElement;t.scrollTop=o,t.scrollLeft=l}}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.8.0",
3
+ "version": "16.8.1",
4
4
  "scripts": {
5
5
  "test": "jest --no-cache --coverage",
6
6
  "build": "rm -rf out && tsc --project tsconfig.json && npm run minify",