@progress/kendo-vue-dialogs 5.3.0-dev.202409130647 → 5.3.0-develop.1

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.
Files changed (109) hide show
  1. package/Dialog.js +8 -0
  2. package/Dialog.mjs +157 -0
  3. package/DialogActionsBar.js +8 -0
  4. package/DialogActionsBar.mjs +52 -0
  5. package/DialogTitleBar.js +8 -0
  6. package/DialogTitleBar.mjs +59 -0
  7. package/README.md +27 -36
  8. package/StageEnum.js +8 -0
  9. package/StageEnum.mjs +11 -0
  10. package/Window.js +8 -0
  11. package/Window.mjs +381 -0
  12. package/WindowResizeHandlers.js +8 -0
  13. package/WindowResizeHandlers.mjs +49 -0
  14. package/WindowTitlebar.js +8 -0
  15. package/WindowTitlebar.mjs +135 -0
  16. package/constants.js +8 -0
  17. package/constants.mjs +11 -0
  18. package/dist/cdn/js/kendo-vue-dialogs.js +8 -1
  19. package/index.d.mts +595 -0
  20. package/index.d.ts +595 -0
  21. package/index.js +8 -0
  22. package/index.mjs +15 -0
  23. package/messages/main.js +8 -0
  24. package/messages/main.mjs +20 -0
  25. package/package-metadata.js +8 -0
  26. package/package-metadata.mjs +18 -0
  27. package/package.json +22 -39
  28. package/dist/es/Dialog.d.ts +0 -109
  29. package/dist/es/Dialog.js +0 -225
  30. package/dist/es/DialogActionsBar.d.ts +0 -50
  31. package/dist/es/DialogActionsBar.js +0 -61
  32. package/dist/es/DialogTitleBar.d.ts +0 -46
  33. package/dist/es/DialogTitleBar.js +0 -85
  34. package/dist/es/StageEnum.d.ts +0 -5
  35. package/dist/es/StageEnum.js +0 -6
  36. package/dist/es/Window.d.ts +0 -75
  37. package/dist/es/Window.js +0 -663
  38. package/dist/es/WindowProps.d.ts +0 -138
  39. package/dist/es/WindowProps.js +0 -2
  40. package/dist/es/WindowResizeHandlers.d.ts +0 -30
  41. package/dist/es/WindowResizeHandlers.js +0 -89
  42. package/dist/es/WindowTitlebar.d.ts +0 -86
  43. package/dist/es/WindowTitlebar.js +0 -202
  44. package/dist/es/additionalTypes.ts +0 -21
  45. package/dist/es/constants.d.ts +0 -2
  46. package/dist/es/constants.js +0 -2
  47. package/dist/es/events.d.ts +0 -34
  48. package/dist/es/events.js +0 -2
  49. package/dist/es/main.d.ts +0 -6
  50. package/dist/es/main.js +0 -4
  51. package/dist/es/messages/main.d.ts +0 -25
  52. package/dist/es/messages/main.js +0 -26
  53. package/dist/es/package-metadata.d.ts +0 -5
  54. package/dist/es/package-metadata.js +0 -11
  55. package/dist/esm/Dialog.d.ts +0 -109
  56. package/dist/esm/Dialog.js +0 -225
  57. package/dist/esm/DialogActionsBar.d.ts +0 -50
  58. package/dist/esm/DialogActionsBar.js +0 -61
  59. package/dist/esm/DialogTitleBar.d.ts +0 -46
  60. package/dist/esm/DialogTitleBar.js +0 -85
  61. package/dist/esm/StageEnum.d.ts +0 -5
  62. package/dist/esm/StageEnum.js +0 -6
  63. package/dist/esm/Window.d.ts +0 -75
  64. package/dist/esm/Window.js +0 -663
  65. package/dist/esm/WindowProps.d.ts +0 -138
  66. package/dist/esm/WindowProps.js +0 -2
  67. package/dist/esm/WindowResizeHandlers.d.ts +0 -30
  68. package/dist/esm/WindowResizeHandlers.js +0 -89
  69. package/dist/esm/WindowTitlebar.d.ts +0 -86
  70. package/dist/esm/WindowTitlebar.js +0 -202
  71. package/dist/esm/additionalTypes.ts +0 -21
  72. package/dist/esm/constants.d.ts +0 -2
  73. package/dist/esm/constants.js +0 -2
  74. package/dist/esm/events.d.ts +0 -34
  75. package/dist/esm/events.js +0 -2
  76. package/dist/esm/main.d.ts +0 -6
  77. package/dist/esm/main.js +0 -4
  78. package/dist/esm/messages/main.d.ts +0 -25
  79. package/dist/esm/messages/main.js +0 -26
  80. package/dist/esm/package-metadata.d.ts +0 -5
  81. package/dist/esm/package-metadata.js +0 -11
  82. package/dist/esm/package.json +0 -3
  83. package/dist/npm/Dialog.d.ts +0 -109
  84. package/dist/npm/Dialog.js +0 -232
  85. package/dist/npm/DialogActionsBar.d.ts +0 -50
  86. package/dist/npm/DialogActionsBar.js +0 -68
  87. package/dist/npm/DialogTitleBar.d.ts +0 -46
  88. package/dist/npm/DialogTitleBar.js +0 -92
  89. package/dist/npm/StageEnum.d.ts +0 -5
  90. package/dist/npm/StageEnum.js +0 -9
  91. package/dist/npm/Window.d.ts +0 -75
  92. package/dist/npm/Window.js +0 -670
  93. package/dist/npm/WindowProps.d.ts +0 -138
  94. package/dist/npm/WindowProps.js +0 -6
  95. package/dist/npm/WindowResizeHandlers.d.ts +0 -30
  96. package/dist/npm/WindowResizeHandlers.js +0 -96
  97. package/dist/npm/WindowTitlebar.d.ts +0 -86
  98. package/dist/npm/WindowTitlebar.js +0 -209
  99. package/dist/npm/additionalTypes.ts +0 -21
  100. package/dist/npm/constants.d.ts +0 -2
  101. package/dist/npm/constants.js +0 -5
  102. package/dist/npm/events.d.ts +0 -34
  103. package/dist/npm/events.js +0 -3
  104. package/dist/npm/main.d.ts +0 -6
  105. package/dist/npm/main.js +0 -12
  106. package/dist/npm/messages/main.d.ts +0 -25
  107. package/dist/npm/messages/main.js +0 -29
  108. package/dist/npm/package-metadata.d.ts +0 -5
  109. package/dist/npm/package-metadata.js +0 -14
