@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,31 +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 } from '@angular/core';
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
var WindowContainerService = /** @class */ (function () {
|
|
11
|
-
function WindowContainerService() {
|
|
12
|
-
}
|
|
13
|
-
WindowContainerService_1 = WindowContainerService;
|
|
14
|
-
Object.defineProperty(WindowContainerService.prototype, "container", {
|
|
15
|
-
get: function () {
|
|
16
|
-
return WindowContainerService_1.container;
|
|
17
|
-
},
|
|
18
|
-
set: function (container) {
|
|
19
|
-
WindowContainerService_1.container = container;
|
|
20
|
-
},
|
|
21
|
-
enumerable: true,
|
|
22
|
-
configurable: true
|
|
23
|
-
});
|
|
24
|
-
var WindowContainerService_1;
|
|
25
|
-
WindowContainerService.container = null;
|
|
26
|
-
WindowContainerService = WindowContainerService_1 = tslib_1.__decorate([
|
|
27
|
-
Injectable()
|
|
28
|
-
], WindowContainerService);
|
|
29
|
-
return WindowContainerService;
|
|
30
|
-
}());
|
|
31
|
-
export { WindowContainerService };
|
|
@@ -1,78 +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, Host, ElementRef, Input, HostBinding, Renderer2 } from '@angular/core';
|
|
7
|
-
import { DraggableDirective } from '@progress/kendo-angular-common';
|
|
8
|
-
import { DragResizeService } from './drag-resize.service';
|
|
9
|
-
import { Subscription, of, merge } from 'rxjs';
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
var ResizeHandleDirective = /** @class */ (function () {
|
|
14
|
-
function ResizeHandleDirective(draggable, el, renderer, service) {
|
|
15
|
-
this.draggable = draggable;
|
|
16
|
-
this.el = el;
|
|
17
|
-
this.renderer = renderer;
|
|
18
|
-
this.service = service;
|
|
19
|
-
this.subscriptions = new Subscription();
|
|
20
|
-
}
|
|
21
|
-
Object.defineProperty(ResizeHandleDirective.prototype, "hostClass", {
|
|
22
|
-
get: function () {
|
|
23
|
-
return true;
|
|
24
|
-
},
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true
|
|
27
|
-
});
|
|
28
|
-
ResizeHandleDirective.prototype.ngOnInit = function () {
|
|
29
|
-
var _this = this;
|
|
30
|
-
this.setDisplay();
|
|
31
|
-
this.renderer.addClass(this.el.nativeElement, 'k-resize-' + this.direction);
|
|
32
|
-
this.subscriptions.add(of(this.draggable).subscribe(function (handle) {
|
|
33
|
-
_this.service.onResize(handle, _this.direction);
|
|
34
|
-
}));
|
|
35
|
-
this.subscriptions.add(this.service.resizeStart.subscribe(function (dir) {
|
|
36
|
-
if (dir !== _this.direction) {
|
|
37
|
-
_this.setDisplay('none');
|
|
38
|
-
}
|
|
39
|
-
}));
|
|
40
|
-
this.subscriptions.add(this.service.dragStart.subscribe(function () {
|
|
41
|
-
_this.setDisplay('none');
|
|
42
|
-
}));
|
|
43
|
-
this.subscriptions.add(merge(this.service.resizeEnd, this.service.dragEnd).subscribe(function () {
|
|
44
|
-
_this.setDisplay('block');
|
|
45
|
-
}));
|
|
46
|
-
this.subscriptions.add(this.service.stateChange.subscribe(function (state) {
|
|
47
|
-
_this.setDisplay(state === 'default' ? 'block' : 'none');
|
|
48
|
-
}));
|
|
49
|
-
};
|
|
50
|
-
ResizeHandleDirective.prototype.ngOnDestroy = function () {
|
|
51
|
-
this.subscriptions.unsubscribe();
|
|
52
|
-
};
|
|
53
|
-
ResizeHandleDirective.prototype.setDisplay = function (value) {
|
|
54
|
-
if (value === void 0) { value = 'block'; }
|
|
55
|
-
this.renderer.setStyle(this.el.nativeElement, 'display', this.service.options.state === 'default' ? value : 'none');
|
|
56
|
-
};
|
|
57
|
-
tslib_1.__decorate([
|
|
58
|
-
Input(),
|
|
59
|
-
tslib_1.__metadata("design:type", String)
|
|
60
|
-
], ResizeHandleDirective.prototype, "direction", void 0);
|
|
61
|
-
tslib_1.__decorate([
|
|
62
|
-
HostBinding('class.k-resize-handle'),
|
|
63
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
64
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
65
|
-
], ResizeHandleDirective.prototype, "hostClass", null);
|
|
66
|
-
ResizeHandleDirective = tslib_1.__decorate([
|
|
67
|
-
Directive({
|
|
68
|
-
selector: '[kendoWindowResizeHandle]'
|
|
69
|
-
}),
|
|
70
|
-
tslib_1.__param(0, Host()),
|
|
71
|
-
tslib_1.__metadata("design:paramtypes", [DraggableDirective,
|
|
72
|
-
ElementRef,
|
|
73
|
-
Renderer2,
|
|
74
|
-
DragResizeService])
|
|
75
|
-
], ResizeHandleDirective);
|
|
76
|
-
return ResizeHandleDirective;
|
|
77
|
-
}());
|
|
78
|
-
export { ResizeHandleDirective };
|
|
@@ -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
|
-
/**
|
|
6
|
-
* The settings for the Window actions when the Window is opened through `WindowService`
|
|
7
|
-
* ([see example]({% slug api_dialog_windowservice %}#toc-open)).
|
|
8
|
-
*/
|
|
9
|
-
var WindowSettings = /** @class */ (function () {
|
|
10
|
-
function WindowSettings() {
|
|
11
|
-
}
|
|
12
|
-
return WindowSettings;
|
|
13
|
-
}());
|
|
14
|
-
export { WindowSettings };
|
|
15
|
-
/**
|
|
16
|
-
* Indicates that the **Close** button of a Window that is opened through `WindowService` is clicked.
|
|
17
|
-
*/
|
|
18
|
-
var WindowCloseResult = /** @class */ (function () {
|
|
19
|
-
function WindowCloseResult() {
|
|
20
|
-
}
|
|
21
|
-
return WindowCloseResult;
|
|
22
|
-
}());
|
|
23
|
-
export { WindowCloseResult };
|
|
24
|
-
/**
|
|
25
|
-
* Holds references to the object instance of the Window.
|
|
26
|
-
* Controls the Windows that were opened through `WindowService`
|
|
27
|
-
* ([see example]({% slug api_dialog_windowservice %}#toc-open)).
|
|
28
|
-
*/
|
|
29
|
-
var WindowRef = /** @class */ (function () {
|
|
30
|
-
function WindowRef() {
|
|
31
|
-
}
|
|
32
|
-
return WindowRef;
|
|
33
|
-
}());
|
|
34
|
-
export { WindowRef };
|
|
@@ -1,144 +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, HostBinding, HostListener, ElementRef, NgZone, TemplateRef, Input } from '@angular/core';
|
|
7
|
-
import { DraggableDirective } from '@progress/kendo-angular-common';
|
|
8
|
-
import { DragResizeService } from './drag-resize.service';
|
|
9
|
-
import { of } from 'rxjs';
|
|
10
|
-
import { hasClasses, isFocusable } from '../common/util';
|
|
11
|
-
var WindowTitleBarComponent = /** @class */ (function () {
|
|
12
|
-
function WindowTitleBarComponent(el, service, ngZone) {
|
|
13
|
-
this.el = el;
|
|
14
|
-
this.ngZone = ngZone;
|
|
15
|
-
this.service = service;
|
|
16
|
-
}
|
|
17
|
-
WindowTitleBarComponent.prototype.ngOnInit = function () {
|
|
18
|
-
this.dragDirective = new DraggableDirective(this.el, this.ngZone);
|
|
19
|
-
this.dragDirective.ngOnInit();
|
|
20
|
-
if (this.isDraggable) {
|
|
21
|
-
this.subscribeDrag();
|
|
22
|
-
}
|
|
23
|
-
this.subscribeStateChange();
|
|
24
|
-
};
|
|
25
|
-
WindowTitleBarComponent.prototype.ngOnDestroy = function () {
|
|
26
|
-
this.dragDirective.ngOnDestroy();
|
|
27
|
-
this.unsubscribeDrag();
|
|
28
|
-
this.unsubscribeState();
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
WindowTitleBarComponent.prototype.subscribeDrag = function () {
|
|
34
|
-
var _this = this;
|
|
35
|
-
this.unsubscribeDrag();
|
|
36
|
-
this.dragSubscription = of(this.dragDirective).subscribe(function (titleBar) {
|
|
37
|
-
_this.service.onDrag(titleBar);
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* @hidden
|
|
42
|
-
*/
|
|
43
|
-
WindowTitleBarComponent.prototype.subscribeStateChange = function () {
|
|
44
|
-
var _this = this;
|
|
45
|
-
this.stateSubscription = this.service.stateChange.subscribe(function (state) {
|
|
46
|
-
if (_this.service.options.draggable) {
|
|
47
|
-
if (state === 'maximized') {
|
|
48
|
-
_this.unsubscribeDrag();
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
_this.subscribeDrag();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* @hidden
|
|
58
|
-
*/
|
|
59
|
-
WindowTitleBarComponent.prototype.unsubscribeDrag = function () {
|
|
60
|
-
if (this.dragSubscription) {
|
|
61
|
-
this.service.dragSubscription.unsubscribe();
|
|
62
|
-
this.dragSubscription.unsubscribe();
|
|
63
|
-
this.dragSubscription = null;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* @hidden
|
|
68
|
-
*/
|
|
69
|
-
WindowTitleBarComponent.prototype.unsubscribeState = function () {
|
|
70
|
-
if (this.stateSubscription) {
|
|
71
|
-
this.stateSubscription.unsubscribe();
|
|
72
|
-
this.stateSubscription = null;
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
Object.defineProperty(WindowTitleBarComponent.prototype, "className", {
|
|
76
|
-
get: function () {
|
|
77
|
-
return true;
|
|
78
|
-
},
|
|
79
|
-
enumerable: true,
|
|
80
|
-
configurable: true
|
|
81
|
-
});
|
|
82
|
-
Object.defineProperty(WindowTitleBarComponent.prototype, "touchAction", {
|
|
83
|
-
get: function () {
|
|
84
|
-
if (this.isDraggable) {
|
|
85
|
-
return 'none';
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
enumerable: true,
|
|
89
|
-
configurable: true
|
|
90
|
-
});
|
|
91
|
-
/**
|
|
92
|
-
* @hidden
|
|
93
|
-
*/
|
|
94
|
-
WindowTitleBarComponent.prototype.handle = function (ev) {
|
|
95
|
-
var target = ev.target;
|
|
96
|
-
var state = this.service.options.state;
|
|
97
|
-
if (!hasClasses(target, 'k-icon') && !isFocusable(target, false) && this.service.options.resizable) {
|
|
98
|
-
if (state === 'default') {
|
|
99
|
-
this.service.maximizeAction();
|
|
100
|
-
}
|
|
101
|
-
else if (state === 'maximized') {
|
|
102
|
-
this.service.restoreAction();
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
Object.defineProperty(WindowTitleBarComponent.prototype, "isDraggable", {
|
|
107
|
-
get: function () {
|
|
108
|
-
var options = this.service.options;
|
|
109
|
-
return options.draggable && options.state !== 'maximized';
|
|
110
|
-
},
|
|
111
|
-
enumerable: true,
|
|
112
|
-
configurable: true
|
|
113
|
-
});
|
|
114
|
-
tslib_1.__decorate([
|
|
115
|
-
Input(),
|
|
116
|
-
tslib_1.__metadata("design:type", TemplateRef)
|
|
117
|
-
], WindowTitleBarComponent.prototype, "template", void 0);
|
|
118
|
-
tslib_1.__decorate([
|
|
119
|
-
HostBinding('class.k-window-titlebar'),
|
|
120
|
-
HostBinding('class.k-dialog-titlebar'),
|
|
121
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
122
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
123
|
-
], WindowTitleBarComponent.prototype, "className", null);
|
|
124
|
-
tslib_1.__decorate([
|
|
125
|
-
HostBinding('style.touch-action'),
|
|
126
|
-
tslib_1.__metadata("design:type", String),
|
|
127
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
128
|
-
], WindowTitleBarComponent.prototype, "touchAction", null);
|
|
129
|
-
tslib_1.__decorate([
|
|
130
|
-
HostListener('dblclick', ['$event']),
|
|
131
|
-
tslib_1.__metadata("design:type", Function),
|
|
132
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
133
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
134
|
-
], WindowTitleBarComponent.prototype, "handle", null);
|
|
135
|
-
WindowTitleBarComponent = tslib_1.__decorate([
|
|
136
|
-
Component({
|
|
137
|
-
selector: 'kendo-window-titlebar',
|
|
138
|
-
template: "\n <ng-content *ngIf=\"!template\"></ng-content>\n <ng-template\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{'$implicit': service}\" *ngIf=\"template\">\n </ng-template>\n "
|
|
139
|
-
}),
|
|
140
|
-
tslib_1.__metadata("design:paramtypes", [ElementRef, DragResizeService, NgZone])
|
|
141
|
-
], WindowTitleBarComponent);
|
|
142
|
-
return WindowTitleBarComponent;
|
|
143
|
-
}());
|
|
144
|
-
export { WindowTitleBarComponent };
|