@progress/kendo-vue-data-tools 3.14.1 → 3.14.2-dev.202309250455

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.
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-data-tools',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1695043462,
8
+ publishDate: 1695617344,
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
  };
@@ -80,7 +80,7 @@ export interface PagerMethods {
80
80
  changePage: (page: number, e: any) => void;
81
81
  triggerPageChange: (e: any) => void;
82
82
  onWindowResize: () => void;
83
- transformDimesion: (initialValue: string | number | undefined) => string;
83
+ transformDimension: (initialValue: string | number | undefined) => string;
84
84
  }
85
85
  /**
86
86
  * @hidden
@@ -21,6 +21,9 @@ import { PagerInput } from './PagerInput';
21
21
  import { PagerPageSizes } from './PagerPageSizes';
22
22
  import { PagerInfo } from './PagerInfo';
23
23
  import { PagerNavigationButton } from './PagerNavigationButton';
24
+ var NUMBERS_CLASS = 'k-pager-numbers-wrap';
25
+ var SIZES_CLASS = 'k-pager-sizes';
26
+ var INFO_CLASS = 'k-pager-info';
24
27
  import { messages, pagerFirstPage, pagerLastPage, pagerNextPage, pagerPreviousPage } from '../messages/main';
25
28
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
26
29
  import { canUseDOM, getListeners, getTemplate, hasListener, isRtl, kendoThemeMaps, templateRendering } from '@progress/kendo-vue-common';
@@ -75,10 +78,6 @@ var PagerVue2 = {
75
78
  default: undefined
76
79
  }
77
80
  },
78
- created: function created() {
79
- this.pagerSizesIndex = 1;
80
- this.pagerInfoIndex = 2;
81
- },
82
81
  data: function data() {
83
82
  return {
84
83
  currentRtl: false,
@@ -173,7 +172,7 @@ var PagerVue2 = {
173
172
  }
174
173
  this.itemsToFit = this.fitChildrenInParent(element, this.itemsWidths || []);
175
174
  },
176
- transformDimesion: function transformDimesion(initialValue) {
175
+ transformDimension: function transformDimension(initialValue) {
177
176
  return typeof initialValue === 'string' ? initialValue.endsWith('px') ? initialValue : initialValue + 'px' : initialValue + 'px';
178
177
  },
179
178
  collectPagerChildrenWidths: function collectPagerChildrenWidths() {
@@ -181,27 +180,30 @@ var PagerVue2 = {
181
180
  var arrayChildren = Array.from(((_a = this.$el) === null || _a === void 0 ? void 0 : _a.children) || []);
182
181
  var widths = arrayChildren.map(function (item) {
183
182
  if (item instanceof HTMLElement) {
184
- return item.offsetWidth;
183
+ return {
184
+ class: item.className,
185
+ width: item.offsetWidth
186
+ };
185
187
  }
186
188
  return 0;
187
189
  });
188
190
  return widths;
189
191
  },
190
192
  fitChildrenInParent: function fitChildrenInParent(parent, childrenWidths) {
191
- var fitItems = [0];
192
- var elementsWith = 0;
193
+ var fitItems = [];
194
+ var elementsWidth = 0;
193
195
  var updatedWidths = childrenWidths;
194
196
  var parentWidth = parent.offsetWidth;
195
- var firstElement = childrenWidths[0];
196
- var buffer = 30;
197
- elementsWith += firstElement;
198
- for (var index = 1; index < childrenWidths.length; index++) {
197
+ var buffer = 20;
198
+ for (var index = 0; index < childrenWidths.length; index++) {
199
+ var padding = index === 0 ? 8 : 0;
199
200
  var parentChild = parent.children[index];
200
- var currentElement = (parentChild === null || parentChild === void 0 ? void 0 : parentChild.offsetWidth) || childrenWidths[index];
201
- if ((elementsWith += currentElement) < parentWidth - buffer) {
202
- fitItems.push(index);
201
+ var currentElementWidth = index === 0 ? childrenWidths[index].width : (parentChild === null || parentChild === void 0 ? void 0 : parentChild.offsetWidth) || childrenWidths[index].width;
202
+ elementsWidth += currentElementWidth;
203
+ if (elementsWidth < parentWidth - buffer - padding) {
204
+ fitItems.push(childrenWidths[index].class);
203
205
  } else {
204
- updatedWidths[index] = currentElement;
206
+ updatedWidths[index].width = currentElementWidth;
205
207
  }
206
208
  }
207
209
  this.itemsWidths = updatedWidths;
@@ -439,7 +441,7 @@ var PagerVue2 = {
439
441
  pagechange: this.triggerPageChange
440
442
  }
441
443
  });
442
- var width = this.transformDimesion(this.$props.width);
444
+ var width = this.transformDimension(this.$props.width);
443
445
  return pagerRender ? h("div", {
444
446
  "class": this.wrapperClass,
445
447
  style: {
@@ -469,8 +471,12 @@ var PagerVue2 = {
469
471
  "aria-label": 'Page navigation, page ' + this.currentPage + ' of ' + this.totalPages,
470
472
  "aria-controls": this.$props.ariaControls
471
473
  }, [h("div", {
472
- "class": 'k-pager-numbers-wrap'
473
- }, [first, prev, changer, next, last]), !(this.responsive && this.itemsToFit && !((_a = this.itemsToFit) === null || _a === void 0 ? void 0 : _a.includes(this.pagerSizesIndex))) && renderPageSizes, !(this.responsive && this.itemsToFit && !((_b = this.itemsToFit) === null || _b === void 0 ? void 0 : _b.includes(this.pagerInfoIndex))) && infoElement]);
474
+ "class": NUMBERS_CLASS
475
+ }, [first, prev, changer, next, last]), !(this.responsive && this.itemsToFit && !((_a = this.itemsToFit) === null || _a === void 0 ? void 0 : _a.find(function (it) {
476
+ return it.indexOf(SIZES_CLASS) !== -1;
477
+ }))) && renderPageSizes, !(this.responsive && this.itemsToFit && !((_b = this.itemsToFit) === null || _b === void 0 ? void 0 : _b.find(function (it) {
478
+ return it.indexOf(INFO_CLASS) !== -1;
479
+ }))) && infoElement]);
474
480
  }
475
481
  };
476
482
  /**
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-data-tools',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1695043462,
8
+ publishDate: 1695617344,
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
  };
@@ -80,7 +80,7 @@ export interface PagerMethods {
80
80
  changePage: (page: number, e: any) => void;
81
81
  triggerPageChange: (e: any) => void;
82
82
  onWindowResize: () => void;
83
- transformDimesion: (initialValue: string | number | undefined) => string;
83
+ transformDimension: (initialValue: string | number | undefined) => string;
84
84
  }
85
85
  /**
86
86
  * @hidden
@@ -21,6 +21,9 @@ import { PagerInput } from './PagerInput.js';
21
21
  import { PagerPageSizes } from './PagerPageSizes.js';
22
22
  import { PagerInfo } from './PagerInfo.js';
23
23
  import { PagerNavigationButton } from './PagerNavigationButton.js';
24
+ var NUMBERS_CLASS = 'k-pager-numbers-wrap';
25
+ var SIZES_CLASS = 'k-pager-sizes';
26
+ var INFO_CLASS = 'k-pager-info';
24
27
  import { messages, pagerFirstPage, pagerLastPage, pagerNextPage, pagerPreviousPage } from '../messages/main.js';
25
28
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
26
29
  import { canUseDOM, getListeners, getTemplate, hasListener, isRtl, kendoThemeMaps, templateRendering } from '@progress/kendo-vue-common';
@@ -75,10 +78,6 @@ var PagerVue2 = {
75
78
  default: undefined
76
79
  }
77
80
  },
78
- created: function created() {
79
- this.pagerSizesIndex = 1;
80
- this.pagerInfoIndex = 2;
81
- },
82
81
  data: function data() {
83
82
  return {
84
83
  currentRtl: false,
@@ -173,7 +172,7 @@ var PagerVue2 = {
173
172
  }
174
173
  this.itemsToFit = this.fitChildrenInParent(element, this.itemsWidths || []);
175
174
  },
176
- transformDimesion: function transformDimesion(initialValue) {
175
+ transformDimension: function transformDimension(initialValue) {
177
176
  return typeof initialValue === 'string' ? initialValue.endsWith('px') ? initialValue : initialValue + 'px' : initialValue + 'px';
178
177
  },
179
178
  collectPagerChildrenWidths: function collectPagerChildrenWidths() {
@@ -181,27 +180,30 @@ var PagerVue2 = {
181
180
  var arrayChildren = Array.from(((_a = this.$el) === null || _a === void 0 ? void 0 : _a.children) || []);
182
181
  var widths = arrayChildren.map(function (item) {
183
182
  if (item instanceof HTMLElement) {
184
- return item.offsetWidth;
183
+ return {
184
+ class: item.className,
185
+ width: item.offsetWidth
186
+ };
185
187
  }
186
188
  return 0;
187
189
  });
188
190
  return widths;
189
191
  },
190
192
  fitChildrenInParent: function fitChildrenInParent(parent, childrenWidths) {
191
- var fitItems = [0];
192
- var elementsWith = 0;
193
+ var fitItems = [];
194
+ var elementsWidth = 0;
193
195
  var updatedWidths = childrenWidths;
194
196
  var parentWidth = parent.offsetWidth;
195
- var firstElement = childrenWidths[0];
196
- var buffer = 30;
197
- elementsWith += firstElement;
198
- for (var index = 1; index < childrenWidths.length; index++) {
197
+ var buffer = 20;
198
+ for (var index = 0; index < childrenWidths.length; index++) {
199
+ var padding = index === 0 ? 8 : 0;
199
200
  var parentChild = parent.children[index];
200
- var currentElement = (parentChild === null || parentChild === void 0 ? void 0 : parentChild.offsetWidth) || childrenWidths[index];
201
- if ((elementsWith += currentElement) < parentWidth - buffer) {
202
- fitItems.push(index);
201
+ var currentElementWidth = index === 0 ? childrenWidths[index].width : (parentChild === null || parentChild === void 0 ? void 0 : parentChild.offsetWidth) || childrenWidths[index].width;
202
+ elementsWidth += currentElementWidth;
203
+ if (elementsWidth < parentWidth - buffer - padding) {
204
+ fitItems.push(childrenWidths[index].class);
203
205
  } else {
204
- updatedWidths[index] = currentElement;
206
+ updatedWidths[index].width = currentElementWidth;
205
207
  }
206
208
  }
207
209
  this.itemsWidths = updatedWidths;
@@ -439,7 +441,7 @@ var PagerVue2 = {
439
441
  pagechange: this.triggerPageChange
440
442
  }
441
443
  });
442
- var width = this.transformDimesion(this.$props.width);
444
+ var width = this.transformDimension(this.$props.width);
443
445
  return pagerRender ? h("div", {
444
446
  "class": this.wrapperClass,
445
447
  style: {
@@ -469,8 +471,12 @@ var PagerVue2 = {
469
471
  "aria-label": 'Page navigation, page ' + this.currentPage + ' of ' + this.totalPages,
470
472
  "aria-controls": this.$props.ariaControls
471
473
  }, [h("div", {
472
- "class": 'k-pager-numbers-wrap'
473
- }, [first, prev, changer, next, last]), !(this.responsive && this.itemsToFit && !((_a = this.itemsToFit) === null || _a === void 0 ? void 0 : _a.includes(this.pagerSizesIndex))) && renderPageSizes, !(this.responsive && this.itemsToFit && !((_b = this.itemsToFit) === null || _b === void 0 ? void 0 : _b.includes(this.pagerInfoIndex))) && infoElement]);
474
+ "class": NUMBERS_CLASS
475
+ }, [first, prev, changer, next, last]), !(this.responsive && this.itemsToFit && !((_a = this.itemsToFit) === null || _a === void 0 ? void 0 : _a.find(function (it) {
476
+ return it.indexOf(SIZES_CLASS) !== -1;
477
+ }))) && renderPageSizes, !(this.responsive && this.itemsToFit && !((_b = this.itemsToFit) === null || _b === void 0 ? void 0 : _b.find(function (it) {
478
+ return it.indexOf(INFO_CLASS) !== -1;
479
+ }))) && infoElement]);
474
480
  }
475
481
  };
476
482
  /**
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-data-tools',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1695043462,
11
+ publishDate: 1695617344,
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
  };
@@ -80,7 +80,7 @@ export interface PagerMethods {
80
80
  changePage: (page: number, e: any) => void;
81
81
  triggerPageChange: (e: any) => void;
82
82
  onWindowResize: () => void;
83
- transformDimesion: (initialValue: string | number | undefined) => string;
83
+ transformDimension: (initialValue: string | number | undefined) => string;
84
84
  }
85
85
  /**
86
86
  * @hidden
@@ -27,6 +27,9 @@ var PagerInput_1 = require("./PagerInput");
27
27
  var PagerPageSizes_1 = require("./PagerPageSizes");
28
28
  var PagerInfo_1 = require("./PagerInfo");
29
29
  var PagerNavigationButton_1 = require("./PagerNavigationButton");
30
+ var NUMBERS_CLASS = 'k-pager-numbers-wrap';
31
+ var SIZES_CLASS = 'k-pager-sizes';
32
+ var INFO_CLASS = 'k-pager-info';
30
33
  var main_1 = require("../messages/main");
31
34
  var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
32
35
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
@@ -81,10 +84,6 @@ var PagerVue2 = {
81
84
  default: undefined
82
85
  }
83
86
  },
84
- created: function created() {
85
- this.pagerSizesIndex = 1;
86
- this.pagerInfoIndex = 2;
87
- },
88
87
  data: function data() {
89
88
  return {
90
89
  currentRtl: false,
@@ -179,7 +178,7 @@ var PagerVue2 = {
179
178
  }
180
179
  this.itemsToFit = this.fitChildrenInParent(element, this.itemsWidths || []);
181
180
  },
182
- transformDimesion: function transformDimesion(initialValue) {
181
+ transformDimension: function transformDimension(initialValue) {
183
182
  return typeof initialValue === 'string' ? initialValue.endsWith('px') ? initialValue : initialValue + 'px' : initialValue + 'px';
184
183
  },
185
184
  collectPagerChildrenWidths: function collectPagerChildrenWidths() {
@@ -187,27 +186,30 @@ var PagerVue2 = {
187
186
  var arrayChildren = Array.from(((_a = this.$el) === null || _a === void 0 ? void 0 : _a.children) || []);
188
187
  var widths = arrayChildren.map(function (item) {
189
188
  if (item instanceof HTMLElement) {
190
- return item.offsetWidth;
189
+ return {
190
+ class: item.className,
191
+ width: item.offsetWidth
192
+ };
191
193
  }
192
194
  return 0;
193
195
  });
194
196
  return widths;
195
197
  },
196
198
  fitChildrenInParent: function fitChildrenInParent(parent, childrenWidths) {
197
- var fitItems = [0];
198
- var elementsWith = 0;
199
+ var fitItems = [];
200
+ var elementsWidth = 0;
199
201
  var updatedWidths = childrenWidths;
200
202
  var parentWidth = parent.offsetWidth;
201
- var firstElement = childrenWidths[0];
202
- var buffer = 30;
203
- elementsWith += firstElement;
204
- for (var index = 1; index < childrenWidths.length; index++) {
203
+ var buffer = 20;
204
+ for (var index = 0; index < childrenWidths.length; index++) {
205
+ var padding = index === 0 ? 8 : 0;
205
206
  var parentChild = parent.children[index];
206
- var currentElement = (parentChild === null || parentChild === void 0 ? void 0 : parentChild.offsetWidth) || childrenWidths[index];
207
- if ((elementsWith += currentElement) < parentWidth - buffer) {
208
- fitItems.push(index);
207
+ var currentElementWidth = index === 0 ? childrenWidths[index].width : (parentChild === null || parentChild === void 0 ? void 0 : parentChild.offsetWidth) || childrenWidths[index].width;
208
+ elementsWidth += currentElementWidth;
209
+ if (elementsWidth < parentWidth - buffer - padding) {
210
+ fitItems.push(childrenWidths[index].class);
209
211
  } else {
210
- updatedWidths[index] = currentElement;
212
+ updatedWidths[index].width = currentElementWidth;
211
213
  }
212
214
  }
213
215
  this.itemsWidths = updatedWidths;
@@ -445,7 +447,7 @@ var PagerVue2 = {
445
447
  pagechange: this.triggerPageChange
446
448
  }
447
449
  });
448
- var width = this.transformDimesion(this.$props.width);
450
+ var width = this.transformDimension(this.$props.width);
449
451
  return pagerRender ? h("div", {
450
452
  "class": this.wrapperClass,
451
453
  style: {
@@ -475,8 +477,12 @@ var PagerVue2 = {
475
477
  "aria-label": 'Page navigation, page ' + this.currentPage + ' of ' + this.totalPages,
476
478
  "aria-controls": this.$props.ariaControls
477
479
  }, [h("div", {
478
- "class": 'k-pager-numbers-wrap'
479
- }, [first, prev, changer, next, last]), !(this.responsive && this.itemsToFit && !((_a = this.itemsToFit) === null || _a === void 0 ? void 0 : _a.includes(this.pagerSizesIndex))) && renderPageSizes, !(this.responsive && this.itemsToFit && !((_b = this.itemsToFit) === null || _b === void 0 ? void 0 : _b.includes(this.pagerInfoIndex))) && infoElement]);
480
+ "class": NUMBERS_CLASS
481
+ }, [first, prev, changer, next, last]), !(this.responsive && this.itemsToFit && !((_a = this.itemsToFit) === null || _a === void 0 ? void 0 : _a.find(function (it) {
482
+ return it.indexOf(SIZES_CLASS) !== -1;
483
+ }))) && renderPageSizes, !(this.responsive && this.itemsToFit && !((_b = this.itemsToFit) === null || _b === void 0 ? void 0 : _b.find(function (it) {
484
+ return it.indexOf(INFO_CLASS) !== -1;
485
+ }))) && infoElement]);
480
486
  }
481
487
  };
482
488
  exports.PagerVue2 = PagerVue2;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-data-tools",
3
3
  "description": "Kendo UI for Vue Data Tools package",
4
- "version": "3.14.1",
4
+ "version": "3.14.2-dev.202309250455",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/telerik/kendo-vue.git"
@@ -50,7 +50,7 @@
50
50
  "vue": "^2.6.12 || ^3.0.2"
51
51
  },
52
52
  "dependencies": {
53
- "@progress/kendo-vue-common": "3.14.1"
53
+ "@progress/kendo-vue-common": "3.14.2-dev.202309250455"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@progress/kendo-data-query": "^1.0.0",
@@ -58,14 +58,14 @@
58
58
  "@progress/kendo-drawing": "^1.8.0",
59
59
  "@progress/kendo-licensing": "^1.3.0",
60
60
  "@progress/kendo-svg-icons": "^1.0.0",
61
- "@progress/kendo-vue-animation": "3.14.1",
62
- "@progress/kendo-vue-buttons": "3.14.1",
63
- "@progress/kendo-vue-dateinputs": "3.14.1",
64
- "@progress/kendo-vue-dropdowns": "3.14.1",
65
- "@progress/kendo-vue-grid": "3.14.1",
66
- "@progress/kendo-vue-inputs": "3.14.1",
67
- "@progress/kendo-vue-intl": "3.14.1",
68
- "@progress/kendo-vue-popup": "3.14.1"
61
+ "@progress/kendo-vue-animation": "3.14.2-dev.202309250455",
62
+ "@progress/kendo-vue-buttons": "3.14.2-dev.202309250455",
63
+ "@progress/kendo-vue-dateinputs": "3.14.2-dev.202309250455",
64
+ "@progress/kendo-vue-dropdowns": "3.14.2-dev.202309250455",
65
+ "@progress/kendo-vue-grid": "3.14.2-dev.202309250455",
66
+ "@progress/kendo-vue-inputs": "3.14.2-dev.202309250455",
67
+ "@progress/kendo-vue-intl": "3.14.2-dev.202309250455",
68
+ "@progress/kendo-vue-popup": "3.14.2-dev.202309250455"
69
69
  },
70
70
  "@progress": {
71
71
  "friendlyName": "Data Tools",