@progress/kendo-angular-gantt 11.2.0-develop.8 → 11.2.0

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.
Files changed (68) hide show
  1. package/esm2020/binding-directives/flat-binding.directive.mjs +3 -3
  2. package/esm2020/binding-directives/hierarchy-binding.directive.mjs +3 -3
  3. package/esm2020/columns/cell-template.directive.mjs +3 -3
  4. package/esm2020/columns/column-base.component.mjs +3 -3
  5. package/esm2020/columns/column-group.component.mjs +3 -3
  6. package/esm2020/columns/column-menu-template.directive.mjs +3 -3
  7. package/esm2020/columns/column.component.mjs +3 -3
  8. package/esm2020/columns/edit-template.directive.mjs +3 -3
  9. package/esm2020/columns/filter-cell-template.directive.mjs +3 -3
  10. package/esm2020/columns/filter-menu-template.directive.mjs +3 -3
  11. package/esm2020/columns/footer-template.directive.mjs +3 -3
  12. package/esm2020/columns/header-template.directive.mjs +3 -3
  13. package/esm2020/columns/span-column.component.mjs +3 -3
  14. package/esm2020/common/mapping.service.mjs +3 -3
  15. package/esm2020/common/option-changes.service.mjs +3 -3
  16. package/esm2020/dependencies/dependency-dom.service.mjs +3 -3
  17. package/esm2020/dependencies/gantt-dependency.directive.mjs +3 -3
  18. package/esm2020/dragging/dependency-drag-create.directive.mjs +3 -3
  19. package/esm2020/dragging/drag-validation-tooltip.component.mjs +3 -3
  20. package/esm2020/editing/add-task.component.mjs +3 -3
  21. package/esm2020/editing/dependencies-table.component.mjs +3 -3
  22. package/esm2020/editing/edit-dialog.component.mjs +3 -3
  23. package/esm2020/editing/edit.service.mjs +3 -3
  24. package/esm2020/editing/task-fields.component.mjs +3 -3
  25. package/esm2020/expanded-state/expandable.directive.mjs +3 -3
  26. package/esm2020/gantt.component.mjs +19 -4
  27. package/esm2020/gantt.module.mjs +4 -4
  28. package/esm2020/localization/custom-messages.component.mjs +3 -3
  29. package/esm2020/localization/gantt-localization.service.mjs +3 -3
  30. package/esm2020/localization/localized-messages.directive.mjs +3 -3
  31. package/esm2020/localization/messages.mjs +3 -3
  32. package/esm2020/navigation/navigation.service.mjs +3 -3
  33. package/esm2020/package-metadata.mjs +2 -2
  34. package/esm2020/rendering/gantt-header-table-body.component.mjs +3 -3
  35. package/esm2020/rendering/gantt-milestone-task.component.mjs +3 -3
  36. package/esm2020/rendering/gantt-summary-task.component.mjs +3 -3
  37. package/esm2020/rendering/gantt-task-base.mjs +3 -3
  38. package/esm2020/rendering/gantt-task.component.mjs +3 -3
  39. package/esm2020/rendering/gantt-tasks-table-body.component.mjs +3 -3
  40. package/esm2020/scrolling/scroll-sync.service.mjs +3 -3
  41. package/esm2020/scrolling/timeline-scroll.directive.mjs +3 -3
  42. package/esm2020/scrolling/timeline-scroll.service.mjs +3 -3
  43. package/esm2020/selection/selectable.directive.mjs +3 -3
  44. package/esm2020/template-directives/summary-task-template.directive.mjs +3 -3
  45. package/esm2020/template-directives/task-content-template.directive.mjs +3 -3
  46. package/esm2020/template-directives/task-template.directive.mjs +3 -3
  47. package/esm2020/timeline/gantt-timeline.component.mjs +5 -5
  48. package/esm2020/timeline/timeline-day-view.component.mjs +3 -3
  49. package/esm2020/timeline/timeline-day-view.service.mjs +3 -3
  50. package/esm2020/timeline/timeline-month-view.component.mjs +3 -3
  51. package/esm2020/timeline/timeline-month-view.service.mjs +3 -3
  52. package/esm2020/timeline/timeline-view.service.mjs +3 -3
  53. package/esm2020/timeline/timeline-week-view.component.mjs +3 -3
  54. package/esm2020/timeline/timeline-week-view.service.mjs +3 -3
  55. package/esm2020/timeline/timeline-year-view.component.mjs +3 -3
  56. package/esm2020/timeline/timeline-year-view.service.mjs +3 -3
  57. package/esm2020/timeline/view-base.mjs +3 -3
  58. package/esm2020/toolbar/toolbar-navigation.service.mjs +27 -0
  59. package/esm2020/toolbar/toolbar-template.directive.mjs +3 -3
  60. package/esm2020/toolbar/toolbar.component.mjs +65 -10
  61. package/esm2020/toolbar/view-selector.component.mjs +5 -5
  62. package/fesm2015/progress-kendo-angular-gantt.mjs +278 -189
  63. package/fesm2020/progress-kendo-angular-gantt.mjs +278 -189
  64. package/gantt.component.d.ts +6 -1
  65. package/package.json +13 -13
  66. package/schematics/ngAdd/index.js +10 -10
  67. package/toolbar/toolbar-navigation.service.d.ts +18 -0
  68. package/toolbar/toolbar.component.d.ts +11 -2
