@progress/kendo-vue-dialogs 3.7.4-dev.202212020747 → 3.7.4-dev.202301091431
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/README.md +1 -1
- package/dist/cdn/js/kendo-vue-dialogs.js +1 -1
- package/dist/es/Dialog.d.ts +9 -0
- package/dist/es/Dialog.js +35 -4
- package/dist/es/DialogActionsBar.d.ts +18 -1
- package/dist/es/DialogActionsBar.js +17 -8
- package/dist/es/DialogTitleBar.js +6 -3
- package/dist/es/Window.js +43 -10
- package/dist/es/WindowProps.d.ts +8 -0
- package/dist/es/WindowTitlebar.d.ts +4 -0
- package/dist/es/WindowTitlebar.js +23 -9
- package/dist/es/package-metadata.js +1 -1
- package/dist/esm/Dialog.d.ts +9 -0
- package/dist/esm/Dialog.js +35 -4
- package/dist/esm/DialogActionsBar.d.ts +18 -1
- package/dist/esm/DialogActionsBar.js +17 -8
- package/dist/esm/DialogTitleBar.js +6 -3
- package/dist/esm/Window.js +43 -10
- package/dist/esm/WindowProps.d.ts +8 -0
- package/dist/esm/WindowTitlebar.d.ts +4 -0
- package/dist/esm/WindowTitlebar.js +23 -9
- package/dist/esm/package-metadata.js +1 -1
- package/dist/npm/Dialog.d.ts +9 -0
- package/dist/npm/Dialog.js +35 -4
- package/dist/npm/DialogActionsBar.d.ts +18 -1
- package/dist/npm/DialogActionsBar.js +17 -8
- package/dist/npm/DialogTitleBar.js +6 -3
- package/dist/npm/Window.js +42 -9
- package/dist/npm/WindowProps.d.ts +8 -0
- package/dist/npm/WindowTitlebar.d.ts +4 -0
- package/dist/npm/WindowTitlebar.js +23 -9
- package/dist/npm/package-metadata.js +1 -1
- package/package.json +8 -6
|
@@ -12,11 +12,17 @@ var DialogActionsBarVue2 = {
|
|
|
12
12
|
props: {
|
|
13
13
|
layout: {
|
|
14
14
|
type: String,
|
|
15
|
-
default: 'stretched'
|
|
15
|
+
default: 'stretched',
|
|
16
|
+
validator: function validator(value) {
|
|
17
|
+
return ['stretched', 'start', 'center', 'end'].includes(value);
|
|
18
|
+
}
|
|
16
19
|
},
|
|
17
|
-
|
|
18
|
-
type:
|
|
19
|
-
default:
|
|
20
|
+
orientation: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: 'horizontal',
|
|
23
|
+
validator: function validator(value) {
|
|
24
|
+
return ['horizontal', 'vertical'].includes(value);
|
|
25
|
+
}
|
|
20
26
|
}
|
|
21
27
|
},
|
|
22
28
|
// @ts-ignore
|
|
@@ -29,11 +35,14 @@ var DialogActionsBarVue2 = {
|
|
|
29
35
|
computed: {
|
|
30
36
|
wrapperClasses: function wrapperClasses() {
|
|
31
37
|
var _a;
|
|
32
|
-
var
|
|
38
|
+
var _b = this.$props,
|
|
39
|
+
layout = _b.layout,
|
|
40
|
+
orientation = _b.orientation;
|
|
33
41
|
return _a = {
|
|
34
|
-
'k-
|
|
35
|
-
'k-actions': true
|
|
36
|
-
|
|
42
|
+
'k-actions': true,
|
|
43
|
+
'k-dialog-actions': true,
|
|
44
|
+
'k-window-actions': true
|
|
45
|
+
}, _a["k-actions-".concat(orientation)] = orientation, _a["k-actions-".concat(layout)] = layout, _a;
|
|
37
46
|
}
|
|
38
47
|
},
|
|
39
48
|
// @ts-ignore
|
|
@@ -5,6 +5,7 @@ var gh = allVue.h;
|
|
|
5
5
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
6
6
|
import { getTemplate } from '@progress/kendo-vue-common';
|
|
7
7
|
import { Button } from '@progress/kendo-vue-buttons';
|
|
8
|
+
import { xIcon } from '@progress/kendo-svg-icons';
|
|
8
9
|
/**
|
|
9
10
|
* @hidden
|
|
10
11
|
*/
|
|
@@ -53,7 +54,7 @@ var DialogTitleBarVue2 = {
|
|
|
53
54
|
}, [h("div", {
|
|
54
55
|
"class": "k-window-title k-dialog-title"
|
|
55
56
|
}, [titleElement]), h("div", {
|
|
56
|
-
"class": "k-window-actions k-dialog-actions"
|
|
57
|
+
"class": "k-window-titlebar-actions k-dialog-titlebar-actions"
|
|
57
58
|
}, [closeIcon &&
|
|
58
59
|
// @ts-ignore
|
|
59
60
|
h(Button, {
|
|
@@ -62,16 +63,18 @@ var DialogTitleBarVue2 = {
|
|
|
62
63
|
type: "button",
|
|
63
64
|
fillMode: 'flat',
|
|
64
65
|
"aria-label": "Close",
|
|
65
|
-
icon: 'x'
|
|
66
|
+
icon: 'x',
|
|
67
|
+
svgIcon: xIcon
|
|
66
68
|
},
|
|
67
69
|
fillMode: 'flat',
|
|
68
70
|
"aria-label": "Close",
|
|
69
71
|
icon: 'x',
|
|
72
|
+
svgIcon: xIcon,
|
|
70
73
|
onClick: this.onCloseButtonClick,
|
|
71
74
|
on: this.v3 ? undefined : {
|
|
72
75
|
"click": this.onCloseButtonClick
|
|
73
76
|
},
|
|
74
|
-
"class": "k-window-action k-dialog-action"
|
|
77
|
+
"class": "k-window-titlebar-action k-dialog-titlebar-action"
|
|
75
78
|
})])]);
|
|
76
79
|
}
|
|
77
80
|
};
|
package/dist/esm/Window.js
CHANGED
|
@@ -16,7 +16,7 @@ var allVue = Vue;
|
|
|
16
16
|
var gh = allVue.h;
|
|
17
17
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
18
18
|
import { WindowTitleBar } from './WindowTitlebar.js';
|
|
19
|
-
import { Keys,
|
|
19
|
+
import { Keys, guid, Draggable, templateDefinition, getDefaultSlots, templateRendering, getListeners, validatePackage } from '@progress/kendo-vue-common';
|
|
20
20
|
import { ResizeHandlers } from './WindowResizeHandlers.js';
|
|
21
21
|
import { windowStage } from './StageEnum.js';
|
|
22
22
|
import { packageMetadata } from './package-metadata.js';
|
|
@@ -36,7 +36,8 @@ var WindowVue2 = {
|
|
|
36
36
|
'resize': null,
|
|
37
37
|
'move': null,
|
|
38
38
|
'close': null,
|
|
39
|
-
'stagechange': null
|
|
39
|
+
'stagechange': null,
|
|
40
|
+
'overlayclick': null
|
|
40
41
|
},
|
|
41
42
|
provide: function provide() {
|
|
42
43
|
return {
|
|
@@ -104,6 +105,12 @@ var WindowVue2 = {
|
|
|
104
105
|
validator: function validator(value) {
|
|
105
106
|
return ['DEFAULT', 'MINIMIZED', 'FULLSCREEN'].indexOf(value) !== -1;
|
|
106
107
|
}
|
|
108
|
+
},
|
|
109
|
+
themeColor: {
|
|
110
|
+
type: String,
|
|
111
|
+
validator: function validator(value) {
|
|
112
|
+
return [undefined, 'primary', 'dark', 'light'].includes(value);
|
|
113
|
+
}
|
|
107
114
|
}
|
|
108
115
|
},
|
|
109
116
|
// @ts-ignore
|
|
@@ -139,7 +146,9 @@ var WindowVue2 = {
|
|
|
139
146
|
currentTop: this.getInitialTop(),
|
|
140
147
|
currentLeft: this.getInitialLeft(),
|
|
141
148
|
currentWidth: this.getInitialWidth(),
|
|
142
|
-
currentHeight: this.getInitialHeight()
|
|
149
|
+
currentHeight: this.getInitialHeight(),
|
|
150
|
+
_id: guid(),
|
|
151
|
+
titleId: this.generateTitleId()
|
|
143
152
|
};
|
|
144
153
|
},
|
|
145
154
|
mounted: function mounted() {
|
|
@@ -168,6 +177,15 @@ var WindowVue2 = {
|
|
|
168
177
|
}
|
|
169
178
|
},
|
|
170
179
|
computed: {
|
|
180
|
+
windowElementClass: function windowElementClass() {
|
|
181
|
+
var _a;
|
|
182
|
+
var _b = this.$props,
|
|
183
|
+
windowClass = _b.windowClass,
|
|
184
|
+
themeColor = _b.themeColor;
|
|
185
|
+
return _a = {
|
|
186
|
+
'k-window': true
|
|
187
|
+
}, _a[windowClass] = windowClass, _a["k-window-".concat(themeColor)] = themeColor, _a['k-window-minimized'] = this.currentStage === 'MINIMIZED', _a;
|
|
188
|
+
},
|
|
171
189
|
computedTop: function computedTop() {
|
|
172
190
|
if (this.windowStage !== windowStage.FULLSCREEN) {
|
|
173
191
|
return Math.max(this.$props.top || this.currentTop, 0);
|
|
@@ -362,6 +380,9 @@ var WindowVue2 = {
|
|
|
362
380
|
}
|
|
363
381
|
return height;
|
|
364
382
|
},
|
|
383
|
+
generateTitleId: function generateTitleId() {
|
|
384
|
+
return 'window-title-' + this._id;
|
|
385
|
+
},
|
|
365
386
|
handleMinimize: function handleMinimize(event) {
|
|
366
387
|
event.preventDefault();
|
|
367
388
|
this.windowCoordinatesState.leftBeforeAction = this.computedLeft;
|
|
@@ -464,15 +485,15 @@ var WindowVue2 = {
|
|
|
464
485
|
this.currentWidth = window.innerWidth;
|
|
465
486
|
this.currentHeight = window.innerHeight;
|
|
466
487
|
}
|
|
488
|
+
},
|
|
489
|
+
handleClick: function handleClick(e) {
|
|
490
|
+
this.$emit('overlayclick', e);
|
|
467
491
|
}
|
|
468
492
|
},
|
|
469
493
|
// @ts-ignore
|
|
470
494
|
render: function render(createElement) {
|
|
471
495
|
var _this = this;
|
|
472
496
|
var h = gh || createElement;
|
|
473
|
-
var classNamesWindow = classNames('k-widget', 'k-window', this.$props.windowClass, {
|
|
474
|
-
'k-window-minimized': this.currentStage === 'MINIMIZED'
|
|
475
|
-
});
|
|
476
497
|
var titleRender = templateRendering.call(this, this.$props.titleRender, getListeners.call(this));
|
|
477
498
|
var closeButton = templateRendering.call(this, this.$props.closeButton, getListeners.call(this));
|
|
478
499
|
var minimizeButton = templateRendering.call(this, this.$props.minimizeButton, getListeners.call(this));
|
|
@@ -482,11 +503,17 @@ var WindowVue2 = {
|
|
|
482
503
|
var windowElement = h("div", {
|
|
483
504
|
ref: 'wrapper'
|
|
484
505
|
}, [this.$props.modal && h("div", {
|
|
485
|
-
"class": "k-overlay"
|
|
506
|
+
"class": "k-overlay",
|
|
507
|
+
onClick: this.handleClick,
|
|
508
|
+
on: this.v3 ? undefined : {
|
|
509
|
+
"click": this.handleClick
|
|
510
|
+
}
|
|
486
511
|
}), h("div", {
|
|
487
512
|
tabindex: 0,
|
|
488
513
|
attrs: this.v3 ? undefined : {
|
|
489
|
-
tabindex: 0
|
|
514
|
+
tabindex: 0,
|
|
515
|
+
role: 'dialog',
|
|
516
|
+
"aria-labelledby": this.titleId
|
|
490
517
|
},
|
|
491
518
|
onFocus: function onFocus(e) {
|
|
492
519
|
return e.target.classList.add('k-focus');
|
|
@@ -505,7 +532,9 @@ var WindowVue2 = {
|
|
|
505
532
|
},
|
|
506
533
|
onKeydown: this.handleKeyDown,
|
|
507
534
|
ref: 'windowElement',
|
|
508
|
-
"class":
|
|
535
|
+
"class": this.windowElementClass,
|
|
536
|
+
role: 'dialog',
|
|
537
|
+
"aria-labelledby": this.titleId,
|
|
509
538
|
style: __assign({
|
|
510
539
|
top: this.computedTop + 'px',
|
|
511
540
|
left: this.computedLeft + 'px',
|
|
@@ -532,6 +561,7 @@ var WindowVue2 = {
|
|
|
532
561
|
attrs: _this.v3 ? undefined : {
|
|
533
562
|
stage: _this.windowStage,
|
|
534
563
|
title: _this.$props.title,
|
|
564
|
+
titleId: _this.titleId,
|
|
535
565
|
titleRender: titleRender,
|
|
536
566
|
closeButton: closeButton,
|
|
537
567
|
minimizeButton: minimizeButton,
|
|
@@ -539,6 +569,7 @@ var WindowVue2 = {
|
|
|
539
569
|
restoreButton: restoreButton
|
|
540
570
|
},
|
|
541
571
|
title: _this.$props.title,
|
|
572
|
+
titleId: _this.titleId,
|
|
542
573
|
titleRender: titleRender,
|
|
543
574
|
onDoubleclick: _this.handleDoubleClick,
|
|
544
575
|
on: _this.v3 ? undefined : {
|
|
@@ -562,6 +593,7 @@ var WindowVue2 = {
|
|
|
562
593
|
attrs: _this.v3 ? undefined : {
|
|
563
594
|
stage: _this.windowStage,
|
|
564
595
|
title: _this.$props.title,
|
|
596
|
+
titleId: _this.titleId,
|
|
565
597
|
titleRender: titleRender,
|
|
566
598
|
closeButton: closeButton,
|
|
567
599
|
minimizeButton: minimizeButton,
|
|
@@ -569,6 +601,7 @@ var WindowVue2 = {
|
|
|
569
601
|
restoreButton: restoreButton
|
|
570
602
|
},
|
|
571
603
|
title: _this.$props.title,
|
|
604
|
+
titleId: _this.titleId,
|
|
572
605
|
titleRender: titleRender,
|
|
573
606
|
onDoubleclick: _this.handleDoubleClick,
|
|
574
607
|
on: _this.v3 ? undefined : {
|
|
@@ -587,7 +620,7 @@ var WindowVue2 = {
|
|
|
587
620
|
maximizeButton: maximizeButton,
|
|
588
621
|
restoreButton: restoreButton
|
|
589
622
|
})]), this.windowStage !== windowStage.MINIMIZED ? h("div", {
|
|
590
|
-
"class": "k-
|
|
623
|
+
"class": "k-window-content"
|
|
591
624
|
}, [defaultSlot]) : null, this.windowStage === windowStage.DEFAULT && this.$props.resizable
|
|
592
625
|
// @ts-ignore function children
|
|
593
626
|
? h(ResizeHandlers, {
|
|
@@ -77,6 +77,10 @@ export interface WindowProps {
|
|
|
77
77
|
* Specifies if the Window will be resizable ([see example]({% slug dimensionsresizing_window %}#toc-resizing)).
|
|
78
78
|
*/
|
|
79
79
|
resizable?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Specifies the theme color of the Dialog.
|
|
82
|
+
*/
|
|
83
|
+
themeColor?: 'promary' | 'dark' | 'light' | string;
|
|
80
84
|
/**
|
|
81
85
|
* Acccepts a named slot `string`, functional or class component for the restore button. If set to `false` the button is not rendered.
|
|
82
86
|
* @default true
|
|
@@ -127,4 +131,8 @@ export interface WindowProps {
|
|
|
127
131
|
* Fires when the Window resizes.
|
|
128
132
|
*/
|
|
129
133
|
onResize?: (event: WindowMoveEvent) => void;
|
|
134
|
+
/**
|
|
135
|
+
* Fires when modal overlay of the Window is clicked.
|
|
136
|
+
*/
|
|
137
|
+
onOverlayclick?: (event: any) => void;
|
|
130
138
|
}
|
|
@@ -8,6 +8,7 @@ import { Button } from '@progress/kendo-vue-buttons';
|
|
|
8
8
|
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
9
9
|
import { windowStage } from './StageEnum.js';
|
|
10
10
|
import { dialogsWindowCloseButton, dialogsWindowMaximizeButton, dialogsWindowMinimizeButton, dialogsWindowRestoreButton, messages } from './messages/main.js';
|
|
11
|
+
import { windowIcon, windowMinimizeIcon, windowRestoreIcon, xIcon } from '@progress/kendo-svg-icons';
|
|
11
12
|
/**
|
|
12
13
|
* @hidden
|
|
13
14
|
*/
|
|
@@ -21,6 +22,7 @@ var WindowTitleBarVue2 = {
|
|
|
21
22
|
maximizeButton: [String, Function, Object, Boolean],
|
|
22
23
|
restoreButton: [String, Function, Object, Boolean],
|
|
23
24
|
title: String,
|
|
25
|
+
titleId: String,
|
|
24
26
|
titleRender: [String, Function, Object, Boolean]
|
|
25
27
|
},
|
|
26
28
|
inject: {
|
|
@@ -76,11 +78,13 @@ var WindowTitleBarVue2 = {
|
|
|
76
78
|
attrs: this.v3 ? undefined : {
|
|
77
79
|
type: "button",
|
|
78
80
|
icon: 'window-minimize',
|
|
81
|
+
svgIcon: windowMinimizeIcon,
|
|
79
82
|
fillMode: 'flat',
|
|
80
83
|
"aria-label": ls.toLanguageString(dialogsWindowMinimizeButton, messages[dialogsWindowMinimizeButton])
|
|
81
84
|
},
|
|
82
|
-
"class": "k-window-action",
|
|
85
|
+
"class": "k-window-titlebar-action",
|
|
83
86
|
icon: 'window-minimize',
|
|
87
|
+
svgIcon: windowMinimizeIcon,
|
|
84
88
|
fillMode: 'flat',
|
|
85
89
|
onClick: this.onMinimizeClick,
|
|
86
90
|
on: this.v3 ? undefined : {
|
|
@@ -99,12 +103,14 @@ var WindowTitleBarVue2 = {
|
|
|
99
103
|
type: "button",
|
|
100
104
|
attrs: this.v3 ? undefined : {
|
|
101
105
|
type: "button",
|
|
102
|
-
icon: 'window
|
|
106
|
+
icon: 'window',
|
|
107
|
+
svgIcon: windowIcon,
|
|
103
108
|
fillMode: 'flat',
|
|
104
109
|
"aria-label": ls.toLanguageString(dialogsWindowMaximizeButton, messages[dialogsWindowMaximizeButton])
|
|
105
110
|
},
|
|
106
|
-
"class": "k-window-action",
|
|
107
|
-
icon: 'window
|
|
111
|
+
"class": "k-window-titlebar-action",
|
|
112
|
+
icon: 'window',
|
|
113
|
+
svgIcon: windowIcon,
|
|
108
114
|
fillMode: 'flat',
|
|
109
115
|
onClick: this.onFullScreenClick,
|
|
110
116
|
on: this.v3 ? undefined : {
|
|
@@ -124,11 +130,13 @@ var WindowTitleBarVue2 = {
|
|
|
124
130
|
attrs: this.v3 ? undefined : {
|
|
125
131
|
type: "button",
|
|
126
132
|
icon: 'window-restore',
|
|
133
|
+
svgIcon: windowRestoreIcon,
|
|
127
134
|
fillMode: 'flat',
|
|
128
135
|
"aria-label": ls.toLanguageString(dialogsWindowRestoreButton, messages[dialogsWindowRestoreButton])
|
|
129
136
|
},
|
|
130
|
-
"class": "k-window-action",
|
|
137
|
+
"class": "k-window-titlebar-action",
|
|
131
138
|
icon: 'window-restore',
|
|
139
|
+
svgIcon: windowRestoreIcon,
|
|
132
140
|
fillMode: 'flat',
|
|
133
141
|
onClick: this.onRestoreClick,
|
|
134
142
|
on: this.v3 ? undefined : {
|
|
@@ -148,11 +156,13 @@ var WindowTitleBarVue2 = {
|
|
|
148
156
|
attrs: this.v3 ? undefined : {
|
|
149
157
|
type: "button",
|
|
150
158
|
icon: 'x',
|
|
159
|
+
svgIcon: xIcon,
|
|
151
160
|
fillMode: 'flat',
|
|
152
161
|
"aria-label": ls.toLanguageString(dialogsWindowCloseButton, messages[dialogsWindowCloseButton])
|
|
153
162
|
},
|
|
154
|
-
"class": "k-window-action",
|
|
163
|
+
"class": "k-window-titlebar-action",
|
|
155
164
|
icon: 'x',
|
|
165
|
+
svgIcon: xIcon,
|
|
156
166
|
fillMode: 'flat',
|
|
157
167
|
onClick: this.onCloseClick,
|
|
158
168
|
on: this.v3 ? undefined : {
|
|
@@ -166,7 +176,7 @@ var WindowTitleBarVue2 = {
|
|
|
166
176
|
defaultRendering: closeButtonDefault
|
|
167
177
|
});
|
|
168
178
|
return h("div", {
|
|
169
|
-
"class": "k-window-titlebar
|
|
179
|
+
"class": "k-window-titlebar",
|
|
170
180
|
style: {
|
|
171
181
|
touchAction: 'none'
|
|
172
182
|
},
|
|
@@ -175,9 +185,13 @@ var WindowTitleBarVue2 = {
|
|
|
175
185
|
"dblclick": this.onDoubleClick
|
|
176
186
|
}
|
|
177
187
|
}, [h("div", {
|
|
178
|
-
"class": "k-window-title"
|
|
188
|
+
"class": "k-window-title",
|
|
189
|
+
id: this.$props.titleId,
|
|
190
|
+
attrs: this.v3 ? undefined : {
|
|
191
|
+
id: this.$props.titleId
|
|
192
|
+
}
|
|
179
193
|
}, [titleElement]), h("div", {
|
|
180
|
-
"class": "k-window-actions"
|
|
194
|
+
"class": "k-window-titlebar-actions"
|
|
181
195
|
}, [stage === windowStage.DEFAULT && minimizeButtonRender, stage === windowStage.DEFAULT && maximizeButtonRender, stage !== windowStage.DEFAULT && restoreButtonRender, closeButtonRender])]);
|
|
182
196
|
}
|
|
183
197
|
};
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-vue-dialogs',
|
|
6
6
|
productName: 'Kendo UI for Vue',
|
|
7
7
|
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1673273393,
|
|
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/Dialog.d.ts
CHANGED
|
@@ -40,10 +40,18 @@ export interface DialogProps {
|
|
|
40
40
|
* Specifies the minimum width of the Dialog.
|
|
41
41
|
*/
|
|
42
42
|
minWidth?: number | string;
|
|
43
|
+
/**
|
|
44
|
+
* Specifies the theme color of the Dialog.
|
|
45
|
+
*/
|
|
46
|
+
themeColor?: 'promary' | 'dark' | 'light' | string;
|
|
43
47
|
/**
|
|
44
48
|
* Fires when the **Close** button in the title is clicked or when the `Esc` button is pressed.
|
|
45
49
|
*/
|
|
46
50
|
onClose?: (event: DialogCloseEvent) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Fires when modal overlay of the Window is clicked.
|
|
53
|
+
*/
|
|
54
|
+
onOverlayclick?: (event: any) => void;
|
|
47
55
|
/**
|
|
48
56
|
* Sets the `aria-labelledby` value.
|
|
49
57
|
*/
|
|
@@ -64,6 +72,7 @@ export interface DialogProps {
|
|
|
64
72
|
* The styles that are applied to the content of the Dialog.
|
|
65
73
|
*/
|
|
66
74
|
contentStyle?: any;
|
|
75
|
+
dialogClass?: string;
|
|
67
76
|
}
|
|
68
77
|
/**
|
|
69
78
|
* @hidden
|
package/dist/npm/Dialog.js
CHANGED
|
@@ -18,6 +18,11 @@ var constants_1 = require("./constants");
|
|
|
18
18
|
*/
|
|
19
19
|
var DialogVue2 = {
|
|
20
20
|
name: 'KendoDialog',
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
emits: {
|
|
23
|
+
close: null,
|
|
24
|
+
overlayclick: null
|
|
25
|
+
},
|
|
21
26
|
props: {
|
|
22
27
|
appendTo: String,
|
|
23
28
|
title: String,
|
|
@@ -31,7 +36,14 @@ var DialogVue2 = {
|
|
|
31
36
|
},
|
|
32
37
|
width: [String, Number],
|
|
33
38
|
height: [String, Number],
|
|
34
|
-
minWidth: [String, Number]
|
|
39
|
+
minWidth: [String, Number],
|
|
40
|
+
dialogClass: String,
|
|
41
|
+
themeColor: {
|
|
42
|
+
type: String,
|
|
43
|
+
validator: function validator(value) {
|
|
44
|
+
return ['primary', 'dark', 'light'].includes(value);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
35
47
|
},
|
|
36
48
|
provide: function provide() {
|
|
37
49
|
return {
|
|
@@ -49,6 +61,18 @@ var DialogVue2 = {
|
|
|
49
61
|
v3: v3
|
|
50
62
|
};
|
|
51
63
|
},
|
|
64
|
+
computed: {
|
|
65
|
+
dialogElementClass: function dialogElementClass() {
|
|
66
|
+
var _a;
|
|
67
|
+
var _b = this.$props,
|
|
68
|
+
dialogClass = _b.dialogClass,
|
|
69
|
+
themeColor = _b.themeColor;
|
|
70
|
+
return _a = {
|
|
71
|
+
'k-window': true,
|
|
72
|
+
'k-dialog': true
|
|
73
|
+
}, _a[dialogClass] = dialogClass, _a["k-window-".concat(themeColor)] = themeColor, _a;
|
|
74
|
+
}
|
|
75
|
+
},
|
|
52
76
|
mounted: function mounted() {
|
|
53
77
|
if (this.$props.appendTo) {
|
|
54
78
|
var body = document.querySelector(this.$props.appendTo);
|
|
@@ -92,6 +116,9 @@ var DialogVue2 = {
|
|
|
92
116
|
},
|
|
93
117
|
generateTitleId: function generateTitleId() {
|
|
94
118
|
return 'dialog-title' + (0, kendo_vue_common_1.guid)();
|
|
119
|
+
},
|
|
120
|
+
handleClick: function handleClick(e) {
|
|
121
|
+
this.$emit('overlayclick', e);
|
|
95
122
|
}
|
|
96
123
|
},
|
|
97
124
|
// @ts-ignore
|
|
@@ -135,14 +162,18 @@ var DialogVue2 = {
|
|
|
135
162
|
id: wrapperId,
|
|
136
163
|
dir: dir
|
|
137
164
|
}, [h("div", {
|
|
138
|
-
"class": "k-overlay"
|
|
165
|
+
"class": "k-overlay",
|
|
166
|
+
onClick: this.handleClick,
|
|
167
|
+
on: this.v3 ? undefined : {
|
|
168
|
+
"click": this.handleClick
|
|
169
|
+
}
|
|
139
170
|
}), h("div", {
|
|
140
171
|
"aria-labelledby": title || titleRender ? id : undefined,
|
|
141
172
|
attrs: this.v3 ? undefined : {
|
|
142
173
|
"aria-labelledby": title || titleRender ? id : undefined,
|
|
143
174
|
role: "dialog"
|
|
144
175
|
},
|
|
145
|
-
"class": "k-
|
|
176
|
+
"class": "k-window k-dialog",
|
|
146
177
|
role: "dialog",
|
|
147
178
|
style: {
|
|
148
179
|
width: width,
|
|
@@ -167,7 +198,7 @@ var DialogVue2 = {
|
|
|
167
198
|
title: title,
|
|
168
199
|
titleRender: titleRender
|
|
169
200
|
}), h("div", {
|
|
170
|
-
"class": "k-
|
|
201
|
+
"class": "k-window-content k-dialog-content",
|
|
171
202
|
style: contentStyle
|
|
172
203
|
}, [content]), actions])]);
|
|
173
204
|
return this.$props.appendTo ? h("div", [dialog]) : dialog;
|
|
@@ -7,8 +7,25 @@ declare type DefaultMethods<V> = {
|
|
|
7
7
|
* @hidden
|
|
8
8
|
*/
|
|
9
9
|
export interface DialogActionsBarProps {
|
|
10
|
+
/**
|
|
11
|
+
* Set the layout of the actions.
|
|
12
|
+
*
|
|
13
|
+
* The supported values are:
|
|
14
|
+
* * (Default) `start`
|
|
15
|
+
* * `center`
|
|
16
|
+
* * `end`
|
|
17
|
+
* * `stretched`
|
|
18
|
+
*/
|
|
10
19
|
layout: string;
|
|
11
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Specifies the orientation of the Dialog action buttons.
|
|
22
|
+
*
|
|
23
|
+
* * The possible values are:
|
|
24
|
+
* * (Default) `horizontal`
|
|
25
|
+
* * `vertical`
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
orientation?: 'horizontal' | 'vertical' | string;
|
|
12
29
|
}
|
|
13
30
|
/**
|
|
14
31
|
* @hidden
|
|
@@ -18,11 +18,17 @@ var DialogActionsBarVue2 = {
|
|
|
18
18
|
props: {
|
|
19
19
|
layout: {
|
|
20
20
|
type: String,
|
|
21
|
-
default: 'stretched'
|
|
21
|
+
default: 'stretched',
|
|
22
|
+
validator: function validator(value) {
|
|
23
|
+
return ['stretched', 'start', 'center', 'end'].includes(value);
|
|
24
|
+
}
|
|
22
25
|
},
|
|
23
|
-
|
|
24
|
-
type:
|
|
25
|
-
default:
|
|
26
|
+
orientation: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: 'horizontal',
|
|
29
|
+
validator: function validator(value) {
|
|
30
|
+
return ['horizontal', 'vertical'].includes(value);
|
|
31
|
+
}
|
|
26
32
|
}
|
|
27
33
|
},
|
|
28
34
|
// @ts-ignore
|
|
@@ -35,11 +41,14 @@ var DialogActionsBarVue2 = {
|
|
|
35
41
|
computed: {
|
|
36
42
|
wrapperClasses: function wrapperClasses() {
|
|
37
43
|
var _a;
|
|
38
|
-
var
|
|
44
|
+
var _b = this.$props,
|
|
45
|
+
layout = _b.layout,
|
|
46
|
+
orientation = _b.orientation;
|
|
39
47
|
return _a = {
|
|
40
|
-
'k-
|
|
41
|
-
'k-actions': true
|
|
42
|
-
|
|
48
|
+
'k-actions': true,
|
|
49
|
+
'k-dialog-actions': true,
|
|
50
|
+
'k-window-actions': true
|
|
51
|
+
}, _a["k-actions-".concat(orientation)] = orientation, _a["k-actions-".concat(layout)] = layout, _a;
|
|
43
52
|
}
|
|
44
53
|
},
|
|
45
54
|
// @ts-ignore
|
|
@@ -11,6 +11,7 @@ var gh = allVue.h;
|
|
|
11
11
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
12
12
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
13
13
|
var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
|
|
14
|
+
var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
|
|
14
15
|
/**
|
|
15
16
|
* @hidden
|
|
16
17
|
*/
|
|
@@ -59,7 +60,7 @@ var DialogTitleBarVue2 = {
|
|
|
59
60
|
}, [h("div", {
|
|
60
61
|
"class": "k-window-title k-dialog-title"
|
|
61
62
|
}, [titleElement]), h("div", {
|
|
62
|
-
"class": "k-window-actions k-dialog-actions"
|
|
63
|
+
"class": "k-window-titlebar-actions k-dialog-titlebar-actions"
|
|
63
64
|
}, [closeIcon &&
|
|
64
65
|
// @ts-ignore
|
|
65
66
|
h(kendo_vue_buttons_1.Button, {
|
|
@@ -68,16 +69,18 @@ var DialogTitleBarVue2 = {
|
|
|
68
69
|
type: "button",
|
|
69
70
|
fillMode: 'flat',
|
|
70
71
|
"aria-label": "Close",
|
|
71
|
-
icon: 'x'
|
|
72
|
+
icon: 'x',
|
|
73
|
+
svgIcon: kendo_svg_icons_1.xIcon
|
|
72
74
|
},
|
|
73
75
|
fillMode: 'flat',
|
|
74
76
|
"aria-label": "Close",
|
|
75
77
|
icon: 'x',
|
|
78
|
+
svgIcon: kendo_svg_icons_1.xIcon,
|
|
76
79
|
onClick: this.onCloseButtonClick,
|
|
77
80
|
on: this.v3 ? undefined : {
|
|
78
81
|
"click": this.onCloseButtonClick
|
|
79
82
|
},
|
|
80
|
-
"class": "k-window-action k-dialog-action"
|
|
83
|
+
"class": "k-window-titlebar-action k-dialog-titlebar-action"
|
|
81
84
|
})])]);
|
|
82
85
|
}
|
|
83
86
|
};
|