@progress/kendo-angular-scheduler 4.1.0-dev.202205110813 → 4.1.0-dev.202205110843

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 const packageMetadata = {
9
9
  name: '@progress/kendo-angular-scheduler',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1652256738,
12
+ publishDate: 1652258515,
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
  };
@@ -127,6 +127,12 @@ export class BaseView {
127
127
  return index;
128
128
  }
129
129
  resourcesByIndex(index) {
130
+ if (!this.resources) {
131
+ return [];
132
+ }
133
+ if (!this.group) { // When we have resources, but are not grouped, return all resources.
134
+ return this.resources.reduce((result, resource) => result.concat(resource.data || []), []);
135
+ }
130
136
  if (!this.resourcesCache[index]) {
131
137
  const resources = this.taskResources;
132
138
  const result = [];
@@ -42,11 +42,14 @@ export class SlotSelectableDirective {
42
42
  }
43
43
  ngOnChanges(changes) {
44
44
  if (isChanged("slotSelection", changes, false)) {
45
- /**
46
- * The default values for resources below are necessarry because this is not fixed yet: https://github.com/telerik/kendo-angular-scheduler/pull/338
47
- */
48
- const resources = this.scheduler.resources ? [this.scheduler.resources[0].data[0]] : [undefined];
49
- this.selectedRange = Object.assign({}, { isAllDay: false, resources }, changes.slotSelection.currentValue);
45
+ const defaults = {
46
+ isAllDay: false,
47
+ resources: this.scheduler.resources.reduce((result, resource) => {
48
+ result.push(...resource.data);
49
+ return result;
50
+ }, [])
51
+ };
52
+ this.selectedRange = Object.assign(defaults, changes.slotSelection.currentValue);
50
53
  this.cdr.markForCheck();
51
54
  }
52
55
  }
@@ -43,7 +43,7 @@ const packageMetadata = {
43
43
  name: '@progress/kendo-angular-scheduler',
44
44
  productName: 'Kendo UI for Angular',
45
45
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
46
- publishDate: 1652256738,
46
+ publishDate: 1652258515,
47
47
  version: '',
48
48
  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'
49
49
  };
@@ -9475,6 +9475,12 @@ class BaseView {
9475
9475
  return index;
9476
9476
  }
9477
9477
  resourcesByIndex(index) {
9478
+ if (!this.resources) {
9479
+ return [];
9480
+ }
9481
+ if (!this.group) { // When we have resources, but are not grouped, return all resources.
9482
+ return this.resources.reduce((result, resource) => result.concat(resource.data || []), []);
9483
+ }
9478
9484
  if (!this.resourcesCache[index]) {
9479
9485
  const resources = this.taskResources;
9480
9486
  const result = [];
@@ -15813,11 +15819,14 @@ class SlotSelectableDirective {
15813
15819
  }
15814
15820
  ngOnChanges(changes) {
15815
15821
  if (isChanged("slotSelection", changes, false)) {
15816
- /**
15817
- * The default values for resources below are necessarry because this is not fixed yet: https://github.com/telerik/kendo-angular-scheduler/pull/338
15818
- */
15819
- const resources = this.scheduler.resources ? [this.scheduler.resources[0].data[0]] : [undefined];
15820
- this.selectedRange = Object.assign({}, { isAllDay: false, resources }, changes.slotSelection.currentValue);
15822
+ const defaults = {
15823
+ isAllDay: false,
15824
+ resources: this.scheduler.resources.reduce((result, resource) => {
15825
+ result.push(...resource.data);
15826
+ return result;
15827
+ }, [])
15828
+ };
15829
+ this.selectedRange = Object.assign(defaults, changes.slotSelection.currentValue);
15821
15830
  this.cdr.markForCheck();
15822
15831
  }
15823
15832
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-scheduler",
3
- "version": "4.1.0-dev.202205110813",
3
+ "version": "4.1.0-dev.202205110843",
4
4
  "description": "Kendo UI Scheduler Angular",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",