@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.
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 +0 -0
  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 +0 -0
  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 +20 -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 +28 -0
  43. package/esm2015/localization/titlebar-localization.service.js +44 -0
  44. package/{dist/es2015 → esm2015}/main.js +8 -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 +29 -17
  68. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-dialog.js} +1023 -926
  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} +7 -2
  76. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  77. package/package.json +33 -105
  78. package/schematics/ngAdd/index.js +5 -2
  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,6 +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
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- /**
8
- * @hidden
9
- */
10
- var PreventableEvent = /** @class */ (function () {
11
- function PreventableEvent() {
12
- this.prevented = false;
13
- }
14
- /**
15
- * Prevents the default action for a specified event.
16
- * In this way, the source component suppresses the built-in behavior that follows the event.
17
- */
18
- PreventableEvent.prototype.preventDefault = function () {
19
- this.prevented = true;
20
- };
21
- /**
22
- * If the event is prevented by any of its subscribers, returns `true`.
23
- *
24
- * @returns `true` if the default action was prevented. Otherwise, returns `false`.
25
- */
26
- PreventableEvent.prototype.isDefaultPrevented = function () {
27
- return this.prevented;
28
- };
29
- return PreventableEvent;
30
- }());
31
- exports.PreventableEvent = PreventableEvent;
@@ -1,219 +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
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var rxjs_1 = require("rxjs");
8
- var operators_1 = require("rxjs/operators");
9
- /**
10
- * @hidden
11
- */
12
- exports.isPresent = function (value) { return value !== null && value !== undefined; };
13
- /**
14
- * @hidden
15
- */
16
- exports.isTruthy = function (value) { return !!value; };
17
- var toClassList = function (classNames) { return String(classNames).trim().split(' '); };
18
- var ɵ0 = toClassList;
19
- exports.ɵ0 = ɵ0;
20
- var focusableRegex = /^(?:a|input|select|textarea|button|object)$/i;
21
- /**
22
- * @hidden
23
- */
24
- var Keys;
25
- (function (Keys) {
26
- Keys[Keys["esc"] = 27] = "esc";
27
- Keys[Keys["tab"] = 9] = "tab";
28
- Keys[Keys["enter"] = 13] = "enter";
29
- Keys[Keys["space"] = 32] = "space";
30
- Keys[Keys["ctrl"] = 17] = "ctrl";
31
- Keys[Keys["shift"] = 16] = "shift";
32
- Keys[Keys["left"] = 37] = "left";
33
- Keys[Keys["up"] = 38] = "up";
34
- Keys[Keys["right"] = 39] = "right";
35
- Keys[Keys["down"] = 40] = "down";
36
- })(Keys = exports.Keys || (exports.Keys = {}));
37
- /**
38
- * @hidden
39
- */
40
- exports.DIALOG_ELEMENTS_HANDLING_ESC_KEY = 'k-dialog-wrapper k-dialog-buttongroup k-dialog-action';
41
- /**
42
- * @hidden
43
- */
44
- exports.DIALOG_ELEMENTS_HANDLING_ARROWS = 'k-dialog-buttongroup';
45
- /**
46
- * @hidden
47
- */
48
- exports.WINDOW_CLASSES = 'k-window';
49
- /**
50
- * @hidden
51
- */
52
- exports.hasClasses = function (element, classNames) {
53
- var namesList = toClassList(classNames);
54
- return Boolean(toClassList(element.className).find(function (className) { return namesList.indexOf(className) >= 0; }));
55
- };
56
- /**
57
- * @hidden
58
- */
59
- exports.isVisible = function (element) {
60
- var rect = element.getBoundingClientRect();
61
- return !!(rect.width && rect.height) && window.getComputedStyle(element).visibility !== 'hidden';
62
- };
63
- /**
64
- * @hidden
65
- */
66
- exports.isFocusable = function (element, checkVisibility) {
67
- if (checkVisibility === void 0) { checkVisibility = true; }
68
- if (element.tagName) {
69
- var tagName = element.tagName.toLowerCase();
70
- var tabIndex = element.getAttribute('tabIndex');
71
- var validTabIndex = tabIndex !== null && !isNaN(tabIndex) && tabIndex > -1;
72
- var focusable = false;
73
- if (focusableRegex.test(tagName)) {
74
- focusable = !element.disabled;
75
- }
76
- else {
77
- focusable = validTabIndex;
78
- }
79
- return focusable && (!checkVisibility || exports.isVisible(element));
80
- }
81
- return false;
82
- };
83
- /**
84
- * @hidden
85
- */
86
- exports.setHTMLAttributes = function (attributes, renderer, element) {
87
- for (var attribute in attributes) {
88
- if (attribute) {
89
- renderer.setAttribute(element, attribute, attributes[attribute]);
90
- }
91
- }
92
- };
93
- /**
94
- * Receives CSS class declarations either as an object, string or array and returns an array of the class names.
95
- *
96
- * @hidden
97
- */
98
- exports.parseCSSClassNames = function (value) {
99
- if (exports.isObject(value)) {
100
- return parseObjectClassNames(value);
101
- }
102
- if (exports.isString(value)) {
103
- return parseStringClassNames(value);
104
- }
105
- if (Array.isArray(value)) {
106
- return parseArrayClassNames(value);
107
- }
108
- };
109
- var parseObjectClassNames = function (value) {
110
- var classes = [];
111
- Object.keys(value).forEach(function (className) {
112
- var currentClassName = exports.splitStringToArray(className);
113
- if (value[className] && currentClassName[0]) {
114
- classes.push.apply(classes, currentClassName);
115
- }
116
- });
117
- return classes;
118
- };
119
- var ɵ1 = parseObjectClassNames;
120
- exports.ɵ1 = ɵ1;
121
- var parseStringClassNames = function (value) {
122
- var classes = [];
123
- var classesArray = exports.splitStringToArray(value);
124
- classesArray.forEach(function (className) {
125
- classes.push(className);
126
- });
127
- return classes;
128
- };
129
- var ɵ2 = parseStringClassNames;
130
- exports.ɵ2 = ɵ2;
131
- var parseArrayClassNames = function (value) {
132
- var classes = [];
133
- value.forEach(function (className) {
134
- var current = exports.splitStringToArray(className);
135
- if (current[0]) {
136
- classes.push.apply(classes, current);
137
- }
138
- });
139
- return classes;
140
- };
141
- var ɵ3 = parseArrayClassNames;
142
- exports.ɵ3 = ɵ3;
143
- /**
144
- * @hidden
145
- */
146
- exports.focusableSelector = [
147
- 'a[href]',
148
- 'area[href]',
149
- 'input:not([disabled])',
150
- 'select:not([disabled])',
151
- 'textarea:not([disabled])',
152
- 'button:not([disabled])',
153
- 'iframe',
154
- 'object',
155
- 'embed',
156
- '*[tabindex]',
157
- '*[contenteditable]'
158
- ].join(',');
159
- /**
160
- * @hidden
161
- */
162
- exports.preventDefault = function (_a) {
163
- var event = _a.originalEvent;
164
- event.stopPropagation();
165
- event.preventDefault();
166
- };
167
- /**
168
- * @hidden
169
- */
170
- exports.isWindowAvailable = function () {
171
- return typeof window !== 'undefined';
172
- };
173
- /**
174
- * @hidden
175
- */
176
- exports.preventOnDblClick = function (release) { return function (mouseDown) {
177
- return rxjs_1.of(mouseDown).pipe(operators_1.delay(150), operators_1.takeUntil(release));
178
- }; };
179
- /**
180
- * @hidden
181
- */
182
- exports.RESIZE_DIRECTIONS = ['n', 'e', 's', 'w', 'se', 'sw', 'ne', 'nw'];
183
- /**
184
- * @hidden
185
- */
186
- exports.OFFSET_STYLES = ['top', 'left', 'width', 'height'];
187
- /**
188
- * @hidden
189
- */
190
- exports.isString = function (value) { return value instanceof String || typeof value === 'string'; };
191
- /**
192
- * @hidden
193
- */
194
- exports.isObject = function (value) { return exports.isPresent(value) && !Array.isArray(value) && typeof value === 'object'; };
195
- /**
196
- * @hidden
197
- */
198
- exports.isNumber = function (value) { return typeof value === 'number' && isFinite(value); };
199
- /**
200
- * @hidden
201
- */
202
- exports.createValueWithUnit = function (value) { return value + (exports.isNumber(value) ? 'px' : ''); };
203
- /**
204
- * @hidden
205
- */
206
- exports.splitStringToArray = function (value) { return value.trim().replace(/\s+/g, " ").split(' '); };
207
- /**
208
- * @hidden
209
- */
210
- exports.findPrimaryButton = function (buttons) {
211
- for (var i = buttons.length - 1; i >= 0; i--) {
212
- var classList = buttons[i].classList;
213
- for (var j = 0; j < classList.length; j++) {
214
- if (classList[j].endsWith('-primary')) {
215
- return buttons[i];
216
- }
217
- }
218
- }
219
- };
@@ -1,91 +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
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var util_1 = require("../common/util");
10
- /**
11
- * Specifies the action buttons of the Dialog
12
- * ([see example]({% slug actionbuttons_dialog %})).
13
- */
14
- var DialogActionsComponent = /** @class */ (function () {
15
- function DialogActionsComponent(el) {
16
- this.el = el;
17
- /**
18
- * Specifies the possible layout of the action buttons.
19
- */
20
- this.layout = 'stretched';
21
- /**
22
- * Fires when the user clicks an action button.
23
- */
24
- this.action = new core_1.EventEmitter();
25
- this.buttonGroupClassName = true;
26
- }
27
- Object.defineProperty(DialogActionsComponent.prototype, "className", {
28
- get: function () {
29
- return this.layout === 'stretched';
30
- },
31
- enumerable: true,
32
- configurable: true
33
- });
34
- /**
35
- * @hidden
36
- */
37
- DialogActionsComponent.prototype.actionTemplate = function () {
38
- return this.actions instanceof core_1.TemplateRef;
39
- };
40
- /**
41
- * @hidden
42
- */
43
- DialogActionsComponent.prototype.onButtonClick = function (action, _e) {
44
- this.action.emit(action);
45
- };
46
- /**
47
- * @hidden
48
- */
49
- DialogActionsComponent.prototype.buttonClass = function (action) {
50
- var classes = ['k-button k-button-md k-rounded-md'];
51
- var fillMode = action.fillMode ? action.fillMode : 'solid';
52
- var themeColor = action.themeColor ? action.themeColor : 'base';
53
- var cssClasses = action.cssClass ? util_1.parseCSSClassNames(action.cssClass) : [];
54
- classes.push("k-button-" + fillMode + " k-button-" + fillMode + "-" + themeColor);
55
- if (cssClasses.length > 0) {
56
- classes = classes.concat(cssClasses);
57
- }
58
- return classes.join(' ');
59
- };
60
- tslib_1.__decorate([
61
- core_1.Input(),
62
- tslib_1.__metadata("design:type", Object)
63
- ], DialogActionsComponent.prototype, "actions", void 0);
64
- tslib_1.__decorate([
65
- core_1.Input(),
66
- tslib_1.__metadata("design:type", String)
67
- ], DialogActionsComponent.prototype, "layout", void 0);
68
- tslib_1.__decorate([
69
- core_1.Output(),
70
- tslib_1.__metadata("design:type", core_1.EventEmitter)
71
- ], DialogActionsComponent.prototype, "action", void 0);
72
- tslib_1.__decorate([
73
- core_1.HostBinding('class.k-dialog-buttongroup'),
74
- core_1.HostBinding('class.k-actions'),
75
- tslib_1.__metadata("design:type", Boolean)
76
- ], DialogActionsComponent.prototype, "buttonGroupClassName", void 0);
77
- tslib_1.__decorate([
78
- core_1.HostBinding('class.k-actions-stretched'),
79
- tslib_1.__metadata("design:type", Boolean),
80
- tslib_1.__metadata("design:paramtypes", [])
81
- ], DialogActionsComponent.prototype, "className", null);
82
- DialogActionsComponent = tslib_1.__decorate([
83
- core_1.Component({
84
- selector: 'kendo-dialog-actions',
85
- template: "\n <ng-content *ngIf=\"!actions\"></ng-content>\n <ng-container *ngIf=\"!actionTemplate()\">\n <button\n type=\"button\"\n [ngClass]=\"buttonClass(action)\"\n (click)=\"onButtonClick(action, $event)\"\n *ngFor=\"let action of actions\"\n [attr.aria-label]=\"action.text\"\n >\n {{ action.text }}\n </button>\n </ng-container>\n <ng-template [ngTemplateOutlet]=\"actions\" *ngIf=\"actionTemplate()\"></ng-template>\n "
86
- }),
87
- tslib_1.__metadata("design:paramtypes", [core_1.ElementRef])
88
- ], DialogActionsComponent);
89
- return DialogActionsComponent;
90
- }());
91
- exports.DialogActionsComponent = DialogActionsComponent;
@@ -1,33 +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
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var dialog_container_service_1 = require("./dialog-container.service");
10
- /**
11
- * Provides an insertion point for the Dialogs which are created through the
12
- * Dialog service ([see example]({% slug api_dialog_dialogservice %}#toc-open)).
13
- * Created Dialogs will be mounted after that element.
14
- *
15
- * @example
16
- * ```html-no-run
17
- * <div kendoDialogContainer></div>
18
- * ```
19
- */
20
- var DialogContainerDirective = /** @class */ (function () {
21
- function DialogContainerDirective(container, service) {
22
- service.container = container;
23
- }
24
- DialogContainerDirective = tslib_1.__decorate([
25
- core_1.Directive({
26
- selector: '[kendoDialogContainer]'
27
- }),
28
- tslib_1.__metadata("design:paramtypes", [core_1.ViewContainerRef,
29
- dialog_container_service_1.DialogContainerService])
30
- ], DialogContainerDirective);
31
- return DialogContainerDirective;
32
- }());
33
- exports.DialogContainerDirective = DialogContainerDirective;
@@ -1,33 +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
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- /**
10
- * @hidden
11
- */
12
- var DialogContainerService = /** @class */ (function () {
13
- function DialogContainerService() {
14
- }
15
- DialogContainerService_1 = DialogContainerService;
16
- Object.defineProperty(DialogContainerService.prototype, "container", {
17
- get: function () {
18
- return DialogContainerService_1.container;
19
- },
20
- set: function (container) {
21
- DialogContainerService_1.container = container;
22
- },
23
- enumerable: true,
24
- configurable: true
25
- });
26
- var DialogContainerService_1;
27
- DialogContainerService.container = null;
28
- DialogContainerService = DialogContainerService_1 = tslib_1.__decorate([
29
- core_1.Injectable()
30
- ], DialogContainerService);
31
- return DialogContainerService;
32
- }());
33
- exports.DialogContainerService = DialogContainerService;
@@ -1,47 +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
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var dialog_actions_component_1 = require("./dialog-actions.component");
9
- var dialog_titlebar_component_1 = require("./dialog-titlebar.component");
10
- var core_1 = require("@angular/core");
11
- var operators_1 = require("rxjs/operators");
12
- /**
13
- * The base class which will be extended by a component that is provided as content through `content`
14
- * ([see example]({% slug service_dialog %}#toc-passing-title-content-and-actions-as-a-single-component)).
15
- */
16
- var DialogContentBase = /** @class */ (function () {
17
- function DialogContentBase(dialog) {
18
- this.dialog = dialog;
19
- }
20
- /**
21
- * @hidden
22
- */
23
- DialogContentBase.prototype.ngAfterViewInit = function () {
24
- var _this = this;
25
- if (this.dialogTitleBar) {
26
- // when opening component inside dialog with service AND the component has defined its own titlebar
27
- this.dialogTitleBar.close.pipe(operators_1.filter(function (e) { return !e.isDefaultPrevented(); })).subscribe(function () {
28
- _this.dialog.close();
29
- });
30
- }
31
- if (this.dialogActions) {
32
- if (this.dialogActions.actions) {
33
- this.dialogActions.action.subscribe(function (action) { return _this.dialog.dialog.instance.action.emit(action); });
34
- }
35
- }
36
- };
37
- tslib_1.__decorate([
38
- core_1.ViewChild(dialog_titlebar_component_1.DialogTitleBarComponent, { static: false }),
39
- tslib_1.__metadata("design:type", dialog_titlebar_component_1.DialogTitleBarComponent)
40
- ], DialogContentBase.prototype, "dialogTitleBar", void 0);
41
- tslib_1.__decorate([
42
- core_1.ViewChild(dialog_actions_component_1.DialogActionsComponent, { static: false }),
43
- tslib_1.__metadata("design:type", dialog_actions_component_1.DialogActionsComponent)
44
- ], DialogContentBase.prototype, "dialogActions", void 0);
45
- return DialogContentBase;
46
- }());
47
- exports.DialogContentBase = DialogContentBase;
@@ -1,48 +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
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- /**
8
- * The settings for the Dialog actions when the Dialog is opened through `DialogService`
9
- * ([see example]({% slug api_dialog_dialogservice %}#toc-open)).
10
- */
11
- var DialogAction = /** @class */ (function () {
12
- function DialogAction() {
13
- }
14
- return DialogAction;
15
- }());
16
- exports.DialogAction = DialogAction;
17
- /**
18
- * Indicates that the **Close** button is clicked. Used when the results from
19
- * the Dialogs that are opened through `DialogService` are filtered
20
- * ([see example]({% slug api_dialog_dialogservice %}#toc-open)).
21
- */
22
- var DialogCloseResult = /** @class */ (function () {
23
- function DialogCloseResult() {
24
- }
25
- return DialogCloseResult;
26
- }());
27
- exports.DialogCloseResult = DialogCloseResult;
28
- /**
29
- * The settings that can be used when the Dialog is opened through `DialogService`.
30
- * ([see example]({% slug api_dialog_dialogservice %}#toc-open)).
31
- */
32
- var DialogSettings = /** @class */ (function () {
33
- function DialogSettings() {
34
- }
35
- return DialogSettings;
36
- }());
37
- exports.DialogSettings = DialogSettings;
38
- /**
39
- * Holds references to the object instance and published events of the Dialog.
40
- * Controls the Dialogs that were opened through the `DialogService`
41
- * ([see example]({% slug api_dialog_dialogservice %}#toc-open)).
42
- */
43
- var DialogRef = /** @class */ (function () {
44
- function DialogRef() {
45
- }
46
- return DialogRef;
47
- }());
48
- exports.DialogRef = DialogRef;
@@ -1,96 +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
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
10
- var operators_1 = require("rxjs/operators");
11
- var preventable_event_1 = require("../common/preventable-event");
12
- var titlebar_localization_service_1 = require("../localization/titlebar-localization.service");
13
- /**
14
- * Represents the [Kendo UI DialogTitleBar component for Angular]({% slug api_dialog_dialogtitlebarcomponent %}).
15
- *
16
- * It is used as part of the Dialog content when the component is created dynamically by using an [Angular service]({% slug service_dialog %}).
17
- */
18
- var DialogTitleBarComponent = /** @class */ (function () {
19
- function DialogTitleBarComponent(zone, hostElement, localizationService) {
20
- this.zone = zone;
21
- this.hostElement = hostElement;
22
- this.localizationService = localizationService;
23
- /**
24
- * Fires when the close button of the title-bar is clicked.
25
- */
26
- this.close = new core_1.EventEmitter();
27
- }
28
- Object.defineProperty(DialogTitleBarComponent.prototype, "className", {
29
- get: function () {
30
- return true;
31
- },
32
- enumerable: true,
33
- configurable: true
34
- });
35
- Object.defineProperty(DialogTitleBarComponent.prototype, "closeButtonTitle", {
36
- get: function () {
37
- return this.closeTitle || this.localizationService.get('closeTitle');
38
- },
39
- enumerable: true,
40
- configurable: true
41
- });
42
- DialogTitleBarComponent.prototype.ngAfterViewInit = function () {
43
- var _this = this;
44
- this.zone.onStable.pipe(operators_1.take(1)).subscribe(function () {
45
- var element = _this.hostElement.nativeElement.querySelector('.k-dialog-title');
46
- element.setAttribute('id', _this.id);
47
- });
48
- };
49
- /**
50
- * @hidden
51
- */
52
- DialogTitleBarComponent.prototype.onCloseClick = function (e) {
53
- e.preventDefault();
54
- var eventArgs = new preventable_event_1.PreventableEvent();
55
- this.close.emit(eventArgs);
56
- };
57
- tslib_1.__decorate([
58
- core_1.Output(),
59
- tslib_1.__metadata("design:type", core_1.EventEmitter)
60
- ], DialogTitleBarComponent.prototype, "close", void 0);
61
- tslib_1.__decorate([
62
- core_1.Input(),
63
- tslib_1.__metadata("design:type", String)
64
- ], DialogTitleBarComponent.prototype, "id", void 0);
65
- tslib_1.__decorate([
66
- core_1.Input(),
67
- tslib_1.__metadata("design:type", String)
68
- ], DialogTitleBarComponent.prototype, "closeTitle", void 0);
69
- tslib_1.__decorate([
70
- core_1.HostBinding('class.k-window-titlebar'),
71
- core_1.HostBinding('class.k-dialog-titlebar'),
72
- tslib_1.__metadata("design:type", Boolean),
73
- tslib_1.__metadata("design:paramtypes", [])
74
- ], DialogTitleBarComponent.prototype, "className", null);
75
- DialogTitleBarComponent = tslib_1.__decorate([
76
- core_1.Component({
77
- selector: 'kendo-dialog-titlebar',
78
- providers: [
79
- titlebar_localization_service_1.TitleBarLocalizationService,
80
- {
81
- provide: kendo_angular_l10n_1.LocalizationService,
82
- useExisting: titlebar_localization_service_1.TitleBarLocalizationService
83
- },
84
- {
85
- provide: kendo_angular_l10n_1.L10N_PREFIX,
86
- useValue: 'kendo.dialog'
87
- }
88
- ],
89
- template: "\n <ng-container\n kendoDialogTitleBarLocalizedMessages\n i18n-closeTitle=\"kendo.dialog.closeTitle|The title of the close button\"\n closeTitle=\"Close\"\n >\n <div class=\"k-window-title k-dialog-title\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"k-window-actions k-dialog-actions\">\n <button\n role=\"button\"\n [attr.title]=\"closeButtonTitle\"\n [attr.aria-label]=\"closeButtonTitle\"\n 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\"\n (click)=\"onCloseClick($event)\"\n >\n <span class=\"k-button-icon k-icon k-i-x\"></span>\n </button>\n </div>\n </ng-container>\n "
90
- }),
91
- tslib_1.__param(2, core_1.Optional()),
92
- tslib_1.__metadata("design:paramtypes", [core_1.NgZone, core_1.ElementRef, kendo_angular_l10n_1.LocalizationService])
93
- ], DialogTitleBarComponent);
94
- return DialogTitleBarComponent;
95
- }());
96
- exports.DialogTitleBarComponent = DialogTitleBarComponent;