@progress/kendo-vue-data-tools 3.12.0 → 3.13.0-dev.202308171358
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/cdn/js/kendo-vue-data-tools.js +1 -1
- package/dist/es/filter/Expression.js +11 -49
- package/dist/es/filter/Filter.js +1 -1
- package/dist/es/filter/GroupToolbar.js +41 -267
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/pager/Pager.js +56 -34
- package/dist/es/pager/PagerInfo.js +2 -2
- package/dist/es/pager/PagerInput.js +23 -38
- package/dist/es/pager/PagerNumericButtons.js +9 -1
- package/dist/esm/filter/Expression.js +11 -49
- package/dist/esm/filter/Filter.js +1 -1
- package/dist/esm/filter/GroupToolbar.js +41 -267
- package/dist/esm/package-metadata.js +1 -1
- package/dist/esm/pager/Pager.js +56 -34
- package/dist/esm/pager/PagerInfo.js +2 -2
- package/dist/esm/pager/PagerInput.js +23 -38
- package/dist/esm/pager/PagerNumericButtons.js +9 -1
- package/dist/npm/filter/Expression.js +11 -49
- package/dist/npm/filter/Filter.js +1 -1
- package/dist/npm/filter/GroupToolbar.js +40 -266
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/pager/Pager.js +56 -34
- package/dist/npm/pager/PagerInfo.js +2 -2
- package/dist/npm/pager/PagerInput.js +23 -38
- package/dist/npm/pager/PagerNumericButtons.js +9 -1
- package/package.json +11 -10
|
@@ -24,7 +24,7 @@ import * as Vue from 'vue';
|
|
|
24
24
|
var allVue = Vue;
|
|
25
25
|
var gh = allVue.h;
|
|
26
26
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
27
|
-
import { Button, Toolbar,
|
|
27
|
+
import { Button, Toolbar, ButtonGroup } from '@progress/kendo-vue-buttons';
|
|
28
28
|
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
29
29
|
import { stringOperator } from './operators.js';
|
|
30
30
|
import { messages, filterAndLogic, filterOrLogic, filterAddExpression, filterAddGroup, filterClose } from '../messages/main.js';
|
|
@@ -72,9 +72,7 @@ var GroupToolbarVue2 = {
|
|
|
72
72
|
render: function render(createElement) {
|
|
73
73
|
var _this = this;
|
|
74
74
|
var h = gh || createElement;
|
|
75
|
-
var
|
|
76
|
-
fields = _a.fields,
|
|
77
|
-
filter = _a.filter;
|
|
75
|
+
var filter = this.$props.filter;
|
|
78
76
|
var locService = provideLocalizationService(this);
|
|
79
77
|
return h("div", {
|
|
80
78
|
"class": "k-filter-toolbar"
|
|
@@ -92,78 +90,12 @@ var GroupToolbarVue2 = {
|
|
|
92
90
|
}, this.v3 ? function () {
|
|
93
91
|
return [
|
|
94
92
|
// @ts-ignore function children
|
|
95
|
-
h(
|
|
93
|
+
h(ButtonGroup, {
|
|
94
|
+
"class": "k-toolbar-button-group"
|
|
95
|
+
}, _this.v3 ? function () {
|
|
96
96
|
return [
|
|
97
97
|
// @ts-ignore function children
|
|
98
|
-
h(
|
|
99
|
-
return [
|
|
100
|
-
// @ts-ignore function children
|
|
101
|
-
h(Button, {
|
|
102
|
-
togglable: true,
|
|
103
|
-
attrs: _this.v3 ? undefined : {
|
|
104
|
-
togglable: true,
|
|
105
|
-
selected: filter.logic === 'and',
|
|
106
|
-
type: "button"
|
|
107
|
-
},
|
|
108
|
-
onClick: _this.onLogicAnd,
|
|
109
|
-
on: _this.v3 ? undefined : {
|
|
110
|
-
"click": _this.onLogicAnd
|
|
111
|
-
},
|
|
112
|
-
selected: filter.logic === 'and',
|
|
113
|
-
type: "button"
|
|
114
|
-
}, _this.v3 ? function () {
|
|
115
|
-
return [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])];
|
|
116
|
-
} : [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])]),
|
|
117
|
-
// @ts-ignore function children
|
|
118
|
-
h(Button, {
|
|
119
|
-
togglable: true,
|
|
120
|
-
attrs: _this.v3 ? undefined : {
|
|
121
|
-
togglable: true,
|
|
122
|
-
selected: filter.logic === 'or',
|
|
123
|
-
type: "button"
|
|
124
|
-
},
|
|
125
|
-
onClick: _this.onLogicOr,
|
|
126
|
-
on: _this.v3 ? undefined : {
|
|
127
|
-
"click": _this.onLogicOr
|
|
128
|
-
},
|
|
129
|
-
selected: filter.logic === 'or',
|
|
130
|
-
type: "button"
|
|
131
|
-
}, _this.v3 ? function () {
|
|
132
|
-
return [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])];
|
|
133
|
-
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])];
|
|
134
|
-
} : [h(Button, {
|
|
135
|
-
togglable: true,
|
|
136
|
-
attrs: _this.v3 ? undefined : {
|
|
137
|
-
togglable: true,
|
|
138
|
-
selected: filter.logic === 'and',
|
|
139
|
-
type: "button"
|
|
140
|
-
},
|
|
141
|
-
onClick: _this.onLogicAnd,
|
|
142
|
-
on: _this.v3 ? undefined : {
|
|
143
|
-
"click": _this.onLogicAnd
|
|
144
|
-
},
|
|
145
|
-
selected: filter.logic === 'and',
|
|
146
|
-
type: "button"
|
|
147
|
-
}, _this.v3 ? function () {
|
|
148
|
-
return [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])];
|
|
149
|
-
} : [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])]), h(Button, {
|
|
150
|
-
togglable: true,
|
|
151
|
-
attrs: _this.v3 ? undefined : {
|
|
152
|
-
togglable: true,
|
|
153
|
-
selected: filter.logic === 'or',
|
|
154
|
-
type: "button"
|
|
155
|
-
},
|
|
156
|
-
onClick: _this.onLogicOr,
|
|
157
|
-
on: _this.v3 ? undefined : {
|
|
158
|
-
"click": _this.onLogicOr
|
|
159
|
-
},
|
|
160
|
-
selected: filter.logic === 'or',
|
|
161
|
-
type: "button"
|
|
162
|
-
}, _this.v3 ? function () {
|
|
163
|
-
return [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])];
|
|
164
|
-
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])])];
|
|
165
|
-
} : [h(ButtonGroup, _this.v3 ? function () {
|
|
166
|
-
return [h(Button, {
|
|
98
|
+
h(Button, {
|
|
167
99
|
togglable: true,
|
|
168
100
|
attrs: _this.v3 ? undefined : {
|
|
169
101
|
togglable: true,
|
|
@@ -174,11 +106,14 @@ var GroupToolbarVue2 = {
|
|
|
174
106
|
on: _this.v3 ? undefined : {
|
|
175
107
|
"click": _this.onLogicAnd
|
|
176
108
|
},
|
|
109
|
+
"class": "k-toolbar-button",
|
|
177
110
|
selected: filter.logic === 'and',
|
|
178
111
|
type: "button"
|
|
179
112
|
}, _this.v3 ? function () {
|
|
180
113
|
return [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])];
|
|
181
|
-
} : [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])]),
|
|
114
|
+
} : [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])]),
|
|
115
|
+
// @ts-ignore function children
|
|
116
|
+
h(Button, {
|
|
182
117
|
togglable: true,
|
|
183
118
|
attrs: _this.v3 ? undefined : {
|
|
184
119
|
togglable: true,
|
|
@@ -189,6 +124,7 @@ var GroupToolbarVue2 = {
|
|
|
189
124
|
on: _this.v3 ? undefined : {
|
|
190
125
|
"click": _this.onLogicOr
|
|
191
126
|
},
|
|
127
|
+
"class": "k-toolbar-button",
|
|
192
128
|
selected: filter.logic === 'or',
|
|
193
129
|
type: "button"
|
|
194
130
|
}, _this.v3 ? function () {
|
|
@@ -205,6 +141,7 @@ var GroupToolbarVue2 = {
|
|
|
205
141
|
on: _this.v3 ? undefined : {
|
|
206
142
|
"click": _this.onLogicAnd
|
|
207
143
|
},
|
|
144
|
+
"class": "k-toolbar-button",
|
|
208
145
|
selected: filter.logic === 'and',
|
|
209
146
|
type: "button"
|
|
210
147
|
}, _this.v3 ? function () {
|
|
@@ -220,32 +157,14 @@ var GroupToolbarVue2 = {
|
|
|
220
157
|
on: _this.v3 ? undefined : {
|
|
221
158
|
"click": _this.onLogicOr
|
|
222
159
|
},
|
|
160
|
+
"class": "k-toolbar-button",
|
|
223
161
|
selected: filter.logic === 'or',
|
|
224
162
|
type: "button"
|
|
225
163
|
}, _this.v3 ? function () {
|
|
226
164
|
return [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])];
|
|
227
|
-
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])])
|
|
165
|
+
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])]),
|
|
228
166
|
// @ts-ignore function children
|
|
229
|
-
h(
|
|
230
|
-
return [
|
|
231
|
-
// @ts-ignore function children
|
|
232
|
-
h(Button, {
|
|
233
|
-
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
234
|
-
attrs: _this.v3 ? undefined : {
|
|
235
|
-
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
236
|
-
icon: "filter-add-expression",
|
|
237
|
-
svgIcon: filterAddExpressionIcon,
|
|
238
|
-
type: "button"
|
|
239
|
-
},
|
|
240
|
-
icon: "filter-add-expression",
|
|
241
|
-
svgIcon: filterAddExpressionIcon,
|
|
242
|
-
type: "button",
|
|
243
|
-
onClick: _this.onAddExpression,
|
|
244
|
-
on: _this.v3 ? undefined : {
|
|
245
|
-
"click": _this.onAddExpression
|
|
246
|
-
}
|
|
247
|
-
})];
|
|
248
|
-
} : [h(Button, {
|
|
167
|
+
h(Button, {
|
|
249
168
|
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
250
169
|
attrs: _this.v3 ? undefined : {
|
|
251
170
|
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
@@ -256,32 +175,14 @@ var GroupToolbarVue2 = {
|
|
|
256
175
|
icon: "filter-add-expression",
|
|
257
176
|
svgIcon: filterAddExpressionIcon,
|
|
258
177
|
type: "button",
|
|
178
|
+
"class": "k-toolbar-button",
|
|
259
179
|
onClick: _this.onAddExpression,
|
|
260
180
|
on: _this.v3 ? undefined : {
|
|
261
181
|
"click": _this.onAddExpression
|
|
262
182
|
}
|
|
263
|
-
})
|
|
183
|
+
}),
|
|
264
184
|
// @ts-ignore function children
|
|
265
|
-
h(
|
|
266
|
-
return [
|
|
267
|
-
// @ts-ignore function children
|
|
268
|
-
h(Button, {
|
|
269
|
-
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
270
|
-
attrs: _this.v3 ? undefined : {
|
|
271
|
-
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
272
|
-
icon: "filter-add-group",
|
|
273
|
-
svgIcon: filterAddGroupIcon,
|
|
274
|
-
type: "button"
|
|
275
|
-
},
|
|
276
|
-
icon: "filter-add-group",
|
|
277
|
-
svgIcon: filterAddGroupIcon,
|
|
278
|
-
type: "button",
|
|
279
|
-
onClick: _this.onAddGroup,
|
|
280
|
-
on: _this.v3 ? undefined : {
|
|
281
|
-
"click": _this.onAddGroup
|
|
282
|
-
}
|
|
283
|
-
})];
|
|
284
|
-
} : [h(Button, {
|
|
185
|
+
h(Button, {
|
|
285
186
|
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
286
187
|
attrs: _this.v3 ? undefined : {
|
|
287
188
|
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
@@ -292,116 +193,35 @@ var GroupToolbarVue2 = {
|
|
|
292
193
|
icon: "filter-add-group",
|
|
293
194
|
svgIcon: filterAddGroupIcon,
|
|
294
195
|
type: "button",
|
|
196
|
+
"class": "k-toolbar-button",
|
|
295
197
|
onClick: _this.onAddGroup,
|
|
296
198
|
on: _this.v3 ? undefined : {
|
|
297
199
|
"click": _this.onAddGroup
|
|
298
200
|
}
|
|
299
|
-
})
|
|
201
|
+
}),
|
|
300
202
|
// @ts-ignore function children
|
|
301
|
-
h(
|
|
302
|
-
return [
|
|
303
|
-
// @ts-ignore function children
|
|
304
|
-
h(Button, {
|
|
305
|
-
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
306
|
-
attrs: _this.v3 ? undefined : {
|
|
307
|
-
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
308
|
-
icon: "x",
|
|
309
|
-
svgIcon: xIcon,
|
|
310
|
-
look: "flat",
|
|
311
|
-
type: "button"
|
|
312
|
-
},
|
|
313
|
-
icon: "x",
|
|
314
|
-
svgIcon: xIcon,
|
|
315
|
-
look: "flat",
|
|
316
|
-
type: "button",
|
|
317
|
-
onClick: _this.onGroupRemove,
|
|
318
|
-
on: _this.v3 ? undefined : {
|
|
319
|
-
"click": _this.onGroupRemove
|
|
320
|
-
}
|
|
321
|
-
})];
|
|
322
|
-
} : [h(Button, {
|
|
203
|
+
h(Button, {
|
|
323
204
|
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
324
205
|
attrs: _this.v3 ? undefined : {
|
|
325
206
|
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
326
207
|
icon: "x",
|
|
327
208
|
svgIcon: xIcon,
|
|
328
|
-
|
|
209
|
+
fillMode: "flat",
|
|
329
210
|
type: "button"
|
|
330
211
|
},
|
|
331
212
|
icon: "x",
|
|
332
213
|
svgIcon: xIcon,
|
|
333
|
-
|
|
214
|
+
fillMode: "flat",
|
|
334
215
|
type: "button",
|
|
216
|
+
"class": "k-toolbar-button",
|
|
335
217
|
onClick: _this.onGroupRemove,
|
|
336
218
|
on: _this.v3 ? undefined : {
|
|
337
219
|
"click": _this.onGroupRemove
|
|
338
220
|
}
|
|
339
|
-
})]
|
|
340
|
-
} : [h(
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
togglable: true,
|
|
344
|
-
attrs: _this.v3 ? undefined : {
|
|
345
|
-
togglable: true,
|
|
346
|
-
selected: filter.logic === 'and',
|
|
347
|
-
type: "button"
|
|
348
|
-
},
|
|
349
|
-
onClick: _this.onLogicAnd,
|
|
350
|
-
on: _this.v3 ? undefined : {
|
|
351
|
-
"click": _this.onLogicAnd
|
|
352
|
-
},
|
|
353
|
-
selected: filter.logic === 'and',
|
|
354
|
-
type: "button"
|
|
355
|
-
}, _this.v3 ? function () {
|
|
356
|
-
return [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])];
|
|
357
|
-
} : [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])]), h(Button, {
|
|
358
|
-
togglable: true,
|
|
359
|
-
attrs: _this.v3 ? undefined : {
|
|
360
|
-
togglable: true,
|
|
361
|
-
selected: filter.logic === 'or',
|
|
362
|
-
type: "button"
|
|
363
|
-
},
|
|
364
|
-
onClick: _this.onLogicOr,
|
|
365
|
-
on: _this.v3 ? undefined : {
|
|
366
|
-
"click": _this.onLogicOr
|
|
367
|
-
},
|
|
368
|
-
selected: filter.logic === 'or',
|
|
369
|
-
type: "button"
|
|
370
|
-
}, _this.v3 ? function () {
|
|
371
|
-
return [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])];
|
|
372
|
-
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])];
|
|
373
|
-
} : [h(Button, {
|
|
374
|
-
togglable: true,
|
|
375
|
-
attrs: _this.v3 ? undefined : {
|
|
376
|
-
togglable: true,
|
|
377
|
-
selected: filter.logic === 'and',
|
|
378
|
-
type: "button"
|
|
379
|
-
},
|
|
380
|
-
onClick: _this.onLogicAnd,
|
|
381
|
-
on: _this.v3 ? undefined : {
|
|
382
|
-
"click": _this.onLogicAnd
|
|
383
|
-
},
|
|
384
|
-
selected: filter.logic === 'and',
|
|
385
|
-
type: "button"
|
|
386
|
-
}, _this.v3 ? function () {
|
|
387
|
-
return [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])];
|
|
388
|
-
} : [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])]), h(Button, {
|
|
389
|
-
togglable: true,
|
|
390
|
-
attrs: _this.v3 ? undefined : {
|
|
391
|
-
togglable: true,
|
|
392
|
-
selected: filter.logic === 'or',
|
|
393
|
-
type: "button"
|
|
394
|
-
},
|
|
395
|
-
onClick: _this.onLogicOr,
|
|
396
|
-
on: _this.v3 ? undefined : {
|
|
397
|
-
"click": _this.onLogicOr
|
|
398
|
-
},
|
|
399
|
-
selected: filter.logic === 'or',
|
|
400
|
-
type: "button"
|
|
401
|
-
}, _this.v3 ? function () {
|
|
402
|
-
return [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])];
|
|
403
|
-
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])])];
|
|
404
|
-
} : [h(ButtonGroup, _this.v3 ? function () {
|
|
221
|
+
})];
|
|
222
|
+
} : [h(ButtonGroup, {
|
|
223
|
+
"class": "k-toolbar-button-group"
|
|
224
|
+
}, _this.v3 ? function () {
|
|
405
225
|
return [h(Button, {
|
|
406
226
|
togglable: true,
|
|
407
227
|
attrs: _this.v3 ? undefined : {
|
|
@@ -413,6 +233,7 @@ var GroupToolbarVue2 = {
|
|
|
413
233
|
on: _this.v3 ? undefined : {
|
|
414
234
|
"click": _this.onLogicAnd
|
|
415
235
|
},
|
|
236
|
+
"class": "k-toolbar-button",
|
|
416
237
|
selected: filter.logic === 'and',
|
|
417
238
|
type: "button"
|
|
418
239
|
}, _this.v3 ? function () {
|
|
@@ -428,6 +249,7 @@ var GroupToolbarVue2 = {
|
|
|
428
249
|
on: _this.v3 ? undefined : {
|
|
429
250
|
"click": _this.onLogicOr
|
|
430
251
|
},
|
|
252
|
+
"class": "k-toolbar-button",
|
|
431
253
|
selected: filter.logic === 'or',
|
|
432
254
|
type: "button"
|
|
433
255
|
}, _this.v3 ? function () {
|
|
@@ -444,6 +266,7 @@ var GroupToolbarVue2 = {
|
|
|
444
266
|
on: _this.v3 ? undefined : {
|
|
445
267
|
"click": _this.onLogicAnd
|
|
446
268
|
},
|
|
269
|
+
"class": "k-toolbar-button",
|
|
447
270
|
selected: filter.logic === 'and',
|
|
448
271
|
type: "button"
|
|
449
272
|
}, _this.v3 ? function () {
|
|
@@ -459,28 +282,12 @@ var GroupToolbarVue2 = {
|
|
|
459
282
|
on: _this.v3 ? undefined : {
|
|
460
283
|
"click": _this.onLogicOr
|
|
461
284
|
},
|
|
285
|
+
"class": "k-toolbar-button",
|
|
462
286
|
selected: filter.logic === 'or',
|
|
463
287
|
type: "button"
|
|
464
288
|
}, _this.v3 ? function () {
|
|
465
289
|
return [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])];
|
|
466
|
-
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])])
|
|
467
|
-
return [h(Button, {
|
|
468
|
-
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
469
|
-
attrs: _this.v3 ? undefined : {
|
|
470
|
-
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
471
|
-
icon: "filter-add-expression",
|
|
472
|
-
svgIcon: filterAddExpressionIcon,
|
|
473
|
-
type: "button"
|
|
474
|
-
},
|
|
475
|
-
icon: "filter-add-expression",
|
|
476
|
-
svgIcon: filterAddExpressionIcon,
|
|
477
|
-
type: "button",
|
|
478
|
-
onClick: _this.onAddExpression,
|
|
479
|
-
on: _this.v3 ? undefined : {
|
|
480
|
-
"click": _this.onAddExpression
|
|
481
|
-
}
|
|
482
|
-
})];
|
|
483
|
-
} : [h(Button, {
|
|
290
|
+
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])]), h(Button, {
|
|
484
291
|
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
485
292
|
attrs: _this.v3 ? undefined : {
|
|
486
293
|
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
@@ -491,28 +298,12 @@ var GroupToolbarVue2 = {
|
|
|
491
298
|
icon: "filter-add-expression",
|
|
492
299
|
svgIcon: filterAddExpressionIcon,
|
|
493
300
|
type: "button",
|
|
301
|
+
"class": "k-toolbar-button",
|
|
494
302
|
onClick: _this.onAddExpression,
|
|
495
303
|
on: _this.v3 ? undefined : {
|
|
496
304
|
"click": _this.onAddExpression
|
|
497
305
|
}
|
|
498
|
-
})
|
|
499
|
-
return [h(Button, {
|
|
500
|
-
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
501
|
-
attrs: _this.v3 ? undefined : {
|
|
502
|
-
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
503
|
-
icon: "filter-add-group",
|
|
504
|
-
svgIcon: filterAddGroupIcon,
|
|
505
|
-
type: "button"
|
|
506
|
-
},
|
|
507
|
-
icon: "filter-add-group",
|
|
508
|
-
svgIcon: filterAddGroupIcon,
|
|
509
|
-
type: "button",
|
|
510
|
-
onClick: _this.onAddGroup,
|
|
511
|
-
on: _this.v3 ? undefined : {
|
|
512
|
-
"click": _this.onAddGroup
|
|
513
|
-
}
|
|
514
|
-
})];
|
|
515
|
-
} : [h(Button, {
|
|
306
|
+
}), h(Button, {
|
|
516
307
|
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
517
308
|
attrs: _this.v3 ? undefined : {
|
|
518
309
|
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
@@ -523,47 +314,30 @@ var GroupToolbarVue2 = {
|
|
|
523
314
|
icon: "filter-add-group",
|
|
524
315
|
svgIcon: filterAddGroupIcon,
|
|
525
316
|
type: "button",
|
|
317
|
+
"class": "k-toolbar-button",
|
|
526
318
|
onClick: _this.onAddGroup,
|
|
527
319
|
on: _this.v3 ? undefined : {
|
|
528
320
|
"click": _this.onAddGroup
|
|
529
321
|
}
|
|
530
|
-
})
|
|
531
|
-
return [h(Button, {
|
|
532
|
-
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
533
|
-
attrs: _this.v3 ? undefined : {
|
|
534
|
-
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
535
|
-
icon: "x",
|
|
536
|
-
svgIcon: xIcon,
|
|
537
|
-
look: "flat",
|
|
538
|
-
type: "button"
|
|
539
|
-
},
|
|
540
|
-
icon: "x",
|
|
541
|
-
svgIcon: xIcon,
|
|
542
|
-
look: "flat",
|
|
543
|
-
type: "button",
|
|
544
|
-
onClick: _this.onGroupRemove,
|
|
545
|
-
on: _this.v3 ? undefined : {
|
|
546
|
-
"click": _this.onGroupRemove
|
|
547
|
-
}
|
|
548
|
-
})];
|
|
549
|
-
} : [h(Button, {
|
|
322
|
+
}), h(Button, {
|
|
550
323
|
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
551
324
|
attrs: _this.v3 ? undefined : {
|
|
552
325
|
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
553
326
|
icon: "x",
|
|
554
327
|
svgIcon: xIcon,
|
|
555
|
-
|
|
328
|
+
fillMode: "flat",
|
|
556
329
|
type: "button"
|
|
557
330
|
},
|
|
558
331
|
icon: "x",
|
|
559
332
|
svgIcon: xIcon,
|
|
560
|
-
|
|
333
|
+
fillMode: "flat",
|
|
561
334
|
type: "button",
|
|
335
|
+
"class": "k-toolbar-button",
|
|
562
336
|
onClick: _this.onGroupRemove,
|
|
563
337
|
on: _this.v3 ? undefined : {
|
|
564
338
|
"click": _this.onGroupRemove
|
|
565
339
|
}
|
|
566
|
-
})])])
|
|
340
|
+
})])]);
|
|
567
341
|
},
|
|
568
342
|
methods: {
|
|
569
343
|
onGroupRemove: function onGroupRemove() {
|
|
@@ -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:
|
|
8
|
+
publishDate: 1692280186,
|
|
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
|
};
|
package/dist/esm/pager/Pager.js
CHANGED
|
@@ -25,14 +25,6 @@ import { messages, pagerFirstPage, pagerLastPage, pagerNextPage, pagerPreviousPa
|
|
|
25
25
|
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
26
26
|
import { getListeners, getTemplate, hasListener, isRtl, kendoThemeMaps, templateRendering } from '@progress/kendo-vue-common';
|
|
27
27
|
import { caretAltLeftIcon, caretAltRightIcon, caretAltToLeftIcon, caretAltToRightIcon } from '@progress/kendo-svg-icons';
|
|
28
|
-
/**
|
|
29
|
-
* @hidden
|
|
30
|
-
*/
|
|
31
|
-
var RESPONSIVE_BREAKPOINT_MEDIUM = 600;
|
|
32
|
-
/**
|
|
33
|
-
* @hidden
|
|
34
|
-
*/
|
|
35
|
-
var RESPONSIVE_BREAKPOINT_LARGE = 768;
|
|
36
28
|
/**
|
|
37
29
|
* @hidden
|
|
38
30
|
*/
|
|
@@ -83,18 +75,23 @@ var PagerVue2 = {
|
|
|
83
75
|
default: undefined
|
|
84
76
|
}
|
|
85
77
|
},
|
|
78
|
+
created: function created() {
|
|
79
|
+
this.pagerSizesIndex = 1;
|
|
80
|
+
this.pagerInfoIndex = 2;
|
|
81
|
+
},
|
|
86
82
|
data: function data() {
|
|
87
83
|
return {
|
|
88
84
|
currentSize: 'medium',
|
|
89
|
-
currentRtl: false
|
|
85
|
+
currentRtl: false,
|
|
86
|
+
itemsToFit: undefined,
|
|
87
|
+
itemsWidths: undefined
|
|
90
88
|
};
|
|
91
89
|
},
|
|
92
90
|
mounted: function mounted() {
|
|
93
91
|
window.addEventListener('resize', this.onWindowResize);
|
|
94
92
|
this.currentRtl = isRtl(this.$el);
|
|
95
|
-
this.
|
|
96
|
-
|
|
97
|
-
updated: function updated() {
|
|
93
|
+
var childsWidths = this.collectPagerChildsWidths();
|
|
94
|
+
this.itemsWidths = childsWidths;
|
|
98
95
|
this.onWindowResize();
|
|
99
96
|
},
|
|
100
97
|
destroyed: !!isV3 ? undefined : function () {
|
|
@@ -161,17 +158,41 @@ var PagerVue2 = {
|
|
|
161
158
|
if (!element || !this.$props.responsive || this.$props.settings.responsive === false) {
|
|
162
159
|
return;
|
|
163
160
|
}
|
|
164
|
-
|
|
165
|
-
if (width < RESPONSIVE_BREAKPOINT_MEDIUM) {
|
|
166
|
-
this.currentSize = 'small';
|
|
167
|
-
} else if (width >= RESPONSIVE_BREAKPOINT_MEDIUM && width < RESPONSIVE_BREAKPOINT_LARGE) {
|
|
168
|
-
this.currentSize = 'medium';
|
|
169
|
-
} else {
|
|
170
|
-
this.currentSize = 'large';
|
|
171
|
-
}
|
|
161
|
+
this.itemsToFit = this.fitChildsInParent(element, this.itemsWidths || []);
|
|
172
162
|
},
|
|
173
163
|
transformDimesion: function transformDimesion(initialValue) {
|
|
174
164
|
return typeof initialValue === 'string' ? initialValue.endsWith('px') ? initialValue : initialValue + 'px' : initialValue + 'px';
|
|
165
|
+
},
|
|
166
|
+
collectPagerChildsWidths: function collectPagerChildsWidths() {
|
|
167
|
+
var _a;
|
|
168
|
+
var arrayChildren = Array.from(((_a = this.$el) === null || _a === void 0 ? void 0 : _a.children) || []);
|
|
169
|
+
var widths = arrayChildren.map(function (item) {
|
|
170
|
+
if (item instanceof HTMLElement) {
|
|
171
|
+
return item.offsetWidth;
|
|
172
|
+
}
|
|
173
|
+
return 0;
|
|
174
|
+
});
|
|
175
|
+
return widths;
|
|
176
|
+
},
|
|
177
|
+
fitChildsInParent: function fitChildsInParent(parent, childsWidths) {
|
|
178
|
+
var fitItems = [0];
|
|
179
|
+
var elementsWith = 0;
|
|
180
|
+
var updatedWidths = childsWidths;
|
|
181
|
+
var parentWidth = parent.offsetWidth;
|
|
182
|
+
var firstElement = childsWidths[0];
|
|
183
|
+
var buffer = 40;
|
|
184
|
+
elementsWith += firstElement;
|
|
185
|
+
for (var index = 1; index < childsWidths.length; index++) {
|
|
186
|
+
var parentChild = parent.children[index];
|
|
187
|
+
var currentElement = (parentChild === null || parentChild === void 0 ? void 0 : parentChild.offsetWidth) || childsWidths[index];
|
|
188
|
+
if ((elementsWith += currentElement) < parentWidth - buffer) {
|
|
189
|
+
fitItems.push(index);
|
|
190
|
+
} else {
|
|
191
|
+
updatedWidths[index] = currentElement;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
this.itemsWidths = updatedWidths;
|
|
195
|
+
return fitItems;
|
|
175
196
|
}
|
|
176
197
|
},
|
|
177
198
|
// @ts-ignore
|
|
@@ -187,18 +208,19 @@ var PagerVue2 = {
|
|
|
187
208
|
},
|
|
188
209
|
// @ts-ignore
|
|
189
210
|
render: function render(createElement) {
|
|
211
|
+
var _a, _b;
|
|
190
212
|
var h = gh || createElement;
|
|
191
|
-
var
|
|
192
|
-
skip =
|
|
193
|
-
take =
|
|
194
|
-
total =
|
|
195
|
-
pageSizes =
|
|
196
|
-
buttonCount =
|
|
197
|
-
messagesMap =
|
|
198
|
-
info =
|
|
199
|
-
type =
|
|
200
|
-
previousNext =
|
|
201
|
-
pageSizeValue =
|
|
213
|
+
var _c = this.$props,
|
|
214
|
+
skip = _c.skip,
|
|
215
|
+
take = _c.take,
|
|
216
|
+
total = _c.total,
|
|
217
|
+
pageSizes = _c.pageSizes,
|
|
218
|
+
buttonCount = _c.buttonCount,
|
|
219
|
+
messagesMap = _c.messagesMap,
|
|
220
|
+
info = _c.info,
|
|
221
|
+
type = _c.type,
|
|
222
|
+
previousNext = _c.previousNext,
|
|
223
|
+
pageSizeValue = _c.pageSizeValue;
|
|
202
224
|
var settings = __assign({
|
|
203
225
|
pageSizes: pageSizes,
|
|
204
226
|
buttonCount: buttonCount,
|
|
@@ -233,9 +255,9 @@ var PagerVue2 = {
|
|
|
233
255
|
var changer = settings.type === 'numeric' ?
|
|
234
256
|
// @ts-ignore
|
|
235
257
|
h(PagerNumericButtons, {
|
|
236
|
-
responsiveSize: this.
|
|
258
|
+
responsiveSize: this.responsive && this.itemsToFit && this.itemsToFit.length < 2 ? 'small' : 'large',
|
|
237
259
|
attrs: this.v3 ? undefined : {
|
|
238
|
-
responsiveSize: this.
|
|
260
|
+
responsiveSize: this.responsive && this.itemsToFit && this.itemsToFit.length < 2 ? 'small' : 'large',
|
|
239
261
|
size: this.size,
|
|
240
262
|
buttonCount: settings.buttonCount || 0,
|
|
241
263
|
totalPages: this.totalPages,
|
|
@@ -435,7 +457,7 @@ var PagerVue2 = {
|
|
|
435
457
|
"aria-controls": this.$props.ariaControls
|
|
436
458
|
}, [h("div", {
|
|
437
459
|
"class": 'k-pager-numbers-wrap'
|
|
438
|
-
}, [first, prev, changer, next, last]), renderPageSizes, infoElement]);
|
|
460
|
+
}, [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]);
|
|
439
461
|
}
|
|
440
462
|
};
|
|
441
463
|
/**
|
|
@@ -45,8 +45,8 @@ var PagerInfoVue2 = {
|
|
|
45
45
|
messageKey: pagerInfo,
|
|
46
46
|
defaultMessage: messages[pagerInfo]
|
|
47
47
|
};
|
|
48
|
-
return h("
|
|
49
|
-
"class": "k-pager-info
|
|
48
|
+
return h("span", {
|
|
49
|
+
"class": "k-pager-info"
|
|
50
50
|
}, [intlService.format(localizationService.toLanguageString(infoMessage.messageKey, infoMessage.defaultMessage), [Math.min(this.$props.skip + 1, this.$props.totalPages), Math.min(this.$props.skip + this.$props.currentPage, this.$props.totalPages), this.$props.totalPages])]);
|
|
51
51
|
}
|
|
52
52
|
};
|