@progress/kendo-vue-dialogs 3.6.4 → 3.7.0-dev.202210250731

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.
@@ -4,41 +4,29 @@ var __assign = undefined && undefined.__assign || function () {
4
4
  __assign = Object.assign || function (t) {
5
5
  for (var s, i = 1, n = arguments.length; i < n; i++) {
6
6
  s = arguments[i];
7
-
8
7
  for (var p in s) {
9
8
  if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
10
9
  }
11
10
  }
12
-
13
11
  return t;
14
12
  };
15
-
16
13
  return __assign.apply(this, arguments);
17
14
  };
18
-
19
15
  Object.defineProperty(exports, "__esModule", {
20
16
  value: true
21
17
  });
22
- exports.WindowVue2 = exports.Window = void 0; // @ts-ignore
23
-
18
+ exports.WindowVue2 = exports.Window = void 0;
19
+ // @ts-ignore
24
20
  var Vue = require("vue");
25
-
26
21
  var allVue = Vue;
27
22
  var gh = allVue.h;
28
23
  var isV3 = allVue.version && allVue.version[0] === '3';
29
-
30
24
  var WindowTitlebar_1 = require("./WindowTitlebar");
31
-
32
25
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
33
-
34
26
  var WindowResizeHandlers_1 = require("./WindowResizeHandlers");
35
-
36
27
  var StageEnum_1 = require("./StageEnum");
37
-
38
28
  var package_metadata_1 = require("./package-metadata");
39
-
40
29
  var constants_1 = require("./constants");
41
-
42
30
  var DEFAULT_WIDTH = 300;
43
31
  var DEFAULT_HEIGHT = 300;
44
32
  var DEFAULT_MIN_WIDTH = 120;
@@ -47,7 +35,6 @@ var DEFAULT_STEP = 5;
47
35
  /**
48
36
  * @hidden
49
37
  */
