@progress/kendo-angular-dialog 24.0.0 → 24.0.1-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,7 +17,7 @@ import { validatePackage } from '@progress/kendo-licensing';
|
|
|
17
17
|
import { of, Subscription, Subject, merge } from 'rxjs';
|
|
18
18
|
import * as i1$2 from '@progress/kendo-angular-common';
|
|
19
19
|
import { setHTMLAttributes, getLicenseMessage, shouldShowValidationUI, isDocumentAvailable, normalizeKeys, Keys, focusableSelector, WatermarkOverlayComponent, KENDO_WEBMCP_HOST, DraggableDirective, isChanged } from '@progress/kendo-angular-common';
|
|
20
|
-
import { offset,
|
|
20
|
+
import { offset, getWindowViewPort } from '@progress/kendo-popup-common';
|
|
21
21
|
import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -513,8 +513,8 @@ const packageMetadata = {
|
|
|
513
513
|
productName: 'Kendo UI for Angular',
|
|
514
514
|
productCode: 'KENDOUIANGULAR',
|
|
515
515
|
productCodes: ['KENDOUIANGULAR'],
|
|
516
|
-
publishDate:
|
|
517
|
-
version: '24.0.
|
|
516
|
+
publishDate: 1779368457,
|
|
517
|
+
version: '24.0.1-develop.1',
|
|
518
518
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
519
519
|
};
|
|
520
520
|
|
|
@@ -1906,13 +1906,9 @@ class DragResizeService {
|
|
|
1906
1906
|
const state = this.options.state;
|
|
1907
1907
|
const options = this.options;
|
|
1908
1908
|
this.window = el;
|
|
1909
|
-
if (state !== 'default') {
|
|
1909
|
+
if (state !== 'default' && !isPresent(this.restoreOptions)) {
|
|
1910
1910
|
this.restoreOptions = Object.assign({}, options);
|
|
1911
1911
|
}
|
|
1912
|
-
if (state === 'minimized') {
|
|
1913
|
-
options.height = 0;
|
|
1914
|
-
options.minHeight = 0;
|
|
1915
|
-
}
|
|
1916
1912
|
if (state === 'maximized') {
|
|
1917
1913
|
options.position = 'fixed';
|
|
1918
1914
|
}
|
|
@@ -2060,7 +2056,7 @@ class DragResizeService {
|
|
|
2060
2056
|
this.storeOptions();
|
|
2061
2057
|
this.options = Object.assign({}, this.options, {
|
|
2062
2058
|
height: null,
|
|
2063
|
-
|
|
2059
|
+
position: 'absolute',
|
|
2064
2060
|
state: 'minimized'
|
|
2065
2061
|
});
|
|
2066
2062
|
this.stateChange.emit('minimized');
|
|
@@ -2069,18 +2065,19 @@ class DragResizeService {
|
|
|
2069
2065
|
* Handles manual changes of the 'state' property.
|
|
2070
2066
|
* Required to distinguish them from action clicks.
|
|
2071
2067
|
*/
|
|
2072
|
-
applyManualState() {
|
|
2068
|
+
applyManualState(previousState) {
|
|
2073
2069
|
const state = this.options.state;
|
|
2074
2070
|
switch (state) {
|
|
2075
2071
|
case 'default':
|
|
2076
|
-
this.clearHeight();
|
|
2077
2072
|
this.defaultState();
|
|
2078
2073
|
break;
|
|
2079
2074
|
case 'maximized':
|
|
2080
|
-
this.clearHeight();
|
|
2081
2075
|
this.maximizeState();
|
|
2082
2076
|
break;
|
|
2083
2077
|
case 'minimized':
|
|
2078
|
+
if (previousState) {
|
|
2079
|
+
this.options.state = previousState;
|
|
2080
|
+
}
|
|
2084
2081
|
this.minimizeState();
|
|
2085
2082
|
break;
|
|
2086
2083
|
default:
|
|
@@ -2097,28 +2094,22 @@ class DragResizeService {
|
|
|
2097
2094
|
this.change.emit({ width: windowOffset.width });
|
|
2098
2095
|
}
|
|
2099
2096
|
}
|
|
2100
|
-
clearHeight() {
|
|
2101
|
-
if (this.options.height === 0) {
|
|
2102
|
-
delete this.options.height;
|
|
2103
|
-
}
|
|
2104
|
-
if (this.options.minHeight === 0) {
|
|
2105
|
-
delete this.options.minHeight;
|
|
2106
|
-
}
|
|
2107
|
-
}
|
|
2108
2097
|
center() {
|
|
2109
2098
|
if (this.options.state === 'maximized') {
|
|
2110
2099
|
return;
|
|
2111
2100
|
}
|
|
2112
|
-
const scroll = scrollPosition(this.window.nativeElement);
|
|
2113
2101
|
const wnd = this.windowViewPort;
|
|
2114
2102
|
const wrapper = offset(this.window.nativeElement);
|
|
2103
|
+
const el = this.window.nativeElement;
|
|
2115
2104
|
const ev = {};
|
|
2116
2105
|
if (!isPresent(this.options.left)) {
|
|
2117
|
-
|
|
2106
|
+
const targetX = Math.max(0, (wnd.width - wrapper.width) / 2);
|
|
2107
|
+
this.options.left = el.offsetLeft + targetX - wrapper.left;
|
|
2118
2108
|
ev.left = this.options.left;
|
|
2119
2109
|
}
|
|
2120
2110
|
if (!isPresent(this.options.top)) {
|
|
2121
|
-
|
|
2111
|
+
const targetY = Math.max(0, (wnd.height - wrapper.height) / 2);
|
|
2112
|
+
this.options.top = el.offsetTop + targetY - wrapper.top;
|
|
2122
2113
|
ev.top = this.options.top;
|
|
2123
2114
|
}
|
|
2124
2115
|
this.change.emit(ev);
|
|
@@ -2133,7 +2124,7 @@ class DragResizeService {
|
|
|
2133
2124
|
}
|
|
2134
2125
|
currentPosition() {
|
|
2135
2126
|
const o = this.options;
|
|
2136
|
-
if (!o.top || !o.left) {
|
|
2127
|
+
if (!isPresent(o.top) || !isPresent(o.left)) {
|
|
2137
2128
|
this.setPosition();
|
|
2138
2129
|
}
|
|
2139
2130
|
return {
|
|
@@ -2142,9 +2133,8 @@ class DragResizeService {
|
|
|
2142
2133
|
};
|
|
2143
2134
|
}
|
|
2144
2135
|
setPosition() {
|
|
2145
|
-
|
|
2146
|
-
this.options.
|
|
2147
|
-
this.options.top = wrapper.top;
|
|
2136
|
+
this.options.left = this.window.nativeElement.offsetLeft;
|
|
2137
|
+
this.options.top = this.window.nativeElement.offsetTop;
|
|
2148
2138
|
}
|
|
2149
2139
|
setRestoreOption(style, value) {
|
|
2150
2140
|
if (isPresent(this.restoreOptions)) {
|
|
@@ -3245,6 +3235,7 @@ class WindowComponent {
|
|
|
3245
3235
|
windowSubscription = new Subscription();
|
|
3246
3236
|
domSubs = new Subscription();
|
|
3247
3237
|
localizationChangeSubscription;
|
|
3238
|
+
stateAppliedByAction = null;
|
|
3248
3239
|
constructor(el, renderer, service, navigation, ngZone, localization) {
|
|
3249
3240
|
this.el = el;
|
|
3250
3241
|
this.renderer = renderer;
|
|
@@ -3296,11 +3287,10 @@ class WindowComponent {
|
|
|
3296
3287
|
}
|
|
3297
3288
|
}
|
|
3298
3289
|
if (isChanged('state', changes)) {
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
this.service.applyManualState();
|
|
3290
|
+
const appliedByAction = this.stateAppliedByAction === changes['state'].currentValue;
|
|
3291
|
+
this.stateAppliedByAction = null;
|
|
3292
|
+
if (!appliedByAction) {
|
|
3293
|
+
this.service.applyManualState(changes['state'].previousValue);
|
|
3304
3294
|
this.updateAllOffset();
|
|
3305
3295
|
}
|
|
3306
3296
|
}
|
|
@@ -3362,7 +3352,10 @@ class WindowComponent {
|
|
|
3362
3352
|
return this.minWidth + 'px';
|
|
3363
3353
|
}
|
|
3364
3354
|
get styleMinHeight() {
|
|
3365
|
-
|
|
3355
|
+
if (this.state === 'minimized') {
|
|
3356
|
+
return null;
|
|
3357
|
+
}
|
|
3358
|
+
return isPresent(this.minHeight) ? this.minHeight + 'px' : null;
|
|
3366
3359
|
}
|
|
3367
3360
|
get stylePosition() {
|
|
3368
3361
|
return this.options.position;
|
|
@@ -3391,7 +3384,7 @@ class WindowComponent {
|
|
|
3391
3384
|
return;
|
|
3392
3385
|
}
|
|
3393
3386
|
this.windowSubscription.add(this.service.focus.subscribe(() => {
|
|
3394
|
-
this.el.nativeElement.focus();
|
|
3387
|
+
this.el.nativeElement.focus({ preventScroll: true });
|
|
3395
3388
|
}));
|
|
3396
3389
|
this.windowSubscription.add(this.service.dragStart.subscribe(() => {
|
|
3397
3390
|
this.draged = true;
|
|
@@ -3442,6 +3435,8 @@ class WindowComponent {
|
|
|
3442
3435
|
this.windowSubscription.add(this.service.stateChange.subscribe((state) => {
|
|
3443
3436
|
if (isPresent(this.service.lastAction)) {
|
|
3444
3437
|
this.updateAllOffset();
|
|
3438
|
+
this.service.lastAction = null;
|
|
3439
|
+
this.stateAppliedByAction = state;
|
|
3445
3440
|
this.stateChange.emit(state);
|
|
3446
3441
|
}
|
|
3447
3442
|
}));
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = {
|
|
|
7
7
|
"productCodes": [
|
|
8
8
|
"KENDOUIANGULAR"
|
|
9
9
|
],
|
|
10
|
-
"publishDate":
|
|
11
|
-
"version": "24.0.
|
|
10
|
+
"publishDate": 1779368457,
|
|
11
|
+
"version": "24.0.1-develop.1",
|
|
12
12
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
13
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-dialog",
|
|
3
|
-
"version": "24.0.
|
|
3
|
+
"version": "24.0.1-develop.1",
|
|
4
4
|
"description": "Dialog Package for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"package": {
|
|
46
46
|
"productName": "Kendo UI for Angular",
|
|
47
47
|
"productCode": "KENDOUIANGULAR",
|
|
48
|
-
"publishDate":
|
|
48
|
+
"publishDate": 1779368457,
|
|
49
49
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
50
50
|
}
|
|
51
51
|
},
|
|
@@ -55,15 +55,15 @@
|
|
|
55
55
|
"@angular/core": "19 - 21",
|
|
56
56
|
"@angular/platform-browser": "19 - 21",
|
|
57
57
|
"@progress/kendo-licensing": "^1.11.0",
|
|
58
|
-
"@progress/kendo-angular-buttons": "24.0.
|
|
59
|
-
"@progress/kendo-angular-common": "24.0.
|
|
60
|
-
"@progress/kendo-angular-icons": "24.0.
|
|
61
|
-
"@progress/kendo-angular-l10n": "24.0.
|
|
58
|
+
"@progress/kendo-angular-buttons": "24.0.1-develop.1",
|
|
59
|
+
"@progress/kendo-angular-common": "24.0.1-develop.1",
|
|
60
|
+
"@progress/kendo-angular-icons": "24.0.1-develop.1",
|
|
61
|
+
"@progress/kendo-angular-l10n": "24.0.1-develop.1",
|
|
62
62
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"tslib": "^2.3.1",
|
|
66
|
-
"@progress/kendo-angular-schematics": "24.0.
|
|
66
|
+
"@progress/kendo-angular-schematics": "24.0.1-develop.1",
|
|
67
67
|
"@progress/kendo-popup-common": "1.9.5"
|
|
68
68
|
},
|
|
69
69
|
"schematics": "./schematics/collection.json",
|
|
@@ -9,7 +9,7 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
9
9
|
function default_1(options) {
|
|
10
10
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'DialogsModule', package: 'dialog', peerDependencies: {
|
|
11
11
|
// Peer dependency of buttons
|
|
12
|
-
'@progress/kendo-angular-popup': '24.0.
|
|
12
|
+
'@progress/kendo-angular-popup': '24.0.1-develop.1',
|
|
13
13
|
// Peer dependency of icons
|
|
14
14
|
'@progress/kendo-svg-icons': '^4.0.0'
|
|
15
15
|
} });
|
|
@@ -52,10 +52,9 @@ export declare class DragResizeService implements OnDestroy {
|
|
|
52
52
|
* Handles manual changes of the 'state' property.
|
|
53
53
|
* Required to distinguish them from action clicks.
|
|
54
54
|
*/
|
|
55
|
-
applyManualState(): void;
|
|
55
|
+
applyManualState(previousState?: WindowState): void;
|
|
56
56
|
closeAction(): void;
|
|
57
57
|
ensureWidth(): void;
|
|
58
|
-
clearHeight(): void;
|
|
59
58
|
center(): void;
|
|
60
59
|
currentOffsetAndPosition(): any;
|
|
61
60
|
currentPosition(): any;
|
|
@@ -194,6 +194,7 @@ export declare class WindowComponent implements OnInit, OnDestroy, OnChanges, Af
|
|
|
194
194
|
private windowSubscription;
|
|
195
195
|
private domSubs;
|
|
196
196
|
private localizationChangeSubscription;
|
|
197
|
+
private stateAppliedByAction;
|
|
197
198
|
constructor(el: ElementRef, renderer: Renderer2, service: DragResizeService, navigation: NavigationService, ngZone: NgZone, localization: LocalizationService);
|
|
198
199
|
ngAfterViewInit(): void;
|
|
199
200
|
ngOnInit(): void;
|