@progress/kendo-angular-gantt 0.2.1-dev.202112081924 → 0.3.0-dev.202112141015
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/dist/cdn/js/kendo-angular-gantt.js +1 -1
- package/dist/cdn/main.js +2 -2
- package/dist/es/editing/add-task.component.js +94 -0
- package/dist/es/editing/edit.service.js +1 -0
- package/dist/es/expanded-state/expandable.directive.js +4 -6
- package/dist/es/gantt.component.js +68 -20
- package/dist/es/gantt.module.js +2 -2
- package/dist/es/index.js +2 -1
- package/dist/es/localization/messages.js +45 -1
- package/dist/es/models/events/{add-event.interface.js → task-add-event.interface.js} +0 -0
- package/dist/es/models/models.js +1 -0
- package/dist/es/models/{toolbar-position.js → toolbar-settings.js} +0 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/rendering/gantt-tasks-table-body.component.js +2 -2
- package/dist/es/timeline/timeline-base-view.service.js +12 -3
- package/dist/es/toolbar/toolbar.component.js +9 -1
- package/dist/es2015/editing/add-task.component.d.ts +45 -0
- package/dist/es2015/editing/add-task.component.js +102 -0
- package/dist/es2015/editing/edit.service.d.ts +3 -0
- package/dist/es2015/editing/edit.service.js +1 -0
- package/dist/es2015/expanded-state/expandable.directive.d.ts +1 -2
- package/dist/es2015/expanded-state/expandable.directive.js +2 -7
- package/dist/es2015/gantt.component.d.ts +25 -12
- package/dist/es2015/gantt.component.js +141 -20
- package/dist/es2015/gantt.module.js +2 -2
- package/dist/es2015/index.d.ts +2 -1
- package/dist/es2015/index.js +2 -1
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/localization/messages.d.ts +46 -2
- package/dist/es2015/localization/messages.js +45 -1
- package/dist/es2015/models/events/cell-close-event.interface.d.ts +1 -1
- package/dist/es2015/models/events/task-add-event.interface.d.ts +31 -0
- package/dist/es2015/models/events/{add-event.interface.js → task-add-event.interface.js} +0 -0
- package/dist/es2015/models/events/task-edit-event.interface.d.ts +2 -2
- package/dist/es2015/models/models.d.ts +5 -1
- package/dist/es2015/models/models.js +1 -0
- package/dist/es2015/models/toolbar-settings.d.ts +29 -0
- package/dist/es2015/models/{toolbar-position.js → toolbar-settings.js} +0 -0
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/rendering/gantt-tasks-table-body.component.js +2 -2
- package/dist/es2015/timeline/timeline-base-view.service.d.ts +12 -0
- package/dist/es2015/timeline/timeline-base-view.service.js +12 -3
- package/dist/es2015/toolbar/toolbar-template.directive.d.ts +1 -1
- package/dist/es2015/toolbar/toolbar.component.d.ts +2 -0
- package/dist/es2015/toolbar/toolbar.component.js +10 -0
- package/dist/fesm2015/index.js +334 -45
- package/dist/fesm5/index.js +257 -46
- package/dist/npm/editing/add-task.component.js +96 -0
- package/dist/npm/editing/edit.service.js +1 -0
- package/dist/npm/expanded-state/expandable.directive.js +3 -5
- package/dist/npm/gantt.component.js +68 -20
- package/dist/npm/gantt.module.js +2 -2
- package/dist/npm/index.js +4 -2
- package/dist/npm/localization/messages.js +45 -1
- package/dist/npm/models/events/{add-event.interface.js → task-add-event.interface.js} +0 -0
- package/dist/npm/models/models.js +2 -0
- package/dist/npm/models/{toolbar-position.js → toolbar-settings.js} +0 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/rendering/gantt-tasks-table-body.component.js +1 -1
- package/dist/npm/timeline/timeline-base-view.service.js +17 -8
- package/dist/npm/toolbar/toolbar.component.js +9 -1
- package/dist/systemjs/kendo-angular-gantt.js +1 -1
- package/package.json +3 -3
- package/dist/es/localization/treelist-messages.directive.js +0 -31
- package/dist/es2015/localization/treelist-messages.directive.d.ts +0 -14
- package/dist/es2015/localization/treelist-messages.directive.js +0 -29
- package/dist/es2015/models/events/add-event.interface.d.ts +0 -16
- package/dist/es2015/models/toolbar-position.d.ts +0 -9
- package/dist/npm/localization/treelist-messages.directive.js +0 -33
package/dist/fesm2015/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { __decorate, __metadata, __param } from 'tslib';
|
|
6
6
|
import { Input, EventEmitter, Injectable, Directive, Optional, TemplateRef, QueryList, ContentChildren, ContentChild, Component, forwardRef, SkipSelf, Host, Injector, NgZone, isDevMode, ViewChild, HostBinding, Output, Renderer2, ElementRef, ChangeDetectorRef, NgModule } from '@angular/core';
|
|
7
7
|
import { ColumnBase, ColumnComponent, ColumnGroupComponent, SpanColumnComponent, TreeListComponent, DataBoundTreeComponent, ExpandableTreeComponent, FlatBindingDirective, HierarchyBindingDirective, ExpandableDirective, TreeListModule } from '@progress/kendo-angular-treelist';
|
|
8
|
-
import { cloneDate, addWeeks, firstDayInWeek, addDays, getDate, lastDayOfMonth, firstDayOfMonth, addMonths,
|
|
8
|
+
import { cloneDate, addWeeks, firstDayInWeek, addDays, getDate, lastDayOfMonth, firstDayOfMonth, addMonths, isEqual, MS_PER_HOUR, MS_PER_DAY } from '@progress/kendo-date-math';
|
|
9
9
|
import { of, Subject, Subscription, fromEvent } from 'rxjs';
|
|
10
10
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
11
|
import { isDocumentAvailable, closestInScope, matchesClasses, anyChanged, hasObservers, EventsModule } from '@progress/kendo-angular-common';
|
|
@@ -30,7 +30,7 @@ const packageMetadata = {
|
|
|
30
30
|
name: '@progress/kendo-angular-gantt',
|
|
31
31
|
productName: 'Kendo UI for Angular',
|
|
32
32
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
33
|
-
publishDate:
|
|
33
|
+
publishDate: 1639476447,
|
|
34
34
|
version: '',
|
|
35
35
|
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'
|
|
36
36
|
};
|
|
@@ -766,8 +766,17 @@ const isClearButton = (contender, gantt) => {
|
|
|
766
766
|
return isPresent(clearButtonContainer);
|
|
767
767
|
};
|
|
768
768
|
|
|
769
|
+
/**
|
|
770
|
+
* @hidden
|
|
771
|
+
*/
|
|
769
772
|
const DAY_FORMAT = 'E d/MM';
|
|
773
|
+
/**
|
|
774
|
+
* @hidden
|
|
775
|
+
*/
|
|
770
776
|
const HOUR_FORMAT = 'HH:mm aa';
|
|
777
|
+
/**
|
|
778
|
+
* @hidden
|
|
779
|
+
*/
|
|
771
780
|
const MONTH_FORMAT = 'MMM';
|
|
772
781
|
/**
|
|
773
782
|
* @hidden
|
|
@@ -1320,6 +1329,7 @@ let EditService = class EditService {
|
|
|
1320
1329
|
this.showEditingDialog = new Subject();
|
|
1321
1330
|
this.showConfirmationDialog = new Subject();
|
|
1322
1331
|
this.editEvent = new Subject();
|
|
1332
|
+
this.addEvent = new Subject();
|
|
1323
1333
|
}
|
|
1324
1334
|
createEditDialog(dataItem, formGroup) {
|
|
1325
1335
|
this.dataItem = dataItem;
|
|
@@ -1732,7 +1742,7 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
1732
1742
|
/**
|
|
1733
1743
|
* Provides a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection))
|
|
1734
1744
|
*
|
|
1735
|
-
* > The [`selectable`]({% slug
|
|
1745
|
+
* > The [`selectable`]({% slug api_gantt_ganttcomponent %}#toc-selectable) prop has to be set to `true` in order for this callback to be executed.
|
|
1736
1746
|
*/
|
|
1737
1747
|
this.isSelected = isSelected;
|
|
1738
1748
|
/**
|
|
@@ -1746,21 +1756,10 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
1746
1756
|
/**
|
|
1747
1757
|
* Enables or disables the Gantt selection mechanism ([see example]({% slug selection_gantt %}#toc-custom-selection)).
|
|
1748
1758
|
*
|
|
1749
|
-
* > When set to `true`, the [`isSelected`]({% slug
|
|
1759
|
+
* > When set to `true`, the [`isSelected`]({% slug api_gantt_ganttcomponent %}#toc-isselected) callback has to be provided.
|
|
1750
1760
|
* > When applied, the [`SelectableDirective`]({% slug api_gantt_selectabledirective %}) sets `selectable` to `true` internally.
|
|
1751
1761
|
*/
|
|
1752
1762
|
this.selectable = false;
|
|
1753
|
-
/**
|
|
1754
|
-
* The position of the toolbar.
|
|
1755
|
-
*
|
|
1756
|
-
* The possible values are:
|
|
1757
|
-
* - `top`—Positions the toolbar above the Gantt panes.
|
|
1758
|
-
* - `bottom`—Positions the toolbar below the Gantt panes.
|
|
1759
|
-
* - `both`—Displays two toolbar instances. Positions the first one above,
|
|
1760
|
-
* and the second one - below the Gantt panes.
|
|
1761
|
-
* - `none`—No toolbar is rendered.
|
|
1762
|
-
*/
|
|
1763
|
-
this.toolbarPosition = 'top';
|
|
1764
1763
|
/**
|
|
1765
1764
|
* Gets or sets the callback function that retrieves the child items for a particular item.
|
|
1766
1765
|
*/
|
|
@@ -1870,6 +1869,10 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
1870
1869
|
* Fires when the user saves an edited task.
|
|
1871
1870
|
*/
|
|
1872
1871
|
this.save = new EventEmitter();
|
|
1872
|
+
/**
|
|
1873
|
+
* Fires when the user adds a task.
|
|
1874
|
+
*/
|
|
1875
|
+
this.taskAdd = new EventEmitter();
|
|
1873
1876
|
/**
|
|
1874
1877
|
* Fires when the sorting of the Gantt is changed.
|
|
1875
1878
|
* You have to handle the event yourself and sort the data.
|
|
@@ -1947,6 +1950,11 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
1947
1950
|
this._rowClass = rowClassCallback;
|
|
1948
1951
|
this._taskClass = taskClassCallback;
|
|
1949
1952
|
this._activeView = DEFAULT_VIEW;
|
|
1953
|
+
this._toolbarSettings = {
|
|
1954
|
+
position: 'top',
|
|
1955
|
+
addTaskTool: 'none',
|
|
1956
|
+
viewSelectorTool: 'top'
|
|
1957
|
+
};
|
|
1950
1958
|
this.rtl = false;
|
|
1951
1959
|
this.optionChangesSubscriptions = new Subscription();
|
|
1952
1960
|
this.editServiceSubscription = new Subscription();
|
|
@@ -1957,6 +1965,7 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
1957
1965
|
this.optionChangesSubscriptions.add(this.optionChangesService.columnChanges.subscribe(() => {
|
|
1958
1966
|
this.treeList.columns.notifyOnChanges();
|
|
1959
1967
|
}));
|
|
1968
|
+
this.editService.getSelectedItem = this.getFirstSelectedItem.bind(this);
|
|
1960
1969
|
this.editServiceSubscription.add(this.editService.showEditingDialog.subscribe(show => this.showEditingDialog = show));
|
|
1961
1970
|
this.editServiceSubscription.add(this.editService.showConfirmationDialog.subscribe(() => this.taskDelete.emit()));
|
|
1962
1971
|
this.editServiceSubscription.add(this.editService.editEvent.subscribe(args => {
|
|
@@ -1968,7 +1977,14 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
1968
1977
|
this.showConfirmationDialog = this.showEditingDialog = false;
|
|
1969
1978
|
this.editService.dataItem = this.editService.formGroup = null;
|
|
1970
1979
|
this.updateView();
|
|
1971
|
-
|
|
1980
|
+
}));
|
|
1981
|
+
this.editServiceSubscription.add(this.editService.addEvent.subscribe(args => {
|
|
1982
|
+
const selectedItem = this.getFirstSelectedItem();
|
|
1983
|
+
this.taskAdd.emit({
|
|
1984
|
+
actionType: args.actionType,
|
|
1985
|
+
selectedItem: selectedItem ? getEditItem(selectedItem, this.treeList.view.data, this.mapper) : null
|
|
1986
|
+
});
|
|
1987
|
+
this.updateView();
|
|
1972
1988
|
}));
|
|
1973
1989
|
this.localizationSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
1974
1990
|
this.rtl = rtl;
|
|
@@ -2043,6 +2059,29 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
2043
2059
|
get data() {
|
|
2044
2060
|
return this._data;
|
|
2045
2061
|
}
|
|
2062
|
+
/**
|
|
2063
|
+
* The toolbar configuration. Defines the position and content of the toolbar(s).
|
|
2064
|
+
* The available properties are `position`, `addTaskTool`, and `viewSelectorTool`.
|
|
2065
|
+
* All are optional and default to `top`.
|
|
2066
|
+
*
|
|
2067
|
+
* The possible values for each option are:
|
|
2068
|
+
* - `top`—Positions the toolbar above the Gantt panes. Renders the respective tool in the top toolbar.
|
|
2069
|
+
* - `bottom`—Positions the toolbar below the Gantt panes. Renders the respective tool in the bottom toolbar.
|
|
2070
|
+
* - `both`—Displays two toolbar instances. Positions the first one above,
|
|
2071
|
+
* and the second one - below the Gantt panes. Renders the respective tool in the both toolbars.
|
|
2072
|
+
* - `none`—No toolbar is rendered when used for setting `position`.
|
|
2073
|
+
* No add task or view selector tool is rendered when used for setting `addTaskTool` or `viewSelectorTool`.
|
|
2074
|
+
*/
|
|
2075
|
+
set toolbarSettings(value) {
|
|
2076
|
+
this._toolbarSettings = {
|
|
2077
|
+
position: value.position || 'top',
|
|
2078
|
+
addTaskTool: value.addTaskTool || 'none',
|
|
2079
|
+
viewSelectorTool: value.viewSelectorTool || 'top'
|
|
2080
|
+
};
|
|
2081
|
+
}
|
|
2082
|
+
get toolbarSettings() {
|
|
2083
|
+
return this._toolbarSettings;
|
|
2084
|
+
}
|
|
2046
2085
|
/**
|
|
2047
2086
|
* The options of the timeline splitter pane. By default the pane is `collapsible`,
|
|
2048
2087
|
* `resizable`, not `collapsed`, and its `size` is `'50%'`.
|
|
@@ -2227,12 +2266,17 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
2227
2266
|
}
|
|
2228
2267
|
}
|
|
2229
2268
|
/**
|
|
2230
|
-
*
|
|
2269
|
+
* Forces the TreeList to evaluate if some data items have changed and re-renders the rows information, if needed.
|
|
2270
|
+
* Recalculates and re-renders the Timeline period, if needed.
|
|
2271
|
+
* Redraws changed dependencies, if needed.
|
|
2272
|
+
* Executes all row-related callbacks anew.
|
|
2231
2273
|
*/
|
|
2232
2274
|
updateView() {
|
|
2233
2275
|
if (isPresent(this.treeList)) {
|
|
2234
2276
|
this.treeList.updateView();
|
|
2235
2277
|
}
|
|
2278
|
+
this.loadTimelineData();
|
|
2279
|
+
this.dependencyDomService.notifyChanges();
|
|
2236
2280
|
}
|
|
2237
2281
|
/**
|
|
2238
2282
|
* Opens the task editing dialog.
|
|
@@ -2312,7 +2356,7 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
2312
2356
|
* @hidden
|
|
2313
2357
|
*/
|
|
2314
2358
|
showToolbar(position) {
|
|
2315
|
-
return this.
|
|
2359
|
+
return this.toolbarSettings.position !== 'none' && ([position, 'both'].indexOf(this.toolbarSettings.position) > -1);
|
|
2316
2360
|
}
|
|
2317
2361
|
/**
|
|
2318
2362
|
* @hidden
|
|
@@ -2476,7 +2520,7 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
2476
2520
|
items: [dataItem],
|
|
2477
2521
|
sender: this
|
|
2478
2522
|
});
|
|
2479
|
-
this.updateView();
|
|
2523
|
+
this.treeList.updateView();
|
|
2480
2524
|
}
|
|
2481
2525
|
updateTreeListGroupClass(columns = this.columns) {
|
|
2482
2526
|
if (!isPresent(this.treeList)) {
|
|
@@ -2511,6 +2555,11 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
2511
2555
|
const shouldToggleSelection = ctrlKey || metaKey;
|
|
2512
2556
|
return (shouldToggleSelection && this.isSelected(dataItem)) ? 'remove' : 'select';
|
|
2513
2557
|
}
|
|
2558
|
+
getFirstSelectedItem() {
|
|
2559
|
+
const isSelectedCallback = this.isSelected || isSelected;
|
|
2560
|
+
const loadedItems = this.renderedTreeListItems || [];
|
|
2561
|
+
return loadedItems.find(isSelectedCallback);
|
|
2562
|
+
}
|
|
2514
2563
|
};
|
|
2515
2564
|
__decorate([
|
|
2516
2565
|
ViewChild(TreeListComponent, { static: true }),
|
|
@@ -2584,8 +2633,9 @@ __decorate([
|
|
|
2584
2633
|
], GanttComponent.prototype, "selectable", void 0);
|
|
2585
2634
|
__decorate([
|
|
2586
2635
|
Input(),
|
|
2587
|
-
__metadata("design:type",
|
|
2588
|
-
|
|
2636
|
+
__metadata("design:type", Object),
|
|
2637
|
+
__metadata("design:paramtypes", [Object])
|
|
2638
|
+
], GanttComponent.prototype, "toolbarSettings", null);
|
|
2589
2639
|
__decorate([
|
|
2590
2640
|
Input(),
|
|
2591
2641
|
__metadata("design:type", Function)
|
|
@@ -2706,6 +2756,10 @@ __decorate([
|
|
|
2706
2756
|
Output(),
|
|
2707
2757
|
__metadata("design:type", EventEmitter)
|
|
2708
2758
|
], GanttComponent.prototype, "save", void 0);
|
|
2759
|
+
__decorate([
|
|
2760
|
+
Output(),
|
|
2761
|
+
__metadata("design:type", EventEmitter)
|
|
2762
|
+
], GanttComponent.prototype, "taskAdd", void 0);
|
|
2709
2763
|
__decorate([
|
|
2710
2764
|
Output(),
|
|
2711
2765
|
__metadata("design:type", EventEmitter)
|
|
@@ -2784,6 +2838,27 @@ GanttComponent = GanttComponent_1 = __decorate([
|
|
|
2784
2838
|
],
|
|
2785
2839
|
template: `
|
|
2786
2840
|
<ng-container kendoGanttLocalizedMessages
|
|
2841
|
+
i18n-taskEditingGeneralTabTitle="kendo.gantt.taskEditingGeneralTabTitle|The title of the 'General' tab of the editing dialog TabStrip"
|
|
2842
|
+
taskEditingGeneralTabTitle="General"
|
|
2843
|
+
|
|
2844
|
+
i18n-taskEditingPredecessorsTabTitle="kendo.gantt.taskEditingPredecessorsTabTitle|The title of the 'Predecessors' dependencies tab of the editing dialog TabStrip"
|
|
2845
|
+
taskEditingPredecessorsTabTitle="Predecessors"
|
|
2846
|
+
|
|
2847
|
+
i18n-taskEditingSuccessorsTabTitle="kendo.gantt.taskEditingSuccessorsTabTitle|The title of the 'Successors' dependencies tab of the editing dialog TabStrip"
|
|
2848
|
+
taskEditingSuccessorsTabTitle="Successors"
|
|
2849
|
+
|
|
2850
|
+
i18n-taskEditingDependenciesAddButtonText="kendo.gantt.taskEditingDependenciesAddButtonText|The text of the 'Add' button in the dependencies tabs of the editing dialog TabStrip"
|
|
2851
|
+
taskEditingDependenciesAddButtonText="Add"
|
|
2852
|
+
|
|
2853
|
+
i18n-taskEditingDependenciesRemoveButtonText="kendo.gantt.taskEditingDependenciesRemoveButtonText|The text of the 'Remove' button in the dependencies tabs of the editing dialog TabStrip"
|
|
2854
|
+
taskEditingDependenciesRemoveButtonText="Remove"
|
|
2855
|
+
|
|
2856
|
+
i18n-taskEditingDependenciesGridNameColumnTitle="kendo.gantt.taskEditingDependenciesGridNameColumnTitle|The title of the 'Task Title' Grid column in the dependencies tabs of the editing dialog TabStrip"
|
|
2857
|
+
taskEditingDependenciesGridNameColumnTitle="Task Title"
|
|
2858
|
+
|
|
2859
|
+
i18n-taskEditingDependenciesGridTypeColumnTitle="kendo.gantt.taskEditingDependenciesGridTypeColumnTitle|The title of the 'Type' Grid column in the dependencies tabs of the editing dialog TabStrip"
|
|
2860
|
+
taskEditingDependenciesGridTypeColumnTitle="Type"
|
|
2861
|
+
|
|
2787
2862
|
i18n-taskDeleteLabel="kendo.gantt.taskDeleteLabel|The label of the task delete icon"
|
|
2788
2863
|
taskDeleteLabel="Delete"
|
|
2789
2864
|
|
|
@@ -2835,6 +2910,18 @@ GanttComponent = GanttComponent_1 = __decorate([
|
|
|
2835
2910
|
i18n-yearViewText-disabled="kendo.gantt.yearViewText|The text of the year view in the ViewSelector component"
|
|
2836
2911
|
yearViewText="Year"
|
|
2837
2912
|
|
|
2913
|
+
i18n-addTaskText="kendo.gantt.addTaskText|The text of the DropDownButton in the AddTask component"
|
|
2914
|
+
addTaskText="Add Task"
|
|
2915
|
+
|
|
2916
|
+
i18n-addChildText="kendo.gantt.addChildText|The text of the 'Add Child' option in the AddTask component"
|
|
2917
|
+
addChildText="Add Child"
|
|
2918
|
+
|
|
2919
|
+
i18n-addAboveText="kendo.gantt.addAboveText|The text of the 'Add Above' option in the AddTask component"
|
|
2920
|
+
addAboveText="Add Above"
|
|
2921
|
+
|
|
2922
|
+
i18n-addBelowText="kendo.gantt.addBelowText|The text of the 'Add Below' option in the AddTask component"
|
|
2923
|
+
addBelowText="Add Below"
|
|
2924
|
+
|
|
2838
2925
|
i18n-noRecords="kendo.gantt.noRecords|The label visible in the TreeList when there are no records"
|
|
2839
2926
|
noRecords="No records available."
|
|
2840
2927
|
|
|
@@ -2956,6 +3043,8 @@ GanttComponent = GanttComponent_1 = __decorate([
|
|
|
2956
3043
|
columnsReset="Reset"></ng-container>
|
|
2957
3044
|
<kendo-gantt-toolbar
|
|
2958
3045
|
*ngIf="showToolbar('top')"
|
|
3046
|
+
[showAddTask]="toolbarSettings.addTaskTool === 'top' || toolbarSettings.addTaskTool === 'both'"
|
|
3047
|
+
[showViewSelector]="toolbarSettings.viewSelectorTool === 'top' || toolbarSettings.viewSelectorTool === 'both'"
|
|
2959
3048
|
class="k-gantt-header k-toolbar k-gantt-toolbar"
|
|
2960
3049
|
position="top"></kendo-gantt-toolbar>
|
|
2961
3050
|
<div class="k-gantt-content">
|
|
@@ -3005,7 +3094,47 @@ GanttComponent = GanttComponent_1 = __decorate([
|
|
|
3005
3094
|
}"
|
|
3006
3095
|
[scope]="this"
|
|
3007
3096
|
>
|
|
3008
|
-
<kendo-treelist-messages
|
|
3097
|
+
<kendo-treelist-messages
|
|
3098
|
+
[noRecords]="getText('noRecords')"
|
|
3099
|
+
[filter]="getText('filter')"
|
|
3100
|
+
[filterEqOperator]="getText('filterEqOperator')"
|
|
3101
|
+
[filterNotEqOperator]="getText('filterNotEqOperator')"
|
|
3102
|
+
[filterIsNullOperator]="getText('filterIsNullOperator')"
|
|
3103
|
+
[filterIsNotNullOperator]="getText('filterIsNotNullOperator')"
|
|
3104
|
+
[filterIsEmptyOperator]="getText('filterIsEmptyOperator')"
|
|
3105
|
+
[filterIsNotEmptyOperator]="getText('filterIsNotEmptyOperator')"
|
|
3106
|
+
[filterStartsWithOperator]="getText('filterStartsWithOperator')"
|
|
3107
|
+
[filterContainsOperator]="getText('filterContainsOperator')"
|
|
3108
|
+
[filterNotContainsOperator]="getText('filterNotContainsOperator')"
|
|
3109
|
+
[filterEndsWithOperator]="getText('filterEndsWithOperator')"
|
|
3110
|
+
[filterGteOperator]="getText('filterGteOperator')"
|
|
3111
|
+
[filterGtOperator]="getText('filterGtOperator')"
|
|
3112
|
+
[filterLteOperator]="getText('filterLteOperator')"
|
|
3113
|
+
[filterLtOperator]="getText('filterLtOperator')"
|
|
3114
|
+
[filterIsTrue]="getText('filterIsTrue')"
|
|
3115
|
+
[filterIsFalse]="getText('filterIsFalse')"
|
|
3116
|
+
[filterBooleanAll]="getText('filterBooleanAll')"
|
|
3117
|
+
[filterAfterOrEqualOperator]="getText('filterAfterOrEqualOperator')"
|
|
3118
|
+
[filterAfterOperator]="getText('filterAfterOperator')"
|
|
3119
|
+
[filterBeforeOperator]="getText('filterBeforeOperator')"
|
|
3120
|
+
[filterBeforeOrEqualOperator]="getText('filterBeforeOrEqualOperator')"
|
|
3121
|
+
[filterFilterButton]="getText('filterFilterButton')"
|
|
3122
|
+
[filterClearButton]="getText('filterClearButton')"
|
|
3123
|
+
[filterAndLogic]="getText('filterAndLogic')"
|
|
3124
|
+
[filterOrLogic]="getText('filterOrLogic')"
|
|
3125
|
+
[loading]="getText('loading')"
|
|
3126
|
+
[columnMenu]="getText('columnMenu')"
|
|
3127
|
+
[columns]="getText('columns')"
|
|
3128
|
+
[sortable]="getText('sortable')"
|
|
3129
|
+
[sortAscending]="getText('sortAscending')"
|
|
3130
|
+
[sortDescending]="getText('sortDescending')"
|
|
3131
|
+
[sortedAscending]="getText('sortedAscending')"
|
|
3132
|
+
[sortedDescending]="getText('sortedDescending')"
|
|
3133
|
+
[sortedDefault]="getText('sortedDefault')"
|
|
3134
|
+
[columnsApply]="getText('columnsApply')"
|
|
3135
|
+
[columnsReset]="getText('columnsReset')"
|
|
3136
|
+
>
|
|
3137
|
+
</kendo-treelist-messages>
|
|
3009
3138
|
</kendo-treelist>
|
|
3010
3139
|
</kendo-splitter-pane>
|
|
3011
3140
|
<kendo-splitter-pane
|
|
@@ -3045,6 +3174,8 @@ GanttComponent = GanttComponent_1 = __decorate([
|
|
|
3045
3174
|
</div>
|
|
3046
3175
|
<kendo-gantt-toolbar
|
|
3047
3176
|
*ngIf="showToolbar('bottom')"
|
|
3177
|
+
[showAddTask]="toolbarSettings.addTaskTool === 'bottom' || toolbarSettings.addTaskTool === 'both'"
|
|
3178
|
+
[showViewSelector]="toolbarSettings.viewSelectorTool === 'bottom' || toolbarSettings.viewSelectorTool === 'both'"
|
|
3048
3179
|
class="k-gantt-footer k-toolbar k-gantt-toolbar"
|
|
3049
3180
|
position="bottom"></kendo-gantt-toolbar>
|
|
3050
3181
|
<kendo-gantt-edit-dialog *ngIf="showEditingDialog" [formGroup]="editDialogFormGroup"></kendo-gantt-edit-dialog>
|
|
@@ -3288,7 +3419,7 @@ let GanttTasksTableBodyComponent = class GanttTasksTableBodyComponent {
|
|
|
3288
3419
|
}
|
|
3289
3420
|
}
|
|
3290
3421
|
isMileStone(task) {
|
|
3291
|
-
return !this.hasChildren(task) &&
|
|
3422
|
+
return !this.hasChildren(task) && isEqual(this.mapper.extractFromTask(task, 'start'), this.mapper.extractFromTask(task, 'end'));
|
|
3292
3423
|
}
|
|
3293
3424
|
};
|
|
3294
3425
|
__decorate([
|
|
@@ -3759,10 +3890,6 @@ GanttHierarchyBindingDirective = __decorate([
|
|
|
3759
3890
|
* A directive which controls the expanded state of the items.
|
|
3760
3891
|
*/
|
|
3761
3892
|
let GanttExpandableDirective = class GanttExpandableDirective extends ExpandableDirective {
|
|
3762
|
-
// fixes an injection error in some builds/ng-versions (e.g. StackBlitz)
|
|
3763
|
-
constructor(gantt) {
|
|
3764
|
-
super(gantt);
|
|
3765
|
-
}
|
|
3766
3893
|
};
|
|
3767
3894
|
__decorate([
|
|
3768
3895
|
Input(),
|
|
@@ -3772,8 +3899,7 @@ GanttExpandableDirective = __decorate([
|
|
|
3772
3899
|
Directive({
|
|
3773
3900
|
exportAs: 'kendoGanttExpandable',
|
|
3774
3901
|
selector: '[kendoGanttExpandable]'
|
|
3775
|
-
})
|
|
3776
|
-
__metadata("design:paramtypes", [ExpandableTreeComponent])
|
|
3902
|
+
})
|
|
3777
3903
|
], GanttExpandableDirective);
|
|
3778
3904
|
|
|
3779
3905
|
/**
|
|
@@ -3919,6 +4045,14 @@ let ToolbarComponent = class ToolbarComponent {
|
|
|
3919
4045
|
this.scrollSyncService.resetTimelineScrollLeft();
|
|
3920
4046
|
}
|
|
3921
4047
|
};
|
|
4048
|
+
__decorate([
|
|
4049
|
+
Input(),
|
|
4050
|
+
__metadata("design:type", Boolean)
|
|
4051
|
+
], ToolbarComponent.prototype, "showAddTask", void 0);
|
|
4052
|
+
__decorate([
|
|
4053
|
+
Input(),
|
|
4054
|
+
__metadata("design:type", Boolean)
|
|
4055
|
+
], ToolbarComponent.prototype, "showViewSelector", void 0);
|
|
3922
4056
|
__decorate([
|
|
3923
4057
|
Input(),
|
|
3924
4058
|
__metadata("design:type", String),
|
|
@@ -3929,8 +4063,10 @@ ToolbarComponent = __decorate([
|
|
|
3929
4063
|
selector: 'kendo-gantt-toolbar',
|
|
3930
4064
|
template: `
|
|
3931
4065
|
<ng-container *ngIf="!renderTemplate">
|
|
4066
|
+
<kendo-gantt-add-task *ngIf="showAddTask"></kendo-gantt-add-task>
|
|
3932
4067
|
<span class="k-spacer k-toolbar-spacer"></span>
|
|
3933
4068
|
<kendo-gantt-view-selector
|
|
4069
|
+
*ngIf="showViewSelector"
|
|
3934
4070
|
[views]="gantt.viewTypes"
|
|
3935
4071
|
[activeView]="gantt.activeView"
|
|
3936
4072
|
(activeViewChange)="onViewChange($event)"></kendo-gantt-view-selector>
|
|
@@ -4400,6 +4536,38 @@ EditDialogComponent = __decorate([
|
|
|
4400
4536
|
*/
|
|
4401
4537
|
class Messages extends ComponentMessages {
|
|
4402
4538
|
}
|
|
4539
|
+
__decorate([
|
|
4540
|
+
Input(),
|
|
4541
|
+
__metadata("design:type", String)
|
|
4542
|
+
], Messages.prototype, "taskEditingGeneralTabTitle", void 0);
|
|
4543
|
+
__decorate([
|
|
4544
|
+
Input(),
|
|
4545
|
+
__metadata("design:type", String)
|
|
4546
|
+
], Messages.prototype, "taskEditingPredecessorsTabTitle", void 0);
|
|
4547
|
+
__decorate([
|
|
4548
|
+
Input(),
|
|
4549
|
+
__metadata("design:type", String)
|
|
4550
|
+
], Messages.prototype, "taskEditingSuccessorsTabTitle", void 0);
|
|
4551
|
+
__decorate([
|
|
4552
|
+
Input(),
|
|
4553
|
+
__metadata("design:type", String)
|
|
4554
|
+
], Messages.prototype, "taskEditingDependenciesAddButtonText", void 0);
|
|
4555
|
+
__decorate([
|
|
4556
|
+
Input(),
|
|
4557
|
+
__metadata("design:type", String)
|
|
4558
|
+
], Messages.prototype, "taskEditingDependenciesRemoveButtonText", void 0);
|
|
4559
|
+
__decorate([
|
|
4560
|
+
Input(),
|
|
4561
|
+
__metadata("design:type", String)
|
|
4562
|
+
], Messages.prototype, "taskEditingDependenciesGridNameColumnTitle", void 0);
|
|
4563
|
+
__decorate([
|
|
4564
|
+
Input(),
|
|
4565
|
+
__metadata("design:type", String)
|
|
4566
|
+
], Messages.prototype, "taskEditingDependenciesGridTypeColumnTitle", void 0);
|
|
4567
|
+
__decorate([
|
|
4568
|
+
Input(),
|
|
4569
|
+
__metadata("design:type", String)
|
|
4570
|
+
], Messages.prototype, "deleteButtonText", void 0);
|
|
4403
4571
|
__decorate([
|
|
4404
4572
|
Input(),
|
|
4405
4573
|
__metadata("design:type", String)
|
|
@@ -4423,7 +4591,19 @@ __decorate([
|
|
|
4423
4591
|
__decorate([
|
|
4424
4592
|
Input(),
|
|
4425
4593
|
__metadata("design:type", String)
|
|
4426
|
-
], Messages.prototype, "
|
|
4594
|
+
], Messages.prototype, "addTaskText", void 0);
|
|
4595
|
+
__decorate([
|
|
4596
|
+
Input(),
|
|
4597
|
+
__metadata("design:type", String)
|
|
4598
|
+
], Messages.prototype, "addChildText", void 0);
|
|
4599
|
+
__decorate([
|
|
4600
|
+
Input(),
|
|
4601
|
+
__metadata("design:type", String)
|
|
4602
|
+
], Messages.prototype, "addAboveText", void 0);
|
|
4603
|
+
__decorate([
|
|
4604
|
+
Input(),
|
|
4605
|
+
__metadata("design:type", String)
|
|
4606
|
+
], Messages.prototype, "addBelowText", void 0);
|
|
4427
4607
|
__decorate([
|
|
4428
4608
|
Input(),
|
|
4429
4609
|
__metadata("design:type", String)
|
|
@@ -4681,26 +4861,98 @@ LocalizedMessagesDirective = LocalizedMessagesDirective_1 = __decorate([
|
|
|
4681
4861
|
], LocalizedMessagesDirective);
|
|
4682
4862
|
|
|
4683
4863
|
/**
|
|
4684
|
-
*
|
|
4864
|
+
* The UI for adding new items to the Gantt.
|
|
4865
|
+
* Use it within a toolbar template to provide a custom icon or list of options.
|
|
4685
4866
|
*/
|
|
4686
|
-
let
|
|
4687
|
-
constructor(localizationService) {
|
|
4867
|
+
let GanttAddTaskComponent = class GanttAddTaskComponent {
|
|
4868
|
+
constructor(localizationService, editService, ngZone) {
|
|
4688
4869
|
this.localizationService = localizationService;
|
|
4870
|
+
this.editService = editService;
|
|
4871
|
+
this.ngZone = ngZone;
|
|
4872
|
+
/**
|
|
4873
|
+
* Sets the data of the DropDownButton.
|
|
4874
|
+
* > The data has to be provided in an array-like list.
|
|
4875
|
+
*/
|
|
4876
|
+
this.data = [{
|
|
4877
|
+
text: this.getText('addChildText'),
|
|
4878
|
+
type: 'addChild'
|
|
4879
|
+
}, {
|
|
4880
|
+
text: this.getText('addAboveText'),
|
|
4881
|
+
type: 'addAbove'
|
|
4882
|
+
}, {
|
|
4883
|
+
text: this.getText('addBelowText'),
|
|
4884
|
+
type: 'addBelow'
|
|
4885
|
+
}];
|
|
4886
|
+
/**
|
|
4887
|
+
* Defines the name of an existing icon in a Kendo UI theme.
|
|
4888
|
+
* @default 'plus'
|
|
4889
|
+
*/
|
|
4890
|
+
this.icon = 'plus';
|
|
4689
4891
|
}
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4892
|
+
/**
|
|
4893
|
+
* @hidden
|
|
4894
|
+
*/
|
|
4895
|
+
getText(message) {
|
|
4896
|
+
return this.localizationService.get(message);
|
|
4897
|
+
}
|
|
4898
|
+
/**
|
|
4899
|
+
* @hidden
|
|
4900
|
+
*/
|
|
4901
|
+
handleOpen(e) {
|
|
4902
|
+
if (!this.editService.getSelectedItem()) {
|
|
4903
|
+
e.preventDefault();
|
|
4904
|
+
}
|
|
4905
|
+
}
|
|
4906
|
+
/**
|
|
4907
|
+
* @hidden
|
|
4908
|
+
*/
|
|
4909
|
+
handleMouseClick() {
|
|
4910
|
+
if (!this.editService.getSelectedItem()) {
|
|
4911
|
+
this.ngZone.run(() => {
|
|
4912
|
+
this.editService.addEvent.next({
|
|
4913
|
+
selectedItem: null,
|
|
4914
|
+
actionType: 'addTask'
|
|
4915
|
+
});
|
|
4916
|
+
});
|
|
4917
|
+
}
|
|
4918
|
+
}
|
|
4919
|
+
/**
|
|
4920
|
+
* @hidden
|
|
4921
|
+
*/
|
|
4922
|
+
handleItemClick(e) {
|
|
4923
|
+
this.editService.addEvent.next({
|
|
4924
|
+
actionType: e.type,
|
|
4925
|
+
selectedItem: null
|
|
4926
|
+
});
|
|
4694
4927
|
}
|
|
4695
4928
|
};
|
|
4696
4929
|
__decorate([
|
|
4697
4930
|
Input(),
|
|
4698
|
-
__metadata("design:type",
|
|
4699
|
-
],
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
__metadata("design:
|
|
4703
|
-
],
|
|
4931
|
+
__metadata("design:type", Array)
|
|
4932
|
+
], GanttAddTaskComponent.prototype, "data", void 0);
|
|
4933
|
+
__decorate([
|
|
4934
|
+
Input(),
|
|
4935
|
+
__metadata("design:type", String)
|
|
4936
|
+
], GanttAddTaskComponent.prototype, "icon", void 0);
|
|
4937
|
+
GanttAddTaskComponent = __decorate([
|
|
4938
|
+
Component({
|
|
4939
|
+
selector: 'kendo-gantt-add-task',
|
|
4940
|
+
template: `
|
|
4941
|
+
<kendo-dropdownbutton
|
|
4942
|
+
[data]="data"
|
|
4943
|
+
[icon]="icon"
|
|
4944
|
+
[kendoEventsOutsideAngular]="{ click: handleMouseClick }"
|
|
4945
|
+
[scope]="this"
|
|
4946
|
+
(itemClick)="handleItemClick($event)"
|
|
4947
|
+
(open)="handleOpen($event)">
|
|
4948
|
+
{{ getText('addTaskText') }}
|
|
4949
|
+
</kendo-dropdownbutton>
|
|
4950
|
+
`
|
|
4951
|
+
}),
|
|
4952
|
+
__metadata("design:paramtypes", [LocalizationService,
|
|
4953
|
+
EditService,
|
|
4954
|
+
NgZone])
|
|
4955
|
+
], GanttAddTaskComponent);
|
|
4704
4956
|
|
|
4705
4957
|
const IMPORTED_MODULES = [
|
|
4706
4958
|
CommonModule,
|
|
@@ -4750,7 +5002,7 @@ const DECLARATIONS = [
|
|
|
4750
5002
|
EditDialogComponent,
|
|
4751
5003
|
CustomMessagesComponent,
|
|
4752
5004
|
LocalizedMessagesDirective,
|
|
4753
|
-
|
|
5005
|
+
GanttAddTaskComponent
|
|
4754
5006
|
];
|
|
4755
5007
|
/**
|
|
4756
5008
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
@@ -4797,8 +5049,45 @@ GanttModule = __decorate([
|
|
|
4797
5049
|
})
|
|
4798
5050
|
], GanttModule);
|
|
4799
5051
|
|
|
5052
|
+
/**
|
|
5053
|
+
* @hidden
|
|
5054
|
+
*/
|
|
5055
|
+
class PreventableEvent {
|
|
5056
|
+
constructor() {
|
|
5057
|
+
this.prevented = false;
|
|
5058
|
+
}
|
|
5059
|
+
/**
|
|
5060
|
+
* Prevents the default action for a specified event.
|
|
5061
|
+
* In this way, the source component suppresses
|
|
5062
|
+
* the built-in behavior that follows the event.
|
|
5063
|
+
*/
|
|
5064
|
+
preventDefault() {
|
|
5065
|
+
this.prevented = true;
|
|
5066
|
+
}
|
|
5067
|
+
/**
|
|
5068
|
+
* Returns `true` if the event was prevented
|
|
5069
|
+
* by any of its subscribers.
|
|
5070
|
+
*
|
|
5071
|
+
* @returns `true` if the default action was prevented.
|
|
5072
|
+
* Otherwise, returns `false`.
|
|
5073
|
+
*/
|
|
5074
|
+
isDefaultPrevented() {
|
|
5075
|
+
return this.prevented;
|
|
5076
|
+
}
|
|
5077
|
+
}
|
|
5078
|
+
|
|
5079
|
+
/**
|
|
5080
|
+
* Called every time a user leaves an edited cell.
|
|
5081
|
+
*/
|
|
5082
|
+
class CellCloseEvent extends PreventableEvent {
|
|
5083
|
+
constructor(options) {
|
|
5084
|
+
super();
|
|
5085
|
+
Object.assign(this, options);
|
|
5086
|
+
}
|
|
5087
|
+
}
|
|
5088
|
+
|
|
4800
5089
|
/**
|
|
4801
5090
|
* Generated bundle index. Do not edit.
|
|
4802
5091
|
*/
|
|
4803
5092
|
|
|
4804
|
-
export { MappingService, OptionChangesService, DependencyDomService, GanttDependencyDirective, EditDialogComponent, EditService, CustomMessagesComponent, LocalizedMessagesDirective, Messages,
|
|
5093
|
+
export { MappingService, OptionChangesService, DependencyDomService, GanttDependencyDirective, GanttAddTaskComponent, EditDialogComponent, EditService, CustomMessagesComponent, LocalizedMessagesDirective, Messages, PreventableEvent, GanttHeaderTableBodyComponent, GanttMilestoneTaskComponent, GanttSummaryTaskComponent, GanttTaskBase, GanttTaskComponent, GanttTasksTableBodyComponent, ScrollSyncService, GanttTimelineComponent, TimelineBaseViewService, TimelineDayViewComponent, TimelineDayViewService, TimelineMonthViewComponent, TimelineMonthViewService, TimelineViewService, TimelineWeekViewComponent, TimelineWeekViewService, ViewBase, ToolbarComponent, ViewSelectorComponent, GanttComponent, GanttModule, GanttHierarchyBindingDirective, GanttFlatBindingDirective, GanttExpandableDirective, GanttTaskTemplateDirective, GanttTaskContentTemplateDirective, GanttSummaryTaskTemplateDirective, ToolbarTemplateDirective, SelectableDirective, CellCloseEvent, GanttColumnBase, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, CellTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, ColumnMenuTemplateDirective, FilterCellTemplateDirective, FilterMenuTemplateDirective, EditTemplateDirective };
|