@seniorsistemas/angular-components 17.1.4 → 17.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +117 -70
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/gantt/components/gantt/gantt.d.ts +1 -3
  6. package/components/gantt/components/side-table/side-table.component.d.ts +4 -1
  7. package/components/gantt/gantt.component.d.ts +1 -0
  8. package/components/gantt/models/view-mode.d.ts +1 -0
  9. package/esm2015/components/gantt/components/gantt/bar.js +2 -2
  10. package/esm2015/components/gantt/components/gantt/gantt.js +92 -64
  11. package/esm2015/components/gantt/components/gantt/utils/date-utils.js +3 -2
  12. package/esm2015/components/gantt/components/side-table/side-table.component.js +7 -1
  13. package/esm2015/components/gantt/gantt.component.js +14 -3
  14. package/esm2015/components/gantt/models/view-mode.js +2 -1
  15. package/esm5/components/gantt/components/gantt/bar.js +2 -2
  16. package/esm5/components/gantt/components/gantt/gantt.js +95 -67
  17. package/esm5/components/gantt/components/gantt/utils/date-utils.js +3 -2
  18. package/esm5/components/gantt/components/side-table/side-table.component.js +7 -1
  19. package/esm5/components/gantt/gantt.component.js +14 -3
  20. package/esm5/components/gantt/models/view-mode.js +2 -1
  21. package/fesm2015/seniorsistemas-angular-components.js +114 -67
  22. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  23. package/fesm5/seniorsistemas-angular-components.js +117 -70
  24. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  25. package/package.json +1 -1
  26. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -8883,11 +8883,12 @@
8883
8883
  .startOf("month")
8884
8884
  .format("MMMM");
8885
8885
  var monthNameCapitalized = monthName.charAt(0).toUpperCase() + monthName.slice(1);
