@progress/kendo-angular-dialog 21.4.1-develop.1 → 22.0.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dialog/dialog-content-base.d.ts +1 -1
  2. package/fesm2022/progress-kendo-angular-dialog.mjs +84 -84
  3. package/localization/messages.d.ts +1 -1
  4. package/package.json +11 -19
  5. package/schematics/ngAdd/index.js +1 -1
  6. package/esm2022/common/actions-layout.mjs +0 -5
  7. package/esm2022/common/animation-types.mjs +0 -5
  8. package/esm2022/common/dialog-animation-direction.mjs +0 -5
  9. package/esm2022/common/preventable-event.mjs +0 -30
  10. package/esm2022/common/util.mjs +0 -167
  11. package/esm2022/dialog/dialog-actions.component.mjs +0 -182
  12. package/esm2022/dialog/dialog-animations/animate-content.mjs +0 -19
  13. package/esm2022/dialog/dialog-animations/animations.mjs +0 -69
  14. package/esm2022/dialog/dialog-animations/create-animation-player.mjs +0 -18
  15. package/esm2022/dialog/dialog-container.directive.mjs +0 -31
  16. package/esm2022/dialog/dialog-container.service.mjs +0 -26
  17. package/esm2022/dialog/dialog-content-base.mjs +0 -57
  18. package/esm2022/dialog/dialog-titlebar.component.mjs +0 -170
  19. package/esm2022/dialog/dialog.component.mjs +0 -650
  20. package/esm2022/dialog/dialog.service.mjs +0 -210
  21. package/esm2022/dialog/models/dialog-action-divider.mjs +0 -5
  22. package/esm2022/dialog/models/dialog-action.mjs +0 -40
  23. package/esm2022/dialog/models/dialog-animation.mjs +0 -5
  24. package/esm2022/dialog/models/dialog-close-result.mjs +0 -12
  25. package/esm2022/dialog/models/dialog-ref.mjs +0 -39
  26. package/esm2022/dialog/models/dialog-result.mjs +0 -5
  27. package/esm2022/dialog/models/dialog-settings.mjs +0 -95
  28. package/esm2022/dialog/models/index.mjs +0 -12
  29. package/esm2022/dialog/models/theme-color.mjs +0 -5
  30. package/esm2022/dialog.module.mjs +0 -49
  31. package/esm2022/dialogs.module.mjs +0 -59
  32. package/esm2022/directives.mjs +0 -95
  33. package/esm2022/index.mjs +0 -33
  34. package/esm2022/localization/custom-messages.component.mjs +0 -65
  35. package/esm2022/localization/dialog-localization.service.mjs +0 -9
  36. package/esm2022/localization/localized-messages.directive.mjs +0 -43
  37. package/esm2022/localization/messages.mjs +0 -45
  38. package/esm2022/localization/titlebar-localization.service.mjs +0 -45
  39. package/esm2022/package-metadata.mjs +0 -16
  40. package/esm2022/progress-kendo-angular-dialog.mjs +0 -8
  41. package/esm2022/window/actions/window-close-action.directive.mjs +0 -119
  42. package/esm2022/window/actions/window-maximize-action.directive.mjs +0 -125
  43. package/esm2022/window/actions/window-minimize-action.directive.mjs +0 -125
  44. package/esm2022/window/actions/window-restore-action.directive.mjs +0 -125
  45. package/esm2022/window/drag-resize.service.mjs +0 -335
  46. package/esm2022/window/models/index.mjs +0 -11
  47. package/esm2022/window/models/theme-color.mjs +0 -5
  48. package/esm2022/window/models/window-close-result.mjs +0 -10
  49. package/esm2022/window/models/window-messages.mjs +0 -5
  50. package/esm2022/window/models/window-options.mjs +0 -5
  51. package/esm2022/window/models/window-ref.mjs +0 -25
  52. package/esm2022/window/models/window-settings.mjs +0 -92
  53. package/esm2022/window/models/window-types.mjs +0 -5
  54. package/esm2022/window/navigation.service.mjs +0 -160
  55. package/esm2022/window/window-container.directive.mjs +0 -31
  56. package/esm2022/window/window-container.service.mjs +0 -26
  57. package/esm2022/window/window-events.mjs +0 -5
  58. package/esm2022/window/window-resize-handle.directive.mjs +0 -74
  59. package/esm2022/window/window-titlebar.component.mjs +0 -173
  60. package/esm2022/window/window.component.mjs +0 -831
  61. package/esm2022/window/window.service.mjs +0 -206
  62. package/esm2022/window.module.mjs +0 -53
