@dialpad/dialtone-vue 4.0.0 → 4.0.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.
Files changed (30) hide show
  1. package/dist/{RichTextEditor-DKpulIyi.js → RichTextEditor-CzMY0oVT.js} +10 -17
  2. package/dist/{RichTextEditor-DKpulIyi.js.map → RichTextEditor-CzMY0oVT.js.map} +1 -1
  3. package/dist/{RichTextEditor-BVQ99ytl.cjs → RichTextEditor-n42FPkjs.cjs} +3 -4
  4. package/dist/{RichTextEditor-BVQ99ytl.cjs.map → RichTextEditor-n42FPkjs.cjs.map} +1 -1
  5. package/dist/Scroller-BUtC5Z7j.cjs +2 -0
  6. package/dist/{Scroller-De7jdCyq.js.map → Scroller-BUtC5Z7j.cjs.map} +1 -1
  7. package/dist/{Scroller-De7jdCyq.js → Scroller-BsGXTN6S.js} +2 -1
  8. package/dist/Scroller-BsGXTN6S.js.map +1 -0
  9. package/dist/components/Popover/Popover.vue.d.ts.map +1 -1
  10. package/dist/components/Scroller/Modules/CoreScroller.vue.d.ts +1 -1
  11. package/dist/components/Scroller/Modules/CoreScroller.vue.d.ts.map +1 -1
  12. package/dist/components/Scroller/Modules/DynamicScroller.vue.d.ts +6 -6
  13. package/dist/components/Scroller/Scroller.vue.d.ts +8 -8
  14. package/dist/dialtone-vue.cjs +1 -1
  15. package/dist/dialtone-vue.js +2 -2
  16. package/dist/lib/popover/popover.cjs +1 -1
  17. package/dist/lib/popover/popover.cjs.map +1 -1
  18. package/dist/lib/popover/popover.js +14 -2
  19. package/dist/lib/popover/popover.js.map +1 -1
  20. package/dist/lib/rich-text-editor/index.cjs +1 -1
  21. package/dist/lib/rich-text-editor/index.js +1 -1
  22. package/dist/lib/rich-text-editor/rich-text-editor.cjs +1 -1
  23. package/dist/lib/rich-text-editor/rich-text-editor.js +1 -1
  24. package/dist/lib/scroller/index.cjs +1 -1
  25. package/dist/lib/scroller/index.js +1 -1
  26. package/dist/lib/scroller/scroller.cjs +1 -1
  27. package/dist/lib/scroller/scroller.js +1 -1
  28. package/package.json +4 -4
  29. package/dist/Scroller-DnobBeAo.cjs +0 -2
  30. package/dist/Scroller-DnobBeAo.cjs.map +0 -1