8886
- var dateToFormat = moment$7(date);
8886
+ var dateToFormat = moment$7(date).locale(lang);
8887
8887
  var format_map = {
8888
8888
  YYYY: dateToFormat.format("YYYY"),
8889
8889
  MM: dateToFormat.format("MM"),
8890
8890
  DD: dateToFormat.format("DD"),
8891
+ ddd: dateToFormat.format("ddd").toUpperCase().replace(".", ""),
8891
8892
  HH: dateToFormat.format("HH"),
8892
8893
  mm: dateToFormat.format("mm"),
8893
8894
  ss: dateToFormat.format("ss"),
@@ -9110,6 +9111,7 @@
9110
9111
 
9111
9112
 
9112
9113
  (function (ViewMode) {
9114
+ ViewMode["QuarterHour"] = "quarterHour";
9113
9115
  ViewMode["Hour"] = "hour";
9114
9116
  ViewMode["QuarterDay"] = "quarterDay";
9115
9117
  ViewMode["HalfDay"] = "halfDay";
@@ -9360,7 +9362,7 @@
9360
9362
  Bar.prototype._computeX = function () {
9361
9363
  var _a = this._gantt.options, step = _a.step, columnWidth = _a.columnWidth;
9362
9364
  var x;
9363
- if (this._gantt.view_is([exports.ViewMode.Hour, exports.ViewMode.QuarterDay, exports.ViewMode.HalfDay, exports.ViewMode.Day])) {
9365
+ if (this._gantt.view_is([exports.ViewMode.QuarterHour, exports.ViewMode.Hour, exports.ViewMode.QuarterDay, exports.ViewMode.HalfDay, exports.ViewMode.Day])) {
9364
9366
  var diff = DateUtils.diff(this.task.start, this._gantt.minDate, "minutes");
9365
9367
  x = (diff / step) * (columnWidth / 60);
9366
9368
  }
@@ -9767,7 +9769,11 @@
9767
9769
  Gantt.prototype.update_view_scale = function (view_mode) {
9768
9770
  this.options.viewMode = view_mode;
9769
9771
  // this.isHourView = false;
9770
- if (view_mode === exports.ViewMode.Hour) {
9772
+ if (view_mode === exports.ViewMode.QuarterHour) {
9773
+ this.options.step = 24 / 24 / 4;
9774
+ this.options.columnWidth = 50;
9775
+ }
9776
+ else if (view_mode === exports.ViewMode.Hour) {
9771
9777
  this.options.step = 24 / 24;
9772
9778
  this.options.columnWidth = 50;
9773
9779
  }
@@ -9801,12 +9807,12 @@
9801
9807
  };
9802
9808
  Gantt.prototype.setup_gantt_dates = function () {
9803
9809
  var e_3, _a;
9804
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
9810
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
9805
9811
  this._minDate = null;
9806
9812
  this._maxDate = null;
9807
9813
  try {
9808
- for (var _r = __values(this.tasks), _s = _r.next(); !_s.done; _s = _r.next()) {
9809
- var task = _s.value;
9814
+ for (var _t = __values(this.tasks), _u = _t.next(); !_u.done; _u = _t.next()) {
9815
+ var task = _u.value;
9810
9816
  // set global start and end date
9811
9817
  if (!this.minDate || task.start < this.minDate) {
9812
9818
  this._minDate = DateUtils.startOf(task.start, 'day');
@@ -9819,40 +9825,41 @@
9819
9825
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
9820
9826
  finally {
9821
9827
  try {
9822
- if (_s && !_s.done && (_a = _r.return)) _a.call(_r);
9828
+ if (_u && !_u.done && (_a = _t.return)) _a.call(_t);
9823
9829
  }
9824
9830
  finally { if (e_3) throw e_3.error; }
9825
9831
  }
9826
- this._realMinDate = this.minDate;
9827
- this._realMaxDate = this.maxDate;
9828
9832
  switch (this.options.viewMode) {
9833
+ case exports.ViewMode.QuarterHour:
9834
+ this._minDate = DateUtils.add(this.minDate, -((_b = this.options.marginBeforeStart) !== null && _b !== void 0 ? _b : 15), "minutes");
9835
+ this._maxDate = DateUtils.add(this.maxDate, (_c = this.options.marginAfterEnd) !== null && _c !== void 0 ? _c : 15, "minutes");
9829
9836
  case exports.ViewMode.Hour:
9830
- this._minDate = DateUtils.add(this.minDate, -((_b = this.options.marginBeforeStart) !== null && _b !== void 0 ? _b : 1), "hour");
9831
- this._maxDate = DateUtils.add(this.maxDate, (_c = this.options.marginAfterEnd) !== null && _c !== void 0 ? _c : 1, "hour");
9837
+ this._minDate = DateUtils.add(this.minDate, -((_d = this.options.marginBeforeStart) !== null && _d !== void 0 ? _d : 1), "hour");
9838
+ this._maxDate = DateUtils.add(this.maxDate, (_e = this.options.marginAfterEnd) !== null && _e !== void 0 ? _e : 1, "hour");
9832
9839
  break;
9833
9840
  case exports.ViewMode.QuarterDay:
9834
- this._minDate = DateUtils.add(this.minDate, -((_d = this.options.marginBeforeStart) !== null && _d !== void 0 ? _d : 6), "hour");
9835
- this._maxDate = DateUtils.add(this.maxDate, (_e = this.options.marginAfterEnd) !== null && _e !== void 0 ? _e : 6, "hour");
9841
+ this._minDate = DateUtils.add(this.minDate, -((_f = this.options.marginBeforeStart) !== null && _f !== void 0 ? _f : 6), "hour");
9842
+ this._maxDate = DateUtils.add(this.maxDate, (_g = this.options.marginAfterEnd) !== null && _g !== void 0 ? _g : 6, "hour");
9836
9843
  break;
9837
9844
  case exports.ViewMode.HalfDay:
9838
- this._minDate = DateUtils.add(this.minDate, -((_f = this.options.marginBeforeStart) !== null && _f !== void 0 ? _f : 12), "hour");
9839
- this._maxDate = DateUtils.add(this.maxDate, (_g = this.options.marginAfterEnd) !== null && _g !== void 0 ? _g : 12, "hour");
9845
+ this._minDate = DateUtils.add(this.minDate, -((_h = this.options.marginBeforeStart) !== null && _h !== void 0 ? _h : 12), "hour");
9846
+ this._maxDate = DateUtils.add(this.maxDate, (_j = this.options.marginAfterEnd) !== null && _j !== void 0 ? _j : 12, "hour");
9840
9847
  break;
9841
9848
  case exports.ViewMode.Day:
9842
- this._minDate = DateUtils.add(this.minDate, -((_h = this.options.marginBeforeStart) !== null && _h !== void 0 ? _h : 1), "day");
9843
- this._maxDate = DateUtils.add(this.maxDate, (_j = this.options.marginAfterEnd) !== null && _j !== void 0 ? _j : 1, "day");
9849
+ this._minDate = DateUtils.add(this.minDate, -((_k = this.options.marginBeforeStart) !== null && _k !== void 0 ? _k : 1), "day");
9850
+ this._maxDate = DateUtils.add(this.maxDate, (_l = this.options.marginAfterEnd) !== null && _l !== void 0 ? _l : 1, "day");
9844
9851
  break;
9845
9852
  case exports.ViewMode.Week:
9846
- this._minDate = DateUtils.add(this.minDate, -((_k = this.options.marginBeforeStart) !== null && _k !== void 0 ? _k : 1), "week");
9847
- this._maxDate = DateUtils.add(this.maxDate, (_l = this.options.marginAfterEnd) !== null && _l !== void 0 ? _l : 1, "week");
9853
+ this._minDate = DateUtils.add(this.minDate, -((_m = this.options.marginBeforeStart) !== null && _m !== void 0 ? _m : 1), "week");
9854
+ this._maxDate = DateUtils.add(this.maxDate, (_o = this.options.marginAfterEnd) !== null && _o !== void 0 ? _o : 1, "week");
9848
9855
  break;
9849
9856
  case exports.ViewMode.Month:
9850
- this._minDate = DateUtils.add(this.minDate, -((_m = this.options.marginBeforeStart) !== null && _m !== void 0 ? _m : 1), "month");
9851
- this._maxDate = DateUtils.add(this.maxDate, (_o = this.options.marginAfterEnd) !== null && _o !== void 0 ? _o : 1, "month");
9857
+ this._minDate = DateUtils.add(this.minDate, -((_p = this.options.marginBeforeStart) !== null && _p !== void 0 ? _p : 1), "month");
9858
+ this._maxDate = DateUtils.add(this.maxDate, (_q = this.options.marginAfterEnd) !== null && _q !== void 0 ? _q : 1, "month");
9852
9859
  break;
9853
9860
  case exports.ViewMode.Year:
9854
- this._minDate = DateUtils.add(this.minDate, -((_p = this.options.marginBeforeStart) !== null && _p !== void 0 ? _p : 1), "year");
9855
- this._maxDate = DateUtils.add(this.maxDate, (_q = this.options.marginAfterEnd) !== null && _q !== void 0 ? _q : 1, "year");
9861
+ this._minDate = DateUtils.add(this.minDate, -((_r = this.options.marginBeforeStart) !== null && _r !== void 0 ? _r : 1), "year");
9862
+ this._maxDate = DateUtils.add(this.maxDate, (_s = this.options.marginAfterEnd) !== null && _s !== void 0 ? _s : 1, "year");
9856
9863
  break;
9857
9864
  }
9858
9865
  };
@@ -9880,8 +9887,6 @@
9880
9887
  var columnWidth = (this.options.containerWidth - 1) / this.dates.length;
9881
9888
  this.options.columnWidth = columnWidth < 45 ? 45 : columnWidth;
9882
9889
  }
9883
- console.log("cur_date", cur_date);
9884
- console.log("dates", this.dates);
9885
9890
  };
9886
9891
  Gantt.prototype.bind_events = function () {
9887
9892
  this.bind_grid_click();
@@ -10001,23 +10006,24 @@
10001
10006
  for (var _b = __values(this.dates), _c = _b.next(); !_c.done; _c = _b.next()) {
10002
10007
  var date = _c.value;
10003
10008
  var tick_class = "tick";
10004
- // thick tick for monday
10005
- if (this.view_is(exports.ViewMode.Day) && date.getDate() === 1) {
10009
+ if (this.view_is(exports.ViewMode.QuarterHour) && date.getHours() === 0 && date.getMinutes() === 0) {
10010
+ // thick tick for first hour of day.
10011
+ tick_class += " thick";
10012
+ }
10013
+ else if (this.view_is([exports.ViewMode.Hour, exports.ViewMode.QuarterDay, exports.ViewMode.HalfDay]) && date.getHours() === 0) {
10014
+ // thick tick for first hour of day.
10006
10015
  tick_class += " thick";
10007
10016
  }
10008
- // thick tick for first week
10009
- if (this.view_is(exports.ViewMode.Week) &&
10010
- date.getDate() >= 1 &&
10011
- date.getDate() < 8) {
10017
+ else if (this.view_is(exports.ViewMode.Day) && date.getDate() === 1) {
10018
+ // thick tick for monday
10012
10019
  tick_class += " thick";
10013
10020
  }
10014
- // thick ticks for quarters
10015
- if (this.view_is(exports.ViewMode.Month) && date.getMonth() % 3 === 0) {
10021
+ else if (this.view_is(exports.ViewMode.Week) && date.getDate() >= 1 && date.getDate() < 8) {
10022
+ // thick tick for first week
10016
10023
  tick_class += " thick";
10017
10024
  }
10018
- // Thick ticks for hours
10019
- if (this.view_is(exports.ViewMode.Hour) &&
10020
- date.getHours() == 0) {
10025
+ else if (this.view_is(exports.ViewMode.Month) && date.getMonth() % 3 === 0) {
10026
+ // thick ticks for quarters
10021
10027
  tick_class += " thick";
10022
10028
  }
10023
10029
  createSVG("path", {
@@ -10057,7 +10063,7 @@
10057
10063
  for (var _b = __values(this.dates), _c = _b.next(); !_c.done; _c = _b.next()) {
10058
10064
  var date = _c.value;
10059
10065
  var y = (this.options.headerHeight + this.options.padding) / 2;
10060
- var isToday = date.toString() == DateUtils.today();
10066
+ var isToday = date == DateUtils.today();
10061
10067
  var isWeekend = (date.getDay() == 0 || date.getDay() == 6);
10062
10068
  var className = void 0;
10063
10069
  if (isToday) {
@@ -10095,19 +10101,8 @@
10095
10101
  };
10096
10102
  Gantt.prototype.make_dates = function () {
10097
10103
  var dates = this.get_dates_to_draw();
10098
- var isHourView = this.view_is([exports.ViewMode.Hour, exports.ViewMode.QuarterDay, exports.ViewMode.HalfDay]);
10099
- var counter = 0;
10100
10104
  for (var i = 0; i < dates.length; i++) {
10101
10105
  var date = dates[i];
10102
- if (isHourView && date.date >= this._realMinDate && date.date <= this._realMaxDate) {
10103
- createSVG("text", {
10104
- x: date.lower_x,
10105
- y: date.lower_y,
10106
- innerHTML: "H" + counter++ * this.options.step,
10107
- class: "title-1",
10108
- append_to: this.layers.date,
10109
- });
10110
- }
10111
10106
  createSVG("text", {
10112
10107
  x: date.lower_x,
10113
10108
  y: date.lower_y + 20,
@@ -10115,6 +10110,15 @@
10115
10110
  class: "title-2",
10116
10111
  append_to: this.layers.date,
10117
10112
  });
10113
+ if (date.middle_text) {
10114
+ createSVG("text", {
10115
+ x: date.middle_x,
10116
+ y: date.middle_y,
10117
+ innerHTML: date.middle_text,
10118
+ class: "middle-text",
10119
+ append_to: this.layers.date,
10120
+ });
10121
+ }
10118
10122
  if (date.upper_text) {
10119
10123
  var $upper_text = createSVG("text", {
10120
10124
  x: date.upper_x,
@@ -10145,67 +10149,93 @@
10145
10149
  last_date = DateUtils.add(date, 1, "year");
10146
10150
  }
10147
10151
  var date_text = {
10148
- hourLower: DateUtils.format(date, "HH:mm", this.options.language),
10149
- quarterDayLower: DateUtils.format(date, "HH:mm", this.options.language),
10150
- halfDayLower: DateUtils.format(date, "HH:mm", this.options.language),
10151
- dayLower: DateUtils.format(date, "D", this.options.language),
10152
- weekLower: date.getMonth() !== last_date.getMonth()
10152
+ // quarter hour
10153
+ quarterHourUpper: date.getDate() !== last_date.getDate()
10153
10154
  ? DateUtils.format(date, "D MMM", this.options.language)
10154
- : DateUtils.format(date, "D", this.options.language),
10155
- monthLower: DateUtils.format(date, "MMMM", this.options.language),
10156
- yearLower: DateUtils.format(date, "YYYY", this.options.language),
10155
+ : "",
10156
+ quarterHourLower: DateUtils.format(date, "HH:mm", this.options.language),
10157
+ // hour
10158
+ hourUpper: date.getDate() !== last_date.getDate()
10159
+ ? DateUtils.format(date, "D MMM", this.options.language)
10160
+ : "",
10161
+ hourLower: DateUtils.format(date, "HH:mm", this.options.language),
10162
+ // quarter day
10157
10163
  quarterDayUpper: date.getDate() !== last_date.getDate()
10158
10164
  ? DateUtils.format(date, "D MMM", this.options.language)
10159
10165
  : "",
10166
+ quarterDayLower: DateUtils.format(date, "HH:mm", this.options.language),
10167
+ // half day
10160
10168
  halfDayUpper: (date.getDate() !== last_date.getDate())
10161
10169
  ? (((date.getMonth() !== last_date.getMonth()) || i < 2)
10162
10170
  ? DateUtils.format(date, "D MMM", this.options.language)
10163
10171
  : DateUtils.format(date, "D", this.options.language))
10164
10172
  : "",
10173
+ halfDayLower: DateUtils.format(date, "HH:mm", this.options.language),
10174
+ // day
10165
10175
  dayUpper: ((date.getMonth() !== last_date.getMonth()) || i === 0)
10166
10176
  ? DateUtils.format(date, "MMMM", this.options.language)
10167
10177
  : "",
10178
+ dayMiddle: DateUtils.format(date, "ddd", this.options.language),
10179
+ dayLower: DateUtils.format(date, "D", this.options.language),
10180
+ // week
10168
10181
  weekUpper: date.getMonth() !== last_date.getMonth()
10169
10182
  ? DateUtils.format(date, "MMMM", this.options.language)
10170
10183
  : "",
10184
+ weekLower: date.getMonth() !== last_date.getMonth()
10185
+ ? DateUtils.format(date, "D MMM", this.options.language)
10186
+ : DateUtils.format(date, "D", this.options.language),
10187
+ // month
10171
10188
  monthUpper: date.getFullYear() !== last_date.getFullYear()
10172
10189
  ? DateUtils.format(date, "YYYY", this.options.language)
10173
10190
  : "",
10191
+ monthLower: DateUtils.format(date, "MMMM", this.options.language),
10192
+ // year
10174
10193
  yearUpper: date.getFullYear() !== last_date.getFullYear()
10175
10194
  ? DateUtils.format(date, "YYYY", this.options.language)
10176
10195
  : "",
10177
- hourUpper: date.getDate() !== last_date.getDate()
10178
- ? DateUtils.format(date, "D MMM", this.options.language)
10179
- : "",
10196
+ yearLower: DateUtils.format(date, "YYYY", this.options.language),
10180
10197
  };
10181
10198
  // Descontando 20 para adcionar uma segunda linha de informação no cabeçalho
10182
10199
  var base_pos = {
10183
10200
  x: i * this.options.columnWidth,
10184
- lower_y: this.options.headerHeight - 20,
10185
10201
  upper_y: this.options.headerHeight - 20 - 25,
10202
+ middle_y: this.options.headerHeight - 20,
10203
+ lower_y: this.options.headerHeight - 20,
10186
10204
  };
10187
- debugger;
10188
10205
  var x_pos = {
10189
- hourLower: this.options.columnWidth / 2,
10206
+ quarterHourUpper: (this.dates.length < 14) ? (this.options.columnWidth) : (this.options.columnWidth * 24 / 2),
10207
+ quarterHourMiddle: this.options.columnWidth / 2,
10208
+ quarterHourLower: this.options.columnWidth / 2,
10190
10209
  hourUpper: (this.dates.length < 14) ? (this.options.columnWidth) : (this.options.columnWidth * 24 / 2),
10191
- quarterDayLower: this.options.columnWidth / 2,
10210
+ hourMiddle: this.options.columnWidth / 2,
10211
+ hourLower: this.options.columnWidth / 2,
10192
10212
  quarterDayUpper: this.options.columnWidth * 4 / 2,
10193
- halfDayLower: this.options.columnWidth / 2,
10213
+ quarterDayMiddle: this.options.columnWidth / 2,
10214
+ quarterDayLower: this.options.columnWidth / 2,
10194
10215
  halfDayUpper: this.options.columnWidth * 2 / 2,
10195
- dayLower: this.options.columnWidth / 2,
10216
+ halfDayMiddle: this.options.columnWidth / 2,
10217
+ halfDayLower: this.options.columnWidth / 2,
10196
10218
  dayUpper: (this.dates.length < 15) ? (this.options.columnWidth) : ((this.options.columnWidth * 30) / 2),
10197
- weekLower: 0,
10219
+ dayMiddle: this.options.columnWidth / 2 - 12,
10220
+ dayLower: this.options.columnWidth / 2,
10198
10221
  weekUpper: (this.options.columnWidth * 4) / 2,
10222
+ weekMiddle: 0,
10223
+ weekLower: 0,
10224
+ monthUpper: (this.dates.length < 15) ? (this.options.columnWidth) : ((this.options.columnWidth * 12) / 2),
10225
+ monthMiddle: 0,
10199
10226
  monthLower: this.options.columnWidth / 2,
10200
- monthUpper: (this.options.columnWidth * 12) / 2,
10201
- yearLower: this.options.columnWidth / 2,
10202
10227
  yearUpper: (this.options.columnWidth * 30) / 2,
10228
+ yearMiddle: this.options.columnWidth / 2,
10229
+ yearLower: this.options.columnWidth / 2,
10203
10230
  };
10204
10231
  return {
10205
10232
  upper_text: date_text[this.options.viewMode + "Upper"],
10233
+ middle_text: date_text[this.options.viewMode + "Middle"],
10206
10234
  lower_text: date_text[this.options.viewMode + "Lower"],
10207
10235
  upper_x: base_pos.x + x_pos[this.options.viewMode + "Upper"],
10208
10236
  upper_y: base_pos.upper_y,
10237
+ middle_x: base_pos.x + x_pos[this.options.viewMode + "Middle"],
10238
+ middle_y: base_pos.middle_y,
10209
10239
  lower_x: base_pos.x + x_pos[this.options.viewMode + "Lower"],
10210
10240
  lower_y: base_pos.lower_y,
10211
10241
  date: date,
@@ -10497,6 +10527,7 @@
10497
10527
  }
10498
10528
  GanttComponent.prototype.ngOnInit = function () {
10499
10529
  this._validateViewMode();
10530
+ this._validateTasks();
10500
10531
  };
10501
10532
  GanttComponent.prototype.ngAfterViewInit = function () {
10502
10533
  var _this = this;
@@ -10507,7 +10538,7 @@
10507
10538
  viewMode: this.viewMode,
10508
10539
  marginBeforeStart: this.marginBeforeStart,
10509
10540
  marginAfterEnd: this.marginAfterEnd,
10510
- language: "pt-BR",
10541
+ language: "pt-br",
10511
10542
  allowMovement: this.allowMovement,
10512
10543
  hasPopup: this.hasPopup,
10513
10544
  containerWidth: this.containerWidth,
@@ -10551,6 +10582,7 @@
10551
10582
  };
10552
10583
  GanttComponent.prototype._validateViewMode = function () {
10553
10584
  if (![
10585
+ exports.ViewMode.QuarterHour,
10554
10586
  exports.ViewMode.Hour,
10555
10587
  exports.ViewMode.QuarterDay,
10556
10588
  exports.ViewMode.HalfDay,
@@ -10562,6 +10594,15 @@
10562
10594
  throw new Error("Invalid gantt view mode");
10563
10595
  }
10564
10596
  };
10597
+ GanttComponent.prototype._validateTasks = function () {
10598
+ this.tasks.forEach(function (group) {
10599
+ group.tasks.forEach(function (task) {
10600
+ if (task.start > task.end) {
10601
+ throw new Error("invalid task. The start date must be less than the end date.");
10602
+ }
10603
+ });
10604
+ });
10605
+ };
10565
10606
  __decorate([
10566
10607
  core.Input()
10567
10608
  ], GanttComponent.prototype, "columnTitle", void 0);
@@ -10621,7 +10662,7 @@
10621
10662
  selector: "s-gantt",
10622
10663
  template: "<div class=\"outer\" #outer>\n <div #side>\n <gantt-side-table\n *ngIf=\"showSideTable\"\n [tasks]=\"tasks\"\n [columnTitle]=\"columnTitle\"\n [multipleTaskPerLine]=\"multipleTaskPerLine\">\n </gantt-side-table>\n </div>\n <svg id=\"gantt\"></svg>\n</div>\n",
10623
10664
  encapsulation: core.ViewEncapsulation.None,
10624
- styles: [".outer{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:start;align-items:flex-start;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-direction:row;flex-direction:row}", ".gantt{border:1px solid #e0e0e0}.gantt .weekend-highlight{fill:#b8c2cc;opacity:.5;stroke:#ebeff2;stroke-width:1}.gantt .grid-background{fill:none}.gantt .grid-header,.gantt .grid-row{fill:#fff}.gantt .grid-row:nth-child(even){fill:#f5f5f5}.gantt .row-line{stroke:#ebeff2}.gantt .tick{stroke:#e0e0e0;stroke-width:.4}.gantt .tick.thick{stroke:#533a3a8c;stroke-width:.4}.gantt .today-highlight{fill:#ffe979;opacity:.5}.gantt .arrow{fill:none;stroke:#666;stroke-width:1.4}.gantt .bar{opacity:.8;stroke:#8d99a6;stroke-width:0;transition:stroke-width .3s;-webkit-user-select:none;-ms-user-select:none;user-select:none}.gantt .bar-invalid{fill:transparent;stroke:#8d99a6;stroke-dasharray:5;stroke-width:1}.gantt .bar-invalid~.bar-label{fill:#555}.gantt .bar-label{fill:#fff;text-anchor:middle;font-size:12px;font-weight:lighter}.gantt .bar-label.big{fill:#555;text-anchor:start}.gantt .bar-wrapper{cursor:pointer;outline:0}.gantt .bar-wrapper.active .bar,.gantt .bar-wrapper:hover .bar{opacity:1}.gantt .bar-wrapper.active .bar{stroke:#212533;stroke-width:2}.gantt .lower-text,.gantt .upper-text{font-size:12px;text-anchor:middle}.gantt .upper-text{fill:#555}.gantt .lower-text{fill:#333}.gantt .hide{display:none}.gantt-container{border-left:1px solid #e0e0e0;font-size:12px;overflow:auto;position:relative}.gantt-container .title-1{fill:#999;font-size:12px;font-weight:400;line-height:150%;text-anchor:middle}.gantt-container .title-2{fill:#333;font-size:14px;font-weight:400;line-height:150%;text-anchor:middle}.gantt-container .popup-wrapper{left:0;position:absolute;top:0}.gantt-container .popup-wrapper .popup{background:#0e1119;border-radius:2px;color:#fff;padding:8px;font-family:\"Open Sans\" sans-serif;line-height:150%;font-weight:400}.gantt-container .popup-wrapper .popup .wrp-title{border-bottom:1px solid #525966;padding-bottom:10px}.gantt-container .popup-wrapper .popup .wrp-title .title{font-size:14px}.gantt-container .popup-wrapper .popup .wrp-subtitle{color:#dfe2e5;padding-top:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.gantt-container .popup-wrapper .popup .wrp-subtitle .icon{margin-right:10px}.gantt-container .popup-wrapper .popup .wrp-subtitle .subtitle{font-size:12px}.gantt-container .popup-wrapper .popup .pointer{border:6px solid transparent;border-top-color:#0e1119;height:6px;margin-left:-4px;position:absolute}"]
10665
+ styles: [".outer{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:start;align-items:flex-start;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-direction:row;flex-direction:row}", ".gantt{border:1px solid #e0e0e0}.gantt .weekend-highlight{fill:#b8c2cc;opacity:.5;stroke:#ebeff2;stroke-width:1}.gantt .grid-background{fill:none}.gantt .grid-header,.gantt .grid-row{fill:#fff}.gantt .grid-row:nth-child(even){fill:#f5f5f5}.gantt .row-line{stroke:#ebeff2}.gantt .tick{stroke:#e0e0e0;stroke-width:.4}.gantt .tick.thick{stroke:#428bca;stroke-width:2}.gantt .today-highlight{fill:#ffe979;opacity:.5}.gantt .arrow{fill:none;stroke:#666;stroke-width:1.4}.gantt .bar{opacity:.8;stroke:#8d99a6;stroke-width:0;transition:stroke-width .3s;-webkit-user-select:none;-ms-user-select:none;user-select:none}.gantt .bar-invalid{fill:transparent;stroke:#8d99a6;stroke-dasharray:5;stroke-width:1}.gantt .bar-invalid~.bar-label{fill:#555}.gantt .bar-label{fill:#fff;text-anchor:middle;font-size:12px;font-weight:lighter}.gantt .bar-label.big{fill:#555;text-anchor:start}.gantt .bar-wrapper{cursor:pointer;outline:0}.gantt .bar-wrapper.active .bar,.gantt .bar-wrapper:hover .bar{opacity:1}.gantt .bar-wrapper.active .bar{stroke:#212533;stroke-width:2}.gantt .lower-text,.gantt .upper-text{font-size:12px;text-anchor:middle}.gantt .upper-text{fill:#555}.gantt .lower-text{fill:#333}.gantt .hide{display:none}.gantt-container{border-left:1px solid #e0e0e0;font-size:12px;overflow:auto;position:relative}.gantt-container .title-1{fill:#999;font-size:12px;font-weight:400;line-height:150%;text-anchor:middle}.gantt-container .title-2{fill:#333;font-size:14px;font-weight:400;line-height:150%;text-anchor:middle}.gantt-container .popup-wrapper{left:0;position:absolute;top:0}.gantt-container .popup-wrapper .popup{background:#0e1119;border-radius:2px;color:#fff;padding:8px;font-family:\"Open Sans\" sans-serif;line-height:150%;font-weight:400}.gantt-container .popup-wrapper .popup .wrp-title{border-bottom:1px solid #525966;padding-bottom:10px}.gantt-container .popup-wrapper .popup .wrp-title .title{font-size:14px}.gantt-container .popup-wrapper .popup .wrp-subtitle{color:#dfe2e5;padding-top:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.gantt-container .popup-wrapper .popup .wrp-subtitle .icon{margin-right:10px}.gantt-container .popup-wrapper .popup .wrp-subtitle .subtitle{font-size:12px}.gantt-container .popup-wrapper .popup .pointer{border:6px solid transparent;border-top-color:#0e1119;height:6px;margin-left:-4px;position:absolute}"]
10625
10666
  })
10626
10667
  ], GanttComponent);
10627
10668
  return GanttComponent;
@@ -10632,6 +10673,12 @@
10632
10673
  this.ROW_HEIGHT = 44;
10633
10674
  this.multipleTaskPerLine = false;
10634
10675
  }
10676
+ SideTableComponent.prototype.ngOnInit = function () {
10677
+ this._removeEmptyTasks();
10678
+ };
10679
+ SideTableComponent.prototype._removeEmptyTasks = function () {
10680
+ this.tasks = this.tasks.filter(function (task) { return task.tasks.length; });
10681
+ };
10635
10682
  __decorate([
10636
10683
  core.Input()
10637
10684
  ], SideTableComponent.prototype, "columnTitle", void 0);