@@ -1,11 +0,0 @@
1
- /**
2
- * @hidden
3
- */
4
- export var packageMetadata = {
5
- name: '@progress/kendo-vue-dialogs',
6
- productName: 'Kendo UI for Vue',
7
- productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1726209396,
9
- version: '',
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
- };
@@ -1,109 +0,0 @@
1
- import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from './additionalTypes';
2
- declare type DefaultData<V> = object | ((this: V) => {});
3
- declare type DefaultMethods<V> = {
4
- [key: string]: (this: V, ...args: any[]) => any;
5
- };
6
- import { DialogCloseEvent } from './events';
7
- /**
8
- * Represents the props of the [KendoVue Dialog component]({% slug overview_dialog %}).
9
- */
10
- export interface DialogProps {
11
- /**
12
- * Defines the string selector to the element to which the Dialog will be appended. Defaults to its parent element.
13
- */
14
- appendTo?: String;
15
- /**
16
- * Sets the title of the Dialog ([see example]({% slug title_dialog %})). If `title` is not specified, the Dialog does not render a **Close** button.
17
- */
18
- title?: string | any;
19
- /**
20
- * Defines the custom rendering of the title. Accepts a Vue component, a `render` function, or a slot name.
21
- */
22
- titleRender?: ((h: any, defaultRendering: any | null, props: any, listeners: any) => any) | string | any;
23
- /**
24
- * Sets a class of the Dialog DOM element.
25
- */
26
- className?: string;
27
- /**
28
- * Specifies whether a close button should be rendered at the top corner of the dialog.
29
- */
30
- closeIcon?: boolean;
31
- /**
32
- * Specifies the width of the Dialog ([see example]({% slug dimensions_dialog %})).
33
- */
34
- width?: number | string;
35
- /**
36
- * Specifies the height of the Dialog ([see example]({% slug dimensions_dialog %})).
37
- */
38
- height?: number | string;
39
- /**
40
- * Specifies the minimum width of the Dialog.
41
- */
42
- minWidth?: number | string;
43
- /**
44
- * Specifies the theme color of the Dialog. The available options are `primary`, `dark`, and `light`.
45
- */
46
- themeColor?: 'primary' | 'dark' | 'light' | string;
47
- /**
48
- * Fires when the **Close** button in the title is clicked or when the `Esc` button is pressed.
49
- */
50
- onClose?: (event: DialogCloseEvent) => void;
51
- /**
52
- * Fires when modal overlay of the Window is clicked.
53
- */
54
- onOverlayclick?: (event: any) => void;
55
- /**
56
- * Sets the `aria-labelledby` value.
57
- */
58
- id?: string;
59
- /**
60
- * Sets the `id` of the wrapper element.
61
- */
62
- wrapperId?: string;
63
- /**
64
- * Represents the `dir` HTML attribute.
65
- */
66
- dir?: string;
67
- /**
68
- * The styles that are applied to the Dialog.
69
- */
70
- style?: any;
71
- /**
72
- * The styles that are applied to the content of the Dialog.
73
- */
74
- contentStyle?: any;
75
- dialogClass?: string;
76
- }
77
- /**
78
- * @hidden
79
- */
80
- export interface DialogMethods {
81
- [key: string]: any;
82
- handleCloseDialog: (event: any) => void;
83
- handleKeyDown: (event: any) => void;
84
- transformDimesion: (initialValue: string | number | undefined) => string;
85
- getActionBarIndex: (children: any) => any;
86
- generateTitleId: () => string;
87
- }
88
- /**
89
- * @hidden
90
- */
91
- export interface DialogState {
92
- titleId?: string;
93
- v3: boolean;
94
- windowElement?: any;
95
- }
96
- /**
97
- * @hidden
98
- */
99
- export interface DialogAll extends Vue2type, DialogMethods, DialogState {
100
- }
101
- /**
102
- * @hidden
103
- */
104
- declare let DialogVue2: ComponentOptions<DialogAll, DefaultData<{}>, DefaultMethods<DialogAll>, {}, RecordPropsDefinition<DialogProps>>;
105
- /**
106
- * @hidden
107
- */
108
- declare const Dialog: DefineComponent<DialogProps, any, {}, {}, DialogMethods, {}, {}, {}, string, DialogProps, DialogProps, {}>;
109
- export { Dialog, DialogVue2 };
@@ -1,225 +0,0 @@
1
- // @ts-ignore
2
- import * as Vue from 'vue';
3
- var allVue = Vue;
4
- var gh = allVue.h;
5
- var isV3 = allVue.version && allVue.version[0] === '3';
6
- import { DialogTitleBar } from './DialogTitleBar.js';
7
- import { guid, Keys, templateRendering, hasListener, templateDefinition, getListeners, getDefaultSlots, validatePackage, shouldShowValidationUI, WatermarkOverlay } from '@progress/kendo-vue-common';
8
- import { packageMetadata } from './package-metadata.js';
9
- import { DEFAULT_DIALOGS_ZINDEX } from './constants.js';
10
- /**
11
- * @hidden
12
- */
13
- var DialogVue2 = {
14
- name: 'KendoDialog',
15
- // @ts-ignore
16
- emits: {
17
- close: null,
18
- overlayclick: null
19
- },
20
- props: {
21
- appendTo: String,
22
- title: String,
23
- titleRender: templateDefinition,
24
- id: String,
25
- wrapperId: String,
26
- dir: String,
27
- closeIcon: {
28
- type: Boolean,
29
- default: true
30
- },
31
- width: [String, Number],
32
- height: [String, Number],
33
- minWidth: [String, Number],
34
- dialogClass: String,
35
- themeColor: {
36
- type: String,
37
- validator: function validator(value) {
38
- return ['primary', 'dark', 'light'].includes(value);
39
- }
40
- },
41
- onClose: Function
42
- },
43
- provide: function provide() {
44
- return {
45
- kCurrentZIndex: DEFAULT_DIALOGS_ZINDEX
46
- };
47
- },
48
- data: function data() {
49
- return {
50
- showLicenseWatermark: false
51
- };
52
- },
53
- created: function created() {
54
- validatePackage(packageMetadata);
55
- this.showLicenseWatermark = shouldShowValidationUI(packageMetadata);
56
- this.titleId = this.generateTitleId();
57
- this.contentId = this.generateContentId();
58
- },
59
- // @ts-ignore
60
- setup: !isV3 ? undefined : function () {
61
- var v3 = !!isV3;
62
- return {
63
- v3: v3
64
- };
65
- },
66
- computed: {
67
- dialogElementClass: function dialogElementClass() {
68
- var _a;
69
- var _b = this.$props,
70
- dialogClass = _b.dialogClass,
71
- themeColor = _b.themeColor;
72
- return _a = {
73
- 'k-window': true,
74
- 'k-dialog': true
75
- }, _a[dialogClass] = dialogClass, _a["k-window-".concat(themeColor)] = themeColor, _a;
76
- }
77
- },
78
- mounted: function mounted() {
79
- if (this.$props.appendTo) {
80
- var body = document.querySelector(this.$props.appendTo);
81
- this.windowElement = this.$refs.wrapper;
82
- body.append(this.windowElement);
83
- }
84
- },
85
- beforeDestroy: !!isV3 ? undefined : function () {
86
- if (this.$props.appendTo) {
87
- this.windowElement.remove();
88
- }
89
- },
90
- // @ts-ignore
91
- beforeUnmount: function beforeUnmount() {
92
- if (this.$props.appendTo) {
93
- this.windowElement.remove();
94
- }
95
- },
96
- methods: {
97
- handleCloseDialog: function handleCloseDialog(event) {
98
- event.preventDefault();
99
- this.$emit('close', {
100
- event: event,
101
- target: this
102
- });
103
- },
104
- handleKeyDown: function handleKeyDown(event) {
105
- if (event.keyCode === Keys.esc && hasListener.call(this, 'close')) {
106
- event.preventDefault();
107
- this.handleCloseDialog(event);
108
- }
109
- },
110
- transformDimesion: function transformDimesion(initialValue) {
111
- return typeof initialValue === 'string' ? initialValue.endsWith('px') || initialValue.endsWith('%') ? initialValue : initialValue + 'px' : initialValue + 'px';
112
- },
113
- getActionBarIndex: function getActionBarIndex(children) {
114
- var actionBarIndex = children.findIndex(function (child) {
115
- return child && child.tag && child.tag.toLowerCase().indexOf('dialogactionsbar') !== -1 || child.componentOptions && child.componentOptions.tag && child.componentOptions.tag.toLowerCase().indexOf('actions-bar') !== -1 || child.type && child.type.name && child.type.name.toLowerCase().indexOf('dialogactionsbar') !== -1;
116
- });
117
- return actionBarIndex;
118
- },
119
- generateTitleId: function generateTitleId() {
120
- return 'dialog-title' + guid();
121
- },
122
- generateContentId: function generateContentId() {
123
- return 'dialog-content' + guid();
124
- },
125
- handleClick: function handleClick(e) {
126
- this.$emit('overlayclick', e);
127
- }
128
- },
129
- // @ts-ignore
130
- render: function render(createElement) {
131
- var h = gh || createElement;
132
- var id = this.$props.id !== undefined ? this.$props.id : this.titleId;
133
- var _a = this.$props,
134
- title = _a.title,
135
- width = _a.width,
136
- height = _a.height,
137
- minWidth = _a.minWidth,
138
- dir = _a.dir,
139
- contentStyle = _a.contentStyle,
140
- wrapperId = _a.wrapperId;
141
- var titleRender = this.$props.titleRender ? templateRendering.call(this, this.$props.titleRender, getListeners.call(this)) : null;
142
- var defaultSlot = getDefaultSlots(this);
143
- var content = defaultSlot || [];
144
- width = this.transformDimesion(width);
145
- height = this.transformDimesion(height);
146
- minWidth = this.transformDimesion(minWidth);
147
- var watermark = this.showLicenseWatermark ? h(WatermarkOverlay) : null;
148
- var actionBarIndex = this.getActionBarIndex(content);
149
- var actions;
150
- if (actionBarIndex !== -1) {
151
- actions = content[actionBarIndex];
152
- content.splice(actionBarIndex, 1);
153
- }
154
- var closeIcon = this.$props.closeIcon !== undefined ? this.$props.closeIcon : true;
155
- var dialog = h("div", {
156
- ref: 'wrapper',
157
- "class": 'k-dialog-wrapper',
158
- onKeydown: this.handleKeyDown,
159
- on: this.v3 ? undefined : {
160
- "keydown": this.handleKeyDown
161
- },
162
- tabindex: 0,
163
- attrs: this.v3 ? undefined : {
164
- tabindex: 0,
165
- id: wrapperId,
166
- dir: dir
167
- },
168
- id: wrapperId,
169
- dir: dir
170
- }, [h("div", {
171
- "class": "k-overlay",
172
- onClick: this.handleClick,
173
- on: this.v3 ? undefined : {
174
- "click": this.handleClick
175
- }
176
- }), h("div", {
177
- "aria-labelledby": title || titleRender ? id : undefined,
178
- attrs: this.v3 ? undefined : {
179
- "aria-labelledby": title || titleRender ? id : undefined,
180
- "aria-describedby": this.contentId,
181
- "aria-modal": true,
182
- role: "dialog"
183
- },
184
- "aria-describedby": this.contentId,
185
- "aria-modal": true,
186
- "class": this.dialogElementClass,
187
- role: "dialog",
188
- style: {
189
- width: width,
190
- height: height,
191
- minWidth: minWidth
192
- }
193
- }, [(title || titleRender) &&
194
- // @ts-ignore
195
- h(DialogTitleBar, {
196
- closeIcon: closeIcon,
197
- attrs: this.v3 ? undefined : {
198
- closeIcon: closeIcon,
199
- id: id,
200
- title: title,
201
- titleRender: titleRender
202
- },
203
- onClosebuttonclick: this.handleCloseDialog,
204
- on: this.v3 ? undefined : {
205
- "closebuttonclick": this.handleCloseDialog
206
- },
207
- id: id,
208
- title: title,
209
- titleRender: titleRender
210
- }), h("div", {
211
- "class": "k-window-content k-dialog-content",
212
- style: contentStyle,
213
- id: this.contentId,
214
- attrs: this.v3 ? undefined : {
215
- id: this.contentId
216
- }
217
- }, [content]), actions, watermark])]);
218
- return this.$props.appendTo ? h("div", [dialog]) : dialog;
219
- }
220
- };
221
- /**
222
- * @hidden
223
- */
224
- var Dialog = DialogVue2;
225
- export { Dialog, DialogVue2 };
@@ -1,50 +0,0 @@
1
- import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from './additionalTypes';
2
- declare type DefaultData<V> = object | ((this: V) => {});
3
- declare type DefaultMethods<V> = {
4
- [key: string]: (this: V, ...args: any[]) => any;
5
- };
6
- /**
7
- * @hidden
8
- */
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
- */
19
- layout: string;
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;
29
- }
30
- /**
31
- * @hidden
32
- */
33
- export interface DialogActionsBarComputed {
34
- [key: string]: any;
35
- wrapperClasses: object;
36
- }
37
- /**
38
- * @hidden
39
- */
40
- export interface DialogActionsBarAll extends DialogActionsBarComputed, DialogActionsBarProps, Vue2type {
41
- }
42
- /**
43
- * @hidden
44
- */
45
- declare let DialogActionsBarVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<DialogActionsBarAll>, {}, RecordPropsDefinition<DialogActionsBarProps>>;
46
- /**
47
- * @hidden
48
- */
49
- declare const DialogActionsBar: DefineComponent<{}, any, {}, {}, {}, {}, {}, {}, string, {}, {}, {}>;
50
- export { DialogActionsBar, DialogActionsBarVue2 };
@@ -1,61 +0,0 @@
1
- // @ts-ignore
2
- import * as Vue from 'vue';
3
- var allVue = Vue;
4
- var gh = allVue.h;
5
- var isV3 = allVue.version && allVue.version[0] === '3';
6
- import { getDefaultSlots } from '@progress/kendo-vue-common';
7
- /**
8
- * @hidden
9
- */
10
- var DialogActionsBarVue2 = {
11
- name: 'DialogActionsBar',
12
- props: {
13
- layout: {
14
- type: String,
15
- default: 'stretched',
16
- validator: function validator(value) {
17
- return ['stretched', 'start', 'center', 'end'].includes(value);
18
- }
19
- },
20
- orientation: {
21
- type: String,
22
- default: 'horizontal',
23
- validator: function validator(value) {
24
- return ['horizontal', 'vertical'].includes(value);
25
- }
26
- }
27
- },
28
- // @ts-ignore
29
- setup: !isV3 ? undefined : function () {
30
- var v3 = !!isV3;
31
- return {
32
- v3: v3
33
- };
34
- },
35
- computed: {
36
- wrapperClasses: function wrapperClasses() {
37
- var _a;
38
- var _b = this.$props,
39
- layout = _b.layout,
40
- orientation = _b.orientation;
41
- return _a = {
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;
46
- }
47
- },
48
- // @ts-ignore
49
- render: function render(createElement) {
50
- var h = gh || createElement;
51
- var defaultSlot = getDefaultSlots(this);
52
- return h("div", {
53
- "class": this.wrapperClasses
54
- }, [defaultSlot]);
55
- }
56
- };
57
- /**
58
- * @hidden
59
- */
60
- var DialogActionsBar = DialogActionsBarVue2;
61
- export { DialogActionsBar, DialogActionsBarVue2 };
@@ -1,46 +0,0 @@
1
- import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from './additionalTypes';
2
- declare type DefaultData<V> = object | ((this: V) => {});
3
- declare type DefaultMethods<V> = {
4
- [key: string]: (this: V, ...args: any[]) => any;
5
- };
6
- /**
7
- * @hidden
8
- */
9
- export interface DialogTitleBarProps {
10
- /**
11
- * @hidden
12
- */
13
- onClosebuttonclick?: (event: any) => void;
14
- /**
15
- * @hidden
16
- */
17
- id?: string;
18
- /**
19
- * @hidden
20
- */
21
- closeIcon?: boolean;
22
- /**
23
- * Sets the title of the Dialog .
24
- * If `title` of 'titleRender' is not specified, the Dialog does not render a **Close** button.
25
- */
26
- title?: string | any;
27
- /**
28
- * Defines the custom rendering of the title. Accepts a Vue component, a `render` function, or a slot name.
29
- */
30
- titleRender?: ((h: any, defaultRendering: any | null, props: any, listeners: any) => any) | string | any;
31
- }
32
- /**
33
- * @hidden
34
- */
35
- export interface DialogTitleBarMethods extends Vue2type {
36
- onCloseButtonClick: (event: any) => void;
37
- }
38
- /**
39
- * @hidden
40
- */
41
- declare let DialogTitleBarVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<DialogTitleBarMethods>, {}, RecordPropsDefinition<DialogTitleBarProps>>;
42
- /**
43
- * @hidden
44
- */
45
- declare const DialogTitleBar: DefineComponent<DialogTitleBarProps, any, {}, {}, DialogTitleBarMethods, {}, {}, {}, string, DialogTitleBarProps, DialogTitleBarProps, {}>;
46
- export { DialogTitleBar, DialogTitleBarVue2 };
@@ -1,85 +0,0 @@
1
- // @ts-ignore
2
- import * as Vue from 'vue';
3
- var allVue = Vue;
4
- var gh = allVue.h;
5
- var isV3 = allVue.version && allVue.version[0] === '3';
6
- import { getTemplate } from '@progress/kendo-vue-common';
7
- import { Button } from '@progress/kendo-vue-buttons';
8
- import { xIcon } from '@progress/kendo-svg-icons';
9
- /**
10
- * @hidden
11
- */
12
- var DialogTitleBarVue2 = {
13
- props: {
14
- id: String,
15
- closeIcon: {
16
- type: Boolean,
17
- default: true
18
- },
19
- title: String,
20
- titleRender: [String, Function, Object]
21
- },
22
- // @ts-ignore
23
- setup: !isV3 ? undefined : function () {
24
- var v3 = !!isV3;
25
- return {
26
- v3: v3
27
- };
28
- },
29
- methods: {
30
- onCloseButtonClick: function onCloseButtonClick(e) {
31
- this.$emit('closebuttonclick', e);
32
- }
33
- },
34
- // @ts-ignore
35
- render: function render(createElement) {
36
- var h = gh || createElement;
37
- var _a = this.$props,
38
- id = _a.id,
39
- closeIcon = _a.closeIcon,
40
- titleRender = _a.titleRender,
41
- title = _a.title;
42
- var titleElement;
43
- titleElement = getTemplate.call(this, {
44
- h: h,
45
- template: titleRender,
46
- defaultRendering: title
47
- });
48
- return h("div", {
49
- "class": "k-window-titlebar k-dialog-titlebar",
50
- id: id,
51
- attrs: this.v3 ? undefined : {
52
- id: id
53
- }
54
- }, [h("span", {
55
- "class": "k-window-title k-dialog-title"
56
- }, [titleElement]), h("div", {
57
- "class": "k-window-titlebar-actions k-dialog-titlebar-actions"
58
- }, [closeIcon &&
59
- // @ts-ignore
60
- h(Button, {
61
- type: "button",
62
- attrs: this.v3 ? undefined : {
63
- type: "button",
64
- fillMode: 'flat',
65
- "aria-label": "Close",
66
- icon: 'x',
67
- svgIcon: xIcon
68
- },
69
- fillMode: 'flat',
70
- "aria-label": "Close",
71
- icon: 'x',
72
- svgIcon: xIcon,
73
- onClick: this.onCloseButtonClick,
74
- on: this.v3 ? undefined : {
75
- "click": this.onCloseButtonClick
76
- },
77
- "class": "k-window-titlebar-action k-dialog-titlebar-action"
78
- })])]);
79
- }
80
- };
81
- /**
82
- * @hidden
83
- */
84
- var DialogTitleBar = DialogTitleBarVue2;
85
- export { DialogTitleBar, DialogTitleBarVue2 };
@@ -1,5 +0,0 @@
1
- export declare enum windowStage {
2
- DEFAULT = "DEFAULT",
3
- FULLSCREEN = "FULLSCREEN",
4
- MINIMIZED = "MINIMIZED"
5
- }
@@ -1,6 +0,0 @@
1
- export var windowStage;
2
- (function (windowStage) {
3
- windowStage["DEFAULT"] = "DEFAULT";
4
- windowStage["FULLSCREEN"] = "FULLSCREEN";
5
- windowStage["MINIMIZED"] = "MINIMIZED";
6
- })(windowStage || (windowStage = {}));
@@ -1,75 +0,0 @@
1
- import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from './additionalTypes';
2
- import { WindowProps } from './WindowProps';
3
- declare type DefaultData<V> = object | ((this: V) => {});
4
- declare type DefaultMethods<V> = {
5
- [key: string]: (this: V, ...args: any[]) => any;
6
- };
7
- import { windowStage } from './StageEnum';
8
- /**
9
- * @hidden
10
- */
11
- export interface WindowComputed {
12
- [key: string]: any;
13
- computedTop: number;
14
- computedLeft: number;
15
- computedWidth: number;
16
- computedHeight: number;
17
- windowStage: any;
18
- }
19
- /**
20
- * @hidden
21
- */
22
- interface WindowData {
23
- currentStage: windowStage | string;
24
- isDragging: boolean;
25
- currentTop: number;
26
- currentLeft: number;
27
- currentWidth: number;
28
- currentHeight: number;
29
- }
30
- /**
31
- * @hidden
32
- */
33
- interface WindowState {
34
- windowCoordinatesState: any;
35
- draggable: any;
36
- windowElement: any;
37
- }
38
- /**
39
- * @hidden
40
- */
41
- export interface WindowMethods extends Vue2type {
42
- getInitialTop: () => number;
43
- getInitialLeft: () => number;
44
- getInitialWidth: () => number;
45
- getInitialHeight: () => number;
46
- dispatchMoveEvent: (eventName: string, event: any, drag: boolean, end: boolean | undefined) => void;
47
- handleFullscreen: (event: any) => void;
48
- handleCloseWindow: (event: any) => void;
49
- handleRestore: (event: any) => void;
50
- handleMinimize: (event: any) => void;
51
- handleDoubleClick: (e: any) => void;
52
- handleResize: (event: any, props: {
53
- end: boolean;
54
- direction: string;
55
- }) => void;
56
- onPress: (data: any) => void;
57
- onDrag: (data: any) => void;
58
- onRelease: (data: any) => void;
59
- handleKeyDown: (event: any) => void;
60
- handleBrowserWindowResize: () => void;
61
- }
62
- /**
63
- * @hidden
64
- */
65
- export interface WindowAll extends WindowMethods, WindowData, WindowState, WindowComputed {
66
- }
67
- /**
68
- * @hidden
69
- */
70
- declare let WindowVue2: ComponentOptions<Vue2type, DefaultData<WindowData>, DefaultMethods<WindowAll>, WindowComputed, RecordPropsDefinition<WindowProps>>;
71
- /**
72
- * @hidden
73
- */
74
- declare const Window: DefineComponent<WindowProps, any, WindowData, WindowComputed, WindowMethods, {}, {}, {}, string, WindowProps, WindowProps, {}>;
75
- export { Window, WindowVue2 };