@@ -34,9 +34,9 @@ export class ViewBase {
34
34
  }
35
35
  }
36
36
  }
37
- ViewBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ViewBase, deps: [{ token: i1.OptionChangesService }, { token: i2.DependencyDomService }], target: i0.ɵɵFactoryTarget.Directive });
38
- ViewBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ViewBase, selector: "kendo-gantt-view-base", inputs: { slotWidth: "slotWidth" }, usesOnChanges: true, ngImport: i0 });
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ViewBase, decorators: [{
37
+ ViewBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewBase, deps: [{ token: i1.OptionChangesService }, { token: i2.DependencyDomService }], target: i0.ɵɵFactoryTarget.Directive });
38
+ ViewBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: ViewBase, selector: "kendo-gantt-view-base", inputs: { slotWidth: "slotWidth" }, usesOnChanges: true, ngImport: i0 });
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewBase, decorators: [{
40
40
  type: Directive,
41
41
  args: [{
42
42
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -0,0 +1,27 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Injectable, Renderer2 } from '@angular/core';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * @hidden
9
+ */
10
+ export class ToolbarNavigationService {
11
+ constructor(renderer) {
12
+ this.renderer = renderer;
13
+ this.focusIndex = 0;
14
+ }
15
+ updateFocus() {
16
+ this.focusableContent.forEach(el => {
17
+ this.renderer.setAttribute(el, 'tabindex', '-1');
18
+ });
19
+ this.renderer.setAttribute(this.focusableContent[this.focusIndex], 'tabindex', '0');
20
+ this.focusableContent[this.focusIndex].focus();
21
+ }
22
+ }
23
+ ToolbarNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ToolbarNavigationService, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
24
+ ToolbarNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ToolbarNavigationService });
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ToolbarNavigationService, decorators: [{
26
+ type: Injectable
27
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }]; } });
@@ -112,9 +112,9 @@ export class ToolbarTemplateDirective {
112
112
  return this._position;
113
113
  }
114
114
  }
