@progress/kendo-vue-layout 3.7.4-dev.202211041243 → 3.7.4-dev.202211280833

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.
@@ -15,7 +15,7 @@ import * as Vue from 'vue';
15
15
  var allVue = Vue;
16
16
  var gh = allVue.h;
17
17
  var isV3 = allVue.version && allVue.version[0] === '3';
18
- import { templateRendering, getListeners, setRef, getRef } from '@progress/kendo-vue-common';
18
+ import { templateRendering, getListeners, setRef, getRef, canUseDOM } from '@progress/kendo-vue-common';
19
19
  import { Keys, guid, validatePackage } from '@progress/kendo-vue-common';
20
20
  import { getDirectParentId, isIdEmptyOrZeroLevel, EMPTY_ID, ZERO_LEVEL_ZERO_ITEM_ID, getRootParentId, getItemById } from '../utils/itemsIdsUtils';
21
21
  import { prepareInputItemsForInternalWork } from '../utils/prepareInputItemsForInternalWork';
@@ -187,7 +187,7 @@ var MenuVue2 = {
187
187
  if ((event.keyCode === Keys.enter || event.keyCode === Keys.space) && !currentItem.disabled) {
188
188
  this.mouseOverHandler.handleItemSelectedViaKeyboard();
189
189
  this.dispatchSelectEventIfWired(event, currentItem.id);
190
- if (!event.defaultPrevented && currentItem.items.length === 0 && currentItem.url) {
190
+ if (!event.defaultPrevented && currentItem.items.length === 0 && currentItem.url && canUseDOM) {
191
191
  window.location.assign(currentItem.url);
192
192
  }
193
193
  }
@@ -230,7 +230,7 @@ var MenuVue2 = {
230
230
  this.setFocusedItemId(itemId);
231
231
  this.mouseOverHandler.handleItemClick(itemId, this.isItemWithDefaultClose(itemId));
232
232
  this.dispatchSelectEventIfWired(event, itemId);
233
- if (!event.defaultPrevented && item.url) {
233
+ if (!event.defaultPrevented && item.url && canUseDOM) {
234
234
  window.location.assign(item.url);
235
235
  }
236
236
  }
@@ -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: 1667565118,
8
+ publishDate: 1669623669,
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
  };
@@ -225,23 +225,14 @@ var PanelBarVue2 = {
225
225
  default:
226
226
  }
227
227
  },
228
- nextTick: function nextTick(f) {
229
- this.nextTickId = window.setTimeout(function () {
230
- return f();
231
- });
232
- },
233
228
  handleWrapperFocus: function handleWrapperFocus() {
234
- clearTimeout(this.nextTickId);
235
229
  if (!this.wrapperFocused) {
236
230
  this.wrapperFocused = true;
237
231
  }
238
232
  },
239
233
  handleWrapperBlur: function handleWrapperBlur() {
240
- // this.nextTick(() => {
241
234
  this.wrapperFocused = false;
242
- // });
243
235
  },
244
-
245
236
  handleKeyDown: function handleKeyDown(event) {
246
237
  var rtl = this._element && getComputedStyle(this._element).direction === 'rtl' || false;
247
238
  if (event.target === event.currentTarget) {
@@ -7,7 +7,7 @@ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } fr
7
7
  * @hidden
8
8
  */
9
9
  export interface ResizeHandlersProps {
10
- resizable: string | boolean;
10
+ direction: string;
11
11
  onResize?: (e: any, args: {
12
12
  end: boolean;
13
13
  direction: any;
@@ -1,17 +1,78 @@
1
+ var __assign = this && this.__assign || function () {
2
+ __assign = Object.assign || function (t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) {
6
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
7
+ }
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
1
13
  // @ts-ignore
2
14
  import * as Vue from 'vue';
3
15
  var allVue = Vue;
4
16
  var gh = allVue.h;
5
17
  var isV3 = allVue.version && allVue.version[0] === '3';
18
+ import { Draggable } from '@progress/kendo-vue-common';
6
19
  /**
7
20
  * @hidden
8
21
  */
9
22
  var ResizeHandlersVue2 = {
10
23
  name: 'KendoResizeHandlers',
11
24
  props: {
12
- resizable: [String, Boolean],
25
+ direction: String,
13
26
  rtl: Boolean
14
27
  },
28
+ computed: {
29
+ handleClass: function handleClass() {
30
+ return 'k-resize-handle k-cursor-' + this.direction + '-resize';
31
+ },
32
+ dirStyles: function dirStyles() {
33
+ var direction = this.$props.direction;
34
+ switch (direction) {
35
+ case 'ew':
36
+ return this.rtl ? {
37
+ top: 0,
38
+ width: '9px',
39
+ left: 0,
40
+ right: ''
41
+ } : {
42
+ top: 0,
43
+ width: '9px',
44
+ right: 0,
45
+ left: ''
46
+ };
47
+ case 'ns':
48
+ return {
49
+ left: 0,
50
+ height: '9px'
51
+ };
52
+ case 'nesw':
53
+ case 'nwse':
54
+ return this.rtl ? {
55
+ width: '9px',
56
+ height: '9px',
57
+ right: '',
58
+ left: 0
59
+ } : {
60
+ width: '9px',
61
+ height: '9px',
62
+ right: 0,
63
+ left: ''
64
+ };
65
+ default:
66
+ return {};
67
+ }
68
+ },
69
+ handleStyle: function handleStyle() {
70
+ return __assign({
71
+ bottom: 0,
72
+ right: 0
73
+ }, this.dirStyles);
74
+ }
75
+ },
15
76
  // @ts-ignore
16
77
  setup: !isV3 ? undefined : function () {
17
78
  var v3 = !!isV3;
@@ -20,55 +81,50 @@ var ResizeHandlersVue2 = {
20
81
  };
21
82
  },
22
83
  render: function render(createElement) {
84
+ var _this2 = this;
85
+ var _this = this;
23
86
  var h = gh || createElement;
24
- var _a = this.$props,
25
- resizable = _a.resizable,
26
- onPress = _a.onPress,
27
- rtl = _a.rtl;
28
- if (!resizable) {
29
- return null;
30
- }
31
- // const Handle = (props: { onResize: any; style: {}; d: string; onPress: any }) => (
32
- // // @ts-ignore
33
- // <Draggable
34
- // onPress={props.onPress}
35
- // onDrag={(data: any) => { props.onResize(data.event, false, props.d); }}
36
- // onRelease={(data: any) => { props.onResize(data.event, true, props.d); }}
37
- // >
38
- // <div className={'k-resize-handle k-cursor-' + props.d + '-resize'}
39
- // style={{ bottom: 0, right: 0, ...props.style }} />
40
- // </Draggable>
41
- // );
42
- return h("div")
43
- // <React.Fragment>
44
- // {resizable !== 'vertical' && (
45
- // <Handle
46
- // onPress={onPress}
47
- // onResize={this.handleResize}
48
- // d="ew"
49
- // style={rtl ? { top: 0, width: 9, left: 0, right: '' } : { top: 0, width: 9, right: 0, left: '' }}
50
- // />
51
- // )}
52
- // {resizable !== 'horizontal' && (
53
- // <Handle onPress={onPress} onResize={this.handleResize} d="ns" style={{ left: 0, height: 9 }} />)}
54
- // {(resizable === true) && (
55
- // <Handle
56
- // onPress={onPress}
57
- // onResize={this.handleResize}
58
- // d={rtl ? 'nesw' : 'nwse'}
59
- // style={rtl ? { width: 9, height: 9, right: '', left: 0 } : { width: 9, height: 9, right: 0, left: '' }}
60
- // />)}
61
- // </React.Fragment>
62
- ;
87
+ var direction = this.$props.direction;
88
+ return (
89
+ // @ts-ignore function children
90
+ h(Draggable, {
91
+ onPress: this.handlePress,
92
+ on: this.v3 ? undefined : {
93
+ "press": this.handlePress,
94
+ "drag": function drag(event) {
95
+ _this.handleResize(event, false, direction);
96
+ },
97
+ "release": function release(event) {
98
+ _this.handleResize(event, true, direction);
99
+ }
100
+ },
101
+ onDrag: function drag(event) {
102
+ _this.handleResize(event, false, direction);
103
+ },
104
+ onRelease: function release(event) {
105
+ _this.handleResize(event, true, direction);
106
+ }
107
+ }, this.v3 ? function () {
108
+ return [h("div", {
109
+ "class": _this2.handleClass,
110
+ style: _this2.handleStyle
111
+ })];
112
+ } : [h("div", {
113
+ "class": _this2.handleClass,
114
+ style: _this2.handleStyle
115
+ })])
116
+ );
63
117
  },
64
-
65
118
  methods: {
66
119
  handleResize: function handleResize(event, isEnd, direction) {
67
120
  event.originalEvent.preventDefault();
68
- this.$props.onResize(event, {
121
+ this.$emit('resize', event, {
69
122
  end: isEnd,
70
123
  direction: direction
71
124
  });
125
+ },
126
+ handlePress: function handlePress(event) {
127
+ this.$emit('press', event);
72
128
  }
73
129
  }
74
130
  };