@progress/kendo-vue-grid 7.1.0-develop.4 → 7.1.0-develop.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/GridNav.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),e=require("@progress/kendo-vue-common"),n=o.defineComponent({name:"KendoGridNav",props:{currentData:Array},inject:{onNavKeyDown:{default:e.noop},onNavFocus:{default:e.noop},onNavMount:{default:e.noop},handleDispatchFocus:{default:e.noop},kbContext:{default:null},navigation:{default:null}},mounted(){this.onNavMount({scope:this.$el||void 0})},updated(){this.onNavMount({scope:this.$el||void 0})},methods:{onKeyDown(t){this.onNavKeyDown(t,{navigation:this.navigation,kbContext:this.kbContext,onNavigationAction:this.onNavigationAction}),this.$emit("keydown",{dataItems:this.getLeafDataItems(),componentId:this._gridId,selectedField:this.$props.selectedField,event:t})},onFocus(t){this.onNavFocus(t,{kbContext:this.kbContext})},onNavigationAction(t){this.$emit("navigationaction",{focusElement:t.focusElement,event:t.event})},getLeafDataItems(){return this.$props.currentData.filter(t=>t.rowType==="data").map(t=>t.dataItem)}},render(){const t=e.getDefaultSlots(this);return o.createVNode("div",{onKeydown:this.onKeyDown,onFocusin:this.onFocus,"data-keyboardnavscope":!0},[t])}});exports.GridNav=n;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),e=require("@progress/kendo-vue-common"),n=o.defineComponent({name:"KendoGridNav",props:{currentData:Array,id:String},inject:{onNavKeyDown:{default:e.noop},onNavFocus:{default:e.noop},onNavMount:{default:e.noop},handleDispatchFocus:{default:e.noop},kbContext:{default:null},navigation:{default:null}},mounted(){this.onNavMount({scope:this.$el||void 0})},updated(){this.onNavMount({scope:this.$el||void 0})},methods:{onKeyDown(t){this.onNavKeyDown(t,{navigation:this.navigation,kbContext:this.kbContext,onNavigationAction:this.onNavigationAction}),this.$emit("keydown",{dataItems:this.getLeafDataItems(),componentId:this._gridId,selectedField:this.$props.selectedField,event:t})},onFocus(t){this.onNavFocus(t,{kbContext:this.kbContext})},onNavigationAction(t){this.$emit("navigationaction",{focusElement:t.focusElement,event:t.event})},getLeafDataItems(){return this.$props.currentData.filter(t=>t.rowType==="data").map(t=>t.dataItem)}},render(){const t=e.getDefaultSlots(this);return o.createVNode("div",{onKeydown:this.onKeyDown,onFocusin:this.onFocus,id:this.$props.id,"data-keyboardnavscope":!0},[t])}});exports.GridNav=n;
package/GridNav.mjs CHANGED
@@ -10,7 +10,8 @@ import { noop as e, getDefaultSlots as a } from "@progress/kendo-vue-common";
10
10
  const d = /* @__PURE__ */ o({
11
11
  name: "KendoGridNav",
12
12
  props: {
13
- currentData: Array
13
+ currentData: Array,
14
+ id: String
14
15
  },
15
16
  inject: {
16
17
  onNavKeyDown: {
@@ -77,6 +78,7 @@ const d = /* @__PURE__ */ o({
77
78
  return n("div", {
78
79
  onKeydown: this.onKeyDown,
79
80
  onFocusin: this.onFocus,
81
+ id: this.$props.id,
80
82
  "data-keyboardnavscope": !0
81
83
  }, [t]);
82
84
  }
package/GridState.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),w=require("./key.js"),m=require("./common.js"),G=require("@progress/kendo-vue-common"),P=t.defineComponent({name:"KendoVueGridStateProvider",inheritAttrs:!1,props:m.gridProps,setup(a,{emit:n}){const l=t.ref(a.filter||a.defaultFilter||null),f=e=>{l.value=e.filter,n("filterchange",e)};t.watch(()=>a.filter,e=>{l.value=e});const u=t.ref(a.search||a.defaultSearch||null),s=e=>{u.value=e.search,n("searchchange",e)};t.watch(()=>a.search,e=>{u.value=e});const c=t.ref(a.sort||a.defaultSort||[]),S=e=>{c.value=e.sort,n("sortchange",e)};t.watch(()=>a.sort,e=>{c.value=e});const d=t.ref(a.skip||a.defaultSkip||0),r=t.ref(a.take||a.defaultTake),v=e=>{d.value=e.page.skip,r.value=e.page.take,n("pagechange",e)};t.watch(()=>a.skip,e=>{d.value=e}),t.watch(()=>a.take,e=>{r.value=e});const h=t.ref(a.group||a.defaultGroup||[]),x=e=>{h.value=e.group,n("groupchange",e)};t.watch(()=>a.group,e=>{h.value=e});const o=t.ref(a.detailExpand||a.defaultDetailExpand||{}),k=e=>{o.value=e.detailExpand,n("detailexpandchange",e)};t.watch(()=>a.detailExpand,e=>{o.value=e});const g=t.ref(a.groupExpand||a.defaultGroupExpand||[]),C=e=>{g.value=e.groupExpand,n("groupexpandchange",e)};t.watch(()=>a.groupExpand,e=>{g.value=e});const i=t.ref(a.columnsState||a.defaultColumnsState||[]),E=e=>{i.value=e.columnsState,n("columnsstatechange",e)};t.watch(()=>a.columnsState,e=>{i.value=e}),t.provide(w.KendoKey,{sort:c,sortchange:S,filter:l,filterchange:f,search:u,searchchange:s,skip:d,take:r,pagechange:v,group:h,groupchange:x,detailExpand:o,detailexpandchange:k,groupExpand:g,groupexpandchange:C,columnsState:i,columnsstatechange:E})},render(){return G.getDefaultSlots(this)}});exports.GridStateProvider=P;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),T=require("./key.js"),V=require("./common.js"),j=require("@progress/kendo-vue-common"),A=n.defineComponent({name:"KendoVueGridStateProvider",inheritAttrs:!1,props:V.gridProps,setup(e,{emit:l}){var u,c,d,o,h,g,r,i,s;const t=n.ref({filter:(u=e.defaultFilter)!=null?u:e.filter,highlight:e.highlight,search:(c=e.defaultSearch)!=null?c:e.search,sort:(d=e.defaultSort)!=null?d:e.sort,take:(o=e.defaultTake)!=null?o:e.take,skip:(h=e.defaultSkip)!=null?h:e.skip,group:(g=e.defaultGroup)!=null?g:e.group,detailExpand:(r=e.defaultDetailExpand)!=null?r:e.detailExpand,groupExpand:(i=e.defaultGroupExpand)!=null?i:e.groupExpand,columnsState:(s=e.defaultColumnsState)!=null?s:e.columnsState}),f=a=>{t.value={...t.value,...a.data},l("datastatechange",a)},v=n.computed(()=>e.filter||t.value.filter||null),x=a=>{t.value.filter=a.filter,l("filterchange",a)};n.watch(()=>e.filter,a=>{t.value.filter=a});const S=n.computed(()=>e.search||t.value.search||null),k=a=>{t.value.search=a.search,l("searchchange",a)};n.watch(()=>e.search,a=>{t.value.search=a});const E=n.computed(()=>e.sort||t.value.sort||[]),m=a=>{t.value.sort=a.sort,l("sortchange",a)};n.watch(()=>e.sort,a=>{t.value.sort=a});const C=n.computed(()=>e.skip||t.value.skip||0),w=n.computed(()=>e.take||t.value.take||0),p=a=>{t.value.skip=a.page.skip,t.value.take=a.page.take,l("pagechange",a)};n.watch(()=>e.skip,a=>{t.value.skip=a}),n.watch(()=>e.take,a=>{t.value.take=a});const G=n.computed(()=>e.group||t.value.group||[]),P=a=>{t.value.group=a.group,l("groupchange",a)};n.watch(()=>e.group,a=>{t.value.group=a});const q=n.computed(()=>e.detailExpand||t.value.detailExpand||{}),y=a=>{t.value.detailExpand=a.detailExpand,l("detailexpandchange",a)};n.watch(()=>e.detailExpand,a=>{t.value.detailExpand=a});const D=n.computed(()=>e.groupExpand||t.value.groupExpand||[]),K=a=>{t.value.groupExpand=a.groupExpand,l("groupexpandchange",a)};n.watch(()=>e.groupExpand,a=>{t.value.groupExpand=a});const b=n.computed(()=>e.columnsState||e.defaultColumnsState||[]),F=a=>{t.value.columnsState=a.columnsState,l("columnsstatechange",a)};n.watch(()=>e.columnsState,a=>{t.value.columnsState=a}),n.provide(T.KendoKey,{sort:E,sortchange:m,filter:v,filterchange:x,search:S,searchchange:k,skip:C,take:w,pagechange:p,group:G,groupchange:P,detailExpand:q,detailexpandchange:y,groupExpand:D,groupexpandchange:K,columnsState:b,columnsstatechange:F,datastatechange:f})},render(){return j.getDefaultSlots(this)}});exports.GridStateProvider=A;
package/GridState.mjs CHANGED
@@ -5,90 +5,110 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as G, ref as t, watch as n, provide as P } from "vue";
9
- import { KendoKey as D } from "./key.mjs";
10
- import { gridProps as K } from "./common.mjs";
11
- import { getDefaultSlots as F } from "@progress/kendo-vue-common";
12
- const V = /* @__PURE__ */ G({
8
+ import { defineComponent as b, ref as j, computed as n, watch as u, provide as q } from "vue";
9
+ import { KendoKey as z } from "./key.mjs";
10
+ import { gridProps as B } from "./common.mjs";
11
+ import { getDefaultSlots as H } from "@progress/kendo-vue-common";
12
+ const N = /* @__PURE__ */ b({
13
13
  name: "KendoVueGridStateProvider",
14
14
  inheritAttrs: !1,
15
- props: K,
15
+ props: B,
16
16
  setup(e, {
17
17
  emit: l
18
18
  }) {
19
- const u = t(e.filter || e.defaultFilter || null), s = (a) => {
20
- u.value = a.filter, l("filterchange", a);
19
+ var d, c, o, g, h, r, i, s, f;
20
+ const t = j({
21
+ // edit: props.defaultEdit ?? props.edit,
22
+ filter: (d = e.defaultFilter) != null ? d : e.filter,
23
+ highlight: e.highlight,
24
+ // select: props.defaultSelect ?? props.select,
25
+ search: (c = e.defaultSearch) != null ? c : e.search,
26
+ sort: (o = e.defaultSort) != null ? o : e.sort,
27
+ take: (g = e.defaultTake) != null ? g : e.take,
28
+ skip: (h = e.defaultSkip) != null ? h : e.skip,
29
+ group: (r = e.defaultGroup) != null ? r : e.group,
30
+ detailExpand: (i = e.defaultDetailExpand) != null ? i : e.detailExpand,
31
+ groupExpand: (s = e.defaultGroupExpand) != null ? s : e.groupExpand,
32
+ columnsState: (f = e.defaultColumnsState) != null ? f : e.columnsState
33
+ }), x = (a) => {
34
+ t.value = {
35
+ ...t.value,
36
+ ...a.data
37
+ }, l("datastatechange", a);
38
+ }, v = n(() => e.filter || t.value.filter || null), S = (a) => {
39
+ t.value.filter = a.filter, l("filterchange", a);
21
40
  };
22
- n(() => e.filter, (a) => {
23
- u.value = a;
41
+ u(() => e.filter, (a) => {
42
+ t.value.filter = a;
24
43
  });
25
- const d = t(e.search || e.defaultSearch || null), x = (a) => {
26
- d.value = a.search, l("searchchange", a);
44
+ const E = n(() => e.search || t.value.search || null), k = (a) => {
45
+ t.value.search = a.search, l("searchchange", a);
27
46
  };
28
- n(() => e.search, (a) => {
29
- d.value = a;
47
+ u(() => e.search, (a) => {
48
+ t.value.search = a;
30
49
  });
31
- const c = t(e.sort || e.defaultSort || []), S = (a) => {
32
- c.value = a.sort, l("sortchange", a);
50
+ const m = n(() => e.sort || t.value.sort || []), C = (a) => {
51
+ t.value.sort = a.sort, l("sortchange", a);
33
52
  };
34
- n(() => e.sort, (a) => {
35
- c.value = a;
53
+ u(() => e.sort, (a) => {
54
+ t.value.sort = a;
36
55
  });
37
- const o = t(e.skip || e.defaultSkip || 0), h = t(e.take || e.defaultTake), v = (a) => {
38
- o.value = a.page.skip, h.value = a.page.take, l("pagechange", a);
56
+ const G = n(() => e.skip || t.value.skip || 0), p = n(() => e.take || t.value.take || 0), D = (a) => {
57
+ t.value.skip = a.page.skip, t.value.take = a.page.take, l("pagechange", a);
39
58
  };
40
- n(() => e.skip, (a) => {
41
- o.value = a;
42
- }), n(() => e.take, (a) => {
43
- h.value = a;
59
+ u(() => e.skip, (a) => {
60
+ t.value.skip = a;
61
+ }), u(() => e.take, (a) => {
62
+ t.value.take = a;
44
63
  });
45
- const g = t(e.group || e.defaultGroup || []), E = (a) => {
46
- g.value = a.group, l("groupchange", a);
64
+ const P = n(() => e.group || t.value.group || []), K = (a) => {
65
+ t.value.group = a.group, l("groupchange", a);
47
66
  };
48
- n(() => e.group, (a) => {
49
- g.value = a;
67
+ u(() => e.group, (a) => {
68
+ t.value.group = a;
50
69
  });
51
- const r = t(e.detailExpand || e.defaultDetailExpand || {}), m = (a) => {
52
- r.value = a.detailExpand, l("detailexpandchange", a);
70
+ const F = n(() => e.detailExpand || t.value.detailExpand || {}), w = (a) => {
71
+ t.value.detailExpand = a.detailExpand, l("detailexpandchange", a);
53
72
  };
54
- n(() => e.detailExpand, (a) => {
55
- r.value = a;
73
+ u(() => e.detailExpand, (a) => {
74
+ t.value.detailExpand = a;
56
75
  });
57
- const i = t(e.groupExpand || e.defaultGroupExpand || []), C = (a) => {
58
- i.value = a.groupExpand, l("groupexpandchange", a);
76
+ const y = n(() => e.groupExpand || t.value.groupExpand || []), A = (a) => {
77
+ t.value.groupExpand = a.groupExpand, l("groupexpandchange", a);
59
78
  };
60
- n(() => e.groupExpand, (a) => {
61
- i.value = a;
79
+ u(() => e.groupExpand, (a) => {
80
+ t.value.groupExpand = a;
62
81
  });
63
- const f = t(e.columnsState || e.defaultColumnsState || []), k = (a) => {
64
- f.value = a.columnsState, l("columnsstatechange", a);
82
+ const T = n(() => e.columnsState || e.defaultColumnsState || []), V = (a) => {
83
+ t.value.columnsState = a.columnsState, l("columnsstatechange", a);
65
84
  };
66
- n(() => e.columnsState, (a) => {
67
- f.value = a;
68
- }), P(D, {
69
- sort: c,
70
- sortchange: S,
71
- filter: u,
72
- filterchange: s,
73
- search: d,
74
- searchchange: x,
75
- skip: o,
76
- take: h,
77
- pagechange: v,
78
- group: g,
79
- groupchange: E,
80
- detailExpand: r,
81
- detailexpandchange: m,
82
- groupExpand: i,
83
- groupexpandchange: C,
84
- columnsState: f,
85
- columnsstatechange: k
85
+ u(() => e.columnsState, (a) => {
86
+ t.value.columnsState = a;
87
+ }), q(z, {
88
+ sort: m,
89
+ sortchange: C,
90
+ filter: v,
91
+ filterchange: S,
92
+ search: E,
93
+ searchchange: k,
94
+ skip: G,
95
+ take: p,
96
+ pagechange: D,
97
+ group: P,
98
+ groupchange: K,
99
+ detailExpand: F,
100
+ detailexpandchange: w,
101
+ groupExpand: y,
102
+ groupexpandchange: A,
103
+ columnsState: T,
104
+ columnsstatechange: V,
105
+ datastatechange: x
86
106
  });
87
107
  },
88
108
  render() {
89
- return F(this);
109
+ return H(this);
90
110
  }
91
111
  });
92
112
  export {
93
- V as GridStateProvider
113
+ N as GridStateProvider
94
114
  };
package/VirtualScroll.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class S{constructor(s,t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.fixedScroll=!1,this.askedSkip=void 0,this.tableTransform="",this.prevScrollPos=0,this.tableTranslate=0,this.scrollSyncing=!1,this.topItems=(o,e)=>{if(!this.container||e)return{topItemsCount:0,topItemsHeight:0};const i=this.container.clientHeight,n=this.container.querySelectorAll(".k-group-footer").length,l=Math.ceil(i/o[0].line),h=Math.ceil(n/l),a=Math.max(h,Math.ceil((o.length-l)/2));let r=0;for(let p=0;p<a;p++)r+=o[p].line+o[p].acc;const c=h?n/(1+h):0,g=l+l/2+c;return{topItemsCount:a,topItemsHeight:r,itemsNeededOnScreen:g}},this.horizontalScrollbarHeight=()=>this.container?this.container.offsetHeight-this.container.clientHeight:0,s&&(this.topCacheCount=t,this.attendedSkip=-this.topCacheCount),this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef}get rowHeights(){const s=[],t=this.tableBodyRef&&this.tableBodyRef.children||[];let o=0;for(let e=0;e<t.length;e++){if(t[e].className.indexOf("k-grouping-row")>-1){o+=t[e].scrollHeight;continue}t[e].className.indexOf("k-detail-row")>-1?s[s.length-1].line+=t[e].scrollHeight:(s.push({line:t[e].scrollHeight,acc:o}),o=0)}return s}changePage(s,t){this.attendedSkip=s-this.topCacheCount,this.PageChange({skip:Math.max(0,s-this.topCacheCount),take:this.pageSize},t)}translate(s){this.tableTranslate=s,this.scrollableVirtual&&this.table&&(this.table.style.transform="translateY("+s+"px)")}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0))}localScrollUp(s){if(!this.container)return;const t=this.rowHeights,o=this.container.scrollTop;let e=this.tableTranslate,i=0;const{topItemsCount:n,topItemsHeight:l,itemsNeededOnScreen:h}=this.topItems(t,!!this.topCacheCount),a=o-e;if(!(a>l||t.length<=h)){for(;i<this.topCacheCount+this.attendedSkip-this.realSkip+n&&this.propsSkip-i>0&&!(e+(t[t.length-1-i].line+t[t.length-1-i].acc)+a<=o);)e-=t[t.length-1-i].line+t[t.length-1-i].acc,i++;if(i===0&&this.topCacheCount===0&&this.attendedSkip>0&&(e=Math.max(e-t[0].line,0),i=1),this.propsSkip-i<=0&&e>o){this.translate(0),this.changePage(0,s),this.container.scrollTop=0;return}if(e>o&&(e=o),e!==this.tableTranslate){this.translate(Math.max(0,e-l));const r=Math.max(0,this.propsSkip-i-n);this.changePage(r,s)}}}localScrollDown(s){if(!this.container)return;const t=this.rowHeights,o=this.container.scrollTop;let e=this.tableTranslate,i=0;const{topItemsCount:n,topItemsHeight:l,itemsNeededOnScreen:h}=this.topItems(t,!!this.topCacheCount);for(;i<t.length-this.topCacheCount&&!(e+t[i].line+t[i].acc>o);)e+=t[i].line+t[i].acc,i++;n>this.propsSkip+i||t.length<=h||(i>=t.length-this.topCacheCount&&this.propsSkip+i>=this.total?(this.translate(e-l),this.changePage(this.total-1-n,s)):e!==this.tableTranslate&&this.propsSkip+i-n!==this.propsSkip&&(this.translate(e-l),this.changePage(this.propsSkip+i-n,s)))}scrollNonStrict(s){const t=this.total*this.prevScrollPos/this.containerHeight;let o=Math.floor(t);o>=this.total&&(o=this.total-1);const e=Math.min(t-o,1);let i=0;const n=o-this.propsSkip,l=this.rowHeights;n>=0&&n<=1?i=-((l[0].line+l[0].acc)*e):n===-1&&(i=-((l[l.length-1].line+l[l.length-1].acc)*e));const{topItemsCount:h,topItemsHeight:a,itemsNeededOnScreen:r}=this.topItems(l,!!this.topCacheCount),c=Math.max(0,i-a-this.horizontalScrollbarHeight()+this.containerHeight*t/this.total);this.prevScrollPos<c&&l.length<=r||(this.translate(c),this.changePage(o-h,s))}scrollHandler(s){if(!this.scrollableVirtual)return;if(this.scrollSyncing||!this.container||!this.table){this.scrollSyncing=!1;return}const t=this.container.scrollTop,o=this.prevScrollPos;if(this.prevScrollPos=t,this.askedSkip!==void 0){this.translate(this.containerHeight*this.askedSkip/this.total),this.changePage(this.askedSkip,s),this.prevScrollPos=t,this.askedSkip=void 0;return}t-o<0&&t>this.tableTranslate-this.table.scrollHeight/10?this.localScrollUp(s):t-o>0&&t<this.tableTranslate+this.table.scrollHeight*2/3?this.localScrollDown(s):this.scrollNonStrict(s),this.prevScrollPos=t}}exports.VirtualScroll=S;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./utils/main.js");require("@progress/kendo-vue-common");class c{constructor(){this.table=null,this.tableBody=null,this.container=null,this.scrollHeightContainer=null,this.total=0,this.scrollableVirtual=!1,this.pageSize=0,this.fixedScroll=!1,this.tableTransform="",this.scrollSyncing=!1,this.firstToLoad=0,this.lastScrollTop=0,this.firstLoaded=0,this.lastLoaded=0,this.scrollHandler=this.scrollHandler.bind(this)}reset(){this.firstToLoad=0,this.firstLoaded=0,this.lastLoaded=0,this.rowHeightService=void 0,!this.fixedScroll&&this.container&&this.container.scrollTop!==0&&(this.scrollSyncing=!0,this.container.scrollTop=0,this.lastScrollTop=0,this.translate(0,!0))}scrollHandler(t){if(this.scrollSyncing){this.scrollSyncing=!1;return}if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!this.container)return;const i=this.container.scrollTop,e=this.lastScrollTop>=i,o=!e;this.lastScrollTop=i;const r=this.container.offsetHeight;let s=this.rowHeightService.index(i);const a=this.rowHeightService.index(i+r),h=Math.max(s+this.pageSize-this.total,0);if(s=Math.max(s-h,0),o&&a>=this.lastLoaded&&this.lastLoaded<this.total-1)this.firstToLoad=s,this.loadPage(t);else if(e&&s<this.firstToLoad){const n=Math.max(Math.floor(this.pageSize*.3)-h,0);this.firstToLoad=Math.max(s-n,0),this.loadPage(t)}}update(){var i;const t=this.getItemHeights();if(this.firstLoaded>this.firstToLoad){const e=Math.min(this.firstLoaded-this.firstToLoad,this.pageSize),o=this.getTotalHeight(e,t),r=this.getExpectedTotalHeight(e),s=o-r;s!==0&&this.adjustScroll(s)}(i=this.rowHeightService)==null||i.update(this.firstToLoad,t),this.setScrollHeightContainerHeight(),this.firstLoaded=this.firstToLoad,this.lastLoaded=this.firstLoaded+t.length-1}loadPage(t){this.rowHeightService&&(this.translate(this.rowHeightService.offset(this.firstToLoad)),this.changePage(this.firstToLoad,t))}translate(t,i){this.scrollableVirtual&&this.table&&(i?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}changePage(t,i){this.PageChange&&this.PageChange({skip:Math.max(0,t),take:this.pageSize},i)}adjustScroll(t){this.scrollSyncing=!0,this.container&&(this.container.scrollTop+=t)}setScrollHeightContainerHeight(){var t;if(this.scrollableVirtual&&this.scrollHeightContainer){let i=((t=this.rowHeightService)==null?void 0:t.totalHeight())||0;i=l.firefox?Math.min(l.firefoxMaxHeight,i):i,this.scrollHeightContainer.style.height=i+"px"}}getItemHeights(){const t=[];return this.tableBody&&Array.from(this.tableBody.children).forEach(i=>{const e=i.getBoundingClientRect().height;i.classList.contains("k-detail-row")?t[t.length-1]+=e:t.push(e)}),t}getTotalHeight(t,i){return i.slice(0,t).reduce((e,o)=>e+o,0)}getExpectedTotalHeight(t){const i=this.rowHeightService;if(!i)return 0;const e=this.firstToLoad+(t-1);return i.offset(e)+i.height(e)-i.offset(this.firstToLoad)}}exports.VirtualScroll=c;
package/VirtualScroll.mjs CHANGED
@@ -5,130 +5,86 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- class u {
9
- constructor(s, t) {
10
- this.table = null, this.containerHeight = 0, this.topCacheCount = 0, this.attendedSkip = 0, this.propsSkip = 0, this.total = 0, this.scrollableVirtual = !1, this.realSkip = 0, this.pageSize = 0, this.fixedScroll = !1, this.askedSkip = void 0, this.tableTransform = "", this.prevScrollPos = 0, this.tableTranslate = 0, this.scrollSyncing = !1, this.topItems = (o, e) => {
11
- if (!this.container || e)
12
- return { topItemsCount: 0, topItemsHeight: 0 };
13
- const i = this.container.clientHeight, n = this.container.querySelectorAll(".k-group-footer").length, l = Math.ceil(i / o[0].line), h = Math.ceil(n / l), a = Math.max(h, Math.ceil((o.length - l) / 2));
14
- let r = 0;
15
- for (let p = 0; p < a; p++)
16
- r += o[p].line + o[p].acc;
17
- const c = h ? n / (1 + h) : 0, g = l + l / 2 + c;
18
- return {
19
- topItemsCount: a,
20
- topItemsHeight: r,
21
- itemsNeededOnScreen: g
22
- };
23
- }, this.horizontalScrollbarHeight = () => this.container ? this.container.offsetHeight - this.container.clientHeight : 0, s && (this.topCacheCount = t, this.attendedSkip = -this.topCacheCount), this.scrollHandler = this.scrollHandler.bind(this);
8
+ import { firefox as n, firefoxMaxHeight as c } from "./utils/main.mjs";
9
+ import "@progress/kendo-vue-common";
10
+ class H {
11
+ constructor() {
12
+ this.table = null, this.tableBody = null, this.container = null, this.scrollHeightContainer = null, this.total = 0, this.scrollableVirtual = !1, this.pageSize = 0, this.fixedScroll = !1, this.tableTransform = "", this.scrollSyncing = !1, this.firstToLoad = 0, this.lastScrollTop = 0, this.firstLoaded = 0, this.lastLoaded = 0, this.scrollHandler = this.scrollHandler.bind(this);
24
13
  }
25
- get container() {
26
- return this.containerRef;
14
+ reset() {
15
+ this.firstToLoad = 0, this.firstLoaded = 0, this.lastLoaded = 0, this.rowHeightService = void 0, !this.fixedScroll && this.container && this.container.scrollTop !== 0 && (this.scrollSyncing = !0, this.container.scrollTop = 0, this.lastScrollTop = 0, this.translate(0, !0));
16
+ }
17
+ scrollHandler(t) {
18
+ if (this.scrollSyncing) {
19
+ this.scrollSyncing = !1;
20
+ return;
21
+ }
22
+ if (!this.scrollableVirtual || !this.container || !this.table || !this.rowHeightService || !this.container)
23
+ return;
24
+ const i = this.container.scrollTop, e = this.lastScrollTop >= i, o = !e;
25
+ this.lastScrollTop = i;
26
+ const h = this.container.offsetHeight;
27
+ let s = this.rowHeightService.index(i);
28
+ const a = this.rowHeightService.index(i + h), r = Math.max(s + this.pageSize - this.total, 0);
29
+ if (s = Math.max(s - r, 0), o && a >= this.lastLoaded && this.lastLoaded < this.total - 1)
30
+ this.firstToLoad = s, this.loadPage(t);
31
+ else if (e && s < this.firstToLoad) {
32
+ const l = Math.max(Math.floor(this.pageSize * 0.3) - r, 0);
33
+ this.firstToLoad = Math.max(s - l, 0), this.loadPage(t);
34
+ }
27
35
  }
28
- /**
29
- * @return - The row heights in an array.
30
- */
31
- get rowHeights() {
32
- const s = [], t = this.tableBodyRef && this.tableBodyRef.children || [];
33
- let o = 0;
34
- for (let e = 0; e < t.length; e++) {
35
- if (t[e].className.indexOf("k-grouping-row") > -1) {
36
- o += t[e].scrollHeight;
37
- continue;
38
- }
39
- t[e].className.indexOf("k-detail-row") > -1 ? s[s.length - 1].line += t[e].scrollHeight : (s.push({
40
- line: t[e].scrollHeight,
41
- acc: o
42
- }), o = 0);
36
+ update() {
37
+ var i;
38
+ const t = this.getItemHeights();
39
+ if (this.firstLoaded > this.firstToLoad) {
40
+ const e = Math.min(this.firstLoaded - this.firstToLoad, this.pageSize), o = this.getTotalHeight(e, t), h = this.getExpectedTotalHeight(e), s = o - h;
41
+ s !== 0 && this.adjustScroll(s);
43
42
  }
44
- return s;
43
+ (i = this.rowHeightService) == null || i.update(this.firstToLoad, t), this.setScrollHeightContainerHeight(), this.firstLoaded = this.firstToLoad, this.lastLoaded = this.firstLoaded + t.length - 1;
44
+ }
45
+ loadPage(t) {
46
+ this.rowHeightService && (this.translate(this.rowHeightService.offset(this.firstToLoad)), this.changePage(this.firstToLoad, t));
45
47
  }
46
- changePage(s, t) {
47
- this.attendedSkip = s - this.topCacheCount, this.PageChange(
48
+ translate(t, i) {
49
+ this.scrollableVirtual && this.table && (i ? this.table.style.transform = "translateY(" + t + "px)" : this.tableTransform = "translateY(" + t + "px)");
50
+ }
51
+ changePage(t, i) {
52
+ this.PageChange && this.PageChange(
48
53
  {
49
- skip: Math.max(0, s - this.topCacheCount),
54
+ skip: Math.max(0, t),
50
55
  take: this.pageSize
51
56
  },
52
- t
57
+ i
53
58
  );
54
59
  }
55
- translate(s) {
56
- this.tableTranslate = s, this.scrollableVirtual && this.table && (this.table.style.transform = "translateY(" + s + "px)");
57
- }
58
- reset() {
59
- this.scrollSyncing = !0, !this.fixedScroll && (this.container && (this.container.scrollTop = 0), this.translate(0));
60
+ adjustScroll(t) {
61
+ this.scrollSyncing = !0, this.container && (this.container.scrollTop += t);
60
62
  }
61
- localScrollUp(s) {
62
- if (!this.container)
63
- return;
64
- const t = this.rowHeights, o = this.container.scrollTop;
65
- let e = this.tableTranslate, i = 0;
66
- const {
67
- topItemsCount: n,
68
- topItemsHeight: l,
69
- itemsNeededOnScreen: h
70
- } = this.topItems(t, !!this.topCacheCount), a = o - e;
71
- if (!(a > l || t.length <= h)) {
72
- for (; i < this.topCacheCount + this.attendedSkip - this.realSkip + n && this.propsSkip - i > 0 && !(e + (t[t.length - 1 - i].line + t[t.length - 1 - i].acc) + a <= o); )
73
- e -= t[t.length - 1 - i].line + t[t.length - 1 - i].acc, i++;
74
- if (i === 0 && this.topCacheCount === 0 && this.attendedSkip > 0 && (e = Math.max(e - t[0].line, 0), i = 1), this.propsSkip - i <= 0 && e > o) {
75
- this.translate(0), this.changePage(0, s), this.container.scrollTop = 0;
76
- return;
77
- }
78
- if (e > o && (e = o), e !== this.tableTranslate) {
79
- this.translate(Math.max(0, e - l));
80
- const r = Math.max(0, this.propsSkip - i - n);
81
- this.changePage(r, s);
82
- }
63
+ setScrollHeightContainerHeight() {
64
+ var t;
65
+ if (this.scrollableVirtual && this.scrollHeightContainer) {
66
+ let i = ((t = this.rowHeightService) == null ? void 0 : t.totalHeight()) || 0;
67
+ i = n ? Math.min(c, i) : i, this.scrollHeightContainer.style.height = i + "px";
83
68
  }
84
69
  }
85
- localScrollDown(s) {
86
- if (!this.container)
87
- return;
88
- const t = this.rowHeights, o = this.container.scrollTop;
89
- let e = this.tableTranslate, i = 0;
90
- const {
91
- topItemsCount: n,
92
- topItemsHeight: l,
93
- itemsNeededOnScreen: h
94
- } = this.topItems(t, !!this.topCacheCount);
95
- for (; i < t.length - this.topCacheCount && !(e + t[i].line + t[i].acc > o); )
96
- e += t[i].line + t[i].acc, i++;
97
- n > this.propsSkip + i || t.length <= h || (i >= t.length - this.topCacheCount && this.propsSkip + i >= this.total ? (this.translate(e - l), this.changePage(this.total - 1 - n, s)) : e !== this.tableTranslate && this.propsSkip + i - n !== this.propsSkip && (this.translate(e - l), this.changePage(this.propsSkip + i - n, s)));
70
+ getItemHeights() {
71
+ const t = [];
72
+ return this.tableBody && Array.from(this.tableBody.children).forEach((i) => {
73
+ const e = i.getBoundingClientRect().height;
74
+ i.classList.contains("k-detail-row") ? t[t.length - 1] += e : t.push(e);
75
+ }), t;
98
76
  }
99
- scrollNonStrict(s) {
100
- const t = this.total * this.prevScrollPos / this.containerHeight;
101
- let o = Math.floor(t);
102
- o >= this.total && (o = this.total - 1);
103
- const e = Math.min(t - o, 1);
104
- let i = 0;
105
- const n = o - this.propsSkip, l = this.rowHeights;
106
- n >= 0 && n <= 1 ? i = -((l[0].line + l[0].acc) * e) : n === -1 && (i = -((l[l.length - 1].line + l[l.length - 1].acc) * e));
107
- const {
108
- topItemsCount: h,
109
- topItemsHeight: a,
110
- itemsNeededOnScreen: r
111
- } = this.topItems(l, !!this.topCacheCount), c = Math.max(
112
- 0,
113
- i - a - this.horizontalScrollbarHeight() + this.containerHeight * t / this.total
114
- );
115
- this.prevScrollPos < c && l.length <= r || (this.translate(c), this.changePage(o - h, s));
77
+ getTotalHeight(t, i) {
78
+ return i.slice(0, t).reduce((e, o) => e + o, 0);
116
79
  }
117
- scrollHandler(s) {
118
- if (!this.scrollableVirtual)
119
- return;
120
- if (this.scrollSyncing || !this.container || !this.table) {
121
- this.scrollSyncing = !1;
122
- return;
123
- }
124
- const t = this.container.scrollTop, o = this.prevScrollPos;
125
- if (this.prevScrollPos = t, this.askedSkip !== void 0) {
126
- this.translate(this.containerHeight * this.askedSkip / this.total), this.changePage(this.askedSkip, s), this.prevScrollPos = t, this.askedSkip = void 0;
127
- return;
128
- }
129
- t - o < 0 && t > this.tableTranslate - this.table.scrollHeight / 10 ? this.localScrollUp(s) : t - o > 0 && t < this.tableTranslate + this.table.scrollHeight * 2 / 3 ? this.localScrollDown(s) : this.scrollNonStrict(s), this.prevScrollPos = t;
80
+ getExpectedTotalHeight(t) {
81
+ const i = this.rowHeightService;
82
+ if (!i)
83
+ return 0;
84
+ const e = this.firstToLoad + (t - 1);
85
+ return i.offset(e) + i.height(e) - i.offset(this.firstToLoad);
130
86
  }
131
87
  }
132
88
  export {
133
- u as VirtualScroll
89
+ H as VirtualScroll
134
90
  };
package/cells/GridCell.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),o=require("../utils/main.js"),a=require("@progress/kendo-vue-intl"),s=require("@progress/kendo-vue-common"),l=require("@progress/kendo-vue-data-tools"),d=r.defineComponent({name:"GridCell",inheritAttrs:!1,emits:{cellclick:null,cellkeydown:null},props:{id:String,field:String,dataItem:Object,format:String,readFormat:String,className:String,colSpan:Number,columnIndex:Number,columnsCount:Number,dataIndex:Number,rowType:String,level:Number,expanded:Boolean,type:String,editor:String,isSelected:Boolean,isHighlighted:Boolean,ariaColumnIndex:Number,render:[String,Function,Object],isRtl:Boolean,onEdit:Function,onSave:Function,onRemove:Function,onCancel:Function,onChange:Function,onSelectionchange:Function},inject:{kendoIntlService:{default:null},getKeyboardNavigationAttributes:{default:s.noop}},methods:{triggerClick(){this.$emit("cellclick",{dataItem:this.$props.dataItem,field:this.$props.field})},triggerKeydown(e){this.$emit("cellkeydown",{event:e,dataItem:this.$props.dataItem,field:this.$props.field})},triggerEdit(e){this.$emit("edit",e)},triggerAdd(e){this.$emit("add",e)},triggerCancel(e){this.$emit("cancel",e)},triggerSave(e){this.$emit("save",e)},triggerRemove(e){this.$emit("remove",e)}},created(){this._intl=a.provideIntlService(this)},computed:{tdClass(){const{className:e,isHighlighted:t}=this.$props;return{"k-table-td":!0,"k-highlighted":t,[e]:e}}},setup(){return{kendoIntlService:r.inject("kendoIntlService",{})}},render(){let e=null;const t=this.getKeyboardNavigationAttributes(this.$props.id);if(this.$props.rowType==="groupFooter")e=r.createVNode("td",{class:this.tdClass},null);else if(this.$props.field!==void 0&&this.$props.rowType!=="groupHeader"){const i=o.getNestedValue(this.$props.field,this.$props.dataItem);let n="";i!=null&&(n=this.$props.format?this.$props.type?this._intl.format(this.$props.format,o.parsers[this.$props.type](i,this._intl,this.$props.readFormat)):this._intl.format(this.$props.format,i):i.toString()),e=r.createVNode("td",{style:this.$attrs.style,colspan:this.$props.colSpan,class:this.tdClass,onKeydown:this.triggerKeydown,onClick:this.triggerClick,role:"gridcell","aria-colindex":this.$props.ariaColumnIndex,"aria-selected":this.$props.isSelected,"data-grid-col-index":this.$props.columnIndex,tabindex:t.tabIndex,"data-keyboardnavlevel":t[l.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":t[l.KEYBOARD_NAV_DATA_ID]},[n])}return s.getTemplate.call(this,{h:r.h,template:this.$props.render,defaultRendering:e,additionalProps:this.$props,additionalListeners:{click:this.triggerClick,keydown:this.triggerKeydown,edit:this.triggerEdit,add:this.triggerAdd,cancel:this.triggerCancel,save:this.triggerSave,remove:this.triggerRemove}})}});exports.GridCell=d;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),a=require("../utils/main.js"),c=require("@progress/kendo-vue-intl"),d=require("@progress/kendo-vue-common"),p=require("@progress/kendo-vue-data-tools"),g=r.defineComponent({name:"GridCell",inheritAttrs:!1,emits:{cellclick:null,cellkeydown:null},props:{id:String,field:String,dataItem:Object,format:String,readFormat:String,className:String,colSpan:Number,columnIndex:Number,columnsCount:Number,dataIndex:Number,rowType:String,level:Number,expanded:Boolean,type:String,editor:String,rowSpan:[Number,Object],isSelected:Boolean,isHighlighted:Boolean,ariaColumnIndex:Number,render:[String,Function,Object],isRtl:Boolean,onEdit:Function,onSave:Function,onRemove:Function,onCancel:Function,onChange:Function,onSelectionchange:Function},inject:{kendoIntlService:{default:null},getKeyboardNavigationAttributes:{default:d.noop}},methods:{triggerClick(){this.$emit("cellclick",{dataItem:this.$props.dataItem,field:this.$props.field})},triggerKeydown(e){this.$emit("cellkeydown",{event:e,dataItem:this.$props.dataItem,field:this.$props.field})},triggerEdit(e){this.$emit("edit",e)},triggerAdd(e){this.$emit("add",e)},triggerCancel(e){this.$emit("cancel",e)},triggerSave(e){this.$emit("save",e)},triggerRemove(e){this.$emit("remove",e)}},created(){this._intl=c.provideIntlService(this)},computed:{tdClass(){const{className:e,isHighlighted:t}=this.$props;return{"k-table-td":!0,"k-highlighted":t,[e]:e}}},setup(){return{kendoIntlService:r.inject("kendoIntlService",{})}},render(){var n,o,s;let e=null;const t=this.getKeyboardNavigationAttributes(this.$props.id);if(((n=this.$props.rowSpan)==null?void 0:n.count)===null)return null;if(this.$props.rowType==="groupFooter")e=r.createVNode("td",{class:this.tdClass},null);else if(this.$props.field!==void 0&&this.$props.rowType!=="groupHeader"){const i=a.getNestedValue(this.$props.field,this.$props.dataItem);let l="";i!=null&&(l=this.$props.format?this.$props.type?this._intl.format(this.$props.format,a.parsers[this.$props.type](i,this._intl,this.$props.readFormat)):this._intl.format(this.$props.format,i):i.toString()),e=r.createVNode("td",{style:this.$attrs.style,colspan:this.$props.colSpan,rowspan:(s=(o=this.$props.rowSpan)==null?void 0:o.count)!=null?s:void 0,class:this.tdClass,onKeydown:this.triggerKeydown,onClick:this.triggerClick,role:"gridcell","aria-colindex":this.$props.ariaColumnIndex,"aria-selected":this.$props.isSelected,"data-grid-col-index":this.$props.columnIndex,tabindex:t.tabIndex,"data-keyboardnavlevel":t[p.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":t[p.KEYBOARD_NAV_DATA_ID]},[l])}return d.getTemplate.call(this,{h:r.h,template:this.$props.render,defaultRendering:e,additionalProps:this.$props,additionalListeners:{click:this.triggerClick,keydown:this.triggerKeydown,edit:this.triggerEdit,add:this.triggerAdd,cancel:this.triggerCancel,save:this.triggerSave,remove:this.triggerRemove}})}});exports.GridCell=g;
@@ -5,12 +5,12 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as o, createVNode as n, h as s, inject as a } from "vue";
9
- import { getNestedValue as l, parsers as d } from "../utils/main.mjs";
10
- import { provideIntlService as p } from "@progress/kendo-vue-intl";
11
- import { noop as c, getTemplate as g } from "@progress/kendo-vue-common";
12
- import { KEYBOARD_NAV_DATA_ID as h, KEYBOARD_NAV_DATA_LEVEL as m } from "@progress/kendo-vue-data-tools";
13
- const y = /* @__PURE__ */ o({
8
+ import { defineComponent as l, createVNode as a, h as d, inject as p } from "vue";
9
+ import { getNestedValue as c, parsers as h } from "../utils/main.mjs";
10
+ import { provideIntlService as g } from "@progress/kendo-vue-intl";
11
+ import { noop as m, getTemplate as u } from "@progress/kendo-vue-common";
12
+ import { KEYBOARD_NAV_DATA_ID as $, KEYBOARD_NAV_DATA_LEVEL as f } from "@progress/kendo-vue-data-tools";
13
+ const I = /* @__PURE__ */ l({
14
14
  name: "GridCell",
15
15
  inheritAttrs: !1,
16
16
  emits: {
@@ -33,6 +33,7 @@ const y = /* @__PURE__ */ o({
33
33
  expanded: Boolean,
34
34
  type: String,
35
35
  editor: String,
36
+ rowSpan: [Number, Object],
36
37
  isSelected: Boolean,
37
38
  isHighlighted: Boolean,
38
39
  ariaColumnIndex: Number,
@@ -50,7 +51,7 @@ const y = /* @__PURE__ */ o({
50
51
  default: null
51
52
  },
52
53
  getKeyboardNavigationAttributes: {
53
- default: c
54
+ default: m
54
55
  }
55
56
  },
56
57
  methods: {
@@ -84,7 +85,7 @@ const y = /* @__PURE__ */ o({
84
85
  }
85
86
  },
86
87
  created() {
87
- this._intl = p(this);
88
+ this._intl = g(this);
88
89
  },
89
90
  computed: {
90
91
  tdClass() {
@@ -101,22 +102,26 @@ const y = /* @__PURE__ */ o({
101
102
  },
102
103
  setup() {
103
104
  return {
104
- kendoIntlService: a("kendoIntlService", {})
105
+ kendoIntlService: p("kendoIntlService", {})
105
106
  };
106
107
  },
107
108
  render() {
109
+ var r, n, o;
108
110
  let t = null;
109
111
  const e = this.getKeyboardNavigationAttributes(this.$props.id);
112
+ if (((r = this.$props.rowSpan) == null ? void 0 : r.count) === null)
113
+ return null;
110
114
  if (this.$props.rowType === "groupFooter")
111
- t = n("td", {
115
+ t = a("td", {
112
116
  class: this.tdClass
113
117
  }, null);
114
118
  else if (this.$props.field !== void 0 && this.$props.rowType !== "groupHeader") {
115
- const i = l(this.$props.field, this.$props.dataItem);
116
- let r = "";
117
- i != null && (r = this.$props.format ? this.$props.type ? this._intl.format(this.$props.format, d[this.$props.type](i, this._intl, this.$props.readFormat)) : this._intl.format(this.$props.format, i) : i.toString()), t = n("td", {
119
+ const i = c(this.$props.field, this.$props.dataItem);
120
+ let s = "";
121
+ i != null && (s = this.$props.format ? this.$props.type ? this._intl.format(this.$props.format, h[this.$props.type](i, this._intl, this.$props.readFormat)) : this._intl.format(this.$props.format, i) : i.toString()), t = a("td", {
118
122
  style: this.$attrs.style,
119
123
  colspan: this.$props.colSpan,
124
+ rowspan: (o = (n = this.$props.rowSpan) == null ? void 0 : n.count) != null ? o : void 0,
120
125
  class: this.tdClass,
121
126
  onKeydown: this.triggerKeydown,
122
127
  onClick: this.triggerClick,
@@ -125,12 +130,12 @@ const y = /* @__PURE__ */ o({
125
130
  "aria-selected": this.$props.isSelected,
126
131
  "data-grid-col-index": this.$props.columnIndex,
127
132
  tabindex: e.tabIndex,
128
- "data-keyboardnavlevel": e[m],
129
- "data-keyboardnavid": e[h]
130
- }, [r]);
133
+ "data-keyboardnavlevel": e[f],
134
+ "data-keyboardnavid": e[$]
135
+ }, [s]);
131
136
  }
132
- return g.call(this, {
133
- h: s,
137
+ return u.call(this, {
138
+ h: d,
134
139
  template: this.$props.render,
135
140
  defaultRendering: t,
136
141
  additionalProps: this.$props,
@@ -147,5 +152,5 @@ const y = /* @__PURE__ */ o({
147
152
  }
148
153
  });
149
154
  export {
150
- y as GridCell
155
+ I as GridCell
151
156
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),$=require("@progress/kendo-vue-buttons"),n=require("../messages/main.js"),u=require("@progress/kendo-vue-dropdowns"),d=require("@progress/kendo-vue-inputs"),S=require("@progress/kendo-vue-dateinputs"),h=require("@progress/kendo-svg-icons"),m=require("@progress/kendo-vue-intl"),p=require("../filterCommon.js"),c=require("@progress/kendo-vue-common"),k=r.defineComponent({name:"KendoGridFilterCell",inheritAttrs:!1,props:{id:String,grid:Object,field:String,filterType:String,colSpan:Number,title:String,value:[String,Number,Boolean,Date],operator:[String,Function],operators:Array,booleanValues:Array,onChange:Function,render:[String,Function,Object],ariaLabel:String,size:String},inject:{kendoLocalizationService:{default:null},kendoIntlService:{default:null}},methods:{inputChange(e,t){const o=p.cellInputChange(e,t,this.$props);this.triggerChange(o)},operatorChange(e,t){const o=p.cellOperatorChange(e.value.operator,t,this.$props.value);this.triggerChange(o)},boolDropdownChange(e,t){const o=p.cellBoolDropdownChange(e.value.operator,t);this.triggerChange(o)},clear(e){e.preventDefault(),this.triggerChange({value:"",operator:"",event:e})},triggerChange(e){e.field=this.$props.field,this.$emit("change",e)}},setup(){const e=r.inject("kendoIntlService",{}),t=r.inject("kendoLocalizationService",{});return{kendoIntlService:e,kendoLocalizationService:t}},render(){const e=m.provideLocalizationService(this),{size:t}=this.$props,o=this.$props.operators.find(l=>l.operator===this.$props.operator)||null,g=function(){if(this.$props.filterType!=="boolean")return r.createVNode(u.DropDownList,{onChange:this.operatorChange,value:o,size:t,class:"k-dropdown-operator",icon:"filter",svgIcon:h.filterIcon,iconClassName:"filter k-button-icon","data-items":this.$props.operators,textField:"text",title:e.toLanguageString(n.filterChooseOperator,n.messages[n.filterChooseOperator]),popupSettings:{width:"",anchor:""},ariaLabel:this.ariaLabel},null)},f=function(l,a){let s;switch(l){case"numeric":return r.createVNode(d.NumericTextBox,{size:t,value:a,onChange:i=>{this.inputChange(i.value,i.event)},title:this.$props.title,ariaLabel:this.ariaLabel},null);case"date":return r.createVNode(S.DatePicker,{size:t,value:a,onChange:i=>{this.inputChange(i.value,i)},title:this.$props.title,ariaLabel:this.ariaLabel},null);case"boolean":return s=this.$props.booleanValues,r.createVNode(u.DropDownList,{onChange:this.boolDropdownChange,size:t,value:s.find(i=>i.operator===(a!==null?a:"")),"data-items":s,textField:"text",title:this.$props.title,ariaLabel:this.ariaLabel},null);default:return r.createVNode(d.TextBox,{value:a||"",size:t,onInput:i=>{this.inputChange(i.target.value,i)},title:this.$props.title,"aria-label":this.ariaLabel},null)}},C=r.createVNode("div",{class:"k-filtercell",style:this.$attrs.style},[r.createVNode("div",{class:"k-filtercell-wrapper"},[f.call(this,this.$props.filterType,this.$props.value),r.createVNode("div",{class:"k-filtercell-operator"},[g.call(this),r.createVNode($.Button,{type:"button",size:t,icon:"filter-clear",svgIcon:h.filterClearIcon,class:{"k-disabled":!(!(this.$props.value===null||this.$props.value==="")||this.$props.operator)},title:e.toLanguageString(n.filterClearButton,n.messages[n.filterClearButton]),onClick:this.clear},null)])])]),v=this.$props.grid?c.getListeners.call(this.$props.grid):null,b=c.templateRendering.call(this.$props.grid,this.$props.render,v);return c.getTemplate.call(this,{h:r.h,template:b,defaultRendering:C,additionalProps:this.$props,additionalListeners:{change:this.triggerChange}})}});exports.GridFilterCell=k;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),$=require("@progress/kendo-vue-buttons"),n=require("../messages/main.js"),u=require("@progress/kendo-vue-dropdowns"),d=require("@progress/kendo-vue-inputs"),S=require("@progress/kendo-vue-dateinputs"),h=require("@progress/kendo-svg-icons"),m=require("@progress/kendo-vue-intl"),p=require("../filterCommon.js"),c=require("@progress/kendo-vue-common"),k=r.defineComponent({name:"KendoGridFilterCell",inheritAttrs:!1,props:{id:String,grid:Object,field:String,filterType:String,colSpan:Number,title:String,value:[String,Number,Boolean,Date],operator:[String,Function],operators:Array,booleanValues:Array,onChange:Function,render:[String,Function,Object],ariaLabel:String,size:String},inject:{kendoLocalizationService:{default:null},kendoIntlService:{default:null}},methods:{inputChange(e,t){const o=p.cellInputChange(e,t,this.$props);this.triggerChange(o)},operatorChange(e,t){const o=p.cellOperatorChange(e.value.operator,t,this.$props.value);this.triggerChange(o)},boolDropdownChange(e,t){const o=p.cellBoolDropdownChange(e.value.operator,t);this.triggerChange(o)},clear(e){e.preventDefault(),this.triggerChange({value:"",operator:"",event:e})},triggerChange(e){e.field=this.$props.field,this.$emit("change",e)}},setup(){const e=r.inject("kendoIntlService",{}),t=r.inject("kendoLocalizationService",{});return{kendoIntlService:e,kendoLocalizationService:t}},render(){const e=m.provideLocalizationService(this),{size:t}=this.$props,o=this.$props.operators.find(l=>l.operator===this.$props.operator)||null,g=function(){if(this.$props.filterType!=="boolean")return r.createVNode(u.DropDownList,{onChange:this.operatorChange,value:o,size:t,class:"k-dropdown-operator",icon:"filter",svgIcon:h.filterIcon,iconClassName:"filter k-button-icon","data-items":this.$props.operators,textField:"text",title:e.toLanguageString(n.filterChooseOperator,n.messages[n.filterChooseOperator]),popupSettings:{width:"",anchor:""},ariaLabel:this.ariaLabel},null)},f=function(l,a){let s;switch(l){case"numeric":return r.createVNode(d.NumericTextBox,{size:t,value:a,onChange:i=>{this.inputChange(i.value,i.event)},title:this.$props.title,ariaLabel:this.ariaLabel},null);case"date":return r.createVNode(S.DatePicker,{size:t,value:a,onChange:i=>{this.inputChange(i.value,i)},title:this.$props.title,ariaLabel:this.ariaLabel},null);case"boolean":return s=this.$props.booleanValues,r.createVNode(u.DropDownList,{onChange:this.boolDropdownChange,size:t,value:s.find(i=>i.operator===(a!==null?a:"")),"data-items":s,textField:"text",title:this.$props.title,ariaLabel:this.ariaLabel},null);default:return r.createVNode(d.TextBox,{value:a||"",size:t,onInput:i=>{this.inputChange(i.target.value,i)},title:this.$props.title,"aria-label":this.ariaLabel},null)}},C=r.createVNode("div",{class:"k-filtercell",style:this.$attrs.style},[r.createVNode("div",{class:"k-filtercell-wrapper"},[f.call(this,this.$props.filterType,this.$props.value),r.createVNode("div",{class:"k-filtercell-operator"},[g.call(this),r.createTextVNode(" "),r.createVNode($.Button,{type:"button",size:t,icon:"filter-clear",svgIcon:h.filterClearIcon,class:{"k-disabled":!(!(this.$props.value===null||this.$props.value==="")||this.$props.operator)},title:e.toLanguageString(n.filterClearButton,n.messages[n.filterClearButton]),onClick:this.clear},null)])])]),v=this.$props.grid?c.getListeners.call(this.$props.grid):null,b=c.templateRendering.call(this.$props.grid,this.$props.render,v);return c.getTemplate.call(this,{h:r.h,template:b,defaultRendering:C,additionalProps:this.$props,additionalListeners:{change:this.triggerChange}})}});exports.GridFilterCell=k;