@progress/kendo-angular-dialog 6.0.2 → 7.0.0-dev.202204191040

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 (196) hide show
  1. package/bundles/kendo-angular-dialog.umd.js +5 -0
  2. package/{dist/es2015/common → common}/actions-layout.d.ts +0 -0
  3. package/{dist/es2015/common → common}/preventable-event.d.ts +4 -3
  4. package/{dist/es2015/common → common}/util.d.ts +1 -1
  5. package/{dist/es2015/dialog → dialog}/dialog-actions.component.d.ts +14 -7
  6. package/{dist/es2015/dialog → dialog}/dialog-container.directive.d.ts +3 -0
  7. package/dialog/dialog-container.service.d.ts +16 -0
  8. package/{dist/es2015/dialog → dialog}/dialog-content-base.d.ts +4 -1
  9. package/{dist/es2015/dialog → dialog}/dialog-titlebar.component.d.ts +5 -2
  10. package/{dist/es2015/dialog → dialog}/dialog.component.d.ts +13 -6
  11. package/{dist/es2015/dialog → dialog}/dialog.service.d.ts +5 -1
  12. package/dialog/models/dialog-action.d.ts +28 -0
  13. package/dialog/models/dialog-close-result.d.ts +11 -0
  14. package/dialog/models/dialog-ref.d.ts +38 -0
  15. package/dialog/models/dialog-result.d.ts +14 -0
  16. package/{dist/es2015/dialog → dialog/models}/dialog-settings.d.ts +5 -73
  17. package/{dist/es/localization/dialog-localization.service.js → dialog/models/index.d.ts} +5 -5
  18. package/{dist/es2015/dialog.module.d.ts → dialog.module.d.ts} +11 -0
  19. package/{dist/es2015/dialogs.module.d.ts → dialogs.module.d.ts} +6 -0
  20. package/{dist/es2015 → esm2015}/common/actions-layout.js +1 -0
  21. package/{dist/es2015 → esm2015}/common/preventable-event.js +3 -3
  22. package/{dist/es2015 → esm2015}/common/util.js +0 -5
  23. package/esm2015/dialog/dialog-actions.component.js +115 -0
  24. package/esm2015/dialog/dialog-container.directive.js +30 -0
  25. package/esm2015/dialog/dialog-container.service.js +23 -0
  26. package/{dist/es2015 → esm2015}/dialog/dialog-content-base.js +18 -10
  27. package/esm2015/dialog/dialog-titlebar.component.js +136 -0
  28. package/{dist/es2015 → esm2015}/dialog/dialog.component.js +123 -113
  29. package/{dist/es2015 → esm2015}/dialog/dialog.service.js +16 -15
  30. package/{dist/es2015/window/window-container.service.d.ts → esm2015/dialog/models/dialog-action.js} +3 -5
  31. package/esm2015/dialog/models/dialog-close-result.js +11 -0
  32. package/esm2015/dialog/models/dialog-ref.js +11 -0
  33. package/{dist/es/common/actions-layout.js → esm2015/dialog/models/dialog-result.js} +1 -0
  34. package/{dist/es2015/dialog/dialog-container.service.d.ts → esm2015/dialog/models/dialog-settings.js} +3 -5
  35. package/esm2015/dialog/models/index.js +9 -0
  36. package/{dist/es2015 → esm2015}/dialog.module.js +21 -13
  37. package/{dist/es → esm2015}/dialogs.module.js +12 -12
  38. package/esm2015/kendo-angular-dialog.js +8 -0
  39. package/esm2015/localization/custom-messages.component.js +41 -0
  40. package/{dist/es2015 → esm2015}/localization/dialog-localization.service.js +0 -0
  41. package/esm2015/localization/localized-messages.directive.js +40 -0
  42. package/esm2015/localization/messages.js +29 -0
  43. package/esm2015/localization/titlebar-localization.service.js +44 -0
  44. package/{dist/es2015 → esm2015}/main.js +9 -2
  45. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  46. package/esm2015/shared.module.js +38 -0
  47. package/esm2015/window/actions/window-close-action.directive.js +59 -0
  48. package/esm2015/window/actions/window-maximize-action.directive.js +65 -0
  49. package/esm2015/window/actions/window-minimize-action.directive.js +65 -0
  50. package/esm2015/window/actions/window-restore-action.directive.js +65 -0
  51. package/{dist/es2015 → esm2015}/window/drag-resize.service.js +9 -11
  52. package/esm2015/window/models/index.js +10 -0
  53. package/esm2015/window/models/window-close-result.js +9 -0
  54. package/{dist/es2015/window/window-events.js → esm2015/window/models/window-messages.js} +1 -0
  55. package/esm2015/window/models/window-options.js +5 -0
  56. package/{dist/es2015/window/window-settings.js → esm2015/window/models/window-ref.js} +0 -11
  57. package/esm2015/window/models/window-settings.js +10 -0
  58. package/esm2015/window/models/window-types.js +5 -0
  59. package/{dist/es2015 → esm2015}/window/navigation.service.js +10 -11
  60. package/esm2015/window/window-container.directive.js +30 -0
  61. package/esm2015/window/window-container.service.js +23 -0
  62. package/{dist/es → esm2015}/window/window-events.js +1 -0
  63. package/{dist/es2015 → esm2015}/window/window-resize-handle.directive.js +21 -26
  64. package/{dist/es2015 → esm2015}/window/window-titlebar.component.js +35 -34
  65. package/{dist/es2015 → esm2015}/window/window.component.js +168 -187
  66. package/{dist/es2015 → esm2015}/window/window.service.js +15 -14
  67. package/{dist/es2015 → esm2015}/window.module.js +30 -13
  68. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-dialog.js} +1029 -925
  69. package/{dist/es2015/shared.module.d.ts → kendo-angular-dialog.d.ts} +3 -7
  70. package/{dist/es2015/localization → localization}/custom-messages.component.d.ts +4 -1
  71. package/{dist/es2015/localization → localization}/dialog-localization.service.d.ts +0 -0
  72. package/{dist/es2015/localization → localization}/localized-messages.directive.d.ts +3 -0
  73. package/{dist/es2015/localization → localization}/messages.d.ts +3 -0
  74. package/{dist/es2015/localization → localization}/titlebar-localization.service.d.ts +3 -0
  75. package/{dist/es2015/main.d.ts → main.d.ts} +8 -2
  76. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  77. package/package.json +31 -104
  78. package/schematics/ngAdd/index.js +6 -3
  79. package/schematics/ngAdd/index.js.map +1 -1
  80. package/shared.module.d.ts +21 -0
  81. package/{dist/es2015/window → window}/actions/window-close-action.directive.d.ts +3 -0
  82. package/{dist/es2015/window → window}/actions/window-maximize-action.directive.d.ts +4 -1
  83. package/{dist/es2015/window → window}/actions/window-minimize-action.directive.d.ts +4 -1
  84. package/{dist/es2015/window → window}/actions/window-restore-action.directive.d.ts +4 -1
  85. package/{dist/es2015/window → window}/drag-resize.service.d.ts +8 -4
  86. package/window/models/index.d.ts +10 -0
  87. package/window/models/window-close-result.d.ts +9 -0
  88. package/window/models/window-messages.d.ts +26 -0
  89. package/window/models/window-options.d.ts +20 -0
  90. package/window/models/window-ref.d.ts +40 -0
  91. package/{dist/es2015/window → window/models}/window-settings.d.ts +4 -84
  92. package/window/models/window-types.d.ts +11 -0
  93. package/{dist/es2015/window → window}/navigation.service.d.ts +4 -1
  94. package/{dist/es2015/window → window}/window-container.directive.d.ts +3 -0
  95. package/window/window-container.service.d.ts +16 -0
  96. package/{dist/es2015/window → window}/window-events.d.ts +0 -0
  97. package/{dist/es2015/window → window}/window-resize-handle.directive.d.ts +4 -1
  98. package/{dist/es2015/window → window}/window-titlebar.component.d.ts +6 -3
  99. package/{dist/es2015/window → window}/window.component.d.ts +42 -25
  100. package/{dist/es2015/window → window}/window.service.d.ts +5 -1
  101. package/window.module.d.ts +45 -0
  102. package/dist/cdn/js/kendo-angular-dialog.js +0 -20
  103. package/dist/cdn/main.js +0 -5
  104. package/dist/es/common/preventable-event.js +0 -29
  105. package/dist/es/common/util.js +0 -214
  106. package/dist/es/dialog/dialog-actions.component.js +0 -89
  107. package/dist/es/dialog/dialog-container.directive.js +0 -31
  108. package/dist/es/dialog/dialog-container.service.js +0 -31
  109. package/dist/es/dialog/dialog-content-base.js +0 -45
  110. package/dist/es/dialog/dialog-settings.js +0 -46
  111. package/dist/es/dialog/dialog-titlebar.component.js +0 -94
  112. package/dist/es/dialog/dialog.component.js +0 -462
  113. package/dist/es/dialog/dialog.service.js +0 -214
  114. package/dist/es/dialog.module.js +0 -56
  115. package/dist/es/index.js +0 -22
  116. package/dist/es/localization/custom-messages.component.js +0 -44
  117. package/dist/es/localization/localized-messages.directive.js +0 -35
  118. package/dist/es/localization/messages.js +0 -34
  119. package/dist/es/localization/titlebar-localization.service.js +0 -34
  120. package/dist/es/main.js +0 -21
  121. package/dist/es/package-metadata.js +0 -15
  122. package/dist/es/shared.module.js +0 -34
  123. package/dist/es/window/actions/window-close-action.directive.js +0 -63
  124. package/dist/es/window/actions/window-maximize-action.directive.js +0 -75
  125. package/dist/es/window/actions/window-minimize-action.directive.js +0 -75
  126. package/dist/es/window/actions/window-restore-action.directive.js +0 -75
  127. package/dist/es/window/drag-resize.service.js +0 -351
  128. package/dist/es/window/navigation.service.js +0 -155
  129. package/dist/es/window/window-container.directive.js +0 -31
  130. package/dist/es/window/window-container.service.js +0 -31
  131. package/dist/es/window/window-resize-handle.directive.js +0 -78
  132. package/dist/es/window/window-settings.js +0 -34
  133. package/dist/es/window/window-titlebar.component.js +0 -144
  134. package/dist/es/window/window.component.js +0 -808
  135. package/dist/es/window/window.service.js +0 -214
  136. package/dist/es/window.module.js +0 -76
  137. package/dist/es2015/dialog/dialog-actions.component.js +0 -98
  138. package/dist/es2015/dialog/dialog-container.directive.js +0 -30
  139. package/dist/es2015/dialog/dialog-container.service.js +0 -23
  140. package/dist/es2015/dialog/dialog-settings.js +0 -30
  141. package/dist/es2015/dialog/dialog-titlebar.component.js +0 -106
  142. package/dist/es2015/dialogs.module.js +0 -41
  143. package/dist/es2015/index.d.ts +0 -22
  144. package/dist/es2015/index.js +0 -22
  145. package/dist/es2015/index.metadata.json +0 -1
  146. package/dist/es2015/localization/custom-messages.component.js +0 -36
  147. package/dist/es2015/localization/localized-messages.directive.js +0 -35
  148. package/dist/es2015/localization/messages.js +0 -28
  149. package/dist/es2015/localization/titlebar-localization.service.js +0 -31
  150. package/dist/es2015/shared.module.js +0 -31
  151. package/dist/es2015/window/actions/window-close-action.directive.js +0 -60
  152. package/dist/es2015/window/actions/window-maximize-action.directive.js +0 -68
  153. package/dist/es2015/window/actions/window-minimize-action.directive.js +0 -68
  154. package/dist/es2015/window/actions/window-restore-action.directive.js +0 -68
  155. package/dist/es2015/window/window-container.directive.js +0 -30
  156. package/dist/es2015/window/window-container.service.js +0 -23
  157. package/dist/es2015/window.module.d.ts +0 -28
  158. package/dist/fesm5/index.js +0 -3474
  159. package/dist/npm/common/actions-layout.js +0 -6
  160. package/dist/npm/common/preventable-event.js +0 -31
  161. package/dist/npm/common/util.js +0 -219
  162. package/dist/npm/dialog/dialog-actions.component.js +0 -91
  163. package/dist/npm/dialog/dialog-container.directive.js +0 -33
  164. package/dist/npm/dialog/dialog-container.service.js +0 -33
  165. package/dist/npm/dialog/dialog-content-base.js +0 -47
  166. package/dist/npm/dialog/dialog-settings.js +0 -48
  167. package/dist/npm/dialog/dialog-titlebar.component.js +0 -96
  168. package/dist/npm/dialog/dialog.component.js +0 -464
  169. package/dist/npm/dialog/dialog.service.js +0 -216
  170. package/dist/npm/dialog.module.js +0 -58
  171. package/dist/npm/dialogs.module.js +0 -46
  172. package/dist/npm/index.js +0 -40
  173. package/dist/npm/localization/custom-messages.component.js +0 -46
  174. package/dist/npm/localization/dialog-localization.service.js +0 -11
  175. package/dist/npm/localization/localized-messages.directive.js +0 -37
  176. package/dist/npm/localization/messages.js +0 -36
  177. package/dist/npm/localization/titlebar-localization.service.js +0 -36
  178. package/dist/npm/main.js +0 -45
  179. package/dist/npm/package-metadata.js +0 -17
  180. package/dist/npm/shared.module.js +0 -36
  181. package/dist/npm/window/actions/window-close-action.directive.js +0 -65
  182. package/dist/npm/window/actions/window-maximize-action.directive.js +0 -77
  183. package/dist/npm/window/actions/window-minimize-action.directive.js +0 -77
  184. package/dist/npm/window/actions/window-restore-action.directive.js +0 -77
  185. package/dist/npm/window/drag-resize.service.js +0 -353
  186. package/dist/npm/window/navigation.service.js +0 -157
  187. package/dist/npm/window/window-container.directive.js +0 -33
  188. package/dist/npm/window/window-container.service.js +0 -33
  189. package/dist/npm/window/window-events.js +0 -6
  190. package/dist/npm/window/window-resize-handle.directive.js +0 -80
  191. package/dist/npm/window/window-settings.js +0 -36
  192. package/dist/npm/window/window-titlebar.component.js +0 -146
  193. package/dist/npm/window/window.component.js +0 -810
  194. package/dist/npm/window/window.service.js +0 -216
  195. package/dist/npm/window.module.js +0 -78
  196. 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
