@progress/kendo-vue-grid 2.5.2 → 2.5.3-dev.202110250717

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.js CHANGED
@@ -640,13 +640,39 @@ var Grid = {
640
640
  this.dragLogic.columns = this._columns;
641
641
  },
642
642
  resolveTitle: function resolveTitle(field) {
643
- // @ts-ignore
644
- var column = this.$props.columns.find(function (c) {
645
- return c.field === field;
646
- });
643
+ var column = this.findColumnByField(field);
647
644
  var title = column && (column.title || column.field);
648
645
  return title === undefined ? field : title;
649
646
  },
647
+ findColumnByField: function findColumnByField(field) {
648
+ var _this = this;
649
+
650
+ var column;
651
+ this.$props.columns.forEach(function (c) {
652
+ var columnFound = _this.searchColumn(c, field);
653
+
654
+ if (columnFound) {
655
+ column = columnFound;
656
+ }
657
+ });
658
+ return column;
659
+ },
660
+ searchColumn: function searchColumn(column, field) {
661
+ if (column.field === field) {
662
+ return column;
663
+ } else if (column.children) {
664
+ var i = void 0,
665
+ result = null;
666
+
667
+ for (i = 0; result == null && i < column.children.length; i++) {
668
+ result = this.searchColumn(column.children[i], field);
669
+ }
670
+
671
+ return result;
672
+ }
673
+
674
+ return null;
675
+ },
650
676
  getDataState: function getDataState() {
651
677
  return {
652
678
  filter: this.$props.filter,
@@ -4,6 +4,7 @@ declare type DefaultData<V> = object | ((this: V) => {});
4
4
  declare type DefaultMethods<V> = {
5
5
  [key: string]: (this: V, ...args: any[]) => any;
6
6
  };
7
+ import { GridFilterOperator } from '../interfaces/GridFilterOperator';
7
8
  /**
8
9
  * @hidden
9
10
  */
@@ -16,6 +17,7 @@ export interface ColumnMenuFilterCellProps {
16
17
  text: string;
17
18
  operator: any;
18
19
  }>;
20
+ booleanValues: GridFilterOperator[];
19
21
  onFocus?: (e: any) => void;
20
22
  onChange?: (event: {
21
23
  value: any;
@@ -16,7 +16,8 @@ var GridColumnMenuFilterCell = {
16
16
  filterType: String,
17
17
  value: [Object, String, Number, Date, Boolean],
18
18
  operator: String,
19
- operators: Array
19
+ operators: Array,
20
+ booleanValues: Array
20
21
  },
21
22
  // @ts-ignore
22
23
  emits: {
@@ -58,7 +59,7 @@ var GridColumnMenuFilterCell = {
58
59
  return item.operator === _this.$props.operator;
59
60
  }) || null;
60
61
 
61
- var filterComponent = function filterComponent(filterType, value, operators) {
62
+ var filterComponent = function filterComponent(filterType, value, booleanValues) {
62
63
  var _this = this;
63
64
 
64
65
  switch (filterType) {
@@ -111,17 +112,17 @@ var GridColumnMenuFilterCell = {
111
112
  on: this.v3 ? undefined : {
112
113
  "change": this.boolDropdownChange
113
114
  },
114
- value: operators.find(function (item) {
115
+ value: booleanValues.find(function (item) {
115
116
  return item.operator === (noFilterSet_1(value) ? '' : value);
116
117
  }),
117
118
  attrs: this.v3 ? undefined : {
118
- value: operators.find(function (item) {
119
+ value: booleanValues.find(function (item) {
119
120
  return item.operator === (noFilterSet_1(value) ? '' : value);
120
121
  }),
121
- "data-items": operators,
122
+ "data-items": booleanValues,
122
123
  textField: "text"
123
124
  },
124
- "data-items": operators,
125
+ "data-items": booleanValues,
125
126
  textField: "text"
126
127
  })
127
128
  );
@@ -159,7 +160,7 @@ var GridColumnMenuFilterCell = {
159
160
  },
160
161
  "data-items": this.$props.operators,
161
162
  textField: "text"
162
- }), filterComponent.call(this, this.$props.filterType, this.$props.value, this.$props.operators)]);
163
+ }), filterComponent.call(this, this.$props.filterType, this.$props.value, this.$props.booleanValues)]);
163
164
  }