@@ -0,0 +1,2 @@
1
+ require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./common/utils/index.cjs`),t=require(`./_plugin-vue_export-helper-D8jCH6HB.cjs`);let n=require(`vue`);var r={__name:`CoreScroller`,props:{items:{type:Array,required:!0},keyField:{type:String,default:`id`},direction:{type:String,default:`vertical`,validator:e=>[`vertical`,`horizontal`].includes(e)},itemSize:{type:Number,default:null},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:`size`},buffer:{type:Number,default:200},enableHover:{type:Boolean,default:!0},listTag:{type:String,default:`div`},itemTag:{type:String,default:`div`},listClass:{type:[String,Object,Array],default:``},itemClass:{type:[String,Object,Array],default:``}},emits:[`user-position`,`scroll-start`,`scroll-end`],setup(e,{expose:t,emit:r}){let i=e,a=r,o=(0,n.reactive)(new Map),s=(0,n.reactive)(new Map),c=(0,n.ref)([]),l=(0,n.ref)(null),u=(0,n.ref)(!1),d=(0,n.ref)(null),f=(0,n.ref)(null),p=(0,n.ref)(null),m=(0,n.ref)(`blockStart`),h=0,g=0,_=!1,v=0,y=null,b=null,x=0,S=0,C=(0,n.computed)(()=>{if(i.itemSize===null){let e={"-1":{accumulator:0}},t=i.items,n=i.sizeField,r=i.minItemSize,a=1e4,o=0,s;for(let i=0,c=t.length;i<c;i++)s=t[i][n]||r,s<a&&(a=s),o+=s,e[i]={accumulator:o,size:s};return b=a,e}return[]}),w=(0,n.computed)(()=>i.items.length&&typeof i.items[0]!=`object`),T=(0,n.computed)(()=>{let e={};for(let t=0,n=i.items.length;t<n;t++)e[i.items[t][i.keyField]]=t;return e});(0,n.watch)(C,()=>{j(!1)},{deep:!0}),(0,n.onMounted)(()=>{(0,n.nextTick)(()=>{j(!0),u.value=!0})});let E=(e,t,r,i,a)=>{let o=(0,n.shallowReactive)({item:r,position:0,nr:(0,n.markRaw)({id:S++,index:t,used:!0,key:i,type:a})});return e.value.push(o),o},D=(e,t=!1)=>{let n=s,r=e.nr.type,i=n.get(r);i||(i=[],n.set(r,i)),i.push(e),t||(e.nr.used=!1,e.position=-9999)},O=()=>{let e=i.direction===`vertical`,t;return t=e?{start:d.value.scrollTop,end:d.value.scrollTop+d.value.clientHeight}:{start:d.value.scrollLeft,end:d.value.scrollLeft+d.value.clientWidth},t},k=()=>{throw setTimeout(()=>{console.error(`It seems the scroller element isn't scrolling, so it tries to render all the items at once.`,`Scroller:`,d),console.error(`Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.`)}),Error(`Rendered items limit reached`)},A=()=>{c.value.sort((e,t)=>e.nr.index-t.nr.index)},j=(e,t=!1)=>{if(!d.value)return;let n=i.itemSize,r=b,l=w.value?null:i.keyField,u=i.items,m=u.length,_=C.value,S=o,j=s,M=c,N=T,P,F,I,L,R;if(!m)P=F=L=R=I=0;else{let e=O();if(t){let t=e.start-v.value;if(t<0&&(t=-t),n===null&&t<r.value||t<n)return{continuous:!0}}v=e.start;let a=i.buffer;e.start-=a,e.end+=a;let o=i.direction===`vertical`?`scrollHeight`:`scrollWidth`;if(f.value&&(e.start-=f.value[o]),p.value&&(e.end+=p.value[o]),n===null){let t,n=0,r=m-1,i=~~(m/2),a;do a=i,t=_[i]?.accumulator,t<e.start?n=i:i<m-1&&_[i+1]?.accumulator>e.start&&(r=i),i=~~((n+r)/2);while(i!==a);for(i<0&&(i=0),P=i,I=_[m-1]?.accumulator,F=i;F<m&&_[F]?.accumulator<e.end;F++);for(F===-1?F=u.length-1:(F++,F>m&&(F=m)),L=h;L<m&&_[L]?.accumulator<e.start;L++);for(R=L;R<m&&_[R]?.accumulator<e.end;R++);}else{P=~~(e.start/n);let t=P%1;P-=t,F=Math.ceil(e.end/n),L=Math.max(0,Math.floor(e.start/n)),R=Math.floor(e.end/n),P<0&&(P=0),F>m&&(F=m),L<0&&(L=0),R>m&&(R=m),I=Math.ceil(m/1)*n}}F-P>1e3&&k(),x=I;let z,B=P<=g&&F>=P;if(B)for(let t=0,n=M.value.length;t<n;t++)z=M.value[t],z?.nr.used&&(e&&(z.nr.index=N[z.item[l]]),(z.nr.index==null||z.nr.index<P||z.nr.index>=F)&&D(z));let V=B?null:new Map,H,U,W;for(let e=P;e<F;e++){H=u[e];let t=l?H?.[l]:H;if(t==null)throw Error(`Key is ${t} on item (keyField is '${l}')`);if(z=S.get(t),!n&&!_[e]?.size){z&&D(z);continue}U=H.type;let r=j.get(U),i=!1;if(!z)B?z=r&&r.length?r.pop():E(M,e,H,t,U):(W=V.get(U)||0,(!r||W>=r.length)&&(z=E(M,e,H,t,U),D(z,!0),r=j.get(U)),z=r[W],V.set(U,W+1)),S.delete(z.nr.key),z.nr.used=!0,z.nr.index=e,z.nr.key=t,z.nr.type=U,S.set(t,z),i=!0;else if(!z.nr.used&&(z.nr.used=!0,i=!0,r)){let e=r.indexOf(z);e!==-1&&r.splice(e,1)}z.item=H,i&&(e===u.length-1&&a(`scroll-end`),e===0&&a(`scroll-start`)),n===null?(z.position=_[e-1]?.accumulator,z.offset=0):(z.position=Math.floor(e)*n,z.offset=e%1*n)}return h=P,g=F,clearTimeout(y),y=setTimeout(A,300),{continuous:B}},M=e=>{let t=i.direction===`vertical`?{scroll:`scrollTop`,start:`top`}:{scroll:`scrollLeft`,start:`left`},n=d.value,r=t.scroll;n[r]=e},N=e=>{let t;t=i.itemSize===null?e>0?C.value[e-1]?.accumulator:0:Math.floor(e)*i.itemSize,M(t)},P=()=>{let e=d.value;m.value!==`middle`&&(m.value=`middle`,a(`user-position`,`middle`)),e.scrollTop===0&&(m.value=`blockStart`,a(`user-position`,`blockStart`),a(`user-position`,`top`)),e.scrollTop+e.clientHeight===e.scrollHeight&&(m.value=`blockEnd`,a(`user-position`,`blockEnd`),a(`user-position`,`bottom`)),_||(_=!0,requestAnimationFrame(()=>{_=!1,j(!1,!0)}))};return t({scrollToItem:N,_updateVisibleItems:j}),(t,r)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{ref_key:`scroller`,ref:d,class:(0,n.normalizeClass)([`vue-recycle-scroller`,{ready:u.value,[`direction-${e.direction}`]:!0}]),onScrollPassive:P},[t.$slots.before?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:0,ref_key:`before`,ref:f,"data-qa":`dt-scroller-before`,class:`vue-recycle-scroller__slot`},[(0,n.renderSlot)(t.$slots,`before`)],512)):(0,n.createCommentVNode)(``,!0),((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.listTag),{ref:`wrapper`,style:(0,n.normalizeStyle)({[e.direction===`vertical`?`minHeight`:`minWidth`]:`${(0,n.unref)(x)}px`}),"data-qa":`dt-scroller-item-wrapper`,class:(0,n.normalizeClass)([`vue-recycle-scroller__item-wrapper`,e.listClass])},{default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(c.value,r=>((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.itemTag),(0,n.mergeProps)({key:r.nr.id,"data-qa":`dt-scroller-item`,style:u.value?{transform:`translate${e.direction===`vertical`?`Y`:`X`}(${r.position}px) translate${e.direction===`vertical`?`X`:`Y`}(${r.offset}px)`,width:void 0,height:void 0}:null,class:[`vue-recycle-scroller__item-view`,[e.itemClass,{hover:i.enableHover&&l.value===r.nr.key}]]},(0,n.toHandlers)(i.enableHover?{mouseenter:()=>{l.value=r.nr.key},mouseleave:()=>{l.value=null}}:{})),{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`default`,{item:r.item,index:r.nr.index,active:r.nr.used})]),_:2},1040,[`style`,`class`]))),128)),e.items.length?(0,n.createCommentVNode)(``,!0):(0,n.renderSlot)(t.$slots,`empty`,{key:0})]),_:3},8,[`style`,`class`])),t.$slots.after?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:1,ref_key:`after`,ref:p,"data-qa":`dt-scroller-after`,class:`vue-recycle-scroller__slot`},[(0,n.renderSlot)(t.$slots,`after`)],512)):(0,n.createCommentVNode)(``,!0)],34))}},i={name:`DynamicScroller`,components:{CoreScroller:r,DtScrollerItem:{name:`DtScrollerItem`,inject:[`vscrollData`,`vscrollParent`,`vscrollResizeObserver`],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},tag:{type:String,default:`div`}},computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:`updateWatchData`,id(t,n){if(e.returnFirstEl(this.$el).$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){let e=this.vscrollData.sizes[n],r=this.vscrollData.sizes[t];e!=null&&e!==r&&this.applySize(e)}},finalActive(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver))for(let e in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[e],this.onDataUpdate)},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch(`item`,()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:e}){!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||e||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(t){this.$nextTick(()=>{if(this.id===t){let t=e.returnFirstEl(this.$el).offsetWidth,n=e.returnFirstEl(this.$el).offsetHeight;this.applyWidthHeight(t,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(e,t){let n=~~(this.vscrollParent.direction===`vertical`?t:e);n&&this.size!==n&&this.applySize(n)},applySize(e){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=e},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(e.returnFirstEl(this.$el)),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(e.returnFirstEl(this.$el)),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(e,t,n){this.id===e&&this.applyWidthHeight(t,n)}},render(){return(0,n.h)(this.tag,this.$slots.default())}}},provide(){return typeof ResizeObserver<`u`&&(this.$_resizeObserver=new ResizeObserver(e=>{requestAnimationFrame(()=>{if(Array.isArray(e)){for(let t of e)if(t.target&&t.target.$_vs_onResize){let e,n;if(t.borderBoxSize){let r=t.borderBoxSize[0];e=r.inlineSize,n=r.blockSize}else e=t.contentRect.width,n=t.contentRect.height;t.target.$_vs_onResize(t.target.$_vs_id,e,n)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{items:{type:Array,required:!0},dynamic:{type:Boolean,default:!1},keyField:{type:String,default:`id`},direction:{type:String,default:`vertical`,validator:e=>[`vertical`,`horizontal`].includes(e)},listTag:{type:String,default:`div`},itemTag:{type:String,default:`div`},minItemSize:{type:[Number,String]}},data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray(){return this.items.length&&typeof this.items[0]!=`object`},itemsWithSize(){let e=[],{items:t,keyField:n,simpleArray:r}=this,i=this.vscrollData.sizes,a=t.length;for(let o=0;o<a;o++){let a=t[o],s=r?o:a[n],c=i[s];c===void 0&&!this.$_undefinedMap[s]&&(c=0),e.push({item:a,[n]:s,size:c})}return e}},watch:{simpleArray:{handler(e){this.vscrollData.simpleArray=e},immediate:!0},itemsWithSize(t,n){let r=e.returnFirstEl(this.$el).scrollTop,i=0,a=0,o=Math.min(t.length,n.length);for(let e=0;e<o&&!(i>=r);e++)i+=n[e].size||this.minItemSize,a+=t[e].size||this.minItemSize;let s=a-i;s!==0&&(e.returnFirstEl(this.$el).scrollTop+=s)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={}},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},methods:{dynamicScrollerUpdateItems(){let e=this.$refs.scroller;e&&e._updateVisibleItems(!0)},dynamicScrollerUpdateItemsFromBottom(){let e=this.$refs.scroller;e&&e._updateVisibleItems(!1,!0)},scrollToItem(e){let t=this.$refs.scroller;t&&t.scrollToItem(e)},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;let t=e.returnFirstEl(this.$el);this.$nextTick(()=>{t.scrollTop=t.scrollHeight+5e3;let e=()=>{t.scrollTop=t.scrollHeight+5e3,requestAnimationFrame(()=>{t.scrollTop=t.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(e)})};requestAnimationFrame(e)})}}};function a(e,t,r,i,a,o){let s=(0,n.resolveComponent)(`dt-scroller-item`),c=(0,n.resolveComponent)(`core-scroller`);return(0,n.openBlock)(),(0,n.createBlock)(c,(0,n.mergeProps)({ref:`scroller`,items:o.itemsWithSize,"min-item-size":r.minItemSize,direction:r.direction,"key-field":r.keyField,"list-tag":r.listTag,"item-tag":r.itemTag},e.$attrs),(0,n.createSlots)({default:(0,n.withCtx)(({item:t,index:r,active:i})=>[(0,n.createVNode)(s,{item:t,active:i,"size-dependencies":[t.message],"data-index":r},{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`default`,(0,n.normalizeProps)((0,n.guardReactiveProps)({item:t.item,index:r,active:i,itemWithSize:t})))]),_:2},1032,[`item`,`active`,`size-dependencies`,`data-index`])]),_:2},[e.$slots.before?{name:`before`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`before`)]),key:`0`}:void 0,e.$slots.empty?{name:`empty`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`empty`)]),key:`1`}:void 0,e.$slots.after?{name:`after`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`after`)]),key:`2`}:void 0]),1040,[`items`,`min-item-size`,`direction`,`key-field`,`list-tag`,`item-tag`])}var o=t.t(i,[[`render`,a]]),s=Object.assign({name:`DtScroller`},{__name:`Scroller`,props:{buffer:{type:Number,default:200},direction:{type:String,default:`vertical`,validator:e=>[`vertical`,`horizontal`].includes(e)},dynamic:{type:Boolean,default:!1},itemSize:{type:Number,default:null},itemTag:{type:String,default:`div`},items:{type:Array,required:!0},keyField:{type:String,default:`id`},listTag:{type:String,default:`div`},minItemSize:{type:[Number,String],default:null},scrollerHeight:{type:[String,Number],default:`100%`},scrollerWidth:{type:[String,Number],default:`100%`}},emits:[`user-position`,`scroll-start`,`scroll-end`],setup(e,{expose:t,emit:i}){let a=e;(0,n.provide)(`emit`,i);let s=(0,n.ref)(null),c=(0,n.computed)(()=>({width:typeof a.scrollerWidth==`number`?`${a.scrollerWidth}px`:a.scrollerWidth,height:typeof a.scrollerHeight==`number`?`${a.scrollerHeight}px`:a.scrollerHeight}));(0,n.watch)(a,()=>{p()},{deep:!0,immediate:!0});function l(){s.value&&s.value.scrollToBottom()}function u(e){s.value&&s.value.scrollToItem(e)}function d(){s.value&&(a.dynamic?s.value.dynamicScrollerUpdateItems():s.value._updateVisibleItems(!0))}function f(){s.value&&(a.dynamic?s.value.dynamicScrollerUpdateItemsFromBottom():s.value._updateVisibleItems(!1,!0))}function p(){a.dynamic&&!a.minItemSize&&console.error(`scroller error: 'minItemSize' is required on 'dynamic' mode.`),!a.dynamic&&!a.itemSize&&console.error(`scroller error: 'itemSize' is required.`)}return t({scrollToBottom:l,scrollToItem:u,updateItems:d,updateItemsFromBottom:f}),(t,i)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.dynamic?o:r),{ref_key:`scroller`,ref:s,"data-qa":`dt-scroller`,items:e.items,"item-size":e.itemSize,"min-item-size":e.minItemSize,buffer:e.buffer,direction:e.direction,"key-field":e.keyField,"list-tag":e.listTag,"item-tag":e.itemTag,style:(0,n.normalizeStyle)(c.value),tabindex:`0`,onUserPosition:i[0]||(i[0]=e=>t.$emit(`user-position`,e)),onScrollStart:i[1]||(i[1]=e=>t.$emit(`scroll-start`)),onScrollEnd:i[2]||(i[2]=e=>t.$emit(`scroll-end`))},(0,n.createSlots)({default:(0,n.withCtx)(({item:e,index:r,active:i})=>[(0,n.renderSlot)(t.$slots,`default`,(0,n.normalizeProps)((0,n.guardReactiveProps)({item:e,index:r,active:i})))]),_:2},[t.$slots.before?{name:`before`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`before`)]),key:`0`}:void 0,t.$slots.empty?{name:`empty`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`empty`)]),key:`1`}:void 0,t.$slots.after?{name:`after`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`after`)]),key:`2`}:void 0]),1064,[`items`,`item-size`,`min-item-size`,`buffer`,`direction`,`key-field`,`list-tag`,`item-tag`,`style`]))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
2
+ //# sourceMappingURL=Scroller-BUtC5Z7j.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Scroller-De7jdCyq.js","names":["$slots","$emit","$slots"],"sources":["../components/Scroller/Modules/CoreScroller.vue","../components/Scroller/Modules/ScrollerItem.vue","../components/Scroller/Modules/DynamicScroller.vue","../components/Scroller/Scroller.vue"],"sourcesContent":["<!-- eslint-disable max-len -->\n<template>\n <div\n ref=\"scroller\"\n class=\"vue-recycle-scroller\"\n :class=\"{\n ready,\n [`direction-${direction}`]: true,\n }\"\n @scroll.passive=\"handleScroll\"\n >\n <div\n v-if=\"$slots.before\"\n ref=\"before\"\n data-qa=\"dt-scroller-before\"\n class=\"vue-recycle-scroller__slot\"\n >\n <!-- @slot Content rendered before the items, inside the scroll viewport. Scrolls with the list. -->\n <slot name=\"before\" />\n </div>\n\n <component\n :is=\"listTag\"\n ref=\"wrapper\"\n :style=\"{ [direction === 'vertical' ? 'minHeight' : 'minWidth']: `${totalSize}px` }\"\n data-qa=\"dt-scroller-item-wrapper\"\n class=\"vue-recycle-scroller__item-wrapper\"\n :class=\"listClass\"\n >\n <component\n :is=\"itemTag\"\n v-for=\"view in pool\"\n :key=\"view.nr.id\"\n data-qa=\"dt-scroller-item\"\n :style=\"ready ? {\n transform: `translate${direction === 'vertical' ? 'Y' : 'X'}(${view.position}px) translate${direction === 'vertical' ? 'X' : 'Y'}(${view.offset}px)`,\n width: undefined,\n height: undefined,\n } : null\"\n class=\"vue-recycle-scroller__item-view\"\n :class=\"[\n itemClass,\n {\n hover: props.enableHover && hoverKey === view.nr.key,\n },\n ]\"\n v-on=\"props.enableHover ? {\n mouseenter: () => { hoverKey = view.nr.key },\n mouseleave: () => { hoverKey = null },\n } : {}\"\n >\n <slot\n :item=\"view.item\"\n :index=\"view.nr.index\"\n :active=\"view.nr.used\"\n />\n </component>\n\n <!-- @slot Content rendered inside the list wrapper only while the list is empty. -->\n <slot\n v-if=\"!items.length\"\n name=\"empty\"\n />\n </component>\n\n <div\n v-if=\"$slots.after\"\n ref=\"after\"\n data-qa=\"dt-scroller-after\"\n class=\"vue-recycle-scroller__slot\"\n >\n <!-- @slot Content rendered after the items, inside the scroll viewport. Scrolls with the list. -->\n <slot name=\"after\" />\n </div>\n </div>\n</template>\n\n<script setup>\n/*\nThis is a code from external library (https://github.com/Akryum/vue-virtual-scroller/blob/master/packages/vue-virtual-scroller/src/components/RecycleScroller.vue)\nWe have modified it for our own specific use.\n*/\nimport { computed, watch, markRaw, shallowReactive, onMounted, nextTick, reactive, ref } from 'vue';\n\nconst props = defineProps({\n /**\n * List of items you want to display in the scroller.\n */\n items: {\n type: Array,\n required: true,\n },\n\n /**\n *\n * Field used to identify items and optimize managing rendered views\n */\n keyField: {\n type: String,\n default: 'id',\n },\n\n /**\n * Direction of the scroller. Can be either `vertical` or `horizontal`.\n */\n direction: {\n type: String,\n default: 'vertical',\n validator: (value) => ['vertical', 'horizontal'].includes(value),\n },\n\n /**\n * Size of the items in the list.\n * If it is set to null (the default value), it will use variable size mode.\n */\n itemSize: {\n type: Number,\n default: null,\n },\n\n /**\n * Minimum size used if the height (or width in horizontal mode) of an item is unknown.\n */\n minItemSize: {\n type: [Number, String],\n default: null,\n },\n\n /**\n * Field used to get the item's size in variable size mode.\n */\n sizeField: {\n type: String,\n default: 'size',\n },\n\n /**\n * Amount of pixel to add to edges of the scrolling visible area to start rendering items further away.\n */\n buffer: {\n type: Number,\n default: 200,\n },\n\n /**\n * Enables hover state CSS class and mouse events on items.\n * Set to false if you want to manage hover state yourself.\n */\n enableHover: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The element to render as the list's wrapper.\n */\n listTag: {\n type: String,\n default: 'div',\n },\n\n /**\n * The element to render as the list item.\n */\n itemTag: {\n type: String,\n default: 'div',\n },\n\n /**\n * The custom classes added to the item list wrapper.\n */\n listClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * The custom classes added to each item.\n */\n itemClass: {\n type: [String, Object, Array],\n default: '',\n },\n});\n\nconst emit = defineEmits(['user-position', 'scroll-start', 'scroll-end']);\n\nconst views = reactive(new Map());\n// const reactiveItems = reactive(props.items);\nconst unusedViews = reactive(new Map());\nconst updateTimeout = null;\nconst pool = ref([]);\nconst hoverKey = ref(null);\nconst ready = ref(false);\nconst scroller = ref(null);\nconst before = ref(null);\nconst after = ref(null);\nconst userPosition = ref('blockStart');\n\nlet startIndex = 0;\nlet endIndex = 0;\nlet scrollDirty = false;\nlet lastUpdateScrollPosition = 0;\nlet sortTimer = null;\nlet computedMinItemSize = null;\nlet totalSize = 0;\nlet uid = 0;\n\nconst sizes = computed(() => {\n if (props.itemSize === null) {\n const sizes = {\n '-1': { accumulator: 0 },\n };\n const items = props.items;\n const field = props.sizeField;\n const minItemSize = props.minItemSize;\n let computedMinSize = 10000;\n let accumulator = 0;\n let current;\n for (let i = 0, l = items.length; i < l; i++) {\n current = items[i][field] || minItemSize;\n if (current < computedMinSize) {\n computedMinSize = current;\n }\n accumulator += current;\n sizes[i] = { accumulator, size: current };\n }\n\n computedMinItemSize = computedMinSize;\n return sizes;\n }\n return [];\n});\n\nconst simpleArray = computed(() => {\n return props.items.length && typeof props.items[0] !== 'object';\n});\n\nconst itemIndexByKey = computed(() => {\n const result = {};\n for (let i = 0, l = props.items.length; i < l; i++) {\n result[props.items[i][props.keyField]] = i;\n }\n return result;\n});\n\n// watch(reactiveItems, () => {\n// // if add to the top\n// // _updateVisibleItems(true);\n// // if autoscrolling if add to the bottom\n// // _updateVisibleItems(false, true);\n// });\n\nwatch(sizes, () => {\n _updateVisibleItems(false);\n}, { deep: true });\n\nonMounted(() => {\n nextTick(() => {\n // In SSR mode, render the real number of visible items\n _updateVisibleItems(true);\n ready.value = true;\n });\n});\n\nconst _addView = (pool, index, item, key, type) => {\n const nr = markRaw({\n id: uid++,\n index,\n used: true,\n key,\n type,\n });\n const view = shallowReactive({\n item,\n position: 0,\n nr,\n });\n pool.value.push(view);\n return view;\n};\n\nconst _unuseView = (view, fake = false) => {\n const _unusedViews = unusedViews;\n const type = view.nr.type;\n let unusedPool = _unusedViews.get(type);\n if (!unusedPool) {\n unusedPool = [];\n _unusedViews.set(type, unusedPool);\n }\n unusedPool.push(view);\n if (!fake) {\n view.nr.used = false;\n view.position = -9999;\n }\n};\n\nconst _getScroll = () => {\n const isVertical = props.direction === 'vertical';\n let scrollState;\n\n if (isVertical) {\n scrollState = {\n start: scroller.value.scrollTop,\n end: scroller.value.scrollTop + scroller.value.clientHeight,\n };\n } else {\n scrollState = {\n start: scroller.value.scrollLeft,\n end: scroller.value.scrollLeft + scroller.value.clientWidth,\n };\n }\n\n return scrollState;\n};\n\nconst _itemsLimitError = () => {\n setTimeout(() => {\n \n console.error('It seems the scroller element isn\\'t scrolling, so it tries to render all the items at once.', 'Scroller:', scroller);\n \n console.error('Make sure the scroller has a fixed height (or width) and \\'overflow-y\\' (or \\'overflow-x\\') set to \\'auto\\' so it can scroll correctly and only render the items visible in the scroll viewport.');\n });\n throw new Error('Rendered items limit reached');\n};\n\nconst _sortViews = () => {\n pool.value.sort((viewA, viewB) => viewA.nr.index - viewB.nr.index);\n};\n\nconst _updateVisibleItems = (checkItem, checkPositionDiff = false) => {\n const itemSize = props.itemSize;\n const minItemSize = computedMinItemSize;\n const keyField = simpleArray.value ? null : props.keyField;\n const items = props.items;\n const count = items.length;\n const _sizes = sizes.value;\n const _views = views;\n const _unusedViews = unusedViews;\n const _pool = pool;\n const _itemIndexByKey = itemIndexByKey;\n let _startIndex, _endIndex;\n let _totalSize;\n let visibleStartIndex, visibleEndIndex;\n\n if (!count) {\n _startIndex = _endIndex = visibleStartIndex = visibleEndIndex = _totalSize = 0;\n } else {\n const scroll = _getScroll();\n\n // Skip update if use hasn't scrolled enough\n if (checkPositionDiff) {\n let positionDiff = scroll.start - lastUpdateScrollPosition.value;\n if (positionDiff < 0) positionDiff = -positionDiff;\n if ((itemSize === null && positionDiff < minItemSize.value) || positionDiff < itemSize) {\n return {\n continuous: true,\n };\n }\n }\n lastUpdateScrollPosition = scroll.start;\n\n const _buffer = props.buffer;\n scroll.start -= _buffer;\n scroll.end += _buffer;\n\n // The leading and trailing slots sit in normal flow inside the viewport, so the item\n // wrapper does not start at offset 0. Widen the window by their measured size.\n const slotSize = props.direction === 'vertical' ? 'scrollHeight' : 'scrollWidth';\n if (before.value) scroll.start -= before.value[slotSize];\n if (after.value) scroll.end += after.value[slotSize];\n\n // Variable size mode\n if (itemSize === null) {\n let h;\n let a = 0;\n let b = count - 1;\n let i = ~~(count / 2);\n let oldI;\n\n // Searching for _startIndex\n do {\n oldI = i;\n h = _sizes[i]?.accumulator;\n if (h < scroll.start) {\n a = i;\n } else if (i < count - 1 && _sizes[i + 1]?.accumulator > scroll.start) {\n b = i;\n }\n i = ~~((a + b) / 2);\n } while (i !== oldI);\n i < 0 && (i = 0);\n _startIndex = i;\n\n // For container style\n _totalSize = _sizes[count - 1]?.accumulator;\n\n // Searching for _endIndex\n for (\n _endIndex = i;\n _endIndex < count && _sizes[_endIndex]?.accumulator < scroll.end;\n _endIndex++\n );\n\n if (_endIndex === -1) {\n _endIndex = items.length - 1;\n } else {\n _endIndex++;\n // Bounds\n _endIndex > count && (_endIndex = count);\n }\n\n // search visible _startIndex\n for (\n visibleStartIndex = startIndex;\n visibleStartIndex < count && (_sizes[visibleStartIndex]?.accumulator) < scroll.start;\n visibleStartIndex++\n );\n\n // search visible endIndex\n for (\n visibleEndIndex = visibleStartIndex;\n visibleEndIndex < count && (_sizes[visibleEndIndex]?.accumulator) < scroll.end;\n visibleEndIndex++\n );\n } else {\n // Fixed size mode\n _startIndex = ~~(scroll.start / itemSize);\n const remainer = _startIndex % 1;\n _startIndex -= remainer;\n _endIndex = Math.ceil(scroll.end / itemSize);\n visibleStartIndex = Math.max(0, Math.floor((scroll.start) / itemSize));\n visibleEndIndex = Math.floor((scroll.end) / itemSize);\n\n // Bounds\n _startIndex < 0 && (_startIndex = 0);\n _endIndex > count && (_endIndex = count);\n visibleStartIndex < 0 && (visibleStartIndex = 0);\n visibleEndIndex > count && (visibleEndIndex = count);\n\n _totalSize = Math.ceil(count / 1) * itemSize;\n }\n }\n\n // items limit 1000\n if (_endIndex - _startIndex > 1000) {\n _itemsLimitError();\n }\n\n totalSize = _totalSize;\n\n let view;\n\n const continuous = _startIndex <= endIndex && _endIndex >= _startIndex;\n\n // Unuse views that are no longer visible\n if (continuous) {\n for (let i = 0, l = _pool.value.length; i < l; i++) {\n view = _pool.value[i];\n if (view?.nr.used) {\n // Update view item index\n if (checkItem) {\n view.nr.index = _itemIndexByKey[view.item[keyField]];\n }\n\n // Check if index is still in visible range\n if (\n view.nr.index == null ||\n view.nr.index < _startIndex ||\n view.nr.index >= _endIndex\n ) {\n _unuseView(view);\n }\n }\n }\n }\n\n const unusedIndex = continuous ? null : new Map();\n\n let item, type;\n let v;\n for (let i = _startIndex; i < _endIndex; i++) {\n item = items[i];\n const key = keyField ? item?.[keyField] : item;\n\n if (key == null) {\n throw new Error(`Key is ${key} on item (keyField is '${keyField}')`);\n }\n view = _views.get(key);\n\n if (!itemSize && !_sizes[i]?.size) {\n if (view) _unuseView(view);\n continue;\n }\n\n type = item.type;\n\n let unusedPool = _unusedViews.get(type);\n let newlyUsedView = false;\n\n // No view assigned to item\n if (!view) {\n if (continuous) {\n // Reuse existing view\n if (unusedPool && unusedPool.length) {\n view = unusedPool.pop();\n } else {\n view = _addView(_pool, i, item, key, type);\n }\n } else {\n // Use existing view\n // We don't care if they are already used\n // because we are not in continous scrolling\n v = unusedIndex.get(type) || 0;\n\n if (!unusedPool || v >= unusedPool.length) {\n view = _addView(_pool, i, item, key, type);\n _unuseView(view, true);\n unusedPool = _unusedViews.get(type);\n }\n\n view = unusedPool[v];\n unusedIndex.set(type, v + 1);\n }\n\n // Assign view to item\n _views.delete(view.nr.key);\n view.nr.used = true;\n view.nr.index = i;\n view.nr.key = key;\n view.nr.type = type;\n _views.set(key, view);\n\n newlyUsedView = true;\n } else {\n // View already assigned to item\n if (!view.nr.used) {\n view.nr.used = true;\n newlyUsedView = true;\n if (unusedPool) {\n const index = unusedPool.indexOf(view);\n if (index !== -1) unusedPool.splice(index, 1);\n }\n }\n }\n\n // Always set item in case it's a new object with the same key\n view.item = item;\n\n if (newlyUsedView) {\n if (i === items.length - 1) emit('scroll-end');\n if (i === 0) emit('scroll-start');\n }\n\n // Update position\n if (itemSize === null) {\n view.position = _sizes[i - 1]?.accumulator;\n view.offset = 0;\n } else {\n view.position = Math.floor(i) * itemSize;\n view.offset = (i % 1) * itemSize;\n }\n }\n\n startIndex = _startIndex;\n endIndex = _endIndex;\n\n // After the user has finished scrolling\n // Sort views so text selection is correct\n clearTimeout(sortTimer);\n sortTimer = setTimeout(_sortViews, 300);\n\n return {\n continuous,\n };\n};\n\nconst _scrollToPosition = (position) => {\n const direction = props.direction === 'vertical'\n ? { scroll: 'scrollTop', start: 'top' }\n : { scroll: 'scrollLeft', start: 'left' };\n\n const viewport = scroller.value;\n const scrollDirection = direction.scroll;\n\n viewport[scrollDirection] = position;\n};\n\nconst scrollToItem = (index) => {\n let scroll;\n if (props.itemSize === null) {\n scroll = index > 0 ? sizes.value[index - 1]?.accumulator : 0;\n } else {\n scroll = Math.floor(index) * props.itemSize;\n }\n _scrollToPosition(scroll);\n};\n\nconst handleScroll = () => {\n const container = scroller.value;\n\n if (userPosition.value !== 'middle') {\n userPosition.value = 'middle';\n emit('user-position', 'middle');\n }\n\n // Check if the scroll is at the block-start (aka top) of the container\n if (container.scrollTop === 0) {\n userPosition.value = 'blockStart';\n emit('user-position', 'blockStart');\n emit('user-position', 'top');\n }\n\n // Check if the scroll is at the block-end (aka bottom) of the container\n if (container.scrollTop + container.clientHeight === container.scrollHeight) {\n userPosition.value = 'blockEnd';\n emit('user-position', 'blockEnd');\n emit('user-position', 'bottom');\n }\n\n if (!scrollDirty) {\n scrollDirty = true;\n if (updateTimeout) return;\n\n const requestUpdate = () => requestAnimationFrame(() => {\n scrollDirty = false;\n _updateVisibleItems(false, true);\n });\n\n requestUpdate();\n }\n};\n\ndefineExpose({\n scrollToItem,\n _updateVisibleItems,\n});\n</script>\n","<script>\n/*\nThis is a code from external library (https://github.com/Akryum/vue-virtual-scroller/blob/master/packages/vue-virtual-scroller/src/components/DynamicScrollerItem.vue)\nWe have modified it for our own specific use.\n*/\nimport { h } from 'vue';\nimport { returnFirstEl } from '@/common/utils';\n\nexport default {\n name: 'DtScrollerItem',\n\n inject: [\n 'vscrollData',\n 'vscrollParent',\n 'vscrollResizeObserver',\n ],\n\n props: {\n // eslint-disable-next-line vue/require-prop-types\n item: {\n required: true,\n },\n\n watchData: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Indicates if the view is actively used to display an item.\n */\n active: {\n type: Boolean,\n required: true,\n },\n\n index: {\n type: Number,\n default: undefined,\n },\n\n sizeDependencies: {\n type: [Array, Object],\n default: null,\n },\n\n tag: {\n type: String,\n default: 'div',\n },\n },\n\n computed: {\n id () {\n if (this.vscrollData.simpleArray) return this.index;\n \n if (this.vscrollData.keyField in this.item) return this.item[this.vscrollData.keyField];\n throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`);\n },\n\n size () {\n return this.vscrollData.sizes[this.id] || 0;\n },\n\n finalActive () {\n return this.active && this.vscrollData.active;\n },\n },\n\n watch: {\n watchData: 'updateWatchData',\n\n id (value, oldValue) {\n returnFirstEl(this.$el).$_vs_id = this.id;\n if (!this.size) {\n this.onDataUpdate();\n }\n\n if (this.$_sizeObserved) {\n // In case the old item had the same size, it won't trigger the ResizeObserver\n // since we are reusing the same DOM node\n const oldSize = this.vscrollData.sizes[oldValue];\n const size = this.vscrollData.sizes[value];\n if (oldSize != null && oldSize !== size) {\n this.applySize(oldSize);\n }\n }\n },\n\n finalActive (value) {\n if (!this.size) {\n if (value) {\n if (!this.vscrollParent.$_undefinedMap[this.id]) {\n this.vscrollParent.$_undefinedSizes++;\n this.vscrollParent.$_undefinedMap[this.id] = true;\n }\n } else {\n if (this.vscrollParent.$_undefinedMap[this.id]) {\n this.vscrollParent.$_undefinedSizes--;\n this.vscrollParent.$_undefinedMap[this.id] = false;\n }\n }\n }\n\n if (this.vscrollResizeObserver) {\n if (value) {\n this.observeSize();\n } else {\n this.unobserveSize();\n }\n } else if (value && this.$_pendingVScrollUpdate === this.id) {\n this.updateSize();\n }\n },\n },\n\n created () {\n if (this.$isServer) return;\n\n this.$_forceNextVScrollUpdate = null;\n this.updateWatchData();\n\n if (!this.vscrollResizeObserver) {\n for (const k in this.sizeDependencies) {\n this.$watch(() => this.sizeDependencies[k], this.onDataUpdate);\n }\n }\n },\n\n mounted () {\n if (this.finalActive) {\n this.updateSize();\n this.observeSize();\n }\n },\n\n beforeUnmount () {\n this.unobserveSize();\n },\n\n methods: {\n updateSize () {\n if (this.finalActive) {\n if (this.$_pendingSizeUpdate !== this.id) {\n this.$_pendingSizeUpdate = this.id;\n this.$_forceNextVScrollUpdate = null;\n this.$_pendingVScrollUpdate = null;\n this.computeSize(this.id);\n }\n } else {\n this.$_forceNextVScrollUpdate = this.id;\n }\n },\n\n updateWatchData () {\n if (this.watchData && !this.vscrollResizeObserver) {\n this.$_watchData = this.$watch('item', () => {\n this.onDataUpdate();\n }, {\n deep: true,\n });\n } else if (this.$_watchData) {\n this.$_watchData();\n this.$_watchData = null;\n }\n },\n\n onVscrollUpdate ({ force }) {\n // If not active, sechedule a size update when it becomes active\n if (!this.finalActive && force) {\n this.$_pendingVScrollUpdate = this.id;\n }\n\n if (this.$_forceNextVScrollUpdate === this.id || force || !this.size) {\n this.updateSize();\n }\n },\n\n onDataUpdate () {\n this.updateSize();\n },\n\n computeSize (id) {\n this.$nextTick(() => {\n if (this.id === id) {\n const width = returnFirstEl(this.$el).offsetWidth;\n const height = returnFirstEl(this.$el).offsetHeight;\n this.applyWidthHeight(width, height);\n }\n this.$_pendingSizeUpdate = null;\n });\n },\n\n applyWidthHeight (width, height) {\n const size = ~~(this.vscrollParent.direction === 'vertical' ? height : width);\n if (size && this.size !== size) {\n this.applySize(size);\n }\n },\n\n applySize (size) {\n if (this.vscrollParent.$_undefinedMap[this.id]) {\n this.vscrollParent.$_undefinedSizes--;\n this.vscrollParent.$_undefinedMap[this.id] = undefined;\n }\n this.vscrollData.sizes[this.id] = size;\n },\n\n observeSize () {\n if (!this.vscrollResizeObserver) return;\n if (this.$_sizeObserved) return;\n this.vscrollResizeObserver.observe(returnFirstEl(this.$el));\n this.$el.$_vs_id = this.id;\n this.$el.$_vs_onResize = this.onResize;\n this.$_sizeObserved = true;\n },\n\n unobserveSize () {\n if (!this.vscrollResizeObserver) return;\n if (!this.$_sizeObserved) return;\n this.vscrollResizeObserver.unobserve(returnFirstEl(this.$el));\n this.$el.$_vs_onResize = undefined;\n this.$_sizeObserved = false;\n },\n\n onResize (id, width, height) {\n if (this.id === id) {\n this.applyWidthHeight(width, height);\n }\n },\n },\n\n render () {\n return h(this.tag, this.$slots.default());\n },\n};\n</script>\n","<template>\n <core-scroller\n ref=\"scroller\"\n :items=\"itemsWithSize\"\n :min-item-size=\"minItemSize\"\n :direction=\"direction\"\n :key-field=\"keyField\"\n :list-tag=\"listTag\"\n :item-tag=\"itemTag\"\n v-bind=\"$attrs\"\n >\n <template\n #default=\"{ item: itemWithSize, index, active }\"\n >\n <dt-scroller-item\n :item=\"itemWithSize\"\n :active=\"active\"\n :size-dependencies=\"[\n itemWithSize.message,\n ]\"\n :data-index=\"index\"\n >\n <slot\n v-bind=\"{\n item: itemWithSize.item,\n index,\n active,\n itemWithSize,\n }\"\n />\n </dt-scroller-item>\n </template>\n\n <template\n v-if=\"$slots.before\"\n #before\n >\n <slot name=\"before\" />\n </template>\n\n <template\n v-if=\"$slots.empty\"\n #empty\n >\n <slot name=\"empty\" />\n </template>\n\n <template\n v-if=\"$slots.after\"\n #after\n >\n <slot name=\"after\" />\n </template>\n </core-scroller>\n</template>\n\n<!-- eslint-disable-next-line max-len -->\n<!-- This is a code from external library (https://github.com/Akryum/vue-virtual-scroller/blob/master/packages/vue-virtual-scroller/src/components/DynamicScroller.vue)\nWe have modified it for our own specific use. -->\n<script>\nimport CoreScroller from './CoreScroller.vue';\nimport DtScrollerItem from './ScrollerItem.vue';\nimport { returnFirstEl } from '@/common/utils';\n\nexport default {\n name: 'DynamicScroller',\n\n components: {\n CoreScroller,\n DtScrollerItem,\n },\n\n provide () {\n if (typeof ResizeObserver !== 'undefined') {\n this.$_resizeObserver = new ResizeObserver(entries => {\n requestAnimationFrame(() => {\n if (!Array.isArray(entries)) {\n return;\n }\n for (const entry of entries) {\n if (entry.target && entry.target.$_vs_onResize) {\n let width, height;\n if (entry.borderBoxSize) {\n const resizeObserverSize = entry.borderBoxSize[0];\n width = resizeObserverSize.inlineSize;\n height = resizeObserverSize.blockSize;\n } else {\n // @TODO remove when contentRect is deprecated\n width = entry.contentRect.width;\n height = entry.contentRect.height;\n }\n entry.target.$_vs_onResize(entry.target.$_vs_id, width, height);\n }\n }\n });\n });\n }\n\n return {\n vscrollData: this.vscrollData,\n vscrollParent: this,\n vscrollResizeObserver: this.$_resizeObserver,\n };\n },\n\n inheritAttrs: false,\n\n props: {\n /*\n * The items to render.\n * If the items are simple arrays, the index will be used as the key.\n * If the items are objects, the keyField will be used as the key.\n */\n items: {\n type: Array,\n required: true,\n },\n\n /*\n * Indicates if the items are dynamic.\n * If true, the items will be wrapped in a DtScrollerItem component.\n * This is required for dynamic items to be able to react to changes in their size.\n */\n dynamic: {\n type: Boolean,\n default: false,\n },\n\n /*\n * The key field to use for the items.\n * Only used if the items are objects.\n */\n keyField: {\n type: String,\n default: 'id',\n },\n\n /*\n * The direction of the scroller.\n * Can be either 'vertical' or 'horizontal'.\n */\n direction: {\n type: String,\n default: 'vertical',\n validator: (value) => ['vertical', 'horizontal'].includes(value),\n },\n\n /*\n * The tag to use for the list.\n */\n listTag: {\n type: String,\n default: 'div',\n },\n\n /*\n * The tag to use for the items.\n */\n itemTag: {\n type: String,\n default: 'div',\n },\n\n /*\n * Display height (or width in horizontal mode) of the items in pixels\n * used to calculate the scroll size and position.\n * Is required for the initial render of items in DYNAMIC size mode.\n */\n minItemSize: {\n type: [Number, String],\n },\n },\n\n data () {\n return {\n vscrollData: {\n active: true,\n sizes: {},\n keyField: this.keyField,\n simpleArray: false,\n },\n };\n },\n\n computed: {\n simpleArray () {\n return this.items.length && typeof this.items[0] !== 'object';\n },\n\n itemsWithSize () {\n const result = [];\n const { items, keyField, simpleArray } = this;\n const sizes = this.vscrollData.sizes;\n const l = items.length;\n for (let i = 0; i < l; i++) {\n const item = items[i];\n const id = simpleArray ? i : item[keyField];\n let size = sizes[id];\n if (typeof size === 'undefined' && !this.$_undefinedMap[id]) {\n size = 0;\n }\n result.push({\n item,\n [keyField]: id,\n size,\n });\n }\n return result;\n },\n },\n\n watch: {\n simpleArray: {\n handler (value) {\n this.vscrollData.simpleArray = value;\n },\n\n immediate: true,\n },\n\n itemsWithSize (next, prev) {\n const scrollTop = returnFirstEl(this.$el).scrollTop;\n\n // Calculate total diff between prev and next sizes\n // over current scroll top. Then add it to scrollTop to\n // avoid jumping the contents that the user is seeing.\n let prevActiveTop = 0; let activeTop = 0;\n const length = Math.min(next.length, prev.length);\n for (let i = 0; i < length; i++) {\n if (prevActiveTop >= scrollTop) {\n break;\n }\n prevActiveTop += prev[i].size || this.minItemSize;\n activeTop += next[i].size || this.minItemSize;\n }\n const offset = activeTop - prevActiveTop;\n\n if (offset === 0) {\n return;\n }\n\n returnFirstEl(this.$el).scrollTop += offset;\n },\n },\n\n beforeCreate () {\n this.$_updates = [];\n this.$_undefinedSizes = 0;\n this.$_undefinedMap = {};\n },\n\n activated () {\n this.vscrollData.active = true;\n },\n\n deactivated () {\n this.vscrollData.active = false;\n },\n\n methods: {\n dynamicScrollerUpdateItems () {\n const scroller = this.$refs.scroller;\n if (scroller) scroller._updateVisibleItems(true);\n },\n\n dynamicScrollerUpdateItemsFromBottom () {\n const scroller = this.$refs.scroller;\n if (scroller) scroller._updateVisibleItems(false, true);\n },\n\n scrollToItem (index) {\n const scroller = this.$refs.scroller;\n if (scroller) scroller.scrollToItem(index);\n },\n\n scrollToBottom () {\n if (this.$_scrollingToBottom) return;\n this.$_scrollingToBottom = true;\n const el = returnFirstEl(this.$el);\n // Item is inserted to the DOM\n this.$nextTick(() => {\n el.scrollTop = el.scrollHeight + 5000;\n // Item sizes are computed\n const cb = () => {\n el.scrollTop = el.scrollHeight + 5000;\n requestAnimationFrame(() => {\n el.scrollTop = el.scrollHeight + 5000;\n if (this.$_undefinedSizes === 0) {\n this.$_scrollingToBottom = false;\n } else {\n requestAnimationFrame(cb);\n }\n });\n };\n requestAnimationFrame(cb);\n });\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"dynamic ? DynamicScroller : CoreScroller\"\n ref=\"scroller\"\n data-qa=\"dt-scroller\"\n :items=\"items\"\n :item-size=\"itemSize\"\n :min-item-size=\"minItemSize\"\n :buffer=\"buffer\"\n :direction=\"direction\"\n :key-field=\"keyField\"\n :list-tag=\"listTag\"\n :item-tag=\"itemTag\"\n :style=\"computedStyle\"\n tabindex=\"0\"\n @user-position=\"$emit('user-position', $event)\"\n @scroll-start=\"$emit('scroll-start')\"\n @scroll-end=\"$emit('scroll-end')\"\n >\n <template\n #default=\"{ item, index, active }\"\n >\n <slot\n v-bind=\"{\n item: item,\n index,\n active,\n }\"\n />\n </template>\n\n <template\n v-if=\"$slots.before\"\n #before\n >\n <!-- @slot Content rendered before the items, inside the scroll viewport. Scrolls with the list. -->\n <slot name=\"before\" />\n </template>\n\n <template\n v-if=\"$slots.empty\"\n #empty\n >\n <!-- @slot Content rendered inside the list wrapper only while the list is empty. -->\n <slot name=\"empty\" />\n </template>\n\n <template\n v-if=\"$slots.after\"\n #after\n >\n <!-- @slot Content rendered after the items, inside the scroll viewport. Scrolls with the list. -->\n <slot name=\"after\" />\n </template>\n </component>\n</template>\n\n<script setup>\nimport CoreScroller from './Modules/CoreScroller.vue';\nimport DynamicScroller from './Modules/DynamicScroller.vue';\nimport { provide, computed, watch, ref } from 'vue';\n\ndefineOptions({\n name: 'DtScroller',\n});\n\nconst props = defineProps({\n /**\n * Amount of pixels added to each edge of the scroll viewport, so items are rendered\n * before they scroll into view. Also controls how early `scroll-start` and `scroll-end`\n * fire relative to the viewport edges.\n */\n buffer: {\n type: Number,\n default: 200,\n },\n\n /**\n * The direction of the scroller.\n * @values vertical, horizontal\n */\n direction: {\n type: String,\n default: 'vertical',\n validator: (value) => ['vertical', 'horizontal'].includes(value),\n },\n\n /**\n * Indicates if the items need to react to changes in their size.\n * If disabled the itemSize prop is required and you will get improved performance.\n * If enabled the minItemSize prop is required and you\n * will have reduced performance but the ability to reactively size list items\n * @values true, false\n */\n dynamic: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Display height (or width in horizontal mode) of the items in pixels\n * used to calculate the scroll size and position.\n * Required if DYNAMIC is false\n */\n itemSize: {\n type: Number,\n default: null,\n },\n\n /**\n * The tag to use for the items.\n */\n itemTag: {\n type: String,\n default: 'div',\n },\n\n /**\n * The items to render.\n * If the items are simple arrays, the index will be used as the key.\n * If the items are objects, the keyField will be used as the key.\n * @example items: [ 'item1', 'item2', 'item3' ]\n * @example items: [ { id: 1, name: 'item1' }, { id: 2, name: 'item2' }, { id: 3, name: 'item3' } ]\n */\n items: {\n type: Array,\n required: true,\n },\n\n /**\n * The key field to use for the items.\n * If the items are objects, the scroller needs to be able to identify them.\n * By default it will look for an id field on the items.\n * This can be configured with this prop if you are using another field name.\n */\n keyField: {\n type: String,\n default: 'id',\n },\n\n /**\n * The tag to use for the list.\n */\n listTag: {\n type: String,\n default: 'div',\n },\n\n /**\n * Minimum size used if the height (or width in horizontal mode) of a item is unknown.\n * Is required for the initial render of items in DYNAMIC size mode.\n */\n minItemSize: {\n type: [Number, String],\n default: null,\n },\n\n /**\n * The height of the scroller.\n * Can be a number (in pixels) or a string (in CSS units).\n */\n scrollerHeight: {\n type: [String, Number],\n default: '100%',\n },\n\n /**\n * The width of the scroller.\n * Can be a number (in pixels) or a string (in CSS units).\n */\n scrollerWidth: {\n type: [String, Number],\n default: '100%',\n },\n});\n\nconst emits = defineEmits([\n /**\n * Describe when the scroller changes from block-start (aka top) / middle / block-end (aka bottom).\n * The top and bottom values are deprecated and will ideally be removed in the next major version.\n * Please use blockStart and blockEnd instead.\n * @param {string} position The position of the scroller.\n * @values blockStart, middle, blockEnd, top, bottom\n */\n 'user-position',\n\n /**\n * Emitted when the first item enters the rendered view pool. Fires at least one `buffer`\n * length before the viewport's start edge is reached (earlier still with `before` slot\n * content), so callers can prepend items ahead of time.\n */\n 'scroll-start',\n\n /**\n * Emitted when the last item enters the rendered view pool. Fires at least one `buffer`\n * length before the viewport's end edge is reached (earlier still with `after` slot\n * content), so callers can append items ahead of time.\n */\n 'scroll-end',\n]);\n\nprovide('emit', emits);\n\nconst scroller = ref(null);\n\nconst computedStyle = computed(() => {\n return {\n width: typeof props.scrollerWidth === 'number' ? `${props.scrollerWidth}px` : props.scrollerWidth,\n height: typeof props.scrollerHeight === 'number' ? `${props.scrollerHeight}px` : props.scrollerHeight,\n };\n});\n\nwatch(props, () => {\n validateProps();\n}, { deep: true, immediate: true });\n\nfunction scrollToBottom () {\n if (scroller.value) scroller.value.scrollToBottom();\n}\n\nfunction scrollToItem (index) {\n if (scroller.value) scroller.value.scrollToItem(index);\n}\n\nfunction updateItems () {\n if (!scroller.value) return;\n if (props.dynamic) {\n scroller.value.dynamicScrollerUpdateItems();\n } else {\n scroller.value._updateVisibleItems(true);\n }\n}\n\nfunction updateItemsFromBottom () {\n if (!scroller.value) return;\n if (props.dynamic) {\n scroller.value.dynamicScrollerUpdateItemsFromBottom();\n } else {\n scroller.value._updateVisibleItems(false, true);\n }\n}\n\nfunction validateProps () {\n if (props.dynamic && !props.minItemSize) {\n console.error('scroller error: \\'minItemSize\\' is required on \\'dynamic\\' mode.');\n }\n\n if (!props.dynamic && !props.itemSize) {\n console.error('scroller error: \\'itemSize\\' is required.');\n }\n}\n\ndefineExpose({\n scrollToBottom,\n scrollToItem,\n updateItems,\n updateItemsFromBottom,\n});\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoFA,IAAM,IAAQ,GAsGR,IAAO,GAEP,IAAQ,kBAAS,IAAI,KAAK,CAAC,EAE3B,IAAc,kBAAS,IAAI,KAAK,CAAC,EAEjC,IAAO,EAAI,EAAE,CAAC,EACd,IAAW,EAAI,KAAK,EACpB,IAAQ,EAAI,GAAM,EAClB,IAAW,EAAI,KAAK,EACpB,IAAS,EAAI,KAAK,EAClB,IAAQ,EAAI,KAAK,EACjB,IAAe,EAAI,aAAa,EAElC,IAAa,GACb,IAAW,GACX,IAAc,IACd,IAA2B,GAC3B,IAAY,MACZ,IAAsB,MACtB,IAAY,GACZ,IAAM,GAEJ,IAAQ,QAAe;AAC3B,OAAI,EAAM,aAAa,MAAM;IAC3B,IAAM,IAAQ,EACZ,MAAM,EAAE,aAAa,GAAG,EACzB,EACK,IAAQ,EAAM,OACd,IAAQ,EAAM,WACd,IAAc,EAAM,aACtB,IAAkB,KAClB,IAAc,GACd;AACJ,SAAK,IAAI,IAAI,GAAG,IAAI,EAAM,QAAQ,IAAI,GAAG,IAMvC,CALA,IAAU,EAAM,GAAG,MAAU,GACzB,IAAU,MACZ,IAAkB,IAEpB,KAAe,GACf,EAAM,KAAK;KAAE;KAAa,MAAM;KAAS;AAI3C,WADA,IAAsB,GACf;;AAET,UAAO,EAAE;IACT,EAEI,IAAc,QACX,EAAM,MAAM,UAAU,OAAO,EAAM,MAAM,MAAO,SACvD,EAEI,IAAiB,QAAe;GACpC,IAAM,IAAS,EAAE;AACjB,QAAK,IAAI,IAAI,GAAG,IAA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gB;IAAiB;;;;GASvDC,EAAAA,OAAO,SAAA;UACZ;gBAGqB,CAAtB,EAAsB,EAAA,QAAA,SAAA,CAAA,CAAA;;;GAIhBA,EAAAA,OAAO,QAAA;UACZ;gBAGoB,CAArB,EAAqB,EAAA,QAAA,QAAA,CAAA,CAAA;;;GAIfA,EAAAA,OAAO,QAAA;UACZ;gBAGoB,CAArB,EAAqB,EAAA,QAAA,QAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"Scroller-BUtC5Z7j.cjs","names":["$slots","$emit","$slots"],"sources":["../components/Scroller/Modules/CoreScroller.vue","../components/Scroller/Modules/ScrollerItem.vue","../components/Scroller/Modules/DynamicScroller.vue","../components/Scroller/Scroller.vue"],"sourcesContent":["<!-- eslint-disable max-len -->\n<template>\n <div\n ref=\"scroller\"\n class=\"vue-recycle-scroller\"\n :class=\"{\n ready,\n [`direction-${direction}`]: true,\n }\"\n @scroll.passive=\"handleScroll\"\n >\n <div\n v-if=\"$slots.before\"\n ref=\"before\"\n data-qa=\"dt-scroller-before\"\n class=\"vue-recycle-scroller__slot\"\n >\n <!-- @slot Content rendered before the items, inside the scroll viewport. Scrolls with the list. -->\n <slot name=\"before\" />\n </div>\n\n <component\n :is=\"listTag\"\n ref=\"wrapper\"\n :style=\"{ [direction === 'vertical' ? 'minHeight' : 'minWidth']: `${totalSize}px` }\"\n data-qa=\"dt-scroller-item-wrapper\"\n class=\"vue-recycle-scroller__item-wrapper\"\n :class=\"listClass\"\n >\n <component\n :is=\"itemTag\"\n v-for=\"view in pool\"\n :key=\"view.nr.id\"\n data-qa=\"dt-scroller-item\"\n :style=\"ready ? {\n transform: `translate${direction === 'vertical' ? 'Y' : 'X'}(${view.position}px) translate${direction === 'vertical' ? 'X' : 'Y'}(${view.offset}px)`,\n width: undefined,\n height: undefined,\n } : null\"\n class=\"vue-recycle-scroller__item-view\"\n :class=\"[\n itemClass,\n {\n hover: props.enableHover && hoverKey === view.nr.key,\n },\n ]\"\n v-on=\"props.enableHover ? {\n mouseenter: () => { hoverKey = view.nr.key },\n mouseleave: () => { hoverKey = null },\n } : {}\"\n >\n <slot\n :item=\"view.item\"\n :index=\"view.nr.index\"\n :active=\"view.nr.used\"\n />\n </component>\n\n <!-- @slot Content rendered inside the list wrapper only while the list is empty. -->\n <slot\n v-if=\"!items.length\"\n name=\"empty\"\n />\n </component>\n\n <div\n v-if=\"$slots.after\"\n ref=\"after\"\n data-qa=\"dt-scroller-after\"\n class=\"vue-recycle-scroller__slot\"\n >\n <!-- @slot Content rendered after the items, inside the scroll viewport. Scrolls with the list. -->\n <slot name=\"after\" />\n </div>\n </div>\n</template>\n\n<script setup>\n/*\nThis is a code from external library (https://github.com/Akryum/vue-virtual-scroller/blob/master/packages/vue-virtual-scroller/src/components/RecycleScroller.vue)\nWe have modified it for our own specific use.\n*/\nimport { computed, watch, markRaw, shallowReactive, onMounted, nextTick, reactive, ref } from 'vue';\n\nconst props = defineProps({\n /**\n * List of items you want to display in the scroller.\n */\n items: {\n type: Array,\n required: true,\n },\n\n /**\n *\n * Field used to identify items and optimize managing rendered views\n */\n keyField: {\n type: String,\n default: 'id',\n },\n\n /**\n * Direction of the scroller. Can be either `vertical` or `horizontal`.\n */\n direction: {\n type: String,\n default: 'vertical',\n validator: (value) => ['vertical', 'horizontal'].includes(value),\n },\n\n /**\n * Size of the items in the list.\n * If it is set to null (the default value), it will use variable size mode.\n */\n itemSize: {\n type: Number,\n default: null,\n },\n\n /**\n * Minimum size used if the height (or width in horizontal mode) of an item is unknown.\n */\n minItemSize: {\n type: [Number, String],\n default: null,\n },\n\n /**\n * Field used to get the item's size in variable size mode.\n */\n sizeField: {\n type: String,\n default: 'size',\n },\n\n /**\n * Amount of pixel to add to edges of the scrolling visible area to start rendering items further away.\n */\n buffer: {\n type: Number,\n default: 200,\n },\n\n /**\n * Enables hover state CSS class and mouse events on items.\n * Set to false if you want to manage hover state yourself.\n */\n enableHover: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The element to render as the list's wrapper.\n */\n listTag: {\n type: String,\n default: 'div',\n },\n\n /**\n * The element to render as the list item.\n */\n itemTag: {\n type: String,\n default: 'div',\n },\n\n /**\n * The custom classes added to the item list wrapper.\n */\n listClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * The custom classes added to each item.\n */\n itemClass: {\n type: [String, Object, Array],\n default: '',\n },\n});\n\nconst emit = defineEmits(['user-position', 'scroll-start', 'scroll-end']);\n\nconst views = reactive(new Map());\n// const reactiveItems = reactive(props.items);\nconst unusedViews = reactive(new Map());\nconst updateTimeout = null;\nconst pool = ref([]);\nconst hoverKey = ref(null);\nconst ready = ref(false);\nconst scroller = ref(null);\nconst before = ref(null);\nconst after = ref(null);\nconst userPosition = ref('blockStart');\n\nlet startIndex = 0;\nlet endIndex = 0;\nlet scrollDirty = false;\nlet lastUpdateScrollPosition = 0;\nlet sortTimer = null;\nlet computedMinItemSize = null;\nlet totalSize = 0;\nlet uid = 0;\n\nconst sizes = computed(() => {\n if (props.itemSize === null) {\n const sizes = {\n '-1': { accumulator: 0 },\n };\n const items = props.items;\n const field = props.sizeField;\n const minItemSize = props.minItemSize;\n let computedMinSize = 10000;\n let accumulator = 0;\n let current;\n for (let i = 0, l = items.length; i < l; i++) {\n current = items[i][field] || minItemSize;\n if (current < computedMinSize) {\n computedMinSize = current;\n }\n accumulator += current;\n sizes[i] = { accumulator, size: current };\n }\n\n computedMinItemSize = computedMinSize;\n return sizes;\n }\n return [];\n});\n\nconst simpleArray = computed(() => {\n return props.items.length && typeof props.items[0] !== 'object';\n});\n\nconst itemIndexByKey = computed(() => {\n const result = {};\n for (let i = 0, l = props.items.length; i < l; i++) {\n result[props.items[i][props.keyField]] = i;\n }\n return result;\n});\n\n// watch(reactiveItems, () => {\n// // if add to the top\n// // _updateVisibleItems(true);\n// // if autoscrolling if add to the bottom\n// // _updateVisibleItems(false, true);\n// });\n\nwatch(sizes, () => {\n _updateVisibleItems(false);\n}, { deep: true });\n\nonMounted(() => {\n nextTick(() => {\n // In SSR mode, render the real number of visible items\n _updateVisibleItems(true);\n ready.value = true;\n });\n});\n\nconst _addView = (pool, index, item, key, type) => {\n const nr = markRaw({\n id: uid++,\n index,\n used: true,\n key,\n type,\n });\n const view = shallowReactive({\n item,\n position: 0,\n nr,\n });\n pool.value.push(view);\n return view;\n};\n\nconst _unuseView = (view, fake = false) => {\n const _unusedViews = unusedViews;\n const type = view.nr.type;\n let unusedPool = _unusedViews.get(type);\n if (!unusedPool) {\n unusedPool = [];\n _unusedViews.set(type, unusedPool);\n }\n unusedPool.push(view);\n if (!fake) {\n view.nr.used = false;\n view.position = -9999;\n }\n};\n\nconst _getScroll = () => {\n const isVertical = props.direction === 'vertical';\n let scrollState;\n\n if (isVertical) {\n scrollState = {\n start: scroller.value.scrollTop,\n end: scroller.value.scrollTop + scroller.value.clientHeight,\n };\n } else {\n scrollState = {\n start: scroller.value.scrollLeft,\n end: scroller.value.scrollLeft + scroller.value.clientWidth,\n };\n }\n\n return scrollState;\n};\n\nconst _itemsLimitError = () => {\n setTimeout(() => {\n \n console.error('It seems the scroller element isn\\'t scrolling, so it tries to render all the items at once.', 'Scroller:', scroller);\n \n console.error('Make sure the scroller has a fixed height (or width) and \\'overflow-y\\' (or \\'overflow-x\\') set to \\'auto\\' so it can scroll correctly and only render the items visible in the scroll viewport.');\n });\n throw new Error('Rendered items limit reached');\n};\n\nconst _sortViews = () => {\n pool.value.sort((viewA, viewB) => viewA.nr.index - viewB.nr.index);\n};\n\nconst _updateVisibleItems = (checkItem, checkPositionDiff = false) => {\n // Deferred callers (the `sizes` watcher and the mounted nextTick) can fire\n // after the root element unmounts, when `scroller.value` is already null.\n if (!scroller.value) return;\n\n const itemSize = props.itemSize;\n const minItemSize = computedMinItemSize;\n const keyField = simpleArray.value ? null : props.keyField;\n const items = props.items;\n const count = items.length;\n const _sizes = sizes.value;\n const _views = views;\n const _unusedViews = unusedViews;\n const _pool = pool;\n const _itemIndexByKey = itemIndexByKey;\n let _startIndex, _endIndex;\n let _totalSize;\n let visibleStartIndex, visibleEndIndex;\n\n if (!count) {\n _startIndex = _endIndex = visibleStartIndex = visibleEndIndex = _totalSize = 0;\n } else {\n const scroll = _getScroll();\n\n // Skip update if use hasn't scrolled enough\n if (checkPositionDiff) {\n let positionDiff = scroll.start - lastUpdateScrollPosition.value;\n if (positionDiff < 0) positionDiff = -positionDiff;\n if ((itemSize === null && positionDiff < minItemSize.value) || positionDiff < itemSize) {\n return {\n continuous: true,\n };\n }\n }\n lastUpdateScrollPosition = scroll.start;\n\n const _buffer = props.buffer;\n scroll.start -= _buffer;\n scroll.end += _buffer;\n\n // The leading and trailing slots sit in normal flow inside the viewport, so the item\n // wrapper does not start at offset 0. Widen the window by their measured size.\n const slotSize = props.direction === 'vertical' ? 'scrollHeight' : 'scrollWidth';\n if (before.value) scroll.start -= before.value[slotSize];\n if (after.value) scroll.end += after.value[slotSize];\n\n // Variable size mode\n if (itemSize === null) {\n let h;\n let a = 0;\n let b = count - 1;\n let i = ~~(count / 2);\n let oldI;\n\n // Searching for _startIndex\n do {\n oldI = i;\n h = _sizes[i]?.accumulator;\n if (h < scroll.start) {\n a = i;\n } else if (i < count - 1 && _sizes[i + 1]?.accumulator > scroll.start) {\n b = i;\n }\n i = ~~((a + b) / 2);\n } while (i !== oldI);\n i < 0 && (i = 0);\n _startIndex = i;\n\n // For container style\n _totalSize = _sizes[count - 1]?.accumulator;\n\n // Searching for _endIndex\n for (\n _endIndex = i;\n _endIndex < count && _sizes[_endIndex]?.accumulator < scroll.end;\n _endIndex++\n );\n\n if (_endIndex === -1) {\n _endIndex = items.length - 1;\n } else {\n _endIndex++;\n // Bounds\n _endIndex > count && (_endIndex = count);\n }\n\n // search visible _startIndex\n for (\n visibleStartIndex = startIndex;\n visibleStartIndex < count && (_sizes[visibleStartIndex]?.accumulator) < scroll.start;\n visibleStartIndex++\n );\n\n // search visible endIndex\n for (\n visibleEndIndex = visibleStartIndex;\n visibleEndIndex < count && (_sizes[visibleEndIndex]?.accumulator) < scroll.end;\n visibleEndIndex++\n );\n } else {\n // Fixed size mode\n _startIndex = ~~(scroll.start / itemSize);\n const remainer = _startIndex % 1;\n _startIndex -= remainer;\n _endIndex = Math.ceil(scroll.end / itemSize);\n visibleStartIndex = Math.max(0, Math.floor((scroll.start) / itemSize));\n visibleEndIndex = Math.floor((scroll.end) / itemSize);\n\n // Bounds\n _startIndex < 0 && (_startIndex = 0);\n _endIndex > count && (_endIndex = count);\n visibleStartIndex < 0 && (visibleStartIndex = 0);\n visibleEndIndex > count && (visibleEndIndex = count);\n\n _totalSize = Math.ceil(count / 1) * itemSize;\n }\n }\n\n // items limit 1000\n if (_endIndex - _startIndex > 1000) {\n _itemsLimitError();\n }\n\n totalSize = _totalSize;\n\n let view;\n\n const continuous = _startIndex <= endIndex && _endIndex >= _startIndex;\n\n // Unuse views that are no longer visible\n if (continuous) {\n for (let i = 0, l = _pool.value.length; i < l; i++) {\n view = _pool.value[i];\n if (view?.nr.used) {\n // Update view item index\n if (checkItem) {\n view.nr.index = _itemIndexByKey[view.item[keyField]];\n }\n\n // Check if index is still in visible range\n if (\n view.nr.index == null ||\n view.nr.index < _startIndex ||\n view.nr.index >= _endIndex\n ) {\n _unuseView(view);\n }\n }\n }\n }\n\n const unusedIndex = continuous ? null : new Map();\n\n let item, type;\n let v;\n for (let i = _startIndex; i < _endIndex; i++) {\n item = items[i];\n const key = keyField ? item?.[keyField] : item;\n\n if (key == null) {\n throw new Error(`Key is ${key} on item (keyField is '${keyField}')`);\n }\n view = _views.get(key);\n\n if (!itemSize && !_sizes[i]?.size) {\n if (view) _unuseView(view);\n continue;\n }\n\n type = item.type;\n\n let unusedPool = _unusedViews.get(type);\n let newlyUsedView = false;\n\n // No view assigned to item\n if (!view) {\n if (continuous) {\n // Reuse existing view\n if (unusedPool && unusedPool.length) {\n view = unusedPool.pop();\n } else {\n view = _addView(_pool, i, item, key, type);\n }\n } else {\n // Use existing view\n // We don't care if they are already used\n // because we are not in continous scrolling\n v = unusedIndex.get(type) || 0;\n\n if (!unusedPool || v >= unusedPool.length) {\n view = _addView(_pool, i, item, key, type);\n _unuseView(view, true);\n unusedPool = _unusedViews.get(type);\n }\n\n view = unusedPool[v];\n unusedIndex.set(type, v + 1);\n }\n\n // Assign view to item\n _views.delete(view.nr.key);\n view.nr.used = true;\n view.nr.index = i;\n view.nr.key = key;\n view.nr.type = type;\n _views.set(key, view);\n\n newlyUsedView = true;\n } else {\n // View already assigned to item\n if (!view.nr.used) {\n view.nr.used = true;\n newlyUsedView = true;\n if (unusedPool) {\n const index = unusedPool.indexOf(view);\n if (index !== -1) unusedPool.splice(index, 1);\n }\n }\n }\n\n // Always set item in case it's a new object with the same key\n view.item = item;\n\n if (newlyUsedView) {\n if (i === items.length - 1) emit('scroll-end');\n if (i === 0) emit('scroll-start');\n }\n\n // Update position\n if (itemSize === null) {\n view.position = _sizes[i - 1]?.accumulator;\n view.offset = 0;\n } else {\n view.position = Math.floor(i) * itemSize;\n view.offset = (i % 1) * itemSize;\n }\n }\n\n startIndex = _startIndex;\n endIndex = _endIndex;\n\n // After the user has finished scrolling\n // Sort views so text selection is correct\n clearTimeout(sortTimer);\n sortTimer = setTimeout(_sortViews, 300);\n\n return {\n continuous,\n };\n};\n\nconst _scrollToPosition = (position) => {\n const direction = props.direction === 'vertical'\n ? { scroll: 'scrollTop', start: 'top' }\n : { scroll: 'scrollLeft', start: 'left' };\n\n const viewport = scroller.value;\n const scrollDirection = direction.scroll;\n\n viewport[scrollDirection] = position;\n};\n\nconst scrollToItem = (index) => {\n let scroll;\n if (props.itemSize === null) {\n scroll = index > 0 ? sizes.value[index - 1]?.accumulator : 0;\n } else {\n scroll = Math.floor(index) * props.itemSize;\n }\n _scrollToPosition(scroll);\n};\n\nconst handleScroll = () => {\n const container = scroller.value;\n\n if (userPosition.value !== 'middle') {\n userPosition.value = 'middle';\n emit('user-position', 'middle');\n }\n\n // Check if the scroll is at the block-start (aka top) of the container\n if (container.scrollTop === 0) {\n userPosition.value = 'blockStart';\n emit('user-position', 'blockStart');\n emit('user-position', 'top');\n }\n\n // Check if the scroll is at the block-end (aka bottom) of the container\n if (container.scrollTop + container.clientHeight === container.scrollHeight) {\n userPosition.value = 'blockEnd';\n emit('user-position', 'blockEnd');\n emit('user-position', 'bottom');\n }\n\n if (!scrollDirty) {\n scrollDirty = true;\n if (updateTimeout) return;\n\n const requestUpdate = () => requestAnimationFrame(() => {\n scrollDirty = false;\n _updateVisibleItems(false, true);\n });\n\n requestUpdate();\n }\n};\n\ndefineExpose({\n scrollToItem,\n _updateVisibleItems,\n});\n</script>\n","<script>\n/*\nThis is a code from external library (https://github.com/Akryum/vue-virtual-scroller/blob/master/packages/vue-virtual-scroller/src/components/DynamicScrollerItem.vue)\nWe have modified it for our own specific use.\n*/\nimport { h } from 'vue';\nimport { returnFirstEl } from '@/common/utils';\n\nexport default {\n name: 'DtScrollerItem',\n\n inject: [\n 'vscrollData',\n 'vscrollParent',\n 'vscrollResizeObserver',\n ],\n\n props: {\n // eslint-disable-next-line vue/require-prop-types\n item: {\n required: true,\n },\n\n watchData: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Indicates if the view is actively used to display an item.\n */\n active: {\n type: Boolean,\n required: true,\n },\n\n index: {\n type: Number,\n default: undefined,\n },\n\n sizeDependencies: {\n type: [Array, Object],\n default: null,\n },\n\n tag: {\n type: String,\n default: 'div',\n },\n },\n\n computed: {\n id () {\n if (this.vscrollData.simpleArray) return this.index;\n \n if (this.vscrollData.keyField in this.item) return this.item[this.vscrollData.keyField];\n throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`);\n },\n\n size () {\n return this.vscrollData.sizes[this.id] || 0;\n },\n\n finalActive () {\n return this.active && this.vscrollData.active;\n },\n },\n\n watch: {\n watchData: 'updateWatchData',\n\n id (value, oldValue) {\n returnFirstEl(this.$el).$_vs_id = this.id;\n if (!this.size) {\n this.onDataUpdate();\n }\n\n if (this.$_sizeObserved) {\n // In case the old item had the same size, it won't trigger the ResizeObserver\n // since we are reusing the same DOM node\n const oldSize = this.vscrollData.sizes[oldValue];\n const size = this.vscrollData.sizes[value];\n if (oldSize != null && oldSize !== size) {\n this.applySize(oldSize);\n }\n }\n },\n\n finalActive (value) {\n if (!this.size) {\n if (value) {\n if (!this.vscrollParent.$_undefinedMap[this.id]) {\n this.vscrollParent.$_undefinedSizes++;\n this.vscrollParent.$_undefinedMap[this.id] = true;\n }\n } else {\n if (this.vscrollParent.$_undefinedMap[this.id]) {\n this.vscrollParent.$_undefinedSizes--;\n this.vscrollParent.$_undefinedMap[this.id] = false;\n }\n }\n }\n\n if (this.vscrollResizeObserver) {\n if (value) {\n this.observeSize();\n } else {\n this.unobserveSize();\n }\n } else if (value && this.$_pendingVScrollUpdate === this.id) {\n this.updateSize();\n }\n },\n },\n\n created () {\n if (this.$isServer) return;\n\n this.$_forceNextVScrollUpdate = null;\n this.updateWatchData();\n\n if (!this.vscrollResizeObserver) {\n for (const k in this.sizeDependencies) {\n this.$watch(() => this.sizeDependencies[k], this.onDataUpdate);\n }\n }\n },\n\n mounted () {\n if (this.finalActive) {\n this.updateSize();\n this.observeSize();\n }\n },\n\n beforeUnmount () {\n this.unobserveSize();\n },\n\n methods: {\n updateSize () {\n if (this.finalActive) {\n if (this.$_pendingSizeUpdate !== this.id) {\n this.$_pendingSizeUpdate = this.id;\n this.$_forceNextVScrollUpdate = null;\n this.$_pendingVScrollUpdate = null;\n this.computeSize(this.id);\n }\n } else {\n this.$_forceNextVScrollUpdate = this.id;\n }\n },\n\n updateWatchData () {\n if (this.watchData && !this.vscrollResizeObserver) {\n this.$_watchData = this.$watch('item', () => {\n this.onDataUpdate();\n }, {\n deep: true,\n });\n } else if (this.$_watchData) {\n this.$_watchData();\n this.$_watchData = null;\n }\n },\n\n onVscrollUpdate ({ force }) {\n // If not active, sechedule a size update when it becomes active\n if (!this.finalActive && force) {\n this.$_pendingVScrollUpdate = this.id;\n }\n\n if (this.$_forceNextVScrollUpdate === this.id || force || !this.size) {\n this.updateSize();\n }\n },\n\n onDataUpdate () {\n this.updateSize();\n },\n\n computeSize (id) {\n this.$nextTick(() => {\n if (this.id === id) {\n const width = returnFirstEl(this.$el).offsetWidth;\n const height = returnFirstEl(this.$el).offsetHeight;\n this.applyWidthHeight(width, height);\n }\n this.$_pendingSizeUpdate = null;\n });\n },\n\n applyWidthHeight (width, height) {\n const size = ~~(this.vscrollParent.direction === 'vertical' ? height : width);\n if (size && this.size !== size) {\n this.applySize(size);\n }\n },\n\n applySize (size) {\n if (this.vscrollParent.$_undefinedMap[this.id]) {\n this.vscrollParent.$_undefinedSizes--;\n this.vscrollParent.$_undefinedMap[this.id] = undefined;\n }\n this.vscrollData.sizes[this.id] = size;\n },\n\n observeSize () {\n if (!this.vscrollResizeObserver) return;\n if (this.$_sizeObserved) return;\n this.vscrollResizeObserver.observe(returnFirstEl(this.$el));\n this.$el.$_vs_id = this.id;\n this.$el.$_vs_onResize = this.onResize;\n this.$_sizeObserved = true;\n },\n\n unobserveSize () {\n if (!this.vscrollResizeObserver) return;\n if (!this.$_sizeObserved) return;\n this.vscrollResizeObserver.unobserve(returnFirstEl(this.$el));\n this.$el.$_vs_onResize = undefined;\n this.$_sizeObserved = false;\n },\n\n onResize (id, width, height) {\n if (this.id === id) {\n this.applyWidthHeight(width, height);\n }\n },\n },\n\n render () {\n return h(this.tag, this.$slots.default());\n },\n};\n</script>\n","<template>\n <core-scroller\n ref=\"scroller\"\n :items=\"itemsWithSize\"\n :min-item-size=\"minItemSize\"\n :direction=\"direction\"\n :key-field=\"keyField\"\n :list-tag=\"listTag\"\n :item-tag=\"itemTag\"\n v-bind=\"$attrs\"\n >\n <template\n #default=\"{ item: itemWithSize, index, active }\"\n >\n <dt-scroller-item\n :item=\"itemWithSize\"\n :active=\"active\"\n :size-dependencies=\"[\n itemWithSize.message,\n ]\"\n :data-index=\"index\"\n >\n <slot\n v-bind=\"{\n item: itemWithSize.item,\n index,\n active,\n itemWithSize,\n }\"\n />\n </dt-scroller-item>\n </template>\n\n <template\n v-if=\"$slots.before\"\n #before\n >\n <slot name=\"before\" />\n </template>\n\n <template\n v-if=\"$slots.empty\"\n #empty\n >\n <slot name=\"empty\" />\n </template>\n\n <template\n v-if=\"$slots.after\"\n #after\n >\n <slot name=\"after\" />\n </template>\n </core-scroller>\n</template>\n\n<!-- eslint-disable-next-line max-len -->\n<!-- This is a code from external library (https://github.com/Akryum/vue-virtual-scroller/blob/master/packages/vue-virtual-scroller/src/components/DynamicScroller.vue)\nWe have modified it for our own specific use. -->\n<script>\nimport CoreScroller from './CoreScroller.vue';\nimport DtScrollerItem from './ScrollerItem.vue';\nimport { returnFirstEl } from '@/common/utils';\n\nexport default {\n name: 'DynamicScroller',\n\n components: {\n CoreScroller,\n DtScrollerItem,\n },\n\n provide () {\n if (typeof ResizeObserver !== 'undefined') {\n this.$_resizeObserver = new ResizeObserver(entries => {\n requestAnimationFrame(() => {\n if (!Array.isArray(entries)) {\n return;\n }\n for (const entry of entries) {\n if (entry.target && entry.target.$_vs_onResize) {\n let width, height;\n if (entry.borderBoxSize) {\n const resizeObserverSize = entry.borderBoxSize[0];\n width = resizeObserverSize.inlineSize;\n height = resizeObserverSize.blockSize;\n } else {\n // @TODO remove when contentRect is deprecated\n width = entry.contentRect.width;\n height = entry.contentRect.height;\n }\n entry.target.$_vs_onResize(entry.target.$_vs_id, width, height);\n }\n }\n });\n });\n }\n\n return {\n vscrollData: this.vscrollData,\n vscrollParent: this,\n vscrollResizeObserver: this.$_resizeObserver,\n };\n },\n\n inheritAttrs: false,\n\n props: {\n /*\n * The items to render.\n * If the items are simple arrays, the index will be used as the key.\n * If the items are objects, the keyField will be used as the key.\n */\n items: {\n type: Array,\n required: true,\n },\n\n /*\n * Indicates if the items are dynamic.\n * If true, the items will be wrapped in a DtScrollerItem component.\n * This is required for dynamic items to be able to react to changes in their size.\n */\n dynamic: {\n type: Boolean,\n default: false,\n },\n\n /*\n * The key field to use for the items.\n * Only used if the items are objects.\n */\n keyField: {\n type: String,\n default: 'id',\n },\n\n /*\n * The direction of the scroller.\n * Can be either 'vertical' or 'horizontal'.\n */\n direction: {\n type: String,\n default: 'vertical',\n validator: (value) => ['vertical', 'horizontal'].includes(value),\n },\n\n /*\n * The tag to use for the list.\n */\n listTag: {\n type: String,\n default: 'div',\n },\n\n /*\n * The tag to use for the items.\n */\n itemTag: {\n type: String,\n default: 'div',\n },\n\n /*\n * Display height (or width in horizontal mode) of the items in pixels\n * used to calculate the scroll size and position.\n * Is required for the initial render of items in DYNAMIC size mode.\n */\n minItemSize: {\n type: [Number, String],\n },\n },\n\n data () {\n return {\n vscrollData: {\n active: true,\n sizes: {},\n keyField: this.keyField,\n simpleArray: false,\n },\n };\n },\n\n computed: {\n simpleArray () {\n return this.items.length && typeof this.items[0] !== 'object';\n },\n\n itemsWithSize () {\n const result = [];\n const { items, keyField, simpleArray } = this;\n const sizes = this.vscrollData.sizes;\n const l = items.length;\n for (let i = 0; i < l; i++) {\n const item = items[i];\n const id = simpleArray ? i : item[keyField];\n let size = sizes[id];\n if (typeof size === 'undefined' && !this.$_undefinedMap[id]) {\n size = 0;\n }\n result.push({\n item,\n [keyField]: id,\n size,\n });\n }\n return result;\n },\n },\n\n watch: {\n simpleArray: {\n handler (value) {\n this.vscrollData.simpleArray = value;\n },\n\n immediate: true,\n },\n\n itemsWithSize (next, prev) {\n const scrollTop = returnFirstEl(this.$el).scrollTop;\n\n // Calculate total diff between prev and next sizes\n // over current scroll top. Then add it to scrollTop to\n // avoid jumping the contents that the user is seeing.\n let prevActiveTop = 0; let activeTop = 0;\n const length = Math.min(next.length, prev.length);\n for (let i = 0; i < length; i++) {\n if (prevActiveTop >= scrollTop) {\n break;\n }\n prevActiveTop += prev[i].size || this.minItemSize;\n activeTop += next[i].size || this.minItemSize;\n }\n const offset = activeTop - prevActiveTop;\n\n if (offset === 0) {\n return;\n }\n\n returnFirstEl(this.$el).scrollTop += offset;\n },\n },\n\n beforeCreate () {\n this.$_updates = [];\n this.$_undefinedSizes = 0;\n this.$_undefinedMap = {};\n },\n\n activated () {\n this.vscrollData.active = true;\n },\n\n deactivated () {\n this.vscrollData.active = false;\n },\n\n methods: {\n dynamicScrollerUpdateItems () {\n const scroller = this.$refs.scroller;\n if (scroller) scroller._updateVisibleItems(true);\n },\n\n dynamicScrollerUpdateItemsFromBottom () {\n const scroller = this.$refs.scroller;\n if (scroller) scroller._updateVisibleItems(false, true);\n },\n\n scrollToItem (index) {\n const scroller = this.$refs.scroller;\n if (scroller) scroller.scrollToItem(index);\n },\n\n scrollToBottom () {\n if (this.$_scrollingToBottom) return;\n this.$_scrollingToBottom = true;\n const el = returnFirstEl(this.$el);\n // Item is inserted to the DOM\n this.$nextTick(() => {\n el.scrollTop = el.scrollHeight + 5000;\n // Item sizes are computed\n const cb = () => {\n el.scrollTop = el.scrollHeight + 5000;\n requestAnimationFrame(() => {\n el.scrollTop = el.scrollHeight + 5000;\n if (this.$_undefinedSizes === 0) {\n this.$_scrollingToBottom = false;\n } else {\n requestAnimationFrame(cb);\n }\n });\n };\n requestAnimationFrame(cb);\n });\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"dynamic ? DynamicScroller : CoreScroller\"\n ref=\"scroller\"\n data-qa=\"dt-scroller\"\n :items=\"items\"\n :item-size=\"itemSize\"\n :min-item-size=\"minItemSize\"\n :buffer=\"buffer\"\n :direction=\"direction\"\n :key-field=\"keyField\"\n :list-tag=\"listTag\"\n :item-tag=\"itemTag\"\n :style=\"computedStyle\"\n tabindex=\"0\"\n @user-position=\"$emit('user-position', $event)\"\n @scroll-start=\"$emit('scroll-start')\"\n @scroll-end=\"$emit('scroll-end')\"\n >\n <template\n #default=\"{ item, index, active }\"\n >\n <slot\n v-bind=\"{\n item: item,\n index,\n active,\n }\"\n />\n </template>\n\n <template\n v-if=\"$slots.before\"\n #before\n >\n <!-- @slot Content rendered before the items, inside the scroll viewport. Scrolls with the list. -->\n <slot name=\"before\" />\n </template>\n\n <template\n v-if=\"$slots.empty\"\n #empty\n >\n <!-- @slot Content rendered inside the list wrapper only while the list is empty. -->\n <slot name=\"empty\" />\n </template>\n\n <template\n v-if=\"$slots.after\"\n #after\n >\n <!-- @slot Content rendered after the items, inside the scroll viewport. Scrolls with the list. -->\n <slot name=\"after\" />\n </template>\n </component>\n</template>\n\n<script setup>\nimport CoreScroller from './Modules/CoreScroller.vue';\nimport DynamicScroller from './Modules/DynamicScroller.vue';\nimport { provide, computed, watch, ref } from 'vue';\n\ndefineOptions({\n name: 'DtScroller',\n});\n\nconst props = defineProps({\n /**\n * Amount of pixels added to each edge of the scroll viewport, so items are rendered\n * before they scroll into view. Also controls how early `scroll-start` and `scroll-end`\n * fire relative to the viewport edges.\n */\n buffer: {\n type: Number,\n default: 200,\n },\n\n /**\n * The direction of the scroller.\n * @values vertical, horizontal\n */\n direction: {\n type: String,\n default: 'vertical',\n validator: (value) => ['vertical', 'horizontal'].includes(value),\n },\n\n /**\n * Indicates if the items need to react to changes in their size.\n * If disabled the itemSize prop is required and you will get improved performance.\n * If enabled the minItemSize prop is required and you\n * will have reduced performance but the ability to reactively size list items\n * @values true, false\n */\n dynamic: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Display height (or width in horizontal mode) of the items in pixels\n * used to calculate the scroll size and position.\n * Required if DYNAMIC is false\n */\n itemSize: {\n type: Number,\n default: null,\n },\n\n /**\n * The tag to use for the items.\n */\n itemTag: {\n type: String,\n default: 'div',\n },\n\n /**\n * The items to render.\n * If the items are simple arrays, the index will be used as the key.\n * If the items are objects, the keyField will be used as the key.\n * @example items: [ 'item1', 'item2', 'item3' ]\n * @example items: [ { id: 1, name: 'item1' }, { id: 2, name: 'item2' }, { id: 3, name: 'item3' } ]\n */\n items: {\n type: Array,\n required: true,\n },\n\n /**\n * The key field to use for the items.\n * If the items are objects, the scroller needs to be able to identify them.\n * By default it will look for an id field on the items.\n * This can be configured with this prop if you are using another field name.\n */\n keyField: {\n type: String,\n default: 'id',\n },\n\n /**\n * The tag to use for the list.\n */\n listTag: {\n type: String,\n default: 'div',\n },\n\n /**\n * Minimum size used if the height (or width in horizontal mode) of a item is unknown.\n * Is required for the initial render of items in DYNAMIC size mode.\n */\n minItemSize: {\n type: [Number, String],\n default: null,\n },\n\n /**\n * The height of the scroller.\n * Can be a number (in pixels) or a string (in CSS units).\n */\n scrollerHeight: {\n type: [String, Number],\n default: '100%',\n },\n\n /**\n * The width of the scroller.\n * Can be a number (in pixels) or a string (in CSS units).\n */\n scrollerWidth: {\n type: [String, Number],\n default: '100%',\n },\n});\n\nconst emits = defineEmits([\n /**\n * Describe when the scroller changes from block-start (aka top) / middle / block-end (aka bottom).\n * The top and bottom values are deprecated and will ideally be removed in the next major version.\n * Please use blockStart and blockEnd instead.\n * @param {string} position The position of the scroller.\n * @values blockStart, middle, blockEnd, top, bottom\n */\n 'user-position',\n\n /**\n * Emitted when the first item enters the rendered view pool. Fires at least one `buffer`\n * length before the viewport's start edge is reached (earlier still with `before` slot\n * content), so callers can prepend items ahead of time.\n */\n 'scroll-start',\n\n /**\n * Emitted when the last item enters the rendered view pool. Fires at least one `buffer`\n * length before the viewport's end edge is reached (earlier still with `after` slot\n * content), so callers can append items ahead of time.\n */\n 'scroll-end',\n]);\n\nprovide('emit', emits);\n\nconst scroller = ref(null);\n\nconst computedStyle = computed(() => {\n return {\n width: typeof props.scrollerWidth === 'number' ? `${props.scrollerWidth}px` : props.scrollerWidth,\n height: typeof props.scrollerHeight === 'number' ? `${props.scrollerHeight}px` : props.scrollerHeight,\n };\n});\n\nwatch(props, () => {\n validateProps();\n}, { deep: true, immediate: true });\n\nfunction scrollToBottom () {\n if (scroller.value) scroller.value.scrollToBottom();\n}\n\nfunction scrollToItem (index) {\n if (scroller.value) scroller.value.scrollToItem(index);\n}\n\nfunction updateItems () {\n if (!scroller.value) return;\n if (props.dynamic) {\n scroller.value.dynamicScrollerUpdateItems();\n } else {\n scroller.value._updateVisibleItems(true);\n }\n}\n\nfunction updateItemsFromBottom () {\n if (!scroller.value) return;\n if (props.dynamic) {\n scroller.value.dynamicScrollerUpdateItemsFromBottom();\n } else {\n scroller.value._updateVisibleItems(false, true);\n }\n}\n\nfunction validateProps () {\n if (props.dynamic && !props.minItemSize) {\n console.error('scroller error: \\'minItemSize\\' is required on \\'dynamic\\' mode.');\n }\n\n if (!props.dynamic && !props.itemSize) {\n console.error('scroller error: \\'itemSize\\' is required.');\n }\n}\n\ndefineExpose({\n scrollToBottom,\n scrollToItem,\n updateItems,\n updateItemsFromBottom,\n});\n</script>\n"],"mappings":"0xBAoFA,IAAM,EAAQ,EAsGR,EAAO,EAEP,GAAA,EAAA,EAAA,UAAiB,IAAI,IAAM,CAE3B,GAAA,EAAA,EAAA,UAAuB,IAAI,IAAM,CAEjC,GAAA,EAAA,EAAA,KAAW,EAAE,CAAC,CACd,GAAA,EAAA,EAAA,KAAe,KAAK,CACpB,GAAA,EAAA,EAAA,KAAY,GAAM,CAClB,GAAA,EAAA,EAAA,KAAe,KAAK,CACpB,GAAA,EAAA,EAAA,KAAa,KAAK,CAClB,GAAA,EAAA,EAAA,KAAY,KAAK,CACjB,GAAA,EAAA,EAAA,KAAmB,aAAa,CAElC,EAAa,EACb,EAAW,EACX,EAAc,GACd,EAA2B,EAC3B,EAAY,KACZ,EAAsB,KACtB,EAAY,EACZ,EAAM,EAEJ,GAAA,EAAA,EAAA,cAAuB,CAC3B,GAAI,EAAM,WAAa,KAAM,CAC3B,IAAM,EAAQ,CACZ,KAAM,CAAE,YAAa,EAAG,CACzB,CACK,EAAQ,EAAM,MACd,EAAQ,EAAM,UACd,EAAc,EAAM,YACtB,EAAkB,IAClB,EAAc,EACd,EACJ,IAAK,IAAI,EAAI,EAAG,EAAI,EAAM,OAAQ,EAAI,EAAG,IACvC,EAAU,EAAM,GAAG,IAAU,EACzB,EAAU,IACZ,EAAkB,GAEpB,GAAe,EACf,EAAM,GAAK,CAAE,cAAa,KAAM,EAAS,CAI3C,MADA,GAAsB,EACf,EAET,MAAO,EAAE,EAC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,cAAY,EAAA,KAAA,EAAA,GAAA,GAAEA,EAAAA,MAAK,eAAA,EACnB,YAAU,EAAA,KAAA,EAAA,GAAA,GAAEA,EAAAA,MAAK,aAAA,sBAGf,SAAA,EAAA,EAAA,UAQC,CARU,OAAM,QAAO,YAAM,EAAA,EAAA,EAAA,YAQ7B,EAAA,OAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,EAAA,oBAAA,CAL0B,OAAgB,QAAiB,qBASvDC,EAAAA,OAAO,OAAA,MACZ,8BAGqB,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,SAAA,CAAA,CAAA,iBAIhBA,EAAAA,OAAO,MAAA,MACZ,6BAGoB,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,QAAA,CAAA,CAAA,iBAIfA,EAAAA,OAAO,MAAA,MACZ,6BAGoB,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,QAAA,CAAA,CAAA"}
@@ -123,6 +123,7 @@ var j = {
123
123
  }, Z = () => {
124
124
  y.value.sort((e, t) => e.nr.index - t.nr.index);
125
125
  }, Q = (e, t = !1) => {
126
+ if (!M.value) return;
126
127
  let n = c.itemSize, r = V, i = G.value ? null : c.keyField, a = c.items, o = a.length, s = W.value, d = u, f = h, p = y, m = K, g, _, v, b, x;
127
128
  if (!o) g = _ = b = x = v = 0;
128
129
  else {
@@ -688,4 +689,4 @@ var P = /* @__PURE__ */ t(M, [["render", N]]), F = /* @__PURE__ */ Object.assign
688
689
  //#endregion
689
690
  export { F as t };
690
691
 
691
- //# sourceMappingURL=Scroller-De7jdCyq.js.map
692
+ //# sourceMappingURL=Scroller-BsGXTN6S.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scroller-BsGXTN6S.js","names":["$slots","$emit","$slots"],"sources":["../components/Scroller/Modules/CoreScroller.vue","../components/Scroller/Modules/ScrollerItem.vue","../components/Scroller/Modules/DynamicScroller.vue","../components/Scroller/Scroller.vue"],"sourcesContent":["<!-- eslint-disable max-len -->\n<template>\n <div\n ref=\"scroller\"\n class=\"vue-recycle-scroller\"\n :class=\"{\n ready,\n [`direction-${direction}`]: true,\n }\"\n @scroll.passive=\"handleScroll\"\n >\n <div\n v-if=\"$slots.before\"\n ref=\"before\"\n data-qa=\"dt-scroller-before\"\n class=\"vue-recycle-scroller__slot\"\n >\n <!-- @slot Content rendered before the items, inside the scroll viewport. Scrolls with the list. -->\n <slot name=\"before\" />\n </div>\n\n <component\n :is=\"listTag\"\n ref=\"wrapper\"\n :style=\"{ [direction === 'vertical' ? 'minHeight' : 'minWidth']: `${totalSize}px` }\"\n data-qa=\"dt-scroller-item-wrapper\"\n class=\"vue-recycle-scroller__item-wrapper\"\n :class=\"listClass\"\n >\n <component\n :is=\"itemTag\"\n v-for=\"view in pool\"\n :key=\"view.nr.id\"\n data-qa=\"dt-scroller-item\"\n :style=\"ready ? {\n transform: `translate${direction === 'vertical' ? 'Y' : 'X'}(${view.position}px) translate${direction === 'vertical' ? 'X' : 'Y'}(${view.offset}px)`,\n width: undefined,\n height: undefined,\n } : null\"\n class=\"vue-recycle-scroller__item-view\"\n :class=\"[\n itemClass,\n {\n hover: props.enableHover && hoverKey === view.nr.key,\n },\n ]\"\n v-on=\"props.enableHover ? {\n mouseenter: () => { hoverKey = view.nr.key },\n mouseleave: () => { hoverKey = null },\n } : {}\"\n >\n <slot\n :item=\"view.item\"\n :index=\"view.nr.index\"\n :active=\"view.nr.used\"\n />\n </component>\n\n <!-- @slot Content rendered inside the list wrapper only while the list is empty. -->\n <slot\n v-if=\"!items.length\"\n name=\"empty\"\n />\n </component>\n\n <div\n v-if=\"$slots.after\"\n ref=\"after\"\n data-qa=\"dt-scroller-after\"\n class=\"vue-recycle-scroller__slot\"\n >\n <!-- @slot Content rendered after the items, inside the scroll viewport. Scrolls with the list. -->\n <slot name=\"after\" />\n </div>\n </div>\n</template>\n\n<script setup>\n/*\nThis is a code from external library (https://github.com/Akryum/vue-virtual-scroller/blob/master/packages/vue-virtual-scroller/src/components/RecycleScroller.vue)\nWe have modified it for our own specific use.\n*/\nimport { computed, watch, markRaw, shallowReactive, onMounted, nextTick, reactive, ref } from 'vue';\n\nconst props = defineProps({\n /**\n * List of items you want to display in the scroller.\n */\n items: {\n type: Array,\n required: true,\n },\n\n /**\n *\n * Field used to identify items and optimize managing rendered views\n */\n keyField: {\n type: String,\n default: 'id',\n },\n\n /**\n * Direction of the scroller. Can be either `vertical` or `horizontal`.\n */\n direction: {\n type: String,\n default: 'vertical',\n validator: (value) => ['vertical', 'horizontal'].includes(value),\n },\n\n /**\n * Size of the items in the list.\n * If it is set to null (the default value), it will use variable size mode.\n */\n itemSize: {\n type: Number,\n default: null,\n },\n\n /**\n * Minimum size used if the height (or width in horizontal mode) of an item is unknown.\n */\n minItemSize: {\n type: [Number, String],\n default: null,\n },\n\n /**\n * Field used to get the item's size in variable size mode.\n */\n sizeField: {\n type: String,\n default: 'size',\n },\n\n /**\n * Amount of pixel to add to edges of the scrolling visible area to start rendering items further away.\n */\n buffer: {\n type: Number,\n default: 200,\n },\n\n /**\n * Enables hover state CSS class and mouse events on items.\n * Set to false if you want to manage hover state yourself.\n */\n enableHover: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The element to render as the list's wrapper.\n */\n listTag: {\n type: String,\n default: 'div',\n },\n\n /**\n * The element to render as the list item.\n */\n itemTag: {\n type: String,\n default: 'div',\n },\n\n /**\n * The custom classes added to the item list wrapper.\n */\n listClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * The custom classes added to each item.\n */\n itemClass: {\n type: [String, Object, Array],\n default: '',\n },\n});\n\nconst emit = defineEmits(['user-position', 'scroll-start', 'scroll-end']);\n\nconst views = reactive(new Map());\n// const reactiveItems = reactive(props.items);\nconst unusedViews = reactive(new Map());\nconst updateTimeout = null;\nconst pool = ref([]);\nconst hoverKey = ref(null);\nconst ready = ref(false);\nconst scroller = ref(null);\nconst before = ref(null);\nconst after = ref(null);\nconst userPosition = ref('blockStart');\n\nlet startIndex = 0;\nlet endIndex = 0;\nlet scrollDirty = false;\nlet lastUpdateScrollPosition = 0;\nlet sortTimer = null;\nlet computedMinItemSize = null;\nlet totalSize = 0;\nlet uid = 0;\n\nconst sizes = computed(() => {\n if (props.itemSize === null) {\n const sizes = {\n '-1': { accumulator: 0 },\n };\n const items = props.items;\n const field = props.sizeField;\n const minItemSize = props.minItemSize;\n let computedMinSize = 10000;\n let accumulator = 0;\n let current;\n for (let i = 0, l = items.length; i < l; i++) {\n current = items[i][field] || minItemSize;\n if (current < computedMinSize) {\n computedMinSize = current;\n }\n accumulator += current;\n sizes[i] = { accumulator, size: current };\n }\n\n computedMinItemSize = computedMinSize;\n return sizes;\n }\n return [];\n});\n\nconst simpleArray = computed(() => {\n return props.items.length && typeof props.items[0] !== 'object';\n});\n\nconst itemIndexByKey = computed(() => {\n const result = {};\n for (let i = 0, l = props.items.length; i < l; i++) {\n result[props.items[i][props.keyField]] = i;\n }\n return result;\n});\n\n// watch(reactiveItems, () => {\n// // if add to the top\n// // _updateVisibleItems(true);\n// // if autoscrolling if add to the bottom\n// // _updateVisibleItems(false, true);\n// });\n\nwatch(sizes, () => {\n _updateVisibleItems(false);\n}, { deep: true });\n\nonMounted(() => {\n nextTick(() => {\n // In SSR mode, render the real number of visible items\n _updateVisibleItems(true);\n ready.value = true;\n });\n});\n\nconst _addView = (pool, index, item, key, type) => {\n const nr = markRaw({\n id: uid++,\n index,\n used: true,\n key,\n type,\n });\n const view = shallowReactive({\n item,\n position: 0,\n nr,\n });\n pool.value.push(view);\n return view;\n};\n\nconst _unuseView = (view, fake = false) => {\n const _unusedViews = unusedViews;\n const type = view.nr.type;\n let unusedPool = _unusedViews.get(type);\n if (!unusedPool) {\n unusedPool = [];\n _unusedViews.set(type, unusedPool);\n }\n unusedPool.push(view);\n if (!fake) {\n view.nr.used = false;\n view.position = -9999;\n }\n};\n\nconst _getScroll = () => {\n const isVertical = props.direction === 'vertical';\n let scrollState;\n\n if (isVertical) {\n scrollState = {\n start: scroller.value.scrollTop,\n end: scroller.value.scrollTop + scroller.value.clientHeight,\n };\n } else {\n scrollState = {\n start: scroller.value.scrollLeft,\n end: scroller.value.scrollLeft + scroller.value.clientWidth,\n };\n }\n\n return scrollState;\n};\n\nconst _itemsLimitError = () => {\n setTimeout(() => {\n \n console.error('It seems the scroller element isn\\'t scrolling, so it tries to render all the items at once.', 'Scroller:', scroller);\n \n console.error('Make sure the scroller has a fixed height (or width) and \\'overflow-y\\' (or \\'overflow-x\\') set to \\'auto\\' so it can scroll correctly and only render the items visible in the scroll viewport.');\n });\n throw new Error('Rendered items limit reached');\n};\n\nconst _sortViews = () => {\n pool.value.sort((viewA, viewB) => viewA.nr.index - viewB.nr.index);\n};\n\nconst _updateVisibleItems = (checkItem, checkPositionDiff = false) => {\n // Deferred callers (the `sizes` watcher and the mounted nextTick) can fire\n // after the root element unmounts, when `scroller.value` is already null.\n if (!scroller.value) return;\n\n const itemSize = props.itemSize;\n const minItemSize = computedMinItemSize;\n const keyField = simpleArray.value ? null : props.keyField;\n const items = props.items;\n const count = items.length;\n const _sizes = sizes.value;\n const _views = views;\n const _unusedViews = unusedViews;\n const _pool = pool;\n const _itemIndexByKey = itemIndexByKey;\n let _startIndex, _endIndex;\n let _totalSize;\n let visibleStartIndex, visibleEndIndex;\n\n if (!count) {\n _startIndex = _endIndex = visibleStartIndex = visibleEndIndex = _totalSize = 0;\n } else {\n const scroll = _getScroll();\n\n // Skip update if use hasn't scrolled enough\n if (checkPositionDiff) {\n let positionDiff = scroll.start - lastUpdateScrollPosition.value;\n if (positionDiff < 0) positionDiff = -positionDiff;\n if ((itemSize === null && positionDiff < minItemSize.value) || positionDiff < itemSize) {\n return {\n continuous: true,\n };\n }\n }\n lastUpdateScrollPosition = scroll.start;\n\n const _buffer = props.buffer;\n scroll.start -= _buffer;\n scroll.end += _buffer;\n\n // The leading and trailing slots sit in normal flow inside the viewport, so the item\n // wrapper does not start at offset 0. Widen the window by their measured size.\n const slotSize = props.direction === 'vertical' ? 'scrollHeight' : 'scrollWidth';\n if (before.value) scroll.start -= before.value[slotSize];\n if (after.value) scroll.end += after.value[slotSize];\n\n // Variable size mode\n if (itemSize === null) {\n let h;\n let a = 0;\n let b = count - 1;\n let i = ~~(count / 2);\n let oldI;\n\n // Searching for _startIndex\n do {\n oldI = i;\n h = _sizes[i]?.accumulator;\n if (h < scroll.start) {\n a = i;\n } else if (i < count - 1 && _sizes[i + 1]?.accumulator > scroll.start) {\n b = i;\n }\n i = ~~((a + b) / 2);\n } while (i !== oldI);\n i < 0 && (i = 0);\n _startIndex = i;\n\n // For container style\n _totalSize = _sizes[count - 1]?.accumulator;\n\n // Searching for _endIndex\n for (\n _endIndex = i;\n _endIndex < count && _sizes[_endIndex]?.accumulator < scroll.end;\n _endIndex++\n );\n\n if (_endIndex === -1) {\n _endIndex = items.length - 1;\n } else {\n _endIndex++;\n // Bounds\n _endIndex > count && (_endIndex = count);\n }\n\n // search visible _startIndex\n for (\n visibleStartIndex = startIndex;\n visibleStartIndex < count && (_sizes[visibleStartIndex]?.accumulator) < scroll.start;\n visibleStartIndex++\n );\n\n // search visible endIndex\n for (\n visibleEndIndex = visibleStartIndex;\n visibleEndIndex < count && (_sizes[visibleEndIndex]?.accumulator) < scroll.end;\n visibleEndIndex++\n );\n } else {\n // Fixed size mode\n _startIndex = ~~(scroll.start / itemSize);\n const remainer = _startIndex % 1;\n _startIndex -= remainer;\n _endIndex = Math.ceil(scroll.end / itemSize);\n visibleStartIndex = Math.max(0, Math.floor((scroll.start) / itemSize));\n visibleEndIndex = Math.floor((scroll.end) / itemSize);\n\n // Bounds\n _startIndex < 0 && (_startIndex = 0);\n _endIndex > count && (_endIndex = count);\n visibleStartIndex < 0 && (visibleStartIndex = 0);\n visibleEndIndex > count && (visibleEndIndex = count);\n\n _totalSize = Math.ceil(count / 1) * itemSize;\n }\n }\n\n // items limit 1000\n if (_endIndex - _startIndex > 1000) {\n _itemsLimitError();\n }\n\n totalSize = _totalSize;\n\n let view;\n\n const continuous = _startIndex <= endIndex && _endIndex >= _startIndex;\n\n // Unuse views that are no longer visible\n if (continuous) {\n for (let i = 0, l = _pool.value.length; i < l; i++) {\n view = _pool.value[i];\n if (view?.nr.used) {\n // Update view item index\n if (checkItem) {\n view.nr.index = _itemIndexByKey[view.item[keyField]];\n }\n\n // Check if index is still in visible range\n if (\n view.nr.index == null ||\n view.nr.index < _startIndex ||\n view.nr.index >= _endIndex\n ) {\n _unuseView(view);\n }\n }\n }\n }\n\n const unusedIndex = continuous ? null : new Map();\n\n let item, type;\n let v;\n for (let i = _startIndex; i < _endIndex; i++) {\n item = items[i];\n const key = keyField ? item?.[keyField] : item;\n\n if (key == null) {\n throw new Error(`Key is ${key} on item (keyField is '${keyField}')`);\n }\n view = _views.get(key);\n\n if (!itemSize && !_sizes[i]?.size) {\n if (view) _unuseView(view);\n continue;\n }\n\n type = item.type;\n\n let unusedPool = _unusedViews.get(type);\n let newlyUsedView = false;\n\n // No view assigned to item\n if (!view) {\n if (continuous) {\n // Reuse existing view\n if (unusedPool && unusedPool.length) {\n view = unusedPool.pop();\n } else {\n view = _addView(_pool, i, item, key, type);\n }\n } else {\n // Use existing view\n // We don't care if they are already used\n // because we are not in continous scrolling\n v = unusedIndex.get(type) || 0;\n\n if (!unusedPool || v >= unusedPool.length) {\n view = _addView(_pool, i, item, key, type);\n _unuseView(view, true);\n unusedPool = _unusedViews.get(type);\n }\n\n view = unusedPool[v];\n unusedIndex.set(type, v + 1);\n }\n\n // Assign view to item\n _views.delete(view.nr.key);\n view.nr.used = true;\n view.nr.index = i;\n view.nr.key = key;\n view.nr.type = type;\n _views.set(key, view);\n\n newlyUsedView = true;\n } else {\n // View already assigned to item\n if (!view.nr.used) {\n view.nr.used = true;\n newlyUsedView = true;\n if (unusedPool) {\n const index = unusedPool.indexOf(view);\n if (index !== -1) unusedPool.splice(index, 1);\n }\n }\n }\n\n // Always set item in case it's a new object with the same key\n view.item = item;\n\n if (newlyUsedView) {\n if (i === items.length - 1) emit('scroll-end');\n if (i === 0) emit('scroll-start');\n }\n\n // Update position\n if (itemSize === null) {\n view.position = _sizes[i - 1]?.accumulator;\n view.offset = 0;\n } else {\n view.position = Math.floor(i) * itemSize;\n view.offset = (i % 1) * itemSize;\n }\n }\n\n startIndex = _startIndex;\n endIndex = _endIndex;\n\n // After the user has finished scrolling\n // Sort views so text selection is correct\n clearTimeout(sortTimer);\n sortTimer = setTimeout(_sortViews, 300);\n\n return {\n continuous,\n };\n};\n\nconst _scrollToPosition = (position) => {\n const direction = props.direction === 'vertical'\n ? { scroll: 'scrollTop', start: 'top' }\n : { scroll: 'scrollLeft', start: 'left' };\n\n const viewport = scroller.value;\n const scrollDirection = direction.scroll;\n\n viewport[scrollDirection] = position;\n};\n\nconst scrollToItem = (index) => {\n let scroll;\n if (props.itemSize === null) {\n scroll = index > 0 ? sizes.value[index - 1]?.accumulator : 0;\n } else {\n scroll = Math.floor(index) * props.itemSize;\n }\n _scrollToPosition(scroll);\n};\n\nconst handleScroll = () => {\n const container = scroller.value;\n\n if (userPosition.value !== 'middle') {\n userPosition.value = 'middle';\n emit('user-position', 'middle');\n }\n\n // Check if the scroll is at the block-start (aka top) of the container\n if (container.scrollTop === 0) {\n userPosition.value = 'blockStart';\n emit('user-position', 'blockStart');\n emit('user-position', 'top');\n }\n\n // Check if the scroll is at the block-end (aka bottom) of the container\n if (container.scrollTop + container.clientHeight === container.scrollHeight) {\n userPosition.value = 'blockEnd';\n emit('user-position', 'blockEnd');\n emit('user-position', 'bottom');\n }\n\n if (!scrollDirty) {\n scrollDirty = true;\n if (updateTimeout) return;\n\n const requestUpdate = () => requestAnimationFrame(() => {\n scrollDirty = false;\n _updateVisibleItems(false, true);\n });\n\n requestUpdate();\n }\n};\n\ndefineExpose({\n scrollToItem,\n _updateVisibleItems,\n});\n</script>\n","<script>\n/*\nThis is a code from external library (https://github.com/Akryum/vue-virtual-scroller/blob/master/packages/vue-virtual-scroller/src/components/DynamicScrollerItem.vue)\nWe have modified it for our own specific use.\n*/\nimport { h } from 'vue';\nimport { returnFirstEl } from '@/common/utils';\n\nexport default {\n name: 'DtScrollerItem',\n\n inject: [\n 'vscrollData',\n 'vscrollParent',\n 'vscrollResizeObserver',\n ],\n\n props: {\n // eslint-disable-next-line vue/require-prop-types\n item: {\n required: true,\n },\n\n watchData: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Indicates if the view is actively used to display an item.\n */\n active: {\n type: Boolean,\n required: true,\n },\n\n index: {\n type: Number,\n default: undefined,\n },\n\n sizeDependencies: {\n type: [Array, Object],\n default: null,\n },\n\n tag: {\n type: String,\n default: 'div',\n },\n },\n\n computed: {\n id () {\n if (this.vscrollData.simpleArray) return this.index;\n \n if (this.vscrollData.keyField in this.item) return this.item[this.vscrollData.keyField];\n throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`);\n },\n\n size () {\n return this.vscrollData.sizes[this.id] || 0;\n },\n\n finalActive () {\n return this.active && this.vscrollData.active;\n },\n },\n\n watch: {\n watchData: 'updateWatchData',\n\n id (value, oldValue) {\n returnFirstEl(this.$el).$_vs_id = this.id;\n if (!this.size) {\n this.onDataUpdate();\n }\n\n if (this.$_sizeObserved) {\n // In case the old item had the same size, it won't trigger the ResizeObserver\n // since we are reusing the same DOM node\n const oldSize = this.vscrollData.sizes[oldValue];\n const size = this.vscrollData.sizes[value];\n if (oldSize != null && oldSize !== size) {\n this.applySize(oldSize);\n }\n }\n },\n\n finalActive (value) {\n if (!this.size) {\n if (value) {\n if (!this.vscrollParent.$_undefinedMap[this.id]) {\n this.vscrollParent.$_undefinedSizes++;\n this.vscrollParent.$_undefinedMap[this.id] = true;\n }\n } else {\n if (this.vscrollParent.$_undefinedMap[this.id]) {\n this.vscrollParent.$_undefinedSizes--;\n this.vscrollParent.$_undefinedMap[this.id] = false;\n }\n }\n }\n\n if (this.vscrollResizeObserver) {\n if (value) {\n this.observeSize();\n } else {\n this.unobserveSize();\n }\n } else if (value && this.$_pendingVScrollUpdate === this.id) {\n this.updateSize();\n }\n },\n },\n\n created () {\n if (this.$isServer) return;\n\n this.$_forceNextVScrollUpdate = null;\n this.updateWatchData();\n\n if (!this.vscrollResizeObserver) {\n for (const k in this.sizeDependencies) {\n this.$watch(() => this.sizeDependencies[k], this.onDataUpdate);\n }\n }\n },\n\n mounted () {\n if (this.finalActive) {\n this.updateSize();\n this.observeSize();\n }\n },\n\n beforeUnmount () {\n this.unobserveSize();\n },\n\n methods: {\n updateSize () {\n if (this.finalActive) {\n if (this.$_pendingSizeUpdate !== this.id) {\n this.$_pendingSizeUpdate = this.id;\n this.$_forceNextVScrollUpdate = null;\n this.$_pendingVScrollUpdate = null;\n this.computeSize(this.id);\n }\n } else {\n this.$_forceNextVScrollUpdate = this.id;\n }\n },\n\n updateWatchData () {\n if (this.watchData && !this.vscrollResizeObserver) {\n this.$_watchData = this.$watch('item', () => {\n this.onDataUpdate();\n }, {\n deep: true,\n });\n } else if (this.$_watchData) {\n this.$_watchData();\n this.$_watchData = null;\n }\n },\n\n onVscrollUpdate ({ force }) {\n // If not active, sechedule a size update when it becomes active\n if (!this.finalActive && force) {\n this.$_pendingVScrollUpdate = this.id;\n }\n\n if (this.$_forceNextVScrollUpdate === this.id || force || !this.size) {\n this.updateSize();\n }\n },\n\n onDataUpdate () {\n this.updateSize();\n },\n\n computeSize (id) {\n this.$nextTick(() => {\n if (this.id === id) {\n const width = returnFirstEl(this.$el).offsetWidth;\n const height = returnFirstEl(this.$el).offsetHeight;\n this.applyWidthHeight(width, height);\n }\n this.$_pendingSizeUpdate = null;\n });\n },\n\n applyWidthHeight (width, height) {\n const size = ~~(this.vscrollParent.direction === 'vertical' ? height : width);\n if (size && this.size !== size) {\n this.applySize(size);\n }\n },\n\n applySize (size) {\n if (this.vscrollParent.$_undefinedMap[this.id]) {\n this.vscrollParent.$_undefinedSizes--;\n this.vscrollParent.$_undefinedMap[this.id] = undefined;\n }\n this.vscrollData.sizes[this.id] = size;\n },\n\n observeSize () {\n if (!this.vscrollResizeObserver) return;\n if (this.$_sizeObserved) return;\n this.vscrollResizeObserver.observe(returnFirstEl(this.$el));\n this.$el.$_vs_id = this.id;\n this.$el.$_vs_onResize = this.onResize;\n this.$_sizeObserved = true;\n },\n\n unobserveSize () {\n if (!this.vscrollResizeObserver) return;\n if (!this.$_sizeObserved) return;\n this.vscrollResizeObserver.unobserve(returnFirstEl(this.$el));\n this.$el.$_vs_onResize = undefined;\n this.$_sizeObserved = false;\n },\n\n onResize (id, width, height) {\n if (this.id === id) {\n this.applyWidthHeight(width, height);\n }\n },\n },\n\n render () {\n return h(this.tag, this.$slots.default());\n },\n};\n</script>\n","<template>\n <core-scroller\n ref=\"scroller\"\n :items=\"itemsWithSize\"\n :min-item-size=\"minItemSize\"\n :direction=\"direction\"\n :key-field=\"keyField\"\n :list-tag=\"listTag\"\n :item-tag=\"itemTag\"\n v-bind=\"$attrs\"\n >\n <template\n #default=\"{ item: itemWithSize, index, active }\"\n >\n <dt-scroller-item\n :item=\"itemWithSize\"\n :active=\"active\"\n :size-dependencies=\"[\n itemWithSize.message,\n ]\"\n :data-index=\"index\"\n >\n <slot\n v-bind=\"{\n item: itemWithSize.item,\n index,\n active,\n itemWithSize,\n }\"\n />\n </dt-scroller-item>\n </template>\n\n <template\n v-if=\"$slots.before\"\n #before\n >\n <slot name=\"before\" />\n </template>\n\n <template\n v-if=\"$slots.empty\"\n #empty\n >\n <slot name=\"empty\" />\n </template>\n\n <template\n v-if=\"$slots.after\"\n #after\n >\n <slot name=\"after\" />\n </template>\n </core-scroller>\n</template>\n\n<!-- eslint-disable-next-line max-len -->\n<!-- This is a code from external library (https://github.com/Akryum/vue-virtual-scroller/blob/master/packages/vue-virtual-scroller/src/components/DynamicScroller.vue)\nWe have modified it for our own specific use. -->\n<script>\nimport CoreScroller from './CoreScroller.vue';\nimport DtScrollerItem from './ScrollerItem.vue';\nimport { returnFirstEl } from '@/common/utils';\n\nexport default {\n name: 'DynamicScroller',\n\n components: {\n CoreScroller,\n DtScrollerItem,\n },\n\n provide () {\n if (typeof ResizeObserver !== 'undefined') {\n this.$_resizeObserver = new ResizeObserver(entries => {\n requestAnimationFrame(() => {\n if (!Array.isArray(entries)) {\n return;\n }\n for (const entry of entries) {\n if (entry.target && entry.target.$_vs_onResize) {\n let width, height;\n if (entry.borderBoxSize) {\n const resizeObserverSize = entry.borderBoxSize[0];\n width = resizeObserverSize.inlineSize;\n height = resizeObserverSize.blockSize;\n } else {\n // @TODO remove when contentRect is deprecated\n width = entry.contentRect.width;\n height = entry.contentRect.height;\n }\n entry.target.$_vs_onResize(entry.target.$_vs_id, width, height);\n }\n }\n });\n });\n }\n\n return {\n vscrollData: this.vscrollData,\n vscrollParent: this,\n vscrollResizeObserver: this.$_resizeObserver,\n };\n },\n\n inheritAttrs: false,\n\n props: {\n /*\n * The items to render.\n * If the items are simple arrays, the index will be used as the key.\n * If the items are objects, the keyField will be used as the key.\n */\n items: {\n type: Array,\n required: true,\n },\n\n /*\n * Indicates if the items are dynamic.\n * If true, the items will be wrapped in a DtScrollerItem component.\n * This is required for dynamic items to be able to react to changes in their size.\n */\n dynamic: {\n type: Boolean,\n default: false,\n },\n\n /*\n * The key field to use for the items.\n * Only used if the items are objects.\n */\n keyField: {\n type: String,\n default: 'id',\n },\n\n /*\n * The direction of the scroller.\n * Can be either 'vertical' or 'horizontal'.\n */\n direction: {\n type: String,\n default: 'vertical',\n validator: (value) => ['vertical', 'horizontal'].includes(value),\n },\n\n /*\n * The tag to use for the list.\n */\n listTag: {\n type: String,\n default: 'div',\n },\n\n /*\n * The tag to use for the items.\n */\n itemTag: {\n type: String,\n default: 'div',\n },\n\n /*\n * Display height (or width in horizontal mode) of the items in pixels\n * used to calculate the scroll size and position.\n * Is required for the initial render of items in DYNAMIC size mode.\n */\n minItemSize: {\n type: [Number, String],\n },\n },\n\n data () {\n return {\n vscrollData: {\n active: true,\n sizes: {},\n keyField: this.keyField,\n simpleArray: false,\n },\n };\n },\n\n computed: {\n simpleArray () {\n return this.items.length && typeof this.items[0] !== 'object';\n },\n\n itemsWithSize () {\n const result = [];\n const { items, keyField, simpleArray } = this;\n const sizes = this.vscrollData.sizes;\n const l = items.length;\n for (let i = 0; i < l; i++) {\n const item = items[i];\n const id = simpleArray ? i : item[keyField];\n let size = sizes[id];\n if (typeof size === 'undefined' && !this.$_undefinedMap[id]) {\n size = 0;\n }\n result.push({\n item,\n [keyField]: id,\n size,\n });\n }\n return result;\n },\n },\n\n watch: {\n simpleArray: {\n handler (value) {\n this.vscrollData.simpleArray = value;\n },\n\n immediate: true,\n },\n\n itemsWithSize (next, prev) {\n const scrollTop = returnFirstEl(this.$el).scrollTop;\n\n // Calculate total diff between prev and next sizes\n // over current scroll top. Then add it to scrollTop to\n // avoid jumping the contents that the user is seeing.\n let prevActiveTop = 0; let activeTop = 0;\n const length = Math.min(next.length, prev.length);\n for (let i = 0; i < length; i++) {\n if (prevActiveTop >= scrollTop) {\n break;\n }\n prevActiveTop += prev[i].size || this.minItemSize;\n activeTop += next[i].size || this.minItemSize;\n }\n const offset = activeTop - prevActiveTop;\n\n if (offset === 0) {\n return;\n }\n\n returnFirstEl(this.$el).scrollTop += offset;\n },\n },\n\n beforeCreate () {\n this.$_updates = [];\n this.$_undefinedSizes = 0;\n this.$_undefinedMap = {};\n },\n\n activated () {\n this.vscrollData.active = true;\n },\n\n deactivated () {\n this.vscrollData.active = false;\n },\n\n methods: {\n dynamicScrollerUpdateItems () {\n const scroller = this.$refs.scroller;\n if (scroller) scroller._updateVisibleItems(true);\n },\n\n dynamicScrollerUpdateItemsFromBottom () {\n const scroller = this.$refs.scroller;\n if (scroller) scroller._updateVisibleItems(false, true);\n },\n\n scrollToItem (index) {\n const scroller = this.$refs.scroller;\n if (scroller) scroller.scrollToItem(index);\n },\n\n scrollToBottom () {\n if (this.$_scrollingToBottom) return;\n this.$_scrollingToBottom = true;\n const el = returnFirstEl(this.$el);\n // Item is inserted to the DOM\n this.$nextTick(() => {\n el.scrollTop = el.scrollHeight + 5000;\n // Item sizes are computed\n const cb = () => {\n el.scrollTop = el.scrollHeight + 5000;\n requestAnimationFrame(() => {\n el.scrollTop = el.scrollHeight + 5000;\n if (this.$_undefinedSizes === 0) {\n this.$_scrollingToBottom = false;\n } else {\n requestAnimationFrame(cb);\n }\n });\n };\n requestAnimationFrame(cb);\n });\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"dynamic ? DynamicScroller : CoreScroller\"\n ref=\"scroller\"\n data-qa=\"dt-scroller\"\n :items=\"items\"\n :item-size=\"itemSize\"\n :min-item-size=\"minItemSize\"\n :buffer=\"buffer\"\n :direction=\"direction\"\n :key-field=\"keyField\"\n :list-tag=\"listTag\"\n :item-tag=\"itemTag\"\n :style=\"computedStyle\"\n tabindex=\"0\"\n @user-position=\"$emit('user-position', $event)\"\n @scroll-start=\"$emit('scroll-start')\"\n @scroll-end=\"$emit('scroll-end')\"\n >\n <template\n #default=\"{ item, index, active }\"\n >\n <slot\n v-bind=\"{\n item: item,\n index,\n active,\n }\"\n />\n </template>\n\n <template\n v-if=\"$slots.before\"\n #before\n >\n <!-- @slot Content rendered before the items, inside the scroll viewport. Scrolls with the list. -->\n <slot name=\"before\" />\n </template>\n\n <template\n v-if=\"$slots.empty\"\n #empty\n >\n <!-- @slot Content rendered inside the list wrapper only while the list is empty. -->\n <slot name=\"empty\" />\n </template>\n\n <template\n v-if=\"$slots.after\"\n #after\n >\n <!-- @slot Content rendered after the items, inside the scroll viewport. Scrolls with the list. -->\n <slot name=\"after\" />\n </template>\n </component>\n</template>\n\n<script setup>\nimport CoreScroller from './Modules/CoreScroller.vue';\nimport DynamicScroller from './Modules/DynamicScroller.vue';\nimport { provide, computed, watch, ref } from 'vue';\n\ndefineOptions({\n name: 'DtScroller',\n});\n\nconst props = defineProps({\n /**\n * Amount of pixels added to each edge of the scroll viewport, so items are rendered\n * before they scroll into view. Also controls how early `scroll-start` and `scroll-end`\n * fire relative to the viewport edges.\n */\n buffer: {\n type: Number,\n default: 200,\n },\n\n /**\n * The direction of the scroller.\n * @values vertical, horizontal\n */\n direction: {\n type: String,\n default: 'vertical',\n validator: (value) => ['vertical', 'horizontal'].includes(value),\n },\n\n /**\n * Indicates if the items need to react to changes in their size.\n * If disabled the itemSize prop is required and you will get improved performance.\n * If enabled the minItemSize prop is required and you\n * will have reduced performance but the ability to reactively size list items\n * @values true, false\n */\n dynamic: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Display height (or width in horizontal mode) of the items in pixels\n * used to calculate the scroll size and position.\n * Required if DYNAMIC is false\n */\n itemSize: {\n type: Number,\n default: null,\n },\n\n /**\n * The tag to use for the items.\n */\n itemTag: {\n type: String,\n default: 'div',\n },\n\n /**\n * The items to render.\n * If the items are simple arrays, the index will be used as the key.\n * If the items are objects, the keyField will be used as the key.\n * @example items: [ 'item1', 'item2', 'item3' ]\n * @example items: [ { id: 1, name: 'item1' }, { id: 2, name: 'item2' }, { id: 3, name: 'item3' } ]\n */\n items: {\n type: Array,\n required: true,\n },\n\n /**\n * The key field to use for the items.\n * If the items are objects, the scroller needs to be able to identify them.\n * By default it will look for an id field on the items.\n * This can be configured with this prop if you are using another field name.\n */\n keyField: {\n type: String,\n default: 'id',\n },\n\n /**\n * The tag to use for the list.\n */\n listTag: {\n type: String,\n default: 'div',\n },\n\n /**\n * Minimum size used if the height (or width in horizontal mode) of a item is unknown.\n * Is required for the initial render of items in DYNAMIC size mode.\n */\n minItemSize: {\n type: [Number, String],\n default: null,\n },\n\n /**\n * The height of the scroller.\n * Can be a number (in pixels) or a string (in CSS units).\n */\n scrollerHeight: {\n type: [String, Number],\n default: '100%',\n },\n\n /**\n * The width of the scroller.\n * Can be a number (in pixels) or a string (in CSS units).\n */\n scrollerWidth: {\n type: [String, Number],\n default: '100%',\n },\n});\n\nconst emits = defineEmits([\n /**\n * Describe when the scroller changes from block-start (aka top) / middle / block-end (aka bottom).\n * The top and bottom values are deprecated and will ideally be removed in the next major version.\n * Please use blockStart and blockEnd instead.\n * @param {string} position The position of the scroller.\n * @values blockStart, middle, blockEnd, top, bottom\n */\n 'user-position',\n\n /**\n * Emitted when the first item enters the rendered view pool. Fires at least one `buffer`\n * length before the viewport's start edge is reached (earlier still with `before` slot\n * content), so callers can prepend items ahead of time.\n */\n 'scroll-start',\n\n /**\n * Emitted when the last item enters the rendered view pool. Fires at least one `buffer`\n * length before the viewport's end edge is reached (earlier still with `after` slot\n * content), so callers can append items ahead of time.\n */\n 'scroll-end',\n]);\n\nprovide('emit', emits);\n\nconst scroller = ref(null);\n\nconst computedStyle = computed(() => {\n return {\n width: typeof props.scrollerWidth === 'number' ? `${props.scrollerWidth}px` : props.scrollerWidth,\n height: typeof props.scrollerHeight === 'number' ? `${props.scrollerHeight}px` : props.scrollerHeight,\n };\n});\n\nwatch(props, () => {\n validateProps();\n}, { deep: true, immediate: true });\n\nfunction scrollToBottom () {\n if (scroller.value) scroller.value.scrollToBottom();\n}\n\nfunction scrollToItem (index) {\n if (scroller.value) scroller.value.scrollToItem(index);\n}\n\nfunction updateItems () {\n if (!scroller.value) return;\n if (props.dynamic) {\n scroller.value.dynamicScrollerUpdateItems();\n } else {\n scroller.value._updateVisibleItems(true);\n }\n}\n\nfunction updateItemsFromBottom () {\n if (!scroller.value) return;\n if (props.dynamic) {\n scroller.value.dynamicScrollerUpdateItemsFromBottom();\n } else {\n scroller.value._updateVisibleItems(false, true);\n }\n}\n\nfunction validateProps () {\n if (props.dynamic && !props.minItemSize) {\n console.error('scroller error: \\'minItemSize\\' is required on \\'dynamic\\' mode.');\n }\n\n if (!props.dynamic && !props.itemSize) {\n console.error('scroller error: \\'itemSize\\' is required.');\n }\n}\n\ndefineExpose({\n scrollToBottom,\n scrollToItem,\n updateItems,\n updateItemsFromBottom,\n});\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoFA,IAAM,IAAQ,GAsGR,IAAO,GAEP,IAAQ,kBAAS,IAAI,KA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) => void;
8
8
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
9
9
  continuous: boolean;
10
- };
10
+ } | undefined;
11
11
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
12
12
  direction: string;
