@progress/kendo-angular-layout 18.1.0-develop.4 → 18.1.0-develop.6
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.
@@ -10,7 +10,7 @@ export const packageMetadata = {
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
11
11
|
productCode: 'KENDOUIANGULAR',
|
12
12
|
productCodes: ['KENDOUIANGULAR'],
|
13
|
-
publishDate:
|
14
|
-
version: '18.1.0-develop.
|
13
|
+
publishDate: 1738335130,
|
14
|
+
version: '18.1.0-develop.6',
|
15
15
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
16
16
|
};
|
@@ -7,12 +7,15 @@ import { Injectable, NgZone } from '@angular/core';
|
|
7
7
|
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
8
8
|
import { Subject } from 'rxjs';
|
9
9
|
import { getActiveTab, isTablistHorizontal } from './util';
|
10
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
10
11
|
import * as i0 from "@angular/core";
|
12
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
11
13
|
/**
|
12
14
|
* @hidden
|
13
15
|
*/
|
14
16
|
export class ScrollService {
|
15
17
|
ngZone;
|
18
|
+
localization;
|
16
19
|
owner;
|
17
20
|
position = 0;
|
18
21
|
scrollButtonActiveStateChange = new Subject();
|
@@ -37,8 +40,9 @@ export class ScrollService {
|
|
37
40
|
get tabsOverflow() {
|
38
41
|
return this.tablistOverflowSize > 0;
|
39
42
|
}
|
40
|
-
constructor(ngZone) {
|
43
|
+
constructor(ngZone, localization) {
|
41
44
|
this.ngZone = ngZone;
|
45
|
+
this.localization = localization;
|
42
46
|
}
|
43
47
|
toggleScrollButtonsState() {
|
44
48
|
const tabStrip = this.owner;
|
@@ -47,8 +51,10 @@ export class ScrollService {
|
|
47
51
|
}
|
48
52
|
const currentPrevButtonActive = !this.isDisabled('prev');
|
49
53
|
const currentNextButtonActive = !this.isDisabled('next');
|
50
|
-
const
|
51
|
-
const
|
54
|
+
const isHorizontal = isTablistHorizontal(this.owner.tabPosition);
|
55
|
+
const rtlDelta = this.localization.rtl && isHorizontal ? -1 : 1;
|
56
|
+
const calculatedPrevButtonActive = (this.position * rtlDelta) > 0 && this.tablistOverflowSize > 0;
|
57
|
+
const calculatedNextButtonActive = (this.position * rtlDelta) < this.tablistOverflowSize && this.tablistOverflowSize > 0;
|
52
58
|
if (calculatedPrevButtonActive !== currentPrevButtonActive) {
|
53
59
|
this.ngZone.run(() => this.toggleButtonActiveState('prev', calculatedPrevButtonActive));
|
54
60
|
}
|
@@ -127,15 +133,26 @@ export class ScrollService {
|
|
127
133
|
this.toggleScrollButtonsState();
|
128
134
|
}
|
129
135
|
calculateListPosition(direction, scrollSpeed) {
|
130
|
-
|
131
|
-
|
136
|
+
const isHorizontal = isTablistHorizontal(this.owner.tabPosition);
|
137
|
+
if (direction === 'prev') {
|
138
|
+
if (this.localization.rtl && isHorizontal) {
|
139
|
+
this.position = this.position + scrollSpeed >= 0 ? 0 : this.position + scrollSpeed;
|
140
|
+
}
|
141
|
+
else {
|
142
|
+
this.position = this.position - scrollSpeed <= 0 ? 0 : this.position - scrollSpeed;
|
143
|
+
}
|
132
144
|
}
|
133
145
|
else if (direction === 'next' && this.position < this.tablistOverflowSize) {
|
134
146
|
if (this.position + scrollSpeed > this.tablistOverflowSize) {
|
135
147
|
this.position = this.tablistOverflowSize;
|
136
148
|
return;
|
137
149
|
}
|
138
|
-
this.
|
150
|
+
if (this.localization.rtl && isHorizontal) {
|
151
|
+
this.position -= scrollSpeed;
|
152
|
+
}
|
153
|
+
else {
|
154
|
+
this.position += scrollSpeed;
|
155
|
+
}
|
139
156
|
}
|
140
157
|
}
|
141
158
|
restoreScrollPosition() {
|
@@ -151,9 +168,9 @@ export class ScrollService {
|
|
151
168
|
this.scrollButtonActiveStateChange.next({ buttonType, active });
|
152
169
|
}
|
153
170
|
isDisabled = (buttonType) => this.owner[`${buttonType}ScrollButton`]?.host.nativeElement.classList.contains('k-disabled');
|
154
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScrollService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
171
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScrollService, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
155
172
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScrollService });
|
156
173
|
}
|
157
174
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScrollService, decorators: [{
|
158
175
|
type: Injectable
|
159
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
176
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.LocalizationService }]; } });
|
@@ -29,8 +29,8 @@ const packageMetadata = {
|
|
29
29
|
productName: 'Kendo UI for Angular',
|
30
30
|
productCode: 'KENDOUIANGULAR',
|
31
31
|
productCodes: ['KENDOUIANGULAR'],
|
32
|
-
publishDate:
|
33
|
-
version: '18.1.0-develop.
|
32
|
+
publishDate: 1738335130,
|
33
|
+
version: '18.1.0-develop.6',
|
34
34
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
35
35
|
};
|
36
36
|
|
@@ -3334,6 +3334,7 @@ const DEFAULT_SCROLL_BEHAVIOR = 'smooth';
|
|
3334
3334
|
*/
|
3335
3335
|
class ScrollService {
|
3336
3336
|
ngZone;
|
3337
|
+
localization;
|
3337
3338
|
owner;
|
3338
3339
|
position = 0;
|
3339
3340
|
scrollButtonActiveStateChange = new Subject();
|
@@ -3358,8 +3359,9 @@ class ScrollService {
|
|
3358
3359
|
get tabsOverflow() {
|
3359
3360
|
return this.tablistOverflowSize > 0;
|
3360
3361
|
}
|
3361
|
-
constructor(ngZone) {
|
3362
|
+
constructor(ngZone, localization) {
|
3362
3363
|
this.ngZone = ngZone;
|
3364
|
+
this.localization = localization;
|
3363
3365
|
}
|
3364
3366
|
toggleScrollButtonsState() {
|
3365
3367
|
const tabStrip = this.owner;
|
@@ -3368,8 +3370,10 @@ class ScrollService {
|
|
3368
3370
|
}
|
3369
3371
|
const currentPrevButtonActive = !this.isDisabled('prev');
|
3370
3372
|
const currentNextButtonActive = !this.isDisabled('next');
|
3371
|
-
const
|
3372
|
-
const
|
3373
|
+
const isHorizontal = isTablistHorizontal(this.owner.tabPosition);
|
3374
|
+
const rtlDelta = this.localization.rtl && isHorizontal ? -1 : 1;
|
3375
|
+
const calculatedPrevButtonActive = (this.position * rtlDelta) > 0 && this.tablistOverflowSize > 0;
|
3376
|
+
const calculatedNextButtonActive = (this.position * rtlDelta) < this.tablistOverflowSize && this.tablistOverflowSize > 0;
|
3373
3377
|
if (calculatedPrevButtonActive !== currentPrevButtonActive) {
|
3374
3378
|
this.ngZone.run(() => this.toggleButtonActiveState('prev', calculatedPrevButtonActive));
|
3375
3379
|
}
|
@@ -3448,15 +3452,26 @@ class ScrollService {
|
|
3448
3452
|
this.toggleScrollButtonsState();
|
3449
3453
|
}
|
3450
3454
|
calculateListPosition(direction, scrollSpeed) {
|
3451
|
-
|
3452
|
-
|
3455
|
+
const isHorizontal = isTablistHorizontal(this.owner.tabPosition);
|
3456
|
+
if (direction === 'prev') {
|
3457
|
+
if (this.localization.rtl && isHorizontal) {
|
3458
|
+
this.position = this.position + scrollSpeed >= 0 ? 0 : this.position + scrollSpeed;
|
3459
|
+
}
|
3460
|
+
else {
|
3461
|
+
this.position = this.position - scrollSpeed <= 0 ? 0 : this.position - scrollSpeed;
|
3462
|
+
}
|
3453
3463
|
}
|
3454
3464
|
else if (direction === 'next' && this.position < this.tablistOverflowSize) {
|
3455
3465
|
if (this.position + scrollSpeed > this.tablistOverflowSize) {
|
3456
3466
|
this.position = this.tablistOverflowSize;
|
3457
3467
|
return;
|
3458
3468
|
}
|
3459
|
-
this.
|
3469
|
+
if (this.localization.rtl && isHorizontal) {
|
3470
|
+
this.position -= scrollSpeed;
|
3471
|
+
}
|
3472
|
+
else {
|
3473
|
+
this.position += scrollSpeed;
|
3474
|
+
}
|
3460
3475
|
}
|
3461
3476
|
}
|
3462
3477
|
restoreScrollPosition() {
|
@@ -3472,12 +3487,12 @@ class ScrollService {
|
|
3472
3487
|
this.scrollButtonActiveStateChange.next({ buttonType, active });
|
3473
3488
|
}
|
3474
3489
|
isDisabled = (buttonType) => this.owner[`${buttonType}ScrollButton`]?.host.nativeElement.classList.contains('k-disabled');
|
3475
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScrollService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
3490
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScrollService, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
3476
3491
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScrollService });
|
3477
3492
|
}
|
3478
3493
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScrollService, decorators: [{
|
3479
3494
|
type: Injectable
|
3480
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
3495
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.LocalizationService }]; } });
|
3481
3496
|
|
3482
3497
|
/**
|
3483
3498
|
* @hidden
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@progress/kendo-angular-layout",
|
3
|
-
"version": "18.1.0-develop.
|
3
|
+
"version": "18.1.0-develop.6",
|
4
4
|
"description": "Kendo UI for Angular Layout Package - a collection of components to create professional application layoyts",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
6
6
|
"author": "Progress",
|
@@ -35,7 +35,7 @@
|
|
35
35
|
"package": {
|
36
36
|
"productName": "Kendo UI for Angular",
|
37
37
|
"productCode": "KENDOUIANGULAR",
|
38
|
-
"publishDate":
|
38
|
+
"publishDate": 1738335130,
|
39
39
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"
|
40
40
|
}
|
41
41
|
},
|
@@ -45,17 +45,17 @@
|
|
45
45
|
"@angular/core": "16 - 19",
|
46
46
|
"@angular/platform-browser": "16 - 19",
|
47
47
|
"@progress/kendo-licensing": "^1.0.2",
|
48
|
-
"@progress/kendo-angular-common": "18.1.0-develop.
|
49
|
-
"@progress/kendo-angular-l10n": "18.1.0-develop.
|
50
|
-
"@progress/kendo-angular-progressbar": "18.1.0-develop.
|
51
|
-
"@progress/kendo-angular-icons": "18.1.0-develop.
|
52
|
-
"@progress/kendo-angular-buttons": "18.1.0-develop.
|
53
|
-
"@progress/kendo-angular-intl": "18.1.0-develop.
|
48
|
+
"@progress/kendo-angular-common": "18.1.0-develop.6",
|
49
|
+
"@progress/kendo-angular-l10n": "18.1.0-develop.6",
|
50
|
+
"@progress/kendo-angular-progressbar": "18.1.0-develop.6",
|
51
|
+
"@progress/kendo-angular-icons": "18.1.0-develop.6",
|
52
|
+
"@progress/kendo-angular-buttons": "18.1.0-develop.6",
|
53
|
+
"@progress/kendo-angular-intl": "18.1.0-develop.6",
|
54
54
|
"rxjs": "^6.5.3 || ^7.0.0"
|
55
55
|
},
|
56
56
|
"dependencies": {
|
57
57
|
"tslib": "^2.3.1",
|
58
|
-
"@progress/kendo-angular-schematics": "18.1.0-develop.
|
58
|
+
"@progress/kendo-angular-schematics": "18.1.0-develop.6",
|
59
59
|
"@progress/kendo-draggable": "^3.0.2"
|
60
60
|
},
|
61
61
|
"schematics": "./schematics/collection.json",
|
@@ -6,12 +6,14 @@ import { ScrollButtonActiveStateChange } from './models/button-state-change';
|
|
6
6
|
import { NgZone } from '@angular/core';
|
7
7
|
import { Subject } from 'rxjs';
|
8
8
|
import { TabStripComponent } from './tabstrip.component';
|
9
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
9
10
|
import * as i0 from "@angular/core";
|
10
11
|
/**
|
11
12
|
* @hidden
|
12
13
|
*/
|
13
14
|
export declare class ScrollService {
|
14
15
|
private ngZone;
|
16
|
+
private localization;
|
15
17
|
owner: TabStripComponent;
|
16
18
|
position: number;
|
17
19
|
scrollButtonActiveStateChange: Subject<ScrollButtonActiveStateChange>;
|
@@ -19,7 +21,7 @@ export declare class ScrollService {
|
|
19
21
|
get tabstripSize(): number;
|
20
22
|
get tablistOverflowSize(): number;
|
21
23
|
get tabsOverflow(): boolean;
|
22
|
-
constructor(ngZone: NgZone);
|
24
|
+
constructor(ngZone: NgZone, localization: LocalizationService);
|
23
25
|
toggleScrollButtonsState(): void;
|
24
26
|
scrollToSelectedTab(): void;
|
25
27
|
getScrollOffset(activeIndex: number): number;
|