- import { ComponentFactoryResolver, Injectable, Renderer2, TemplateRef, Inject } from '@angular/core';
7
- import { merge, Subject } from 'rxjs';
8
- import { filter, map, share, take } from 'rxjs/operators';
9
- import { WindowCloseResult, WindowRef } from './window-settings';
10
- import { WindowComponent } from './window.component';
11
- import { isPresent, isString } from '../common/util';
12
- import { WindowContainerService } from '../window/window-container.service';
13
- var isNotComponent = function (component) { return isString(component) || component instanceof TemplateRef; };
14
- var ɵ0 = isNotComponent;
15
- var WindowInjector = /** @class */ (function () {
16
- function WindowInjector(getWindowRef, parentInjector) {
17
- this.getWindowRef = getWindowRef;
18
- this.parentInjector = parentInjector;
19
- }
20
- WindowInjector.prototype.get = function (token, notFoundValue) {
21
- if (token === WindowRef) {
22
- return this.getWindowRef();
23
- }
24
- return this.parentInjector.get(token, notFoundValue);
25
- };
26
- return WindowInjector;
27
- }());
28
- /**
29
- * A service for opening Windows dynamically
30
- * ([see example]({% slug service_window %})).
31
- */
32
- var WindowService = /** @class */ (function () {
33
- function WindowService(
34
- /**
35
- * @hidden
36
- */
37
- resolver, containerService) {
38
- this.resolver = resolver;
39
- this.containerService = containerService;
40
- }
41
- /**
42
- * Opens a Window component.
43
- *
44
- * @param {WindowSettings} settings - The settings that define the Window.
45
- * @returns {WindowRef} - A reference to the Window object.
46
- *
47
- * @example
48
- *
49
- * ```ts-no-run
50
- * _@Component({
51
- * selector: 'my-app',
52
- * template: `
53
- * <button kendoButton (click)="open()">Open window</button>
54
- * <div kendoWindowContainer></div>
55
- * `
56
- * })
57
- * export class AppComponent {
58
- * constructor( private windowService: WindowService ) {}
59
- *
60
- * public open() {
61
- * var window = this.windowService.open({
62
- * title: "My window",
63
- * content: "My content!"
64
- * });
65
- *
66
- * window.result.subscribe((result) => {
67
- * if (result instanceof WindowCloseResult) {
68
- * console.log("Window was closed");
69
- * }
70
- * });
71
- * }
72
- * }
73
- * ```
74
- *
75
- */
76
- WindowService.prototype.open = function (settings) {
77
- var factory = this.resolver.resolveComponentFactory(WindowComponent);
78
- var container = settings.appendTo || this.containerService.container;
79
- if (!container) {
80
- throw new Error("Cannot attach window to the page.\n Add an element that uses the kendoWindowContainer directive, or set the 'appendTo' property.\n See https://www.telerik.com/kendo-angular-ui/components/dialogs/window/service/\n ");
81
- }
82
- var windowRef = {
83
- close: function () { },
84
- content: null,
85
- result: null,
86
- window: null
87
- };
88
- var content = this.contentFrom(settings.content, container, windowRef);
89
- var window = container.createComponent(factory, undefined, undefined, content.nodes);
90
- windowRef.window = window;
91
- this.applyOptions(window.instance, settings);
92
- var apiClose = new Subject();
93
- var close = function (e) {
94
- apiClose.next(e || new WindowCloseResult());
95
- if (content.componentRef) {
96
- content.componentRef.destroy();
97
- }
98
- window.destroy();
99
- };
100
- var result = merge(apiClose, window.instance.close.pipe(map(function (e) { return (e ? e : new WindowCloseResult()); }), filter(function (e) {
101
- if (settings.preventClose) {
102
- // add windowRef only when using component
103
- var windowRefParameter = isNotComponent(settings.content) ? undefined : windowRef;
104
- return !settings.preventClose(e, windowRefParameter);
105
- }
106
- return true;
107
- }))).pipe(take(1),
108
- // Takes care for multiple subscriptions:
109
- // We subscribe internally and the user may subscribe to get a close result - window.result.subscribe().
110
- // This causes multiple subscriptions to the same source and thus multiple emissions. share() solves that.
111
- share());
112
- result.subscribe(close);
113
- windowRef.close = close;
114
- windowRef.result = result;
115
- window.changeDetectorRef.markForCheck();
116
- return windowRef;
117
- };
118
- WindowService.prototype.applyOptions = function (instance, options) {
119
- if (isPresent(options.htmlAttributes)) {
120
- instance.htmlAttributes = options.htmlAttributes;
121
- }
122
- if (isPresent(options.cssClass)) {
123
- instance.cssClass = options.cssClass;
124
- }
125
- if (isPresent(options.title)) {
126
- instance.title = options.title;
127
- }
128
- if (isPresent(options.keepContent)) {
129
- instance.keepContent = options.keepContent;
130
- }
131
- if (isPresent(options.width)) {
132
- instance.width = options.width;
133
- }
134
- if (isPresent(options.minWidth)) {
135
- instance.minWidth = options.minWidth;
136
- }
137
- if (isPresent(options.height)) {
138
- instance.height = options.height;
139
- }
140
- if (isPresent(options.minHeight)) {
141
- instance.minHeight = options.minHeight;
142
- }
143
- if (isPresent(options.left)) {
144
- instance.left = options.left;
145
- }
146
- if (isPresent(options.top)) {
147
- instance.top = options.top;
148
- }
149
- if (isPresent(options.draggable)) {
150
- instance.draggable = options.draggable;
151
- }
152
- if (isPresent(options.resizable)) {
153
- instance.resizable = options.resizable;
154
- }
155
- if (isPresent(options.messages && options.messages.closeTitle)) {
156
- instance.messages.closeTitle = options.messages.closeTitle;
157
- }
158
- if (isPresent(options.messages && options.messages.restoreTitle)) {
159
- instance.messages.restoreTitle = options.messages.restoreTitle;
160
- }
161
- if (isPresent(options.messages && options.messages.maximizeTitle)) {
162
- instance.messages.maximizeTitle = options.messages.maximizeTitle;
163
- }
164
- if (isPresent(options.messages && options.messages.minimizeTitle)) {
165
- instance.messages.minimizeTitle = options.messages.minimizeTitle;
166
- }
167
- if (isPresent(options.autoFocusedElement)) {
168
- instance.autoFocusedElement = options.autoFocusedElement;
169
- }
170
- if (isPresent(options.state)) {
171
- instance.state = options.state;
172
- if (options.state === 'minimized') {
173
- instance.keepContent = true;
174
- }
175
- }
176
- if (options.content instanceof TemplateRef) {
177
- instance.contentTemplate = options.content;
178
- }
179
- if (options.titleBarContent instanceof TemplateRef) {
180
- instance.titleBarTemplate = options.titleBarContent;
181
- }
182
- };
183
- WindowService.prototype.contentFrom = function (content, container, windowRef) {
184
- var renderer = container.injector.get(Renderer2);
185
- var nodes = [];
186
- var componentRef = null;
187
- if (typeof content === 'string') {
188
- nodes = [renderer.createText(content)];
189
- }
190
- else if (content && !(content instanceof TemplateRef)) {
191
- var injector = new WindowInjector(function () { return windowRef; }, container.injector);
192
- var factory = this.resolver.resolveComponentFactory(content);
193
- componentRef = container.createComponent(factory, undefined, injector);
194
- nodes = [componentRef.location.nativeElement];
195
- windowRef.content = componentRef;
196
- }
197
- return {
198
- componentRef: componentRef,
199
- nodes: [
200
- [],
201
- nodes // Content
202
- ]
203
- };
204
- };
205
- WindowService = tslib_1.__decorate([
206
- Injectable(),
207
- tslib_1.__param(1, Inject(WindowContainerService)),
208
- tslib_1.__metadata("design:paramtypes", [ComponentFactoryResolver,
209
- WindowContainerService])
210
- ], WindowService);
211
- return WindowService;
212
- }());
213
- export { WindowService };
214
- export { ɵ0 };
@@ -1,76 +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 { WindowComponent } from "./window/window.component";
8
- import { WindowTitleBarComponent } from "./window/window-titlebar.component";
9
- import { DraggableModule } from '@progress/kendo-angular-common';
10
- import { ResizeHandleDirective } from './window/window-resize-handle.directive';
11
- import { WindowMaximizeActionDirective } from './window/actions/window-maximize-action.directive';
12
- import { WindowMinimizeActionDirective } from './window/actions/window-minimize-action.directive';
13
- import { WindowCloseActionDirective } from './window/actions/window-close-action.directive';
14
- import { WindowRestoreActionDirective } from './window/actions/window-restore-action.directive';
15
- import { WindowService } from './window/window.service';
16
- import { WindowContainerService } from './window/window-container.service';
17
- import { WindowContainerDirective } from './window/window-container.directive';
18
- import { SharedModule, SHARED_DIRECTIVES } from './shared.module';
19
- var WINDOW_DIRECTIVES = [
20
- ResizeHandleDirective,
21
- WindowComponent,
22
- WindowTitleBarComponent,
23
- WindowCloseActionDirective,
24
- WindowMinimizeActionDirective,
25
- WindowMaximizeActionDirective,
26
- WindowRestoreActionDirective
27
- ];
28
- var ENTRY_COMPONENTS = [
29
- WindowComponent,
30
- WindowTitleBarComponent
31
- ];
32
- var exportedModules = [
33
- WindowComponent,
34
- WindowCloseActionDirective,
35
- WindowMinimizeActionDirective,
36
- WindowMaximizeActionDirective,
37
- WindowRestoreActionDirective,
38
- WindowTitleBarComponent
39
- ];
40
- /**
41
- * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
42
- * definition for the Window component. Imports `WindowModule` into the
43
- * [root module]({{ site.data.urls.angular['ngmodules'] }}#angular-modularity)
44
- * of your application or into any other sub-module that will use the Window component.
45
- *
46
- * @example
47
- * ```ts-no-run
48
- * import { NgModule } from '@angular/core';
49
- * import { BrowserModule } from '@angular/platform-browser';
50
- * import { WindowModule } from '@progress/kendo-angular-window';
51
- * import { AppComponent } from './app.component';
52
- *
53
- * _@NgModule({
54
- * bootstrap: [AppComponent],
55
- * declarations: [AppComponent],
56
- * imports: [BrowserModule, WindowModule]
57
- * })
58
- * export class AppModule {
59
- * }
60
- * ```
61
- */
62
- var WindowModule = /** @class */ (function () {
63
- function WindowModule() {
64
- }
65
- WindowModule = tslib_1.__decorate([
66
- NgModule({
67
- declarations: [WINDOW_DIRECTIVES, WindowContainerDirective],
68
- entryComponents: [ENTRY_COMPONENTS],
69
- exports: [exportedModules, SHARED_DIRECTIVES, WindowContainerDirective],
70
- imports: [SharedModule, DraggableModule],
71
- providers: [WindowContainerService, WindowService]
72
- })
73
- ], WindowModule);
74
- return WindowModule;
75
- }());
76
- export { WindowModule };
@@ -1,98 +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, EventEmitter, HostBinding, TemplateRef, Input, Output, ElementRef } from '@angular/core';
7
- import { parseCSSClassNames } from '../common/util';
8
- /**
9
- * Specifies the action buttons of the Dialog
10
- * ([see example]({% slug actionbuttons_dialog %})).
11
- */
12
- let DialogActionsComponent = class DialogActionsComponent {
13
- constructor(el) {
14
- this.el = el;
15
- /**
16
- * Specifies the possible layout of the action buttons.
17
- */
18
- this.layout = 'stretched';
19
- /**
20
- * Fires when the user clicks an action button.
21
- */
22
- this.action = new EventEmitter();
23
- this.buttonGroupClassName = true;
24
- }
25
- get className() {
26
- return this.layout === 'stretched';
27
- }
28
- /**
29
- * @hidden
30
- */
31
- actionTemplate() {
32
- return this.actions instanceof TemplateRef;
33
- }
34
- /**
35
- * @hidden
36
- */
37
- onButtonClick(action, _e) {
38
- this.action.emit(action);
39
- }
40
- /**
41
- * @hidden
42
- */
43
- buttonClass(action) {
44
- let classes = ['k-button k-button-md k-rounded-md'];
45
- const fillMode = action.fillMode ? action.fillMode : 'solid';
46
- const themeColor = action.themeColor ? action.themeColor : 'base';
47
- const cssClasses = action.cssClass ? parseCSSClassNames(action.cssClass) : [];
48
- classes.push(`k-button-${fillMode} k-button-${fillMode}-${themeColor}`);
49
- if (cssClasses.length > 0) {
50
- classes = classes.concat(cssClasses);
51
- }
52
- return classes.join(' ');
53
- }
54
- };
55
- tslib_1.__decorate([
56
- Input(),
57
- tslib_1.__metadata("design:type", Object)
58
- ], DialogActionsComponent.prototype, "actions", void 0);
59
- tslib_1.__decorate([
60
- Input(),
61
- tslib_1.__metadata("design:type", String)
62
- ], DialogActionsComponent.prototype, "layout", void 0);
63
- tslib_1.__decorate([
64
- Output(),
65
- tslib_1.__metadata("design:type", EventEmitter)
66
- ], DialogActionsComponent.prototype, "action", void 0);
67
- tslib_1.__decorate([
68
- HostBinding('class.k-dialog-buttongroup'),
69
- HostBinding('class.k-actions'),
70
- tslib_1.__metadata("design:type", Boolean)
71
- ], DialogActionsComponent.prototype, "buttonGroupClassName", void 0);
72
- tslib_1.__decorate([
73
- HostBinding('class.k-actions-stretched'),
74
- tslib_1.__metadata("design:type", Boolean),
75
- tslib_1.__metadata("design:paramtypes", [])
76
- ], DialogActionsComponent.prototype, "className", null);
77
- DialogActionsComponent = tslib_1.__decorate([
78
- Component({
79
- selector: 'kendo-dialog-actions',
80
- template: `
81
- <ng-content *ngIf="!actions"></ng-content>
82
- <ng-container *ngIf="!actionTemplate()">
83
- <button
84
- type="button"
85
- [ngClass]="buttonClass(action)"
86
- (click)="onButtonClick(action, $event)"
87
- *ngFor="let action of actions"
88
- [attr.aria-label]="action.text"
89
- >
90
- {{ action.text }}
91
- </button>
92
- </ng-container>
93
- <ng-template [ngTemplateOutlet]="actions" *ngIf="actionTemplate()"></ng-template>
94
- `
95
- }),
96
- tslib_1.__metadata("design:paramtypes", [ElementRef])
97
- ], DialogActionsComponent);
98
- export { DialogActionsComponent };
@@ -1,30 +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, ViewContainerRef } from '@angular/core';
7
- import { DialogContainerService } from './dialog-container.service';
8
- /**
9
- * Provides an insertion point for the Dialogs which are created through the
10
- * Dialog service ([see example]({% slug api_dialog_dialogservice %}#toc-open)).
11
- * Created Dialogs will be mounted after that element.
12
- *
13
- * @example
14
- * ```html-no-run
15
- * <div kendoDialogContainer></div>
16
- * ```
17
- */
18
- let DialogContainerDirective = class DialogContainerDirective {
19
- constructor(container, service) {
20
- service.container = container;
21
- }
22
- };
23
- DialogContainerDirective = tslib_1.__decorate([
24
- Directive({
25
- selector: '[kendoDialogContainer]'
26
- }),
27
- tslib_1.__metadata("design:paramtypes", [ViewContainerRef,
28
- DialogContainerService])
29
- ], DialogContainerDirective);
30
- export { DialogContainerDirective };
@@ -1,23 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as tslib_1 from "tslib";
6
- var DialogContainerService_1;
7
- import { Injectable } from '@angular/core';
8
- /**
9
- * @hidden
10
- */
11
- let DialogContainerService = DialogContainerService_1 = class DialogContainerService {
12
- set container(container) {
13
- DialogContainerService_1.container = container;
14
- }
15
- get container() {
16
- return DialogContainerService_1.container;
17
- }
18
- };
19
- DialogContainerService.container = null;
20
- DialogContainerService = DialogContainerService_1 = tslib_1.__decorate([
21
- Injectable()
22
- ], DialogContainerService);
23
- export { DialogContainerService };
@@ -1,30 +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 Dialog actions when the Dialog is opened through `DialogService`
7
- * ([see example]({% slug api_dialog_dialogservice %}#toc-open)).
8
- */
9
- export class DialogAction {
10
- }
11
- /**
12
- * Indicates that the **Close** button is clicked. Used when the results from
13
- * the Dialogs that are opened through `DialogService` are filtered
14
- * ([see example]({% slug api_dialog_dialogservice %}#toc-open)).
15
- */
16
- export class DialogCloseResult {
17
- }
18
- /**
19
- * The settings that can be used when the Dialog is opened through `DialogService`.
20
- * ([see example]({% slug api_dialog_dialogservice %}#toc-open)).
21
- */
22
- export class DialogSettings {
23
- }
24
- /**
25
- * Holds references to the object instance and published events of the Dialog.
26
- * Controls the Dialogs that were opened through the `DialogService`
27
- * ([see example]({% slug api_dialog_dialogservice %}#toc-open)).
28
- */
29
- export class DialogRef {
30
- }
@@ -1,106 +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, EventEmitter, HostBinding, Output, Input, ElementRef, Optional, NgZone } from '@angular/core';
7
- import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
8
- import { take } from 'rxjs/operators';
9
- import { PreventableEvent } from '../common/preventable-event';
10
- import { TitleBarLocalizationService } from '../localization/titlebar-localization.service';
11
- /**
12
- * Represents the [Kendo UI DialogTitleBar component for Angular]({% slug api_dialog_dialogtitlebarcomponent %}).
13
- *
14
- * It is used as part of the Dialog content when the component is created dynamically by using an [Angular service]({% slug service_dialog %}).
15
- */
16
- let DialogTitleBarComponent = class DialogTitleBarComponent {
17
- constructor(zone, hostElement, localizationService) {
18
- this.zone = zone;
19
- this.hostElement = hostElement;
20
- this.localizationService = localizationService;
21
- /**
22
- * Fires when the close button of the title-bar is clicked.
23
- */
24
- this.close = new EventEmitter();
25
- }
26
- get className() {
27
- return true;
28
- }
29
- get closeButtonTitle() {
30
- return this.closeTitle || this.localizationService.get('closeTitle');
31
- }
32
- ngAfterViewInit() {
33
- this.zone.onStable.pipe(take(1)).subscribe(() => {
34
- const element = this.hostElement.nativeElement.querySelector('.k-dialog-title');
35
- element.setAttribute('id', this.id);
36
- });
37
- }
38
- /**
39
- * @hidden
40
- */
41
- onCloseClick(e) {
42
- e.preventDefault();
43
- const eventArgs = new PreventableEvent();
44
- this.close.emit(eventArgs);
45
- }
46
- };
47
- tslib_1.__decorate([
48
- Output(),
49
- tslib_1.__metadata("design:type", EventEmitter)
50
- ], DialogTitleBarComponent.prototype, "close", void 0);
51
- tslib_1.__decorate([
52
- Input(),
53
- tslib_1.__metadata("design:type", String)
54
- ], DialogTitleBarComponent.prototype, "id", void 0);
55
- tslib_1.__decorate([
56
- Input(),
57
- tslib_1.__metadata("design:type", String)
58
- ], DialogTitleBarComponent.prototype, "closeTitle", void 0);
59
- tslib_1.__decorate([
60
- HostBinding('class.k-window-titlebar'),
61
- HostBinding('class.k-dialog-titlebar'),
62
- tslib_1.__metadata("design:type", Boolean),
63
- tslib_1.__metadata("design:paramtypes", [])
64
- ], DialogTitleBarComponent.prototype, "className", null);
65
- DialogTitleBarComponent = tslib_1.__decorate([
66
- Component({
67
- selector: 'kendo-dialog-titlebar',
68
- providers: [
69
- TitleBarLocalizationService,
70
- {
71
- provide: LocalizationService,
72
- useExisting: TitleBarLocalizationService
73
- },
74
- {
75
- provide: L10N_PREFIX,
76
- useValue: 'kendo.dialog'
77
- }
78
- ],
79
- template: `
80
- <ng-container
81
- kendoDialogTitleBarLocalizedMessages
82
- i18n-closeTitle="kendo.dialog.closeTitle|The title of the close button"
83
- closeTitle="Close"
84
- >
85
- <div class="k-window-title k-dialog-title">
86
- <ng-content></ng-content>
87
- </div>
88
-
89
- <div class="k-window-actions k-dialog-actions">
90
- <button
91
- role="button"
92
- [attr.title]="closeButtonTitle"
93
- [attr.aria-label]="closeButtonTitle"
94
- class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-window-action k-dialog-action k-dialog-close"
95
- (click)="onCloseClick($event)"
96
- >
97
- <span class="k-button-icon k-icon k-i-x"></span>
98
- </button>
99
- </div>
100
- </ng-container>
101
- `
102
- }),
103
- tslib_1.__param(2, Optional()),
104
- tslib_1.__metadata("design:paramtypes", [NgZone, ElementRef, LocalizationService])
105
- ], DialogTitleBarComponent);
106
- export { DialogTitleBarComponent };
@@ -1,41 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as tslib_1 from "tslib";
6
- import { NgModule } from '@angular/core';
7
- import { DialogModule } from './dialog.module';
8
- import { WindowModule } from './window.module';
9
- /**
10
- * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
11
- * definition for the Dialogs components.
12
- *
13
- * @example
14
- *
15
- * ```ts-no-run
16
- * import { DialogsModule } from '@progress/kendo-angular-dialog';
17
- *
18
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
19
- * import { NgModule } from '@angular/core';
20
- *
21
- * import { AppComponent } from './app.component';
22
- *
23
- * _@NgModule({
24
- * declarations: [AppComponent],
25
- * imports: [BrowserModule, DialogsModule],
26
- * bootstrap: [AppComponent]
27
- * })
28
- * export class AppModule {}
29
- *
30
- * platformBrowserDynamic().bootstrapModule(AppModule);
31
- *
32
- * ```
33
- */
34
- let DialogsModule = class DialogsModule {
35
- };
36
- DialogsModule = tslib_1.__decorate([
37
- NgModule({
38
- exports: [DialogModule, WindowModule]
39
- })
40
- ], DialogsModule);
41
- export { DialogsModule };
@@ -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,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';