13
13
  listClass: string | unknown[] | Record<string, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"CoreScroller.vue.d.ts","sourceRoot":"","sources":["../../../../components/Scroller/Modules/CoreScroller.vue"],"names":[],"mappings":"AA4EA;wBA+1CqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAdjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAWG"}
1
+ {"version":3,"file":"CoreScroller.vue.d.ts","sourceRoot":"","sources":["../../../../components/Scroller/Modules/CoreScroller.vue"],"names":[],"mappings":"AA4EA;wBAu2CqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAdjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAWG"}
@@ -87,7 +87,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
87
87
  scrollToItem: (index: any) => void;
88
88
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
89
89
  continuous: boolean;
90
- };
90
+ } | undefined;
91
91
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
92
92
  direction: string;
93
93
  listClass: string | unknown[] | Record<string, any>;
@@ -131,7 +131,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
131
131
  scrollToItem: (index: any) => void;
132
132
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
133
133
  continuous: boolean;
134
- };
134
+ } | undefined;
135
135
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
136
136
  direction: string;
137
137
  listClass: string | unknown[] | Record<string, any>;
@@ -167,7 +167,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
167
167
  scrollToItem: (index: any) => void;
168
168
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
169
169
  continuous: boolean;
170
- };
170
+ } | undefined;
171
171
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
172
172
  direction: string;
