@progress/kendo-angular-scheduler 4.3.1-dev.202208101208 → 4.3.1-dev.202208110754

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,6 +10,7 @@ import { EditService } from './edit-service.interface';
10
10
  import { DialogsService } from '../editing/dialogs.service';
11
11
  import { EditMode } from '../types';
12
12
  import { AddEvent, EditEvent } from '../events';
13
+ import { FocusService } from '../navigation';
13
14
  import * as i0 from "@angular/core";
14
15
  /**
15
16
  * @hidden
@@ -18,6 +19,7 @@ export declare abstract class EditingDirectiveBase implements OnInit, OnDestroy
18
19
  protected scheduler: SchedulerComponent;
19
20
  protected localDataChangesService: LocalDataChangesService;
20
21
  protected dialogsService: DialogsService;
22
+ private focusService;
21
23
  /**
22
24
  * Fires before the editing directive renders the **Add** dialog.
23
25
  */
@@ -36,7 +38,7 @@ export declare abstract class EditingDirectiveBase implements OnInit, OnDestroy
36
38
  protected defaultEditService: EditService<any>;
37
39
  protected userEditService: EditService<any>;
38
40
  protected abstract createModel(args: any): any;
39
- constructor(scheduler: SchedulerComponent, localDataChangesService: LocalDataChangesService, dialogsService: DialogsService);
41
+ constructor(scheduler: SchedulerComponent, localDataChangesService: LocalDataChangesService, dialogsService: DialogsService, focusService: FocusService);
40
42
  /**
41
43
  * @hidden
42
44
  */
@@ -8,6 +8,7 @@ import { EditingDirectiveBase } from './editing-directive-base';
8
8
  import { CreateFormGroupArgs } from '../types/create-form-group-args.interface';
9
9
  import { LocalDataChangesService } from '../editing/local-data-changes.service';
10
10
  import { DialogsService } from '../editing/dialogs.service';
11
+ import { FocusService } from "../navigation";
11
12
  import * as i0 from "@angular/core";
12
13
  /**
13
14
  * A directive which encapsulates the editing operations when the Scheduler
@@ -21,7 +22,7 @@ export declare class ReactiveEditingDirective extends EditingDirectiveBase {
21
22
  * The function that creates the `FormGroup` for the edited model.
22
23
  */
23
24
  createFormGroup: (args: CreateFormGroupArgs) => FormGroup;
24
- constructor(scheduler: SchedulerComponent, localDataChangesService: LocalDataChangesService, dialogsService: DialogsService);
25
+ constructor(scheduler: SchedulerComponent, localDataChangesService: LocalDataChangesService, dialogsService: DialogsService, focusService: FocusService);
25
26
  ngOnInit(): void;
26
27
  protected editHandler(args: any): void;
27
28
  protected saveHandler(args: any): void;
@@ -12,14 +12,16 @@ import * as i0 from "@angular/core";
12
12
  import * as i1 from "../scheduler.component";
13
13
  import * as i2 from "../editing/local-data-changes.service";
14
14
  import * as i3 from "../editing/dialogs.service";
15
+ import * as i4 from "../navigation";
15
16
  /**
16
17
  * @hidden
17
18
  */
