@progress/kendo-angular-notification 3.0.5 → 4.0.0-next.202203141327
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/bundles/kendo-angular-notification.umd.js +5 -0
- package/{dist/es/models/notification-ref.js → esm2015/kendo-angular-notification.js} +4 -0
- package/esm2015/localization/localized-messages.directive.js +38 -0
- package/{dist/es → esm2015}/main.js +2 -0
- package/{dist/es2015 → esm2015}/models/animation.js +1 -0
- package/{dist/es2015 → esm2015}/models/notification-ref.js +1 -0
- package/{dist/es2015 → esm2015}/models/notification-settings.js +0 -0
- package/{dist/es → esm2015}/models/position.js +1 -0
- package/{dist/es2015 → esm2015}/models/type.js +1 -0
- package/{dist/es2015 → esm2015}/notification.component.js +85 -73
- package/{dist/es2015 → esm2015}/notification.container.component.js +25 -27
- package/{dist/es → esm2015}/notification.module.js +16 -16
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es2015 → esm2015}/services/notification.service.js +14 -12
- package/{dist/es2015 → esm2015}/utils/animations.js +0 -0
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-notification.js} +170 -146
- package/{dist/es/models/animation.js → kendo-angular-notification.d.ts} +5 -0
- package/{dist/es2015/localization → localization}/localized-messages.directive.d.ts +3 -0
- package/{dist/es2015/main.d.ts → main.d.ts} +1 -0
- package/{dist/es2015/models → models}/animation.d.ts +0 -0
- package/{dist/es2015/models → models}/notification-ref.d.ts +0 -0
- package/{dist/es2015/models → models}/notification-settings.d.ts +0 -0
- package/{dist/es2015/models → models}/position.d.ts +0 -0
- package/{dist/es2015/models → models}/type.d.ts +0 -0
- package/{dist/es2015/notification.component.d.ts → notification.component.d.ts} +5 -2
- package/{dist/es2015/notification.container.component.d.ts → notification.container.component.d.ts} +3 -1
- package/{dist/es2015/notification.module.d.ts → notification.module.d.ts} +8 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +32 -95
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/{dist/es2015/services → services}/notification.service.d.ts +4 -1
- package/{dist/es2015/utils → utils}/animations.d.ts +0 -0
- package/dist/cdn/js/kendo-angular-notification.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/index.js +0 -10
- package/dist/es/localization/localized-messages.directive.js +0 -38
- package/dist/es/models/notification-settings.js +0 -54
- package/dist/es/models/type.js +0 -4
- package/dist/es/notification.component.js +0 -222
- package/dist/es/notification.container.component.js +0 -154
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/services/notification.service.js +0 -135
- package/dist/es/utils/animations.js +0 -41
- package/dist/es2015/index.d.ts +0 -10
- package/dist/es2015/index.js +0 -10
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/localization/localized-messages.directive.js +0 -34
- package/dist/es2015/main.js +0 -8
- package/dist/es2015/models/position.js +0 -4
- package/dist/es2015/notification.module.js +0 -53
- package/dist/fesm5/index.js +0 -677
- package/dist/npm/index.js +0 -15
- package/dist/npm/localization/localized-messages.directive.js +0 -40
- package/dist/npm/main.js +0 -15
- package/dist/npm/models/animation.js +0 -6
- package/dist/npm/models/notification-ref.js +0 -6
- package/dist/npm/models/notification-settings.js +0 -56
- package/dist/npm/models/position.js +0 -6
- package/dist/npm/models/type.js +0 -6
- package/dist/npm/notification.component.js +0 -224
- package/dist/npm/notification.container.component.js +0 -156
- package/dist/npm/notification.module.js +0 -58
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/services/notification.service.js +0 -137
- package/dist/npm/utils/animations.js +0 -47
- package/dist/systemjs/kendo-angular-notification.js +0 -5
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Component, Input, ElementRef, ComponentFactoryResolver, ViewContainerRef, Renderer2, ViewChild, TemplateRef } from '@angular/core';
|
|
7
|
-
import { NotificationComponent } from './notification.component';
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
var NotificationContainerComponent = /** @class */ (function () {
|
|
13
|
-
function NotificationContainerComponent(element, renderer, resolver) {
|
|
14
|
-
this.element = element;
|
|
15
|
-
this.renderer = renderer;
|
|
16
|
-
this.resolver = resolver;
|
|
17
|
-
this.id = '';
|
|
18
|
-
this.notifications = [];
|
|
19
|
-
}
|
|
20
|
-
NotificationContainerComponent.prototype.ngOnDestroy = function () {
|
|
21
|
-
this.notifications.forEach(function (notification) {
|
|
22
|
-
if (notification.closeClickSubscription) {
|
|
23
|
-
notification.closeClickSubscription.unsubscribe();
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
this.notifications = [];
|
|
27
|
-
};
|
|
28
|
-
NotificationContainerComponent.prototype.addNotification = function (settings) {
|
|
29
|
-
this.position = settings.position;
|
|
30
|
-
this.id = this.position.horizontal + " " + this.position.vertical;
|
|
31
|
-
var factory = this.resolver.resolveComponentFactory(NotificationComponent);
|
|
32
|
-
var notificationRef = this.container.createComponent(factory);
|
|
33
|
-
this.applySettings(notificationRef, settings);
|
|
34
|
-
var customComponent = null;
|
|
35
|
-
if (typeof settings.content === 'function') {
|
|
36
|
-
var customFactory = this.resolver.resolveComponentFactory(settings.content);
|
|
37
|
-
customComponent = notificationRef.instance.container.createComponent(customFactory);
|
|
38
|
-
}
|
|
39
|
-
notificationRef.changeDetectorRef.detectChanges();
|
|
40
|
-
this.notifications.push(notificationRef.instance);
|
|
41
|
-
if (settings.appendTo) {
|
|
42
|
-
this.applyAbsolutePosition(settings.appendTo);
|
|
43
|
-
}
|
|
44
|
-
this.applyPosition();
|
|
45
|
-
this.applyContainerWrap();
|
|
46
|
-
return {
|
|
47
|
-
afterHide: notificationRef.instance.close,
|
|
48
|
-
hide: function () { return notificationRef.instance.hide(customComponent); },
|
|
49
|
-
notification: notificationRef,
|
|
50
|
-
content: customComponent || null
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
NotificationContainerComponent.prototype.hide = function (notificationRef) {
|
|
54
|
-
var instance = notificationRef.instance;
|
|
55
|
-
var index = this.notifications.indexOf(instance);
|
|
56
|
-
this.notifications.splice(index, 1);
|
|
57
|
-
if (instance.closeClickSubscription) {
|
|
58
|
-
instance.closeClickSubscription.unsubscribe();
|
|
59
|
-
}
|
|
60
|
-
instance.templateRef = null;
|
|
61
|
-
instance.templateString = null;
|
|
62
|
-
notificationRef.destroy();
|
|
63
|
-
};
|
|
64
|
-
NotificationContainerComponent.prototype.applyContainerWrap = function () {
|
|
65
|
-
var value = this.position.horizontal === 'right' ? 'wrap-reverse' : 'wrap';
|
|
66
|
-
this.renderer.setStyle(this.group.nativeElement, 'flex-wrap', value);
|
|
67
|
-
};
|
|
68
|
-
NotificationContainerComponent.prototype.applySettings = function (notificationRef, settings) {
|
|
69
|
-
var _this = this;
|
|
70
|
-
var notification = notificationRef.instance;
|
|
71
|
-
var content = settings.content;
|
|
72
|
-
var animation = settings.animation || null;
|
|
73
|
-
notification.closeClickSubscription = notification.close
|
|
74
|
-
.subscribe(function () { return _this.hide(notificationRef); });
|
|
75
|
-
if (typeof content === 'string') {
|
|
76
|
-
notification.templateString = content;
|
|
77
|
-
}
|
|
78
|
-
if (content instanceof TemplateRef) {
|
|
79
|
-
notification.templateRef = content;
|
|
80
|
-
}
|
|
81
|
-
notification.animation = animation;
|
|
82
|
-
var type = settings.type;
|
|
83
|
-
if (type && type.style === undefined) {
|
|
84
|
-
type.style = 'none';
|
|
85
|
-
}
|
|
86
|
-
if (type && type.icon === undefined) {
|
|
87
|
-
type.icon = true;
|
|
88
|
-
}
|
|
89
|
-
notification.type = type;
|
|
90
|
-
notification.closeTitle = settings.closeTitle;
|
|
91
|
-
if (settings.cssClass) {
|
|
92
|
-
notification.cssClass = settings.cssClass;
|
|
93
|
-
}
|
|
94
|
-
notification.closable = settings.closable;
|
|
95
|
-
notification.hideAfter = settings.hideAfter;
|
|
96
|
-
notification.width = settings.width;
|
|
97
|
-
notification.height = settings.height;
|
|
98
|
-
};
|
|
99
|
-
NotificationContainerComponent.prototype.applyAbsolutePosition = function (appendToContainer) {
|
|
100
|
-
var appendTo = appendToContainer.element.nativeElement;
|
|
101
|
-
var el = this.element.nativeElement.children[0];
|
|
102
|
-
if (window.getComputedStyle(appendTo).position === 'static') {
|
|
103
|
-
this.renderer.setStyle(appendTo, 'position', 'relative');
|
|
104
|
-
}
|
|
105
|
-
this.renderer.setStyle(el, 'position', 'absolute');
|
|
106
|
-
};
|
|
107
|
-
NotificationContainerComponent.prototype.applyPosition = function () {
|
|
108
|
-
var element = this.element.nativeElement.children[0];
|
|
109
|
-
var elementHalfWidth = element.getBoundingClientRect().width / 2;
|
|
110
|
-
var positionStyles = this.setContainerPosition(this.position, elementHalfWidth);
|
|
111
|
-
Object.keys(positionStyles).forEach(function (cssStyle) {
|
|
112
|
-
element.style[cssStyle] = positionStyles[cssStyle];
|
|
113
|
-
});
|
|
114
|
-
};
|
|
115
|
-
NotificationContainerComponent.prototype.setContainerPosition = function (position, offsetMargin) {
|
|
116
|
-
var positionLayout = {
|
|
117
|
-
horizontal: {
|
|
118
|
-
left: { left: 0, alignItems: 'flex-start' },
|
|
119
|
-
right: { right: 0, alignItems: 'flex-start' },
|
|
120
|
-
center: { left: '50%', marginLeft: -offsetMargin + "px", alignItems: 'center' }
|
|
121
|
-
},
|
|
122
|
-
vertical: {
|
|
123
|
-
top: { top: 0 },
|
|
124
|
-
bottom: { bottom: 0 }
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
var horizontal = positionLayout.horizontal[position.horizontal];
|
|
128
|
-
var vertical = positionLayout.vertical[position.vertical];
|
|
129
|
-
return Object.assign({}, horizontal, vertical);
|
|
130
|
-
};
|
|
131
|
-
tslib_1.__decorate([
|
|
132
|
-
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
133
|
-
tslib_1.__metadata("design:type", ViewContainerRef)
|
|
134
|
-
], NotificationContainerComponent.prototype, "container", void 0);
|
|
135
|
-
tslib_1.__decorate([
|
|
136
|
-
ViewChild('group', { static: true }),
|
|
137
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
138
|
-
], NotificationContainerComponent.prototype, "group", void 0);
|
|
139
|
-
tslib_1.__decorate([
|
|
140
|
-
Input(),
|
|
141
|
-
tslib_1.__metadata("design:type", String)
|
|
142
|
-
], NotificationContainerComponent.prototype, "id", void 0);
|
|
143
|
-
NotificationContainerComponent = tslib_1.__decorate([
|
|
144
|
-
Component({
|
|
145
|
-
selector: 'kendo-notification-container',
|
|
146
|
-
template: "\n <div #group class=\"k-notification-group\">\n <ng-container #container></ng-container>\n </div>\n "
|
|
147
|
-
}),
|
|
148
|
-
tslib_1.__metadata("design:paramtypes", [ElementRef,
|
|
149
|
-
Renderer2,
|
|
150
|
-
ComponentFactoryResolver])
|
|
151
|
-
], NotificationContainerComponent);
|
|
152
|
-
return NotificationContainerComponent;
|
|
153
|
-
}());
|
|
154
|
-
export { NotificationContainerComponent };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export var packageMetadata = {
|
|
9
|
-
name: '@progress/kendo-angular-notification',
|
|
10
|
-
productName: 'Kendo UI for Angular',
|
|
11
|
-
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate: 1646219065,
|
|
13
|
-
version: '',
|
|
14
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
|
-
};
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Injectable, ComponentFactoryResolver, ApplicationRef, Injector, InjectionToken, ElementRef, Inject, Optional } from '@angular/core';
|
|
7
|
-
import { NotificationContainerComponent } from '../notification.container.component';
|
|
8
|
-
/**
|
|
9
|
-
* Used to inject the Notification container. If not provided, the first root component of
|
|
10
|
-
* the application is used.
|
|
11
|
-
*
|
|
12
|
-
* > The `NOTIFICATION_CONTAINER` can be used only with the [`NotificationService`]({% slug api_notification_notificationservice %}) class.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
*
|
|
16
|
-
* ```ts-no-run
|
|
17
|
-
* // Import the Notification module
|
|
18
|
-
* import { NotificationModule, NOTIFICATION_CONTAINER } from '@progress/kendo-angular-notification';
|
|
19
|
-
*
|
|
20
|
-
* // The browser platform with a compiler
|
|
21
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
22
|
-
*
|
|
23
|
-
* import { ElementRef, NgModule } from '@angular/core';
|
|
24
|
-
*
|
|
25
|
-
* // Import the app component
|
|
26
|
-
* import { AppComponent } from './app.component';
|
|
27
|
-
*
|
|
28
|
-
* // Define the app module
|
|
29
|
-
* _@NgModule({
|
|
30
|
-
* declarations: [AppComponent], // declare app component
|
|
31
|
-
* imports: [BrowserModule, NotificationModule], // import Notification module
|
|
32
|
-
* bootstrap: [AppComponent],
|
|
33
|
-
* providers: [{
|
|
34
|
-
* provide: NOTIFICATION_CONTAINER,
|
|
35
|
-
* useFactory: () => {
|
|
36
|
-
* //return the container ElementRef, where the notification will be injected
|
|
37
|
-
* return { nativeElement: document.body } as ElementRef;
|
|
38
|
-
* }
|
|
39
|
-
* }]
|
|
40
|
-
* })
|
|
41
|
-
* export class AppModule {}
|
|
42
|
-
*
|
|
43
|
-
* // Compile and launch the module
|
|
44
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
export var NOTIFICATION_CONTAINER = new InjectionToken('Notification Container');
|
|
48
|
-
/**
|
|
49
|
-
* A service for opening Notification components dynamically
|
|
50
|
-
* ([see example]({% slug overview_notification %})).
|
|
51
|
-
*
|
|
52
|
-
* @export
|
|
53
|
-
* @class NotificationService
|
|
54
|
-
*/
|
|
55
|
-
var NotificationService = /** @class */ (function () {
|
|
56
|
-
/**
|
|
57
|
-
* @hidden
|
|
58
|
-
*/
|
|
59
|
-
function NotificationService(resolver, injector, container) {
|
|
60
|
-
this.resolver = resolver;
|
|
61
|
-
this.injector = injector;
|
|
62
|
-
this.container = container;
|
|
63
|
-
this.notificationContainers = [];
|
|
64
|
-
this.position = { horizontal: 'right', vertical: 'top' };
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Opens a Notification component. Created Notification are mounted
|
|
68
|
-
* in the DOM directly in the root application component.
|
|
69
|
-
*
|
|
70
|
-
* @param {NotificationSettings} settings - The settings which define the Notification.
|
|
71
|
-
*
|
|
72
|
-
* @returns {NotificationRef} - A reference to the Notification object and the convenience properties.
|
|
73
|
-
*/
|
|
74
|
-
NotificationService.prototype.show = function (settings) {
|
|
75
|
-
if (!settings) {
|
|
76
|
-
throw new Error('NotificationSettings settings are required');
|
|
77
|
-
}
|
|
78
|
-
var target = this.findGroupContainer(settings);
|
|
79
|
-
var position = settings.position || this.position;
|
|
80
|
-
var currentId = position.horizontal + " " + position.vertical;
|
|
81
|
-
var container;
|
|
82
|
-
var notificationRef;
|
|
83
|
-
var notificationContainer = this.notificationContainers.find(function (c) { return target.nativeElement.contains(c.element.nativeElement) && c.id === currentId; });
|
|
84
|
-
if (!notificationContainer) {
|
|
85
|
-
container = this.resolver
|
|
86
|
-
.resolveComponentFactory(NotificationContainerComponent)
|
|
87
|
-
.create(this.injector);
|
|
88
|
-
notificationContainer = container.instance;
|
|
89
|
-
this.appRef.attachView(container.hostView);
|
|
90
|
-
var hostViewElement = container.location.nativeElement;
|
|
91
|
-
var groupContainer = this.findGroupContainer(settings);
|
|
92
|
-
if (!groupContainer) {
|
|
93
|
-
throw new Error("\n View Container not found! Inject the NOTIFICATION_CONTAINER or define a specific ViewContainerRef via\n the appendTo option. See http://www.telerik.com/kendo-angular-ui/components/notification/api/NOTIFICATION_CONTAINER/\n for more details.\n ");
|
|
94
|
-
}
|
|
95
|
-
groupContainer.nativeElement.appendChild(hostViewElement);
|
|
96
|
-
this.notificationContainers.push(notificationContainer);
|
|
97
|
-
}
|
|
98
|
-
settings.position = position;
|
|
99
|
-
notificationRef = notificationContainer.addNotification(settings);
|
|
100
|
-
return notificationRef;
|
|
101
|
-
};
|
|
102
|
-
Object.defineProperty(NotificationService.prototype, "appRef", {
|
|
103
|
-
get: function () {
|
|
104
|
-
if (!this.applicationRef) {
|
|
105
|
-
this.applicationRef = this.injector.get(ApplicationRef);
|
|
106
|
-
}
|
|
107
|
-
return this.applicationRef;
|
|
108
|
-
},
|
|
109
|
-
enumerable: true,
|
|
110
|
-
configurable: true
|
|
111
|
-
});
|
|
112
|
-
NotificationService.prototype.findGroupContainer = function (settings) {
|
|
113
|
-
var container;
|
|
114
|
-
if (settings.appendTo) {
|
|
115
|
-
container = settings.appendTo.element;
|
|
116
|
-
}
|
|
117
|
-
else if (this.container) {
|
|
118
|
-
container = this.container;
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
var appRoot = this.appRef.components && this.appRef.components[0];
|
|
122
|
-
container = appRoot ? appRoot.location : null;
|
|
123
|
-
}
|
|
124
|
-
return container;
|
|
125
|
-
};
|
|
126
|
-
NotificationService = tslib_1.__decorate([
|
|
127
|
-
Injectable(),
|
|
128
|
-
tslib_1.__param(2, Inject(NOTIFICATION_CONTAINER)), tslib_1.__param(2, Optional()),
|
|
129
|
-
tslib_1.__metadata("design:paramtypes", [ComponentFactoryResolver,
|
|
130
|
-
Injector,
|
|
131
|
-
ElementRef])
|
|
132
|
-
], NotificationService);
|
|
133
|
-
return NotificationService;
|
|
134
|
-
}());
|
|
135
|
-
export { NotificationService };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { style, animate } from '@angular/animations';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export function slideAnimation(height, duration) {
|
|
10
|
-
return [
|
|
11
|
-
style({ overflow: 'hidden', height: 0 }),
|
|
12
|
-
animate(duration + "ms ease-in", style({ height: height + "px" }))
|
|
13
|
-
];
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* @hidden
|
|
17
|
-
*/
|
|
18
|
-
export function slideCloseAnimation(height, duration) {
|
|
19
|
-
return [
|
|
20
|
-
style({ height: height + "px" }),
|
|
21
|
-
animate(duration + "ms ease-in", style({ overflow: 'hidden', height: 0 }))
|
|
22
|
-
];
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*/
|
|
27
|
-
export function fadeAnimation(duration) {
|
|
28
|
-
return [
|
|
29
|
-
style({ opacity: 0 }),
|
|
30
|
-
animate(duration + "ms ease-in", style({ opacity: 1 }))
|
|
31
|
-
];
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* @hidden
|
|
35
|
-
*/
|
|
36
|
-
export function fadeCloseAnimation(duration) {
|
|
37
|
-
return [
|
|
38
|
-
style({ opacity: 1 }),
|
|
39
|
-
animate(duration + "ms ease-in", style({ opacity: 0 }))
|
|
40
|
-
];
|
|
41
|
-
}
|
package/dist/es2015/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
8
|
-
export * from './main';
|
|
9
|
-
export { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
10
|
-
export { NotificationContainerComponent } from './notification.container.component';
|
package/dist/es2015/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
8
|
-
export * from './main';
|
|
9
|
-
export { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
10
|
-
export { NotificationContainerComponent } from './notification.container.component';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"Position":{"__symbolic":"interface"},"Animation":{"__symbolic":"interface"},"NotificationRef":{"__symbolic":"interface"},"Type":{"__symbolic":"interface"},"NotificationSettings":{"__symbolic":"class","members":{}},"NotificationComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":37,"character":1},"arguments":[{"selector":"kendo-notification","template":"\n <ng-container kendoNotificationLocalizedMessages\n i18n-closeTitle=\"kendo.notification.closeTitle|The title of the close button\"\n closeTitle=\"Close\"\n >\n </ng-container>\n <div class=\"k-widget k-notification {{ notificationClasses() }}\"\n [ngClass]=\"cssClass\"\n [style.height.px]=\"height\"\n [style.width.px]=\"width\">\n <div class=\"k-notification-wrap k-hstack\">\n <span *ngIf=\"type && type.icon && type.style !== 'none'\" class=\"k-icon\" [ngClass]=\"typeIconClass()\"></span>\n\n <div class=\"k-notification-content\">\n <ng-template\n [ngIf]=\"templateRef\"\n [ngTemplateOutlet]=\"templateRef\">\n </ng-template>\n <ng-template\n [ngIf]=\"templateString\">\n {{ templateString }}\n </ng-template>\n <ng-container #container></ng-container>\n </div>\n\n <a *ngIf=\"closable\" class=\"k-icon k-i-close\" [attr.title]=\"closeButtonTitle\" (click)=\"onCloseClick()\"></a>\n </div>\n </div>\n ","providers":[{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"LocalizationService","line":69,"character":4},{"provide":{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"L10N_PREFIX","line":71,"character":17},"useValue":"kendo.notification"}]}]}],"members":{"container":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":77,"character":5},"arguments":["container",{"read":{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":77,"character":36},"static":true}]}]}],"templateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":84,"character":5}}]}],"templateString":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":85,"character":5}}]}],"width":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":87,"character":5}}]}],"height":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":88,"character":5}}]}],"cssClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":90,"character":5}}]}],"hideAfter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":92,"character":5}}]}],"closable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":93,"character":5}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":94,"character":5}}]}],"animation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":96,"character":5}}]}],"direction":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":103,"character":5},"arguments":["attr.dir"]}]}],"containerClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":105,"character":5},"arguments":["class.k-notification-container"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":121,"character":20},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":122,"character":25},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":123,"character":26},{"__symbolic":"reference","module":"@angular/animations","name":"AnimationBuilder","line":124,"character":25},{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"LocalizationService","line":125,"character":37}]}],"notificationClasses":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"typeClass":[{"__symbolic":"method"}],"typeIconClass":[{"__symbolic":"method"}],"onCloseClick":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"setHideTimeout":[{"__symbolic":"method"}],"emitClose":[{"__symbolic":"method"}],"play":[{"__symbolic":"method"}],"animate":[{"__symbolic":"method"}],"slideAnimation":[{"__symbolic":"method"}],"fadeAnimation":[{"__symbolic":"method"}]}},"NotificationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":64,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":76,"character":9},"arguments":[{"__symbolic":"reference","name":"NOTIFICATION_CONTAINER"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":76,"character":41}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":74,"character":26},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":75,"character":26},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":76,"character":71}]}],"show":[{"__symbolic":"method"}],"findGroupContainer":[{"__symbolic":"method"}]}},"NOTIFICATION_CONTAINER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":55,"character":42},"arguments":["Notification Container"]},"NotificationModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":40,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"NotificationComponent"},{"__symbolic":"reference","name":"NotificationContainerComponent"},{"__symbolic":"reference","name":"LocalizedMessagesDirective"}],"entryComponents":[{"__symbolic":"reference","name":"NotificationComponent"},{"__symbolic":"reference","name":"NotificationContainerComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":43,"character":14}],"exports":[{"__symbolic":"reference","name":"NotificationComponent"},{"__symbolic":"reference","name":"NotificationContainerComponent"}],"providers":[{"__symbolic":"reference","name":"NotificationService"}]}]}],"members":{}},"NotificationContainerComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":23,"character":1},"arguments":[{"selector":"kendo-notification-container","template":"\n <div #group class=\"k-notification-group\">\n <ng-container #container></ng-container>\n </div>\n "}]}],"members":{"container":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":32,"character":5},"arguments":["container",{"read":{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":32,"character":36},"static":true}]}]}],"group":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":35,"character":5},"arguments":["group",{"static":true}]}]}],"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":44,"character":24},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":45,"character":25},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":46,"character":26}]}],"ngOnDestroy":[{"__symbolic":"method"}],"addNotification":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"applyContainerWrap":[{"__symbolic":"method"}],"applySettings":[{"__symbolic":"method"}],"applyAbsolutePosition":[{"__symbolic":"method"}],"applyPosition":[{"__symbolic":"method"}],"setContainerPosition":[{"__symbolic":"method"}]}},"LocalizedMessagesDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"ComponentMessages","line":15,"character":48},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":6,"character":1},"arguments":[{"providers":[{"provide":{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"ComponentMessages","line":9,"character":21},"useExisting":{"__symbolic":"reference","name":"LocalizedMessagesDirective"}}],"selector":"[kendoNotificationLocalizedMessages]"}]}],"members":{"closeTitle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"LocalizationService","line":21,"character":35}]}]}}},"origins":{"Position":"./models/position","Animation":"./models/animation","NotificationRef":"./models/notification-ref","Type":"./models/type","NotificationSettings":"./models/notification-settings","NotificationComponent":"./notification.component","NotificationService":"./services/notification.service","NOTIFICATION_CONTAINER":"./services/notification.service","NotificationModule":"./notification.module","NotificationContainerComponent":"./notification.container.component","LocalizedMessagesDirective":"./localization/localized-messages.directive"},"importAs":"@progress/kendo-angular-notification"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
var LocalizedMessagesDirective_1;
|
|
7
|
-
import { Directive, forwardRef, Input } from '@angular/core';
|
|
8
|
-
import { ComponentMessages, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
let LocalizedMessagesDirective = LocalizedMessagesDirective_1 = class LocalizedMessagesDirective extends ComponentMessages {
|
|
13
|
-
constructor(service) {
|
|
14
|
-
super();
|
|
15
|
-
this.service = service;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
tslib_1.__decorate([
|
|
19
|
-
Input(),
|
|
20
|
-
tslib_1.__metadata("design:type", String)
|
|
21
|
-
], LocalizedMessagesDirective.prototype, "closeTitle", void 0);
|
|
22
|
-
LocalizedMessagesDirective = LocalizedMessagesDirective_1 = tslib_1.__decorate([
|
|
23
|
-
Directive({
|
|
24
|
-
providers: [
|
|
25
|
-
{
|
|
26
|
-
provide: ComponentMessages,
|
|
27
|
-
useExisting: forwardRef(() => LocalizedMessagesDirective_1)
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
selector: `[kendoNotificationLocalizedMessages]`
|
|
31
|
-
}),
|
|
32
|
-
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
33
|
-
], LocalizedMessagesDirective);
|
|
34
|
-
export { LocalizedMessagesDirective };
|
package/dist/es2015/main.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export { NotificationSettings } from './models/notification-settings';
|
|
6
|
-
export { NotificationComponent } from './notification.component';
|
|
7
|
-
export { NotificationService, NOTIFICATION_CONTAINER } from './services/notification.service';
|
|
8
|
-
export { NotificationModule } from './notification.module';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { NgModule } from '@angular/core';
|
|
7
|
-
import { CommonModule } from '@angular/common';
|
|
8
|
-
import { NotificationService } from './services/notification.service';
|
|
9
|
-
import { NotificationComponent } from './notification.component';
|
|
10
|
-
import { NotificationContainerComponent } from './notification.container.component';
|
|
11
|
-
import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
12
|
-
/**
|
|
13
|
-
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
14
|
-
* definition for the Notification component.
|
|
15
|
-
*
|
|
16
|
-
* The package exports:
|
|
17
|
-
* - `NotificationService`—The Notification service class.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
*
|
|
21
|
-
* ```ts-no-run
|
|
22
|
-
* // Import the Notification module
|
|
23
|
-
* import { NotificationModule } from '@progress/kendo-angular-notification';
|
|
24
|
-
*
|
|
25
|
-
* // The browser platform with a compiler
|
|
26
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
27
|
-
*
|
|
28
|
-
* import { NgModule } from '@angular/core';
|
|
29
|
-
*
|
|
30
|
-
* // Import the app component
|
|
31
|
-
* _@NgModule{{
|
|
32
|
-
* declarations: [AppComponent], // declare app component
|
|
33
|
-
* imports: [BrowserModule, NotificationModule], // import NotificationModule module
|
|
34
|
-
* bootstrap: [AppComponent]
|
|
35
|
-
* }}
|
|
36
|
-
* export class AppModule {}
|
|
37
|
-
*
|
|
38
|
-
* // Compile and launch the module
|
|
39
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
let NotificationModule = class NotificationModule {
|
|
43
|
-
};
|
|
44
|
-
NotificationModule = tslib_1.__decorate([
|
|
45
|
-
NgModule({
|
|
46
|
-
declarations: [NotificationComponent, NotificationContainerComponent, LocalizedMessagesDirective],
|
|
47
|
-
entryComponents: [NotificationComponent, NotificationContainerComponent],
|
|
48
|
-
imports: [CommonModule],
|
|
49
|
-
exports: [NotificationComponent, NotificationContainerComponent],
|
|
50
|
-
providers: [NotificationService]
|
|
51
|
-
})
|
|
52
|
-
], NotificationModule);
|
|
53
|
-
export { NotificationModule };
|