@progress/kendo-angular-layout 18.5.2-develop.7 → 18.5.2-develop.8

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: 1744877466,
14
- version: '18.5.2-develop.7',
13
+ publishDate: 1744880209,
14
+ version: '18.5.2-develop.8',
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
  };
@@ -178,20 +178,22 @@ export class TileLayoutDraggingService {
178
178
  const targetCol = normalizeValue(this.currentColStart);
179
179
  const targetRow = normalizeValue(this.currentRowStart);
180
180
  if (propsChanged([this.targetOrder, targetCol, targetRow], [initialOrder, initialCol, initialRow])) {
181
- const reorderEvent = new TileLayoutReorderEvent(this.draggedItem, this.tileLayoutSettings.items, this.targetOrder, initialOrder, normalizeValue(this.currentColStart), initialCol, targetRow, initialRow);
181
+ const reorderEvent = new TileLayoutReorderEvent(this.draggedItem, this.tileLayoutSettings.items, this.targetOrder, initialOrder, targetCol, initialCol, targetRow, initialRow);
182
182
  this.reorder.next(reorderEvent);
183
183
  if (!reorderEvent.isDefaultPrevented()) {
184
184
  if (this.targetOrder > initialOrder) {
185
185
  this.zone.run(() => {
186
186
  for (let i = initialOrder + 1; i <= this.targetOrder; i++) {
187
- this.tileLayoutSettings.items.find(item => item.order === i).order = i - 1;
187
+ const item = this.tileLayoutSettings.items.find(item => item.order === i);
188
+ item && (item.order = i - 1);
188
189
  }
189
190
  });
190
191
  }
191
192
  else {
192
193
  this.zone.run(() => {
193
194
  for (let i = initialOrder - 1; i >= this.targetOrder; i--) {
194
- this.tileLayoutSettings.items.find(item => item.order === i).order = i + 1;
195
+ const item = this.tileLayoutSettings.items.find(item => item.order === i);
196
+ item && (item.order = i + 1);
195
197
  }
196
198
  });
197
199
  }
@@ -398,9 +400,9 @@ export class TileLayoutDraggingService {
398
400
  }
399
401
  getTargetCol(col, direction) {
400
402
  if (this.rtl) {
401
- return direction === 'left' ? col - this.draggedItem.colSpan + 1 : col;
403
+ return normalizeValue(direction === 'left' ? col - this.draggedItem.colSpan + 1 : col, this.tileLayoutSettings.columns);
402
404
  }
403
- return direction === 'right' ? col - this.draggedItem.colSpan + 1 : col;
405
+ return normalizeValue(direction === 'right' ? col - this.draggedItem.colSpan + 1 : col);
404
406
  }
405
407
  getTargetRow(row, direction) {
406
408
  return direction === 'down' ? row - this.draggedItem.rowSpan + 1 : row;
@@ -17,8 +17,9 @@ export const getId = (prefix) => {
17
17
  /**
18
18
  * @hidden
19
19
  */
20
- export const normalizeValue = (value) => {
21
- return value ? +value : undefined;
20
+ export const normalizeValue = (value, max = Infinity) => {
21
+ const normalizedValue = isPresent(value) ? Math.min(Math.max(+value, 1), max) : value;
22
+ return normalizedValue;
22
23
  };
23
24
  /**
24
25
  * @hidden
@@ -29,8 +29,8 @@ const packageMetadata = {
29
29
  productName: 'Kendo UI for Angular',
30
30
  productCode: 'KENDOUIANGULAR',
31
31
  productCodes: ['KENDOUIANGULAR'],
32
- publishDate: 1744877466,
33
- version: '18.5.2-develop.7',
32
+ publishDate: 1744880209,
33
+ version: '18.5.2-develop.8',
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
 
@@ -8962,8 +8962,9 @@ const getId = (prefix) => {
8962
8962
  /**
8963
8963
  * @hidden
8964
8964
  */
8965
- const normalizeValue = (value) => {
8966
- return value ? +value : undefined;
8965
+ const normalizeValue = (value, max = Infinity) => {
8966
+ const normalizedValue = isPresent(value) ? Math.min(Math.max(+value, 1), max) : value;
8967
+ return normalizedValue;
8967
8968
  };
8968
8969
  /**
8969
8970
  * @hidden
@@ -9384,20 +9385,22 @@ class TileLayoutDraggingService {
9384
9385
  const targetCol = normalizeValue(this.currentColStart);
9385
9386
  const targetRow = normalizeValue(this.currentRowStart);
9386
9387
  if (propsChanged([this.targetOrder, targetCol, targetRow], [initialOrder, initialCol, initialRow])) {
9387
- const reorderEvent = new TileLayoutReorderEvent(this.draggedItem, this.tileLayoutSettings.items, this.targetOrder, initialOrder, normalizeValue(this.currentColStart), initialCol, targetRow, initialRow);
9388
+ const reorderEvent = new TileLayoutReorderEvent(this.draggedItem, this.tileLayoutSettings.items, this.targetOrder, initialOrder, targetCol, initialCol, targetRow, initialRow);
9388
9389
  this.reorder.next(reorderEvent);
9389
9390
  if (!reorderEvent.isDefaultPrevented()) {
9390
9391
  if (this.targetOrder > initialOrder) {
9391
9392
  this.zone.run(() => {
9392
9393
  for (let i = initialOrder + 1; i <= this.targetOrder; i++) {
9393
- this.tileLayoutSettings.items.find(item => item.order === i).order = i - 1;
9394
+ const item = this.tileLayoutSettings.items.find(item => item.order === i);
9395
+ item && (item.order = i - 1);
9394
9396
  }
9395
9397
  });
9396
9398
  }
9397
9399
  else {
9398
9400
  this.zone.run(() => {
9399
9401
  for (let i = initialOrder - 1; i >= this.targetOrder; i--) {
9400
- this.tileLayoutSettings.items.find(item => item.order === i).order = i + 1;
9402
+ const item = this.tileLayoutSettings.items.find(item => item.order === i);
9403
+ item && (item.order = i + 1);
9401
9404
  }
9402
9405
  });
9403
9406
  }
@@ -9604,9 +9607,9 @@ class TileLayoutDraggingService {
9604
9607
  }
9605
9608
  getTargetCol(col, direction) {
9606
9609
  if (this.rtl) {
9607
- return direction === 'left' ? col - this.draggedItem.colSpan + 1 : col;
9610
+ return normalizeValue(direction === 'left' ? col - this.draggedItem.colSpan + 1 : col, this.tileLayoutSettings.columns);
9608
9611
  }
9609
- return direction === 'right' ? col - this.draggedItem.colSpan + 1 : col;
9612
+ return normalizeValue(direction === 'right' ? col - this.draggedItem.colSpan + 1 : col);
9610
9613
  }
9611
9614
  getTargetRow(row, direction) {
9612
9615
  return direction === 'down' ? row - this.draggedItem.rowSpan + 1 : row;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-layout",
3
- "version": "18.5.2-develop.7",
3
+ "version": "18.5.2-develop.8",
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": 1744877466,
38
+ "publishDate": 1744880209,
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.5.0",
48
- "@progress/kendo-angular-common": "18.5.2-develop.7",
49
- "@progress/kendo-angular-l10n": "18.5.2-develop.7",
50
- "@progress/kendo-angular-progressbar": "18.5.2-develop.7",
51
- "@progress/kendo-angular-icons": "18.5.2-develop.7",
52
- "@progress/kendo-angular-buttons": "18.5.2-develop.7",
53
- "@progress/kendo-angular-intl": "18.5.2-develop.7",
48
+ "@progress/kendo-angular-common": "18.5.2-develop.8",
49
+ "@progress/kendo-angular-l10n": "18.5.2-develop.8",
50
+ "@progress/kendo-angular-progressbar": "18.5.2-develop.8",
51
+ "@progress/kendo-angular-icons": "18.5.2-develop.8",
52
+ "@progress/kendo-angular-buttons": "18.5.2-develop.8",
53
+ "@progress/kendo-angular-intl": "18.5.2-develop.8",
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.5.2-develop.7",
58
+ "@progress/kendo-angular-schematics": "18.5.2-develop.8",
59
59
  "@progress/kendo-draggable": "^3.0.2"
60
60
  },
61
61
  "schematics": "./schematics/collection.json",
@@ -14,7 +14,7 @@ export declare const getId: (prefix: string) => string;
14
14
  /**
15
15
  * @hidden
16
16
  */
17
- export declare const normalizeValue: (value: any) => number;
17
+ export declare const normalizeValue: (value: any, max?: number) => number;
18
18
  /**
19
19
  * @hidden
20
20
  */