164
165
  };
165
166
  var GridColumnMenuFilterCellVue3 = GridColumnMenuFilterCell;
@@ -54,38 +54,15 @@ var GridColumnMenuFilterUI = {
54
54
  logicValue = _a.logicValue,
55
55
  operators = _a.operators,
56
56
  render = _a.render;
57
-
58
- var optionMapper = function optionMapper(items, selected) {
59
- return items.map(function (item) {
60
- if (selected && item.operator === selected.operator) {
61
- return h("option", {
62
- value: this.v3 ? item.operator : null,
63
- domProps: this.v3 ? undefined : {
64
- "value": item.operator
65
- },
66
- selected: true,
67
- attrs: this.v3 ? undefined : {
68
- selected: true
69
- }
70
- }, [item.text]);
71
- } else {
72
- return h("option", {
73
- value: this.v3 ? item.operator : null,
74
- domProps: this.v3 ? undefined : {
75
- "value": item.operator
76
- }
77
- }, [item.text]);
78
- }
79
- });
80
- };
81
-
82
57
  var firstField = firstFilterProps.field,
83
58
  firstValue = firstFilterProps.value,
84
59
  firstOperator = firstFilterProps.operator,
60
+ firstBooleanValues = firstFilterProps.booleanValues,
85
61
  firstFilterType = firstFilterProps.filterType,
86
62
  secondField = secondFilterProps.field,
87
63
  secondValue = secondFilterProps.value,
88
64
  secondOperator = secondFilterProps.operator,
65
+ secondBooleanValues = secondFilterProps.booleanValues,
89
66
  secondFilterType = secondFilterProps.filterType;
90
67
  var defaultRendering = h("div", [// @ts-ignore
91
68
  h(GridColumnMenuFilterCell, {
@@ -94,11 +71,13 @@ var GridColumnMenuFilterUI = {
94
71
  field: firstField,
95
72
  value: firstValue,
96
73
  operator: firstOperator,
74
+ booleanValues: firstBooleanValues,
97
75
  filterType: firstFilterType,
98
76
  operators: operators
99
77
  },
100
78
  value: firstValue,
101
79
  operator: firstOperator,
80
+ booleanValues: firstBooleanValues,
102
81
  filterType: firstFilterType,
103
82
  onFiltercellfocus: this.handleFocus,
104
83
  on: this.v3 ? undefined : {
@@ -133,11 +112,13 @@ var GridColumnMenuFilterUI = {
133
112
  field: secondField,
134
113
  value: secondValue,
135
114
  operator: secondOperator,
115
+ booleanValues: secondBooleanValues,
136
116
  filterType: secondFilterType,
137
117
  operators: operators
138
118
  },
139
119
  value: secondValue,
140
120
  operator: secondOperator,
121
+ booleanValues: secondBooleanValues,
141
122
  filterType: secondFilterType,
142
123
  onFiltercellfocus: this.handleFocus,
143
124
  on: this.v3 ? undefined : {
@@ -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: 1634297420,
8
+ publishDate: 1635146052,
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/npm/Grid.js CHANGED
@@ -676,13 +676,39 @@ var Grid = {
676
676
  this.dragLogic.columns = this._columns;
677
677
  },
678
678
  resolveTitle: function resolveTitle(field) {
679
- // @ts-ignore
680
- var column = this.$props.columns.find(function (c) {
681
- return c.field === field;
682
- });
679
+ var column = this.findColumnByField(field);
683
680
  var title = column && (column.title || column.field);
684
681
  return title === undefined ? field : title;
685
682
  },
683
+ findColumnByField: function findColumnByField(field) {
684
+ var _this = this;
685
+
686
+ var column;
687
+ this.$props.columns.forEach(function (c) {
688
+ var columnFound = _this.searchColumn(c, field);
689
+
690
+ if (columnFound) {
691
+ column = columnFound;
692
+ }
693
+ });
694
+ return column;
695
+ },
696
+ searchColumn: function searchColumn(column, field) {
697
+ if (column.field === field) {
698
+ return column;
699
+ } else if (column.children) {
700
+ var i = void 0,
701
+ result = null;
702
+
703
+ for (i = 0; result == null && i < column.children.length; i++) {
704
+ result = this.searchColumn(column.children[i], field);
705
+ }
706
+
707
+ return result;
708
+ }
709
+
710
+ return null;
711
+ },
686
712
  getDataState: function getDataState() {
687
713
  return {
688
714
  filter: this.$props.filter,
@@ -4,6 +4,7 @@ declare type DefaultData<V> = object | ((this: V) => {});
4
4
  declare type DefaultMethods<V> = {
5
5
  [key: string]: (this: V, ...args: any[]) => any;
6
6
  };
7
+ import { GridFilterOperator } from '../interfaces/GridFilterOperator';
7
8
  /**
8
9
  * @hidden
9
10
  */
@@ -16,6 +17,7 @@ export interface ColumnMenuFilterCellProps {
16
17
  text: string;
17
18
  operator: any;
18
19
  }>;
20
+ booleanValues: GridFilterOperator[];
19
21
  onFocus?: (e: any) => void;
20
22
  onChange?: (event: {
21
23
  value: any;
@@ -28,7 +28,8 @@ var GridColumnMenuFilterCell = {
28
28
  filterType: String,
29
29
  value: [Object, String, Number, Date, Boolean],
30
30
  operator: String,
31
- operators: Array
31
+ operators: Array,
32
+ booleanValues: Array
32
33
  },
33
34
  // @ts-ignore
34
35
  emits: {
@@ -70,7 +71,7 @@ var GridColumnMenuFilterCell = {
70
71
  return item.operator === _this.$props.operator;
71
72
  }) || null;
72
73
 
73
- var filterComponent = function filterComponent(filterType, value, operators) {
74
+ var filterComponent = function filterComponent(filterType, value, booleanValues) {
74
75
  var _this = this;
75
76
 
76
77
  switch (filterType) {
@@ -123,17 +124,17 @@ var GridColumnMenuFilterCell = {
123
124
  on: this.v3 ? undefined : {
124
125
  "change": this.boolDropdownChange
125
126
  },
126
- value: operators.find(function (item) {
127
+ value: booleanValues.find(function (item) {
127
128
  return item.operator === (noFilterSet_1(value) ? '' : value);
128
129
  }),
129
130
  attrs: this.v3 ? undefined : {
130
- value: operators.find(function (item) {
131
+ value: booleanValues.find(function (item) {
131
132
  return item.operator === (noFilterSet_1(value) ? '' : value);
132
133
  }),
133
- "data-items": operators,
134
+ "data-items": booleanValues,
134
135
  textField: "text"
135
136
  },
136
- "data-items": operators,
137
+ "data-items": booleanValues,
137
138
  textField: "text"
138
139
  })
139
140
  );
@@ -171,7 +172,7 @@ var GridColumnMenuFilterCell = {
171
172
  },
172
173
  "data-items": this.$props.operators,
173
174
  textField: "text"
174
- }), filterComponent.call(this, this.$props.filterType, this.$props.value, this.$props.operators)]);
175
+ }), filterComponent.call(this, this.$props.filterType, this.$props.value, this.$props.booleanValues)]);
175
176
  }
176
177
  };
177
178
  exports.GridColumnMenuFilterCell = GridColumnMenuFilterCell;
@@ -65,38 +65,15 @@ var GridColumnMenuFilterUI = {
65
65
  logicValue = _a.logicValue,
66
66
  operators = _a.operators,
67
67
  render = _a.render;
68
-
69
- var optionMapper = function optionMapper(items, selected) {
70
- return items.map(function (item) {
71
- if (selected && item.operator === selected.operator) {
72
- return h("option", {
73
- value: this.v3 ? item.operator : null,
74
- domProps: this.v3 ? undefined : {
75
- "value": item.operator
76
- },
77
- selected: true,
78
- attrs: this.v3 ? undefined : {
79
- selected: true
80
- }
81
- }, [item.text]);
82
- } else {
83
- return h("option", {
84
- value: this.v3 ? item.operator : null,
85
- domProps: this.v3 ? undefined : {
86
- "value": item.operator
87
- }
88
- }, [item.text]);
89
- }
90
- });
91
- };
92
-
93
68
  var firstField = firstFilterProps.field,
94
69
  firstValue = firstFilterProps.value,
95
70
  firstOperator = firstFilterProps.operator,
71
+ firstBooleanValues = firstFilterProps.booleanValues,
96
72
  firstFilterType = firstFilterProps.filterType,
97
73
  secondField = secondFilterProps.field,
98
74
  secondValue = secondFilterProps.value,
99
75
  secondOperator = secondFilterProps.operator,
76
+ secondBooleanValues = secondFilterProps.booleanValues,
100
77
  secondFilterType = secondFilterProps.filterType;
101
78
  var defaultRendering = h("div", [// @ts-ignore
102
79
  h(GridColumnMenuFilterCell_1.GridColumnMenuFilterCell, {
@@ -105,11 +82,13 @@ var GridColumnMenuFilterUI = {
105
82
  field: firstField,
106
83
  value: firstValue,
107
84
  operator: firstOperator,
85
+ booleanValues: firstBooleanValues,
108
86
  filterType: firstFilterType,
109
87
  operators: operators
110
88
  },
111
89
  value: firstValue,
112
90
  operator: firstOperator,
91
+ booleanValues: firstBooleanValues,
113
92
  filterType: firstFilterType,
114
93
  onFiltercellfocus: this.handleFocus,
115
94
  on: this.v3 ? undefined : {
@@ -144,11 +123,13 @@ var GridColumnMenuFilterUI = {
144
123
  field: secondField,
145
124
  value: secondValue,
146
125
  operator: secondOperator,
126
+ booleanValues: secondBooleanValues,
147
127
  filterType: secondFilterType,
148
128
  operators: operators
149
129
  },
150
130
  value: secondValue,
151
131
  operator: secondOperator,
132
+ booleanValues: secondBooleanValues,
152
133
  filterType: secondFilterType,
153
134
  onFiltercellfocus: this.handleFocus,
154
135
  on: this.v3 ? undefined : {
@@ -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: 1634297420,
11
+ publishDate: 1635146052,
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": "2.5.2",
3
+ "version": "2.5.3-dev.202110250717",
4
4
  "description": "Kendo UI for Vue Grid package",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,24 +35,26 @@
35
35
  "vue": "^2.6.12 || ^3.0.2"
36
36
  },
37
37
  "dependencies": {
38
- "@progress/kendo-vue-common": "2.5.2"
38
+ "@progress/kendo-vue-common": "2.5.3-dev.202110250717"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@progress/kendo-data-query": "^1.5.4",
42
42
  "@progress/kendo-drawing": "^1.9.3",
43
43
  "@progress/kendo-licensing": "^1.1.0",
44
- "@progress/kendo-vue-animation": "2.5.2",
45
- "@progress/kendo-vue-data-tools": "2.5.2",
46
- "@progress/kendo-vue-dateinputs": "2.5.2",
47
- "@progress/kendo-vue-dropdowns": "2.5.2",
48
- "@progress/kendo-vue-excel-export": "2.5.2",
49
- "@progress/kendo-vue-inputs": "2.5.2",
50
- "@progress/kendo-vue-intl": "2.5.2",
51
- "@progress/kendo-vue-pdf": "2.5.2",
52
- "@progress/kendo-vue-popup": "2.5.2",
44
+ "@progress/kendo-vue-animation": "2.5.3-dev.202110250717",
45
+ "@progress/kendo-vue-charts": "2.5.3-dev.202110250717",
46
+ "@progress/kendo-vue-data-tools": "2.5.3-dev.202110250717",
47
+ "@progress/kendo-vue-dateinputs": "2.5.3-dev.202110250717",
48
+ "@progress/kendo-vue-dropdowns": "2.5.3-dev.202110250717",
49
+ "@progress/kendo-vue-excel-export": "2.5.3-dev.202110250717",
50
+ "@progress/kendo-vue-inputs": "2.5.3-dev.202110250717",
51
+ "@progress/kendo-vue-intl": "2.5.3-dev.202110250717",
52
+ "@progress/kendo-vue-pdf": "2.5.3-dev.202110250717",
53
+ "@progress/kendo-vue-popup": "2.5.3-dev.202110250717",
53
54
  "cldr-core": "^34.0.0",
54
55
  "cldr-dates-full": "^34.0.0",
55
- "cldr-numbers-full": "^34.0.0"
56
+ "cldr-numbers-full": "^34.0.0",
57
+ "hammerjs": "^2.0.0"
56
58
  },
57
59
  "@progress": {
58
60
  "friendlyName": "Grid",