vxe-gantt 3.1.2 → 3.1.4

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/lib/index.umd.js CHANGED
@@ -625,6 +625,49 @@ module.exports = function (NAME) {
625
625
  };
626
626
 
627
627
 
628
+ /***/ }),
629
+
630
+ /***/ 533:
631
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
632
+
633
+ "use strict";
634
+
635
+ var uncurryThis = __webpack_require__(9504);
636
+ var toLength = __webpack_require__(8014);
637
+ var toString = __webpack_require__(655);
638
+ var $repeat = __webpack_require__(2333);
639
+ var requireObjectCoercible = __webpack_require__(7750);
640
+
641
+ var repeat = uncurryThis($repeat);
642
+ var stringSlice = uncurryThis(''.slice);
643
+ var ceil = Math.ceil;
644
+
645
+ // `String.prototype.{ padStart, padEnd }` methods implementation
646
+ var createMethod = function (IS_END) {
647
+ return function ($this, maxLength, fillString) {
648
+ var S = toString(requireObjectCoercible($this));
649
+ var intMaxLength = toLength(maxLength);
650
+ var stringLength = S.length;
651
+ var fillStr = fillString === undefined ? ' ' : toString(fillString);
652
+ var fillLen, stringFiller;
653
+ if (intMaxLength <= stringLength || fillStr === '') return S;
654
+ fillLen = intMaxLength - stringLength;
655
+ stringFiller = repeat(fillStr, ceil(fillLen / fillStr.length));
656
+ if (stringFiller.length > fillLen) stringFiller = stringSlice(stringFiller, 0, fillLen);
657
+ return IS_END ? S + stringFiller : stringFiller + S;
658
+ };
659
+ };
660
+
661
+ module.exports = {
662
+ // `String.prototype.padStart` method
663
+ // https://tc39.es/ecma262/#sec-string.prototype.padstart
664
+ start: createMethod(false),
665
+ // `String.prototype.padEnd` method
666
+ // https://tc39.es/ecma262/#sec-string.prototype.padend
667
+ end: createMethod(true)
668
+ };
669
+
670
+
628
671
  /***/ }),
629
672
 
630
673
  /***/ 537:
@@ -2045,6 +2088,31 @@ module.exports = function (O, defaultConstructor) {
2045
2088
  };
2046
2089
 
2047
2090
 
2091
+ /***/ }),
2092
+
2093
+ /***/ 2333:
2094
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2095
+
2096
+ "use strict";
2097
+
2098
+ var toIntegerOrInfinity = __webpack_require__(1291);
2099
+ var toString = __webpack_require__(655);
2100
+ var requireObjectCoercible = __webpack_require__(7750);
2101
+
2102
+ var $RangeError = RangeError;
2103
+
2104
+ // `String.prototype.repeat` method implementation
2105
+ // https://tc39.es/ecma262/#sec-string.prototype.repeat
2106
+ module.exports = function repeat(count) {
2107
+ var str = toString(requireObjectCoercible(this));
2108
+ var result = '';
2109
+ var n = toIntegerOrInfinity(count);
2110
+ if (n < 0 || n === Infinity) throw new $RangeError('Wrong number of repetitions');
2111
+ for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
2112
+ return result;
2113
+ };
2114
+
2115
+
2048
2116
  /***/ }),
2049
2117
 
2050
2118
  /***/ 2360:
@@ -2721,6 +2789,19 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
2721
2789
  }() : undefined);
2722
2790
 
2723
2791
 
2792
+ /***/ }),
2793
+
2794
+ /***/ 3063:
2795
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2796
+
2797
+ "use strict";
2798
+
2799
+ // https://github.com/zloirock/core-js/issues/280
2800
+ var userAgent = __webpack_require__(2839);
2801
+
2802
+ module.exports = /Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent);
2803
+
2804
+
2724
2805
  /***/ }),
2725
2806
 
2726
2807
  /***/ 3110:
@@ -6712,6 +6793,26 @@ $({ global: true, constructor: true, forced: FORCED }, {
6712
6793
  });