18
19
  export class EditingDirectiveBase {
19
- constructor(scheduler, localDataChangesService, dialogsService) {
20
+ constructor(scheduler, localDataChangesService, dialogsService, focusService) {
20
21
  this.scheduler = scheduler;
21
22
  this.localDataChangesService = localDataChangesService;
22
23
  this.dialogsService = dialogsService;
24
+ this.focusService = focusService;
23
25
  /**
24
26
  * Fires before the editing directive renders the **Add** dialog.
25
27
  */
@@ -97,6 +99,7 @@ export class EditingDirectiveBase {
97
99
  .subscribe((editMode) => {
98
100
  if (editMode !== undefined) {
99
101
  this.handleRemove(dataItem, editMode);
102
+ this.focusService.focusFirst();
100
103
  }
101
104
  });
102
105
  }
@@ -105,6 +108,7 @@ export class EditingDirectiveBase {
105
108
  .subscribe((shouldRemove) => {
106
109
  if (shouldRemove) {
107
110
  this.handleRemove(dataItem, 0 /* Event */);
111
+ this.focusService.focusFirst();
108
112
  }
109
113
  });
110
114
  }
@@ -205,11 +209,11 @@ export class EditingDirectiveBase {
205
209
  return editable && editable[action] !== false;
206
210
  }
207
211
  }
208
- EditingDirectiveBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditingDirectiveBase, deps: [{ token: i1.SchedulerComponent }, { token: i2.LocalDataChangesService }, { token: i3.DialogsService }], target: i0.ɵɵFactoryTarget.Directive });
212
+ EditingDirectiveBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditingDirectiveBase, deps: [{ token: i1.SchedulerComponent }, { token: i2.LocalDataChangesService }, { token: i3.DialogsService }, { token: i4.FocusService }], target: i0.ɵɵFactoryTarget.Directive });
209
213
  EditingDirectiveBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: EditingDirectiveBase, inputs: { editService: "editService" }, outputs: { add: "add", edit: "edit" }, ngImport: i0 });
210
214
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditingDirectiveBase, decorators: [{
211
215
  type: Directive
212
- }], ctorParameters: function () { return [{ type: i1.SchedulerComponent }, { type: i2.LocalDataChangesService }, { type: i3.DialogsService }]; }, propDecorators: { add: [{
216
+ }], ctorParameters: function () { return [{ type: i1.SchedulerComponent }, { type: i2.LocalDataChangesService }, { type: i3.DialogsService }, { type: i4.FocusService }]; }, propDecorators: { add: [{
213
217
  type: Output
214
218
  }], edit: [{
215
219
  type: Output
@@ -11,13 +11,14 @@ import * as i0 from "@angular/core";
11
11
  import * as i1 from "../scheduler.component";
12
12
  import * as i2 from "../editing/local-data-changes.service";
13
13
  import * as i3 from "../editing/dialogs.service";
14
+ import * as i4 from "../navigation";
14
15
  /**
15
16
  * A directive which encapsulates the editing operations when the Scheduler
16
17
  * uses the [Reactive Angular Forms]({{ site.data.urls.angular['reactiveforms'] }}).
17
18
  */
18
19
  export class ReactiveEditingDirective extends EditingDirectiveBase {
19
- constructor(scheduler, localDataChangesService, dialogsService) {
20
- super(scheduler, localDataChangesService, dialogsService);
20
+ constructor(scheduler, localDataChangesService, dialogsService, focusService) {
21
+ super(scheduler, localDataChangesService, dialogsService, focusService);
21
22
  this.scheduler = scheduler;
22
23
  this.localDataChangesService = localDataChangesService;
23
24
  this.dialogsService = dialogsService;
@@ -91,14 +92,14 @@ export class ReactiveEditingDirective extends EditingDirectiveBase {
91
92
  return false;
92
93
  }
93
94
  }
94
- ReactiveEditingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ReactiveEditingDirective, deps: [{ token: i1.SchedulerComponent }, { token: i2.LocalDataChangesService }, { token: i3.DialogsService }], target: i0.ɵɵFactoryTarget.Directive });
95
+ ReactiveEditingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ReactiveEditingDirective, deps: [{ token: i1.SchedulerComponent }, { token: i2.LocalDataChangesService }, { token: i3.DialogsService }, { token: i4.FocusService }], target: i0.ɵɵFactoryTarget.Directive });
95
96
  ReactiveEditingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ReactiveEditingDirective, selector: "[kendoSchedulerReactiveEditing]", inputs: { createFormGroup: ["kendoSchedulerReactiveEditing", "createFormGroup"] }, usesInheritance: true, ngImport: i0 });