173
173
  listClass: string | unknown[] | Record<string, any>;
@@ -339,7 +339,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
339
339
  scrollToItem: (index: any) => void;
340
340
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
341
341
  continuous: boolean;
342
- };
342
+ } | undefined;
343
343
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
344
344
  direction: string;
345
345
  listClass: string | unknown[] | Record<string, any>;
@@ -383,7 +383,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
383
383
  scrollToItem: (index: any) => void;
384
384
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
385
385
  continuous: boolean;
386
- };
386
+ } | undefined;
387
387
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
388
388
  direction: string;
389
389
  listClass: string | unknown[] | Record<string, any>;
@@ -419,7 +419,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
419
419
  scrollToItem: (index: any) => void;
420
420
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
421
421
  continuous: boolean;
422
- };
422
+ } | undefined;
423
423
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
424
424
  direction: string;
425
425
  listClass: string | unknown[] | Record<string, any>;
@@ -59,7 +59,7 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
59
59
  scrollToItem: (index: any) => void;
60
60
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
61
61
  continuous: boolean;
62
- };
62
+ } | undefined;
63
63
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
64
64
  direction: string;
65
65
  listClass: string | unknown[] | Record<string, any>;
@@ -111,7 +111,7 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
111
111
  scrollToItem: (index: any) => void;
