@progress/kendo-vue-layout 3.1.5 → 3.2.0-dev.202204130351

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-layout',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1649686616,
8
+ publishDate: 1649821411,
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
  };
@@ -41,6 +41,11 @@ import { NavigationAction } from './interfaces/NavigationAction'; // tslint:enab
41
41
 
42
42
  var PanelBarVue2 = {
43
43
  name: 'KendoPanelBar',
44
+ // @ts-ignore
45
+ emits: {
46
+ select: null,
47
+ keydown: null
48
+ },
44
49
  props: {
45
50
  animation: {
46
51
  type: Boolean,
@@ -49,7 +54,10 @@ var PanelBarVue2 = {
49
54
  items: Array,
50
55
  dir: String,
51
56
  selected: String,
52
- expanded: Array,
57
+ expanded: {
58
+ type: Array,
59
+ default: undefined
60
+ },
53
61
  focused: String,
54
62
  expandMode: {
55
63
  type: String,
@@ -81,7 +89,7 @@ var PanelBarVue2 = {
81
89
  return selected;
82
90
  },
83
91
  expandedItems: function expandedItems() {
84
- var expanded = this.$props.isControlled ? this.$props.expanded || [] : this.currentExpanded;
92
+ var expanded = this.$props.expanded !== undefined ? this.$props.expanded || [] : this.currentExpanded;
85
93
  return expanded;
86
94
  },
87
95
  computedItems: function computedItems() {
@@ -164,37 +172,39 @@ var PanelBarVue2 = {
164
172
  }
165
173
  });
166
174
 
167
- switch (this.expandMode) {
168
- case 'single':
169
- newExpanded = __spreadArrays(selectedChild.parentUniquePrivateKey, [selectedChild.uniquePrivateKey]);
170
-
171
- if (isArrayEqual(this.expandedItems, newExpanded)) {
172
- if (selectedChild.parentUniquePrivateKey) {
173
- newExpanded = __spreadArrays(selectedChild.parentUniquePrivateKey);
174
- } else {
175
- newExpanded = [];
175
+ if (selectedChild) {
176
+ switch (this.expandMode) {
177
+ case 'single':
178
+ newExpanded = __spreadArrays(selectedChild.parentUniquePrivateKey, [selectedChild.uniquePrivateKey]);
179
+
180
+ if (isArrayEqual(this.expandedItems, newExpanded)) {
181
+ if (selectedChild.parentUniquePrivateKey) {
182
+ newExpanded = __spreadArrays(selectedChild.parentUniquePrivateKey);
183
+ } else {
184
+ newExpanded = [];
185
+ }
176
186
  }
177
- }
178
187
 
179
- break;
188
+ break;
180
189
 
181
- case 'multiple':
182
- newExpanded = this.expandedItems.slice();
183
- var index = newExpanded.indexOf(selectedChild.uniquePrivateKey);
184
- index === -1 ? newExpanded.push(selectedChild.uniquePrivateKey) : newExpanded.splice(index, 1);
185
- break;
190
+ case 'multiple':
191
+ newExpanded = this.expandedItems.slice();
192
+ var index = newExpanded.indexOf(selectedChild.uniquePrivateKey);
193
+ index === -1 ? newExpanded.push(selectedChild.uniquePrivateKey) : newExpanded.splice(index, 1);
194
+ break;
186
195
 
187
- default:
188
- newExpanded = this.expandedItems.slice();
189
- break;
190
- }
196
+ default:
197
+ newExpanded = this.expandedItems.slice();
198
+ break;
199
+ }
191
200
 
192
- this.currentSelected = selectedChild.uniquePrivateKey;
193
- this.currentExpanded = newExpanded;
194
- this.$emit('select', {
195
- target: selectedChild,
196
- expandedItems: newExpanded
197
- });
201
+ this.currentSelected = selectedChild.uniquePrivateKey;
202
+ this.currentExpanded = newExpanded;
203
+ this.$emit('select', {
204
+ target: selectedChild,
205
+ expandedItems: newExpanded
206
+ });
207
+ }
198
208
  },
199
209
  onFocus: function onFocus(event, step) {
200
210
  var _this = this;
@@ -293,6 +303,8 @@ var PanelBarVue2 = {
293
303
  this.onNavigate(event, action);
294
304
  }
295
305
  }
306
+
307
+ this.$emit('keydown', event);
296
308
  }
297
309
  }
298
310
  };
@@ -14,7 +14,7 @@ export interface PanelBarGroupProps {
14
14
  disabled?: boolean;
15
15
  content?: any;
16
16
  keepItemsMounted?: boolean;
17
- uniquePrivateKey?: string;
17
+ uniquePrivateKey?: string | number;
18
18
  }
19
19
  /** @hidden */
20
20
  interface PanelBarGroupState {
@@ -31,7 +31,7 @@ var PanelBarGroupVue2 = {
31
31
  expanded: Boolean,
32
32
  disabled: Boolean,
33
33
  keepItemsMounted: Boolean,
34
- uniquePrivateKey: String,
34
+ uniquePrivateKey: [String, Number],
35
35
  content: Object
36
36
  },
37
37
  data: function data() {
@@ -37,10 +37,10 @@ var PanelBarItemVue2 = {
37
37
  return 'Untitled';
38
38
  }
39
39
  },
40
- id: String,
40
+ id: [String, Number],
41
41
  focused: Boolean,
42
42
  keepItemsMounted: Boolean,
43
- uniquePrivateKey: String,
43
+ uniquePrivateKey: [String, Number],
44
44
  parentUniquePrivateKey: Array,
45
45
  parentExpanded: Boolean,
46
46
  headerClassName: String,
@@ -70,6 +70,7 @@ var PanelBarItemVue2 = {
70
70
  var _b = this.$props,
71
71
  id = _b.id,
72
72
  item = _b.item,
73
+ icon = _b.icon,
73
74
  items = _b.items,
74
75
  content = _b.content,
75
76
  title = _b.title,
@@ -91,7 +92,7 @@ var PanelBarItemVue2 = {
91
92
  }, "k-level-" + level, className);
92
93
  var panelBarLinkClassName = classNames('k-link', {
93
94
  'k-state-selected': !disabled && selected,
94
- 'k-state-focus': !disabled && focused,
95
+ 'k-state-focus': focused,
95
96
  'k-state-disabled': disabled
96
97
  }, headerClassName);
97
98
  var panelBarItemArrowClassName = classNames('k-panelbar-toggle', 'k-icon', (_a = {}, _a['k-i-arrow-chevron-up'] = expanded && hasContent, _a['k-panelbar-collapse'] = expanded && hasContent, _a['k-i-arrow-chevron-down'] = !expanded && hasContent, _a['k-panelbar-expand'] = !expanded && hasContent, _a));
@@ -129,7 +130,7 @@ var PanelBarItemVue2 = {
129
130
  return null;
130
131
  };
131
132
 
132
- var icon = iconElement.call(this);
133
+ var iconRender = iconElement.call(this);
133
134
  var arrow = !disabled && (items || content) ? h("span", {
134
135
  "class": panelBarItemArrowClassName
135
136
  }) : null;
@@ -181,7 +182,7 @@ var PanelBarItemVue2 = {
181
182
  on: this.v3 ? undefined : {
182
183
  "click": this.handleItemClick
183
184
  }
184
- }, [icon, this.$props.header ? header : h("span", {
185
+ }, [iconRender, this.$props.header ? header : h("span", {
185
186
  "class": 'k-panelbar-item-text'
186
187
  }, [title]), arrow]), group]);
187
188
  },