96
97
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ReactiveEditingDirective, decorators: [{
97
98
  type: Directive,
98
99
  args: [{
99
100
  selector: '[kendoSchedulerReactiveEditing]'
100
101
  }]
101
- }], ctorParameters: function () { return [{ type: i1.SchedulerComponent }, { type: i2.LocalDataChangesService }, { type: i3.DialogsService }]; }, propDecorators: { createFormGroup: [{
102
+ }], ctorParameters: function () { return [{ type: i1.SchedulerComponent }, { type: i2.LocalDataChangesService }, { type: i3.DialogsService }, { type: i4.FocusService }]; }, propDecorators: { createFormGroup: [{
102
103
  type: Input,
103
104
  args: ['kendoSchedulerReactiveEditing']
104
105
  }] } });
@@ -3,17 +3,18 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Injectable, Optional, EventEmitter } from '@angular/core';
6
- import { Subscription } from 'rxjs';
6
+ import { Subscription, take } from 'rxjs';
7
7
  import * as i0 from "@angular/core";
8
8
  import * as i1 from "../views/common/dom-events.service";
9
9
  /**
10
10
  * @hidden
11
11
  */
12
12
  export class FocusService {
13
- constructor(renderer, wrapper, domEvents) {
13
+ constructor(renderer, wrapper, domEvents, zone) {
14
14
  this.renderer = renderer;
15
15
  this.wrapper = wrapper;
16
16
  this.domEvents = domEvents;
17
+ this.zone = zone;
17
18
  this.ariaActiveDescendant = new EventEmitter();
18
19
  this.items = new Set();
19
20
  this.elementMap = new WeakMap();
@@ -62,6 +63,24 @@ export class FocusService {
62
63
  }
63
64
  return this.activeItem !== currentItem;
64
65
  }
66
+ focusFirst() {
67
+ const firstEvent = Array.from(this.items.values())[0];
68
+ if (!firstEvent) {
69
+ return;
70
+ }
71
+ this.activate(firstEvent.element.nativeElement);
72
+ this.focus();
73
+ this.zone.onStable.pipe(take(1)).subscribe(() => {
74
+ const first = Array.from(this.items.values())[0];
75
+ if (!first) {
76
+ this.clearActiveDescendant();
77
+ return;
78
+ }
79
+ const id = first.element.nativeElement.getAttribute('id');
80
+ this.ariaActiveDescendant.next(id);
81
+ this.lastActiveDescendantId = id;
82
+ });
83
+ }
65
84
  clearActiveDescendant() {
66
85
  this.ariaActiveDescendant.next(null);
67
86
  }
@@ -72,6 +91,7 @@ export class FocusService {
72
91
  if (item === next) {
73
92
  const id = item.element.nativeElement.getAttribute('id');
74
93
  this.ariaActiveDescendant.next(id);
94
+ this.lastActiveDescendantId = id;
75
95
  }
76
96
  });
77
97
  this.activeItem = next;
@@ -110,6 +130,10 @@ export class FocusService {
110
130
  }
111
131
  onFocusIn(e) {
112
132
  const item = this.elementMap.get(e.target);
133
+ const shouldRestoreActiveDescendant = this.lastActiveDescendantId && this.lastActiveDescendantId !== (item === null || item === void 0 ? void 0 : item.element.nativeElement.getAttribute('id'));
134
+ if (shouldRestoreActiveDescendant) {
135
+ this.ariaActiveDescendant.next(this.lastActiveDescendantId);
136
+ }
113
137
  if (!item || item === this.focusedItem) {
114
138
  return;
115
139
  }
@@ -126,10 +150,10 @@ export class FocusService {
126
150
  }
127
151
  this.focusedItem.toggleFocus(false);
128
152
  this.focusedItem = null;
129
- this.ariaActiveDescendant.next(null);
153
+ this.clearActiveDescendant();
130
154
  }
131
155
  }
132
- FocusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService, deps: [{ token: i0.Renderer2, optional: true }, { token: i0.ElementRef, optional: true }, { token: i1.DomEventsService }], target: i0.ɵɵFactoryTarget.Injectable });
156
+ FocusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService, deps: [{ token: i0.Renderer2, optional: true }, { token: i0.ElementRef, optional: true }, { token: i1.DomEventsService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
133
157
  FocusService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService });
134
158
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService, decorators: [{
135
159
  type: Injectable
@@ -137,4 +161,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
137
161
  type: Optional
138
162
  }] }, { type: i0.ElementRef, decorators: [{
139
163
  type: Optional
140
- }] }, { type: i1.DomEventsService }]; } });
164
+ }] }, { type: i1.DomEventsService }, { type: i0.NgZone }]; } });
@@ -44,6 +44,7 @@ export class FocusableDirective {
44
44
  this.element.nativeElement.focus();
45
45
  }
46
46
  toggleFocus(value) {
47
+ var _a;
47
48
  const focusedClass = 'k-selected';
48
49
  const element = this.element.nativeElement;
49
50
  if (value) {
@@ -52,7 +53,11 @@ export class FocusableDirective {
52
53
  else {
53
54
  this.renderer.removeClass(element, focusedClass);
54
55
  }
55
- this.renderer.setAttribute(element, 'aria-selected', value.toString());
56
+ const selectable = element.matches('.k-scheduler-agendaview .k-scheduler-content .k-selected');
57
+ if (selectable) {
58
+ (_a = element.closest('.k-scheduler-agendaview').querySelector('[aria-selected="true"]')) === null || _a === void 0 ? void 0 : _a.removeAttribute('aria-selected');
59
+ this.renderer.setAttribute(element, 'aria-selected', value.toString());
60
+ }
56
61
  }
57
62
  }
58
63
  FocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusableDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.FocusService }], target: i0.ɵɵFactoryTarget.Directive });
@@ -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: 1660133212,
12
+ publishDate: 1660204372,
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
  };
@@ -276,7 +276,7 @@ MonthViewRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
276
276
  </ng-container>
277
277
  </table>
278
278
  </div>
279
- <div class="k-scheduler-content" #content>
279
+ <div class="k-scheduler-content" tabindex="0" #content>
280
280
  <table class="k-scheduler-table k-user-select-none" #contentTable role="presentation">
281
281
  <ng-container *ngFor="let resourceItem of verticalResources | resourceIterator; let verticalIndex = index; trackBy: itemIndex">
282
282
  <tr *ngFor="let week of weeks; let rangeIndex = index; trackBy: itemIndex">
@@ -404,7 +404,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
404
404
  </ng-container>
405
405
  </table>
406
406
  </div>
407
- <div class="k-scheduler-content" #content>
407
+ <div class="k-scheduler-content" tabindex="0" #content>
408
408
  <table class="k-scheduler-table k-user-select-none" #contentTable role="presentation">
409
409
  <ng-container *ngFor="let resourceItem of verticalResources | resourceIterator; let verticalIndex = index; trackBy: itemIndex">
410
410
  <tr *ngFor="let week of weeks; let rangeIndex = index; trackBy: itemIndex">