112
112
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
113
113
  continuous: boolean;
114
- };
114
+ } | undefined;
115
115
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
116
116
  direction: string;
117
117
  listClass: string | unknown[] | Record<string, any>;
@@ -210,7 +210,7 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
210
210
  scrollToItem: (index: any) => void;
211
211
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
212
212
  continuous: boolean;
213
- };
213
+ } | undefined;
214
214
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
215
215
  direction: string;
216
216
  listClass: string | unknown[] | Record<string, any>;
@@ -254,7 +254,7 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
254
254
  scrollToItem: (index: any) => void;
255
255
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
256
256
  continuous: boolean;
257
- };
257
+ } | undefined;
258
258
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
259
259
  direction: string;
260
260
  listClass: string | unknown[] | Record<string, any>;
@@ -290,7 +290,7 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
290
290
  scrollToItem: (index: any) => void;
291
291
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
292
292
  continuous: boolean;
293
- };
293
+ } | undefined;
294
294
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
295
295
  direction: string;
296
296
  listClass: string | unknown[] | Record<string, any>;
@@ -498,7 +498,7 @@ type __VLS_TemplateResult = {
498
498
  scrollToItem: (index: any) => void;
499
499
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
500
500
  continuous: boolean;
501
- };
501
+ } | undefined;
502
502
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
503
503
  direction: string;
504
504
  listClass: string | unknown[] | Record<string, any>;
@@ -534,7 +534,7 @@ type __VLS_TemplateResult = {
534
534
  scrollToItem: (index: any) => void;
535
535
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
536
536
  continuous: boolean;
537
- };
537
+ } | undefined;
538
538
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
539
539
  direction: string;
540
540
  listClass: string | unknown[] | Record<string, any>;
@@ -632,7 +632,7 @@ type __VLS_TemplateResult = {
632
632
  scrollToItem: (index: any) => void;
633
633
  _updateVisibleItems: (checkItem: any, checkPositionDiff?: boolean) => {
634
634
  continuous: boolean;
635
- };
635
+ } | undefined;
636
636
  $emit: (event: "user-position" | "scroll-start" | "scroll-end", ...args: any[]) => void;
637
637
  direction: string;
638
638
  listClass: string | unknown[] | Record<string, any>;