115
- ToolbarTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolbarTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
116
- ToolbarTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ToolbarTemplateDirective, selector: "[kendoGanttToolbarTemplate]", inputs: { position: "position" }, ngImport: i0 });
117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolbarTemplateDirective, decorators: [{
115
+ ToolbarTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ToolbarTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
116
+ ToolbarTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: ToolbarTemplateDirective, selector: "[kendoGanttToolbarTemplate]", inputs: { position: "position" }, ngImport: i0 });
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ToolbarTemplateDirective, decorators: [{
118
118
  type: Directive,
119
119
  args: [{
120
120
  selector: '[kendoGanttToolbarTemplate]'
@@ -3,21 +3,55 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { ToolbarTemplateDirective } from './toolbar-template.directive';
6
- import { Component, Input, HostBinding, Output, EventEmitter } from '@angular/core';
6
+ import { Component, Input, HostBinding, Output, EventEmitter, HostListener, ElementRef } from '@angular/core';
7
+ import { ToolbarNavigationService } from './toolbar-navigation.service';
8
+ import { closest, focusableSelector, isDocumentAvailable, isFocusable, isVisible } from '@progress/kendo-angular-common';
7
9
  import * as i0 from "@angular/core";
8
- import * as i1 from "../editing/add-task.component";
9
- import * as i2 from "./view-selector.component";
10
- import * as i3 from "@angular/common";
10
+ import * as i1 from "./toolbar-navigation.service";
11
+ import * as i2 from "../editing/add-task.component";
12
+ import * as i3 from "./view-selector.component";
13
+ import * as i4 from "@angular/common";
11
14
  /**
12
15
  * @hidden
13
16
  */
14
17
  export class ToolbarComponent {
15
- constructor() {
18
+ constructor(hostEl, navigationService) {
19
+ this.hostEl = hostEl;
20
+ this.navigationService = navigationService;
16
21
  this.context = {};
17
22
  this.role = 'toolbar';
18
23
  this.toolbarSizingClass = true;
19
24
  this.activeViewChange = new EventEmitter();
20
25
  }
26
+ clickHandler(ev) {
27
+ if (this.navigable) {
28
+ const closestFocusable = closest(ev.target, isFocusable);
29
+ const targetIndex = this.navigationService.focusableContent.indexOf(closestFocusable);
30
+ if (targetIndex > -1) {
31
+ this.navigationService.focusIndex = targetIndex;
32
+ }
33
+ this.navigationService.updateFocus();
34
+ }
35
+ }
36
+ ;
37
+ arrowLeftListener() {
38
+ if (this.navigable && isDocumentAvailable()) {
39
+ this.navigationService.focusIndex--;
40
+ if (this.navigationService.focusIndex < 0) {
41
+ this.navigationService.focusIndex = this.navigationService.focusableContent.length - 1;
42
+ }
43
+ this.navigationService.updateFocus();
44
+ }
45
+ }
46
+ arrowRightListener() {
47
+ if (this.navigable && isDocumentAvailable()) {
48
+ this.navigationService.focusIndex++;
49
+ if (this.navigationService.focusIndex >= this.navigationService.focusableContent.length) {
50
+ this.navigationService.focusIndex = 0;
51
+ }
52
+ this.navigationService.updateFocus();
53
+ }
54
+ }
21
55
  set position(value) {
22
56
  this.context.position = this._position = value;
23
57
  }
@@ -35,9 +69,18 @@ export class ToolbarComponent {
35
69
  handleViewChange(view) {
36
70
  this.activeViewChange.emit(view);
37
71
  }
72
+ ngAfterViewInit() {
73
+ if (isDocumentAvailable()) {
74
+ const focusableElements = Array.from(this.hostEl.nativeElement.querySelectorAll(focusableSelector) || [])
75
+ .filter(el => isVisible(el));
76
+ if (focusableElements.length) {
77
+ this.navigationService.focusableContent = focusableElements;
78
+ }
79
+ }
80
+ }
38
81
  }
39
- ToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
40
- ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolbarComponent, selector: "kendo-gantt-toolbar", inputs: { showAddTask: "showAddTask", showViewSelector: "showViewSelector", views: "views", activeView: "activeView", toolbarTemplate: "toolbarTemplate", position: "position" }, outputs: { activeViewChange: "activeViewChange" }, host: { properties: { "attr.role": "this.role", "class.k-toolbar-md": "this.toolbarSizingClass" } }, ngImport: i0, template: `
82
+ ToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i1.ToolbarNavigationService }], target: i0.ɵɵFactoryTarget.Component });
83
+ ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ToolbarComponent, selector: "kendo-gantt-toolbar", inputs: { showAddTask: "showAddTask", showViewSelector: "showViewSelector", views: "views", activeView: "activeView", toolbarTemplate: "toolbarTemplate", navigable: "navigable", position: "position" }, outputs: { activeViewChange: "activeViewChange" }, host: { listeners: { "click": "clickHandler($event)", "keydown.arrowleft": "arrowLeftListener($event)", "keydown.arrowright": "arrowRightListener($event)" }, properties: { "attr.role": "this.role", "class.k-toolbar-md": "this.toolbarSizingClass" } }, providers: [ToolbarNavigationService], ngImport: i0, template: `
41
84
  <ng-container *ngIf="!renderTemplate">
42
85
  <kendo-gantt-add-task *ngIf="showAddTask"></kendo-gantt-add-task>
43
86
  <span class="k-spacer k-toolbar-spacer"></span>
@@ -53,11 +96,12 @@ ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
53
96
  [ngTemplateOutletContext]="context"
54
97
  >
55
98
  </ng-template>
56
- `, isInline: true, components: [{ type: i1.GanttAddTaskComponent, selector: "kendo-gantt-add-task", inputs: ["data", "icon"] }, { type: i2.ViewSelectorComponent, selector: "kendo-gantt-view-selector", inputs: ["views", "activeView"], outputs: ["activeViewChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolbarComponent, decorators: [{
99
+ `, isInline: true, components: [{ type: i2.GanttAddTaskComponent, selector: "kendo-gantt-add-task", inputs: ["data", "icon"] }, { type: i3.ViewSelectorComponent, selector: "kendo-gantt-view-selector", inputs: ["views", "activeView"], outputs: ["activeViewChange"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ToolbarComponent, decorators: [{
58
101
  type: Component,
59
102
  args: [{
60
103
  selector: 'kendo-gantt-toolbar',
104
+ providers: [ToolbarNavigationService],
61
105
  template: `
62
106
  <ng-container *ngIf="!renderTemplate">
63
107
  <kendo-gantt-add-task *ngIf="showAddTask"></kendo-gantt-add-task>
@@ -76,12 +120,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
76
120
  </ng-template>
77
121
  `
78
122
  }]
79
- }], propDecorators: { role: [{
123
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.ToolbarNavigationService }]; }, propDecorators: { role: [{
80
124
  type: HostBinding,
81
125
  args: ['attr.role']
82
126
  }], toolbarSizingClass: [{
83
127
  type: HostBinding,
84
128
  args: ['class.k-toolbar-md']
129
+ }], clickHandler: [{
130
+ type: HostListener,
131
+ args: ['click', ['$event']]
132
+ }], arrowLeftListener: [{
133
+ type: HostListener,
134
+ args: ['keydown.arrowleft', ['$event']]
135
+ }], arrowRightListener: [{
136
+ type: HostListener,
137
+ args: ['keydown.arrowright', ['$event']]
85
138
  }], activeViewChange: [{
86
139
  type: Output
87
140
  }], showAddTask: [{
@@ -94,6 +147,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
94
147
  type: Input
95
148
  }], toolbarTemplate: [{
96
149
  type: Input
150
+ }], navigable: [{
151
+ type: Input
97
152
  }], position: [{
98
153
  type: Input
99
154
  }] } });
@@ -47,8 +47,8 @@ export class ViewSelectorComponent {
47
47
  this.activeViewChange.emit(event.target.value);
48
48
  }
49
49
  }
50
- ViewSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ViewSelectorComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
51
- ViewSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ViewSelectorComponent, selector: "kendo-gantt-view-selector", inputs: { views: "views", activeView: "activeView" }, outputs: { activeViewChange: "activeViewChange" }, host: { properties: { "class.k-gantt-views-wrapper": "this.hostClass" } }, ngImport: i0, template: `
50
+ ViewSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewSelectorComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
51
+ ViewSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ViewSelectorComponent, selector: "kendo-gantt-view-selector", inputs: { views: "views", activeView: "activeView" }, outputs: { activeViewChange: "activeViewChange" }, host: { properties: { "class.k-gantt-views-wrapper": "this.hostClass" } }, ngImport: i0, template: `
52
52
  <select
53
53
  class="k-dropdownlist k-picker k-rounded-md k-views-dropdown"
54
54
  aria-label="View Selector"
@@ -56,7 +56,7 @@ ViewSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
56
56
  (change)="onActiveViewChange($event)">
57
57
  <option *ngFor="let view of views" [value]="view">{{getViewTypeText(view)}}</option>
58
58
  </select>
59
- <kendo-buttongroup class="k-gantt-views" selection="single">
59
+ <kendo-buttongroup class="k-gantt-views" selection="single" [navigable]="false">
60
60
  <button *ngFor="let view of views"
61
61
  kendoButton
62
62
  type="button"
@@ -64,7 +64,7 @@ ViewSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
64
64
  (click)="onClick(view)">{{getViewTypeText(view)}}</button>
65
65
  </kendo-buttongroup>
66
66
  `, isInline: true, components: [{ type: i2.ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { type: i2.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] });
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ViewSelectorComponent, decorators: [{
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewSelectorComponent, decorators: [{
68
68
  type: Component,
69
69
  args: [{
70
70
  selector: 'kendo-gantt-view-selector',
@@ -76,7 +76,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
76
76
  (change)="onActiveViewChange($event)">
77
77
  <option *ngFor="let view of views" [value]="view">{{getViewTypeText(view)}}</option>
78
78
  </select>
79
- <kendo-buttongroup class="k-gantt-views" selection="single">
79
+ <kendo-buttongroup class="k-gantt-views" selection="single" [navigable]="false">
80
80
  <button *ngFor="let view of views"
81
81
  kendoButton
82
82
  type="button"