50
-
51
38
  var WindowVue2 = {
52
39
  name: 'KendoWindow',
53
40
  // @ts-ignore
@@ -164,14 +151,12 @@ var WindowVue2 = {
164
151
  mounted: function mounted() {
165
152
  if (window) {
166
153
  window.addEventListener('resize', this.handleBrowserWindowResize);
167
-
168
154
  if (this.$props.appendTo) {
169
155
  var body = document.querySelector(this.$props.appendTo);
170
156
  this.windowWrapper = this.$refs.wrapper;
171
157
  body.append(this.windowWrapper);
172
158
  }
173
159
  }
174
-
175
160
  if (this.$el) {
176
161
  // this.draggable = this.$refs.draggable;
177
162
  this.windowElement = this.$refs.windowElement;
@@ -193,34 +178,28 @@ var WindowVue2 = {
193
178
  if (this.windowStage !== StageEnum_1.windowStage.FULLSCREEN) {
194
179
  return Math.max(this.$props.top || this.currentTop, 0);
195
180
  }
196
-
197
181
  return 0;
198
182
  },
199
183
  computedLeft: function computedLeft() {
200
184
  if (this.windowStage !== StageEnum_1.windowStage.FULLSCREEN) {
201
185
  return Math.max(this.$props.left || this.currentLeft, 0);
202
186
  }
203
-
204
187
  return 0;
205
188
  },
206
189
  computedWidth: function computedWidth() {
207
190
  var width = this.$props.width || this.currentWidth;
208
-
209
191
  if (this.windowStage === StageEnum_1.windowStage.FULLSCREEN) {
210
192
  width = window.innerWidth;
211
193
  }
212
-
213
194
  return width;
214
195
  },
215
196
  computedHeight: function computedHeight() {
216
197
  var height = this.$props.height || this.currentHeight;
217
-
218
198
  if (this.windowStage === StageEnum_1.windowStage.FULLSCREEN) {
219
199
  height = window.innerHeight;
220
200
  } else if (this.windowStage === StageEnum_1.windowStage.MINIMIZED) {
221
201
  height = 0;
222
202
  }
223
-
224
203
  return height;
225
204
  },
226
205
  windowStage: function windowStage() {
@@ -236,7 +215,6 @@ var WindowVue2 = {
236
215
  onDrag: function onDrag(event) {
237
216
  var e = event;
238
217
  e.originalEvent.preventDefault();
239
-
240
218
  if (this.windowStage !== StageEnum_1.windowStage.FULLSCREEN && this.$props.draggable) {
241
219
  this.currentTop = Math.max(e.pageY - this.windowCoordinatesState.differenceTop, 0);
242
220
  this.currentLeft = e.pageX - this.windowCoordinatesState.differenceLeft;
@@ -246,56 +224,43 @@ var WindowVue2 = {
246
224
  },
247
225
  onRelease: function onRelease(event) {
248
226
  var e = event;
249
-
250
227
  if (this.windowStage !== StageEnum_1.windowStage.FULLSCREEN && this.$props.draggable) {
251
228
  this.dispatchMoveEvent('move', e, true, true);
252
229
  }
253
-
254
230
  this.isDragging = false;
255
231
  },
256
232
  handleKeyDown: function handleKeyDown(event) {
257
233
  if (event.target !== event.currentTarget) {
258
234
  return;
259
235
  }
260
-
261
236
  var minWidth = this.$props.minWidth || DEFAULT_MIN_WIDTH;
262
237
  var minHeight = this.$props.minHeight || DEFAULT_MIN_HEIGHT;
263
-
264
238
  if (event.ctrlKey && this.$props.resizable) {
265
239
  switch (event.keyCode) {
266
240
  case kendo_vue_common_1.Keys.up:
267
241
  event.preventDefault();
268
-
269
242
  if (minHeight <= this.computedHeight - DEFAULT_STEP) {
270
243
  this.currentHeight = this.currentHeight - DEFAULT_STEP;
271
244
  }
272
-
273
245
  break;
274
-
275
246
  case kendo_vue_common_1.Keys.down:
276
247
  event.preventDefault();
277
248
  this.currentHeight = this.currentHeight + DEFAULT_STEP;
278
249
  break;
279
-
280
250
  case kendo_vue_common_1.Keys.left:
281
251
  if (minWidth <= this.computedWidth - DEFAULT_STEP) {
282
252
  this.currentWidth = this.currentWidth - DEFAULT_STEP;
283
253
  }
284
-
285
254
  break;
286
-
287
255
  case kendo_vue_common_1.Keys.right:
288
256
  this.currentWidth = this.currentWidth + DEFAULT_STEP;
289
257
  break;
290
-
291
258
  default:
292
259
  return;
293
260
  }
294
-
295
261
  this.dispatchMoveEvent('resize', event, false, undefined);
296
262
  return;
297
263
  }
298
-
299
264
  if (event.altKey) {
300
265
  switch (event.keyCode) {
301
266
  case kendo_vue_common_1.Keys.up:
@@ -310,9 +275,7 @@ var WindowVue2 = {
310
275
  state: StageEnum_1.windowStage.FULLSCREEN
311
276
  });
312
277
  }
313
-
314
278
  break;
315
-
316
279
  case kendo_vue_common_1.Keys.down:
317
280
  if (this.windowStage === StageEnum_1.windowStage.FULLSCREEN) {
318
281
  this.handleRestore(event);
@@ -325,106 +288,84 @@ var WindowVue2 = {
325
288
  state: StageEnum_1.windowStage.MINIMIZED
326
289
  });
327
290
  }
328
-
329
291
  break;
330
-
331
292
  default:
332
293
  }
333
-
334
294
  return;
335
295
  }
336
-
337
296
  if (!event.ctrlKey) {
338
297
  switch (event.keyCode) {
339
298
  case kendo_vue_common_1.Keys.esc:
340
299
  this.handleCloseWindow(event);
341
300
  return;
342
-
343
301
  case kendo_vue_common_1.Keys.up:
344
302
  event.preventDefault();
345
303
  this.currentTop = this.currentTop - DEFAULT_STEP;
346
304
  break;
347
-
348
305
  case kendo_vue_common_1.Keys.down:
349
306
  event.preventDefault();
350
307
  this.currentTop = this.currentTop + DEFAULT_STEP;
351
308
  break;
352
-
353
309
  case kendo_vue_common_1.Keys.left:
354
310
  event.preventDefault();
355
311
  this.currentLeft = this.currentLeft - DEFAULT_STEP;
356
312
  break;
357
-
358
313
  case kendo_vue_common_1.Keys.right:
359
314
  event.preventDefault();
360
315
  this.currentLeft = this.currentLeft + DEFAULT_STEP;
361
316
  break;
362
-
363
317
  default:
364
318
  return;
365
319
  }
366
320
  }
367
-
368
321
  this.dispatchMoveEvent('move', event, false, undefined);
369
322
  },
370
323
  getInitialTop: function getInitialTop() {
371
324
  if (this.$props.top !== undefined) {
372
325
  return this.$props.top;
373
326
  }
374
-
375
327
  if (this.$props.initialTop !== undefined) {
376
328
  return this.$props.initialTop;
377
329
  }
378
-
379
330
  var height = DEFAULT_HEIGHT;
380
-
381
331
  if (this.$props.height !== undefined) {
382
332
  height = this.$props.height;
383
333
  } else if (this.$props.initialHeight !== undefined) {
384
334
  height = this.$props.initialHeight;
385
335
  }
386
-
387
336
  return window.innerHeight / 2 - height / 2;
388
337
  },
389
338
  getInitialLeft: function getInitialLeft() {
390
339
  if (this.$props.left !== undefined) {
391
340
  return this.$props.left;
392
341
  }
393
-
394
342
  if (this.$props.initialLeft !== undefined) {
395
343
  return this.$props.initialLeft;
396
344
  }
397
-
398
345
  var width = DEFAULT_WIDTH;
399
-
400
346
  if (this.$props.width !== undefined) {
401
347
  width = this.$props.width;
402
348
  } else if (this.$props.initialWidth !== undefined) {
403
349
  width = this.$props.initialWidth;
404
350
  }
405
-
406
351
  return window.innerWidth / 2 - width / 2;
407
352
  },
408
353
  getInitialWidth: function getInitialWidth() {
409
354
  var width = DEFAULT_WIDTH;
410
-
411
355
  if (this.$props.width !== undefined) {
412
356
  width = this.$props.width;
413
357
  } else if (this.$props.initialWidth !== undefined) {
414
358
  width = this.$props.initialWidth;
415
359
  }
416
-
417
360
  return width;
418
361
  },
419
362
  getInitialHeight: function getInitialHeight() {
420
363
  var height = DEFAULT_HEIGHT;
421
-
422
364
  if (this.$props.height !== undefined) {
423
365
  height = this.$props.height;
424
366
  } else if (this.$props.initialHeight !== undefined) {
425
367
  height = this.$props.initialHeight;
426
368
  }
427
-
428
369
  return height;
429
370
  },
430
371
  handleMinimize: function handleMinimize(event) {
@@ -456,7 +397,6 @@ var WindowVue2 = {
456
397
  },
457
398
  handleRestore: function handleRestore(event) {
458
399
  event.preventDefault();
459
-
460
400
  if (this.windowStage === StageEnum_1.windowStage.FULLSCREEN) {
461
401
  this.currentStage = StageEnum_1.windowStage.DEFAULT;
462
402
  this.currentLeft = this.windowCoordinatesState.leftBeforeAction;
@@ -467,7 +407,6 @@ var WindowVue2 = {
467
407
  this.currentStage = StageEnum_1.windowStage.DEFAULT;
468
408
  this.currentHeight = this.windowCoordinatesState.heightBeforeAction;
469
409
  }
470
-
471
410
  this.$emit('stagechange', event, this, {
472
411
  state: StageEnum_1.windowStage.DEFAULT
473
412
  });
@@ -482,7 +421,6 @@ var WindowVue2 = {
482
421
  if (!this.$props.doubleClickStageChange) {
483
422
  return;
484
423
  }
485
-
486
424
  if (this.windowStage === StageEnum_1.windowStage.FULLSCREEN || this.windowStage === StageEnum_1.windowStage.MINIMIZED) {
487
425
  this.handleRestore(e);
488
426
  } else {
@@ -499,25 +437,20 @@ var WindowVue2 = {
499
437
  var newWidth = event.pageX - this.computedLeft;
500
438
  var newHeight = event.pageY - this.computedTop;
501
439
  this.isDragging = !props.end;
502
-
503
440
  if (props.direction.indexOf('n') >= 0 && minHeight - (currentHeight + heightDifference) < 0) {
504
441
  this.currentTop = event.pageY;
505
442
  this.currentHeight = currentHeight + heightDifference;
506
443
  }
507
-
508
444
  if (props.direction.indexOf('s') >= 0 && minHeight - newHeight < 0) {
509
445
  this.currentHeight = newHeight;
510
446
  }
511
-
512
447
  if (props.direction.indexOf('w') >= 0 && minWidth - (currentWidth + widthDifference) < 0) {
513
448
  this.currentLeft = event.pageX;
514
449
  this.currentWidth = currentWidth + widthDifference;
515
450
  }
516
-
517
451
  if (props.direction.indexOf('e') >= 0 && minWidth - newWidth < 0) {
518
452
  this.currentWidth = newWidth;
519
453
  }
520
-
521
454
  this.dispatchMoveEvent('resize', event, true, props.end);
522
455
  },
523
456
  dispatchMoveEvent: function dispatchMoveEvent(eventName, event, drag, end) {
@@ -542,7 +475,6 @@ var WindowVue2 = {
542
475
  // @ts-ignore
543
476
  render: function render(createElement) {
544
477
  var _this = this;
545
-
546
478
  var h = gh || createElement;
547
479
  var classNamesWindow = (0, kendo_vue_common_1.classNames)('k-widget', 'k-window', this.$props.windowClass, {
548
480
  'k-window-minimized': this.currentStage === 'MINIMIZED'
@@ -586,7 +518,8 @@ var WindowVue2 = {
586
518
  width: this.computedWidth + 'px',
587
519
  height: this.computedHeight + 'px' || ''
588
520
  }, this.$props.windowStyle)
589
- }, [// @ts-ignore function children
521
+ }, [
522
+ // @ts-ignore function children
590
523
  h(kendo_vue_common_1.Draggable, {
591
524
  onPress: this.onPress,
592
525
  on: this.v3 ? undefined : {
@@ -598,7 +531,8 @@ var WindowVue2 = {
598
531
  onRelease: this.onRelease,
599
532
  ref: 'draggable'
600
533
  }, this.v3 ? function () {
601
- return [// @ts-ignore function children
534
+ return [
535
+ // @ts-ignore function children
602
536
  h(WindowTitlebar_1.WindowTitleBar, {
603
537
  stage: _this.windowStage,
604
538
  attrs: _this.v3 ? undefined : {
@@ -660,7 +594,8 @@ var WindowVue2 = {
660
594
  restoreButton: restoreButton
661
595
  })]), this.windowStage !== StageEnum_1.windowStage.MINIMIZED ? h("div", {
662
596
  "class": "k-content k-window-content"
663
- }, [defaultSlot]) : null, this.windowStage === StageEnum_1.windowStage.DEFAULT && this.$props.resizable // @ts-ignore function children
597
+ }, [defaultSlot]) : null, this.windowStage === StageEnum_1.windowStage.DEFAULT && this.$props.resizable
598
+ // @ts-ignore function children
664
599
  ? h(WindowResizeHandlers_1.ResizeHandlers, {
665
600
  onResize: this.handleResize,
666
601
  on: this.v3 ? undefined : {
@@ -674,6 +609,5 @@ exports.WindowVue2 = WindowVue2;
674
609
  /**
675
610
  * @hidden
676
611
  */
677
-
678
612
  var Window = WindowVue2;
679
613
  exports.Window = Window;
@@ -2,4 +2,5 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
- }); // tslint:enable:max-line-length
5
+ });
6
+ // tslint:enable:max-line-length
@@ -3,25 +3,20 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ResizeHandlersVue2 = exports.ResizeHandlers = void 0; // @ts-ignore
7
-
6
+ exports.ResizeHandlersVue2 = exports.ResizeHandlers = void 0;
7
+ // @ts-ignore
8
8
  var Vue = require("vue");
9
-
10
9
  var allVue = Vue;
11
10
  var gh = allVue.h;
12
11
  var isV3 = allVue.version && allVue.version[0] === '3';
13
-
14
12
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
15
13
  /**
16
14
  * @hidden
17
15
  */
18
-
19
-
20
16
  var keys = ['n', 'e', 's', 'w', 'se', 'sw', 'ne', 'nw'];
21
17
  /**
22
18
  * @hidden
23
19
  */
24
-
25
20
  var ResizeHandlersVue2 = {
26
21
  name: 'ResizeHandlers',
27
22
  // @ts-ignore
@@ -56,8 +51,8 @@ var ResizeHandlersVue2 = {
56
51
  var h = gh || createElement;
57
52
  return h("div", [keys.map(function (key, index) {
58
53
  var _this = this;
59
-
60
- return (// @ts-ignore function children
54
+ return (
55
+ // @ts-ignore function children
61
56
  h(kendo_vue_common_1.Draggable, {
62
57
  key: index,
63
58
  onDrag: function onDrag(e) {
@@ -97,6 +92,5 @@ exports.ResizeHandlersVue2 = ResizeHandlersVue2;
97
92
  /**
98
93
  * @hidden
99
94
  */
100
-
101
95
  var ResizeHandlers = ResizeHandlersVue2;
102
96
  exports.ResizeHandlers = ResizeHandlers;
@@ -3,28 +3,20 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.WindowTitleBarVue2 = exports.WindowTitleBar = void 0; // @ts-ignore
7
-
6
+ exports.WindowTitleBarVue2 = exports.WindowTitleBar = void 0;
7
+ // @ts-ignore
8
8
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
9
-
10
9
  var Vue = require("vue");
11
-
12
10
  var allVue = Vue;
13
11
  var gh = allVue.h;
14
12
  var isV3 = allVue.version && allVue.version[0] === '3';
15
-
16
13
  var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
17
-
18
14
  var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
19
-
20
15
  var StageEnum_1 = require("./StageEnum");
21
-
22
16
  var main_1 = require("./messages/main");
23
17
  /**
24
18
  * @hidden
25
19
  */
26
-
27
-
28
20
  var WindowTitleBarVue2 = {
29
21
  name: 'KendoWindowTitleBar',
30
22
  props: {
@@ -71,19 +63,20 @@ var WindowTitleBarVue2 = {
71
63
  var h = gh || createElement;
72
64
  var props = this.$props;
73
65
  var stage = props.stage,
74
- title = props.title,
75
- titleRender = props.titleRender,
76
- minimizeButton = props.minimizeButton,
77
- maximizeButton = props.maximizeButton,
78
- restoreButton = props.restoreButton,
79
- closeButton = props.closeButton;
66
+ title = props.title,
67
+ titleRender = props.titleRender,
68
+ minimizeButton = props.minimizeButton,
69
+ maximizeButton = props.maximizeButton,
70
+ restoreButton = props.restoreButton,
71
+ closeButton = props.closeButton;
80
72
  var ls = (0, kendo_vue_intl_1.provideLocalizationService)(this);
81
73
  var titleElement = kendo_vue_common_1.getTemplate.call(this, {
82
74
  h: h,
83
75
  template: titleRender,
84
76
  defaultRendering: title
85
77
  });
86
- var minimizeButtonDefault = // @ts-ignore
78
+ var minimizeButtonDefault =
79
+ // @ts-ignore
87
80
  h(kendo_vue_buttons_1.Button, {
88
81
  type: "button",
89
82
  attrs: this.v3 ? undefined : {
@@ -106,7 +99,8 @@ var WindowTitleBarVue2 = {
106
99
  template: minimizeButton,
107
100
  defaultRendering: minimizeButtonDefault
108
101
  });
109
- var maximizeButtonDefault = // @ts-ignore
102
+ var maximizeButtonDefault =
103
+ // @ts-ignore
110
104
  h(kendo_vue_buttons_1.Button, {
111
105
  type: "button",
112
106
  attrs: this.v3 ? undefined : {
@@ -129,7 +123,8 @@ var WindowTitleBarVue2 = {
129
123
  template: maximizeButton,
130
124
  defaultRendering: maximizeButtonDefault
131
125
  });
132
- var restoreButtonDefault = // @ts-ignore
126
+ var restoreButtonDefault =
127
+ // @ts-ignore
133
128
  h(kendo_vue_buttons_1.Button, {
134
129
  type: "button",
135
130
  attrs: this.v3 ? undefined : {
@@ -152,7 +147,8 @@ var WindowTitleBarVue2 = {
152
147
  template: restoreButton,
153
148
  defaultRendering: restoreButtonDefault
154
149
  });
155
- var closeButtonDefault = // @ts-ignore
150
+ var closeButtonDefault =
151
+ // @ts-ignore
156
152
  h(kendo_vue_buttons_1.Button, {
157
153
  type: "button",
158
154
  attrs: this.v3 ? undefined : {
@@ -195,6 +191,5 @@ exports.WindowTitleBarVue2 = WindowTitleBarVue2;
195
191
  /**
196
192
  * @hidden
197
193
  */
198
-
199
194
  var WindowTitleBar = WindowTitleBarVue2;
200
195
  exports.WindowTitleBar = WindowTitleBar;
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-dialogs',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1665151171,
11
+ publishDate: 1666682208,
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,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-dialogs",
3
3
  "description": "Kendo UI for Vue Dialogs package",
4
- "version": "3.6.4",
4
+ "version": "3.7.0-dev.202210250731",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/telerik/kendo-vue.git"
@@ -43,12 +43,12 @@
43
43
  "vue": "^2.6.12 || ^3.0.2"
44
44
  },
45
45
  "dependencies": {
46
- "@progress/kendo-vue-buttons": "3.6.4",
47
- "@progress/kendo-vue-common": "3.6.4"
46
+ "@progress/kendo-vue-buttons": "3.7.0-dev.202210250731",
47
+ "@progress/kendo-vue-common": "3.7.0-dev.202210250731"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@progress/kendo-licensing": "^1.1.0",
51
- "@progress/kendo-vue-intl": "3.6.4"
51
+ "@progress/kendo-vue-intl": "3.7.0-dev.202210250731"
52
52
  },
53
53
  "author": "Progress",
54
54
  "license": "SEE LICENSE IN LICENSE.md",