6713
6794
 
6714
6795
 
6796
+ /***/ }),
6797
+
6798
+ /***/ 8156:
6799
+ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6800
+
6801
+ "use strict";
6802
+
6803
+ var $ = __webpack_require__(6518);
6804
+ var $padStart = (__webpack_require__(533).start);
6805
+ var WEBKIT_BUG = __webpack_require__(3063);
6806
+
6807
+ // `String.prototype.padStart` method
6808
+ // https://tc39.es/ecma262/#sec-string.prototype.padstart
6809
+ $({ target: 'String', proto: true, forced: WEBKIT_BUG }, {
6810
+ padStart: function padStart(maxLength /* , fillString = ' ' */) {
6811
+ return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);
6812
+ }
6813
+ });
6814
+
6815
+
6715
6816
  /***/ }),
6716
6817
 
6717
6818
  /***/ 8183:
@@ -8182,7 +8283,7 @@ var core_ = __webpack_require__(4345);
8182
8283
  ;// ./packages/ui/src/log.ts
8183
8284
 
8184
8285
  var log = core_.VxeUI.log;
8185
- var version = "gantt v".concat("3.1.2");
8286
+ var version = "gantt v".concat("3.1.4");
8186
8287
  var warnLog = log.create('warn', version);
8187
8288
  var errLog = log.create('error', version);
8188
8289
  ;// ./packages/ui/index.ts
@@ -8192,7 +8293,9 @@ var errLog = log.create('error', version);
8192
8293
  var setConfig = core_.VxeUI.setConfig,
8193
8294
  setIcon = core_.VxeUI.setIcon,
8194
8295
  checkVersion = core_.VxeUI.checkVersion;