@@ -12,8 +12,8 @@ import { isEqualDate, timezoneNames, ZonedDate, toLocalDate, getDate, Day, MS_PE
12
12
  import { validatePackage } from '@progress/kendo-licensing';
13
13
  import * as i4 from '@progress/kendo-angular-dateinputs';
14
14
  import { PreventableEvent as PreventableEvent$1, CalendarModule, DateInputsModule } from '@progress/kendo-angular-dateinputs';
15
- import { Subject, BehaviorSubject, fromEvent, Subscription, combineLatest, merge } from 'rxjs';
16
- import { auditTime, buffer, filter, map, debounceTime, take, switchMap, tap, distinctUntilChanged } from 'rxjs/operators';
15
+ import { Subject, BehaviorSubject, fromEvent, Subscription, take, combineLatest, merge } from 'rxjs';
16
+ import { auditTime, buffer, filter, map, debounceTime, take as take$1, switchMap, tap, distinctUntilChanged } from 'rxjs/operators';
17
17
  import * as i11$1 from '@angular/forms';
18
18
  import { NG_VALUE_ACCESSOR, FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
19
19
  import * as i1 from '@progress/kendo-angular-dialog';
@@ -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: 1660133212,
46
+ publishDate: 1660204372,
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
  };
@@ -1434,10 +1434,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1434
1434
  * @hidden
1435
1435
  */
1436
1436
  class FocusService {
1437
- constructor(renderer, wrapper, domEvents) {
1437
+ constructor(renderer, wrapper, domEvents, zone) {
1438
1438
  this.renderer = renderer;
1439
1439
  this.wrapper = wrapper;
1440
1440
  this.domEvents = domEvents;
1441
+ this.zone = zone;
1441
1442
  this.ariaActiveDescendant = new EventEmitter();
1442
1443
  this.items = new Set();
1443
1444
  this.elementMap = new WeakMap();
@@ -1486,6 +1487,24 @@ class FocusService {
1486
1487
  }
1487
1488
  return this.activeItem !== currentItem;
1488
1489
  }
1490
+ focusFirst() {
1491
+ const firstEvent = Array.from(this.items.values())[0];
1492
+ if (!firstEvent) {
1493
+ return;
1494
+ }
1495
+ this.activate(firstEvent.element.nativeElement);
1496
+ this.focus();
1497
+ this.zone.onStable.pipe(take(1)).subscribe(() => {
1498
+ const first = Array.from(this.items.values())[0];
1499
+ if (!first) {
1500
+ this.clearActiveDescendant();
1501
+ return;
1502
+ }
1503
+ const id = first.element.nativeElement.getAttribute('id');
1504
+ this.ariaActiveDescendant.next(id);
1505
+ this.lastActiveDescendantId = id;
1506
+ });
1507
+ }
1489
1508
  clearActiveDescendant() {
1490
1509
  this.ariaActiveDescendant.next(null);
1491
1510
  }
@@ -1496,6 +1515,7 @@ class FocusService {
1496
1515
  if (item === next) {
1497
1516
  const id = item.element.nativeElement.getAttribute('id');
1498
1517
  this.ariaActiveDescendant.next(id);
1518
+ this.lastActiveDescendantId = id;
1499
1519
  }
1500
1520
  });
1501
1521
  this.activeItem = next;
@@ -1534,6 +1554,10 @@ class FocusService {
1534
1554
  }
1535
1555
  onFocusIn(e) {
1536
1556
  const item = this.elementMap.get(e.target);
1557
+ const shouldRestoreActiveDescendant = this.lastActiveDescendantId && this.lastActiveDescendantId !== (item === null || item === void 0 ? void 0 : item.element.nativeElement.getAttribute('id'));
1558
+ if (shouldRestoreActiveDescendant) {
1559
+ this.ariaActiveDescendant.next(this.lastActiveDescendantId);
1560
+ }
1537
1561
  if (!item || item === this.focusedItem) {
1538
1562
  return;
1539
1563
  }
@@ -1550,10 +1574,10 @@ class FocusService {
1550
1574
  }
1551
1575
  this.focusedItem.toggleFocus(false);
1552
1576
  this.focusedItem = null;
1553
- this.ariaActiveDescendant.next(null);
1577
+ this.clearActiveDescendant();
1554
1578
  }
1555
1579
  }
1556
- FocusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService, deps: [{ token: i0.Renderer2, optional: true }, { token: i0.ElementRef, optional: true }, { token: DomEventsService }], target: i0.ɵɵFactoryTarget.Injectable });
1580
+ FocusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService, deps: [{ token: i0.Renderer2, optional: true }, { token: i0.ElementRef, optional: true }, { token: DomEventsService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
1557
1581
  FocusService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService });
1558
1582
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService, decorators: [{
1559
1583
  type: Injectable
@@ -1561,7 +1585,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1561
1585
  type: Optional
1562
1586
  }] }, { type: i0.ElementRef, decorators: [{
1563
1587
  type: Optional
1564
- }] }, { type: DomEventsService }]; } });
1588
+ }] }, { type: DomEventsService }, { type: i0.NgZone }]; } });
1565
1589
 
