@progress/kendo-angular-gantt 17.0.0-develop.3 → 17.0.0-develop.30
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/README.md +41 -17
- package/binding-directives/flat-binding.directive.d.ts +1 -1
- package/binding-directives/hierarchy-binding.directive.d.ts +1 -1
- package/columns/column-base.component.d.ts +1 -74
- package/columns/column-group.component.d.ts +1 -80
- package/columns/column.component.d.ts +1 -80
- package/columns/span-column.component.d.ts +1 -90
- package/dependencies/gantt-dependency.directive.d.ts +1 -1
- package/dragging/dependency-drag-create.directive.d.ts +1 -1
- package/editing/add-task.component.d.ts +1 -1
- package/editing/dependencies-table.component.d.ts +1 -1
- package/editing/edit-dialog.component.d.ts +1 -1
- package/{esm2020 → esm2022}/binding-directives/flat-binding.directive.mjs +7 -3
- package/{esm2020 → esm2022}/binding-directives/hierarchy-binding.directive.mjs +7 -3
- package/{esm2020 → esm2022}/columns/cell-template.directive.mjs +4 -3
- package/esm2022/columns/column-base.component.mjs +22 -0
- package/esm2022/columns/column-group.component.mjs +66 -0
- package/{esm2020 → esm2022}/columns/column-menu-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/columns/column.component.mjs +37 -65
- package/{esm2020 → esm2022}/columns/edit-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/columns/filter-cell-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/columns/filter-menu-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/columns/footer-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/columns/header-template.directive.mjs +4 -3
- package/esm2022/columns/span-column.component.mjs +66 -0
- package/{esm2020 → esm2022}/common/mapping.service.mjs +5 -7
- package/{esm2020 → esm2022}/common/option-changes.service.mjs +6 -8
- package/{esm2020 → esm2022}/dependencies/dependency-dom.service.mjs +21 -12
- package/{esm2020 → esm2022}/dependencies/gantt-dependency.directive.mjs +10 -4
- package/{esm2020 → esm2022}/dragging/dependency-drag-create.directive.mjs +41 -18
- package/{esm2020 → esm2022}/dragging/drag-validation-tooltip.component.mjs +24 -12
- package/{esm2020 → esm2022}/editing/add-task.component.mjs +31 -28
- package/{esm2020 → esm2022}/editing/dependencies-table.component.mjs +23 -16
- package/{esm2020 → esm2022}/editing/edit-dialog.component.mjs +14 -8
- package/{esm2020 → esm2022}/editing/edit.service.mjs +23 -17
- package/{esm2020 → esm2022}/editing/task-fields.component.mjs +7 -4
- package/{esm2020 → esm2022}/expanded-state/expand-event.mjs +4 -0
- package/{esm2020 → esm2022}/expanded-state/expandable.directive.mjs +3 -3
- package/{esm2020 → esm2022}/gantt.component.mjs +434 -364
- package/{esm2020 → esm2022}/gantt.module.mjs +31 -31
- package/{esm2020 → esm2022}/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/localization/gantt-localization.service.mjs +4 -3
- package/{esm2020 → esm2022}/localization/localized-messages.directive.mjs +9 -8
- package/esm2022/localization/messages.mjs +441 -0
- package/esm2022/models/events/cell-close-event.interface.mjs +45 -0
- package/{esm2020 → esm2022}/navigation/navigation.service.mjs +40 -35
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{esm2020 → esm2022}/rendering/gantt-header-table-body.component.mjs +7 -7
- package/{esm2020 → esm2022}/rendering/gantt-milestone-task.component.mjs +11 -11
- package/{esm2020 → esm2022}/rendering/gantt-summary-task.component.mjs +16 -14
- package/{esm2020 → esm2022}/rendering/gantt-task-base.mjs +37 -18
- package/{esm2020 → esm2022}/rendering/gantt-task.component.mjs +14 -11
- package/{esm2020 → esm2022}/rendering/gantt-tasks-table-body.component.mjs +20 -8
- package/{esm2020 → esm2022}/scrolling/scroll-sync.service.mjs +9 -6
- package/{esm2020 → esm2022}/scrolling/timeline-scroll.directive.mjs +10 -4
- package/{esm2020 → esm2022}/scrolling/timeline-scroll.service.mjs +6 -8
- package/{esm2020 → esm2022}/selection/selectable.directive.mjs +18 -14
- package/{esm2020 → esm2022}/template-directives/summary-task-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/template-directives/task-content-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/template-directives/task-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/timeline/current-time-marker.service.mjs +36 -27
- package/{esm2020 → esm2022}/timeline/gantt-timeline.component.mjs +54 -16
- package/{esm2020 → esm2022}/timeline/timeline-base-view.service.mjs +6 -3
- package/{esm2020 → esm2022}/timeline/timeline-day-view.component.mjs +12 -12
- package/{esm2020 → esm2022}/timeline/timeline-day-view.service.mjs +4 -3
- package/{esm2020 → esm2022}/timeline/timeline-month-view.component.mjs +12 -12
- package/{esm2020 → esm2022}/timeline/timeline-month-view.service.mjs +4 -3
- package/{esm2020 → esm2022}/timeline/timeline-view.service.mjs +5 -4
- package/{esm2020 → esm2022}/timeline/timeline-week-view.component.mjs +12 -12
- package/{esm2020 → esm2022}/timeline/timeline-week-view.service.mjs +4 -3
- package/{esm2020 → esm2022}/timeline/timeline-year-view.component.mjs +12 -12
- package/{esm2020 → esm2022}/timeline/timeline-year-view.service.mjs +4 -3
- package/{esm2020 → esm2022}/timeline/view-base.mjs +22 -9
- package/{esm2020 → esm2022}/toolbar/toolbar-navigation.service.mjs +6 -4
- package/{esm2020 → esm2022}/toolbar/toolbar-template.directive.mjs +8 -7
- package/{esm2020 → esm2022}/toolbar/toolbar.component.mjs +21 -12
- package/{esm2020 → esm2022}/toolbar/view-selector.component.mjs +20 -15
- package/expanded-state/expandable.directive.d.ts +1 -1
- package/{fesm2020 → fesm2022}/progress-kendo-angular-gantt.mjs +1580 -1115
- package/gantt.component.d.ts +1 -1
- package/localization/messages.d.ts +1 -1
- package/models/cell-content-type.interface.d.ts +1 -1
- package/models/class-callbacks.d.ts +2 -2
- package/models/events/task-edit-event.interface.d.ts +1 -1
- package/models/filterable-settings.d.ts +1 -1
- package/models/sort-settings.d.ts +2 -2
- package/models/timeline-view.d.ts +1 -1
- package/models/toolbar-settings.d.ts +1 -1
- package/package.json +24 -30
- package/rendering/gantt-header-table-body.component.d.ts +1 -1
- package/rendering/gantt-summary-task.component.d.ts +1 -1
- package/rendering/gantt-task-base.d.ts +1 -1
- package/rendering/gantt-task.component.d.ts +1 -1
- package/rendering/gantt-tasks-table-body.component.d.ts +1 -1
- package/schematics/ngAdd/index.js +7 -7
- package/scrolling/scroll-sync.service.d.ts +2 -2
- package/scrolling/timeline-scroll.directive.d.ts +1 -1
- package/selection/selectable.directive.d.ts +1 -1
- package/timeline/gantt-timeline.component.d.ts +1 -1
- package/timeline/view-base.d.ts +1 -1
- package/toolbar/toolbar-template.directive.d.ts +1 -1
- package/toolbar/toolbar.component.d.ts +1 -1
- package/toolbar/view-selector.component.d.ts +1 -1
- package/utils.d.ts +1 -1
- package/esm2020/columns/column-base.component.mjs +0 -55
- package/esm2020/columns/column-group.component.mjs +0 -101
- package/esm2020/columns/span-column.component.mjs +0 -120
- package/esm2020/localization/messages.mjs +0 -157
- package/esm2020/models/events/cell-close-event.interface.mjs +0 -14
- package/fesm2015/progress-kendo-angular-gantt.mjs +0 -8219
- /package/{esm2020 → esm2022}/columns/columns.mjs +0 -0
- /package/{esm2020 → esm2022}/common/default-callbacks.mjs +0 -0
- /package/{esm2020 → esm2022}/dependencies/dom-dependency-args.mjs +0 -0
- /package/{esm2020 → esm2022}/dependencies/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/editing/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/models/cell-content-type.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/class-callbacks.mjs +0 -0
- /package/{esm2020 → esm2022}/models/column-menu-settings.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/column-reorder-config.mjs +0 -0
- /package/{esm2020 → esm2022}/models/current-time-settings.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/date-range.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/dependency-type.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/cell-click-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/click-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/column-locked-change-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/column-reorder-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/column-resize-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/column-visibility-change-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/data-state-change-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/dependency-add-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/selected-view-change-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/task-add-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/task-click-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/task-delete-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/task-edit-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/task-move-end-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/task-move-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/task-move-start-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/task-resize-end-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/task-resize-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events/task-resize-start-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/filterable-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/models/gantt-dependency-model-fields.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/gantt-dependency.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/gantt-task-model-fields.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/gantt-task.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/models.mjs +0 -0
- /package/{esm2020 → esm2022}/models/slot.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/sort-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/models/splitter-pane-options.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/timeline-header-date-format.mjs +0 -0
- /package/{esm2020 → esm2022}/models/timeline-options.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/models/timeline-view.mjs +0 -0
- /package/{esm2020 → esm2022}/models/toolbar-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/models/view-item.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/navigation/navigation-models.mjs +0 -0
- /package/{esm2020 → esm2022}/navigation/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-gantt.mjs +0 -0
- /package/{esm2020 → esm2022}/scrolling/drag-scroll-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/scrolling/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/selection/selection-change-event.mjs +0 -0
- /package/{esm2020 → esm2022}/utils.mjs +0 -0
|
@@ -135,337 +135,45 @@ const DEFAULT_DRAG_SCROLL_SETTINGS = {
|
|
|
135
135
|
* ```
|
|
136
136
|
*/
|
|
137
137
|
export class GanttComponent {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Fires when the Gantt selection is changed through user interaction.
|
|
179
|
-
*
|
|
180
|
-
* Holds data about the affected [`items`]({% slug api_gantt_selectionchangeevent %}#toc-items) and the attempted [`action`]({% slug api_gantt_selectionchangeevent %}#toc-action):
|
|
181
|
-
* - `select` - Triggered on `click` or `ctrl + click` on deselected items.
|
|
182
|
-
* - `remove` - Triggered on `ctrl + click` on selected items.
|
|
183
|
-
*/
|
|
184
|
-
this.selectionChange = new EventEmitter();
|
|
185
|
-
/**
|
|
186
|
-
* Enables or disables the Gantt selection mechanism ([see example]({% slug selection_gantt %}#toc-custom-selection)).
|
|
187
|
-
*
|
|
188
|
-
* > When set to `true`, the [`isSelected`]({% slug api_gantt_ganttcomponent %}#toc-isselected) callback has to be provided.
|
|
189
|
-
* > When applied, the [`SelectableDirective`]({% slug api_gantt_selectabledirective %}) sets `selectable` to `true` internally.
|
|
190
|
-
*/
|
|
191
|
-
this.selectable = false;
|
|
192
|
-
/**
|
|
193
|
-
* Allows setting the toolbar(s) `aria-label` attribute value as necessary to comply with accessibility requirements.
|
|
194
|
-
* Typically, toolbars need an `aria-label` when there is more than one toolbar in the application.
|
|
195
|
-
*/
|
|
196
|
-
this.toolbarAriaLabel = 'Toolbar';
|
|
197
|
-
/**
|
|
198
|
-
* Defines the dependencies that will be drawn between the rendered tasks.
|
|
199
|
-
*
|
|
200
|
-
* > The dependency data items should either conform to the [`GanttDependency`]({% slug api_gantt_ganttdependency %}) interface, or a [`dependencyModelFields`]({% slug api_gantt_ganttcomponent %}#toc-dependencymodelfields) object has to be provided.
|
|
201
|
-
*/
|
|
202
|
-
this.dependencies = [];
|
|
203
|
-
/**
|
|
204
|
-
* Enables the sorting of the Gantt columns that have their `field` option set.
|
|
205
|
-
*/
|
|
206
|
-
this.sortable = false;
|
|
207
|
-
/**
|
|
208
|
-
* The descriptors by which the data will be sorted.
|
|
209
|
-
*/
|
|
210
|
-
this.sort = [];
|
|
211
|
-
/**
|
|
212
|
-
* Enables the filtering of the Gantt columns that have their `field` option set.
|
|
213
|
-
*
|
|
214
|
-
* @default false
|
|
215
|
-
*/
|
|
216
|
-
this.filterable = false;
|
|
217
|
-
/**
|
|
218
|
-
* The start time of the work day.
|
|
219
|
-
* Accepts string values in the `HH:mm` format.
|
|
220
|
-
*/
|
|
221
|
-
this.workDayStart = '08:00';
|
|
222
|
-
/**
|
|
223
|
-
* The end time of the work day.
|
|
224
|
-
* Accepts string values in the `HH:mm` format.
|
|
225
|
-
*/
|
|
226
|
-
this.workDayEnd = '17:00';
|
|
227
|
-
/**
|
|
228
|
-
* The start of the work week (index based).
|
|
229
|
-
*/
|
|
230
|
-
this.workWeekStart = 1;
|
|
231
|
-
/**
|
|
232
|
-
* The end of the work week (index based).
|
|
233
|
-
*/
|
|
234
|
-
this.workWeekEnd = 5;
|
|
235
|
-
/**
|
|
236
|
-
* If set to `true`, the user can use dedicated shortcuts to interact with the Gantt.
|
|
237
|
-
* By default, navigation is disabled for the TreeList and Timeline parts of the component,
|
|
238
|
-
* ([see example]({% slug keyboard_navigation_gantt %})).
|
|
239
|
-
*/
|
|
240
|
-
this.navigable = false;
|
|
241
|
-
/**
|
|
242
|
-
* Indicates whether the Gantt columns will be resized during initialization so that they fit their headers and row content.
|
|
243
|
-
* Columns with autoSize set to false are excluded.
|
|
244
|
-
*
|
|
245
|
-
* @default false
|
|
246
|
-
*/
|
|
247
|
-
this.columnsAutoSize = false;
|
|
248
|
-
/**
|
|
249
|
-
* Specifies the Gantt current time marker settings.
|
|
250
|
-
* The settings will be applied for all views.
|
|
251
|
-
* If the `currentTimeMarker` is set for a view then it takes precedence.
|
|
252
|
-
*
|
|
253
|
-
* @default true
|
|
254
|
-
*/
|
|
255
|
-
this.currentTimeMarker = true;
|
|
256
|
-
/**
|
|
257
|
-
* Specifies if the column menu of the columns will be displayed.
|
|
258
|
-
*
|
|
259
|
-
* @default false
|
|
260
|
-
*/
|
|
261
|
-
this.columnMenu = false;
|
|
262
|
-
/**
|
|
263
|
-
* If set to true, the user can reorder columns by dragging their header cells.
|
|
264
|
-
*
|
|
265
|
-
* @default false
|
|
266
|
-
*/
|
|
267
|
-
this.columnsReorderable = false;
|
|
268
|
-
/**
|
|
269
|
-
* If set to true, the user can resize columns by dragging the edges (resize handles) of their header cells.
|
|
270
|
-
*
|
|
271
|
-
* @default false
|
|
272
|
-
*/
|
|
273
|
-
this.columnsResizable = false;
|
|
274
|
-
/**
|
|
275
|
-
* Fires when an item is expanded.
|
|
276
|
-
*/
|
|
277
|
-
this.rowExpand = new EventEmitter();
|
|
278
|
-
/**
|
|
279
|
-
* Fires when a Gantt task in the timeline pane is double-clicked. The data item, associated with the clicked task,
|
|
280
|
-
* is available in the event data. Use the event handler to open a task editing dialog as necessary.
|
|
281
|
-
*/
|
|
282
|
-
this.taskDblClick = new EventEmitter();
|
|
283
|
-
/**
|
|
284
|
-
* Fires when the user double clicks a cell.
|
|
285
|
-
*/
|
|
286
|
-
this.cellDblClick = new EventEmitter();
|
|
287
|
-
/**
|
|
288
|
-
* Fires when the user leaves an edited cell.
|
|
289
|
-
*/
|
|
290
|
-
this.cellClose = new EventEmitter();
|
|
291
|
-
/**
|
|
292
|
-
* Fires when the end user clicks the `Delete` button in the task editing dialog,
|
|
293
|
-
* the task delete icon, or presses the `Delete` key on the keyboard when a task in the timeline is focused.
|
|
294
|
-
* Use the event handler to open a confirmation dialog when necessary.
|
|
295
|
-
*/
|
|
296
|
-
this.taskDelete = new EventEmitter();
|
|
297
|
-
/**
|
|
298
|
-
* Fires when an item is collapsed.
|
|
299
|
-
*/
|
|
300
|
-
this.rowCollapse = new EventEmitter();
|
|
301
|
-
/**
|
|
302
|
-
* Fires when the user confirms deleting a task.
|
|
303
|
-
*/
|
|
304
|
-
this.remove = new EventEmitter();
|
|
305
|
-
/**
|
|
306
|
-
* Fires when the user cancels editing a task.
|
|
307
|
-
*/
|
|
308
|
-
this.cancel = new EventEmitter();
|
|
309
|
-
/**
|
|
310
|
-
* Fires when the user saves an edited task.
|
|
311
|
-
*/
|
|
312
|
-
this.save = new EventEmitter();
|
|
313
|
-
/**
|
|
314
|
-
* Fires when the user adds a task.
|
|
315
|
-
*/
|
|
316
|
-
this.taskAdd = new EventEmitter();
|
|
317
|
-
/**
|
|
318
|
-
* Fires when the user adds a dependency via dragging
|
|
319
|
-
* [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-basic-concepts).
|
|
320
|
-
*/
|
|
321
|
-
this.dependencyAdd = new EventEmitter();
|
|
322
|
-
/**
|
|
323
|
-
* Fires when the sorting of the Gantt is changed.
|
|
324
|
-
* You have to handle the event yourself and sort the data.
|
|
325
|
-
*/
|
|
326
|
-
this.sortChange = new EventEmitter();
|
|
327
|
-
/**
|
|
328
|
-
* Fires when the Gantt filter is modified.
|
|
329
|
-
* You have to handle the event yourself and filter the data.
|
|
330
|
-
*/
|
|
331
|
-
this.filterChange = new EventEmitter();
|
|
332
|
-
/**
|
|
333
|
-
* Fires when the filter or sort state of the Gantt is changed.
|
|
334
|
-
*/
|
|
335
|
-
this.dataStateChange = new EventEmitter();
|
|
336
|
-
/**
|
|
337
|
-
* Fires when the collapsed state of the treelist pane is changed.
|
|
338
|
-
*/
|
|
339
|
-
this.treeListPaneCollapsedChange = new EventEmitter();
|
|
340
|
-
/**
|
|
341
|
-
* Fires when the collapsed state of the timeline pane is changed.
|
|
342
|
-
*/
|
|
343
|
-
this.timelinePaneCollapsedChange = new EventEmitter();
|
|
344
|
-
/**
|
|
345
|
-
* Fires each time the user resizes the timeline pane.
|
|
346
|
-
*/
|
|
347
|
-
this.timelinePaneSizeChange = new EventEmitter();
|
|
348
|
-
/**
|
|
349
|
-
* Fires each time the user selects a different view type. The event data contains the type of the newly selected view.
|
|
350
|
-
*/
|
|
351
|
-
this.activeViewChange = new EventEmitter();
|
|
352
|
-
/**
|
|
353
|
-
* Fires when the user completes the resizing of the column.
|
|
354
|
-
*/
|
|
355
|
-
this.columnResize = new EventEmitter();
|
|
356
|
-
/**
|
|
357
|
-
* Fires when the user completes the reordering of the column.
|
|
358
|
-
*/
|
|
359
|
-
this.columnReorder = new EventEmitter();
|
|
360
|
-
/**
|
|
361
|
-
* Fires when the user changes the visibility of the columns from the column menu or column chooser.
|
|
362
|
-
*/
|
|
363
|
-
this.columnVisibilityChange = new EventEmitter();
|
|
364
|
-
/**
|
|
365
|
-
* @hidden
|
|
366
|
-
*
|
|
367
|
-
* Fires when the user changes the locked state of the columns from the column menu or by reordering the columns.
|
|
368
|
-
*/
|
|
369
|
-
this.columnLockedChange = new EventEmitter();
|
|
370
|
-
/**
|
|
371
|
-
* Fires when a cell is clicked.
|
|
372
|
-
*/
|
|
373
|
-
this.cellClick = new EventEmitter();
|
|
374
|
-
/**
|
|
375
|
-
* Fires when a task is clicked.
|
|
376
|
-
*/
|
|
377
|
-
this.taskClick = new EventEmitter();
|
|
378
|
-
/**
|
|
379
|
-
* @hidden
|
|
380
|
-
*
|
|
381
|
-
* Specifies whether the dependency drag clues will be rendered.
|
|
382
|
-
* Set internally by the dependency-drag-create directive.
|
|
383
|
-
*
|
|
384
|
-
* @default false
|
|
385
|
-
*/
|
|
386
|
-
this.renderDependencyDragClues = false;
|
|
387
|
-
/**
|
|
388
|
-
* @hidden
|
|
389
|
-
*
|
|
390
|
-
* Used by the GanttExpandableDirective.
|
|
391
|
-
*/
|
|
392
|
-
this.expandStateChange = new EventEmitter();
|
|
393
|
-
/**
|
|
394
|
-
* @hidden
|
|
395
|
-
*/
|
|
396
|
-
this.showEditingDialog = false;
|
|
397
|
-
/**
|
|
398
|
-
* @hidden
|
|
399
|
-
*/
|
|
400
|
-
this.showConfirmationDialog = false;
|
|
401
|
-
/**
|
|
402
|
-
* @hidden
|
|
403
|
-
*/
|
|
404
|
-
this.showLicenseWatermark = false;
|
|
405
|
-
this._columns = new QueryList();
|
|
406
|
-
this._data = [];
|
|
407
|
-
this._dragScrollSettings = { ...DEFAULT_DRAG_SCROLL_SETTINGS };
|
|
408
|
-
this._timelinePaneOptions = { ...DEFAULT_TIMELINE_PANE_SETTINGS };
|
|
409
|
-
this._treeListPaneOptions = { ...DEFAULT_TREELIST_PANE_SETTINGS };
|
|
410
|
-
this._rowClass = rowClassCallback;
|
|
411
|
-
this._taskClass = taskClassCallback;
|
|
412
|
-
this._activeView = DEFAULT_VIEW;
|
|
413
|
-
this._toolbarSettings = {
|
|
414
|
-
position: 'top',
|
|
415
|
-
addTaskTool: 'none',
|
|
416
|
-
viewSelectorTool: 'top'
|
|
417
|
-
};
|
|
418
|
-
this._fetchChildren = fetchChildren;
|
|
419
|
-
this._hasChildren = hasChildren;
|
|
420
|
-
this.rtl = false;
|
|
421
|
-
this.optionChangesSubscriptions = new Subscription();
|
|
422
|
-
this.editServiceSubscription = new Subscription();
|
|
423
|
-
const isValid = validatePackage(packageMetadata);
|
|
424
|
-
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
|
425
|
-
this.optionChangesSubscriptions.add(this.optionChangesService.viewChanges.subscribe(() => {
|
|
426
|
-
this.loadTimelineData();
|
|
427
|
-
}));
|
|
428
|
-
this.optionChangesSubscriptions.add(this.optionChangesService.dateFormatChanges.subscribe(() => {
|
|
429
|
-
this.loadTimelineData();
|
|
430
|
-
}));
|
|
431
|
-
this.optionChangesSubscriptions.add(this.optionChangesService.columnChanges.subscribe(() => {
|
|
432
|
-
this.treeList.columns.notifyOnChanges();
|
|
433
|
-
}));
|
|
434
|
-
this.editService.getSelectedItem = this.getFirstSelectedItem.bind(this);
|
|
435
|
-
this.editServiceSubscription.add(this.editService.showEditingDialog.subscribe(show => this.showEditingDialog = show));
|
|
436
|
-
this.editServiceSubscription.add(this.editService.taskDelete.subscribe(task => {
|
|
437
|
-
if (hasObservers(this.taskDelete)) {
|
|
438
|
-
this.zone.run(() => this.notifyTaskDelete(task));
|
|
439
|
-
}
|
|
440
|
-
}));
|
|
441
|
-
this.editServiceSubscription.add(this.editService.editEvent.subscribe(args => {
|
|
442
|
-
this[args.editResultType].emit({
|
|
443
|
-
taskFormGroup: args.taskFormGroup,
|
|
444
|
-
item: getEditItem(args.dataItem, this.treeList.view.data, this.mapper),
|
|
445
|
-
dependencies: args.dependencies,
|
|
446
|
-
sender: this
|
|
447
|
-
});
|
|
448
|
-
this.showConfirmationDialog = this.showEditingDialog = false;
|
|
449
|
-
this.editService.dataItem = this.editService.taskFormGroup = null;
|
|
450
|
-
this.updateView();
|
|
451
|
-
if (this.navigable) {
|
|
452
|
-
this.focus();
|
|
453
|
-
}
|
|
454
|
-
}));
|
|
455
|
-
this.editServiceSubscription.add(this.editService.addEvent.subscribe(args => {
|
|
456
|
-
const selectedItem = this.getFirstSelectedItem();
|
|
457
|
-
this.taskAdd.emit({
|
|
458
|
-
actionType: args.actionType,
|
|
459
|
-
selectedItem: selectedItem ? getEditItem(selectedItem, this.treeList.view.data, this.mapper) : null
|
|
460
|
-
});
|
|
461
|
-
this.updateView();
|
|
462
|
-
}));
|
|
463
|
-
this.localizationSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
464
|
-
this.rtl = rtl;
|
|
465
|
-
this.direction = this.rtl ? 'rtl' : 'ltr';
|
|
466
|
-
this.currentTimeMarkerService.rtl = rtl;
|
|
467
|
-
});
|
|
468
|
-
}
|
|
138
|
+
timelineViewService;
|
|
139
|
+
scrollSyncService;
|
|
140
|
+
renderer;
|
|
141
|
+
mapper;
|
|
142
|
+
optionChangesService;
|
|
143
|
+
dependencyDomService;
|
|
144
|
+
editService;
|
|
145
|
+
localizationService;
|
|
146
|
+
hostElement;
|
|
147
|
+
zone;
|
|
148
|
+
navigation;
|
|
149
|
+
currentTimeMarkerService;
|
|
150
|
+
treeList;
|
|
151
|
+
timeline;
|
|
152
|
+
/**
|
|
153
|
+
* @hidden
|
|
154
|
+
*
|
|
155
|
+
* Queries the template for a task content template declaration.
|
|
156
|
+
* In newer Angular versions the ngIf-ed value gets evaluated after the static query is resolved.
|
|
157
|
+
* Therefore the `static` property needs to be set to `false`.
|
|
158
|
+
*/
|
|
159
|
+
taskContentTemplate;
|
|
160
|
+
/**
|
|
161
|
+
* @hidden
|
|
162
|
+
*
|
|
163
|
+
* Queries the template for a task template declaration.
|
|
164
|
+
* In newer Angular versions the ngIf-ed value gets evaluated after the static query is resolved.
|
|
165
|
+
* Therefore the `static` property needs to be set to `false`.
|
|
166
|
+
*/
|
|
167
|
+
taskTemplate;
|
|
168
|
+
/**
|
|
169
|
+
* @hidden
|
|
170
|
+
*
|
|
171
|
+
* Queries the template for a task summary template declaration.
|
|
172
|
+
* In newer Angular versions the ngIf-ed value gets evaluated after the static query is resolved.
|
|
173
|
+
* Therefore the `static` property needs to be set to `false`.
|
|
174
|
+
*/
|
|
175
|
+
summaryTaskTemplate;
|
|
176
|
+
toolbarTemplateChildren;
|
|
469
177
|
get toolbarTemplate() {
|
|
470
178
|
if (this._customToolbarTemplate) {
|
|
471
179
|
return this._customToolbarTemplate;
|
|
@@ -475,12 +183,21 @@ export class GanttComponent {
|
|
|
475
183
|
set toolbarTemplate(customToolbarTemplate) {
|
|
476
184
|
this._customToolbarTemplate = customToolbarTemplate;
|
|
477
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* @hidden
|
|
188
|
+
*/
|
|
189
|
+
roleDescription = 'Gantt Chart';
|
|
478
190
|
get hostRoleDescriptionAttr() {
|
|
479
191
|
return this.roleDescription;
|
|
480
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* @hidden
|
|
195
|
+
*/
|
|
196
|
+
role = 'application';
|
|
481
197
|
get hostRoleAttr() {
|
|
482
198
|
return this.role;
|
|
483
199
|
}
|
|
200
|
+
hostClasses = true;
|
|
484
201
|
get dir() {
|
|
485
202
|
return this.direction;
|
|
486
203
|
}
|
|
@@ -511,6 +228,10 @@ export class GanttComponent {
|
|
|
511
228
|
set dependencyModelFields(fields) {
|
|
512
229
|
this.mapper.dependencyFields = fields;
|
|
513
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* A query list of all declared views.
|
|
233
|
+
*/
|
|
234
|
+
views;
|
|
514
235
|
/**
|
|
515
236
|
* The active timeline view.
|
|
516
237
|
* @default 'week'
|
|
@@ -552,6 +273,38 @@ export class GanttComponent {
|
|
|
552
273
|
get data() {
|
|
553
274
|
return this._data;
|
|
554
275
|
}
|
|
276
|
+
/**
|
|
277
|
+
* Specifies a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection)).
|
|
278
|
+
*
|
|
279
|
+
* > The [`selectable`]({% slug api_gantt_ganttcomponent %}#toc-selectable) prop has to be set to `true` in order for this callback to be executed.
|
|
280
|
+
*/
|
|
281
|
+
isSelected = isSelected;
|
|
282
|
+
/**
|
|
283
|
+
* Specifies a callback that determines if a new dependency is valid.
|
|
284
|
+
* Used when evaluating if an attempt to create a new dependency will result in a valid link between the two tasks
|
|
285
|
+
* [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-validation).
|
|
286
|
+
*
|
|
287
|
+
* By defalut, dependencies are deemed invalid when:
|
|
288
|
+
* - The two tasks are in a parent-child relationship.
|
|
289
|
+
* - The two tasks are already dependent on one another. Only one dependency is allowed per pair.
|
|
290
|
+
* - The start or end times of the two tasks are incompatible with the attempted dependency type.
|
|
291
|
+
*/
|
|
292
|
+
validateNewDependency = this.defaultValidateNewDependencyCallback.bind(this);
|
|
293
|
+
/**
|
|
294
|
+
* Fires when the Gantt selection is changed through user interaction.
|
|
295
|
+
*
|
|
296
|
+
* Holds data about the affected [`items`]({% slug api_gantt_selectionchangeevent %}#toc-items) and the attempted [`action`]({% slug api_gantt_selectionchangeevent %}#toc-action):
|
|
297
|
+
* - `select` - Triggered on `click` or `ctrl + click` on deselected items.
|
|
298
|
+
* - `remove` - Triggered on `ctrl + click` on selected items.
|
|
299
|
+
*/
|
|
300
|
+
selectionChange = new EventEmitter();
|
|
301
|
+
/**
|
|
302
|
+
* Enables or disables the Gantt selection mechanism ([see example]({% slug selection_gantt %}#toc-custom-selection)).
|
|
303
|
+
*
|
|
304
|
+
* > When set to `true`, the [`isSelected`]({% slug api_gantt_ganttcomponent %}#toc-isselected) callback has to be provided.
|
|
305
|
+
* > When applied, the [`SelectableDirective`]({% slug api_gantt_selectabledirective %}) sets `selectable` to `true` internally.
|
|
306
|
+
*/
|
|
307
|
+
selectable = false;
|
|
555
308
|
/**
|
|
556
309
|
* The toolbar configuration. Defines the position and content of the toolbar(s).
|
|
557
310
|
* The available properties are `position`, `addTaskTool`, and `viewSelectorTool`.
|
|
@@ -575,6 +328,11 @@ export class GanttComponent {
|
|
|
575
328
|
get toolbarSettings() {
|
|
576
329
|
return this._toolbarSettings;
|
|
577
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* Allows setting the toolbar(s) `aria-label` attribute value as necessary to comply with accessibility requirements.
|
|
333
|
+
* Typically, toolbars need an `aria-label` when there is more than one toolbar in the application.
|
|
334
|
+
*/
|
|
335
|
+
toolbarAriaLabel = 'Toolbar';
|
|
578
336
|
/**
|
|
579
337
|
* Gets or sets the callback function that retrieves the child items for a particular item.
|
|
580
338
|
*/
|
|
@@ -595,6 +353,54 @@ export class GanttComponent {
|
|
|
595
353
|
get hasChildren() {
|
|
596
354
|
return this._hasChildren;
|
|
597
355
|
}
|
|
356
|
+
/**
|
|
357
|
+
* Defines the dependencies that will be drawn between the rendered tasks.
|
|
358
|
+
*
|
|
359
|
+
* > The dependency data items should either conform to the [`GanttDependency`]({% slug api_gantt_ganttdependency %}) interface, or a [`dependencyModelFields`]({% slug api_gantt_ganttcomponent %}#toc-dependencymodelfields) object has to be provided.
|
|
360
|
+
*/
|
|
361
|
+
dependencies = [];
|
|
362
|
+
/**
|
|
363
|
+
* Enables the sorting of the Gantt columns that have their `field` option set.
|
|
364
|
+
*/
|
|
365
|
+
sortable = false;
|
|
366
|
+
/**
|
|
367
|
+
* The descriptors by which the data will be sorted.
|
|
368
|
+
*/
|
|
369
|
+
sort = [];
|
|
370
|
+
/**
|
|
371
|
+
* Enables the filtering of the Gantt columns that have their `field` option set.
|
|
372
|
+
*
|
|
373
|
+
* @default false
|
|
374
|
+
*/
|
|
375
|
+
filterable = false;
|
|
376
|
+
/**
|
|
377
|
+
* The descriptor by which the data will be filtered.
|
|
378
|
+
*/
|
|
379
|
+
filter;
|
|
380
|
+
/**
|
|
381
|
+
* The start time of the work day.
|
|
382
|
+
* Accepts string values in the `HH:mm` format.
|
|
383
|
+
*/
|
|
384
|
+
workDayStart = '08:00';
|
|
385
|
+
/**
|
|
386
|
+
* The end time of the work day.
|
|
387
|
+
* Accepts string values in the `HH:mm` format.
|
|
388
|
+
*/
|
|
389
|
+
workDayEnd = '17:00';
|
|
390
|
+
/**
|
|
391
|
+
* The start of the work week (index based).
|
|
392
|
+
*/
|
|
393
|
+
workWeekStart = 1;
|
|
394
|
+
/**
|
|
395
|
+
* The end of the work week (index based).
|
|
396
|
+
*/
|
|
397
|
+
workWeekEnd = 5;
|
|
398
|
+
/**
|
|
399
|
+
* If set to `true`, the user can use dedicated shortcuts to interact with the Gantt.
|
|
400
|
+
* By default, navigation is disabled for the TreeList and Timeline parts of the component,
|
|
401
|
+
* ([see example]({% slug keyboard_navigation_gantt %})).
|
|
402
|
+
*/
|
|
403
|
+
navigable = false;
|
|
598
404
|
/**
|
|
599
405
|
* The options of the timeline splitter pane. By default the pane is `collapsible`,
|
|
600
406
|
* `resizable`, not `collapsed`, and its `size` is `'50%'`.
|
|
@@ -650,6 +456,44 @@ export class GanttComponent {
|
|
|
650
456
|
get taskIdField() {
|
|
651
457
|
return this.mapper.taskFields.id;
|
|
652
458
|
}
|
|
459
|
+
/**
|
|
460
|
+
* Sets the callback function that indicates if a particular item is expanded.
|
|
461
|
+
* If no callback is set, all items will be expanded and no expand icons will be rendered.
|
|
462
|
+
*/
|
|
463
|
+
isExpanded;
|
|
464
|
+
/**
|
|
465
|
+
* Indicates whether the Gantt columns will be resized during initialization so that they fit their headers and row content.
|
|
466
|
+
* Columns with autoSize set to false are excluded.
|
|
467
|
+
*
|
|
468
|
+
* @default false
|
|
469
|
+
*/
|
|
470
|
+
columnsAutoSize = false;
|
|
471
|
+
/**
|
|
472
|
+
* Specifies the Gantt current time marker settings.
|
|
473
|
+
* The settings will be applied for all views.
|
|
474
|
+
* If the `currentTimeMarker` is set for a view then it takes precedence.
|
|
475
|
+
*
|
|
476
|
+
* @default true
|
|
477
|
+
*/
|
|
478
|
+
currentTimeMarker = true;
|
|
479
|
+
/**
|
|
480
|
+
* Specifies if the column menu of the columns will be displayed.
|
|
481
|
+
*
|
|
482
|
+
* @default false
|
|
483
|
+
*/
|
|
484
|
+
columnMenu = false;
|
|
485
|
+
/**
|
|
486
|
+
* If set to true, the user can reorder columns by dragging their header cells.
|
|
487
|
+
*
|
|
488
|
+
* @default false
|
|
489
|
+
*/
|
|
490
|
+
columnsReorderable = false;
|
|
491
|
+
/**
|
|
492
|
+
* If set to true, the user can resize columns by dragging the edges (resize handles) of their header cells.
|
|
493
|
+
*
|
|
494
|
+
* @default false
|
|
495
|
+
*/
|
|
496
|
+
columnsResizable = false;
|
|
653
497
|
/**
|
|
654
498
|
* Specifies the settings for auto-scrolling during dragging
|
|
655
499
|
* when the pointer moves outside of the container bounderies
|
|
@@ -661,6 +505,110 @@ export class GanttComponent {
|
|
|
661
505
|
get dragScrollSettings() {
|
|
662
506
|
return this._dragScrollSettings;
|
|
663
507
|
}
|
|
508
|
+
/**
|
|
509
|
+
* Fires when an item is expanded.
|
|
510
|
+
*/
|
|
511
|
+
rowExpand = new EventEmitter();
|
|
512
|
+
/**
|
|
513
|
+
* Fires when a Gantt task in the timeline pane is double-clicked. The data item, associated with the clicked task,
|
|
514
|
+
* is available in the event data. Use the event handler to open a task editing dialog as necessary.
|
|
515
|
+
*/
|
|
516
|
+
taskDblClick = new EventEmitter();
|
|
517
|
+
/**
|
|
518
|
+
* Fires when the user double clicks a cell.
|
|
519
|
+
*/
|
|
520
|
+
cellDblClick = new EventEmitter();
|
|
521
|
+
/**
|
|
522
|
+
* Fires when the user leaves an edited cell.
|
|
523
|
+
*/
|
|
524
|
+
cellClose = new EventEmitter();
|
|
525
|
+
/**
|
|
526
|
+
* Fires when the end user clicks the `Delete` button in the task editing dialog,
|
|
527
|
+
* the task delete icon, or presses the `Delete` key on the keyboard when a task in the timeline is focused.
|
|
528
|
+
* Use the event handler to open a confirmation dialog when necessary.
|
|
529
|
+
*/
|
|
530
|
+
taskDelete = new EventEmitter();
|
|
531
|
+
/**
|
|
532
|
+
* Fires when an item is collapsed.
|
|
533
|
+
*/
|
|
534
|
+
rowCollapse = new EventEmitter();
|
|
535
|
+
/**
|
|
536
|
+
* Fires when the user confirms deleting a task.
|
|
537
|
+
*/
|
|
538
|
+
remove = new EventEmitter();
|
|
539
|
+
/**
|
|
540
|
+
* Fires when the user cancels editing a task.
|
|
541
|
+
*/
|
|
542
|
+
cancel = new EventEmitter();
|
|
543
|
+
/**
|
|
544
|
+
* Fires when the user saves an edited task.
|
|
545
|
+
*/
|
|
546
|
+
save = new EventEmitter();
|
|
547
|
+
/**
|
|
548
|
+
* Fires when the user adds a task.
|
|
549
|
+
*/
|
|
550
|
+
taskAdd = new EventEmitter();
|
|
551
|
+
/**
|
|
552
|
+
* Fires when the user adds a dependency via dragging
|
|
553
|
+
* [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-basic-concepts).
|
|
554
|
+
*/
|
|
555
|
+
dependencyAdd = new EventEmitter();
|
|
556
|
+
/**
|
|
557
|
+
* Fires when the sorting of the Gantt is changed.
|
|
558
|
+
* You have to handle the event yourself and sort the data.
|
|
559
|
+
*/
|
|
560
|
+
sortChange = new EventEmitter();
|
|
561
|
+
/**
|
|
562
|
+
* Fires when the Gantt filter is modified.
|
|
563
|
+
* You have to handle the event yourself and filter the data.
|
|
564
|
+
*/
|
|
565
|
+
filterChange = new EventEmitter();
|
|
566
|
+
/**
|
|
567
|
+
* Fires when the filter or sort state of the Gantt is changed.
|
|
568
|
+
*/
|
|
569
|
+
dataStateChange = new EventEmitter();
|
|
570
|
+
/**
|
|
571
|
+
* Fires when the collapsed state of the treelist pane is changed.
|
|
572
|
+
*/
|
|
573
|
+
treeListPaneCollapsedChange = new EventEmitter();
|
|
574
|
+
/**
|
|
575
|
+
* Fires when the collapsed state of the timeline pane is changed.
|
|
576
|
+
*/
|
|
577
|
+
timelinePaneCollapsedChange = new EventEmitter();
|
|
578
|
+
/**
|
|
579
|
+
* Fires each time the user resizes the timeline pane.
|
|
580
|
+
*/
|
|
581
|
+
timelinePaneSizeChange = new EventEmitter();
|
|
582
|
+
/**
|
|
583
|
+
* Fires each time the user selects a different view type. The event data contains the type of the newly selected view.
|
|
584
|
+
*/
|
|
585
|
+
activeViewChange = new EventEmitter();
|
|
586
|
+
/**
|
|
587
|
+
* Fires when the user completes the resizing of the column.
|
|
588
|
+
*/
|
|
589
|
+
columnResize = new EventEmitter();
|
|
590
|
+
/**
|
|
591
|
+
* Fires when the user completes the reordering of the column.
|
|
592
|
+
*/
|
|
593
|
+
columnReorder = new EventEmitter();
|
|
594
|
+
/**
|
|
595
|
+
* Fires when the user changes the visibility of the columns from the column menu or column chooser.
|
|
596
|
+
*/
|
|
597
|
+
columnVisibilityChange = new EventEmitter();
|
|
598
|
+
/**
|
|
599
|
+
* @hidden
|
|
600
|
+
*
|
|
601
|
+
* Fires when the user changes the locked state of the columns from the column menu or by reordering the columns.
|
|
602
|
+
*/
|
|
603
|
+
columnLockedChange = new EventEmitter();
|
|
604
|
+
/**
|
|
605
|
+
* Fires when a cell is clicked.
|
|
606
|
+
*/
|
|
607
|
+
cellClick = new EventEmitter();
|
|
608
|
+
/**
|
|
609
|
+
* Fires when a task is clicked.
|
|
610
|
+
*/
|
|
611
|
+
taskClick = new EventEmitter();
|
|
664
612
|
/**
|
|
665
613
|
* @hidden
|
|
666
614
|
*/
|
|
@@ -685,6 +633,27 @@ export class GanttComponent {
|
|
|
685
633
|
get filterMenu() {
|
|
686
634
|
return this.filterable ? 'menu' : false;
|
|
687
635
|
}
|
|
636
|
+
/**
|
|
637
|
+
* @hidden
|
|
638
|
+
*
|
|
639
|
+
* Specifies whether the dependency drag clues will be rendered.
|
|
640
|
+
* Set internally by the dependency-drag-create directive.
|
|
641
|
+
*
|
|
642
|
+
* @default false
|
|
643
|
+
*/
|
|
644
|
+
renderDependencyDragClues = false;
|
|
645
|
+
/**
|
|
646
|
+
* @hidden
|
|
647
|
+
*/
|
|
648
|
+
timelineSlots;
|
|
649
|
+
/**
|
|
650
|
+
* @hidden
|
|
651
|
+
*/
|
|
652
|
+
timelineGroupSlots;
|
|
653
|
+
/**
|
|
654
|
+
* @hidden
|
|
655
|
+
*/
|
|
656
|
+
tableWidth;
|
|
688
657
|
/**
|
|
689
658
|
* @hidden
|
|
690
659
|
*/
|
|
@@ -722,12 +691,113 @@ export class GanttComponent {
|
|
|
722
691
|
get viewTypes() {
|
|
723
692
|
return this.views.map(view => view.type);
|
|
724
693
|
}
|
|
694
|
+
/**
|
|
695
|
+
* @hidden
|
|
696
|
+
*
|
|
697
|
+
* Used by the GanttExpandableDirective.
|
|
698
|
+
*/
|
|
699
|
+
expandStateChange = new EventEmitter();
|
|
700
|
+
/**
|
|
701
|
+
* @hidden
|
|
702
|
+
*/
|
|
703
|
+
showEditingDialog = false;
|
|
704
|
+
/**
|
|
705
|
+
* @hidden
|
|
706
|
+
*/
|
|
707
|
+
showConfirmationDialog = false;
|
|
725
708
|
/**
|
|
726
709
|
* @hidden
|
|
727
710
|
*/
|
|
728
711
|
get isInEditMode() {
|
|
729
712
|
return this.showEditingDialog || this.showConfirmationDialog || this.treeList.isEditing();
|
|
730
713
|
}
|
|
714
|
+
/**
|
|
715
|
+
* @hidden
|
|
716
|
+
*/
|
|
717
|
+
showLicenseWatermark = false;
|
|
718
|
+
_columns = new QueryList();
|
|
719
|
+
_data = [];
|
|
720
|
+
_dragScrollSettings = { ...DEFAULT_DRAG_SCROLL_SETTINGS };
|
|
721
|
+
_timelinePaneOptions = { ...DEFAULT_TIMELINE_PANE_SETTINGS };
|
|
722
|
+
_treeListPaneOptions = { ...DEFAULT_TREELIST_PANE_SETTINGS };
|
|
723
|
+
_customToolbarTemplate;
|
|
724
|
+
_rowClass = rowClassCallback;
|
|
725
|
+
_taskClass = taskClassCallback;
|
|
726
|
+
_activeView = DEFAULT_VIEW;
|
|
727
|
+
_toolbarSettings = {
|
|
728
|
+
position: 'top',
|
|
729
|
+
addTaskTool: 'none',
|
|
730
|
+
viewSelectorTool: 'top'
|
|
731
|
+
};
|
|
732
|
+
_fetchChildren = fetchChildren;
|
|
733
|
+
_hasChildren = hasChildren;
|
|
734
|
+
lastTreeListCellClick;
|
|
735
|
+
direction;
|
|
736
|
+
rtl = false;
|
|
737
|
+
editItem;
|
|
738
|
+
optionChangesSubscriptions = new Subscription();
|
|
739
|
+
editServiceSubscription = new Subscription();
|
|
740
|
+
localizationSubscription;
|
|
741
|
+
keydownListenerDisposers;
|
|
742
|
+
constructor(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService, editService, localizationService, hostElement, zone, navigation, currentTimeMarkerService) {
|
|
743
|
+
this.timelineViewService = timelineViewService;
|
|
744
|
+
this.scrollSyncService = scrollSyncService;
|
|
745
|
+
this.renderer = renderer;
|
|
746
|
+
this.mapper = mapper;
|
|
747
|
+
this.optionChangesService = optionChangesService;
|
|
748
|
+
this.dependencyDomService = dependencyDomService;
|
|
749
|
+
this.editService = editService;
|
|
750
|
+
this.localizationService = localizationService;
|
|
751
|
+
this.hostElement = hostElement;
|
|
752
|
+
this.zone = zone;
|
|
753
|
+
this.navigation = navigation;
|
|
754
|
+
this.currentTimeMarkerService = currentTimeMarkerService;
|
|
755
|
+
const isValid = validatePackage(packageMetadata);
|
|
756
|
+
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
|
757
|
+
this.optionChangesSubscriptions.add(this.optionChangesService.viewChanges.subscribe(() => {
|
|
758
|
+
this.loadTimelineData();
|
|
759
|
+
}));
|
|
760
|
+
this.optionChangesSubscriptions.add(this.optionChangesService.dateFormatChanges.subscribe(() => {
|
|
761
|
+
this.loadTimelineData();
|
|
762
|
+
}));
|
|
763
|
+
this.optionChangesSubscriptions.add(this.optionChangesService.columnChanges.subscribe(() => {
|
|
764
|
+
this.treeList.columns.notifyOnChanges();
|
|
765
|
+
}));
|
|
766
|
+
this.editService.getSelectedItem = this.getFirstSelectedItem.bind(this);
|
|
767
|
+
this.editServiceSubscription.add(this.editService.showEditingDialog.subscribe(show => this.showEditingDialog = show));
|
|
768
|
+
this.editServiceSubscription.add(this.editService.taskDelete.subscribe(task => {
|
|
769
|
+
if (hasObservers(this.taskDelete)) {
|
|
770
|
+
this.zone.run(() => this.notifyTaskDelete(task));
|
|
771
|
+
}
|
|
772
|
+
}));
|
|
773
|
+
this.editServiceSubscription.add(this.editService.editEvent.subscribe(args => {
|
|
774
|
+
this[args.editResultType].emit({
|
|
775
|
+
taskFormGroup: args.taskFormGroup,
|
|
776
|
+
item: getEditItem(args.dataItem, this.treeList.view.data, this.mapper),
|
|
777
|
+
dependencies: args.dependencies,
|
|
778
|
+
sender: this
|
|
779
|
+
});
|
|
780
|
+
this.showConfirmationDialog = this.showEditingDialog = false;
|
|
781
|
+
this.editService.dataItem = this.editService.taskFormGroup = null;
|
|
782
|
+
this.updateView();
|
|
783
|
+
if (this.navigable) {
|
|
784
|
+
this.focus();
|
|
785
|
+
}
|
|
786
|
+
}));
|
|
787
|
+
this.editServiceSubscription.add(this.editService.addEvent.subscribe(args => {
|
|
788
|
+
const selectedItem = this.getFirstSelectedItem();
|
|
789
|
+
this.taskAdd.emit({
|
|
790
|
+
actionType: args.actionType,
|
|
791
|
+
selectedItem: selectedItem ? getEditItem(selectedItem, this.treeList.view.data, this.mapper) : null
|
|
792
|
+
});
|
|
793
|
+
this.updateView();
|
|
794
|
+
}));
|
|
795
|
+
this.localizationSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
796
|
+
this.rtl = rtl;
|
|
797
|
+
this.direction = this.rtl ? 'rtl' : 'ltr';
|
|
798
|
+
this.currentTimeMarkerService.rtl = rtl;
|
|
799
|
+
});
|
|
800
|
+
}
|
|
731
801
|
ngOnChanges(changes) {
|
|
732
802
|
if (anyChanged(['data', 'activeView', 'workWeekStart', 'workWeekEnd', 'workDayStart', 'workDayEnd'], changes)) {
|
|
733
803
|
this.loadTimelineData();
|
|
@@ -1325,37 +1395,36 @@ export class GanttComponent {
|
|
|
1325
1395
|
}
|
|
1326
1396
|
}
|
|
1327
1397
|
}
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
], queries: [{ propertyName: "taskContentTemplate", first: true, predicate: GanttTaskContentTemplateDirective, descendants: true }, { propertyName: "taskTemplate", first: true, predicate: GanttTaskTemplateDirective, descendants: true }, { propertyName: "summaryTaskTemplate", first: true, predicate: GanttSummaryTaskTemplateDirective, descendants: true }, { propertyName: "toolbarTemplateChildren", predicate: ToolbarTemplateDirective }, { propertyName: "columns", predicate: GanttColumnBase }, { propertyName: "views", predicate: ViewBase }], viewQueries: [{ propertyName: "treeList", first: true, predicate: TreeListComponent, descendants: true, static: true }, { propertyName: "timeline", first: true, predicate: GanttTimelineComponent, descendants: true }], exportAs: ["kendoGantt"], usesOnChanges: true, ngImport: i0, template: `
|
|
1398
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttComponent, deps: [{ token: i1.TimelineViewService }, { token: i2.ScrollSyncService }, { token: i0.Renderer2 }, { token: i3.MappingService }, { token: i4.OptionChangesService }, { token: i5.DependencyDomService }, { token: i6.EditService }, { token: i7.LocalizationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i8.NavigationService }, { token: i9.CurrentTimeMarkerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1399
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GanttComponent, isStandalone: true, selector: "kendo-gantt", inputs: { roleDescription: ["aria-roledescription", "roleDescription"], role: "role", taskModelFields: "taskModelFields", dependencyModelFields: "dependencyModelFields", activeView: "activeView", data: "data", isSelected: "isSelected", validateNewDependency: "validateNewDependency", selectable: "selectable", toolbarSettings: "toolbarSettings", toolbarAriaLabel: "toolbarAriaLabel", fetchChildren: "fetchChildren", hasChildren: "hasChildren", dependencies: "dependencies", sortable: "sortable", sort: "sort", filterable: "filterable", filter: "filter", workDayStart: "workDayStart", workDayEnd: "workDayEnd", workWeekStart: "workWeekStart", workWeekEnd: "workWeekEnd", navigable: "navigable", timelinePaneOptions: "timelinePaneOptions", treeListPaneOptions: "treeListPaneOptions", taskClass: "taskClass", rowClass: "rowClass", isExpanded: "isExpanded", columnsAutoSize: "columnsAutoSize", currentTimeMarker: "currentTimeMarker", columnMenu: "columnMenu", columnsReorderable: "columnsReorderable", columnsResizable: "columnsResizable", dragScrollSettings: "dragScrollSettings" }, outputs: { selectionChange: "selectionChange", rowExpand: "rowExpand", taskDblClick: "taskDblClick", cellDblClick: "cellDblClick", cellClose: "cellClose", taskDelete: "taskDelete", rowCollapse: "rowCollapse", remove: "remove", cancel: "cancel", save: "save", taskAdd: "taskAdd", dependencyAdd: "dependencyAdd", sortChange: "sortChange", filterChange: "filterChange", dataStateChange: "dataStateChange", treeListPaneCollapsedChange: "treeListPaneCollapsedChange", timelinePaneCollapsedChange: "timelinePaneCollapsedChange", timelinePaneSizeChange: "timelinePaneSizeChange", activeViewChange: "activeViewChange", columnResize: "columnResize", columnReorder: "columnReorder", columnVisibilityChange: "columnVisibilityChange", columnLockedChange: "columnLockedChange", cellClick: "cellClick", taskClick: "taskClick" }, host: { properties: { "attr.aria-roledescription": "this.hostRoleDescriptionAttr", "attr.role": "this.hostRoleAttr", "class.k-gantt": "this.hostClasses", "attr.dir": "this.dir" } }, providers: [
|
|
1400
|
+
GanttLocalizationService,
|
|
1401
|
+
LocalizationService,
|
|
1402
|
+
{
|
|
1403
|
+
provide: L10N_PREFIX,
|
|
1404
|
+
useValue: 'kendo.gantt'
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
provide: DataBoundTreeComponent,
|
|
1408
|
+
useExisting: forwardRef(() => GanttComponent)
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
provide: ExpandableTreeComponent,
|
|
1412
|
+
useExisting: forwardRef(() => GanttComponent)
|
|
1413
|
+
},
|
|
1414
|
+
TimelineViewService,
|
|
1415
|
+
TimelineDayViewService,
|
|
1416
|
+
TimelineWeekViewService,
|
|
1417
|
+
TimelineMonthViewService,
|
|
1418
|
+
TimeLineYearViewService,
|
|
1419
|
+
ScrollSyncService,
|
|
1420
|
+
DependencyDomService,
|
|
1421
|
+
MappingService,
|
|
1422
|
+
OptionChangesService,
|
|
1423
|
+
EditService,
|
|
1424
|
+
TimelineScrollService,
|
|
1425
|
+
NavigationService,
|
|
1426
|
+
CurrentTimeMarkerService
|
|
1427
|
+
], queries: [{ propertyName: "taskContentTemplate", first: true, predicate: GanttTaskContentTemplateDirective, descendants: true }, { propertyName: "taskTemplate", first: true, predicate: GanttTaskTemplateDirective, descendants: true }, { propertyName: "summaryTaskTemplate", first: true, predicate: GanttSummaryTaskTemplateDirective, descendants: true }, { propertyName: "toolbarTemplateChildren", predicate: ToolbarTemplateDirective }, { propertyName: "columns", predicate: GanttColumnBase }, { propertyName: "views", predicate: ViewBase }], viewQueries: [{ propertyName: "treeList", first: true, predicate: TreeListComponent, descendants: true, static: true }, { propertyName: "timeline", first: true, predicate: GanttTimelineComponent, descendants: true }], exportAs: ["kendoGantt"], usesOnChanges: true, ngImport: i0, template: `
|
|
1359
1428
|
<ng-container kendoGanttLocalizedMessages
|
|
1360
1429
|
i18n-taskEditingGeneralTabTitle="kendo.gantt.taskEditingGeneralTabTitle|The title of the 'General' tab of the editing dialog TabStrip"
|
|
1361
1430
|
taskEditingGeneralTabTitle="General"
|
|
@@ -1727,8 +1796,9 @@ GanttComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version
|
|
|
1727
1796
|
</kendo-dialog>
|
|
1728
1797
|
|
|
1729
1798
|
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
1730
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoGanttLocalizedMessages]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ToolbarComponent, selector: "kendo-gantt-toolbar", inputs: ["showAddTask", "showViewSelector", "views", "activeView", "toolbarTemplate", "navigable", "position"], outputs: ["activeViewChange"] }, { kind: "component", type: SplitterComponent, selector: "kendo-splitter", inputs: ["orientation", "splitbarWidth", "resizeStep"], outputs: ["layoutChange"], exportAs: ["kendoSplitter"] }, { kind: "component", type: SplitterPaneComponent, selector: "kendo-splitter-pane", inputs: ["order", "size", "
|
|
1731
|
-
|
|
1799
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoGanttLocalizedMessages]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ToolbarComponent, selector: "kendo-gantt-toolbar", inputs: ["showAddTask", "showViewSelector", "views", "activeView", "toolbarTemplate", "navigable", "position"], outputs: ["activeViewChange"] }, { kind: "component", type: SplitterComponent, selector: "kendo-splitter", inputs: ["orientation", "splitbarWidth", "resizeStep", "splitterBarClass"], outputs: ["layoutChange"], exportAs: ["kendoSplitter"] }, { kind: "component", type: SplitterPaneComponent, selector: "kendo-splitter-pane", inputs: ["order", "size", "splitterBarAttributes", "splitterBarClass", "min", "max", "resizable", "collapsible", "scrollable", "collapsed", "orientation", "containsSplitter", "overlayContent"], outputs: ["sizeChange", "collapsedChange"], exportAs: ["kendoSplitterPane"] }, { kind: "component", type: TreeListComponent, selector: "kendo-treelist", inputs: ["aria-label", "data", "pageSize", "height", "rowHeight", "skip", "scrollable", "sort", "trackBy", "filter", "virtualColumns", "filterable", "sortable", "pageable", "navigable", "navigatable", "autoSize", "rowClass", "resizable", "reorderable", "loading", "columnMenu", "hideHeader", "idField", "selectable", "isSelected", "rowReorderable", "columns", "fetchChildren", "hasChildren", "isExpanded"], outputs: ["selectionChange", "filterChange", "pageChange", "sortChange", "dataStateChange", "edit", "cancel", "save", "remove", "add", "cellClose", "cellClick", "pdfExport", "excelExport", "columnResize", "columnReorder", "columnVisibilityChange", "columnLockedChange", "scrollBottom", "contentScroll", "expand", "collapse", "expandStateChange", "rowReorder"], exportAs: ["kendoTreeList"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: CustomMessagesComponent, selector: "kendo-treelist-messages" }, { kind: "component", type: GanttTimelineComponent, selector: "kendo-gantt-timeline", inputs: ["rows", "slots", "groupSlots", "tableWidth", "activeView", "taskContentTemplate", "taskTemplate", "summaryTaskTemplate", "taskClass", "renderDependencyDragClues", "dragScrollSettings", "currentTimeMarker", "selectable", "isTaskSelected", "isExpanded", "dependencies"], outputs: ["timelineContainerPress", "timelineContainerDrag", "timelineContainerRelease"] }, { kind: "component", type: EditDialogComponent, selector: "kendo-gantt-edit-dialog", inputs: ["data"] }, { kind: "component", type: DialogComponent, selector: "kendo-dialog", inputs: ["actions", "actionsLayout", "autoFocusedElement", "title", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "animation", "themeColor"], outputs: ["action", "close"], exportAs: ["kendoDialog"] }, { kind: "component", type: DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }, { kind: "component", type: TreeListSpacerComponent, selector: "kendo-treelist-spacer, kendo-treelist-pager-spacer", inputs: ["width"] }, { 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"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }] });
|
|
1800
|
+
}
|
|
1801
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttComponent, decorators: [{
|
|
1732
1802
|
type: Component,
|
|
1733
1803
|
args: [{
|
|
1734
1804
|
selector: 'kendo-gantt',
|