@progress/kendo-angular-gantt 21.4.1-develop.1 → 22.0.0-develop.1
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.
- package/columns/column-base.component.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-gantt.mjs +201 -201
- package/localization/messages.d.ts +1 -1
- package/package.json +22 -30
- package/rendering/gantt-task-base.d.ts +1 -1
- package/schematics/ngAdd/index.js +7 -7
- package/timeline/view-base.d.ts +1 -1
- package/esm2022/binding-directives/flat-binding.directive.mjs +0 -50
- package/esm2022/binding-directives/hierarchy-binding.directive.mjs +0 -49
- package/esm2022/columns/cell-template.directive.mjs +0 -47
- package/esm2022/columns/column-base.component.mjs +0 -22
- package/esm2022/columns/column-group.component.mjs +0 -80
- package/esm2022/columns/column-menu-template.directive.mjs +0 -40
- package/esm2022/columns/column.component.mjs +0 -122
- package/esm2022/columns/columns.mjs +0 -15
- package/esm2022/columns/edit-template.directive.mjs +0 -46
- package/esm2022/columns/filter-cell-template.directive.mjs +0 -32
- package/esm2022/columns/filter-menu-template.directive.mjs +0 -41
- package/esm2022/columns/footer-template.directive.mjs +0 -44
- package/esm2022/columns/header-template.directive.mjs +0 -43
- package/esm2022/columns/span-column.component.mjs +0 -82
- package/esm2022/common/default-callbacks.mjs +0 -25
- package/esm2022/common/mapping.service.mjs +0 -62
- package/esm2022/common/option-changes.service.mjs +0 -28
- package/esm2022/dependencies/dependency-dom.service.mjs +0 -80
- package/esm2022/dependencies/dom-dependency-args.mjs +0 -5
- package/esm2022/dependencies/gantt-dependency.directive.mjs +0 -91
- package/esm2022/dependencies/utils.mjs +0 -195
- package/esm2022/directives.mjs +0 -63
- package/esm2022/dragging/dependency-drag-create.directive.mjs +0 -337
- package/esm2022/dragging/drag-validation-tooltip.component.mjs +0 -70
- package/esm2022/dragging/task-drag.directive.mjs +0 -94
- package/esm2022/dragging/task-drag.service.mjs +0 -239
- package/esm2022/editing/add-task.component.mjs +0 -127
- package/esm2022/editing/dependencies-table.component.mjs +0 -233
- package/esm2022/editing/edit-dialog.component.mjs +0 -225
- package/esm2022/editing/edit.service.mjs +0 -118
- package/esm2022/editing/task-fields.component.mjs +0 -127
- package/esm2022/editing/utils.mjs +0 -15
- package/esm2022/expanded-state/expand-event.mjs +0 -18
- package/esm2022/expanded-state/expandable.directive.mjs +0 -39
- package/esm2022/gantt.component.mjs +0 -2415
- package/esm2022/gantt.module.mjs +0 -132
- package/esm2022/index.mjs +0 -42
- package/esm2022/localization/custom-messages.component.mjs +0 -52
- package/esm2022/localization/gantt-localization.service.mjs +0 -27
- package/esm2022/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/localization/messages.mjs +0 -453
- package/esm2022/models/cell-content-type.interface.mjs +0 -5
- package/esm2022/models/class-callbacks.mjs +0 -5
- package/esm2022/models/column-menu-settings.interface.mjs +0 -5
- package/esm2022/models/column-reorder-config.mjs +0 -5
- package/esm2022/models/current-time-settings.interface.mjs +0 -5
- package/esm2022/models/date-range.interface.mjs +0 -5
- package/esm2022/models/dependency-type.enum.mjs +0 -32
- package/esm2022/models/events/cell-click-event.interface.mjs +0 -5
- package/esm2022/models/events/cell-close-event.interface.mjs +0 -44
- package/esm2022/models/events/click-event.interface.mjs +0 -5
- package/esm2022/models/events/column-locked-change-event.interface.mjs +0 -5
- package/esm2022/models/events/column-reorder-event.interface.mjs +0 -5
- package/esm2022/models/events/column-resize-event.interface.mjs +0 -5
- package/esm2022/models/events/column-visibility-change-event.interface.mjs +0 -5
- package/esm2022/models/events/data-state-change-event.interface.mjs +0 -5
- package/esm2022/models/events/dependency-add-event.interface.mjs +0 -5
- package/esm2022/models/events/index.mjs +0 -5
- package/esm2022/models/events/selected-view-change-event.interface.mjs +0 -5
- package/esm2022/models/events/task-add-event.interface.mjs +0 -5
- package/esm2022/models/events/task-click-event.interface.mjs +0 -5
- package/esm2022/models/events/task-delete-event.interface.mjs +0 -5
- package/esm2022/models/events/task-drag-event.interface.mjs +0 -5
- package/esm2022/models/events/task-edit-event.interface.mjs +0 -5
- package/esm2022/models/filterable-settings.mjs +0 -5
- package/esm2022/models/gantt-dependency-model-fields.interface.mjs +0 -13
- package/esm2022/models/gantt-dependency.interface.mjs +0 -5
- package/esm2022/models/gantt-task-model-fields.interface.mjs +0 -15
- package/esm2022/models/gantt-task.interface.mjs +0 -5
- package/esm2022/models/models.mjs +0 -8
- package/esm2022/models/slot.interface.mjs +0 -5
- package/esm2022/models/sort-settings.mjs +0 -17
- package/esm2022/models/splitter-pane-options.interface.mjs +0 -20
- package/esm2022/models/timeline-header-date-format.mjs +0 -5
- package/esm2022/models/timeline-options.interface.mjs +0 -5
- package/esm2022/models/timeline-view.mjs +0 -5
- package/esm2022/models/toolbar-settings.mjs +0 -5
- package/esm2022/models/tooltip-options.interface.mjs +0 -5
- package/esm2022/models/view-item.interface.mjs +0 -5
- package/esm2022/navigation/navigation-models.mjs +0 -5
- package/esm2022/navigation/navigation.service.mjs +0 -271
- package/esm2022/navigation/utils.mjs +0 -61
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/progress-kendo-angular-gantt.mjs +0 -8
- package/esm2022/rendering/gantt-header-table-body.component.mjs +0 -61
- package/esm2022/rendering/gantt-milestone-task.component.mjs +0 -102
- package/esm2022/rendering/gantt-summary-task.component.mjs +0 -157
- package/esm2022/rendering/gantt-task-base.mjs +0 -230
- package/esm2022/rendering/gantt-task.component.mjs +0 -227
- package/esm2022/rendering/gantt-tasks-table-body.component.mjs +0 -206
- package/esm2022/scrolling/drag-scroll-settings.mjs +0 -20
- package/esm2022/scrolling/scroll-sync.service.mjs +0 -83
- package/esm2022/scrolling/timeline-scroll.directive.mjs +0 -83
- package/esm2022/scrolling/timeline-scroll.service.mjs +0 -37
- package/esm2022/scrolling/utils.mjs +0 -77
- package/esm2022/selection/selectable.directive.mjs +0 -126
- package/esm2022/selection/selection-change-event.mjs +0 -5
- package/esm2022/template-directives/summary-task-template.directive.mjs +0 -43
- package/esm2022/template-directives/task-content-template.directive.mjs +0 -46
- package/esm2022/template-directives/task-drag-tooltip-template.directive.mjs +0 -47
- package/esm2022/template-directives/task-template.directive.mjs +0 -41
- package/esm2022/template-directives/task-tooltip-template.directive.mjs +0 -48
- package/esm2022/timeline/current-time-marker.service.mjs +0 -90
- package/esm2022/timeline/gantt-timeline.component.mjs +0 -624
- package/esm2022/timeline/timeline-base-view.service.mjs +0 -201
- package/esm2022/timeline/timeline-day-view.component.mjs +0 -49
- package/esm2022/timeline/timeline-day-view.service.mjs +0 -68
- package/esm2022/timeline/timeline-month-view.component.mjs +0 -49
- package/esm2022/timeline/timeline-month-view.service.mjs +0 -66
- package/esm2022/timeline/timeline-view.service.mjs +0 -38
- package/esm2022/timeline/timeline-week-view.component.mjs +0 -49
- package/esm2022/timeline/timeline-week-view.service.mjs +0 -62
- package/esm2022/timeline/timeline-year-view.component.mjs +0 -49
- package/esm2022/timeline/timeline-year-view.service.mjs +0 -57
- package/esm2022/timeline/view-base.mjs +0 -73
- package/esm2022/toolbar/toolbar-navigation.service.mjs +0 -29
- package/esm2022/toolbar/toolbar-template.directive.mjs +0 -56
- package/esm2022/toolbar/toolbar.component.mjs +0 -181
- package/esm2022/toolbar/view-selector.component.mjs +0 -112
- package/esm2022/utils.mjs +0 -311
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 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 } from "@angular/core";
|
|
6
|
-
import { IntlService } from "@progress/kendo-angular-intl";
|
|
7
|
-
import { addMonths, firstDayOfMonth, getDate, lastDayOfMonth } from "@progress/kendo-date-math";
|
|
8
|
-
import { MappingService } from "../common/mapping.service";
|
|
9
|
-
import { TimelineBaseViewService } from "./timeline-base-view.service";
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
import * as i1 from "@progress/kendo-angular-intl";
|
|
12
|
-
import * as i2 from "../common/mapping.service";
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
export class TimeLineYearViewService extends TimelineBaseViewService {
|
|
17
|
-
constructor(intlService, mapper) {
|
|
18
|
-
super(intlService, mapper);
|
|
19
|
-
}
|
|
20
|
-
getTableWidth(tasks) {
|
|
21
|
-
const timeSlots = this.getSlots(tasks)[1];
|
|
22
|
-
const slotWidth = this.options.slotWidth;
|
|
23
|
-
return Math.round(timeSlots.length * slotWidth);
|
|
24
|
-
}
|
|
25
|
-
getStartOffset(rangeStart) {
|
|
26
|
-
const monthStart = firstDayOfMonth(rangeStart);
|
|
27
|
-
return addMonths(getDate(monthStart), -1);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
getEndOffset(rangeEnd) {
|
|
33
|
-
const monthEnd = lastDayOfMonth(rangeEnd);
|
|
34
|
-
return addMonths(getDate(monthEnd), 1);
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
* @param tasks - The tasks which are going to be rendered in the table
|
|
39
|
-
* @returns {Array<Object>} - A collection containing the years and months slots
|
|
40
|
-
*
|
|
41
|
-
* Used to render the number of columns and the header
|
|
42
|
-
*/
|
|
43
|
-
getSlots(tasks) {
|
|
44
|
-
// will return the header rows slots
|
|
45
|
-
const slots = [];
|
|
46
|
-
const { start, end } = this.getRange(tasks);
|
|
47
|
-
const years = this.getYears(start, end, this.options.timelineHeadersDateFormat?.groupHeaderDateFormat);
|
|
48
|
-
const months = this.getMonths(start, end, false, this.options.timelineHeadersDateFormat?.columnHeaderDateFormat);
|
|
49
|
-
slots.push(years, months);
|
|
50
|
-
return slots;
|
|
51
|
-
}
|
|
52
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TimeLineYearViewService, deps: [{ token: i1.IntlService }, { token: i2.MappingService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
53
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TimeLineYearViewService });
|
|
54
|
-
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TimeLineYearViewService, decorators: [{
|
|
56
|
-
type: Injectable
|
|
57
|
-
}], ctorParameters: () => [{ type: i1.IntlService }, { type: i2.MappingService }] });
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, Input } from '@angular/core';
|
|
6
|
-
import { anyChanged } from '@progress/kendo-angular-common';
|
|
7
|
-
import { DependencyDomService } from '../dependencies/dependency-dom.service';
|
|
8
|
-
import { OptionChangesService } from '../common/option-changes.service';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
import * as i1 from "../common/option-changes.service";
|
|
11
|
-
import * as i2 from "../dependencies/dependency-dom.service";
|
|
12
|
-
/**
|
|
13
|
-
* Serves as the base class for the timeline view components of the Gantt.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* export class CustomTimelineViewComponent extends ViewBase {
|
|
18
|
-
* public readonly type: TimelineViewType = 'custom';
|
|
19
|
-
* }
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export class ViewBase {
|
|
23
|
-
optionChangesService;
|
|
24
|
-
dependencyDomService;
|
|
25
|
-
/**
|
|
26
|
-
* Sets the width of the time slot headers in pixels.
|
|
27
|
-
*
|
|
28
|
-
* @default 100
|
|
29
|
-
*/
|
|
30
|
-
slotWidth = 100;
|
|
31
|
-
/**
|
|
32
|
-
* Sets the date format for the Grouped and Column headers.
|
|
33
|
-
*/
|
|
34
|
-
timelineHeadersDateFormat;
|
|
35
|
-
/**
|
|
36
|
-
* Specifies the current time marker settings.
|
|
37
|
-
* If you do not set a value, the component uses the value from the Gantt component
|
|
38
|
-
* [`currentTimeMarker`]({% slug api_gantt_ganttcomponent %}#toc-currentTimeMarker) property.
|
|
39
|
-
*/
|
|
40
|
-
currentTimeMarker;
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @hidden
|
|
44
|
-
*/
|
|
45
|
-
constructor(optionChangesService, dependencyDomService) {
|
|
46
|
-
this.optionChangesService = optionChangesService;
|
|
47
|
-
this.dependencyDomService = dependencyDomService;
|
|
48
|
-
}
|
|
49
|
-
ngOnChanges(changes) {
|
|
50
|
-
if (anyChanged(['slotWidth'], changes)) {
|
|
51
|
-
this.optionChangesService.notifyColumnChanges();
|
|
52
|
-
this.dependencyDomService.notifyChanges();
|
|
53
|
-
}
|
|
54
|
-
if (anyChanged(['timelineHeadersDateFormat'], changes)) {
|
|
55
|
-
this.optionChangesService.notifyDateFormatChanges();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ViewBase, deps: [{ token: i1.OptionChangesService }, { token: i2.DependencyDomService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
59
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ViewBase, selector: "kendo-gantt-view-base", inputs: { slotWidth: "slotWidth", timelineHeadersDateFormat: "timelineHeadersDateFormat", currentTimeMarker: "currentTimeMarker" }, usesOnChanges: true, ngImport: i0 });
|
|
60
|
-
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ViewBase, decorators: [{
|
|
62
|
-
type: Directive,
|
|
63
|
-
args: [{
|
|
64
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
65
|
-
selector: 'kendo-gantt-view-base'
|
|
66
|
-
}]
|
|
67
|
-
}], ctorParameters: () => [{ type: i1.OptionChangesService }, { type: i2.DependencyDomService }], propDecorators: { slotWidth: [{
|
|
68
|
-
type: Input
|
|
69
|
-
}], timelineHeadersDateFormat: [{
|
|
70
|
-
type: Input
|
|
71
|
-
}], currentTimeMarker: [{
|
|
72
|
-
type: Input
|
|
73
|
-
}] } });
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 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
|
-
renderer;
|
|
12
|
-
focusableContent;
|
|
13
|
-
focusIndex = 0;
|
|
14
|
-
constructor(renderer) {
|
|
15
|
-
this.renderer = renderer;
|
|
16
|
-
}
|
|
17
|
-
updateFocus() {
|
|
18
|
-
this.focusableContent.forEach(el => {
|
|
19
|
-
this.renderer.setAttribute(el, 'tabindex', '-1');
|
|
20
|
-
});
|
|
21
|
-
this.renderer.setAttribute(this.focusableContent[this.focusIndex], 'tabindex', '0');
|
|
22
|
-
this.focusableContent[this.focusIndex].focus();
|
|
23
|
-
}
|
|
24
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
25
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService });
|
|
26
|
-
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService, decorators: [{
|
|
28
|
-
type: Injectable
|
|
29
|
-
}], ctorParameters: () => [{ type: i0.Renderer2 }] });
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, TemplateRef, Optional, Input } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Represents the toolbar template of the Gantt.
|
|
9
|
-
*
|
|
10
|
-
* The template context includes:
|
|
11
|
-
* - `position`—The position where the toolbar template renders. Possible values are `'top'` and `'bottom'`.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```html
|
|
15
|
-
* <kendo-gantt [kendoGanttHierarchyBinding]="data" [style.height.px]="400">
|
|
16
|
-
* <ng-template kendoGanttToolbarTemplate [position]="position" let-position="position">
|
|
17
|
-
* <button kendoButton (click)="onClick()">Custom action</button>
|
|
18
|
-
* </ng-template>
|
|
19
|
-
* </kendo-gantt>
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export class ToolbarTemplateDirective {
|
|
23
|
-
templateRef;
|
|
24
|
-
_position = "top";
|
|
25
|
-
/**
|
|
26
|
-
* Sets the Gantt Toolbar that uses this template.
|
|
27
|
-
*
|
|
28
|
-
* Possible values:
|
|
29
|
-
* - `top`—Renders the template in the top toolbar (if present) only.
|
|
30
|
-
* - `bottom`—Renders the template in the bottom toolbar (if present) only.
|
|
31
|
-
* - `both`—Renders the template in both toolbars (if present).
|
|
32
|
-
*/
|
|
33
|
-
set position(position) {
|
|
34
|
-
this._position = position;
|
|
35
|
-
}
|
|
36
|
-
get position() {
|
|
37
|
-
return this._position;
|
|
38
|
-
}
|
|
39
|
-
constructor(templateRef) {
|
|
40
|
-
this.templateRef = templateRef;
|
|
41
|
-
}
|
|
42
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
43
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ToolbarTemplateDirective, isStandalone: true, selector: "[kendoGanttToolbarTemplate]", inputs: { position: "position" }, ngImport: i0 });
|
|
44
|
-
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarTemplateDirective, decorators: [{
|
|
46
|
-
type: Directive,
|
|
47
|
-
args: [{
|
|
48
|
-
selector: '[kendoGanttToolbarTemplate]',
|
|
49
|
-
standalone: true
|
|
50
|
-
}]
|
|
51
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
|
|
52
|
-
type: Optional
|
|
53
|
-
}] }], propDecorators: { position: [{
|
|
54
|
-
type: Input,
|
|
55
|
-
args: ['position']
|
|
56
|
-
}] } });
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { ToolbarTemplateDirective } from './toolbar-template.directive';
|
|
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';
|
|
9
|
-
import { ViewSelectorComponent } from './view-selector.component';
|
|
10
|
-
import { GanttAddTaskComponent } from '../editing/add-task.component';
|
|
11
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
12
|
-
import * as i0 from "@angular/core";
|
|
13
|
-
import * as i1 from "./toolbar-navigation.service";
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
export class ToolbarComponent {
|
|
18
|
-
hostEl;
|
|
19
|
-
navigationService;
|
|
20
|
-
context = {};
|
|
21
|
-
role = 'toolbar';
|
|
22
|
-
hostClasses = true;
|
|
23
|
-
clickHandler(ev) {
|
|
24
|
-
if (this.navigable) {
|
|
25
|
-
const closestFocusable = closest(ev.target, isFocusable);
|
|
26
|
-
const targetIndex = this.navigationService.focusableContent.indexOf(closestFocusable);
|
|
27
|
-
if (targetIndex > -1) {
|
|
28
|
-
this.navigationService.focusIndex = targetIndex;
|
|
29
|
-
}
|
|
30
|
-
this.navigationService.updateFocus();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
arrowLeftListener() {
|
|
34
|
-
if (this.navigable && isDocumentAvailable()) {
|
|
35
|
-
this.navigationService.focusIndex--;
|
|
36
|
-
if (this.navigationService.focusIndex < 0) {
|
|
37
|
-
this.navigationService.focusIndex = this.navigationService.focusableContent.length - 1;
|
|
38
|
-
}
|
|
39
|
-
this.navigationService.updateFocus();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
arrowRightListener() {
|
|
43
|
-
if (this.navigable && isDocumentAvailable()) {
|
|
44
|
-
this.navigationService.focusIndex++;
|
|
45
|
-
if (this.navigationService.focusIndex >= this.navigationService.focusableContent.length) {
|
|
46
|
-
this.navigationService.focusIndex = 0;
|
|
47
|
-
}
|
|
48
|
-
this.navigationService.updateFocus();
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
activeViewChange = new EventEmitter();
|
|
52
|
-
showAddTask;
|
|
53
|
-
showViewSelector;
|
|
54
|
-
views;
|
|
55
|
-
activeView;
|
|
56
|
-
toolbarTemplate;
|
|
57
|
-
navigable;
|
|
58
|
-
set position(value) {
|
|
59
|
-
this.context.position = this._position = value;
|
|
60
|
-
}
|
|
61
|
-
get position() {
|
|
62
|
-
return this._position;
|
|
63
|
-
}
|
|
64
|
-
get toolbarTemplateRef() {
|
|
65
|
-
return this.toolbarTemplate ? this.toolbarTemplate.templateRef : undefined;
|
|
66
|
-
}
|
|
67
|
-
get renderTemplate() {
|
|
68
|
-
const ganttToolbarTemplate = this.toolbarTemplate;
|
|
69
|
-
const templatePosition = ganttToolbarTemplate ? ganttToolbarTemplate.position : null;
|
|
70
|
-
return ganttToolbarTemplate && (templatePosition === 'both' || templatePosition === this.position);
|
|
71
|
-
}
|
|
72
|
-
_position;
|
|
73
|
-
constructor(hostEl, navigationService) {
|
|
74
|
-
this.hostEl = hostEl;
|
|
75
|
-
this.navigationService = navigationService;
|
|
76
|
-
}
|
|
77
|
-
handleViewChange(view) {
|
|
78
|
-
this.activeViewChange.emit(view);
|
|
79
|
-
}
|
|
80
|
-
ngAfterViewInit() {
|
|
81
|
-
if (isDocumentAvailable()) {
|
|
82
|
-
const focusableElements = Array.from(this.hostEl.nativeElement.querySelectorAll(focusableSelector) || [])
|
|
83
|
-
.filter(el => isVisible(el));
|
|
84
|
-
if (focusableElements.length) {
|
|
85
|
-
this.navigationService.focusableContent = focusableElements;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i1.ToolbarNavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
90
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ToolbarComponent, isStandalone: true, 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-gantt-toolbar": "this.hostClasses", "class.k-toolbar": "this.hostClasses", "class.k-toolbar-md": "this.hostClasses", "class.k-toolbar-solid": "this.hostClasses" } }, providers: [ToolbarNavigationService], ngImport: i0, template: `
|
|
91
|
-
@if (!renderTemplate) {
|
|
92
|
-
@if (showAddTask) {
|
|
93
|
-
<kendo-gantt-add-task></kendo-gantt-add-task>
|
|
94
|
-
}
|
|
95
|
-
<span class="k-spacer k-toolbar-spacer"></span>
|
|
96
|
-
@if (showViewSelector) {
|
|
97
|
-
<kendo-gantt-view-selector
|
|
98
|
-
[views]="views"
|
|
99
|
-
[activeView]="activeView"
|
|
100
|
-
(activeViewChange)="handleViewChange($event)"></kendo-gantt-view-selector>
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
@if (renderTemplate) {
|
|
104
|
-
<ng-template
|
|
105
|
-
[ngTemplateOutlet]="toolbarTemplateRef"
|
|
106
|
-
[ngTemplateOutletContext]="context"
|
|
107
|
-
>
|
|
108
|
-
</ng-template>
|
|
109
|
-
}
|
|
110
|
-
`, isInline: true, dependencies: [{ kind: "component", type: GanttAddTaskComponent, selector: "kendo-gantt-add-task", inputs: ["data", "icon", "svgIcon"] }, { kind: "component", type: ViewSelectorComponent, selector: "kendo-gantt-view-selector", inputs: ["views", "activeView"], outputs: ["activeViewChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
111
|
-
}
|
|
112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarComponent, decorators: [{
|
|
113
|
-
type: Component,
|
|
114
|
-
args: [{
|
|
115
|
-
selector: 'kendo-gantt-toolbar',
|
|
116
|
-
providers: [ToolbarNavigationService],
|
|
117
|
-
template: `
|
|
118
|
-
@if (!renderTemplate) {
|
|
119
|
-
@if (showAddTask) {
|
|
120
|
-
<kendo-gantt-add-task></kendo-gantt-add-task>
|
|
121
|
-
}
|
|
122
|
-
<span class="k-spacer k-toolbar-spacer"></span>
|
|
123
|
-
@if (showViewSelector) {
|
|
124
|
-
<kendo-gantt-view-selector
|
|
125
|
-
[views]="views"
|
|
126
|
-
[activeView]="activeView"
|
|
127
|
-
(activeViewChange)="handleViewChange($event)"></kendo-gantt-view-selector>
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
@if (renderTemplate) {
|
|
131
|
-
<ng-template
|
|
132
|
-
[ngTemplateOutlet]="toolbarTemplateRef"
|
|
133
|
-
[ngTemplateOutletContext]="context"
|
|
134
|
-
>
|
|
135
|
-
</ng-template>
|
|
136
|
-
}
|
|
137
|
-
`,
|
|
138
|
-
standalone: true,
|
|
139
|
-
imports: [GanttAddTaskComponent, ViewSelectorComponent, NgTemplateOutlet]
|
|
140
|
-
}]
|
|
141
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.ToolbarNavigationService }], propDecorators: { role: [{
|
|
142
|
-
type: HostBinding,
|
|
143
|
-
args: ['attr.role']
|
|
144
|
-
}], hostClasses: [{
|
|
145
|
-
type: HostBinding,
|
|
146
|
-
args: ['class.k-gantt-toolbar']
|
|
147
|
-
}, {
|
|
148
|
-
type: HostBinding,
|
|
149
|
-
args: ['class.k-toolbar']
|
|
150
|
-
}, {
|
|
151
|
-
type: HostBinding,
|
|
152
|
-
args: ['class.k-toolbar-md']
|
|
153
|
-
}, {
|
|
154
|
-
type: HostBinding,
|
|
155
|
-
args: ['class.k-toolbar-solid']
|
|
156
|
-
}], clickHandler: [{
|
|
157
|
-
type: HostListener,
|
|
158
|
-
args: ['click', ['$event']]
|
|
159
|
-
}], arrowLeftListener: [{
|
|
160
|
-
type: HostListener,
|
|
161
|
-
args: ['keydown.arrowleft', ['$event']]
|
|
162
|
-
}], arrowRightListener: [{
|
|
163
|
-
type: HostListener,
|
|
164
|
-
args: ['keydown.arrowright', ['$event']]
|
|
165
|
-
}], activeViewChange: [{
|
|
166
|
-
type: Output
|
|
167
|
-
}], showAddTask: [{
|
|
168
|
-
type: Input
|
|
169
|
-
}], showViewSelector: [{
|
|
170
|
-
type: Input
|
|
171
|
-
}], views: [{
|
|
172
|
-
type: Input
|
|
173
|
-
}], activeView: [{
|
|
174
|
-
type: Input
|
|
175
|
-
}], toolbarTemplate: [{
|
|
176
|
-
type: Input
|
|
177
|
-
}], navigable: [{
|
|
178
|
-
type: Input
|
|
179
|
-
}], position: [{
|
|
180
|
-
type: Input
|
|
181
|
-
}] } });
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, EventEmitter, Input, Output, HostBinding } from '@angular/core';
|
|
6
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
|
-
import { ButtonComponent, ButtonGroupComponent } from '@progress/kendo-angular-buttons';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
11
|
-
import * as i2 from "@angular/forms";
|
|
12
|
-
/**
|
|
13
|
-
* The Gantt ViewSelector component. Shows the current view type and lets you switch to another view type.
|
|
14
|
-
*/
|
|
15
|
-
export class ViewSelectorComponent {
|
|
16
|
-
localizationService;
|
|
17
|
-
hostClass = true;
|
|
18
|
-
/**
|
|
19
|
-
* Lists the timeline view types in the current Gantt configuration.
|
|
20
|
-
*/
|
|
21
|
-
views;
|
|
22
|
-
/**
|
|
23
|
-
* Sets the current view type.
|
|
24
|
-
* @default 'week'
|
|
25
|
-
*/
|
|
26
|
-
activeView = 'week';
|
|
27
|
-
/**
|
|
28
|
-
* Fires when the user selects a different view type. The event data contains the type of the new view.
|
|
29
|
-
*/
|
|
30
|
-
activeViewChange = new EventEmitter();
|
|
31
|
-
constructor(localizationService) {
|
|
32
|
-
this.localizationService = localizationService;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* @hidden
|
|
36
|
-
*/
|
|
37
|
-
onClick(viewType) {
|
|
38
|
-
if (viewType !== this.activeView) {
|
|
39
|
-
this.activeViewChange.emit(viewType);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* @hidden
|
|
44
|
-
*/
|
|
45
|
-
getViewTypeText(viewType) {
|
|
46
|
-
return this.localizationService.get(`${viewType}ViewText`);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* @hidden
|
|
50
|
-
*/
|
|
51
|
-
onActiveViewChange(event) {
|
|
52
|
-
this.activeViewChange.emit(event.target.value);
|
|
53
|
-
}
|
|
54
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ViewSelectorComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
55
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ViewSelectorComponent, isStandalone: true, 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: `
|
|
56
|
-
<select
|
|
57
|
-
class="k-dropdownlist k-picker k-rounded-md k-views-dropdown"
|
|
58
|
-
aria-label="View Selector"
|
|
59
|
-
[value]="activeView"
|
|
60
|
-
(change)="onActiveViewChange($event)">
|
|
61
|
-
@for (view of views; track view) {
|
|
62
|
-
<option [value]="view">{{getViewTypeText(view)}}</option>
|
|
63
|
-
}
|
|
64
|
-
</select>
|
|
65
|
-
<kendo-buttongroup class="k-gantt-views" selection="single" [navigable]="false">
|
|
66
|
-
@for (view of views; track view) {
|
|
67
|
-
<button
|
|
68
|
-
kendoButton
|
|
69
|
-
type="button"
|
|
70
|
-
[selected]="view === activeView"
|
|
71
|
-
(click)="onClick(view)">{{getViewTypeText(view)}}</button>
|
|
72
|
-
}
|
|
73
|
-
</kendo-buttongroup>
|
|
74
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "component", type: ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
75
|
-
}
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ViewSelectorComponent, decorators: [{
|
|
77
|
-
type: Component,
|
|
78
|
-
args: [{
|
|
79
|
-
selector: 'kendo-gantt-view-selector',
|
|
80
|
-
template: `
|
|
81
|
-
<select
|
|
82
|
-
class="k-dropdownlist k-picker k-rounded-md k-views-dropdown"
|
|
83
|
-
aria-label="View Selector"
|
|
84
|
-
[value]="activeView"
|
|
85
|
-
(change)="onActiveViewChange($event)">
|
|
86
|
-
@for (view of views; track view) {
|
|
87
|
-
<option [value]="view">{{getViewTypeText(view)}}</option>
|
|
88
|
-
}
|
|
89
|
-
</select>
|
|
90
|
-
<kendo-buttongroup class="k-gantt-views" selection="single" [navigable]="false">
|
|
91
|
-
@for (view of views; track view) {
|
|
92
|
-
<button
|
|
93
|
-
kendoButton
|
|
94
|
-
type="button"
|
|
95
|
-
[selected]="view === activeView"
|
|
96
|
-
(click)="onClick(view)">{{getViewTypeText(view)}}</button>
|
|
97
|
-
}
|
|
98
|
-
</kendo-buttongroup>
|
|
99
|
-
`,
|
|
100
|
-
standalone: true,
|
|
101
|
-
imports: [ReactiveFormsModule, ButtonGroupComponent, ButtonComponent]
|
|
102
|
-
}]
|
|
103
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }], propDecorators: { hostClass: [{
|
|
104
|
-
type: HostBinding,
|
|
105
|
-
args: ['class.k-gantt-views-wrapper']
|
|
106
|
-
}], views: [{
|
|
107
|
-
type: Input
|
|
108
|
-
}], activeView: [{
|
|
109
|
-
type: Input
|
|
110
|
-
}], activeViewChange: [{
|
|
111
|
-
type: Output
|
|
112
|
-
}] } });
|