@progress/kendo-vue-grid 3.0.2-dev.202201260931 → 3.0.4-dev.202202010701

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es/Grid.d.ts CHANGED
@@ -10,7 +10,7 @@ import { VirtualScroll } from './VirtualScroll';
10
10
  import { ColumnResize } from './drag/ColumnResize';
11
11
  import { CommonDragLogic } from './drag/CommonDragLogic';
12
12
  import { DataItemWrapper } from './utils/index';
13
- import { GridProps } from './interfaces/GridProps';
13
+ import { GridProps, GridEmits } from './interfaces/GridProps';
14
14
  import { GridColumnProps } from './interfaces/GridColumnProps';
15
15
  /**
16
16
  * Represents the [native Vue Grid component by Kendo UI]({% slug overview_grid_native %}).
@@ -141,5 +141,5 @@ export interface GridAll extends GridMethods, GridData, GridState, GridComputed,
141
141
  * Represents the default `Grid` component.
142
142
  */
143
143
  declare let GridVue2: ComponentOptions<Vue2type, DefaultData<GridData>, DefaultMethods<GridAll>, GridComputed, RecordPropsDefinition<GridProps>>;
144
- declare const Grid: DefineComponent<GridProps, any, GridData, GridComputed, GridMethods, {}, {}, {}, string, GridProps, GridProps, {}>;
144
+ declare const Grid: DefineComponent<GridProps, any, GridData, GridComputed, GridMethods, {}, {}, GridEmits, string, GridProps, GridProps, {}>;
145
145
  export { Grid, GridVue2 };
package/dist/es/Grid.js CHANGED
@@ -270,6 +270,7 @@ var GridVue2 = {
270
270
  this.dragLogic.dropElementClue.$el.remove();
271
271
  }
272
272
 
273
+ this.currentData = [];
273
274
  this._columns = [];
274
275
  },
275
276
  resetVirtual: function resetVirtual() {
@@ -694,6 +695,27 @@ var GridVue2 = {
694
695
  }).map(function (item) {
695
696
  return item.dataItem;
696
697
  });
698
+ },
699
+ totalGroupedRows: function totalGroupedRows(gridData) {
700
+ var allRowsCount = 0;
701
+
702
+ if (gridData) {
703
+ allRowsCount = this.addSubItems(gridData, allRowsCount);
704
+ }
705
+
706
+ return allRowsCount;
707
+ },
708
+ addSubItems: function addSubItems(gridData, allRowsCount) {
709
+ var _this = this;
710
+
711
+ gridData.forEach(function (item) {
712
+ allRowsCount++;
713
+
714
+ if (item.expanded !== false && item.items) {
715
+ allRowsCount = _this.addSubItems(item.items, allRowsCount);
716
+ }
717
+ });
718
+ return allRowsCount;
697
719
  }
698
720
  },
699
721
  // @ts-ignore