1566
1590
  /**
1567
1591
  * @hidden
@@ -1594,7 +1618,7 @@ class DialogsService {
1594
1618
  this.focusService.focus();
1595
1619
  return false;
1596
1620
  }
1597
- this.viewState.layoutEnd.pipe(take(1)).subscribe(() => this.focusService.focus());
1621
+ this.viewState.layoutEnd.pipe(take$1(1)).subscribe(() => this.focusService.focus());
1598
1622
  const res = result;
1599
1623
  return res.value;
1600
1624
  }));
@@ -1798,6 +1822,7 @@ class FocusableDirective {
1798
1822
  this.element.nativeElement.focus();
1799
1823
  }
1800
1824
  toggleFocus(value) {
1825
+ var _a;
1801
1826
  const focusedClass = 'k-selected';
1802
1827
  const element = this.element.nativeElement;
1803
1828
  if (value) {
@@ -1806,7 +1831,11 @@ class FocusableDirective {
1806
1831
  else {
1807
1832
  this.renderer.removeClass(element, focusedClass);
1808
1833
  }
1809
- this.renderer.setAttribute(element, 'aria-selected', value.toString());
1834
+ const selectable = element.matches('.k-scheduler-agendaview .k-scheduler-content .k-selected');
1835
+ if (selectable) {
1836
+ (_a = element.closest('.k-scheduler-agendaview').querySelector('[aria-selected="true"]')) === null || _a === void 0 ? void 0 : _a.removeAttribute('aria-selected');
1837
+ this.renderer.setAttribute(element, 'aria-selected', value.toString());
1838
+ }
1810
1839
  }
1811
1840
  }
1812
1841
  FocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusableDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: FocusService }], target: i0.ɵɵFactoryTarget.Directive });
@@ -8272,7 +8301,7 @@ class AgendaViewInternalComponent {
8272
8301
  this.tasks.next(tasks);
8273
8302
  }));
8274
8303
  this.subs.add(this.viewContext.optionsChange.subscribe(this.optionsChange.bind(this)));
8275
- const onStable = () => this.zone.onStable.pipe(take(1));
8304
+ const onStable = () => this.zone.onStable.pipe(take$1(1));
8276
8305
  this.subs.add(combineLatest(this.tasks, this.localization.changes).pipe(switchMap(onStable))
8277
8306
  .subscribe(this.updateContentHeight));
8278
8307
  this.subs.add(this.pdfService.createElement.subscribe(this.createPDFElement.bind(this)));
@@ -9637,7 +9666,7 @@ class BaseView {
9637
9666
  }
9638
9667
  }
9639
9668
  onStable() {
9640
- return this.zone.onStable.asObservable().pipe(take(1));
9669
+ return this.zone.onStable.asObservable().pipe(take$1(1));
9641
9670
  }
9642
9671
  updateView() {
9643
9672
  this.slotService.invalidate();
@@ -10997,7 +11026,7 @@ MonthViewRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
10997
11026
  </ng-container>
10998
11027
  </table>
10999
11028
  </div>
11000
- <div class="k-scheduler-content" #content>
11029
+ <div class="k-scheduler-content" tabindex="0" #content>
11001
11030
  <table class="k-scheduler-table k-user-select-none" #contentTable role="presentation">
11002
11031
  <ng-container *ngFor="let resourceItem of verticalResources | resourceIterator; let verticalIndex = index; trackBy: itemIndex">
11003
11032
  <tr *ngFor="let week of weeks; let rangeIndex = index; trackBy: itemIndex">
@@ -11125,7 +11154,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
11125
11154
  </ng-container>
11126
11155
  </table>
11127
11156
  </div>
11128
- <div class="k-scheduler-content" #content>
11157
+ <div class="k-scheduler-content" tabindex="0" #content>
11129
11158
  <table class="k-scheduler-table k-user-select-none" #contentTable role="presentation">
11130
11159
  <ng-container *ngFor="let resourceItem of verticalResources | resourceIterator; let verticalIndex = index; trackBy: itemIndex">
11131
11160
  <tr *ngFor="let week of weeks; let rangeIndex = index; trackBy: itemIndex">
@@ -15411,10 +15440,11 @@ function seriesDate(head, occurrence, current, field) {
15411
15440
  * @hidden
15412
15441
  */
