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