8195
- core_.VxeUI.ganttVersion = "3.1.2";
8296
+ core_.VxeUI.ganttVersion = "3.1.4";
8297
+ var ymdFormat = 'yyyy-MM-dd';
8298
+ var ymdhmsFormat = 'yyyy-MM-dd HH:mm:ss';
8196
8299
  setConfig({
8197
8300
  gantt: {
8198
8301
  // size: null,
@@ -8235,12 +8338,41 @@ setConfig({
8235
8338
  enterable: true
8236
8339
  },
8237
8340
  taskViewScaleConfig: {
8341
+ year: {
8342
+ valueFormat: ymdFormat
8343
+ },
8344
+ quarter: {
8345
+ valueFormat: ymdFormat
8346
+ },
8347
+ month: {
8348
+ valueFormat: ymdFormat
8349
+ },
8238
8350
  week: {
8239
- startDay: 1
8351
+ startDay: 1,
8352
+ valueFormat: ymdFormat
8353
+ },
8354
+ day: {
8355
+ valueFormat: ymdFormat
8356
+ },
8357
+ date: {
8358
+ valueFormat: ymdFormat
8359
+ },
8360
+ hour: {
8361
+ valueFormat: ymdhmsFormat
8362
+ },
8363
+ minute: {
8364
+ valueFormat: ymdhmsFormat
8365
+ },
8366
+ second: {
8367
+ valueFormat: ymdhmsFormat
8240
8368
  }
8241
8369
  },
8242
8370
  taskViewConfig: {
8243
- showNowLine: true
8371
+ showNowLine: true,
8372
+ gridding: {
8373
+ // leftSpacing: 0,
8374
+ // rightSpacing: 0
8375
+ }
8244
8376
  },
8245
8377
  taskSplitConfig: {
8246
8378
  enabled: true,
@@ -8979,6 +9111,8 @@ function getSlotVNs(vns) {
8979
9111
  }
8980
9112
  return [vns];
8981
9113
  }
9114
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.pad-start.js
9115
+ var es_string_pad_start = __webpack_require__(8156);
8982
9116
  ;// ./packages/gantt/src/util.ts
8983
9117
  function getRefElem(refEl) {
8984
9118
  if (refEl) {
@@ -9809,6 +9943,7 @@ var gantt_footer_viewType = 'footer';
9809
9943
 
9810
9944
 
9811
9945
 
9946
+
9812
9947
 
9813
9948
  var globalEvents = core_.VxeUI.globalEvents;
9814
9949
  var gantt_view_sourceType = 'gantt';
@@ -9933,28 +10068,42 @@ function handleColumnHeader($xeGanttView) {
9933
10068
  };
9934
10069
  for (var i = 0; i < scaleDateList.length; i++) {
9935
10070
  var itemDate = scaleDateList[i];
9936
- var _XEUtils$toDateString3 = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(itemDate, 'yyyy-M-d-H-m-s').split('-'),
9937
- _XEUtils$toDateString4 = _slicedToArray(_XEUtils$toDateString3, 6),
9938
- yyyy = _XEUtils$toDateString4[0],
9939
- MM = _XEUtils$toDateString4[1],
9940
- dd = _XEUtils$toDateString4[2],
9941
- HH = _XEUtils$toDateString4[3],
9942
- mm = _XEUtils$toDateString4[4],
9943
- ss = _XEUtils$toDateString4[5];
10071
+ var _XEUtils$toDateString3 = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(itemDate, 'yy-yyyy-M-MM-d-dd-H-HH-m-mm-s-ss').split('-'),
10072
+ _XEUtils$toDateString4 = _slicedToArray(_XEUtils$toDateString3, 12),
10073
+ yy = _XEUtils$toDateString4[0],
10074
+ yyyy = _XEUtils$toDateString4[1],
10075
+ M = _XEUtils$toDateString4[2],
10076
+ MM = _XEUtils$toDateString4[3],
10077
+ d = _XEUtils$toDateString4[4],
10078
+ dd = _XEUtils$toDateString4[5],
10079
+ H = _XEUtils$toDateString4[6],
10080
+ HH = _XEUtils$toDateString4[7],
10081
+ m = _XEUtils$toDateString4[8],
10082
+ mm = _XEUtils$toDateString4[9],
10083
+ s = _XEUtils$toDateString4[10],
10084
+ ss = _XEUtils$toDateString4[11];
9944
10085
  var e = itemDate.getDay();
9945
10086
  var E = e + 1;
9946
10087
  var q = Math.ceil((itemDate.getMonth() + 1) / 3);
9947
- var W = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getYearWeek(itemDate, weekScale ? weekScale.startDay : undefined);
10088
+ var W = "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getYearWeek(itemDate, weekScale ? weekScale.startDay : undefined));
10089
+ var WW = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().padStart(W, 2, '0');
9948
10090
  var dateObj = {
9949
10091
  date: itemDate,
9950
- yy: yyyy,
9951
- M: MM,
9952
- d: dd,
9953
- H: HH,
9954
- m: mm,
9955
- s: ss,
10092
+ yy: yy,
10093
+ yyyy: yyyy,
10094
+ M: M,
10095
+ MM: MM,
10096
+ d: d,
10097
+ dd: dd,
10098
+ H: H,
10099
+ HH: HH,
10100
+ m: m,
10101
+ mm: mm,
10102
+ s: s,
10103
+ ss: ss,
9956
10104
  q: q,
9957
10105
  W: W,
10106
+ WW: WW,
9958
10107
  E: E,
9959
10108
  e: e
9960
10109
  };
@@ -10090,7 +10239,7 @@ function createChartRender($xeGanttView, fullCols) {
10090
10239
  var offsetLeftSize = (indexMaps[startStr] || 0) + subtract;
10091
10240
  return {
10092
10241
  offsetLeftSize: offsetLeftSize,
10093
- offsetWidthSize: (indexMaps[endStr] || 0) - offsetLeftSize + addSize
10242
+ offsetWidthSize: (indexMaps[endStr] || 0) - offsetLeftSize + addSize + 1
10094
10243
  };
10095
10244
  };
10096
10245
  }
@@ -10115,7 +10264,7 @@ function createChartRender($xeGanttView, fullCols) {
10115
10264
  var offsetLeftSize = (_indexMaps[startStr] || 0) + subtract;
10116
10265
  return {
10117
10266
  offsetLeftSize: offsetLeftSize,
10118
- offsetWidthSize: (_indexMaps[endStr] || 0) - offsetLeftSize + addSize
10267
+ offsetWidthSize: (_indexMaps[endStr] || 0) - offsetLeftSize + addSize + 1
10119
10268
  };
10120
10269
  };
10121
10270
  }
@@ -10140,7 +10289,7 @@ function createChartRender($xeGanttView, fullCols) {
10140
10289
  var offsetLeftSize = (_indexMaps2[startStr] || 0) + subtract;
10141
10290
  return {
10142
10291
  offsetLeftSize: offsetLeftSize,
10143
- offsetWidthSize: (_indexMaps2[endStr] || 0) - offsetLeftSize + addSize
10292
+ offsetWidthSize: (_indexMaps2[endStr] || 0) - offsetLeftSize + addSize + 1
10144
10293
  };
10145
10294
  };
10146
10295
  }
@@ -10171,7 +10320,7 @@ function createChartRender($xeGanttView, fullCols) {
10171
10320
  var offsetLeftSize = (_indexMaps3[startStr] || 0) + subtract;
10172
10321
  return {
10173
10322
  offsetLeftSize: offsetLeftSize,
10174
- offsetWidthSize: (_indexMaps3[endStr] || 0) - offsetLeftSize + addSize
10323
+ offsetWidthSize: (_indexMaps3[endStr] || 0) - offsetLeftSize + addSize + 1
10175
10324
  };
10176
10325
  };
10177
10326
  }
@@ -10197,7 +10346,7 @@ function createChartRender($xeGanttView, fullCols) {
10197
10346
  var offsetLeftSize = (_indexMaps4[startStr] || 0) + subtract;
10198
10347
  return {
10199
10348
  offsetLeftSize: offsetLeftSize,
10200
- offsetWidthSize: (_indexMaps4[endStr] || 0) - offsetLeftSize + addSize
10349
+ offsetWidthSize: (_indexMaps4[endStr] || 0) - offsetLeftSize + addSize + 1
10201
10350
  };
10202
10351
  };
10203
10352
  }
@@ -10222,7 +10371,7 @@ function createChartRender($xeGanttView, fullCols) {
10222
10371
  var offsetLeftSize = (_indexMaps5[startStr] || 0) + subtract;
10223
10372
  return {
10224
10373
  offsetLeftSize: offsetLeftSize,
10225
- offsetWidthSize: (_indexMaps5[endStr] || 0) - offsetLeftSize + addSize
10374
+ offsetWidthSize: (_indexMaps5[endStr] || 0) - offsetLeftSize + addSize + 1
10226
10375
  };
10227
10376
  };
10228
10377
  }
@@ -10247,7 +10396,7 @@ function createChartRender($xeGanttView, fullCols) {
10247
10396
  var offsetLeftSize = (_indexMaps6[startStr] || 0) + subtract;
10248
10397
  return {
10249
10398
  offsetLeftSize: offsetLeftSize,
10250
- offsetWidthSize: (_indexMaps6[endStr] || 0) - offsetLeftSize + addSize
10399
+ offsetWidthSize: (_indexMaps6[endStr] || 0) - offsetLeftSize + addSize + 1
10251
10400
  };
10252
10401
  };
10253
10402
  }