15413
15442
  class EditingDirectiveBase {
15414
- constructor(scheduler, localDataChangesService, dialogsService) {
15443
+ constructor(scheduler, localDataChangesService, dialogsService, focusService) {
15415
15444
  this.scheduler = scheduler;
15416
15445
  this.localDataChangesService = localDataChangesService;
15417
15446
  this.dialogsService = dialogsService;
15447
+ this.focusService = focusService;
15418
15448
  /**
15419
15449
  * Fires before the editing directive renders the **Add** dialog.
15420
15450
  */
@@ -15492,6 +15522,7 @@ class EditingDirectiveBase {
15492
15522
  .subscribe((editMode) => {
15493
15523
  if (editMode !== undefined) {
15494
15524
  this.handleRemove(dataItem, editMode);
15525
+ this.focusService.focusFirst();
15495
15526
  }
15496
15527
  });
15497
15528
  }
@@ -15500,6 +15531,7 @@ class EditingDirectiveBase {
15500
15531
  .subscribe((shouldRemove) => {
15501
15532
  if (shouldRemove) {
15502
15533
  this.handleRemove(dataItem, 0 /* Event */);
15534
+ this.focusService.focusFirst();
15503
15535
  }
15504
15536
  });
15505
15537
  }
@@ -15600,11 +15632,11 @@ class EditingDirectiveBase {
15600
15632
  return editable && editable[action] !== false;
15601
15633
  }
15602
15634
  }
15603
- EditingDirectiveBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditingDirectiveBase, deps: [{ token: SchedulerComponent }, { token: LocalDataChangesService }, { token: DialogsService }], target: i0.ɵɵFactoryTarget.Directive });
15635
+ EditingDirectiveBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditingDirectiveBase, deps: [{ token: SchedulerComponent }, { token: LocalDataChangesService }, { token: DialogsService }, { token: FocusService }], target: i0.ɵɵFactoryTarget.Directive });
15604
15636
  EditingDirectiveBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: EditingDirectiveBase, inputs: { editService: "editService" }, outputs: { add: "add", edit: "edit" }, ngImport: i0 });
15605
15637
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditingDirectiveBase, decorators: [{
15606
15638
  type: Directive
15607
- }], ctorParameters: function () { return [{ type: SchedulerComponent }, { type: LocalDataChangesService }, { type: DialogsService }]; }, propDecorators: { add: [{
15639
+ }], ctorParameters: function () { return [{ type: SchedulerComponent }, { type: LocalDataChangesService }, { type: DialogsService }, { type: FocusService }]; }, propDecorators: { add: [{
15608
15640
  type: Output
15609
15641
  }], edit: [{
15610
15642
  type: Output
@@ -15617,8 +15649,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
15617
15649
  * uses the [Reactive Angular Forms]({{ site.data.urls.angular['reactiveforms'] }}).
15618
15650
  */
15619
15651
  class ReactiveEditingDirective extends EditingDirectiveBase {
15620
- constructor(scheduler, localDataChangesService, dialogsService) {
15621
- super(scheduler, localDataChangesService, dialogsService);
15652
+ constructor(scheduler, localDataChangesService, dialogsService, focusService) {
15653
+ super(scheduler, localDataChangesService, dialogsService, focusService);
15622
15654
  this.scheduler = scheduler;
15623
15655
  this.localDataChangesService = localDataChangesService;
15624
15656
  this.dialogsService = dialogsService;
@@ -15692,14 +15724,14 @@ class ReactiveEditingDirective extends EditingDirectiveBase {
15692
15724
  return false;
15693
15725
  }
15694
15726
  }
15695
- ReactiveEditingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ReactiveEditingDirective, deps: [{ token: SchedulerComponent }, { token: LocalDataChangesService }, { token: DialogsService }], target: i0.ɵɵFactoryTarget.Directive });
15727
+ ReactiveEditingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ReactiveEditingDirective, deps: [{ token: SchedulerComponent }, { token: LocalDataChangesService }, { token: DialogsService }, { token: FocusService }], target: i0.ɵɵFactoryTarget.Directive });
15696
15728
  ReactiveEditingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ReactiveEditingDirective, selector: "[kendoSchedulerReactiveEditing]", inputs: { createFormGroup: ["kendoSchedulerReactiveEditing", "createFormGroup"] }, usesInheritance: true, ngImport: i0 });