@@ -49,7 +49,7 @@ export interface PanelBarItemProps {
49
49
  /**
50
50
  * Allows the component to set the `id` property to each item. If not set, a default `id` is applied.
51
51
  */
52
- id?: string;
52
+ id?: string | number;
53
53
  /**
54
54
  * Sets the initial focused state of the PanelBarItem. Controlled by the PanelBar component.
55
55
  */
@@ -69,7 +69,7 @@ export interface PanelBarItemProps {
69
69
  /**
70
70
  * Used to identify the PanelBarItems inside the PanelBar ([see example]({% slug controlling_state_panelbar %})). Does not depend on the state of the PanelBarItem.
71
71
  */
72
- uniquePrivateKey?: string;
72
+ uniquePrivateKey?: string | number;
73
73
  /**
74
74
  * @hidden
75
75
  */
@@ -151,7 +151,7 @@ export var getInitialState = function getInitialState(props, expandMode, result,
151
151
  */
152
152
 
153
153
  var getId = function getId(child, parentPrivateKey, idx) {
154
- return child && child.props && child.props.id ? child.props.id : parentPrivateKey.length ? parentPrivateKey[parentPrivateKey.length - 1] + ("." + idx) : "." + idx;
154
+ return child && child && child.id ? child.id : parentPrivateKey.length ? parentPrivateKey[parentPrivateKey.length - 1] + ("." + idx) : "." + idx;
155
155
  };
156
156
  /**
157
157
  * @hidden
@@ -204,7 +204,7 @@ export function flatVisibleChildren(children, flattenVisibleChildren) {
204
204
  }
205
205
 
206
206
  children.forEach(function (child) {
207
- if (child && !child.disabled && (child.expanded || child.parentExpanded)) {
207
+ if (child && (child.expanded || child.parentExpanded)) {
208
208
  flattenVisibleChildren.push(child);
209
209
 
210
210
  if (child.items) {
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-layout',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1649686616,
11
+ publishDate: 1649821411,
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
  };
@@ -55,6 +55,11 @@ var NavigationAction_1 = require("./interfaces/NavigationAction"); // tslint:ena
55
55
 
56
56
  var PanelBarVue2 = {
57
57
  name: 'KendoPanelBar',
58
+ // @ts-ignore
59
+ emits: {
60
+ select: null,
61
+ keydown: null
62
+ },
58
63
  props: {
59
64
  animation: {
60
65
  type: Boolean,
@@ -63,7 +68,10 @@ var PanelBarVue2 = {
63
68
  items: Array,
64
69
  dir: String,
65
70
  selected: String,
66
- expanded: Array,
71
+ expanded: {
72
+ type: Array,
73
+ default: undefined
74
+ },
67
75
  focused: String,
68
76
  expandMode: {
69
77
  type: String,
@@ -95,7 +103,7 @@ var PanelBarVue2 = {
95
103
  return selected;
96
104
  },
97
105
  expandedItems: function expandedItems() {
98
- var expanded = this.$props.isControlled ? this.$props.expanded || [] : this.currentExpanded;
106
+ var expanded = this.$props.expanded !== undefined ? this.$props.expanded || [] : this.currentExpanded;
99
107
  return expanded;
100
108
  },
101
109
  computedItems: function computedItems() {
@@ -178,37 +186,39 @@ var PanelBarVue2 = {
178
186
  }
179
187
  });
180
188
 
181
- switch (this.expandMode) {
182
- case 'single':
183
- newExpanded = __spreadArrays(selectedChild.parentUniquePrivateKey, [selectedChild.uniquePrivateKey]);
184
-
185
- if (util_1.isArrayEqual(this.expandedItems, newExpanded)) {
186
- if (selectedChild.parentUniquePrivateKey) {
187
- newExpanded = __spreadArrays(selectedChild.parentUniquePrivateKey);
188
- } else {
189
- newExpanded = [];
189
+ if (selectedChild) {
190
+ switch (this.expandMode) {
191
+ case 'single':
192
+ newExpanded = __spreadArrays(selectedChild.parentUniquePrivateKey, [selectedChild.uniquePrivateKey]);
193
+
194
+ if (util_1.isArrayEqual(this.expandedItems, newExpanded)) {
195
+ if (selectedChild.parentUniquePrivateKey) {
196
+ newExpanded = __spreadArrays(selectedChild.parentUniquePrivateKey);
197
+ } else {
198
+ newExpanded = [];
199
+ }
190
200
  }
191
- }
192
201
 
193
- break;
202
+ break;
194
203
 
195
- case 'multiple':
196
- newExpanded = this.expandedItems.slice();
197
- var index = newExpanded.indexOf(selectedChild.uniquePrivateKey);
198
- index === -1 ? newExpanded.push(selectedChild.uniquePrivateKey) : newExpanded.splice(index, 1);
199
- break;
204
+ case 'multiple':
205
+ newExpanded = this.expandedItems.slice();
206
+ var index = newExpanded.indexOf(selectedChild.uniquePrivateKey);
207
+ index === -1 ? newExpanded.push(selectedChild.uniquePrivateKey) : newExpanded.splice(index, 1);
208
+ break;
200
209
 
201
- default:
202
- newExpanded = this.expandedItems.slice();
203
- break;
204
- }
210
+ default:
211
+ newExpanded = this.expandedItems.slice();
212
+ break;
213
+ }
205
214
 
206
- this.currentSelected = selectedChild.uniquePrivateKey;
207
- this.currentExpanded = newExpanded;
208
- this.$emit('select', {
209
- target: selectedChild,
210
- expandedItems: newExpanded
211
- });
215
+ this.currentSelected = selectedChild.uniquePrivateKey;
216
+ this.currentExpanded = newExpanded;
217
+ this.$emit('select', {
218
+ target: selectedChild,
219
+ expandedItems: newExpanded
220
+ });
221
+ }
212
222
  },
213
223
  onFocus: function onFocus(event, step) {
214
224
  var _this = this;
@@ -307,6 +317,8 @@ var PanelBarVue2 = {
307
317
  this.onNavigate(event, action);
308
318
  }
309
319
  }
320
+
321
+ this.$emit('keydown', event);
310
322
  }
311
323
  }
312
324
  };
@@ -14,7 +14,7 @@ export interface PanelBarGroupProps {
14
14
  disabled?: boolean;
15
15
  content?: any;
16
16
  keepItemsMounted?: boolean;
17
- uniquePrivateKey?: string;
17
+ uniquePrivateKey?: string | number;
18
18
  }
19
19
  /** @hidden */
20
20
  interface PanelBarGroupState {
@@ -42,7 +42,7 @@ var PanelBarGroupVue2 = {
42
42
  expanded: Boolean,
43
43
  disabled: Boolean,
44
44
  keepItemsMounted: Boolean,
45
- uniquePrivateKey: String,
45
+ uniquePrivateKey: [String, Number],
46
46
  content: Object
47
47
  },
48
48
  data: function data() {
@@ -47,10 +47,10 @@ var PanelBarItemVue2 = {
47
47
  return 'Untitled';
48
48
  }
49
49
  },
50
- id: String,
50
+ id: [String, Number],
51
51
  focused: Boolean,
52
52
  keepItemsMounted: Boolean,
53
- uniquePrivateKey: String,
53
+ uniquePrivateKey: [String, Number],
54
54
  parentUniquePrivateKey: Array,
55
55
  parentExpanded: Boolean,
56
56
  headerClassName: String,
@@ -80,6 +80,7 @@ var PanelBarItemVue2 = {
80
80
  var _b = this.$props,
81
81
  id = _b.id,
82
82
  item = _b.item,
83
+ icon = _b.icon,
83
84
  items = _b.items,
84
85
  content = _b.content,
85
86
  title = _b.title,
@@ -101,7 +102,7 @@ var PanelBarItemVue2 = {
101
102
  }, "k-level-" + level, className);
102
103
  var panelBarLinkClassName = kendo_vue_common_1.classNames('k-link', {
103
104
  'k-state-selected': !disabled && selected,
104
- 'k-state-focus': !disabled && focused,
105
+ 'k-state-focus': focused,
105
106
  'k-state-disabled': disabled
106
107
  }, headerClassName);
107
108
  var panelBarItemArrowClassName = kendo_vue_common_1.classNames('k-panelbar-toggle', 'k-icon', (_a = {}, _a['k-i-arrow-chevron-up'] = expanded && hasContent, _a['k-panelbar-collapse'] = expanded && hasContent, _a['k-i-arrow-chevron-down'] = !expanded && hasContent, _a['k-panelbar-expand'] = !expanded && hasContent, _a));
@@ -139,7 +140,7 @@ var PanelBarItemVue2 = {
139
140
  return null;
140
141
  };
141
142
 
142
- var icon = iconElement.call(this);
143
+ var iconRender = iconElement.call(this);
143
144
  var arrow = !disabled && (items || content) ? h("span", {
144
145
  "class": panelBarItemArrowClassName
145
146
  }) : null;
@@ -191,7 +192,7 @@ var PanelBarItemVue2 = {
191
192
  on: this.v3 ? undefined : {
192
193
  "click": this.handleItemClick
193
194
  }
194
- }, [icon, this.$props.header ? header : h("span", {
195
+ }, [iconRender, this.$props.header ? header : h("span", {
195
196
  "class": 'k-panelbar-item-text'
196
197
  }, [title]), arrow]), group]);
197
198
  },
@@ -49,7 +49,7 @@ export interface PanelBarItemProps {
49
49
  /**
50
50
  * Allows the component to set the `id` property to each item. If not set, a default `id` is applied.
51
51
  */
52
- id?: string;
52
+ id?: string | number;
53
53
  /**
54
54
  * Sets the initial focused state of the PanelBarItem. Controlled by the PanelBar component.
55
55
  */
@@ -69,7 +69,7 @@ export interface PanelBarItemProps {
69
69
  /**
70
70
  * Used to identify the PanelBarItems inside the PanelBar ([see example]({% slug controlling_state_panelbar %})). Does not depend on the state of the PanelBarItem.
71
71
  */
72
- uniquePrivateKey?: string;
72
+ uniquePrivateKey?: string | number;
73
73
  /**
74
74
  * @hidden
75
75
  */
@@ -162,7 +162,7 @@ exports.getInitialState = function (props, expandMode, result, parentExpanded, p
162
162
 
163
163
 
164
164
  var getId = function getId(child, parentPrivateKey, idx) {
165
- return child && child.props && child.props.id ? child.props.id : parentPrivateKey.length ? parentPrivateKey[parentPrivateKey.length - 1] + ("." + idx) : "." + idx;
165
+ return child && child && child.id ? child.id : parentPrivateKey.length ? parentPrivateKey[parentPrivateKey.length - 1] + ("." + idx) : "." + idx;
166
166
  };
167
167
  /**
168
168
  * @hidden
@@ -219,7 +219,7 @@ function flatVisibleChildren(children, flattenVisibleChildren) {
219
219
  }
220
220
 
221
221
  children.forEach(function (child) {
222
- if (child && !child.disabled && (child.expanded || child.parentExpanded)) {
222
+ if (child && (child.expanded || child.parentExpanded)) {
223
223
  flattenVisibleChildren.push(child);
224
224
 
225
225
  if (child.items) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-layout",
3
3
  "description": "Kendo UI for Vue Layouts package",
4
- "version": "3.1.5",
4
+ "version": "3.2.0-dev.202204130351",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/telerik/kendo-vue.git"
@@ -32,26 +32,26 @@
32
32
  ],
33
33
  "peerDependencies": {
34
34
  "@progress/kendo-licensing": "^1.1.0",
35
- "@progress/kendo-vue-intl": "^3.0.0",
36
- "@progress/kendo-vue-progressbars": "^3.0.0",
35
+ "@progress/kendo-vue-intl": "^3.2.0",
36
+ "@progress/kendo-vue-progressbars": "^3.2.0",
37
37
  "vue": "^2.6.12 || ^3.0.2"
38
38
  },
39
39
  "dependencies": {
40
- "@progress/kendo-vue-animation": "3.1.5",
41
- "@progress/kendo-vue-common": "3.1.5",
42
- "@progress/kendo-vue-popup": "3.1.5"
40
+ "@progress/kendo-vue-animation": "3.2.0-dev.202204130351",
41
+ "@progress/kendo-vue-common": "3.2.0-dev.202204130351",
42
+ "@progress/kendo-vue-popup": "3.2.0-dev.202204130351"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@progress/kendo-data-query": "^1.5.0",
46
46
  "@progress/kendo-date-math": "^1.5.1",
47
47
  "@progress/kendo-drawing": "^1.8.0",
48
48
  "@progress/kendo-licensing": "^1.0.1",
49
- "@progress/kendo-vue-buttons": "3.1.5",
50
- "@progress/kendo-vue-dateinputs": "3.1.5",
51
- "@progress/kendo-vue-dropdowns": "3.1.5",
52
- "@progress/kendo-vue-inputs": "3.1.5",
53
- "@progress/kendo-vue-intl": "3.1.5",
54
- "@progress/kendo-vue-progressbars": "3.1.5"
49
+ "@progress/kendo-vue-buttons": "3.2.0-dev.202204130351",
50
+ "@progress/kendo-vue-dateinputs": "3.2.0-dev.202204130351",
51
+ "@progress/kendo-vue-dropdowns": "3.2.0-dev.202204130351",
52
+ "@progress/kendo-vue-inputs": "3.2.0-dev.202204130351",
53
+ "@progress/kendo-vue-intl": "3.2.0-dev.202204130351",
54
+ "@progress/kendo-vue-progressbars": "3.2.0-dev.202204130351"
55
55
  },
56
56
  "@progress": {
57
57
  "friendlyName": "Layouts",