@@ -1,160 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Injectable, NgZone } from "@angular/core";
6
- import { DragResizeService } from './drag-resize.service';
7
- import { isPresent, OFFSET_STYLES, WINDOW_CLASSES, hasClasses, WINDOW_ELEMENTS_HANDLING_ESC_KEY } from '../common/util';
8
- import { Keys, normalizeKeys } from "@progress/kendo-angular-common";
9
- import * as i0 from "@angular/core";
10
- import * as i1 from "./drag-resize.service";
11
- /**
12
- * @hidden
13
- */
14
- export class NavigationService {
15
- window;
16
- ngZone;
17
- constructor(window, ngZone) {
18
- this.window = window;
19
- this.ngZone = ngZone;
20
- }
21
- process(ev) {
22
- const key = normalizeKeys(ev);
23
- const target = ev.target;
24
- switch (key) {
25
- case Keys.ArrowUp:
26
- case Keys.ArrowDown:
27
- case Keys.ArrowLeft:
28
- case Keys.ArrowRight: {
29
- if (hasClasses(target, WINDOW_CLASSES)) {
30
- ev.preventDefault();
31
- this.ngZone.run(() => {
32
- this.handleArrow(key, ev);
33
- });
34
- }
35
- break;
36
- }
37
- case Keys.Escape:
38
- if (hasClasses(target, WINDOW_ELEMENTS_HANDLING_ESC_KEY)) {
39
- this.ngZone.run(() => {
40
- this.handleEscape();
41
- });
42
- }
43
- break;
44
- default:
45
- break;
46
- }
47
- }
48
- handleArrow(key, ev) {
49
- const options = this.window.options;
50
- if (ev.altKey) {
51
- this.handleStateChange(key, options.state);
52
- return;
53
- }
54
- if ((ev.ctrlKey || ev.metaKey) && options.state === 'default') {
55
- this.handleResize(key);
56
- }
57
- else {
58
- this.handleDrag(key);
59
- }
60
- }
61
- handleEscape() {
62
- this.window.closeAction();
63
- }
64
- handleDrag(key) {
65
- const options = this.window.options;
66
- if (!options.draggable) {
67
- return;
68
- }
69
- const offset = this.window.currentOffsetAndPosition();
70
- const restoreOptions = this.window.restoreOptions;
71
- const ev = {};
72
- let delta = 10;
73
- if (key === Keys.ArrowLeft || key === Keys.ArrowUp) {
74
- delta *= -1;
75
- }
76
- switch (key) {
77
- case Keys.ArrowLeft:
78
- case Keys.ArrowRight: {
79
- ev.left = offset.x + delta;
80
- options.left = ev.left;
81
- break;
82
- }
83
- case Keys.ArrowUp:
84
- case Keys.ArrowDown: {
85
- ev.top = offset.y + delta;
86
- options.top = ev.top;
87
- break;
88
- }
89
- default:
90
- break;
91
- }
92
- if (options.state === 'minimized' && isPresent(restoreOptions)) {
93
- restoreOptions.left = options.left;
94
- restoreOptions.top = options.top;
95
- }
96
- this.window.change.emit(ev);
97
- }
98
- handleResize(key) {
99
- const options = this.window.options;
100
- if (!options.resizable) {
101
- return;
102
- }
103
- const offset = this.window.currentOffsetAndPosition();
104
- let newWidth;
105
- let newHeight;
106
- const ev = {};
107
- let delta = 10;
108
- if (key === Keys.ArrowLeft || key === Keys.ArrowUp) {
109
- delta *= -1;
110
- }
111
- switch (key) {
112
- case Keys.ArrowLeft:
113
- case Keys.ArrowRight: {
114
- newWidth = offset.width + delta;
115
- if (newWidth !== options.width && newWidth >= options.minWidth) {
116
- ev.width = newWidth;
117
- }
118
- break;
119
- }
120
- case Keys.ArrowUp:
121
- case Keys.ArrowDown: {
122
- newHeight = offset.height + delta;
123
- if (newHeight !== options.height && newHeight >= options.minHeight) {
124
- ev.height = newHeight;
125
- }
126
- break;
127
- }
128
- default:
129
- break;
130
- }
131
- if (isPresent(ev.width) || isPresent(ev.height)) {
132
- OFFSET_STYLES.forEach((style) => {
133
- if (isPresent(ev[style])) {
134
- this.window.options[style] = ev[style];
135
- }
136
- });
137
- this.window.change.emit(ev);
138
- }
139
- }
140
- handleStateChange(key, state) {
141
- if ((state === 'minimized' && key === Keys.ArrowUp) ||
142
- (state === 'maximized' && key === Keys.ArrowDown)) {
143
- this.window.restoreAction();
144
- return;
145
- }
146
- if (state === 'default') {
147
- if (key === Keys.ArrowUp) {
148
- this.window.maximizeAction();
149
- }
150
- else if (key === Keys.ArrowDown) {
151
- this.window.minimizeAction();
152
- }
153
- }
154
- }
155
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService, deps: [{ token: i1.DragResizeService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
156
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService });
157
- }
158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService, decorators: [{
159
- type: Injectable
160
- }], ctorParameters: () => [{ type: i1.DragResizeService }, { type: i0.NgZone }] });
@@ -1,31 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, ViewContainerRef } from '@angular/core';
6
- import { WindowContainerService } from './window-container.service';
7
- import * as i0 from "@angular/core";
8
- import * as i1 from "./window-container.service";
9
- /**
10
- * Represents an insertion point for Windows created through the Window service.
11
- * The created Windows mount after this element. ([See example.]({% slug api_dialog_windowservice %}#toc-open))
12
- *
13
- * @example
14
- * ```html
15
- * <div kendoWindowContainer></div>
16
- * ```
17
- */
18
- export class WindowContainerDirective {
19
- constructor(container, service) {
20
- service.container = container;
21
- }
22
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WindowContainerDirective, deps: [{ token: i0.ViewContainerRef }, { token: i1.WindowContainerService }], target: i0.ɵɵFactoryTarget.Directive });
23
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: WindowContainerDirective, isStandalone: true, selector: "[kendoWindowContainer]", ngImport: i0 });
24
- }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WindowContainerDirective, decorators: [{
26
- type: Directive,
27
- args: [{
28
- selector: '[kendoWindowContainer]',
29
- standalone: true
30
- }]
31
- }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i1.WindowContainerService }] });
@@ -1,26 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Injectable } from '@angular/core';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * @hidden
9
- */
10
- export class WindowContainerService {
11
- static container = null;
12
- set container(container) {
13
- WindowContainerService.container = container;
14
- }
15
- get container() {
16
- return WindowContainerService.container;
17
- }
18
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WindowContainerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
19
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WindowContainerService, providedIn: 'root' });
20
- }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WindowContainerService, decorators: [{
22
- type: Injectable,
23
- args: [{
24
- providedIn: 'root'
25
- }]
26
- }] });
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,74 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, Host, ElementRef, Input, HostBinding, Renderer2 } from '@angular/core';
6
- import { DraggableDirective } from '@progress/kendo-angular-common';
7
- import { DragResizeService } from './drag-resize.service';
8
- import { Subscription, of, merge } from 'rxjs';
9
- import * as i0 from "@angular/core";
10
- import * as i1 from "@progress/kendo-angular-common";
11
- import * as i2 from "./drag-resize.service";
12
- /**
13
- * @hidden
14
- */
15
- export class ResizeHandleDirective {
16
- draggable;
17
- el;
18
- renderer;
19
- service;
20
- direction;
21
- get hostClass() {
22
- return true;
23
- }
24
- subscriptions = new Subscription();
25
- constructor(draggable, el, renderer, service) {
26
- this.draggable = draggable;
27
- this.el = el;
28
- this.renderer = renderer;
29
- this.service = service;
30
- }
31
- ngOnInit() {
32
- this.setDisplay();
33
- this.renderer.addClass(this.el.nativeElement, 'k-resize-' + this.direction);
34
- this.subscriptions.add(of(this.draggable).subscribe(handle => {
35
- this.service.onResize(handle, this.direction);
36
- }));
37
- this.subscriptions.add(this.service.resizeStart.subscribe((dir) => {
38
- if (dir !== this.direction) {
39
- this.setDisplay('none');
40
- }
41
- }));
42
- this.subscriptions.add(this.service.dragStart.subscribe(() => {
43
- this.setDisplay('none');
44
- }));
45
- this.subscriptions.add(merge(this.service.resizeEnd, this.service.dragEnd).subscribe(() => {
46
- this.setDisplay('block');
47
- }));
48
- this.subscriptions.add(this.service.stateChange.subscribe((state) => {
49
- this.setDisplay(state === 'default' ? 'block' : 'none');
50
- }));
51
- }
52
- ngOnDestroy() {
53
- this.subscriptions.unsubscribe();
54
- }
55
- setDisplay(value = 'block') {
56
- this.renderer.setStyle(this.el.nativeElement, 'display', this.service.options.state === 'default' ? value : 'none');
57
- }
58
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ResizeHandleDirective, deps: [{ token: i1.DraggableDirective, host: true }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2.DragResizeService }], target: i0.ɵɵFactoryTarget.Directive });
59
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ResizeHandleDirective, isStandalone: true, selector: "[kendoWindowResizeHandle]", inputs: { direction: "direction" }, host: { properties: { "class.k-resize-handle": "this.hostClass" } }, ngImport: i0 });
60
- }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ResizeHandleDirective, decorators: [{
62
- type: Directive,
63
- args: [{
64
- selector: '[kendoWindowResizeHandle]',
65
- standalone: true
66
- }]
67
- }], ctorParameters: () => [{ type: i1.DraggableDirective, decorators: [{
68
- type: Host
69
- }] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i2.DragResizeService }], propDecorators: { direction: [{
70
- type: Input
71
- }], hostClass: [{
72
- type: HostBinding,
73
- args: ['class.k-resize-handle']
74
- }] } });
@@ -1,173 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Component, HostBinding, HostListener, ElementRef, NgZone, TemplateRef, Input } from '@angular/core';
6
- import { NgTemplateOutlet } from '@angular/common';
7
- import { DraggableDirective } from '@progress/kendo-angular-common';
8
- import { DragResizeService } from './drag-resize.service';
9
- import { of } from 'rxjs';
10
- import { hasClasses, isFocusable, isPresent } from '../common/util';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "./drag-resize.service";
13
- /**
14
- * Represents the title bar of the Window component.
15
- *
16
- */
17
- export class WindowTitleBarComponent {
18
- el;
19
- ngZone;
20
- /**
21
- * @hidden
22
- */
23
- template;
24
- /**
25
- * @hidden
26
- */
27
- id;
28
- /**
29
- * @hidden
30
- */
31
- service;
32
- dragDirective;
33
- dragSubscription;
34
- stateSubscription;
35
- constructor(el, service, ngZone) {
36
- this.el = el;
37
- this.ngZone = ngZone;
38
- this.service = service;
39
- }
40
- ngOnInit() {
41
- this.dragDirective = new DraggableDirective(this.el, this.ngZone);
42
- this.dragDirective.ngOnInit();
43
- if (this.isDraggable) {
44
- this.subscribeDrag();
45
- }
46
- this.subscribeStateChange();
47
- }
48
- ngAfterViewInit() {
49
- const element = this.el.nativeElement.querySelector('.k-window-title');
50
- if (isPresent(element)) {
51
- element.setAttribute('id', this.id);
52
- }
53
- }
54
- ngOnDestroy() {
55
- this.dragDirective.ngOnDestroy();
56
- this.unsubscribeDrag();
57
- this.unsubscribeState();
58
- }
59
- /**
60
- * @hidden
61
- */
62
- subscribeDrag() {
63
- this.unsubscribeDrag();
64
- this.dragSubscription = of(this.dragDirective).subscribe(titleBar => {
65
- this.service.onDrag(titleBar);
66
- });
67
- }
68
- /**
69
- * @hidden
70
- */
71
- subscribeStateChange() {
72
- this.stateSubscription = this.service.stateChange.subscribe((state) => {
73
- if (this.service.options.draggable) {
74
- if (state === 'maximized') {
75
- this.unsubscribeDrag();
76
- }
77
- else {
78
- this.subscribeDrag();
79
- }
80
- }
81
- });
82
- }
83
- /**
84
- * @hidden
85
- */
86
- unsubscribeDrag() {
87
- if (this.dragSubscription) {
88
- this.service.dragSubscription.unsubscribe();
89
- this.dragSubscription.unsubscribe();
90
- this.dragSubscription = null;
91
- }
92
- }
93
- /**
94
- * @hidden
95
- */
96
- unsubscribeState() {
97
- if (this.stateSubscription) {
98
- this.stateSubscription.unsubscribe();
99
- this.stateSubscription = null;
100
- }
101
- }
102
- get className() {
103
- return true;
104
- }
105
- get touchAction() {
106
- if (this.isDraggable) {
107
- return 'none';
108
- }
109
- }
110
- /**
111
- * @hidden
112
- */
113
- handle(ev) {
114
- const target = ev.target;
115
- const state = this.service.options.state;
116
- if (!hasClasses(target, 'k-icon') && !isFocusable(target, false) && this.service.options.resizable) {
117
- if (state === 'default') {
118
- this.service.maximizeAction();
119
- }
120
- else if (state === 'maximized') {
121
- this.service.restoreAction();
122
- }
123
- }
124
- }
125
- get isDraggable() {
126
- const options = this.service.options;
127
- return options.draggable && options.state !== 'maximized';
128
- }
129
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WindowTitleBarComponent, deps: [{ token: i0.ElementRef }, { token: i1.DragResizeService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
130
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: WindowTitleBarComponent, isStandalone: true, selector: "kendo-window-titlebar", inputs: { template: "template", id: "id" }, host: { listeners: { "dblclick": "handle($event)" }, properties: { "class.k-window-titlebar": "this.className", "style.touch-action": "this.touchAction" } }, ngImport: i0, template: `
131
- @if (!template) {
132
- <ng-content></ng-content>
133
- }
134
- @if (template) {
135
- <ng-template
136
- [ngTemplateOutlet]="template"
137
- [ngTemplateOutletContext]="{'$implicit': service}">
138
- </ng-template>
139
- }
140
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
141
- }
142
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WindowTitleBarComponent, decorators: [{
143
- type: Component,
144
- args: [{
145
- selector: 'kendo-window-titlebar',
146
- template: `
147
- @if (!template) {
148
- <ng-content></ng-content>
149
- }
150
- @if (template) {
151
- <ng-template
152
- [ngTemplateOutlet]="template"
153
- [ngTemplateOutletContext]="{'$implicit': service}">
154
- </ng-template>
155
- }
156
- `,
157
- standalone: true,
158
- imports: [NgTemplateOutlet]
159
- }]
160
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.DragResizeService }, { type: i0.NgZone }], propDecorators: { template: [{
161
- type: Input
162
- }], id: [{
163
- type: Input
164
- }], className: [{
165
- type: HostBinding,
166
- args: ['class.k-window-titlebar']
167
- }], touchAction: [{
168
- type: HostBinding,
169
- args: ['style.touch-action']
170
- }], handle: [{
171
- type: HostListener,
172
- args: ['dblclick', ['$event']]
173
- }] } });