15697
15729
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ReactiveEditingDirective, decorators: [{
15698
15730
  type: Directive,
15699
15731
  args: [{
15700
15732
  selector: '[kendoSchedulerReactiveEditing]'
15701
15733
  }]
15702
- }], ctorParameters: function () { return [{ type: SchedulerComponent }, { type: LocalDataChangesService }, { type: DialogsService }]; }, propDecorators: { createFormGroup: [{
15734
+ }], ctorParameters: function () { return [{ type: SchedulerComponent }, { type: LocalDataChangesService }, { type: DialogsService }, { type: FocusService }]; }, propDecorators: { createFormGroup: [{
15703
15735
  type: Input,
15704
15736
  args: ['kendoSchedulerReactiveEditing']
15705
15737
  }] } });
@@ -15860,7 +15892,7 @@ class ShortcutsDirective {
15860
15892
  }
15861
15893
  }
15862
15894
  focusWait() {
15863
- this.viewState.layoutEnd.pipe(take(1)).subscribe(() => this.focusService.focus());
15895
+ this.viewState.layoutEnd.pipe(take$1(1)).subscribe(() => this.focusService.focus());
15864
15896
  }
15865
15897
  }
15866
15898
  ShortcutsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ShortcutsDirective, deps: [{ token: SchedulerComponent }, { token: DomEventsService }, { token: FocusService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: ViewStateService }, { token: DialogsService }], target: i0.ɵɵFactoryTarget.Directive });
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { ElementRef, Renderer2, OnDestroy, EventEmitter } from '@angular/core';
5
+ import { ElementRef, Renderer2, OnDestroy, EventEmitter, NgZone } from '@angular/core';
6
6
  import { FocusableElement } from './focusable-element.interface';
7
7
  import { DomEventsService } from '../views/common/dom-events.service';
8
8
  import { FocusPosition } from './focus-position.interface';
@@ -14,19 +14,22 @@ export declare class FocusService implements OnDestroy {
14
14
  private renderer;
15
15
  private wrapper;
16
16
  private domEvents;
17
+ private zone;
17
18
  get activeElement(): ElementRef;
18
19
  ariaActiveDescendant: EventEmitter<string | null>;
19
20
  private activeItem;
20
21
  private focusedItem;
22
+ private lastActiveDescendantId;
21
23
  private items;
22
24
  private elementMap;
23
25
  private subs;
24
- constructor(renderer: Renderer2, wrapper: ElementRef, domEvents: DomEventsService);
26
+ constructor(renderer: Renderer2, wrapper: ElementRef, domEvents: DomEventsService, zone: NgZone);
25
27
  ngOnDestroy(): void;
26
28
  register(item: FocusableElement): void;
27
29
  unregister(item: FocusableElement): void;
28
30
  focus(): void;
29
31
  focusNext(options?: FocusPosition): boolean;
32
+ focusFirst(): void;
30
33
  clearActiveDescendant(): void;
31
34
  private activate;
32
35
  private activateNext;
@@ -34,6 +37,6 @@ export declare class FocusService implements OnDestroy {
34
37
  private toggleWrapper;
35
38
  private onFocusIn;
36
39
  private onFocusOut;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<FocusService, [{ optional: true; }, { optional: true; }, null]>;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<FocusService, [{ optional: true; }, { optional: true; }, null, null]>;
38
41
  static ɵprov: i0.ɵɵInjectableDeclaration<FocusService>;
39
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-scheduler",
3
- "version": "4.3.1-dev.202208101208",
3
+ "version": "4.3.1-dev.202208110754",
4
4
  "description": "Kendo UI Scheduler Angular",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",