@revolist/revogrid 4.23.1 → 4.23.2
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.
- package/dist/cjs/revogr-data_4.cjs.entry.js +4 -2
- package/dist/collection/components/scroll/revogr-viewport-scroll.js +4 -2
- package/dist/esm/revogr-data_4.entry.js +4 -2
- package/dist/revo-grid/revogr-data_4.entry.js +4 -2
- package/hydrate/index.js +4 -2
- package/hydrate/index.mjs +4 -2
- package/package.json +1 -1
- package/standalone/revogr-viewport-scroll2.js +1 -1
|
@@ -817,8 +817,10 @@ const RevogrViewportScroll = class {
|
|
|
817
817
|
render() {
|
|
818
818
|
var _a, _b, _c, _d;
|
|
819
819
|
const physicalContentHeight = throttle.getContentSize(this.contentHeight, (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0);
|
|
820
|
-
const physicalContentWidth =
|
|
821
|
-
|
|
820
|
+
const physicalContentWidth = this.colType === 'colPinStart' || this.colType === 'colPinEnd'
|
|
821
|
+
? this.contentWidth
|
|
822
|
+
: throttle.getContentSize(this.contentWidth, (_d = (_c = this.horizontalScroll) === null || _c === void 0 ? void 0 : _c.clientWidth) !== null && _d !== void 0 ? _d : 0);
|
|
823
|
+
return (index.h(index.Host, { key: '9b23f5c3c18924a25ecd3e1ee0909ebd03b25048', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, index.h("div", { key: '144f5c79d0a99e6423c1ca448917aedf514f0ae3', class: "inner-content-table", style: { width: `${physicalContentWidth}px` } }, index.h("div", { key: '10db0971f2db6acf8510cf21d736c82f0d0e5632', class: "header-wrapper", ref: e => (this.header = e) }, index.h("slot", { key: '77e0cd002ccda4a9e420de50648b711cde412a34', name: viewport_helpers.HEADER_SLOT })), index.h("div", { key: 'a78167dc52a24005a35dd94c5a9a43eb7dd289dd', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, index.h("div", { key: 'c277d9d1ffc54452b584eb55b1a29d2a10672fb6', class: "content-wrapper", style: { height: `${physicalContentHeight}px` } }, index.h("slot", { key: '01fb5630a3d40e231a3aead9ad1c07aa06e69004', name: viewport_helpers.CONTENT_SLOT }))), index.h("div", { key: 'ff7389e77b500b97ea1fc38228da9fc3d6514e30', class: "footer-wrapper", ref: e => (this.footer = e) }, index.h("slot", { key: '3aa725e0a8f38ef5d4bc4dce53037ff55a6c25b3', name: viewport_helpers.FOOTER_SLOT })))));
|
|
822
824
|
}
|
|
823
825
|
/**
|
|
824
826
|
* Extra layer for scroll event monitoring, where MouseWheel event is not passing
|
|
@@ -210,8 +210,10 @@ export class RevogrViewportScroll {
|
|
|
210
210
|
render() {
|
|
211
211
|
var _a, _b, _c, _d;
|
|
212
212
|
const physicalContentHeight = getContentSize(this.contentHeight, (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0);
|
|
213
|
-
const physicalContentWidth =
|
|
214
|
-
|
|
213
|
+
const physicalContentWidth = this.colType === 'colPinStart' || this.colType === 'colPinEnd'
|
|
214
|
+
? this.contentWidth
|
|
215
|
+
: getContentSize(this.contentWidth, (_d = (_c = this.horizontalScroll) === null || _c === void 0 ? void 0 : _c.clientWidth) !== null && _d !== void 0 ? _d : 0);
|
|
216
|
+
return (h(Host, { key: '9b23f5c3c18924a25ecd3e1ee0909ebd03b25048', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, h("div", { key: '144f5c79d0a99e6423c1ca448917aedf514f0ae3', class: "inner-content-table", style: { width: `${physicalContentWidth}px` } }, h("div", { key: '10db0971f2db6acf8510cf21d736c82f0d0e5632', class: "header-wrapper", ref: e => (this.header = e) }, h("slot", { key: '77e0cd002ccda4a9e420de50648b711cde412a34', name: HEADER_SLOT })), h("div", { key: 'a78167dc52a24005a35dd94c5a9a43eb7dd289dd', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, h("div", { key: 'c277d9d1ffc54452b584eb55b1a29d2a10672fb6', class: "content-wrapper", style: { height: `${physicalContentHeight}px` } }, h("slot", { key: '01fb5630a3d40e231a3aead9ad1c07aa06e69004', name: CONTENT_SLOT }))), h("div", { key: 'ff7389e77b500b97ea1fc38228da9fc3d6514e30', class: "footer-wrapper", ref: e => (this.footer = e) }, h("slot", { key: '3aa725e0a8f38ef5d4bc4dce53037ff55a6c25b3', name: FOOTER_SLOT })))));
|
|
215
217
|
}
|
|
216
218
|
/**
|
|
217
219
|
* Extra layer for scroll event monitoring, where MouseWheel event is not passing
|
|
@@ -815,8 +815,10 @@ const RevogrViewportScroll = class {
|
|
|
815
815
|
render() {
|
|
816
816
|
var _a, _b, _c, _d;
|
|
817
817
|
const physicalContentHeight = getContentSize(this.contentHeight, (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0);
|
|
818
|
-
const physicalContentWidth =
|
|
819
|
-
|
|
818
|
+
const physicalContentWidth = this.colType === 'colPinStart' || this.colType === 'colPinEnd'
|
|
819
|
+
? this.contentWidth
|
|
820
|
+
: getContentSize(this.contentWidth, (_d = (_c = this.horizontalScroll) === null || _c === void 0 ? void 0 : _c.clientWidth) !== null && _d !== void 0 ? _d : 0);
|
|
821
|
+
return (h(Host, { key: '9b23f5c3c18924a25ecd3e1ee0909ebd03b25048', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, h("div", { key: '144f5c79d0a99e6423c1ca448917aedf514f0ae3', class: "inner-content-table", style: { width: `${physicalContentWidth}px` } }, h("div", { key: '10db0971f2db6acf8510cf21d736c82f0d0e5632', class: "header-wrapper", ref: e => (this.header = e) }, h("slot", { key: '77e0cd002ccda4a9e420de50648b711cde412a34', name: HEADER_SLOT })), h("div", { key: 'a78167dc52a24005a35dd94c5a9a43eb7dd289dd', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, h("div", { key: 'c277d9d1ffc54452b584eb55b1a29d2a10672fb6', class: "content-wrapper", style: { height: `${physicalContentHeight}px` } }, h("slot", { key: '01fb5630a3d40e231a3aead9ad1c07aa06e69004', name: CONTENT_SLOT }))), h("div", { key: 'ff7389e77b500b97ea1fc38228da9fc3d6514e30', class: "footer-wrapper", ref: e => (this.footer = e) }, h("slot", { key: '3aa725e0a8f38ef5d4bc4dce53037ff55a6c25b3', name: FOOTER_SLOT })))));
|
|
820
822
|
}
|
|
821
823
|
/**
|
|
822
824
|
* Extra layer for scroll event monitoring, where MouseWheel event is not passing
|
|
@@ -815,8 +815,10 @@ const RevogrViewportScroll = class {
|
|
|
815
815
|
render() {
|
|
816
816
|
var _a, _b, _c, _d;
|
|
817
817
|
const physicalContentHeight = getContentSize(this.contentHeight, (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0);
|
|
818
|
-
const physicalContentWidth =
|
|
819
|
-
|
|
818
|
+
const physicalContentWidth = this.colType === 'colPinStart' || this.colType === 'colPinEnd'
|
|
819
|
+
? this.contentWidth
|
|
820
|
+
: getContentSize(this.contentWidth, (_d = (_c = this.horizontalScroll) === null || _c === void 0 ? void 0 : _c.clientWidth) !== null && _d !== void 0 ? _d : 0);
|
|
821
|
+
return (h(Host, { key: '9b23f5c3c18924a25ecd3e1ee0909ebd03b25048', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, h("div", { key: '144f5c79d0a99e6423c1ca448917aedf514f0ae3', class: "inner-content-table", style: { width: `${physicalContentWidth}px` } }, h("div", { key: '10db0971f2db6acf8510cf21d736c82f0d0e5632', class: "header-wrapper", ref: e => (this.header = e) }, h("slot", { key: '77e0cd002ccda4a9e420de50648b711cde412a34', name: HEADER_SLOT })), h("div", { key: 'a78167dc52a24005a35dd94c5a9a43eb7dd289dd', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, h("div", { key: 'c277d9d1ffc54452b584eb55b1a29d2a10672fb6', class: "content-wrapper", style: { height: `${physicalContentHeight}px` } }, h("slot", { key: '01fb5630a3d40e231a3aead9ad1c07aa06e69004', name: CONTENT_SLOT }))), h("div", { key: 'ff7389e77b500b97ea1fc38228da9fc3d6514e30', class: "footer-wrapper", ref: e => (this.footer = e) }, h("slot", { key: '3aa725e0a8f38ef5d4bc4dce53037ff55a6c25b3', name: FOOTER_SLOT })))));
|
|
820
822
|
}
|
|
821
823
|
/**
|
|
822
824
|
* Extra layer for scroll event monitoring, where MouseWheel event is not passing
|
package/hydrate/index.js
CHANGED
|
@@ -21819,8 +21819,10 @@ class RevogrViewportScroll {
|
|
|
21819
21819
|
render() {
|
|
21820
21820
|
var _a, _b, _c, _d;
|
|
21821
21821
|
const physicalContentHeight = getContentSize(this.contentHeight, (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0);
|
|
21822
|
-
const physicalContentWidth =
|
|
21823
|
-
|
|
21822
|
+
const physicalContentWidth = this.colType === 'colPinStart' || this.colType === 'colPinEnd'
|
|
21823
|
+
? this.contentWidth
|
|
21824
|
+
: getContentSize(this.contentWidth, (_d = (_c = this.horizontalScroll) === null || _c === void 0 ? void 0 : _c.clientWidth) !== null && _d !== void 0 ? _d : 0);
|
|
21825
|
+
return (hAsync(Host, { key: '9b23f5c3c18924a25ecd3e1ee0909ebd03b25048', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, hAsync("div", { key: '144f5c79d0a99e6423c1ca448917aedf514f0ae3', class: "inner-content-table", style: { width: `${physicalContentWidth}px` } }, hAsync("div", { key: '10db0971f2db6acf8510cf21d736c82f0d0e5632', class: "header-wrapper", ref: e => (this.header = e) }, hAsync("slot", { key: '77e0cd002ccda4a9e420de50648b711cde412a34', name: HEADER_SLOT })), hAsync("div", { key: 'a78167dc52a24005a35dd94c5a9a43eb7dd289dd', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, hAsync("div", { key: 'c277d9d1ffc54452b584eb55b1a29d2a10672fb6', class: "content-wrapper", style: { height: `${physicalContentHeight}px` } }, hAsync("slot", { key: '01fb5630a3d40e231a3aead9ad1c07aa06e69004', name: CONTENT_SLOT }))), hAsync("div", { key: 'ff7389e77b500b97ea1fc38228da9fc3d6514e30', class: "footer-wrapper", ref: e => (this.footer = e) }, hAsync("slot", { key: '3aa725e0a8f38ef5d4bc4dce53037ff55a6c25b3', name: FOOTER_SLOT })))));
|
|
21824
21826
|
}
|
|
21825
21827
|
/**
|
|
21826
21828
|
* Extra layer for scroll event monitoring, where MouseWheel event is not passing
|
package/hydrate/index.mjs
CHANGED
|
@@ -21817,8 +21817,10 @@ class RevogrViewportScroll {
|
|
|
21817
21817
|
render() {
|
|
21818
21818
|
var _a, _b, _c, _d;
|
|
21819
21819
|
const physicalContentHeight = getContentSize(this.contentHeight, (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0);
|
|
21820
|
-
const physicalContentWidth =
|
|
21821
|
-
|
|
21820
|
+
const physicalContentWidth = this.colType === 'colPinStart' || this.colType === 'colPinEnd'
|
|
21821
|
+
? this.contentWidth
|
|
21822
|
+
: getContentSize(this.contentWidth, (_d = (_c = this.horizontalScroll) === null || _c === void 0 ? void 0 : _c.clientWidth) !== null && _d !== void 0 ? _d : 0);
|
|
21823
|
+
return (hAsync(Host, { key: '9b23f5c3c18924a25ecd3e1ee0909ebd03b25048', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, hAsync("div", { key: '144f5c79d0a99e6423c1ca448917aedf514f0ae3', class: "inner-content-table", style: { width: `${physicalContentWidth}px` } }, hAsync("div", { key: '10db0971f2db6acf8510cf21d736c82f0d0e5632', class: "header-wrapper", ref: e => (this.header = e) }, hAsync("slot", { key: '77e0cd002ccda4a9e420de50648b711cde412a34', name: HEADER_SLOT })), hAsync("div", { key: 'a78167dc52a24005a35dd94c5a9a43eb7dd289dd', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, hAsync("div", { key: 'c277d9d1ffc54452b584eb55b1a29d2a10672fb6', class: "content-wrapper", style: { height: `${physicalContentHeight}px` } }, hAsync("slot", { key: '01fb5630a3d40e231a3aead9ad1c07aa06e69004', name: CONTENT_SLOT }))), hAsync("div", { key: 'ff7389e77b500b97ea1fc38228da9fc3d6514e30', class: "footer-wrapper", ref: e => (this.footer = e) }, hAsync("slot", { key: '3aa725e0a8f38ef5d4bc4dce53037ff55a6c25b3', name: FOOTER_SLOT })))));
|
|
21822
21824
|
}
|
|
21823
21825
|
/**
|
|
21824
21826
|
* Extra layer for scroll event monitoring, where MouseWheel event is not passing
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
|
-
import{proxyCustomElement as
|
|
4
|
+
import{proxyCustomElement as i,HTMLElement as t,createEvent as e,h as o,Host as l,transformTag as r}from"@stencil/core/internal/client";import{t as s}from"./throttle.js";import{L as n,a,b as c}from"./local.scroll.timer.js";const h="header",d="footer",v="content",u="data";function w(i,t){return{x:i.viewports[i.colType].store.get("realCount"),y:i.viewports[t].store.get("realCount")}}function p(i,t,e,o){return{colData:i.colStore,viewportCol:i.viewports[i.colType].store,viewportRow:i.viewports[t].store,lastCell:w(i,t),slot:e,type:t,canDrag:!o,position:i.position,dataStore:i.rowStores[t].store,dimensionCol:i.dimensions[i.colType].store,dimensionRow:i.dimensions[t].store,style:o?{height:`${i.dimensions[t].store.get("realSize")}px`}:void 0}}class g{constructor(i,t,e){this.resize=t,this.resizeObserver=null,this.previousSize={width:0,height:0},this.apply=s((i=>{var t;const e={width:i.width,height:i.height};null===(t=this.resize)||void 0===t||t.call(this,e,this.previousSize),this.previousSize=e}),40,{leading:!1,trailing:!0});const o=[];e.forEach((i=>{i&&o.push(i)})),this.init(i,o)}init(i,t=[]){const e=this.resizeObserver=new ResizeObserver((t=>{t.length&&this.apply(t[0].target===i?t[0].contentRect:i.getBoundingClientRect())}));e.observe(i),t.forEach((i=>{e.observe(i)}))}destroy(){var i;null===(i=this.resizeObserver)||void 0===i||i.disconnect(),this.resizeObserver=null}}const f=i(class extends t{constructor(i){super(),!1!==i&&this.__registerHost(),this.scrollViewport=e(this,"scrollviewport",7),this.resizeViewport=e(this,"resizeviewport",7),this.scrollchange=e(this,"scrollchange",7),this.silentScroll=e(this,"scrollviewportsilent",7),this.contentWidth=0,this.contentHeight=0,this.noHorizontalScrollTransfer=!1}async setScroll(i){var t;this.localScrollTimer.latestScrollUpdate(i.dimension),null===(t=this.localScrollService)||void 0===t||t.setScroll(i)}async changeScroll(i,t=!1){var e,o,l,r;if(!t){if(i.delta){let t=0;switch(i.dimension){case"rgCol":t=this.horizontalScroll.scrollLeft;break;case"rgRow":t=null!==(o=null===(e=this.verticalScroll)||void 0===e?void 0:e.scrollTop)&&void 0!==o?o:0}return null!==(r=null===(l=this.localScrollService)||void 0===l?void 0:l.setScrollByDelta(i,t))&&void 0!==r?r:i}return i}i.coordinate&&this.verticalScroll&&"rgRow"===i.dimension&&(this.verticalScroll.style.transform=`translateY(${-1*i.coordinate}px)`)}mousewheelVertical({detail:i}){this.verticalMouseWheel(i)}mousewheelHorizontal({detail:i}){this.horizontalMouseWheel(i)}scrollApply({detail:{type:i,coordinate:t}}){this.applyOnScroll(i,t,!0)}connectedCallback(){this.verticalMouseWheel=this.onVerticalMouseWheel.bind(this,"rgRow","deltaY"),this.horizontalMouseWheel=this.onHorizontalMouseWheel.bind(this,"rgCol","deltaX"),this.localScrollTimer=new n("ontouchstart"in document.documentElement?0:10),this.localScrollService=new a({runScroll:i=>this.scrollViewport.emit(i),applyScroll:i=>{switch(this.localScrollTimer.setCoordinate(i),i.dimension){case"rgCol":this.horizontalScroll.scrollLeft=i.coordinate;break;case"rgRow":this.verticalScroll&&(this.verticalScroll.scrollTop=i.coordinate,this.verticalScroll.style.transform&&(this.verticalScroll.style.transform=""))}}})}componentDidLoad(){this.resizeService=new g(this.horizontalScroll,(i=>{var t,e,o,l,r,s,n,a;const c={};let h=i.height||0;h&&(h-=(null!==(e=null===(t=this.header)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0)+(null!==(l=null===(o=this.footer)||void 0===o?void 0:o.clientHeight)&&void 0!==l?l:0)),c.rgRow={size:h,contentSize:this.contentHeight,scroll:null!==(s=null===(r=this.verticalScroll)||void 0===r?void 0:r.scrollTop)&&void 0!==s?s:0,noScroll:!1},c.rgCol={size:i.width||0,contentSize:this.contentWidth,scroll:this.horizontalScroll.scrollLeft,noScroll:"rgCol"!==this.colType};const d=["rgCol","rgRow"];for(const i of d){const t=c[i];t&&(this.resizeViewport.emit({dimension:i,size:t.size,rowHeader:this.rowHeader}),t.noScroll||(null===(n=this.localScrollService)||void 0===n||n.scroll(null!==(a=t.scroll)&&void 0!==a?a:0,i,!0),this.setScrollVisibility(i,t.size,t.contentSize)))}}),[this.footer,this.header])}setScrollVisibility(i,t,e){const o=t<e;let l;switch(i){case"rgCol":l=this.horizontalScroll;break;case"rgRow":l=this.verticalScroll}o?null==l||l.classList.add(`scroll-${i}`):null==l||l.classList.remove(`scroll-${i}`),this.scrollchange.emit({type:i,hasScroll:o})}disconnectedCallback(){var i;null===(i=this.resizeService)||void 0===i||i.destroy()}async componentDidRender(){var i,t,e,o;this.localScrollService.setParams({contentSize:this.contentHeight,clientSize:null!==(t=null===(i=this.verticalScroll)||void 0===i?void 0:i.clientHeight)&&void 0!==t?t:0,virtualSize:0},"rgRow"),this.localScrollService.setParams({contentSize:this.contentWidth,clientSize:this.horizontalScroll.clientWidth,virtualSize:0},"rgCol"),this.setScrollVisibility("rgRow",null!==(o=null===(e=this.verticalScroll)||void 0===e?void 0:e.clientHeight)&&void 0!==o?o:0,this.contentHeight),this.setScrollVisibility("rgCol",this.horizontalScroll.clientWidth,this.contentWidth)}render(){var i,t,e,r;const s=c(this.contentHeight,null!==(t=null===(i=this.verticalScroll)||void 0===i?void 0:i.clientHeight)&&void 0!==t?t:0),n="colPinStart"===this.colType||"colPinEnd"===this.colType?this.contentWidth:c(this.contentWidth,null!==(r=null===(e=this.horizontalScroll)||void 0===e?void 0:e.clientWidth)&&void 0!==r?r:0);return o(l,{key:"9b23f5c3c18924a25ecd3e1ee0909ebd03b25048",onWheel:this.horizontalMouseWheel,onScroll:i=>this.applyScroll("rgCol",i)},o("div",{key:"144f5c79d0a99e6423c1ca448917aedf514f0ae3",class:"inner-content-table",style:{width:`${n}px`}},o("div",{key:"10db0971f2db6acf8510cf21d736c82f0d0e5632",class:"header-wrapper",ref:i=>this.header=i},o("slot",{key:"77e0cd002ccda4a9e420de50648b711cde412a34",name:h})),o("div",{key:"a78167dc52a24005a35dd94c5a9a43eb7dd289dd",class:"vertical-inner",ref:i=>this.verticalScroll=i,onWheel:this.verticalMouseWheel,onScroll:i=>this.applyScroll("rgRow",i)},o("div",{key:"c277d9d1ffc54452b584eb55b1a29d2a10672fb6",class:"content-wrapper",style:{height:`${s}px`}},o("slot",{key:"01fb5630a3d40e231a3aead9ad1c07aa06e69004",name:v}))),o("div",{key:"ff7389e77b500b97ea1fc38228da9fc3d6514e30",class:"footer-wrapper",ref:i=>this.footer=i},o("slot",{key:"3aa725e0a8f38ef5d4bc4dce53037ff55a6c25b3",name:d}))))}async applyScroll(i,e){if(!(e.target instanceof t))return;let o=0;switch(i){case"rgCol":o=e.target.scrollLeft;break;case"rgRow":o=e.target.scrollTop}o<0?this.silentScroll.emit({dimension:i,coordinate:o}):this.applyOnScroll(i,o)}applyOnScroll(i,t,e=!1){const o=()=>{var o;null===(o=this.localScrollService)||void 0===o||o.scroll(t,i,void 0,void 0,e)};this.localScrollTimer.isReady(i,t)?o():this.localScrollTimer.throttleLastScrollUpdate(i,t,(()=>o()))}onVerticalMouseWheel(i,t,e){var o,l,r,s,n,a,c,h;const d=null!==(l=null===(o=this.verticalScroll)||void 0===o?void 0:o.scrollTop)&&void 0!==l?l:0;d+(null!==(s=null===(r=this.verticalScroll)||void 0===r?void 0:r.clientHeight)&&void 0!==s?s:0)>=(null!==(a=null===(n=this.verticalScroll)||void 0===n?void 0:n.scrollHeight)&&void 0!==a?a:0)&&e.deltaY>0||0===d&&e.deltaY<0||null===(c=e.preventDefault)||void 0===c||c.call(e),null===(h=this.localScrollService)||void 0===h||h.scroll(d+e[t],i,void 0,e[t]),this.localScrollTimer.latestScrollUpdate(i)}onHorizontalMouseWheel(i,t,e){var o,l,r,s;if(!e.deltaX)return;const{scrollLeft:n,scrollWidth:a,clientWidth:c}=this.horizontalScroll,h=n+c>=a&&e.deltaX>0,d=0===n&&e.deltaX<0;if(this.noHorizontalScrollTransfer){if(!h&&!d){const r=n+e[t];null===(o=e.preventDefault)||void 0===o||o.call(e),this.horizontalScroll.scrollLeft=r,null===(l=this.localScrollService)||void 0===l||l.scroll(this.horizontalScroll.scrollLeft,i,void 0,e[t]),this.localScrollTimer.latestScrollUpdate(i)}}else h||d||null===(r=e.preventDefault)||void 0===r||r.call(e),null===(s=this.localScrollService)||void 0===s||s.scroll(n+e[t],i,void 0,e[t]),this.localScrollTimer.latestScrollUpdate(i)}get horizontalScroll(){return this}static get style(){return".rowHeaders{z-index:2;font-size:10px;display:flex;height:100%}.rowHeaders revogr-data .rgCell{text-align:center}.rowHeaders .rgCell{padding:0 1em !important;min-width:100%}revogr-viewport-scroll{-ms-overflow-style:none;scrollbar-width:none;overflow-x:auto;overflow-y:hidden;position:relative;z-index:1;height:100%}revogr-viewport-scroll::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll.colPinStart,revogr-viewport-scroll.colPinEnd{z-index:2}revogr-viewport-scroll.colPinEnd:has(.active){overflow:visible}revogr-viewport-scroll.rgCol{flex-grow:1}revogr-viewport-scroll .content-wrapper{overflow:hidden}revogr-viewport-scroll .inner-content-table{display:flex;flex-direction:column;max-height:100%;width:100%;min-width:100%;position:relative;z-index:0}revogr-viewport-scroll .vertical-inner{overflow-y:auto;position:relative;width:100%;flex-grow:1;outline:none;-ms-overflow-style:none;scrollbar-width:none;}revogr-viewport-scroll .vertical-inner::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll .vertical-inner revogr-data,revogr-viewport-scroll .vertical-inner revogr-overlay-selection{height:100%}"}},[260,"revogr-viewport-scroll",{rowHeader:[4,"row-header"],contentWidth:[2,"content-width"],contentHeight:[2,"content-height"],colType:[1,"col-type"],noHorizontalScrollTransfer:[4,"no-horizontal-scroll-transfer"],setScroll:[64],changeScroll:[64],applyScroll:[64]},[[0,"mousewheel-vertical","mousewheelVertical"],[0,"mousewheel-horizontal","mousewheelHorizontal"],[0,"scroll-coordinate","scrollApply"]]]);function y(){"undefined"!=typeof customElements&&["revogr-viewport-scroll"].forEach((i=>{"revogr-viewport-scroll"===i&&(customElements.get(r(i))||customElements.define(r(i),f))}))}export{v as C,u as D,d as F,h as H,f as R,y as d,p as v}
|