@progress/kendo-angular-scheduler 3.0.0 → 3.0.1-dev.202202071010

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.
@@ -9,7 +9,7 @@ export var packageMetadata = {
9
9
  name: '@progress/kendo-angular-scheduler',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1642598504,
12
+ publishDate: 1644228429,
13
13
  version: '',
14
14
  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'
15
15
  };
@@ -59,7 +59,7 @@ var SlotSelectableDirective = /** @class */ (function () {
59
59
  if (!start || !end || !this.selectedRange) {
60
60
  return false;
61
61
  }
62
- var match = resourcesMatch(this.selectedRange.resources, resources, true);
62
+ var match = resourcesMatch(this.selectedRange.resources, resources);
63
63
  if (!match) {
64
64
  return false; // Limit selection to the grouped resource where the drag started.
65
65
  }
@@ -73,7 +73,7 @@ var SlotSelectableDirective = /** @class */ (function () {
73
73
  };
74
74
  SlotSelectableDirective.prototype.onDrag = function (_a) {
75
75
  var start = _a.start, end = _a.end, resources = _a.resources;
76
- var match = resourcesMatch(this.selectionOriginResources, resources, false); // Not strict - allow matching [ undefined ] and [ undefined ]
76
+ var match = resourcesMatch(this.selectionOriginResources, resources);
77
77
  if (!match) {
78
78
  return; // Don't change selection when dragging over a different grouped resource's cells.
79
79
  }
@@ -201,17 +201,17 @@ export function assignTasksResources(tasks, options) {
201
201
  /**
202
202
  * @hidden
203
203
  */
204
- export function areValidResources(resources) {
205
- return Array.isArray(resources) && resources.length > 0 && resources[0] !== undefined;
204
+ export function isEmptyResource(resources) {
205
+ return Array.isArray(resources) && resources.length === 1 && resources[0] === undefined;
206
206
  }
207
207
  /**
208
208
  * @hidden
209
209
  */
210
- export function resourcesMatch(res1, res2, strict) {
210
+ export function resourcesMatch(res1, res2) {
211
211
  if (res1.length !== res2.length) {
212
212
  return false;
213
213
  }
214
- if (!strict && !areValidResources(res1) || !areValidResources(res2)) {
214
+ if (isEmptyResource(res1) && isEmptyResource(res2)) {
215
215
  return true;
216
216
  }
217
217
  return res1.every(function (r1) { return res2.some(function (r2) { return r2.value === r1.value; }); });
@@ -223,7 +223,7 @@ export function isSameRange(range1, range2) {
223
223
  return (range1.start.getTime() === range2.start.getTime() &&
224
224
  range1.end.getTime() === range2.end.getTime() &&
225
225
  range1.isAllDay === range2.isAllDay &&
226
- resourcesMatch(range1.resources, range2.resources, true));
226
+ resourcesMatch(range1.resources, range2.resources));
227
227
  }
228
228
  /** @hidden */
229
229
  export function findRowIndex(events, data) {
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-scheduler',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1642598504,
12
+ publishDate: 1644228429,
13
13
  version: '',
14
14
  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'
15
15
  };
@@ -57,7 +57,7 @@ let SlotSelectableDirective = class SlotSelectableDirective {
57
57
  if (!start || !end || !this.selectedRange) {
58
58
  return false;
59
59
  }
60
- const match = resourcesMatch(this.selectedRange.resources, resources, true);
60
+ const match = resourcesMatch(this.selectedRange.resources, resources);
61
61
  if (!match) {
62
62
  return false; // Limit selection to the grouped resource where the drag started.
63
63
  }
@@ -69,7 +69,7 @@ let SlotSelectableDirective = class SlotSelectableDirective {
69
69
  this.cdr.markForCheck();
70
70
  }
71
71
  onDrag({ start, end, resources }) {
72
- const match = resourcesMatch(this.selectionOriginResources, resources, false); // Not strict - allow matching [ undefined ] and [ undefined ]
72
+ const match = resourcesMatch(this.selectionOriginResources, resources);
73
73
  if (!match) {
74
74
  return; // Don't change selection when dragging over a different grouped resource's cells.
75
75
  }
@@ -56,11 +56,11 @@ export declare function assignTasksResources(tasks: any[], options: any): void;
56
56
  /**
57
57
  * @hidden
58
58
  */
59
- export declare function areValidResources(resources: Resource[]): boolean;
59
+ export declare function isEmptyResource(resources: Resource[]): boolean;
60
60
  /**
61
61
  * @hidden
62
62
  */
63
- export declare function resourcesMatch(res1: any[], res2: any[], strict: boolean): boolean;
63
+ export declare function resourcesMatch(res1: any[], res2: any[]): boolean;
64
64
  /**
65
65
  * @hidden
66
66
  */
@@ -193,17 +193,17 @@ export function assignTasksResources(tasks, options) {
193
193
  /**
194
194
  * @hidden
195
195
  */
196
- export function areValidResources(resources) {
197
- return Array.isArray(resources) && resources.length > 0 && resources[0] !== undefined;
196
+ export function isEmptyResource(resources) {
197
+ return Array.isArray(resources) && resources.length === 1 && resources[0] === undefined;
198
198
  }
199
199
  /**
200
200
  * @hidden
201
201
  */
202
- export function resourcesMatch(res1, res2, strict) {
202
+ export function resourcesMatch(res1, res2) {
203
203
  if (res1.length !== res2.length) {
204
204
  return false;
205
205
  }
206
- if (!strict && !areValidResources(res1) || !areValidResources(res2)) {
206
+ if (isEmptyResource(res1) && isEmptyResource(res2)) {
207
207
  return true;
208
208
  }
209
209
  return res1.every(r1 => res2.some(r2 => r2.value === r1.value));
@@ -215,7 +215,7 @@ export function isSameRange(range1, range2) {
215
215
  return (range1.start.getTime() === range2.start.getTime() &&
216
216
  range1.end.getTime() === range2.end.getTime() &&
217
217
  range1.isAllDay === range2.isAllDay &&
218
- resourcesMatch(range1.resources, range2.resources, true));
218
+ resourcesMatch(range1.resources, range2.resources));
219
219
  }
220
220
  /** @hidden */
221
221
  export function findRowIndex(events, data) {
@@ -32,7 +32,7 @@ const packageMetadata = {
32
32
  name: '@progress/kendo-angular-scheduler',
33
33
  productName: 'Kendo UI for Angular',
34
34
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
35
- publishDate: 1642598504,
35
+ publishDate: 1644228429,
36
36
  version: '',
37
37
  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'
38
38
  };
@@ -1996,17 +1996,17 @@ function assignTasksResources(tasks, options) {
1996
1996
  /**
1997
1997
  * @hidden
1998
1998
  */
1999
- function areValidResources(resources) {
2000
- return Array.isArray(resources) && resources.length > 0 && resources[0] !== undefined;
1999
+ function isEmptyResource(resources) {
2000
+ return Array.isArray(resources) && resources.length === 1 && resources[0] === undefined;
2001
2001
  }
2002
2002
  /**
2003
2003
  * @hidden
2004
2004
  */
2005
- function resourcesMatch(res1, res2, strict) {
2005
+ function resourcesMatch(res1, res2) {
2006
2006
  if (res1.length !== res2.length) {
2007
2007
  return false;
2008
2008
  }
2009
- if (!strict && !areValidResources(res1) || !areValidResources(res2)) {
2009
+ if (isEmptyResource(res1) && isEmptyResource(res2)) {
2010
2010
  return true;
2011
2011
  }
2012
2012
  return res1.every(r1 => res2.some(r2 => r2.value === r1.value));
@@ -2018,7 +2018,7 @@ function isSameRange(range1, range2) {
2018
2018
  return (range1.start.getTime() === range2.start.getTime() &&
2019
2019
  range1.end.getTime() === range2.end.getTime() &&
2020
2020
  range1.isAllDay === range2.isAllDay &&
2021
- resourcesMatch(range1.resources, range2.resources, true));
2021
+ resourcesMatch(range1.resources, range2.resources));
2022
2022
  }
2023
2023
  /** @hidden */
2024
2024
  function findRowIndex(events, data) {
@@ -14265,7 +14265,7 @@ let SlotSelectableDirective = class SlotSelectableDirective {
14265
14265
  if (!start || !end || !this.selectedRange) {
14266
14266
  return false;
14267
14267
  }
14268
- const match = resourcesMatch(this.selectedRange.resources, resources, true);
14268
+ const match = resourcesMatch(this.selectedRange.resources, resources);
14269
14269
  if (!match) {
14270
14270
  return false; // Limit selection to the grouped resource where the drag started.
14271
14271
  }
@@ -14277,7 +14277,7 @@ let SlotSelectableDirective = class SlotSelectableDirective {
14277
14277
  this.cdr.markForCheck();
14278
14278
  }
14279
14279
  onDrag({ start, end, resources }) {
14280
- const match = resourcesMatch(this.selectionOriginResources, resources, false); // Not strict - allow matching [ undefined ] and [ undefined ]
14280
+ const match = resourcesMatch(this.selectionOriginResources, resources);
14281
14281
  if (!match) {
14282
14282
  return; // Don't change selection when dragging over a different grouped resource's cells.
14283
14283
  }
@@ -32,7 +32,7 @@ var packageMetadata = {
32
32
  name: '@progress/kendo-angular-scheduler',
33
33
  productName: 'Kendo UI for Angular',
34
34
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
35
- publishDate: 1642598504,
35
+ publishDate: 1644228429,
36
36
  version: '',
37
37
  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'
38
38
  };
@@ -2125,17 +2125,17 @@ function assignTasksResources(tasks, options) {
2125
2125
  /**
2126
2126
  * @hidden
2127
2127
  */
2128
- function areValidResources(resources) {
2129
- return Array.isArray(resources) && resources.length > 0 && resources[0] !== undefined;
2128
+ function isEmptyResource(resources) {
2129
+ return Array.isArray(resources) && resources.length === 1 && resources[0] === undefined;
2130
2130
  }
2131
2131
  /**
2132
2132
  * @hidden
2133
2133
  */
2134
- function resourcesMatch(res1, res2, strict) {
2134
+ function resourcesMatch(res1, res2) {
2135
2135
  if (res1.length !== res2.length) {
2136
2136
  return false;
2137
2137
  }
2138
- if (!strict && !areValidResources(res1) || !areValidResources(res2)) {
2138
+ if (isEmptyResource(res1) && isEmptyResource(res2)) {
2139
2139
  return true;
2140
2140
  }
2141
2141
  return res1.every(function (r1) { return res2.some(function (r2) { return r2.value === r1.value; }); });
@@ -2147,7 +2147,7 @@ function isSameRange(range1, range2) {
2147
2147
  return (range1.start.getTime() === range2.start.getTime() &&
2148
2148
  range1.end.getTime() === range2.end.getTime() &&
2149
2149
  range1.isAllDay === range2.isAllDay &&
2150
- resourcesMatch(range1.resources, range2.resources, true));
2150
+ resourcesMatch(range1.resources, range2.resources));
2151
2151
  }
2152
2152
  /** @hidden */
2153
2153
  function findRowIndex(events, data) {
@@ -13718,7 +13718,7 @@ var SlotSelectableDirective = /** @class */ (function () {
13718
13718
  if (!start || !end || !this.selectedRange) {
13719
13719
  return false;
13720
13720
  }
13721
- var match = resourcesMatch(this.selectedRange.resources, resources, true);
13721
+ var match = resourcesMatch(this.selectedRange.resources, resources);
13722
13722
  if (!match) {
13723
13723
  return false; // Limit selection to the grouped resource where the drag started.
13724
13724
  }
@@ -13732,7 +13732,7 @@ var SlotSelectableDirective = /** @class */ (function () {
13732
13732
  };
13733
13733
  SlotSelectableDirective.prototype.onDrag = function (_a) {
13734
13734
  var start = _a.start, end = _a.end, resources = _a.resources;
13735
- var match = resourcesMatch(this.selectionOriginResources, resources, false); // Not strict - allow matching [ undefined ] and [ undefined ]
13735
+ var match = resourcesMatch(this.selectionOriginResources, resources);
13736
13736
  if (!match) {
13737
13737
  return; // Don't change selection when dragging over a different grouped resource's cells.
13738
13738
  }
@@ -11,7 +11,7 @@ exports.packageMetadata = {
11
11
  name: '@progress/kendo-angular-scheduler',
12
12
  productName: 'Kendo UI for Angular',
13
13
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
14
- publishDate: 1642598504,
14
+ publishDate: 1644228429,
15
15
  version: '',
16
16
  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'
17
17
  };
@@ -61,7 +61,7 @@ var SlotSelectableDirective = /** @class */ (function () {
61
61
  if (!start || !end || !this.selectedRange) {
62
62
  return false;
63
63
  }
64
- var match = utils_1.resourcesMatch(this.selectedRange.resources, resources, true);
64
+ var match = utils_1.resourcesMatch(this.selectedRange.resources, resources);
65
65
  if (!match) {
66
66
  return false; // Limit selection to the grouped resource where the drag started.
67
67
  }
@@ -75,7 +75,7 @@ var SlotSelectableDirective = /** @class */ (function () {
75
75
  };
76
76
  SlotSelectableDirective.prototype.onDrag = function (_a) {
77
77
  var start = _a.start, end = _a.end, resources = _a.resources;
78
- var match = utils_1.resourcesMatch(this.selectionOriginResources, resources, false); // Not strict - allow matching [ undefined ] and [ undefined ]
78
+ var match = utils_1.resourcesMatch(this.selectionOriginResources, resources);
79
79
  if (!match) {
80
80
  return; // Don't change selection when dragging over a different grouped resource's cells.
81
81
  }
@@ -214,18 +214,18 @@ exports.assignTasksResources = assignTasksResources;
214
214
  /**
215
215
  * @hidden
216
216
  */
217
- function areValidResources(resources) {
218
- return Array.isArray(resources) && resources.length > 0 && resources[0] !== undefined;
217
+ function isEmptyResource(resources) {
218
+ return Array.isArray(resources) && resources.length === 1 && resources[0] === undefined;
219
219
  }
220
- exports.areValidResources = areValidResources;
220
+ exports.isEmptyResource = isEmptyResource;
221
221
  /**
222
222
  * @hidden
223
223
  */
224
- function resourcesMatch(res1, res2, strict) {
224
+ function resourcesMatch(res1, res2) {
225
225
  if (res1.length !== res2.length) {
226
226
  return false;
227
227
  }
228
- if (!strict && !areValidResources(res1) || !areValidResources(res2)) {
228
+ if (isEmptyResource(res1) && isEmptyResource(res2)) {
229
229
  return true;
230
230
  }
231
231
  return res1.every(function (r1) { return res2.some(function (r2) { return r2.value === r1.value; }); });
@@ -238,7 +238,7 @@ function isSameRange(range1, range2) {
238
238
  return (range1.start.getTime() === range2.start.getTime() &&
239
239
  range1.end.getTime() === range2.end.getTime() &&
240
240
  range1.isAllDay === range2.isAllDay &&
241
- resourcesMatch(range1.resources, range2.resources, true));
241
+ resourcesMatch(range1.resources, range2.resources));
242
242
  }
243
243
  exports.isSameRange = isSameRange;
244
244
  /** @hidden */