@progress/kendo-angular-gantt 0.1.2 → 0.1.4-dev.202109301203

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.
@@ -6,6 +6,7 @@ export { GanttComponent } from './gantt.component';
6
6
  export { GanttModule } from './gantt.module';
7
7
  export { GanttHierarchyBindingDirective } from './binding-directives/hierarchy-binding.directive';
8
8
  export { GanttFlatBindingDirective } from './binding-directives/flat-binding.directive';
9
+ export { GanttExpandableDirective } from './expanded-state/expandable.directive';
9
10
  export { GanttTaskTemplateDirective } from './template-directives/task-template.directive';
10
11
  export { GanttTaskContentTemplateDirective } from './template-directives/task-content-template.directive';
11
12
  export { GanttSummaryTaskTemplateDirective } from './template-directives/summary-task-template.directive';
@@ -6,6 +6,7 @@ export { GanttComponent } from './gantt.component';
6
6
  export { GanttModule } from './gantt.module';
7
7
  export { GanttHierarchyBindingDirective } from './binding-directives/hierarchy-binding.directive';
8
8
  export { GanttFlatBindingDirective } from './binding-directives/flat-binding.directive';
9
+ export { GanttExpandableDirective } from './expanded-state/expandable.directive';
9
10
  export { GanttTaskTemplateDirective } from './template-directives/task-template.directive';
10
11
  export { GanttTaskContentTemplateDirective } from './template-directives/task-content-template.directive';
11
12
  export { GanttSummaryTaskTemplateDirective } from './template-directives/summary-task-template.directive';
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-gantt',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1631631418,
12
+ publishDate: 1633003166,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
@@ -9,6 +9,7 @@ import { filter, map, switchMap, take } from 'rxjs/operators';
9
9
  import { ScrollSyncService } from '../scrolling/scroll-sync.service';
10
10
  import { DependencyDomService } from '../dependencies/dependency-dom.service';
11
11
  import { isPresent } from '../utils';
12
+ import { isDocumentAvailable } from '@progress/kendo-angular-common';
12
13
  /**
13
14
  * @hidden
14
15
  */
@@ -27,7 +28,7 @@ let GanttTimelineComponent = class GanttTimelineComponent {
27
28
  .pipe(filter(args => isPresent(args.timelineRow)), switchMap(args => this.zone.onStable.pipe(take(1), map(() => args))) // ensure the content is rendered
28
29
  )
29
30
  .subscribe(({ timelineRow }) => {
30
- const timelineRowHeight = timelineRow.getBoundingClientRect().height;
31
+ const timelineRowHeight = isDocumentAvailable() ? timelineRow.getBoundingClientRect().height : 0;
31
32
  this.renderer.setStyle(this.timelineColumns.nativeElement, 'height', `${(this.rows || []).length * timelineRowHeight}px`);
32
33
  }));
33
34
  }
@@ -2,6 +2,7 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
+ import { isDocumentAvailable } from '@progress/kendo-angular-common';
5
6
  import { addDays, addWeeks, cloneDate, firstDayInWeek } from '@progress/kendo-date-math';
6
7
  /**
7
8
  * @hidden
@@ -80,6 +81,9 @@ let SCROLLBAR_WIDTH;
80
81
  * Gets the default scrollbar width accoring to the current environment.
81
82
  */