@@ -752,7 +774,7 @@ var GridVue2 = {
752
774
  if (this.$props.rowHeight !== undefined && this.$props.rowHeight > 0 && !groupable) {
753
775
  this.vs.containerHeight = Math.min(1533915, this.$props.rowHeight * (total || 0));
754
776
  } else {
755
- this.vs.containerHeight = 1533915;
777
+ this.vs.containerHeight = 1533915; // this.vs.containerHeight = Math.min(1533915, this.$props.rowHeight * this.totalGroupedRows(gridData));
756
778
  }
757
779
 
758
780
  var children = defaultSlot || [];
@@ -16,6 +16,8 @@ export declare class VirtualScroll {
16
16
  PageChange: (page: Page, event: any) => void;
17
17
  tableBody: any;
18
18
  heightContainer: any;
19
+ fixedScroll: boolean;
20
+ askedSkip: number | undefined;
19
21
  private prevScrollPos;
20
22
  private syncTimeout;
21
23
  private tableTranslate;
@@ -12,6 +12,8 @@ var VirtualScroll = /** @class */ (function () {
12
12
  this.realSkip = 0;
13
13
  this.pageSize = 0;
14
14
  this.heightContainer = null;
15
+ this.fixedScroll = false;
16
+ this.askedSkip = undefined;
15
17
  this.prevScrollPos = 0;
16
18
  this.tableTranslate = 0;
17
19
  this.scrollSyncing = false;
@@ -59,7 +61,7 @@ var VirtualScroll = /** @class */ (function () {
59
61
  };
60
62
  VirtualScroll.prototype.translate = function (dY) {
61
63
  this.tableTranslate = dY;
62
- if (this.table) {
64
+ if (this.scrollableVirtual && this.table) {
63
65
  this.table.style.transform = 'translateY(' + dY + 'px)';
64
66
  }
65
67
  };
@@ -81,6 +83,9 @@ var VirtualScroll = /** @class */ (function () {
81
83
  };
82
84
  VirtualScroll.prototype.reset = function () {
83
85
  this.scrollSyncing = true;
86
+ if (this.fixedScroll) {
87
+ return;
88
+ }
84
89
  if (this.container) {
85
90
  this.container.scrollTop = 0;
86
91
  }
@@ -179,10 +184,17 @@ var VirtualScroll = /** @class */ (function () {
179
184
  }
180
185
  var grid = this;
181
186
  clearTimeout(this.syncTimeout);
182
- this.syncTimeout = setTimeout(function () { grid.syncScroll(); }, 200);
187
+ this.syncTimeout = window.setTimeout(function () { grid.syncScroll(); }, 200);
183
188
  var scrollTop = this.container.scrollTop;
184
189
  var prev = this.prevScrollPos;
185
190
  this.prevScrollPos = scrollTop;
191
+ if (this.askedSkip !== undefined) {
192
+ this.translate(this.containerHeight * this.askedSkip / this.total);
193
+ this.changePage(this.askedSkip, e);
194
+ this.prevScrollPos = scrollTop;
195
+ this.askedSkip = undefined;
196
+ return;
197
+ }
186
198
  if (scrollTop - prev < 0 && scrollTop > this.tableTranslate - this.table.scrollHeight / 10) {
187
199
  this.localScrollUp(e);
188
200
  }
@@ -102,7 +102,7 @@ var GridCellVue2 = {
102
102
  var dataAsString = '';
103
103
 
104
104
  if (data !== undefined && data !== null) {
105
- dataAsString = this.$props.format ? this.$props.type ? this._intl.format(this.$props.format, parsers[this.$props.type](data, this._intl)) : this._intl.format(this.$props.format, data) : data.toString();
105
+ dataAsString = this.$props.format ? this.$props.type ? this._intl.format(this.$props.format, parsers[this.$props.type](data, this._intl, this.$props.format)) : this._intl.format(this.$props.format, data) : data.toString();
106
106
  }
107
107
 
108
108
  defaultRendering = h("td", {
@@ -220,11 +220,13 @@ var GridFilterCellVue2 = {
220
220
  "class": "k-filtercell-wrapper"
221
221
  }, [filterComponent.call(this, this.$props.filterType, this.$props.value), renderOperatorEditor.call(this), // @ts-ignore function children
222
222
  h(Button, {
223
- icon: 'filter-clear',
223
+ type: "button",
224
224
  attrs: this.v3 ? undefined : {
225
+ type: "button",
225
226
  icon: 'filter-clear',
226
227
  title: localizationService.toLanguageString(filterClearButton, messages[filterClearButton])
227
228
  },
229
+ icon: 'filter-clear',
228
230
  "class": {
229
231
  /* button is always visible if there is either value or operator */
230
232
  'k-disabled': !(!(this.$props.value === null || this.$props.value === '') || this.$props.operator)
@@ -108,7 +108,8 @@ var ColumnMenuContentVue2 = {
108
108
  closemenu: this.closeMenu,
109
109
  filterchange: this.filterChange,
110
110
  sortchange: this.sortChange,
111
- expandchange: this.expandChange
111
+ expandchange: this.expandChange,
112
+ contentfocus: this.handleFocus
112
113
  }
113
114
  });
114
115
  }
@@ -180,9 +180,9 @@ var GridColumnMenuCheckboxFilterVue2 = {
180
180
  on: this.v3 ? undefined : {
181
181
  "input": this.handleSearchChange
182
182
  }
183
- })]), h("span", {
184
- "class": "k-icon k-i-search"
185
- })]);
183
+ }), h("span", {
184
+ "class": "k-input-icon k-icon k-i-search"
185
+ })])]);
186
186
  };
187
187
 
188
188
  var uniqueFilterValues = filterValues.filter(function (item, index) {
@@ -21,7 +21,8 @@ var GridColumnMenuFilterCellVue2 = {
21
21
  },
22
22
  // @ts-ignore
23
23
  emits: {
24
- change: null
24
+ change: null,
25
+ filtercellfocus: null
25
26
  },
26
27
  methods: {
27
28
  handleFocus: function handleFocus(e) {
@@ -21,7 +21,9 @@ var GridColumnMenuFilterUIVue2 = {
21
21
  },
22
22
  // @ts-ignore
23
23
  emits: {
24
- change: null
24
+ change: null,
25
+ filteruifocus: null,
26
+ logicChange: null
25
27
  },
26
28
  methods: {
27
29
  handleFocus: function handleFocus(e) {
@@ -276,6 +276,8 @@ export interface GridProps {
276
276
  * By default, navigation is disabled and the Grid content is accessible in the normal tab sequence.
277
277
  */
278
278
  navigatable?: boolean;
279
+ }
280
+ export interface GridEmits {
279
281
  /**
280
282
  * Fires when Grid keyboard navigation position is changed.
281
283
  */
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-grid',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1643189124,
8
+ publishDate: 1643698567,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
11
11
  };
@@ -10,7 +10,7 @@ import { VirtualScroll } from './VirtualScroll';
10
10
  import { ColumnResize } from './drag/ColumnResize';
11
11
  import { CommonDragLogic } from './drag/CommonDragLogic';
12
12
  import { DataItemWrapper } from './utils/index';
13
- import { GridProps } from './interfaces/GridProps';
13
+ import { GridProps, GridEmits } from './interfaces/GridProps';
14
14
  import { GridColumnProps } from './interfaces/GridColumnProps';
15
15
  /**
16
16
  * Represents the [native Vue Grid component by Kendo UI]({% slug overview_grid_native %}).
@@ -141,5 +141,5 @@ export interface GridAll extends GridMethods, GridData, GridState, GridComputed,
141
141
  * Represents the default `Grid` component.
142
142
  */
143
143
  declare let GridVue2: ComponentOptions<Vue2type, DefaultData<GridData>, DefaultMethods<GridAll>, GridComputed, RecordPropsDefinition<GridProps>>;
144
- declare const Grid: DefineComponent<GridProps, any, GridData, GridComputed, GridMethods, {}, {}, {}, string, GridProps, GridProps, {}>;
144
+ declare const Grid: DefineComponent<GridProps, any, GridData, GridComputed, GridMethods, {}, {}, GridEmits, string, GridProps, GridProps, {}>;
145
145
  export { Grid, GridVue2 };
package/dist/npm/Grid.js CHANGED
@@ -306,6 +306,7 @@ var GridVue2 = {
306
306
  this.dragLogic.dropElementClue.$el.remove();
307
307
  }
308
308
 
309
+ this.currentData = [];
309
310
  this._columns = [];
310
311
  },
311
312
  resetVirtual: function resetVirtual() {
@@ -730,6 +731,27 @@ var GridVue2 = {
730
731
  }).map(function (item) {
731
732
  return item.dataItem;
732
733
  });
734
+ },
735
+ totalGroupedRows: function totalGroupedRows(gridData) {
736
+ var allRowsCount = 0;
737
+
738
+ if (gridData) {
739
+ allRowsCount = this.addSubItems(gridData, allRowsCount);
740
+ }
741
+
742
+ return allRowsCount;
743
+ },
744
+ addSubItems: function addSubItems(gridData, allRowsCount) {
745
+ var _this = this;
746
+
747
+ gridData.forEach(function (item) {
748
+ allRowsCount++;
749
+
750
+ if (item.expanded !== false && item.items) {
751
+ allRowsCount = _this.addSubItems(item.items, allRowsCount);
752
+ }
753
+ });
754
+ return allRowsCount;
733
755
  }
734
756
  },
735
757
  // @ts-ignore
@@ -788,7 +810,7 @@ var GridVue2 = {
788
810
  if (this.$props.rowHeight !== undefined && this.$props.rowHeight > 0 && !groupable) {
789
811
  this.vs.containerHeight = Math.min(1533915, this.$props.rowHeight * (total || 0));
790
812
  } else {
791
- this.vs.containerHeight = 1533915;
813
+ this.vs.containerHeight = 1533915; // this.vs.containerHeight = Math.min(1533915, this.$props.rowHeight * this.totalGroupedRows(gridData));
792
814
  }
793
815
 
794
816
  var children = defaultSlot || [];
@@ -16,6 +16,8 @@ export declare class VirtualScroll {
16
16
  PageChange: (page: Page, event: any) => void;
17
17
  tableBody: any;
18
18
  heightContainer: any;
19
+ fixedScroll: boolean;
20
+ askedSkip: number | undefined;
19
21
  private prevScrollPos;
20
22
  private syncTimeout;
21
23
  private tableTranslate;
@@ -15,6 +15,8 @@ var VirtualScroll = /** @class */ (function () {
15
15
  this.realSkip = 0;
16
16
  this.pageSize = 0;
17
17
  this.heightContainer = null;
18
+ this.fixedScroll = false;
19
+ this.askedSkip = undefined;
18
20
  this.prevScrollPos = 0;
19
21
  this.tableTranslate = 0;
20
22
  this.scrollSyncing = false;
@@ -62,7 +64,7 @@ var VirtualScroll = /** @class */ (function () {
62
64
  };
63
65
  VirtualScroll.prototype.translate = function (dY) {
64
66
  this.tableTranslate = dY;
65
- if (this.table) {
67
+ if (this.scrollableVirtual && this.table) {
66
68
  this.table.style.transform = 'translateY(' + dY + 'px)';
67
69
  }
68
70
  };
@@ -84,6 +86,9 @@ var VirtualScroll = /** @class */ (function () {
84
86
  };
85
87
  VirtualScroll.prototype.reset = function () {
86
88
  this.scrollSyncing = true;
89
+ if (this.fixedScroll) {
90
+ return;
91
+ }
87
92
  if (this.container) {
88
93
  this.container.scrollTop = 0;
89
94
  }
@@ -182,10 +187,17 @@ var VirtualScroll = /** @class */ (function () {
182
187
  }
183
188
  var grid = this;
184
189
  clearTimeout(this.syncTimeout);
185
- this.syncTimeout = setTimeout(function () { grid.syncScroll(); }, 200);
190
+ this.syncTimeout = window.setTimeout(function () { grid.syncScroll(); }, 200);
186
191
  var scrollTop = this.container.scrollTop;
187
192
  var prev = this.prevScrollPos;
188
193
  this.prevScrollPos = scrollTop;
194
+ if (this.askedSkip !== undefined) {
195
+ this.translate(this.containerHeight * this.askedSkip / this.total);
196
+ this.changePage(this.askedSkip, e);
197
+ this.prevScrollPos = scrollTop;
198
+ this.askedSkip = undefined;
199
+ return;
200
+ }
189
201
  if (scrollTop - prev < 0 && scrollTop > this.tableTranslate - this.table.scrollHeight / 10) {
190
202
  this.localScrollUp(e);
191
203
  }
@@ -114,7 +114,7 @@ var GridCellVue2 = {
114
114
  var dataAsString = '';
115
115
 
116
116
  if (data !== undefined && data !== null) {
117
- dataAsString = this.$props.format ? this.$props.type ? this._intl.format(this.$props.format, utils_1.parsers[this.$props.type](data, this._intl)) : this._intl.format(this.$props.format, data) : data.toString();
117
+ dataAsString = this.$props.format ? this.$props.type ? this._intl.format(this.$props.format, utils_1.parsers[this.$props.type](data, this._intl, this.$props.format)) : this._intl.format(this.$props.format, data) : data.toString();
118
118
  }
119
119
 
120
120
  defaultRendering = h("td", {
@@ -236,11 +236,13 @@ var GridFilterCellVue2 = {
236
236
  "class": "k-filtercell-wrapper"
237
237
  }, [filterComponent.call(this, this.$props.filterType, this.$props.value), renderOperatorEditor.call(this), // @ts-ignore function children
238
238
  h(kendo_vue_buttons_1.Button, {
239
- icon: 'filter-clear',
239
+ type: "button",
240
240
  attrs: this.v3 ? undefined : {
241
+ type: "button",
241
242
  icon: 'filter-clear',
242
243
  title: localizationService.toLanguageString(messages_1.filterClearButton, messages_1.messages[messages_1.filterClearButton])
243
244
  },
245
+ icon: 'filter-clear',
244
246
  "class": {
245
247
  /* button is always visible if there is either value or operator */
246
248
  'k-disabled': !(!(this.$props.value === null || this.$props.value === '') || this.$props.operator)
@@ -119,7 +119,8 @@ var ColumnMenuContentVue2 = {
119
119
  closemenu: this.closeMenu,
120
120
  filterchange: this.filterChange,
121
121
  sortchange: this.sortChange,
122
- expandchange: this.expandChange
122
+ expandchange: this.expandChange,
123
+ contentfocus: this.handleFocus
123
124
  }
124
125
  });
125
126
  }
@@ -198,9 +198,9 @@ var GridColumnMenuCheckboxFilterVue2 = {
198
198
  on: this.v3 ? undefined : {
199
199
  "input": this.handleSearchChange
200
200
  }
201
- })]), h("span", {
202
- "class": "k-icon k-i-search"
203
- })]);
201
+ }), h("span", {
202
+ "class": "k-input-icon k-icon k-i-search"
203
+ })])]);
204
204
  };
205
205
 
206
206
  var uniqueFilterValues = filterValues.filter(function (item, index) {
@@ -33,7 +33,8 @@ var GridColumnMenuFilterCellVue2 = {
33
33
  },
34
34
  // @ts-ignore
35
35
  emits: {
36
- change: null
36
+ change: null,
37
+ filtercellfocus: null
37
38
  },
38
39
  methods: {
39
40
  handleFocus: function handleFocus(e) {
@@ -32,7 +32,9 @@ var GridColumnMenuFilterUIVue2 = {
32
32
  },
33
33
  // @ts-ignore
34
34
  emits: {
35
- change: null
35
+ change: null,
36
+ filteruifocus: null,
37
+ logicChange: null
36
38
  },
37
39
  methods: {
38
40
  handleFocus: function handleFocus(e) {
@@ -276,6 +276,8 @@ export interface GridProps {
276
276
  * By default, navigation is disabled and the Grid content is accessible in the normal tab sequence.
277
277
  */
278
278
  navigatable?: boolean;
279
+ }
280
+ export interface GridEmits {
279
281
  /**
280
282
  * Fires when Grid keyboard navigation position is changed.
281
283
  */
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-grid',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1643189124,
11
+ publishDate: 1643698567,
12
12
  version: '',
13
13
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
14
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-grid",
3
- "version": "3.0.2-dev.202201260931",
3
+ "version": "3.0.4-dev.202202010701",
4
4
  "description": "Kendo UI for Vue Grid package",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,23 +34,23 @@
34
34
  "vue": "^2.6.12 || ^3.0.2"
35
35
  },
36
36
  "dependencies": {
37
- "@progress/kendo-vue-common": "3.0.2-dev.202201260931"
37
+ "@progress/kendo-vue-common": "3.0.4-dev.202202010701"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@progress/kendo-data-query": "^1.5.4",
41
41
  "@progress/kendo-drawing": "^1.9.3",
42
42
  "@progress/kendo-licensing": "^1.1.0",
43
- "@progress/kendo-vue-animation": "3.0.2-dev.202201260931",
44
- "@progress/kendo-vue-buttons": "3.0.2-dev.202201260931",
45
- "@progress/kendo-vue-charts": "3.0.2-dev.202201260931",
46
- "@progress/kendo-vue-data-tools": "3.0.2-dev.202201260931",
47
- "@progress/kendo-vue-dateinputs": "3.0.2-dev.202201260931",
48
- "@progress/kendo-vue-dropdowns": "3.0.2-dev.202201260931",
49
- "@progress/kendo-vue-excel-export": "3.0.2-dev.202201260931",
50
- "@progress/kendo-vue-inputs": "3.0.2-dev.202201260931",
51
- "@progress/kendo-vue-intl": "3.0.2-dev.202201260931",
52
- "@progress/kendo-vue-pdf": "3.0.2-dev.202201260931",
53
- "@progress/kendo-vue-popup": "3.0.2-dev.202201260931",
43
+ "@progress/kendo-vue-animation": "3.0.4-dev.202202010701",
44
+ "@progress/kendo-vue-buttons": "3.0.4-dev.202202010701",
45
+ "@progress/kendo-vue-charts": "3.0.4-dev.202202010701",
46
+ "@progress/kendo-vue-data-tools": "3.0.4-dev.202202010701",
47
+ "@progress/kendo-vue-dateinputs": "3.0.4-dev.202202010701",
48
+ "@progress/kendo-vue-dropdowns": "3.0.4-dev.202202010701",
49
+ "@progress/kendo-vue-excel-export": "3.0.4-dev.202202010701",
50
+ "@progress/kendo-vue-inputs": "3.0.4-dev.202202010701",
51
+ "@progress/kendo-vue-intl": "3.0.4-dev.202202010701",
52
+ "@progress/kendo-vue-pdf": "3.0.4-dev.202202010701",
53
+ "@progress/kendo-vue-popup": "3.0.4-dev.202202010701",
54
54
  "cldr-core": "^34.0.0",
55
55
  "cldr-dates-full": "^34.0.0",
56
56
  "cldr-numbers-full": "^34.0.0",