@progress/kendo-vue-notification 5.3.0-dev.202410141143 → 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.
- package/Notification.js +8 -0
- package/Notification.mjs +136 -0
- package/NotificationGroup.js +8 -0
- package/NotificationGroup.mjs +25 -0
- package/README.md +24 -27
- package/dist/cdn/js/kendo-vue-notification.js +8 -1
- package/index.d.mts +168 -0
- package/index.d.ts +168 -0
- package/index.js +8 -0
- package/index.mjs +13 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +18 -0
- package/package.json +23 -40
- package/dist/es/Notification.d.ts +0 -106
- package/dist/es/Notification.js +0 -174
- package/dist/es/NotificationGroup.d.ts +0 -48
- package/dist/es/NotificationGroup.js +0 -36
- package/dist/es/additionalTypes.ts +0 -21
- package/dist/es/main.d.ts +0 -3
- package/dist/es/main.js +0 -3
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/esm/Notification.d.ts +0 -106
- package/dist/esm/Notification.js +0 -174
- package/dist/esm/NotificationGroup.d.ts +0 -48
- package/dist/esm/NotificationGroup.js +0 -36
- package/dist/esm/additionalTypes.ts +0 -21
- package/dist/esm/main.d.ts +0 -3
- package/dist/esm/main.js +0 -3
- package/dist/esm/package-metadata.d.ts +0 -5
- package/dist/esm/package-metadata.js +0 -11
- package/dist/esm/package.json +0 -3
- package/dist/npm/Notification.d.ts +0 -106
- package/dist/npm/Notification.js +0 -181
- package/dist/npm/NotificationGroup.d.ts +0 -48
- package/dist/npm/NotificationGroup.js +0 -43
- package/dist/npm/additionalTypes.ts +0 -21
- package/dist/npm/main.d.ts +0 -3
- package/dist/npm/main.js +0 -7
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
package/dist/es/Notification.js
DELETED
|
@@ -1,174 +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 { packageMetadata } from './package-metadata';
|
|
7
|
-
import { checkOutlineIcon, exclamationCircleIcon, infoCircleIcon, xIcon, xOutlineIcon } from '@progress/kendo-svg-icons';
|
|
8
|
-
import { validatePackage, getDefaultSlots, Icon, guid } from '@progress/kendo-vue-common';
|
|
9
|
-
var buttonTitle = 'Close';
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
var NotificationVue2 = {
|
|
14
|
-
name: 'KendoNotification',
|
|
15
|
-
props: {
|
|
16
|
-
closable: {
|
|
17
|
-
type: [Object, Boolean],
|
|
18
|
-
default: function _default() {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
dir: String,
|
|
23
|
-
type: {
|
|
24
|
-
type: Object,
|
|
25
|
-
default: function _default() {
|
|
26
|
-
return {
|
|
27
|
-
style: 'none',
|
|
28
|
-
icon: true
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
validator: function validator(value) {
|
|
32
|
-
return ['none', 'success', 'error', 'warning', 'info'].includes(value.style);
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
themeColor: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: 'base',
|
|
38
|
-
validator: function validator(value) {
|
|
39
|
-
return [null, 'base', 'error', 'info', 'success', 'warning'].includes(value);
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
ariaLabel: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: undefined
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
created: function created() {
|
|
48
|
-
validatePackage(packageMetadata);
|
|
49
|
-
this.notificationContentId = guid();
|
|
50
|
-
},
|
|
51
|
-
computed: {
|
|
52
|
-
computedTheme: function computedTheme() {
|
|
53
|
-
var _a = this.$props,
|
|
54
|
-
type = _a.type,
|
|
55
|
-
themeColor = _a.themeColor;
|
|
56
|
-
return type.style !== 'none' ? type.style : themeColor;
|
|
57
|
-
},
|
|
58
|
-
computedSvg: function computedSvg() {
|
|
59
|
-
switch (this.computedTheme) {
|
|
60
|
-
case 'success':
|
|
61
|
-
return {
|
|
62
|
-
name: 'check-outline',
|
|
63
|
-
icon: checkOutlineIcon
|
|
64
|
-
};
|
|
65
|
-
case 'error':
|
|
66
|
-
return {
|
|
67
|
-
name: 'x-outline',
|
|
68
|
-
icon: xOutlineIcon
|
|
69
|
-
};
|
|
70
|
-
case 'info':
|
|
71
|
-
return {
|
|
72
|
-
name: 'info-circle',
|
|
73
|
-
icon: infoCircleIcon
|
|
74
|
-
};
|
|
75
|
-
case 'warning':
|
|
76
|
-
return {
|
|
77
|
-
name: 'exclamation-circle',
|
|
78
|
-
icon: exclamationCircleIcon
|
|
79
|
-
};
|
|
80
|
-
default:
|
|
81
|
-
return {};
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
wrapperClass: function wrapperClass() {
|
|
85
|
-
var _a;
|
|
86
|
-
var closable = this.$props.closable;
|
|
87
|
-
return _a = {
|
|
88
|
-
'k-notification': true
|
|
89
|
-
}, _a["k-notification-".concat(this.computedTheme)] = this.computedTheme, _a['k-notification-closable'] = closable, _a;
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
// @ts-ignore
|
|
93
|
-
setup: !isV3 ? undefined : function () {
|
|
94
|
-
var v3 = !!isV3;
|
|
95
|
-
return {
|
|
96
|
-
v3: v3
|
|
97
|
-
};
|
|
98
|
-
},
|
|
99
|
-
// @ts-ignore
|
|
100
|
-
render: function render(createElement) {
|
|
101
|
-
var h = gh || createElement;
|
|
102
|
-
var defaultSlot = getDefaultSlots(this);
|
|
103
|
-
var _a = this.$props,
|
|
104
|
-
closable = _a.closable,
|
|
105
|
-
type = _a.type;
|
|
106
|
-
return h("div", {
|
|
107
|
-
role: 'alert',
|
|
108
|
-
attrs: this.v3 ? undefined : {
|
|
109
|
-
role: 'alert',
|
|
110
|
-
"aria-live": 'polite',
|
|
111
|
-
"aria-label": this.$props.ariaLabel,
|
|
112
|
-
"aria-describedby": this.notificationContentId
|
|
113
|
-
},
|
|
114
|
-
"class": this.wrapperClass,
|
|
115
|
-
style: this.$props.style,
|
|
116
|
-
"aria-live": 'polite',
|
|
117
|
-
"aria-label": this.$props.ariaLabel,
|
|
118
|
-
"aria-describedby": this.notificationContentId
|
|
119
|
-
}, [type.icon && this.computedSvg.name && h(Icon, {
|
|
120
|
-
name: this.computedSvg.name,
|
|
121
|
-
attrs: this.v3 ? undefined : {
|
|
122
|
-
name: this.computedSvg.name,
|
|
123
|
-
icon: this.computedSvg.icon
|
|
124
|
-
},
|
|
125
|
-
icon: this.computedSvg.icon,
|
|
126
|
-
"class": 'k-notification-status'
|
|
127
|
-
}), h("div", {
|
|
128
|
-
"class": "k-notification-content",
|
|
129
|
-
id: this.notificationContentId,
|
|
130
|
-
attrs: this.v3 ? undefined : {
|
|
131
|
-
id: this.notificationContentId
|
|
132
|
-
}
|
|
133
|
-
}, [defaultSlot]), closable && h("span", {
|
|
134
|
-
"class": "k-notification-actions"
|
|
135
|
-
}, [h("span", {
|
|
136
|
-
"class": "k-notification-action k-notification-close-action",
|
|
137
|
-
"aria-hidden": true,
|
|
138
|
-
attrs: this.v3 ? undefined : {
|
|
139
|
-
"aria-hidden": true
|
|
140
|
-
}
|
|
141
|
-
}, [h(Icon, {
|
|
142
|
-
name: "x",
|
|
143
|
-
attrs: this.v3 ? undefined : {
|
|
144
|
-
name: "x",
|
|
145
|
-
icon: xIcon,
|
|
146
|
-
title: buttonTitle
|
|
147
|
-
},
|
|
148
|
-
icon: xIcon,
|
|
149
|
-
title: buttonTitle,
|
|
150
|
-
onClick: this.handleClick,
|
|
151
|
-
on: this.v3 ? undefined : {
|
|
152
|
-
"click": this.handleClick
|
|
153
|
-
}
|
|
154
|
-
})])])]);
|
|
155
|
-
},
|
|
156
|
-
methods: {
|
|
157
|
-
handleClick: function handleClick(event) {
|
|
158
|
-
this.$emit('close', {
|
|
159
|
-
component: this,
|
|
160
|
-
event: event
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
/**
|
|
166
|
-
* Represents the [Kendo UI for Vue Native Notification component]({% slug overview_notification %}).
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
* ### props <span class='code'>Readonly<[NotificationProps]({% slug api_notification_notificationprops %})</span>
|
|
170
|
-
* The props of the Notification component.
|
|
171
|
-
*
|
|
172
|
-
*/
|
|
173
|
-
var Notification = NotificationVue2;
|
|
174
|
-
export { Notification, NotificationVue2 };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { DefineComponent } from './additionalTypes';
|
|
2
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
3
|
-
declare type DefaultData<V> = object | ((this: V) => {});
|
|
4
|
-
declare type DefaultMethods<V> = {
|
|
5
|
-
[key: string]: (this: V, ...args: any[]) => any;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Represents the props of the [Kendo UI for Vue NotificationGroup component]({% slug api_notification_notificationgroupprops %}).
|
|
9
|
-
*/
|
|
10
|
-
export interface NotificationGroupProps {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
export interface NotificationGroupState {
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
export interface NotificationGroupComputed {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
skeletonClasses: object;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*/
|
|
27
|
-
export interface NotificationGroupMethods {
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
export interface NotificationGroupData {
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* @hidden
|
|
37
|
-
*/
|
|
38
|
-
export interface NotificationGroupAll extends Vue, NotificationGroupMethods, NotificationGroupData, NotificationGroupComputed, NotificationGroupState {
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @hidden
|
|
42
|
-
*/
|
|
43
|
-
declare let NotificationGroupVue2: ComponentOptions<NotificationGroupAll, DefaultData<NotificationGroupData>, DefaultMethods<NotificationGroupAll>, NotificationGroupComputed, RecordPropsDefinition<NotificationGroupProps>>;
|
|
44
|
-
/**
|
|
45
|
-
* @hidden
|
|
46
|
-
*/
|
|
47
|
-
declare const NotificationGroup: DefineComponent<NotificationGroupProps, any, NotificationGroupData, NotificationGroupComputed, NotificationGroupMethods, {}, {}, {}, string, NotificationGroupProps, NotificationGroupProps, {}>;
|
|
48
|
-
export { NotificationGroup, NotificationGroupVue2 };
|
|
@@ -1,36 +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 NotificationGroupVue2 = {
|
|
11
|
-
name: 'KendoNotificationGroup',
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
setup: !isV3 ? undefined : function () {
|
|
14
|
-
var v3 = !!isV3;
|
|
15
|
-
return {
|
|
16
|
-
v3: v3
|
|
17
|
-
};
|
|
18
|
-
},
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
render: function render(createElement) {
|
|
21
|
-
var h = gh || createElement;
|
|
22
|
-
var defaultSlot = getDefaultSlots(this);
|
|
23
|
-
return h("div", {
|
|
24
|
-
"class": 'k-notification-group',
|
|
25
|
-
style: {
|
|
26
|
-
alignItems: 'center',
|
|
27
|
-
flexWrap: 'wrap'
|
|
28
|
-
}
|
|
29
|
-
}, [defaultSlot]);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* @hidden
|
|
34
|
-
*/
|
|
35
|
-
var NotificationGroup = NotificationGroupVue2;
|
|
36
|
-
export { NotificationGroup, NotificationGroupVue2 };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
import { DefineComponent } from 'vue';
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
import * as Vue from 'vue';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
// @ts-ignore
|
|
10
|
-
type Vue2type = Vue.default;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
|
package/dist/es/main.d.ts
DELETED
package/dist/es/main.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @hidden
|
|
3
|
-
*/
|
|
4
|
-
export var packageMetadata = {
|
|
5
|
-
name: '@progress/kendo-vue-notification',
|
|
6
|
-
productName: 'Kendo UI for Vue',
|
|
7
|
-
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate: 1728906015,
|
|
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,106 +0,0 @@
|
|
|
1
|
-
import { DefineComponent } from './additionalTypes';
|
|
2
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
3
|
-
declare type DefaultData<V> = object | ((this: V) => {});
|
|
4
|
-
declare type DefaultMethods<V> = {
|
|
5
|
-
[key: string]: (this: V, ...args: any[]) => any;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* The `close` event object of the Notification.
|
|
9
|
-
*/
|
|
10
|
-
export interface NotificationEvent {
|
|
11
|
-
/**
|
|
12
|
-
* A native DOM event.
|
|
13
|
-
*/
|
|
14
|
-
event: Event;
|
|
15
|
-
/**
|
|
16
|
-
* An event target.
|
|
17
|
-
*/
|
|
18
|
-
target: Notification;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Represents the props of the [Kendo UI for Vue Notification component]({% slug overview_notification %}).
|
|
22
|
-
*/
|
|
23
|
-
export interface NotificationProps {
|
|
24
|
-
/**
|
|
25
|
-
* Specifies if the Notification will require a user action to hide.
|
|
26
|
-
* If the property is set to `true`, the Notification renders a **Close** button.
|
|
27
|
-
* If the property is set to `object`, the Notification renders a **Close** button
|
|
28
|
-
* by extending the default props with the provided object.
|
|
29
|
-
*
|
|
30
|
-
* The possible values are:
|
|
31
|
-
* * (Default) `false`
|
|
32
|
-
* * `true`
|
|
33
|
-
* * `{ title: 'Hide', ... }`
|
|
34
|
-
*/
|
|
35
|
-
closable?: boolean | any;
|
|
36
|
-
/**
|
|
37
|
-
* The `dir` HTML attribute.
|
|
38
|
-
*/
|
|
39
|
-
dir?: string;
|
|
40
|
-
/**
|
|
41
|
-
* The Notification type
|
|
42
|
-
* ([see example]({% slug types_notification %})).
|
|
43
|
-
*
|
|
44
|
-
* The possible values are:
|
|
45
|
-
* * `style: 'none'|'success'|'error'|'warning'|'info'`. Defaults to `none`.
|
|
46
|
-
* * `icon?: 'true'|'false'`. Defaults to `true`.
|
|
47
|
-
*/
|
|
48
|
-
type?: {
|
|
49
|
-
style?: 'none' | 'success' | 'error' | 'warning' | 'info';
|
|
50
|
-
icon?: boolean;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Configures the `themeColor` of the Notification.
|
|
54
|
-
*/
|
|
55
|
-
themeColor?: string;
|
|
56
|
-
/**
|
|
57
|
-
* The `close` event which will be triggered when the **Close** button is clicked.
|
|
58
|
-
*/
|
|
59
|
-
onClose?: (event: NotificationEvent) => void;
|
|
60
|
-
/**
|
|
61
|
-
* Defines the aria-label attribute of the Notification component. Defaults to `undefined`.
|
|
62
|
-
*/
|
|
63
|
-
ariaLabel?: string;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* @hidden
|
|
67
|
-
*/
|
|
68
|
-
export interface NotificationState {
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* @hidden
|
|
72
|
-
*/
|
|
73
|
-
export interface NotificationComputed {
|
|
74
|
-
[key: string]: any;
|
|
75
|
-
wrapperClass: object;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* @hidden
|
|
79
|
-
*/
|
|
80
|
-
export interface NotificationMethods {
|
|
81
|
-
[key: string]: any;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* @hidden
|
|
85
|
-
*/
|
|
86
|
-
export interface NotificationData {
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* @hidden
|
|
90
|
-
*/
|
|
91
|
-
export interface NotificationAll extends Vue, NotificationMethods, NotificationData, NotificationComputed, NotificationState {
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* @hidden
|
|
95
|
-
*/
|
|
96
|
-
declare let NotificationVue2: ComponentOptions<NotificationAll, DefaultData<NotificationData>, DefaultMethods<NotificationAll>, NotificationComputed, RecordPropsDefinition<NotificationProps>>;
|
|
97
|
-
/**
|
|
98
|
-
* Represents the [Kendo UI for Vue Native Notification component]({% slug overview_notification %}).
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* ### props <span class='code'>Readonly<[NotificationProps]({% slug api_notification_notificationprops %})</span>
|
|
102
|
-
* The props of the Notification component.
|
|
103
|
-
*
|
|
104
|
-
*/
|
|
105
|
-
declare const Notification: DefineComponent<NotificationProps, any, NotificationData, NotificationComputed, NotificationMethods, {}, {}, {}, string, NotificationProps, NotificationProps, {}>;
|
|
106
|
-
export { Notification, NotificationVue2 };
|
package/dist/esm/Notification.js
DELETED
|
@@ -1,174 +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 { packageMetadata } from './package-metadata.js';
|
|
7
|
-
import { checkOutlineIcon, exclamationCircleIcon, infoCircleIcon, xIcon, xOutlineIcon } from '@progress/kendo-svg-icons';
|
|
8
|
-
import { validatePackage, getDefaultSlots, Icon, guid } from '@progress/kendo-vue-common';
|
|
9
|
-
var buttonTitle = 'Close';
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
var NotificationVue2 = {
|
|
14
|
-
name: 'KendoNotification',
|
|
15
|
-
props: {
|
|
16
|
-
closable: {
|
|
17
|
-
type: [Object, Boolean],
|
|
18
|
-
default: function _default() {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
dir: String,
|
|
23
|
-
type: {
|
|
24
|
-
type: Object,
|
|
25
|
-
default: function _default() {
|
|
26
|
-
return {
|
|
27
|
-
style: 'none',
|
|
28
|
-
icon: true
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
validator: function validator(value) {
|
|
32
|
-
return ['none', 'success', 'error', 'warning', 'info'].includes(value.style);
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
themeColor: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: 'base',
|
|
38
|
-
validator: function validator(value) {
|
|
39
|
-
return [null, 'base', 'error', 'info', 'success', 'warning'].includes(value);
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
ariaLabel: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: undefined
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
created: function created() {
|
|
48
|
-
validatePackage(packageMetadata);
|
|
49
|
-
this.notificationContentId = guid();
|
|
50
|
-
},
|
|
51
|
-
computed: {
|
|
52
|
-
computedTheme: function computedTheme() {
|
|
53
|
-
var _a = this.$props,
|
|
54
|
-
type = _a.type,
|
|
55
|
-
themeColor = _a.themeColor;
|
|
56
|
-
return type.style !== 'none' ? type.style : themeColor;
|
|
57
|
-
},
|
|
58
|
-
computedSvg: function computedSvg() {
|
|
59
|
-
switch (this.computedTheme) {
|
|
60
|
-
case 'success':
|
|
61
|
-
return {
|
|
62
|
-
name: 'check-outline',
|
|
63
|
-
icon: checkOutlineIcon
|
|
64
|
-
};
|
|
65
|
-
case 'error':
|
|
66
|
-
return {
|
|
67
|
-
name: 'x-outline',
|
|
68
|
-
icon: xOutlineIcon
|
|
69
|
-
};
|
|
70
|
-
case 'info':
|
|
71
|
-
return {
|
|
72
|
-
name: 'info-circle',
|
|
73
|
-
icon: infoCircleIcon
|
|
74
|
-
};
|
|
75
|
-
case 'warning':
|
|
76
|
-
return {
|
|
77
|
-
name: 'exclamation-circle',
|
|
78
|
-
icon: exclamationCircleIcon
|
|
79
|
-
};
|
|
80
|
-
default:
|
|
81
|
-
return {};
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
wrapperClass: function wrapperClass() {
|
|
85
|
-
var _a;
|
|
86
|
-
var closable = this.$props.closable;
|
|
87
|
-
return _a = {
|
|
88
|
-
'k-notification': true
|
|
89
|
-
}, _a["k-notification-".concat(this.computedTheme)] = this.computedTheme, _a['k-notification-closable'] = closable, _a;
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
// @ts-ignore
|
|
93
|
-
setup: !isV3 ? undefined : function () {
|
|
94
|
-
var v3 = !!isV3;
|
|
95
|
-
return {
|
|
96
|
-
v3: v3
|
|
97
|
-
};
|
|
98
|
-
},
|
|
99
|
-
// @ts-ignore
|
|
100
|
-
render: function render(createElement) {
|
|
101
|
-
var h = gh || createElement;
|
|
102
|
-
var defaultSlot = getDefaultSlots(this);
|
|
103
|
-
var _a = this.$props,
|
|
104
|
-
closable = _a.closable,
|
|
105
|
-
type = _a.type;
|
|
106
|
-
return h("div", {
|
|
107
|
-
role: 'alert',
|
|
108
|
-
attrs: this.v3 ? undefined : {
|
|
109
|
-
role: 'alert',
|
|
110
|
-
"aria-live": 'polite',
|
|
111
|
-
"aria-label": this.$props.ariaLabel,
|
|
112
|
-
"aria-describedby": this.notificationContentId
|
|
113
|
-
},
|
|
114
|
-
"class": this.wrapperClass,
|
|
115
|
-
style: this.$props.style,
|
|
116
|
-
"aria-live": 'polite',
|
|
117
|
-
"aria-label": this.$props.ariaLabel,
|
|
118
|
-
"aria-describedby": this.notificationContentId
|
|
119
|
-
}, [type.icon && this.computedSvg.name && h(Icon, {
|
|
120
|
-
name: this.computedSvg.name,
|
|
121
|
-
attrs: this.v3 ? undefined : {
|
|
122
|
-
name: this.computedSvg.name,
|
|
123
|
-
icon: this.computedSvg.icon
|
|
124
|
-
},
|
|
125
|
-
icon: this.computedSvg.icon,
|
|
126
|
-
"class": 'k-notification-status'
|
|
127
|
-
}), h("div", {
|
|
128
|
-
"class": "k-notification-content",
|
|
129
|
-
id: this.notificationContentId,
|
|
130
|
-
attrs: this.v3 ? undefined : {
|
|
131
|
-
id: this.notificationContentId
|
|
132
|
-
}
|
|
133
|
-
}, [defaultSlot]), closable && h("span", {
|
|
134
|
-
"class": "k-notification-actions"
|
|
135
|
-
}, [h("span", {
|
|
136
|
-
"class": "k-notification-action k-notification-close-action",
|
|
137
|
-
"aria-hidden": true,
|
|
138
|
-
attrs: this.v3 ? undefined : {
|
|
139
|
-
"aria-hidden": true
|
|
140
|
-
}
|
|
141
|
-
}, [h(Icon, {
|
|
142
|
-
name: "x",
|
|
143
|
-
attrs: this.v3 ? undefined : {
|
|
144
|
-
name: "x",
|
|
145
|
-
icon: xIcon,
|
|
146
|
-
title: buttonTitle
|
|
147
|
-
},
|
|
148
|
-
icon: xIcon,
|
|
149
|
-
title: buttonTitle,
|
|
150
|
-
onClick: this.handleClick,
|
|
151
|
-
on: this.v3 ? undefined : {
|
|
152
|
-
"click": this.handleClick
|
|
153
|
-
}
|
|
154
|
-
})])])]);
|
|
155
|
-
},
|
|
156
|
-
methods: {
|
|
157
|
-
handleClick: function handleClick(event) {
|
|
158
|
-
this.$emit('close', {
|
|
159
|
-
component: this,
|
|
160
|
-
event: event
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
/**
|
|
166
|
-
* Represents the [Kendo UI for Vue Native Notification component]({% slug overview_notification %}).
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
* ### props <span class='code'>Readonly<[NotificationProps]({% slug api_notification_notificationprops %})</span>
|
|
170
|
-
* The props of the Notification component.
|
|
171
|
-
*
|
|
172
|
-
*/
|
|
173
|
-
var Notification = NotificationVue2;
|
|
174
|
-
export { Notification, NotificationVue2 };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { DefineComponent } from './additionalTypes';
|
|
2
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
3
|
-
declare type DefaultData<V> = object | ((this: V) => {});
|
|
4
|
-
declare type DefaultMethods<V> = {
|
|
5
|
-
[key: string]: (this: V, ...args: any[]) => any;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Represents the props of the [Kendo UI for Vue NotificationGroup component]({% slug api_notification_notificationgroupprops %}).
|
|
9
|
-
*/
|
|
10
|
-
export interface NotificationGroupProps {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
export interface NotificationGroupState {
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
export interface NotificationGroupComputed {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
skeletonClasses: object;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*/
|
|
27
|
-
export interface NotificationGroupMethods {
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
export interface NotificationGroupData {
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* @hidden
|
|
37
|
-
*/
|
|
38
|
-
export interface NotificationGroupAll extends Vue, NotificationGroupMethods, NotificationGroupData, NotificationGroupComputed, NotificationGroupState {
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @hidden
|
|
42
|
-
*/
|
|
43
|
-
declare let NotificationGroupVue2: ComponentOptions<NotificationGroupAll, DefaultData<NotificationGroupData>, DefaultMethods<NotificationGroupAll>, NotificationGroupComputed, RecordPropsDefinition<NotificationGroupProps>>;
|
|
44
|
-
/**
|
|
45
|
-
* @hidden
|
|
46
|
-
*/
|
|
47
|
-
declare const NotificationGroup: DefineComponent<NotificationGroupProps, any, NotificationGroupData, NotificationGroupComputed, NotificationGroupMethods, {}, {}, {}, string, NotificationGroupProps, NotificationGroupProps, {}>;
|
|
48
|
-
export { NotificationGroup, NotificationGroupVue2 };
|
|
@@ -1,36 +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 NotificationGroupVue2 = {
|
|
11
|
-
name: 'KendoNotificationGroup',
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
setup: !isV3 ? undefined : function () {
|
|
14
|
-
var v3 = !!isV3;
|
|
15
|
-
return {
|
|
16
|
-
v3: v3
|
|
17
|
-
};
|
|
18
|
-
},
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
render: function render(createElement) {
|
|
21
|
-
var h = gh || createElement;
|
|
22
|
-
var defaultSlot = getDefaultSlots(this);
|
|
23
|
-
return h("div", {
|
|
24
|
-
"class": 'k-notification-group',
|
|
25
|
-
style: {
|
|
26
|
-
alignItems: 'center',
|
|
27
|
-
flexWrap: 'wrap'
|
|
28
|
-
}
|
|
29
|
-
}, [defaultSlot]);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* @hidden
|
|
34
|
-
*/
|
|
35
|
-
var NotificationGroup = NotificationGroupVue2;
|
|
36
|
-
export { NotificationGroup, NotificationGroupVue2 };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
import { DefineComponent } from 'vue';
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
import * as Vue from 'vue';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
// @ts-ignore
|
|
10
|
-
type Vue2type = Vue.default;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
|