@progress/kendo-vue-data-tools 3.14.0 → 3.14.1-dev.202309181204

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: 1694607231,
8
+ publishDate: 1695038293,
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
  };
@@ -96,7 +96,6 @@ export interface PagerComputed {
96
96
  * @hidden
97
97
  */
98
98
  export interface PagerData {
99
- currentSize: string;
100
99
  }
101
100
  /**
102
101
  * @hidden
@@ -23,7 +23,7 @@ import { PagerInfo } from './PagerInfo';
23
23
  import { PagerNavigationButton } from './PagerNavigationButton';
24
24
  import { messages, pagerFirstPage, pagerLastPage, pagerNextPage, pagerPreviousPage } from '../messages/main';
25
25
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
26
- import { getListeners, getTemplate, hasListener, isRtl, kendoThemeMaps, templateRendering } from '@progress/kendo-vue-common';
26
+ import { canUseDOM, getListeners, getTemplate, hasListener, isRtl, kendoThemeMaps, templateRendering } from '@progress/kendo-vue-common';
27
27
  import { caretAltLeftIcon, caretAltRightIcon, caretAltToLeftIcon, caretAltToRightIcon } from '@progress/kendo-svg-icons';
28
28
  /**
29
29
  * @hidden
@@ -81,25 +81,33 @@ var PagerVue2 = {
81
81
  },
82
82
  data: function data() {
83
83
  return {
84
- currentSize: 'medium',
85
84
  currentRtl: false,
86
85
  itemsToFit: undefined,
87
86
  itemsWidths: undefined
88
87
  };
89
88
  },
90
89
  mounted: function mounted() {
91
- window.addEventListener('resize', this.onWindowResize);
90
+ if (canUseDOM && window.ResizeObserver) {
91
+ this.observerResize = new window.ResizeObserver(this.onWindowResize);
92
+ this.observerResize.observe(this.$el);
93
+ }
92
94
  this.currentRtl = isRtl(this.$el);
93
- var childsWidths = this.collectPagerChildsWidths();
94
- this.itemsWidths = childsWidths;
95
+ var childrenWidths = this.collectPagerChildrenWidths();
96
+ this.itemsWidths = childrenWidths;
95
97
  this.onWindowResize();
96
98
  },
97
99
  destroyed: !!isV3 ? undefined : function () {
98
- window.removeEventListener('resize', this.onWindowResize);
100
+ var _a;
101
+ if (((_a = this.document) === null || _a === void 0 ? void 0 : _a.body) && this.observerResize) {
102
+ this.observerResize.disconnect();
103
+ }
99
104
  },
100
105
  // @ts-ignore
101
106
  unmounted: function unmounted() {
102
- window.removeEventListener('resize', this.onWindowResize);
107
+ var _a;
108
+ if (((_a = this.document) === null || _a === void 0 ? void 0 : _a.body) && this.observerResize) {
109
+ this.observerResize.disconnect();
110
+ }
103
111
  },
104
112
  inject: {
105
113
  kendoLocalizationService: {
@@ -114,10 +122,9 @@ var PagerVue2 = {
114
122
  get: function get() {
115
123
  var _a;
116
124
  var size = this.$props.size;
117
- var mobileClass = !(!this.$props.responsive || this.$props.settings.responsive === false);
118
125
  return _a = {
119
126
  'k-pager': true
120
- }, _a["k-pager-".concat(kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-pager-mobile-".concat(kendoThemeMaps.sizeMap[this.currentSize])] = mobileClass && this.currentSize, _a;
127
+ }, _a["k-pager-".concat(kendoThemeMaps.sizeMap[size] || size)] = size, _a;
121
128
  }
122
129
  },
123
130
  totalPages: {
@@ -134,6 +141,12 @@ var PagerVue2 = {
134
141
  get: function get() {
135
142
  return this.$props.take || this.$props.pageSize;
136
143
  }
144
+ },
145
+ showPageSizes: function showPageSizes() {
146
+ return this.itemsToFit.includes(this.pagerSizesIndex);
147
+ },
148
+ showInfo: function showInfo() {
149
+ return this.itemsToFit.includes(this.pagerInfoIndex);
137
150
  }
138
151
  },
139
152
  methods: {
@@ -158,12 +171,12 @@ var PagerVue2 = {
158
171
  if (!element || !this.$props.responsive || this.$props.settings.responsive === false) {
159
172
  return;
160
173
  }
161
- this.itemsToFit = this.fitChildsInParent(element, this.itemsWidths || []);
174
+ this.itemsToFit = this.fitChildrenInParent(element, this.itemsWidths || []);
162
175
  },
163
176
  transformDimesion: function transformDimesion(initialValue) {
164
177
  return typeof initialValue === 'string' ? initialValue.endsWith('px') ? initialValue : initialValue + 'px' : initialValue + 'px';
165
178
  },
166
- collectPagerChildsWidths: function collectPagerChildsWidths() {
179
+ collectPagerChildrenWidths: function collectPagerChildrenWidths() {
167
180
  var _a;
168
181
  var arrayChildren = Array.from(((_a = this.$el) === null || _a === void 0 ? void 0 : _a.children) || []);
169
182
  var widths = arrayChildren.map(function (item) {
@@ -174,17 +187,17 @@ var PagerVue2 = {
174
187
  });
175
188
  return widths;
176
189
  },
177
- fitChildsInParent: function fitChildsInParent(parent, childsWidths) {
190
+ fitChildrenInParent: function fitChildrenInParent(parent, childrenWidths) {
178
191
  var fitItems = [0];
179
192
  var elementsWith = 0;
180
- var updatedWidths = childsWidths;
193
+ var updatedWidths = childrenWidths;
181
194
  var parentWidth = parent.offsetWidth;
182
- var firstElement = childsWidths[0];
183
- var buffer = 40;
195
+ var firstElement = childrenWidths[0];
196
+ var buffer = 30;
184
197
  elementsWith += firstElement;
185
- for (var index = 1; index < childsWidths.length; index++) {
198
+ for (var index = 1; index < childrenWidths.length; index++) {
186
199
  var parentChild = parent.children[index];
187
- var currentElement = (parentChild === null || parentChild === void 0 ? void 0 : parentChild.offsetWidth) || childsWidths[index];
200
+ var currentElement = (parentChild === null || parentChild === void 0 ? void 0 : parentChild.offsetWidth) || childrenWidths[index];
188
201
  if ((elementsWith += currentElement) < parentWidth - buffer) {
189
202
  fitItems.push(index);
190
203
  } else {
@@ -402,7 +415,7 @@ var PagerVue2 = {
402
415
  messagesMap: messagesMap,
403
416
  size: this.size
404
417
  });
405
- var infoElement = !settings.info ? '' :
418
+ var infoElement = settings.info &&
406
419
  // @ts-ignore function children
407
420
  h(PagerInfo, {
408
421
  totalPages: this.$props.total,
@@ -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: 1694607231,
8
+ publishDate: 1695038293,
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
  };
@@ -96,7 +96,6 @@ export interface PagerComputed {
96
96
  * @hidden
97
97
  */
98
98
  export interface PagerData {
99
- currentSize: string;
100
99
  }
101
100
  /**
102
101
  * @hidden
@@ -23,7 +23,7 @@ import { PagerInfo } from './PagerInfo.js';
23
23
  import { PagerNavigationButton } from './PagerNavigationButton.js';
24
24
  import { messages, pagerFirstPage, pagerLastPage, pagerNextPage, pagerPreviousPage } from '../messages/main.js';
25
25
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
26
- import { getListeners, getTemplate, hasListener, isRtl, kendoThemeMaps, templateRendering } from '@progress/kendo-vue-common';
26
+ import { canUseDOM, getListeners, getTemplate, hasListener, isRtl, kendoThemeMaps, templateRendering } from '@progress/kendo-vue-common';
27
27
  import { caretAltLeftIcon, caretAltRightIcon, caretAltToLeftIcon, caretAltToRightIcon } from '@progress/kendo-svg-icons';
28
28
  /**
29
29
  * @hidden
@@ -81,25 +81,33 @@ var PagerVue2 = {
81
81
  },
82
82
  data: function data() {
83
83
  return {
84
- currentSize: 'medium',
85
84
  currentRtl: false,
86
85
  itemsToFit: undefined,
87
86
  itemsWidths: undefined
88
87
  };
89
88
  },
90
89
  mounted: function mounted() {
91
- window.addEventListener('resize', this.onWindowResize);
90
+ if (canUseDOM && window.ResizeObserver) {
91
+ this.observerResize = new window.ResizeObserver(this.onWindowResize);
92
+ this.observerResize.observe(this.$el);
93
+ }
92
94
  this.currentRtl = isRtl(this.$el);
93
- var childsWidths = this.collectPagerChildsWidths();
94
- this.itemsWidths = childsWidths;
95
+ var childrenWidths = this.collectPagerChildrenWidths();
96
+ this.itemsWidths = childrenWidths;
95
97
  this.onWindowResize();
96
98
  },
97
99
  destroyed: !!isV3 ? undefined : function () {
98
- window.removeEventListener('resize', this.onWindowResize);
100
+ var _a;
101
+ if (((_a = this.document) === null || _a === void 0 ? void 0 : _a.body) && this.observerResize) {
102
+ this.observerResize.disconnect();
103
+ }
99
104
  },
100
105
  // @ts-ignore
101
106
  unmounted: function unmounted() {
102
- window.removeEventListener('resize', this.onWindowResize);
107
+ var _a;
108
+ if (((_a = this.document) === null || _a === void 0 ? void 0 : _a.body) && this.observerResize) {
109
+ this.observerResize.disconnect();
110
+ }
103
111
  },
104
112
  inject: {
105
113
  kendoLocalizationService: {
@@ -114,10 +122,9 @@ var PagerVue2 = {
114
122
  get: function get() {
115
123
  var _a;
116
124
  var size = this.$props.size;
117
- var mobileClass = !(!this.$props.responsive || this.$props.settings.responsive === false);
118
125
  return _a = {
119
126
  'k-pager': true
120
- }, _a["k-pager-".concat(kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-pager-mobile-".concat(kendoThemeMaps.sizeMap[this.currentSize])] = mobileClass && this.currentSize, _a;
127
+ }, _a["k-pager-".concat(kendoThemeMaps.sizeMap[size] || size)] = size, _a;
121
128
  }
122
129
  },
123
130
  totalPages: {
@@ -134,6 +141,12 @@ var PagerVue2 = {
134
141
  get: function get() {
135
142
  return this.$props.take || this.$props.pageSize;
136
143
  }
144
+ },
145
+ showPageSizes: function showPageSizes() {
146
+ return this.itemsToFit.includes(this.pagerSizesIndex);
147
+ },
148
+ showInfo: function showInfo() {
149
+ return this.itemsToFit.includes(this.pagerInfoIndex);
137
150
  }
138
151
  },
139
152
  methods: {
@@ -158,12 +171,12 @@ var PagerVue2 = {
158
171
  if (!element || !this.$props.responsive || this.$props.settings.responsive === false) {
159
172
  return;
160
173
  }
161
- this.itemsToFit = this.fitChildsInParent(element, this.itemsWidths || []);
174
+ this.itemsToFit = this.fitChildrenInParent(element, this.itemsWidths || []);
162
175
  },
163
176
  transformDimesion: function transformDimesion(initialValue) {
164
177
  return typeof initialValue === 'string' ? initialValue.endsWith('px') ? initialValue : initialValue + 'px' : initialValue + 'px';
165
178
  },
166
- collectPagerChildsWidths: function collectPagerChildsWidths() {
179
+ collectPagerChildrenWidths: function collectPagerChildrenWidths() {
167
180
  var _a;
168
181
  var arrayChildren = Array.from(((_a = this.$el) === null || _a === void 0 ? void 0 : _a.children) || []);
169
182
  var widths = arrayChildren.map(function (item) {
@@ -174,17 +187,17 @@ var PagerVue2 = {
174
187
  });
175
188
  return widths;
176
189
  },
177
- fitChildsInParent: function fitChildsInParent(parent, childsWidths) {
190
+ fitChildrenInParent: function fitChildrenInParent(parent, childrenWidths) {
178
191
  var fitItems = [0];
179
192
  var elementsWith = 0;
180
- var updatedWidths = childsWidths;
193
+ var updatedWidths = childrenWidths;
181
194
  var parentWidth = parent.offsetWidth;
182
- var firstElement = childsWidths[0];
183
- var buffer = 40;
195
+ var firstElement = childrenWidths[0];
196
+ var buffer = 30;
184
197
  elementsWith += firstElement;
185
- for (var index = 1; index < childsWidths.length; index++) {
198
+ for (var index = 1; index < childrenWidths.length; index++) {
186
199
  var parentChild = parent.children[index];
187
- var currentElement = (parentChild === null || parentChild === void 0 ? void 0 : parentChild.offsetWidth) || childsWidths[index];
200
+ var currentElement = (parentChild === null || parentChild === void 0 ? void 0 : parentChild.offsetWidth) || childrenWidths[index];
188
201
  if ((elementsWith += currentElement) < parentWidth - buffer) {
189
202
  fitItems.push(index);
190
203
  } else {
@@ -402,7 +415,7 @@ var PagerVue2 = {
402
415
  messagesMap: messagesMap,
403
416
  size: this.size
404
417
  });
405
- var infoElement = !settings.info ? '' :
418
+ var infoElement = settings.info &&
406
419
  // @ts-ignore function children
407
420
  h(PagerInfo, {
408
421
  totalPages: this.$props.total,
@@ -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: 1694607231,
11
+ publishDate: 1695038293,
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
  };
@@ -96,7 +96,6 @@ export interface PagerComputed {
96
96
  * @hidden
97
97
  */
98
98
  export interface PagerData {
99
- currentSize: string;
100
99
  }
101
100
  /**
102
101
  * @hidden
@@ -87,25 +87,33 @@ var PagerVue2 = {
87
87
  },
88
88
  data: function data() {
89
89
  return {
90
- currentSize: 'medium',
91
90
  currentRtl: false,
92
91
  itemsToFit: undefined,
93
92
  itemsWidths: undefined
94
93
  };
95
94
  },
96
95
  mounted: function mounted() {
97
- window.addEventListener('resize', this.onWindowResize);
96
+ if (kendo_vue_common_1.canUseDOM && window.ResizeObserver) {
97
+ this.observerResize = new window.ResizeObserver(this.onWindowResize);
98
+ this.observerResize.observe(this.$el);
99
+ }
98
100
  this.currentRtl = (0, kendo_vue_common_1.isRtl)(this.$el);
99
- var childsWidths = this.collectPagerChildsWidths();
100
- this.itemsWidths = childsWidths;
101
+ var childrenWidths = this.collectPagerChildrenWidths();
102
+ this.itemsWidths = childrenWidths;
101
103
  this.onWindowResize();
102
104
  },
103
105
  destroyed: !!isV3 ? undefined : function () {
104
- window.removeEventListener('resize', this.onWindowResize);
106
+ var _a;
107
+ if (((_a = this.document) === null || _a === void 0 ? void 0 : _a.body) && this.observerResize) {
108
+ this.observerResize.disconnect();
109
+ }
105
110
  },
106
111
  // @ts-ignore
107
112
  unmounted: function unmounted() {
108
- window.removeEventListener('resize', this.onWindowResize);
113
+ var _a;
114
+ if (((_a = this.document) === null || _a === void 0 ? void 0 : _a.body) && this.observerResize) {
115
+ this.observerResize.disconnect();
116
+ }
109
117
  },
110
118
  inject: {
111
119
  kendoLocalizationService: {
@@ -120,10 +128,9 @@ var PagerVue2 = {
120
128
  get: function get() {
121
129
  var _a;
122
130
  var size = this.$props.size;
123
- var mobileClass = !(!this.$props.responsive || this.$props.settings.responsive === false);
124
131
  return _a = {
125
132
  'k-pager': true
126
- }, _a["k-pager-".concat(kendo_vue_common_1.kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-pager-mobile-".concat(kendo_vue_common_1.kendoThemeMaps.sizeMap[this.currentSize])] = mobileClass && this.currentSize, _a;
133
+ }, _a["k-pager-".concat(kendo_vue_common_1.kendoThemeMaps.sizeMap[size] || size)] = size, _a;
127
134
  }
128
135
  },
129
136
  totalPages: {
@@ -140,6 +147,12 @@ var PagerVue2 = {
140
147
  get: function get() {
141
148
  return this.$props.take || this.$props.pageSize;
142
149
  }
150
+ },
151
+ showPageSizes: function showPageSizes() {
152
+ return this.itemsToFit.includes(this.pagerSizesIndex);
153
+ },
154
+ showInfo: function showInfo() {
155
+ return this.itemsToFit.includes(this.pagerInfoIndex);
143
156
  }
144
157
  },
145
158
  methods: {
@@ -164,12 +177,12 @@ var PagerVue2 = {
164
177
  if (!element || !this.$props.responsive || this.$props.settings.responsive === false) {
165
178
  return;
166
179
  }
167
- this.itemsToFit = this.fitChildsInParent(element, this.itemsWidths || []);
180
+ this.itemsToFit = this.fitChildrenInParent(element, this.itemsWidths || []);
168
181
  },
169
182
  transformDimesion: function transformDimesion(initialValue) {
170
183
  return typeof initialValue === 'string' ? initialValue.endsWith('px') ? initialValue : initialValue + 'px' : initialValue + 'px';
171
184
  },
172
- collectPagerChildsWidths: function collectPagerChildsWidths() {
185
+ collectPagerChildrenWidths: function collectPagerChildrenWidths() {
173
186
  var _a;
174
187
  var arrayChildren = Array.from(((_a = this.$el) === null || _a === void 0 ? void 0 : _a.children) || []);
175
188
  var widths = arrayChildren.map(function (item) {
@@ -180,17 +193,17 @@ var PagerVue2 = {
180
193
  });
181
194
  return widths;
182
195
  },
183
- fitChildsInParent: function fitChildsInParent(parent, childsWidths) {
196
+ fitChildrenInParent: function fitChildrenInParent(parent, childrenWidths) {
184
197
  var fitItems = [0];
185
198
  var elementsWith = 0;
186
- var updatedWidths = childsWidths;
199
+ var updatedWidths = childrenWidths;
187
200
  var parentWidth = parent.offsetWidth;
188
- var firstElement = childsWidths[0];
189
- var buffer = 40;
201
+ var firstElement = childrenWidths[0];
202
+ var buffer = 30;
190
203
  elementsWith += firstElement;
191
- for (var index = 1; index < childsWidths.length; index++) {
204
+ for (var index = 1; index < childrenWidths.length; index++) {
192
205
  var parentChild = parent.children[index];
193
- var currentElement = (parentChild === null || parentChild === void 0 ? void 0 : parentChild.offsetWidth) || childsWidths[index];
206
+ var currentElement = (parentChild === null || parentChild === void 0 ? void 0 : parentChild.offsetWidth) || childrenWidths[index];
194
207
  if ((elementsWith += currentElement) < parentWidth - buffer) {
195
208
  fitItems.push(index);
196
209
  } else {
@@ -408,7 +421,7 @@ var PagerVue2 = {
408
421
  messagesMap: messagesMap,
409
422
  size: this.size
410
423
  });
411
- var infoElement = !settings.info ? '' :
424
+ var infoElement = settings.info &&
412
425
  // @ts-ignore function children
413
426
  h(PagerInfo_1.PagerInfo, {
414
427
  totalPages: this.$props.total,
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.0",
4
+ "version": "3.14.1-dev.202309181204",
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.0"
53
+ "@progress/kendo-vue-common": "3.14.1-dev.202309181204"
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.0",
62
- "@progress/kendo-vue-buttons": "3.14.0",
63
- "@progress/kendo-vue-dateinputs": "3.14.0",
64
- "@progress/kendo-vue-dropdowns": "3.14.0",
65
- "@progress/kendo-vue-grid": "3.14.0",
66
- "@progress/kendo-vue-inputs": "3.14.0",
67
- "@progress/kendo-vue-intl": "3.14.0",
68
- "@progress/kendo-vue-popup": "3.14.0"
61
+ "@progress/kendo-vue-animation": "3.14.1-dev.202309181204",
62
+ "@progress/kendo-vue-buttons": "3.14.1-dev.202309181204",
63
+ "@progress/kendo-vue-dateinputs": "3.14.1-dev.202309181204",
64
+ "@progress/kendo-vue-dropdowns": "3.14.1-dev.202309181204",
65
+ "@progress/kendo-vue-grid": "3.14.1-dev.202309181204",
66
+ "@progress/kendo-vue-inputs": "3.14.1-dev.202309181204",
67
+ "@progress/kendo-vue-intl": "3.14.1-dev.202309181204",
68
+ "@progress/kendo-vue-popup": "3.14.1-dev.202309181204"
69
69
  },
70
70
  "@progress": {
71
71
  "friendlyName": "Data Tools",