82
83
  export const scrollbarWidth = () => {
84
+ if (!isDocumentAvailable()) {
85
+ return;
86
+ }
83
87
  // calculate scrollbar width only once, then return the cached value
84
88
  if (isNaN(SCROLLBAR_WIDTH)) {
85
89
  const div = document.createElement('div');
@@ -7,7 +7,7 @@ import { Input, EventEmitter, Injectable, Directive, Optional, TemplateRef, Quer
7
7
  import { ColumnBase, ColumnComponent, ColumnGroupComponent, SpanColumnComponent, TreeListComponent, DataBoundTreeComponent, ExpandableTreeComponent, FlatBindingDirective, HierarchyBindingDirective, ExpandableDirective, TreeListModule } from '@progress/kendo-angular-treelist';
8
8
  import { of, Subject, Subscription, fromEvent } from 'rxjs';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
- import { anyChanged } from '@progress/kendo-angular-common';
10
+ import { isDocumentAvailable, anyChanged } from '@progress/kendo-angular-common';
11
11
  import { IntlService } from '@progress/kendo-angular-intl';
12
12
  import { orderBy } from '@progress/kendo-data-query';
13
13
  import { cloneDate, addWeeks, firstDayInWeek, addDays, getDate, lastDayOfMonth, firstDayOfMonth, addMonths, isEqualDate, MS_PER_HOUR, MS_PER_DAY } from '@progress/kendo-date-math';
@@ -24,7 +24,7 @@ const packageMetadata = {
24
24
  name: '@progress/kendo-angular-gantt',
25
25
  productName: 'Kendo UI for Angular',
26
26
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
27
- publishDate: 1631631418,
27
+ publishDate: 1633003166,
28
28
  version: '',
29
29
  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'
30
30
  };
@@ -659,6 +659,9 @@ let SCROLLBAR_WIDTH;
659
659
  * Gets the default scrollbar width accoring to the current environment.
660
660
  */
661
661
  const scrollbarWidth = () => {
662
+ if (!isDocumentAvailable()) {
663
+ return;
664
+ }
662
665
  // calculate scrollbar width only once, then return the cached value
663
666
  if (isNaN(SCROLLBAR_WIDTH)) {
664
667
  const div = document.createElement('div');
@@ -2320,7 +2323,7 @@ let GanttTimelineComponent = class GanttTimelineComponent {
2320
2323
  .pipe(filter(args => isPresent(args.timelineRow)), switchMap(args => this.zone.onStable.pipe(take(1), map(() => args))) // ensure the content is rendered
2321
2324
  )
2322
2325
  .subscribe(({ timelineRow }) => {
2323
- const timelineRowHeight = timelineRow.getBoundingClientRect().height;
2326
+ const timelineRowHeight = isDocumentAvailable() ? timelineRow.getBoundingClientRect().height : 0;
2324
2327
  this.renderer.setStyle(this.timelineColumns.nativeElement, 'height', `${(this.rows || []).length * timelineRowHeight}px`);
2325
2328
  }));
2326
2329
  }
@@ -3283,7 +3286,7 @@ let GanttDependencyDirective = class GanttDependencyDirective {
3283
3286
  }
3284
3287
  const fromCoordinates = getElementRect(tasks.get(this.mapper.extractFromDependency(this.dependency, 'fromId')), contentContainer);
3285
3288
  const toCoordinates = getElementRect(tasks.get(this.mapper.extractFromDependency(this.dependency, 'toId')), contentContainer);
3286
- const timelineRowHeight = timelineRow.getBoundingClientRect().height;
3289
+ const timelineRowHeight = isDocumentAvailable() ? timelineRow.getBoundingClientRect().height : 0;
3287
3290
  const points = dependencyCoordinates(fromCoordinates, toCoordinates, timelineRowHeight, this.dependency.type, MIN_DISTANCE_BEFORE_TURN, ARROW_SIZE);
3288
3291
  this.drawPoints(points);
3289
3292
  }
@@ -3440,4 +3443,4 @@ GanttModule = __decorate([
3440
3443
  * Generated bundle index. Do not edit.
3441
3444
  */
3442
3445
 
3443
- export { MappingService, OptionChangesService, DependencyDomService, GanttDependencyDirective, GanttExpandableDirective, GanttHeaderTableBodyComponent, GanttMilestoneTaskComponent, GanttSummaryTaskComponent, GanttTaskBase, GanttTaskComponent, GanttTasksTableBodyComponent, ScrollSyncService, GanttTimelineComponent, TimelineBaseViewService, TimelineDayViewComponent, TimelineDayViewService, TimelineMonthViewComponent, TimelineMonthViewService, TimelineViewService, TimelineWeekViewComponent, TimelineWeekViewService, ViewBase, ToolbarComponent, ViewSelectorComponent, GanttComponent, GanttModule, GanttHierarchyBindingDirective, GanttFlatBindingDirective, GanttTaskTemplateDirective, GanttTaskContentTemplateDirective, GanttSummaryTaskTemplateDirective, ToolbarTemplateDirective, GanttColumnBase, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, CellTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, ColumnMenuTemplateDirective, FilterCellTemplateDirective, FilterMenuTemplateDirective };
3446
+ export { MappingService, OptionChangesService, DependencyDomService, GanttDependencyDirective, 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, GanttColumnBase, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, CellTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, ColumnMenuTemplateDirective, FilterCellTemplateDirective, FilterMenuTemplateDirective };
@@ -7,7 +7,7 @@ import { Input, Injectable, EventEmitter, Directive, Optional, TemplateRef, Quer
7
7
  import { ColumnBase, ColumnComponent, ColumnGroupComponent, SpanColumnComponent, TreeListComponent, DataBoundTreeComponent, ExpandableTreeComponent, FlatBindingDirective, HierarchyBindingDirective, ExpandableDirective, TreeListModule } from '@progress/kendo-angular-treelist';
8
8
  import { of, fromEvent, Subject, Subscription } from 'rxjs';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
- import { anyChanged } from '@progress/kendo-angular-common';
10
+ import { isDocumentAvailable, anyChanged } from '@progress/kendo-angular-common';
11
11
  import { IntlService } from '@progress/kendo-angular-intl';
12
12
  import { orderBy } from '@progress/kendo-data-query';
13
13
  import { cloneDate, addWeeks, firstDayInWeek, addDays, getDate, lastDayOfMonth, firstDayOfMonth, addMonths, isEqualDate, MS_PER_HOUR, MS_PER_DAY } from '@progress/kendo-date-math';
@@ -24,7 +24,7 @@ var packageMetadata = {
24
24
  name: '@progress/kendo-angular-gantt',
25
25
  productName: 'Kendo UI for Angular',
26
26
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
27
- publishDate: 1631631418,
27
+ publishDate: 1633003166,
28
28
  version: '',
29
29
  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'
30
30
  };
@@ -681,6 +681,9 @@ var SCROLLBAR_WIDTH;
681
681
  * Gets the default scrollbar width accoring to the current environment.
682
682
  */
683
683
  var scrollbarWidth = function () {
684
+ if (!isDocumentAvailable()) {
685
+ return;
686
+ }
684
687
  // calculate scrollbar width only once, then return the cached value
685
688
  if (isNaN(SCROLLBAR_WIDTH)) {
686
689
  var div = document.createElement('div');
@@ -2386,7 +2389,7 @@ var GanttTimelineComponent = /** @class */ (function () {
2386
2389
  )
2387
2390
  .subscribe(function (_a) {
2388
2391
  var timelineRow = _a.timelineRow;
2389
- var timelineRowHeight = timelineRow.getBoundingClientRect().height;
2392
+ var timelineRowHeight = isDocumentAvailable() ? timelineRow.getBoundingClientRect().height : 0;
2390
2393
  _this.renderer.setStyle(_this.timelineColumns.nativeElement, 'height', (_this.rows || []).length * timelineRowHeight + "px");
2391
2394
  }));
2392
2395
  }
@@ -3188,7 +3191,7 @@ var GanttDependencyDirective = /** @class */ (function () {
3188
3191
  }
3189
3192
  var fromCoordinates = getElementRect(tasks.get(this.mapper.extractFromDependency(this.dependency, 'fromId')), contentContainer);
3190
3193
  var toCoordinates = getElementRect(tasks.get(this.mapper.extractFromDependency(this.dependency, 'toId')), contentContainer);
3191
- var timelineRowHeight = timelineRow.getBoundingClientRect().height;
3194
+ var timelineRowHeight = isDocumentAvailable() ? timelineRow.getBoundingClientRect().height : 0;
3192
3195
  var points = dependencyCoordinates(fromCoordinates, toCoordinates, timelineRowHeight, this.dependency.type, MIN_DISTANCE_BEFORE_TURN, ARROW_SIZE);
3193
3196
  this.drawPoints(points);
3194
3197
  };
@@ -3364,4 +3367,4 @@ var GanttModule = /** @class */ (function () {
3364
3367
  * Generated bundle index. Do not edit.
3365
3368
  */
3366
3369
 
3367
- export { MappingService, OptionChangesService, DependencyDomService, GanttDependencyDirective, GanttExpandableDirective, GanttHeaderTableBodyComponent, GanttMilestoneTaskComponent, GanttSummaryTaskComponent, GanttTaskBase, GanttTaskComponent, GanttTasksTableBodyComponent, ScrollSyncService, GanttTimelineComponent, TimelineBaseViewService, TimelineDayViewComponent, TimelineDayViewService, TimelineMonthViewComponent, TimelineMonthViewService, TimelineViewService, TimelineWeekViewComponent, TimelineWeekViewService, ViewBase, ToolbarComponent, ViewSelectorComponent, GanttComponent, GanttModule, GanttHierarchyBindingDirective, GanttFlatBindingDirective, GanttTaskTemplateDirective, GanttTaskContentTemplateDirective, GanttSummaryTaskTemplateDirective, ToolbarTemplateDirective, GanttColumnBase, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, CellTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, ColumnMenuTemplateDirective, FilterCellTemplateDirective, FilterMenuTemplateDirective };
3370
+ export { MappingService, OptionChangesService, DependencyDomService, GanttDependencyDirective, 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, GanttColumnBase, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, CellTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, ColumnMenuTemplateDirective, FilterCellTemplateDirective, FilterMenuTemplateDirective };
@@ -12,6 +12,7 @@ var mapping_service_1 = require("../common/mapping.service");
12
12
  var dependency_dom_service_1 = require("./dependency-dom.service");
13
13
  var utils_1 = require("../utils");
14
14
  var utils_2 = require("./utils");
15
+ var kendo_angular_common_1 = require("@progress/kendo-angular-common");
15
16
  /**
16
17
  * Defines the size of the arrow that will be drawn at the end of each Gantt dependency.
17
18
  */
@@ -58,7 +59,7 @@ var GanttDependencyDirective = /** @class */ (function () {
58
59
  }
59
60
  var fromCoordinates = utils_2.getElementRect(tasks.get(this.mapper.extractFromDependency(this.dependency, 'fromId')), contentContainer);
60
61
  var toCoordinates = utils_2.getElementRect(tasks.get(this.mapper.extractFromDependency(this.dependency, 'toId')), contentContainer);
61
- var timelineRowHeight = timelineRow.getBoundingClientRect().height;
62
+ var timelineRowHeight = kendo_angular_common_1.isDocumentAvailable() ? timelineRow.getBoundingClientRect().height : 0;
62
63
  var points = utils_2.dependencyCoordinates(fromCoordinates, toCoordinates, timelineRowHeight, this.dependency.type, MIN_DISTANCE_BEFORE_TURN, ARROW_SIZE);
63
64
  this.drawPoints(points);
64
65
  };
package/dist/npm/index.js CHANGED
@@ -17,8 +17,6 @@ var dependency_dom_service_1 = require("./dependencies/dependency-dom.service");
17
17
  exports.DependencyDomService = dependency_dom_service_1.DependencyDomService
18
18
  var gantt_dependency_directive_1 = require("./dependencies/gantt-dependency.directive");
19
19
  exports.GanttDependencyDirective = gantt_dependency_directive_1.GanttDependencyDirective
20
- var expandable_directive_1 = require("./expanded-state/expandable.directive");
21
- exports.GanttExpandableDirective = expandable_directive_1.GanttExpandableDirective
22
20
  var gantt_header_table_body_component_1 = require("./rendering/gantt-header-table-body.component");
23
21
  exports.GanttHeaderTableBodyComponent = gantt_header_table_body_component_1.GanttHeaderTableBodyComponent
24
22
  var gantt_milestone_task_component_1 = require("./rendering/gantt-milestone-task.component");
package/dist/npm/main.js CHANGED
@@ -13,6 +13,8 @@ var hierarchy_binding_directive_1 = require("./binding-directives/hierarchy-bind
13
13
  exports.GanttHierarchyBindingDirective = hierarchy_binding_directive_1.GanttHierarchyBindingDirective;
14
14
  var flat_binding_directive_1 = require("./binding-directives/flat-binding.directive");
15
15
  exports.GanttFlatBindingDirective = flat_binding_directive_1.GanttFlatBindingDirective;
16
+ var expandable_directive_1 = require("./expanded-state/expandable.directive");
17
+ exports.GanttExpandableDirective = expandable_directive_1.GanttExpandableDirective;
16
18
  var task_template_directive_1 = require("./template-directives/task-template.directive");
17
19
  exports.GanttTaskTemplateDirective = task_template_directive_1.GanttTaskTemplateDirective;
18
20
  var task_content_template_directive_1 = require("./template-directives/task-content-template.directive");
@@ -11,7 +11,7 @@ exports.packageMetadata = {
11
11
  name: '@progress/kendo-angular-gantt',
12
12
  productName: 'Kendo UI for Angular',
13
13
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
14
- publishDate: 1631631418,
14
+ publishDate: 1633003166,
15
15
  version: '',
16
16
  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'
17
17
  };
@@ -11,6 +11,7 @@ var operators_1 = require("rxjs/operators");
11
11
  var scroll_sync_service_1 = require("../scrolling/scroll-sync.service");
12
12
  var dependency_dom_service_1 = require("../dependencies/dependency-dom.service");
13
13
  var utils_1 = require("../utils");
14
+ var kendo_angular_common_1 = require("@progress/kendo-angular-common");
14
15
  /**
15
16
  * @hidden
16
17
  */
@@ -31,7 +32,7 @@ var GanttTimelineComponent = /** @class */ (function () {
31
32
  )
32
33
  .subscribe(function (_a) {
33
34
  var timelineRow = _a.timelineRow;
34
- var timelineRowHeight = timelineRow.getBoundingClientRect().height;
35
+ var timelineRowHeight = kendo_angular_common_1.isDocumentAvailable() ? timelineRow.getBoundingClientRect().height : 0;
35
36
  _this.renderer.setStyle(_this.timelineColumns.nativeElement, 'height', (_this.rows || []).length * timelineRowHeight + "px");
36
37
  }));
37
38
  }
package/dist/npm/utils.js CHANGED
@@ -4,6 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ var kendo_angular_common_1 = require("@progress/kendo-angular-common");
7
8
  var kendo_date_math_1 = require("@progress/kendo-date-math");
8
9
  /**
9
10
  * @hidden
@@ -85,6 +86,9 @@ var SCROLLBAR_WIDTH;
85
86
  * Gets the default scrollbar width accoring to the current environment.
86
87
  */
87
88
  exports.scrollbarWidth = function () {
89
+ if (!kendo_angular_common_1.isDocumentAvailable()) {
90
+ return;
91
+ }
88
92
  // calculate scrollbar width only once, then return the cached value
89
93
  if (isNaN(SCROLLBAR_WIDTH)) {
90
94
  var div = document.createElement('div');