@progress/kendo-angular-dialog 6.0.3-dev.202203091004 → 7.0.0-next.202203171702
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-dialog.umd.js +5 -0
- package/{dist/es2015/common → common}/actions-layout.d.ts +0 -0
- package/{dist/es2015/common → common}/preventable-event.d.ts +0 -0
- package/{dist/es2015/common → common}/util.d.ts +1 -1
- package/{dist/es2015/dialog → dialog}/dialog-actions.component.d.ts +14 -7
- package/{dist/es2015/dialog → dialog}/dialog-container.directive.d.ts +3 -0
- package/dialog/dialog-container.service.d.ts +16 -0
- package/{dist/es2015/dialog → dialog}/dialog-content-base.d.ts +4 -1
- package/{dist/es2015/dialog → dialog}/dialog-titlebar.component.d.ts +5 -2
- package/{dist/es2015/dialog → dialog}/dialog.component.d.ts +13 -6
- package/{dist/es2015/dialog → dialog}/dialog.service.d.ts +5 -1
- package/dialog/models/dialog-action.d.ts +28 -0
- package/dialog/models/dialog-close-result.d.ts +11 -0
- package/dialog/models/dialog-ref.d.ts +38 -0
- package/dialog/models/dialog-result.d.ts +14 -0
- package/{dist/es2015/dialog → dialog/models}/dialog-settings.d.ts +5 -73
- package/{dist/es/localization/dialog-localization.service.js → dialog/models/index.d.ts} +5 -5
- package/{dist/es2015/dialog.module.d.ts → dialog.module.d.ts} +11 -0
- package/{dist/es2015/dialogs.module.d.ts → dialogs.module.d.ts} +6 -0
- package/{dist/es2015 → esm2015}/common/actions-layout.js +1 -0
- package/{dist/es2015 → esm2015}/common/preventable-event.js +0 -0
- package/{dist/es2015 → esm2015}/common/util.js +0 -5
- package/esm2015/dialog/dialog-actions.component.js +115 -0
- package/esm2015/dialog/dialog-container.directive.js +30 -0
- package/esm2015/dialog/dialog-container.service.js +23 -0
- package/{dist/es2015 → esm2015}/dialog/dialog-content-base.js +18 -10
- package/esm2015/dialog/dialog-titlebar.component.js +136 -0
- package/{dist/es2015 → esm2015}/dialog/dialog.component.js +123 -113
- package/{dist/es2015 → esm2015}/dialog/dialog.service.js +16 -15
- package/{dist/es2015/window/window-container.service.d.ts → esm2015/dialog/models/dialog-action.js} +3 -5
- package/esm2015/dialog/models/dialog-close-result.js +11 -0
- package/esm2015/dialog/models/dialog-ref.js +11 -0
- package/{dist/es/common/actions-layout.js → esm2015/dialog/models/dialog-result.js} +1 -0
- package/{dist/es2015/dialog/dialog-container.service.d.ts → esm2015/dialog/models/dialog-settings.js} +3 -5
- package/esm2015/dialog/models/index.js +9 -0
- package/{dist/es2015 → esm2015}/dialog.module.js +20 -13
- package/{dist/es → esm2015}/dialogs.module.js +12 -12
- package/esm2015/kendo-angular-dialog.js +8 -0
- package/esm2015/localization/custom-messages.component.js +41 -0
- package/{dist/es2015 → esm2015}/localization/dialog-localization.service.js +0 -0
- package/esm2015/localization/localized-messages.directive.js +40 -0
- package/esm2015/localization/messages.js +28 -0
- package/esm2015/localization/titlebar-localization.service.js +44 -0
- package/{dist/es2015 → esm2015}/main.js +8 -2
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/esm2015/shared.module.js +38 -0
- package/esm2015/window/actions/window-close-action.directive.js +59 -0
- package/esm2015/window/actions/window-maximize-action.directive.js +65 -0
- package/esm2015/window/actions/window-minimize-action.directive.js +65 -0
- package/esm2015/window/actions/window-restore-action.directive.js +65 -0
- package/{dist/es2015 → esm2015}/window/drag-resize.service.js +9 -11
- package/esm2015/window/models/index.js +10 -0
- package/esm2015/window/models/window-close-result.js +9 -0
- package/{dist/es2015/window/window-events.js → esm2015/window/models/window-messages.js} +1 -0
- package/esm2015/window/models/window-options.js +5 -0
- package/{dist/es2015/window/window-settings.js → esm2015/window/models/window-ref.js} +0 -11
- package/esm2015/window/models/window-settings.js +10 -0
- package/esm2015/window/models/window-types.js +5 -0
- package/{dist/es2015 → esm2015}/window/navigation.service.js +10 -11
- package/esm2015/window/window-container.directive.js +30 -0
- package/esm2015/window/window-container.service.js +23 -0
- package/{dist/es → esm2015}/window/window-events.js +1 -0
- package/{dist/es2015 → esm2015}/window/window-resize-handle.directive.js +21 -26
- package/{dist/es2015 → esm2015}/window/window-titlebar.component.js +35 -34
- package/{dist/es2015 → esm2015}/window/window.component.js +168 -187
- package/{dist/es2015 → esm2015}/window/window.service.js +15 -14
- package/{dist/es2015 → esm2015}/window.module.js +29 -17
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-dialog.js} +1023 -926
- package/{dist/es2015/shared.module.d.ts → kendo-angular-dialog.d.ts} +3 -7
- package/{dist/es2015/localization → localization}/custom-messages.component.d.ts +4 -1
- package/{dist/es2015/localization → localization}/dialog-localization.service.d.ts +0 -0
- package/{dist/es2015/localization → localization}/localized-messages.directive.d.ts +3 -0
- package/{dist/es2015/localization → localization}/messages.d.ts +3 -0
- package/{dist/es2015/localization → localization}/titlebar-localization.service.d.ts +3 -0
- package/{dist/es2015/main.d.ts → main.d.ts} +7 -2
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +33 -105
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/shared.module.d.ts +21 -0
- package/{dist/es2015/window → window}/actions/window-close-action.directive.d.ts +3 -0
- package/{dist/es2015/window → window}/actions/window-maximize-action.directive.d.ts +4 -1
- package/{dist/es2015/window → window}/actions/window-minimize-action.directive.d.ts +4 -1
- package/{dist/es2015/window → window}/actions/window-restore-action.directive.d.ts +4 -1
- package/{dist/es2015/window → window}/drag-resize.service.d.ts +8 -4
- package/window/models/index.d.ts +10 -0
- package/window/models/window-close-result.d.ts +9 -0
- package/window/models/window-messages.d.ts +26 -0
- package/window/models/window-options.d.ts +20 -0
- package/window/models/window-ref.d.ts +40 -0
- package/{dist/es2015/window → window/models}/window-settings.d.ts +4 -84
- package/window/models/window-types.d.ts +11 -0
- package/{dist/es2015/window → window}/navigation.service.d.ts +4 -1
- package/{dist/es2015/window → window}/window-container.directive.d.ts +3 -0
- package/window/window-container.service.d.ts +16 -0
- package/{dist/es2015/window → window}/window-events.d.ts +0 -0
- package/{dist/es2015/window → window}/window-resize-handle.directive.d.ts +4 -1
- package/{dist/es2015/window → window}/window-titlebar.component.d.ts +6 -3
- package/{dist/es2015/window → window}/window.component.d.ts +42 -25
- package/{dist/es2015/window → window}/window.service.d.ts +5 -1
- package/window.module.d.ts +45 -0
- package/dist/cdn/js/kendo-angular-dialog.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/common/preventable-event.js +0 -29
- package/dist/es/common/util.js +0 -214
- package/dist/es/dialog/dialog-actions.component.js +0 -89
- package/dist/es/dialog/dialog-container.directive.js +0 -31
- package/dist/es/dialog/dialog-container.service.js +0 -31
- package/dist/es/dialog/dialog-content-base.js +0 -45
- package/dist/es/dialog/dialog-settings.js +0 -46
- package/dist/es/dialog/dialog-titlebar.component.js +0 -94
- package/dist/es/dialog/dialog.component.js +0 -462
- package/dist/es/dialog/dialog.service.js +0 -214
- package/dist/es/dialog.module.js +0 -56
- package/dist/es/index.js +0 -22
- package/dist/es/localization/custom-messages.component.js +0 -44
- package/dist/es/localization/localized-messages.directive.js +0 -35
- package/dist/es/localization/messages.js +0 -34
- package/dist/es/localization/titlebar-localization.service.js +0 -34
- package/dist/es/main.js +0 -21
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/shared.module.js +0 -34
- package/dist/es/window/actions/window-close-action.directive.js +0 -63
- package/dist/es/window/actions/window-maximize-action.directive.js +0 -75
- package/dist/es/window/actions/window-minimize-action.directive.js +0 -75
- package/dist/es/window/actions/window-restore-action.directive.js +0 -75
- package/dist/es/window/drag-resize.service.js +0 -351
- package/dist/es/window/navigation.service.js +0 -155
- package/dist/es/window/window-container.directive.js +0 -31
- package/dist/es/window/window-container.service.js +0 -31
- package/dist/es/window/window-resize-handle.directive.js +0 -78
- package/dist/es/window/window-settings.js +0 -34
- package/dist/es/window/window-titlebar.component.js +0 -144
- package/dist/es/window/window.component.js +0 -808
- package/dist/es/window/window.service.js +0 -214
- package/dist/es/window.module.js +0 -76
- package/dist/es2015/dialog/dialog-actions.component.js +0 -98
- package/dist/es2015/dialog/dialog-container.directive.js +0 -30
- package/dist/es2015/dialog/dialog-container.service.js +0 -23
- package/dist/es2015/dialog/dialog-settings.js +0 -30
- package/dist/es2015/dialog/dialog-titlebar.component.js +0 -106
- package/dist/es2015/dialogs.module.js +0 -41
- package/dist/es2015/index.d.ts +0 -22
- package/dist/es2015/index.js +0 -22
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/localization/custom-messages.component.js +0 -36
- package/dist/es2015/localization/localized-messages.directive.js +0 -35
- package/dist/es2015/localization/messages.js +0 -28
- package/dist/es2015/localization/titlebar-localization.service.js +0 -31
- package/dist/es2015/shared.module.js +0 -31
- package/dist/es2015/window/actions/window-close-action.directive.js +0 -60
- package/dist/es2015/window/actions/window-maximize-action.directive.js +0 -68
- package/dist/es2015/window/actions/window-minimize-action.directive.js +0 -68
- package/dist/es2015/window/actions/window-restore-action.directive.js +0 -68
- package/dist/es2015/window/window-container.directive.js +0 -30
- package/dist/es2015/window/window-container.service.js +0 -23
- package/dist/es2015/window.module.d.ts +0 -28
- package/dist/fesm5/index.js +0 -3474
- package/dist/npm/common/actions-layout.js +0 -6
- package/dist/npm/common/preventable-event.js +0 -31
- package/dist/npm/common/util.js +0 -219
- package/dist/npm/dialog/dialog-actions.component.js +0 -91
- package/dist/npm/dialog/dialog-container.directive.js +0 -33
- package/dist/npm/dialog/dialog-container.service.js +0 -33
- package/dist/npm/dialog/dialog-content-base.js +0 -47
- package/dist/npm/dialog/dialog-settings.js +0 -48
- package/dist/npm/dialog/dialog-titlebar.component.js +0 -96
- package/dist/npm/dialog/dialog.component.js +0 -464
- package/dist/npm/dialog/dialog.service.js +0 -216
- package/dist/npm/dialog.module.js +0 -58
- package/dist/npm/dialogs.module.js +0 -46
- package/dist/npm/index.js +0 -40
- package/dist/npm/localization/custom-messages.component.js +0 -46
- package/dist/npm/localization/dialog-localization.service.js +0 -11
- package/dist/npm/localization/localized-messages.directive.js +0 -37
- package/dist/npm/localization/messages.js +0 -36
- package/dist/npm/localization/titlebar-localization.service.js +0 -36
- package/dist/npm/main.js +0 -45
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/shared.module.js +0 -36
- package/dist/npm/window/actions/window-close-action.directive.js +0 -65
- package/dist/npm/window/actions/window-maximize-action.directive.js +0 -77
- package/dist/npm/window/actions/window-minimize-action.directive.js +0 -77
- package/dist/npm/window/actions/window-restore-action.directive.js +0 -77
- package/dist/npm/window/drag-resize.service.js +0 -353
- package/dist/npm/window/navigation.service.js +0 -157
- package/dist/npm/window/window-container.directive.js +0 -33
- package/dist/npm/window/window-container.service.js +0 -33
- package/dist/npm/window/window-events.js +0 -6
- package/dist/npm/window/window-resize-handle.directive.js +0 -80
- package/dist/npm/window/window-settings.js +0 -36
- package/dist/npm/window/window-titlebar.component.js +0 -146
- package/dist/npm/window/window.component.js +0 -810
- package/dist/npm/window/window.service.js +0 -216
- package/dist/npm/window.module.js +0 -78
- package/dist/systemjs/kendo-angular-dialog.js +0 -5
|
@@ -1,214 +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
|
-
// tslint:disable:max-line-length
|
|
7
|
-
import { Subject, merge } from 'rxjs';
|
|
8
|
-
import { take, filter, share, map } from 'rxjs/operators';
|
|
9
|
-
import { Injectable, ComponentFactoryResolver, Renderer2, TemplateRef, isDevMode, Inject } from '@angular/core';
|
|
10
|
-
import { DialogComponent } from './dialog.component';
|
|
11
|
-
import { DialogContainerService } from './dialog-container.service';
|
|
12
|
-
import { DialogCloseResult, DialogRef } from './dialog-settings';
|
|
13
|
-
import { DialogContentBase } from './dialog-content-base';
|
|
14
|
-
import { PreventableEvent } from '../common/preventable-event';
|
|
15
|
-
import { isString } from '../common/util';
|
|
16
|
-
var isNotComponent = function (component) { return isString(component) || component instanceof TemplateRef; };
|
|
17
|
-
var ɵ0 = isNotComponent;
|
|
18
|
-
var DialogInjector = /** @class */ (function () {
|
|
19
|
-
function DialogInjector(getDialogRef, parentInjector) {
|
|
20
|
-
this.getDialogRef = getDialogRef;
|
|
21
|
-
this.parentInjector = parentInjector;
|
|
22
|
-
}
|
|
23
|
-
DialogInjector.prototype.get = function (token, notFoundValue) {
|
|
24
|
-
if (token === DialogRef) {
|
|
25
|
-
return this.getDialogRef();
|
|
26
|
-
}
|
|
27
|
-
return this.parentInjector.get(token, notFoundValue);
|
|
28
|
-
};
|
|
29
|
-
return DialogInjector;
|
|
30
|
-
}());
|
|
31
|
-
/**
|
|
32
|
-
* A service for opening Dialog windows dynamically
|
|
33
|
-
* ([see example]({% slug service_dialog %})).
|
|
34
|
-
*/
|
|
35
|
-
var DialogService = /** @class */ (function () {
|
|
36
|
-
function DialogService(
|
|
37
|
-
/**
|
|
38
|
-
* @hidden
|
|
39
|
-
*/
|
|
40
|
-
resolver, containerService) {
|
|
41
|
-
this.resolver = resolver;
|
|
42
|
-
this.containerService = containerService;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Opens a Dialog window. Requires an element in the application that uses the
|
|
46
|
-
* [`kendoDialogContainer`]({% slug api_dialog_dialogcontainerdirective %}) directive.
|
|
47
|
-
* Created Dialogs will be mounted in the DOM directly after that element.
|
|
48
|
-
*
|
|
49
|
-
* @param {DialogAction} options - The options that define the Dialog.
|
|
50
|
-
* @returns {DialogRef} - A reference to the Dialog object and the convenience properties.
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
*
|
|
54
|
-
* ```ts-no-run
|
|
55
|
-
* _@Component({
|
|
56
|
-
* selector: 'my-app',
|
|
57
|
-
* template: `
|
|
58
|
-
* <button kendoButton (click)="open()">Harmless button</button>
|
|
59
|
-
* <div kendoDialogContainer></div>
|
|
60
|
-
* `
|
|
61
|
-
* })
|
|
62
|
-
* export class AppComponent {
|
|
63
|
-
* constructor( private dialogService: DialogService ) {}
|
|
64
|
-
*
|
|
65
|
-
* public open() {
|
|
66
|
-
* var dialog = this.dialogService.open({
|
|
67
|
-
* title: "Please confirm",
|
|
68
|
-
* content: "Are you sure?",
|
|
69
|
-
* actions: [
|
|
70
|
-
* { text: "No" },
|
|
71
|
-
* { text: "Yes", themeColor: 'primary' }
|
|
72
|
-
* ]
|
|
73
|
-
* });
|
|
74
|
-
*
|
|
75
|
-
* dialog.result.subscribe((result) => {
|
|
76
|
-
* if (result instanceof DialogCloseResult) {
|
|
77
|
-
* console.log("close");
|
|
78
|
-
* } else {
|
|
79
|
-
* console.log("action", result);
|
|
80
|
-
* }
|
|
81
|
-
* });
|
|
82
|
-
* }
|
|
83
|
-
* }
|
|
84
|
-
* ```
|
|
85
|
-
*
|
|
86
|
-
*/
|
|
87
|
-
DialogService.prototype.open = function (options) {
|
|
88
|
-
var factory = this.resolver.resolveComponentFactory(DialogComponent);
|
|
89
|
-
var container = options.appendTo || this.containerService.container;
|
|
90
|
-
if (!container) {
|
|
91
|
-
throw new Error("\nCannot attach dialog to the page.\nAdd an element that uses the kendoDialogContainer directive, or set the 'appendTo' property.\nSee https://www.telerik.com/kendo-angular-ui/components/dialogs/dialog/service/.\n ");
|
|
92
|
-
}
|
|
93
|
-
// create DialogRef to (1) pass as result, (2) provide through injector
|
|
94
|
-
var dialogRef = {
|
|
95
|
-
close: function () {
|
|
96
|
-
/* noop */
|
|
97
|
-
},
|
|
98
|
-
content: null,
|
|
99
|
-
dialog: null,
|
|
100
|
-
result: null
|
|
101
|
-
};
|
|
102
|
-
return this.initializeDialog(options.content, factory, container, dialogRef, options);
|
|
103
|
-
};
|
|
104
|
-
DialogService.prototype.initializeDialog = function (component, factory, container, dialogRef, options) {
|
|
105
|
-
var content = this.contentFrom(component, container, dialogRef);
|
|
106
|
-
var dialog = container.createComponent(factory, undefined, undefined, content.nodes);
|
|
107
|
-
dialogRef.dialog = dialog;
|
|
108
|
-
dialog.changeDetectorRef.markForCheck();
|
|
109
|
-
// copy @Input options to dialog instance
|
|
110
|
-
this.applyOptions(dialog.instance, options);
|
|
111
|
-
// create close handler and result stream
|
|
112
|
-
var apiClose = new Subject();
|
|
113
|
-
var close = function (e) {
|
|
114
|
-
if (e instanceof PreventableEvent) {
|
|
115
|
-
e = new DialogCloseResult();
|
|
116
|
-
}
|
|
117
|
-
apiClose.next(e || new DialogCloseResult());
|
|
118
|
-
if (content.componentRef) {
|
|
119
|
-
content.componentRef.destroy();
|
|
120
|
-
}
|
|
121
|
-
dialog.destroy();
|
|
122
|
-
};
|
|
123
|
-
var result = merge(apiClose,
|
|
124
|
-
// triggered when the titlebar or actions are defined in DialogSettings
|
|
125
|
-
merge(dialog.instance.close, dialog.instance.action).pipe(map(function (e) { return (e instanceof PreventableEvent ? new DialogCloseResult() : e); }), filter(function (e) {
|
|
126
|
-
if (options.preventAction) {
|
|
127
|
-
// add dialogRef only when using component
|
|
128
|
-
var dialogRefParameter = isNotComponent(component) ? undefined : dialogRef;
|
|
129
|
-
return !options.preventAction(e, dialogRefParameter);
|
|
130
|
-
}
|
|
131
|
-
return true;
|
|
132
|
-
}))).pipe(take(1),
|
|
133
|
-
// Takes care for multiple subscriptions:
|
|
134
|
-
// We subscribe internaly and the user may subscribe to get a close result - dialog.result.subscribe().
|
|
135
|
-
// This causes multiple subscriptions to the same source and thus multiple emissions. share() solves that.
|
|
136
|
-
share());
|
|
137
|
-
result.subscribe(close);
|
|
138
|
-
dialogRef.close = close;
|
|
139
|
-
dialogRef.result = result;
|
|
140
|
-
if (component && isDevMode()) {
|
|
141
|
-
var hasContentTitle = content.nodes[0] && content.nodes[0].length > 0;
|
|
142
|
-
var hasContentActions = content.nodes[2] && content.nodes[2].length > 0;
|
|
143
|
-
var multipleTitles = options.title && hasContentTitle;
|
|
144
|
-
var multipleActions = options.actions && hasContentActions;
|
|
145
|
-
if (component.prototype instanceof DialogContentBase) {
|
|
146
|
-
// content component extends DialogContentBase
|
|
147
|
-
if (multipleTitles || multipleActions) {
|
|
148
|
-
console.warn("\n Multiple Title and/or Actions configurations detected.\n When using a component as content, provide the title and actions either in the component's markup\n or via the title and actions properties of the DialogSettings object, but not both.\n See https://www.telerik.com/kendo-angular-ui/components/dialogs/dialog/service/#toc-passing-title-content-and-actions-as-a-single-component'");
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
if (hasContentTitle || hasContentActions) {
|
|
153
|
-
console.warn("\n When Title and/or Actions markup is provided in content component's template,\n the component needs to inherit the DialogContentBase class to ensure that close and result events are properly hooked.\n See https://www.telerik.com/kendo-angular-ui/components/dialogs/dialog/service/#toc-passing-title-content-and-actions-as-a-single-component'");
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
return dialogRef;
|
|
158
|
-
};
|
|
159
|
-
DialogService.prototype.applyOptions = function (instance, options) {
|
|
160
|
-
instance.title = options.title;
|
|
161
|
-
instance.actions = options.actions;
|
|
162
|
-
instance.actionsLayout = options.actionsLayout || 'stretched';
|
|
163
|
-
instance.width = options.width;
|
|
164
|
-
instance.minWidth = options.minWidth;
|
|
165
|
-
instance.maxWidth = options.maxWidth;
|
|
166
|
-
instance.height = options.height;
|
|
167
|
-
instance.minHeight = options.minHeight;
|
|
168
|
-
instance.maxHeight = options.maxHeight;
|
|
169
|
-
instance.autoFocusedElement = options.autoFocusedElement;
|
|
170
|
-
instance.closeTitle = options.closeTitle;
|
|
171
|
-
instance.cssClass = options.cssClass;
|
|
172
|
-
instance.htmlAttributes = options.htmlAttributes;
|
|
173
|
-
if (options.content instanceof TemplateRef) {
|
|
174
|
-
instance.contentTemplate = options.content;
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
DialogService.prototype.contentFrom = function (content, container, dialogRef) {
|
|
178
|
-
var renderer = container.injector.get(Renderer2);
|
|
179
|
-
var nodes = [];
|
|
180
|
-
var titleNodes = [];
|
|
181
|
-
var actionNodes = [];
|
|
182
|
-
var componentRef = null;
|
|
183
|
-
if (typeof content === 'string') {
|
|
184
|
-
nodes = [renderer.createText(content)];
|
|
185
|
-
}
|
|
186
|
-
else if (content && !(content instanceof TemplateRef)) {
|
|
187
|
-
// Component
|
|
188
|
-
var injector = new DialogInjector(function () { return dialogRef; }, container.injector);
|
|
189
|
-
var factory = this.resolver.resolveComponentFactory(content);
|
|
190
|
-
componentRef = container.createComponent(factory, undefined, injector);
|
|
191
|
-
titleNodes = Array.from(componentRef.location.nativeElement.querySelectorAll('kendo-dialog-titlebar'));
|
|
192
|
-
nodes = [componentRef.location.nativeElement];
|
|
193
|
-
actionNodes = Array.from(componentRef.location.nativeElement.querySelectorAll('kendo-dialog-actions'));
|
|
194
|
-
dialogRef.content = componentRef;
|
|
195
|
-
}
|
|
196
|
-
return {
|
|
197
|
-
componentRef: componentRef,
|
|
198
|
-
nodes: [
|
|
199
|
-
titleNodes,
|
|
200
|
-
nodes,
|
|
201
|
-
actionNodes // <ng-content select="kendo-dialog-actions">
|
|
202
|
-
]
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
|
-
DialogService = tslib_1.__decorate([
|
|
206
|
-
Injectable(),
|
|
207
|
-
tslib_1.__param(1, Inject(DialogContainerService)),
|
|
208
|
-
tslib_1.__metadata("design:paramtypes", [ComponentFactoryResolver,
|
|
209
|
-
DialogContainerService])
|
|
210
|
-
], DialogService);
|
|
211
|
-
return DialogService;
|
|
212
|
-
}());
|
|
213
|
-
export { DialogService };
|
|
214
|
-
export { ɵ0 };
|
package/dist/es/dialog.module.js
DELETED
|
@@ -1,56 +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 { DialogComponent } from './dialog/dialog.component';
|
|
8
|
-
import { DialogTitleBarComponent } from './dialog/dialog-titlebar.component';
|
|
9
|
-
import { DialogService } from './dialog/dialog.service';
|
|
10
|
-
import { DialogContainerDirective } from './dialog/dialog-container.directive';
|
|
11
|
-
import { DialogContainerService } from './dialog/dialog-container.service';
|
|
12
|
-
import { SharedModule, SHARED_DIRECTIVES } from './shared.module';
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
export var DIALOG_DIRECTIVES = [
|
|
17
|
-
DialogComponent,
|
|
18
|
-
DialogTitleBarComponent
|
|
19
|
-
];
|
|
20
|
-
/**
|
|
21
|
-
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
22
|
-
* definition for the Dialog component that includes all Dialog components and directives.
|
|
23
|
-
* Imports `DialogModule` into the [root module]({{ site.data.urls.angular['ngmodules'] }}#angular-modularity)
|
|
24
|
-
* of your application or into any other sub-module that will use the Dialog component.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts-no-run
|
|
28
|
-
* import { NgModule } from '@angular/core';
|
|
29
|
-
* import { BrowserModule } from '@angular/platform-browser';
|
|
30
|
-
* import { DialogModule } from '@progress/kendo-angular-dialog';
|
|
31
|
-
* import { AppComponent } from './app.component';
|
|
32
|
-
*
|
|
33
|
-
* _@NgModule({
|
|
34
|
-
* bootstrap: [AppComponent],
|
|
35
|
-
* declarations: [AppComponent],
|
|
36
|
-
* imports: [BrowserModule, DialogModule]
|
|
37
|
-
* })
|
|
38
|
-
* export class AppModule {
|
|
39
|
-
* }
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
var DialogModule = /** @class */ (function () {
|
|
43
|
-
function DialogModule() {
|
|
44
|
-
}
|
|
45
|
-
DialogModule = tslib_1.__decorate([
|
|
46
|
-
NgModule({
|
|
47
|
-
declarations: [DIALOG_DIRECTIVES, DialogContainerDirective],
|
|
48
|
-
entryComponents: [DIALOG_DIRECTIVES],
|
|
49
|
-
exports: [DIALOG_DIRECTIVES, SHARED_DIRECTIVES, DialogContainerDirective],
|
|
50
|
-
imports: [SharedModule],
|
|
51
|
-
providers: [DialogContainerService, DialogService]
|
|
52
|
-
})
|
|
53
|
-
], DialogModule);
|
|
54
|
-
return DialogModule;
|
|
55
|
-
}());
|
|
56
|
-
export { DialogModule };
|
package/dist/es/index.js
DELETED
|
@@ -1,22 +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 { DIALOG_DIRECTIVES } from './dialog.module';
|
|
10
|
-
export { DialogContainerDirective } from './dialog/dialog-container.directive';
|
|
11
|
-
export { DialogContainerService } from './dialog/dialog-container.service';
|
|
12
|
-
export { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
13
|
-
export { DIALOG_LOCALIZATION_SERVICE } from './localization/dialog-localization.service';
|
|
14
|
-
export { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
15
|
-
export { Messages } from './localization/messages';
|
|
16
|
-
export { TitleBarLocalizationService } from './localization/titlebar-localization.service';
|
|
17
|
-
export { SHARED_DIRECTIVES, SharedModule } from './shared.module';
|
|
18
|
-
export { DragResizeService } from './window/drag-resize.service';
|
|
19
|
-
export { NavigationService } from './window/navigation.service';
|
|
20
|
-
export { WindowContainerDirective } from './window/window-container.directive';
|
|
21
|
-
export { WindowContainerService } from './window/window-container.service';
|
|
22
|
-
export { ResizeHandleDirective } from './window/window-resize-handle.directive';
|
|
@@ -1,44 +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, forwardRef } from '@angular/core';
|
|
7
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
-
import { Messages } from './messages';
|
|
9
|
-
/**
|
|
10
|
-
* Custom component messages override default component messages
|
|
11
|
-
* ([see example]({% slug globalization_dialogs %}#toc-localization)).
|
|
12
|
-
*/
|
|
13
|
-
var CustomMessagesComponent = /** @class */ (function (_super) {
|
|
14
|
-
tslib_1.__extends(CustomMessagesComponent, _super);
|
|
15
|
-
function CustomMessagesComponent(service) {
|
|
16
|
-
var _this = _super.call(this) || this;
|
|
17
|
-
_this.service = service;
|
|
18
|
-
return _this;
|
|
19
|
-
}
|
|
20
|
-
CustomMessagesComponent_1 = CustomMessagesComponent;
|
|
21
|
-
Object.defineProperty(CustomMessagesComponent.prototype, "override", {
|
|
22
|
-
get: function () {
|
|
23
|
-
return true;
|
|
24
|
-
},
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true
|
|
27
|
-
});
|
|
28
|
-
var CustomMessagesComponent_1;
|
|
29
|
-
CustomMessagesComponent = CustomMessagesComponent_1 = tslib_1.__decorate([
|
|
30
|
-
Component({
|
|
31
|
-
providers: [
|
|
32
|
-
{
|
|
33
|
-
provide: Messages,
|
|
34
|
-
useExisting: forwardRef(function () { return CustomMessagesComponent_1; }) // tslint:disable-line:no-forward-ref
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
selector: 'kendo-dialog-messages, kendo-window-messages',
|
|
38
|
-
template: ""
|
|
39
|
-
}),
|
|
40
|
-
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
41
|
-
], CustomMessagesComponent);
|
|
42
|
-
return CustomMessagesComponent;
|
|
43
|
-
}(Messages));
|
|
44
|
-
export { CustomMessagesComponent };
|
|
@@ -1,35 +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 { Directive, forwardRef } from '@angular/core';
|
|
7
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
-
import { Messages } from './messages';
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
var LocalizedMessagesDirective = /** @class */ (function (_super) {
|
|
13
|
-
tslib_1.__extends(LocalizedMessagesDirective, _super);
|
|
14
|
-
function LocalizedMessagesDirective(service) {
|
|
15
|
-
var _this = _super.call(this) || this;
|
|
16
|
-
_this.service = service;
|
|
17
|
-
return _this;
|
|
18
|
-
}
|
|
19
|
-
LocalizedMessagesDirective_1 = LocalizedMessagesDirective;
|
|
20
|
-
var LocalizedMessagesDirective_1;
|
|
21
|
-
LocalizedMessagesDirective = LocalizedMessagesDirective_1 = tslib_1.__decorate([
|
|
22
|
-
Directive({
|
|
23
|
-
providers: [
|
|
24
|
-
{
|
|
25
|
-
provide: Messages,
|
|
26
|
-
useExisting: forwardRef(function () { return LocalizedMessagesDirective_1; })
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
selector: "\n [kendoDialogLocalizedMessages],\n [kendoWindowLocalizedMessages],\n [kendoDialogTitleBarLocalizedMessages]\n "
|
|
30
|
-
}),
|
|
31
|
-
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
32
|
-
], LocalizedMessagesDirective);
|
|
33
|
-
return LocalizedMessagesDirective;
|
|
34
|
-
}(Messages));
|
|
35
|
-
export { LocalizedMessagesDirective };
|
|
@@ -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
|
-
import { Input } from '@angular/core';
|
|
7
|
-
import { ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
var Messages = /** @class */ (function (_super) {
|
|
12
|
-
tslib_1.__extends(Messages, _super);
|
|
13
|
-
function Messages() {
|
|
14
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
15
|
-
}
|
|
16
|
-
tslib_1.__decorate([
|
|
17
|
-
Input(),
|
|
18
|
-
tslib_1.__metadata("design:type", String)
|
|
19
|
-
], Messages.prototype, "closeTitle", void 0);
|
|
20
|
-
tslib_1.__decorate([
|
|
21
|
-
Input(),
|
|
22
|
-
tslib_1.__metadata("design:type", String)
|
|
23
|
-
], Messages.prototype, "restoreTitle", void 0);
|
|
24
|
-
tslib_1.__decorate([
|
|
25
|
-
Input(),
|
|
26
|
-
tslib_1.__metadata("design:type", String)
|
|
27
|
-
], Messages.prototype, "maximizeTitle", void 0);
|
|
28
|
-
tslib_1.__decorate([
|
|
29
|
-
Input(),
|
|
30
|
-
tslib_1.__metadata("design:type", String)
|
|
31
|
-
], Messages.prototype, "minimizeTitle", void 0);
|
|
32
|
-
return Messages;
|
|
33
|
-
}(ComponentMessages));
|
|
34
|
-
export { Messages };
|
|
@@ -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
|
-
import { LocalizationService, L10N_PREFIX, MessageService, RTL } from "@progress/kendo-angular-l10n";
|
|
7
|
-
import { Inject, Optional } from "@angular/core";
|
|
8
|
-
import { DIALOG_LOCALIZATION_SERVICE } from './dialog-localization.service';
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
var TitleBarLocalizationService = /** @class */ (function (_super) {
|
|
13
|
-
tslib_1.__extends(TitleBarLocalizationService, _super);
|
|
14
|
-
function TitleBarLocalizationService(prefix, messageService, rtl, dialogLocalization) {
|
|
15
|
-
var _this = _super.call(this, prefix, messageService, rtl) || this;
|
|
16
|
-
_this.dialogLocalization = dialogLocalization;
|
|
17
|
-
return _this;
|
|
18
|
-
}
|
|
19
|
-
TitleBarLocalizationService.prototype.get = function (shortKey) {
|
|
20
|
-
if (this.dialogLocalization) {
|
|
21
|
-
return this.dialogLocalization.get(shortKey);
|
|
22
|
-
}
|
|
23
|
-
return _super.prototype.get.call(this, shortKey);
|
|
24
|
-
};
|
|
25
|
-
TitleBarLocalizationService = tslib_1.__decorate([
|
|
26
|
-
tslib_1.__param(0, Inject(L10N_PREFIX)),
|
|
27
|
-
tslib_1.__param(1, Optional()),
|
|
28
|
-
tslib_1.__param(2, Optional()), tslib_1.__param(2, Inject(RTL)),
|
|
29
|
-
tslib_1.__param(3, Optional()), tslib_1.__param(3, Inject(DIALOG_LOCALIZATION_SERVICE)),
|
|
30
|
-
tslib_1.__metadata("design:paramtypes", [String, MessageService, Boolean, LocalizationService])
|
|
31
|
-
], TitleBarLocalizationService);
|
|
32
|
-
return TitleBarLocalizationService;
|
|
33
|
-
}(LocalizationService));
|
|
34
|
-
export { TitleBarLocalizationService };
|
package/dist/es/main.js
DELETED
|
@@ -1,21 +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 { DialogComponent } from './dialog/dialog.component';
|
|
6
|
-
export { DialogTitleBarComponent } from './dialog/dialog-titlebar.component';
|
|
7
|
-
export { DialogContentBase } from './dialog/dialog-content-base';
|
|
8
|
-
export { DialogActionsComponent } from './dialog/dialog-actions.component';
|
|
9
|
-
export { DialogService } from './dialog/dialog.service';
|
|
10
|
-
export { DialogCloseResult, DialogRef, DialogSettings, DialogAction } from './dialog/dialog-settings';
|
|
11
|
-
export { WindowComponent } from './window/window.component';
|
|
12
|
-
export { WindowTitleBarComponent } from './window/window-titlebar.component';
|
|
13
|
-
export { WindowMaximizeActionDirective } from './window/actions/window-maximize-action.directive';
|
|
14
|
-
export { WindowMinimizeActionDirective } from './window/actions/window-minimize-action.directive';
|
|
15
|
-
export { WindowCloseActionDirective } from './window/actions/window-close-action.directive';
|
|
16
|
-
export { WindowRestoreActionDirective } from './window/actions/window-restore-action.directive';
|
|
17
|
-
export { WindowSettings, WindowRef, WindowCloseResult } from './window/window-settings';
|
|
18
|
-
export { WindowService } from './window/window.service';
|
|
19
|
-
export { DialogModule } from './dialog.module';
|
|
20
|
-
export { WindowModule } from './window.module';
|
|
21
|
-
export { DialogsModule } from './dialogs.module';
|
|
@@ -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-dialog',
|
|
10
|
-
productName: 'Kendo UI for Angular',
|
|
11
|
-
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate: 1646820184,
|
|
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
|
-
};
|
package/dist/es/shared.module.js
DELETED
|
@@ -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
|
-
import { NgModule } from '@angular/core';
|
|
7
|
-
import { CommonModule } from '@angular/common';
|
|
8
|
-
import { DialogActionsComponent } from './dialog/dialog-actions.component';
|
|
9
|
-
import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
10
|
-
import { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
11
|
-
/**
|
|
12
|
-
* @hidden
|
|
13
|
-
*/
|
|
14
|
-
export var SHARED_DIRECTIVES = [
|
|
15
|
-
DialogActionsComponent,
|
|
16
|
-
CustomMessagesComponent,
|
|
17
|
-
LocalizedMessagesDirective
|
|
18
|
-
];
|
|
19
|
-
/**
|
|
20
|
-
* @hidden
|
|
21
|
-
*/
|
|
22
|
-
var SharedModule = /** @class */ (function () {
|
|
23
|
-
function SharedModule() {
|
|
24
|
-
}
|
|
25
|
-
SharedModule = tslib_1.__decorate([
|
|
26
|
-
NgModule({
|
|
27
|
-
declarations: [SHARED_DIRECTIVES],
|
|
28
|
-
exports: [SHARED_DIRECTIVES, CommonModule],
|
|
29
|
-
imports: [CommonModule]
|
|
30
|
-
})
|
|
31
|
-
], SharedModule);
|
|
32
|
-
return SharedModule;
|
|
33
|
-
}());
|
|
34
|
-
export { SharedModule };
|
|
@@ -1,63 +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 { Directive, ElementRef, HostBinding, HostListener, Input, Optional, NgZone, Renderer2 } from "@angular/core";
|
|
7
|
-
import { DragResizeService } from '../drag-resize.service';
|
|
8
|
-
import { Button } from '@progress/kendo-angular-buttons';
|
|
9
|
-
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
10
|
-
var WindowCloseActionDirective = /** @class */ (function (_super) {
|
|
11
|
-
tslib_1.__extends(WindowCloseActionDirective, _super);
|
|
12
|
-
function WindowCloseActionDirective(el, renderer, _service, localization, ngZone) {
|
|
13
|
-
var _this = _super.call(this, el, renderer, null, localization, ngZone) || this;
|
|
14
|
-
_this.buttonType = 'button';
|
|
15
|
-
_this.window = _service;
|
|
16
|
-
_this.fillMode = 'flat';
|
|
17
|
-
_this.icon = 'close';
|
|
18
|
-
return _this;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* @hidden
|
|
22
|
-
*/
|
|
23
|
-
WindowCloseActionDirective.prototype.onClick = function () {
|
|
24
|
-
if (!this.isDisabled) {
|
|
25
|
-
this.window.closeAction();
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
tslib_1.__decorate([
|
|
29
|
-
Input(),
|
|
30
|
-
tslib_1.__metadata("design:type", Object)
|
|
31
|
-
], WindowCloseActionDirective.prototype, "window", void 0);
|
|
32
|
-
tslib_1.__decorate([
|
|
33
|
-
HostBinding('attr.type'),
|
|
34
|
-
tslib_1.__metadata("design:type", String)
|
|
35
|
-
], WindowCloseActionDirective.prototype, "buttonType", void 0);
|
|
36
|
-
tslib_1.__decorate([
|
|
37
|
-
HostListener('click'),
|
|
38
|
-
tslib_1.__metadata("design:type", Function),
|
|
39
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
40
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
41
|
-
], WindowCloseActionDirective.prototype, "onClick", null);
|
|
42
|
-
WindowCloseActionDirective = tslib_1.__decorate([
|
|
43
|
-
Directive({
|
|
44
|
-
exportAs: 'kendoWindowCloseAction',
|
|
45
|
-
providers: [
|
|
46
|
-
LocalizationService,
|
|
47
|
-
{
|
|
48
|
-
provide: L10N_PREFIX,
|
|
49
|
-
useValue: 'kendo.button'
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
selector: 'button[kendoWindowCloseAction]' // tslint:disable-line
|
|
53
|
-
}),
|
|
54
|
-
tslib_1.__param(2, Optional()),
|
|
55
|
-
tslib_1.__metadata("design:paramtypes", [ElementRef,
|
|
56
|
-
Renderer2,
|
|
57
|
-
DragResizeService,
|
|
58
|
-
LocalizationService,
|
|
59
|
-
NgZone])
|
|
60
|
-
], WindowCloseActionDirective);
|
|
61
|
-
return WindowCloseActionDirective;
|
|
62
|
-
}(Button));
|
|
63
|
-
export { WindowCloseActionDirective };
|
|
@@ -1,75 +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 { Directive, ElementRef, HostBinding, HostListener, Input, Optional, NgZone, Renderer2 } from "@angular/core";
|
|
7
|
-
import { DragResizeService } from './../drag-resize.service';
|
|
8
|
-
import { Button } from '@progress/kendo-angular-buttons';
|
|
9
|
-
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
10
|
-
var WindowMaximizeActionDirective = /** @class */ (function (_super) {
|
|
11
|
-
tslib_1.__extends(WindowMaximizeActionDirective, _super);
|
|
12
|
-
function WindowMaximizeActionDirective(el, renderer, _service, localization, ngZone) {
|
|
13
|
-
var _this = _super.call(this, el, renderer, null, localization, ngZone) || this;
|
|
14
|
-
_this.buttonType = 'button';
|
|
15
|
-
_this.window = _service;
|
|
16
|
-
_this.fillMode = 'flat';
|
|
17
|
-
_this.icon = 'window-maximize';
|
|
18
|
-
return _this;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* @hidden
|
|
22
|
-
*/
|
|
23
|
-
WindowMaximizeActionDirective.prototype.onClick = function () {
|
|
24
|
-
if (!this.isDisabled) {
|
|
25
|
-
this.window.maximizeAction();
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(WindowMaximizeActionDirective.prototype, "visible", {
|
|
29
|
-
get: function () {
|
|
30
|
-
return this.window.options.state === 'default' ? 'inline-flex' : 'none';
|
|
31
|
-
},
|
|
32
|
-
enumerable: true,
|
|
33
|
-
configurable: true
|
|
34
|
-
});
|
|
35
|
-
tslib_1.__decorate([
|
|
36
|
-
Input(),
|
|
37
|
-
tslib_1.__metadata("design:type", Object)
|
|
38
|
-
], WindowMaximizeActionDirective.prototype, "window", void 0);
|
|
39
|
-
tslib_1.__decorate([
|
|
40
|
-
HostBinding('attr.type'),
|
|
41
|
-
tslib_1.__metadata("design:type", String)
|
|
42
|
-
], WindowMaximizeActionDirective.prototype, "buttonType", void 0);
|
|
43
|
-
tslib_1.__decorate([
|
|
44
|
-
HostListener('click'),
|
|
45
|
-
tslib_1.__metadata("design:type", Function),
|
|
46
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
47
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
48
|
-
], WindowMaximizeActionDirective.prototype, "onClick", null);
|
|
49
|
-
tslib_1.__decorate([
|
|
50
|
-
HostBinding('style.display'),
|
|
51
|
-
tslib_1.__metadata("design:type", String),
|
|
52
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
53
|
-
], WindowMaximizeActionDirective.prototype, "visible", null);
|
|
54
|
-
WindowMaximizeActionDirective = tslib_1.__decorate([
|
|
55
|
-
Directive({
|
|
56
|
-
exportAs: 'kendoWindowMaximizeAction',
|
|
57
|
-
providers: [
|
|
58
|
-
LocalizationService,
|
|
59
|
-
{
|
|
60
|
-
provide: L10N_PREFIX,
|
|
61
|
-
useValue: 'kendo.button'
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
selector: 'button[kendoWindowMaximizeAction]' // tslint:disable-line
|
|
65
|
-
}),
|
|
66
|
-
tslib_1.__param(2, Optional()),
|
|
67
|
-
tslib_1.__metadata("design:paramtypes", [ElementRef,
|
|
68
|
-
Renderer2,
|
|
69
|
-
DragResizeService,
|
|
70
|
-
LocalizationService,
|
|
71
|
-
NgZone])
|
|
72
|
-
], WindowMaximizeActionDirective);
|
|
73
|
-
return WindowMaximizeActionDirective;
|
|
74
|
-
}(Button));
|
|
75
|
-
export { WindowMaximizeActionDirective };
|