@@ -10446,7 +10595,7 @@ function updateChart($xeGanttView) {
10446
10595
  if (chartWrapper) {
10447
10596
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(chartWrapper.children, function (rowEl) {
10448
10597
  var barEl = rowEl.children[0];
10449
- if (!barEl) {
10598
+ if (!barEl || hasClass(barEl, 'is--drag')) {
10450
10599
  return;
10451
10600
  }
10452
10601
  var rowid = rowEl.getAttribute('rowid');
@@ -11003,18 +11152,21 @@ function syncTableScrollTop($xeGanttView, scrollTop) {
11003
11152
  var reactData = $xeGanttView.reactData;
11004
11153
  var minViewDate = reactData.minViewDate,
11005
11154
  maxViewDate = reactData.maxViewDate;
11155
+ var taskViewOpts = $xeGantt.computeTaskViewOpts;
11006
11156
  var minScale = $xeGantt.computeMinScale;
11157
+ var gridding = taskViewOpts.gridding;
11007
11158
  var dateList = [];
11008
11159
  if (!minViewDate || !maxViewDate) {
11009
11160
  return dateList;
11010
11161
  }
11011
- var startTime = minViewDate.getTime();
11012
- var endTime = maxViewDate.getTime();
11162
+ var leftSize = -external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(gridding ? gridding.leftSpacing || 0 : 0);
11163
+ var rightSize = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(gridding ? gridding.rightSpacing || 0 : 0);
11013
11164
  switch (minScale.type) {
11014
11165
  case 'year':
11015
11166
  {
11016
- var currDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(minViewDate, 0, 'first');
11017
- while (currDate <= maxViewDate) {
11167
+ var currDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(minViewDate, leftSize, 'first');
11168
+ var endDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(maxViewDate, rightSize, 'first');
11169
+ while (currDate <= endDate) {
11018
11170
  var itemDate = currDate;
11019
11171
  dateList.push(itemDate);
11020
11172
  currDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(currDate, 1);
@@ -11023,8 +11175,9 @@ function syncTableScrollTop($xeGanttView, scrollTop) {
11023
11175
  }
11024
11176
  case 'quarter':
11025
11177
  {
11026
- var _currDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(minViewDate, 0, 'first');
11027
- while (_currDate <= maxViewDate) {
11178
+ var _currDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(minViewDate, leftSize, 'first');
11179
+ var _endDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(maxViewDate, rightSize, 'first');
11180
+ while (_currDate <= _endDate) {
11028
11181
  var _itemDate = _currDate;
11029
11182
  dateList.push(_itemDate);
11030
11183
  _currDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(_currDate, 1);
@@ -11033,8 +11186,9 @@ function syncTableScrollTop($xeGanttView, scrollTop) {
11033
11186
  }
11034
11187
  case 'month':
11035
11188
  {
11036
- var _currDate2 = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(minViewDate, 0, 'first');
11037
- while (_currDate2 <= maxViewDate) {
11189
+ var _currDate2 = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(minViewDate, leftSize, 'first');
11190
+ var _endDate2 = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(maxViewDate, rightSize, 'first');
11191
+ while (_currDate2 <= _endDate2) {
11038
11192
  var _itemDate2 = _currDate2;
11039
11193
  dateList.push(_itemDate2);
11040
11194
  _currDate2 = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(_currDate2, 1);
@@ -11043,8 +11197,9 @@ function syncTableScrollTop($xeGanttView, scrollTop) {
11043
11197
  }
11044
11198
  case 'week':
11045
11199
  {
11046
- var _currDate3 = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(minViewDate, 0, minScale.startDay, minScale.startDay);
11047
- while (_currDate3 <= maxViewDate) {
11200
+ var _currDate3 = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(minViewDate, leftSize, minScale.startDay, minScale.startDay);
11201
+ var _endDate3 = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(maxViewDate, rightSize, minScale.startDay, minScale.startDay);
11202
+ while (_currDate3 <= _endDate3) {
11048
11203
  var _itemDate3 = _currDate3;
11049
11204
  dateList.push(_itemDate3);
11050
11205
  _currDate3 = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(_currDate3, 1);
@@ -11053,15 +11208,26 @@ function syncTableScrollTop($xeGanttView, scrollTop) {
11053
11208
  }
11054
11209
  case 'day':
11055
11210
  case 'date':
11211
+ {
11212
+ var _currDate4 = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(minViewDate, leftSize, 'first');
11213
+ var _endDate4 = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(maxViewDate, rightSize, 'first');
11214
+ while (_currDate4 <= _endDate4) {
11215
+ var _itemDate4 = _currDate4;
11216
+ dateList.push(_itemDate4);
11217
+ _currDate4 = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(_currDate4, 1);
11218
+ }
11219
+ break;
11220
+ }
11056
11221
  case 'hour':
11057
11222
  case 'minute':
11058
11223
  case 'second':
11059
11224
  {
11060
11225
  var gapTime = getStandardGapTime(minScale.type);
11061
- var currTime = startTime;
11226
+ var currTime = minViewDate.getTime() + leftSize * gapTime;
11227
+ var endTime = maxViewDate.getTime() + rightSize * gapTime;
11062
11228
  while (currTime <= endTime) {
11063
- var _itemDate4 = new Date(currTime);
11064
- dateList.push(_itemDate4);
11229
+ var _itemDate5 = new Date(currTime);
11230
+ dateList.push(_itemDate5);
11065
11231
  currTime += gapTime;
11066
11232
  }
11067
11233
  break;
@@ -11524,7 +11690,8 @@ function gantt_createInternalData() {
11524
11690
  return {
11525
11691
  uFoot: false,
11526
11692
  resizeTableWidth: 0
11527
- // barTipTimeout: undefined
11693
+ // barTipTimeout: null
11694
+ // dragBarRow: null
11528
11695
  };
11529
11696
  }
11530
11697
  /* harmony default export */ var gantt = (/* define-vxe-component start */defineVxeComponent({
@@ -11981,36 +12148,26 @@ function gantt_createInternalData() {
11981
12148
  var taskScaleConfs = $xeGantt.computeTaskViewScales;
11982
12149
  var taskViewScaleOpts = $xeGantt.computeTaskViewScaleOpts;
11983
12150
  var scaleConfs = [];
11984
- if (taskScaleConfs) {
11985
- var keyMaps = {};
11986
- taskScaleConfs.forEach(function (conf) {
11987
- var sConf = !conf || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(conf) ? {
11988
- type: conf
11989
- } : conf;
11990
- var type = sConf.type;
11991
- if (!type || !viewTypeLevelMaps[type]) {
11992
- errLog('vxe.error.errProp', ["type=".concat(type), external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(viewTypeLevelMaps).join(',')]);
11993
- return;
11994
- }
11995
- if (keyMaps[type]) {
11996
- errLog('vxe.error.repeatProp', ['type', type]);
11997
- return;
11998
- }
11999
- keyMaps[type] = true;
12000
- scaleConfs.push(Object.assign({}, type ? taskViewScaleOpts[type] || {} : {}, sConf, {
12001
- level: getViewTypeLevel(type)
12002
- }));
12003
- });
12004
- }
12005
- if (!scaleConfs.length) {
12006
- scaleConfs.push({
12007
- type: 'month',
12008
- level: viewTypeLevelMaps.month
12009
- }, {
12010
- type: 'date',
12011
- level: viewTypeLevelMaps.date
12012
- });
12013
- }
12151
+ var keyMaps = {};
12152
+ var scaleList = taskScaleConfs && taskScaleConfs.length ? taskScaleConfs : ['month', 'date'];
12153
+ scaleList.forEach(function (conf) {
12154
+ var sConf = !conf || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(conf) ? {
12155
+ type: conf
12156
+ } : conf;
12157
+ var type = sConf.type;
12158
+ if (!type || !viewTypeLevelMaps[type]) {
12159
+ errLog('vxe.error.errProp', ["type=".concat(type), external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(viewTypeLevelMaps).join(',')]);
12160
+ return;
12161
+ }
12162
+ if (keyMaps[type]) {
12163
+ errLog('vxe.error.repeatProp', ['type', type]);
12164
+ return;
12165
+ }
12166
+ keyMaps[type] = true;
12167
+ scaleConfs.push(Object.assign({}, type ? taskViewScaleOpts[type] || {} : {}, sConf, {
12168
+ level: getViewTypeLevel(type)
12169
+ }));
12170
+ });
12014
12171
  reactData.taskScaleList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(scaleConfs, {
12015
12172
  field: 'level',
12016
12173
  order: 'desc'