devexpress-gantt 4.1.37 → 4.1.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dx-gantt.css CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt)
3
- * Version: 4.1.37
4
- * Build date: Thu Dec 01 2022
3
+ * Version: 4.1.39
4
+ * Build date: Fri Dec 23 2022
5
5
  *
6
6
  * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
package/dist/dx-gantt.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt)
3
- * Version: 4.1.37
4
- * Build date: Thu Dec 01 2022
3
+ * Version: 4.1.39
4
+ * Build date: Fri Dec 23 2022
5
5
  *
6
6
  * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
@@ -18183,6 +18183,7 @@ var Enums_1 = __webpack_require__(4);
18183
18183
  var RenderElementUtils_1 = __webpack_require__(16);
18184
18184
  var CustomTaskRender = (function () {
18185
18185
  function CustomTaskRender(renderHelepr, taskRender) {
18186
+ this._pendingTemplateFuncsToRender = [];
18186
18187
  this._renderHelper = renderHelepr;
18187
18188
  this._taskRender = taskRender;
18188
18189
  }
@@ -18247,13 +18248,39 @@ var CustomTaskRender = (function () {
18247
18248
  this._taskRender.createTaskSelectionElement(taskIndex);
18248
18249
  };
18249
18250
  CustomTaskRender.prototype.createCustomTaskElement = function (index, taskTemplateFunction) {
18250
- var _this = this;
18251
+ this._saveTemplateFuncToStack(index, taskTemplateFunction);
18252
+ if (this._hasRepeatedTemplateRenderCall(index))
18253
+ return;
18251
18254
  var viewItem = this.getViewItem(index);
18252
18255
  viewItem.isCustom = false;
18253
18256
  var taskTemplateContainer = document.createElement("DIV");
18254
18257
  var taskInformation = this.createCustomTaskInformation(index);
18255
18258
  viewItem.isCustom = true;
18256
- taskTemplateFunction(taskTemplateContainer, taskInformation, function (taskTemplateContainer, taskIndex) { _this.drawCustomTask(taskTemplateContainer, taskIndex); }, index);
18259
+ taskTemplateFunction(taskTemplateContainer, taskInformation, this.onTaskTemplateContainerRendered.bind(this), index);
18260
+ };
18261
+ CustomTaskRender.prototype.onTaskTemplateContainerRendered = function (taskTemplateContainer, taskIndex) {
18262
+ var _this = this;
18263
+ if (this._hasRepeatedTemplateRenderCall(taskIndex)) {
18264
+ if (taskTemplateContainer)
18265
+ this._renderHelper.destroyTemplate(taskTemplateContainer);
18266
+ var templateFunc_1 = this._getLastPendingTemplateFunc(taskIndex);
18267
+ setTimeout(function () { return _this.createCustomTaskElement(taskIndex, templateFunc_1); });
18268
+ }
18269
+ else
18270
+ this.drawCustomTask(taskTemplateContainer, taskIndex);
18271
+ this._clearTemplateFuncsStack(taskIndex);
18272
+ };
18273
+ CustomTaskRender.prototype._saveTemplateFuncToStack = function (index, taskTemplateFunction) {
18274
+ var _a;
18275
+ var _b;
18276
+ (_a = (_b = this._pendingTemplateFuncsToRender)[index]) !== null && _a !== void 0 ? _a : (_b[index] = []);
18277
+ this._pendingTemplateFuncsToRender[index].push(taskTemplateFunction);
18278
+ };
18279
+ CustomTaskRender.prototype._clearTemplateFuncsStack = function (index) { this._pendingTemplateFuncsToRender[index] = []; };
18280
+ CustomTaskRender.prototype._hasRepeatedTemplateRenderCall = function (index) { return this._pendingTemplateFuncsToRender[index].length > 1; };
18281
+ CustomTaskRender.prototype._getLastPendingTemplateFunc = function (index) {
18282
+ var pendingStack = this._pendingTemplateFuncsToRender[index];
18283
+ return pendingStack[pendingStack.length - 1];
18257
18284
  };
18258
18285
  CustomTaskRender.prototype.createCustomTaskWrapperElement = function (index, taskWrapperInfo) {
18259
18286
  RenderElementUtils_1.RenderElementUtils.create(taskWrapperInfo, index, this.taskArea, this.taskElements);
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt.min)
3
- * Version: 4.1.37
4
- * Build date: Thu Dec 01 2022
3
+ * Version: 4.1.39
4
+ * Build date: Fri Dec 23 2022
5
5
  *
6
6
  * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs