@syncfusion/ej2-layouts 25.2.3 → 26.1.38

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 (177) hide show
  1. package/.eslintrc.json +3 -2
  2. package/dist/ej2-layouts.min.js +2 -2
  3. package/dist/ej2-layouts.umd.min.js +2 -2
  4. package/dist/ej2-layouts.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-layouts.es2015.js +215 -140
  6. package/dist/es6/ej2-layouts.es2015.js.map +1 -1
  7. package/dist/es6/ej2-layouts.es5.js +243 -167
  8. package/dist/es6/ej2-layouts.es5.js.map +1 -1
  9. package/dist/global/ej2-layouts.min.js +2 -2
  10. package/dist/global/ej2-layouts.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +7 -7
  13. package/src/dashboard-layout/dashboard-layout.d.ts +2 -2
  14. package/src/dashboard-layout/dashboard-layout.js +55 -76
  15. package/src/splitter/splitter.js +81 -41
  16. package/src/timeline/timeline-model.d.ts +5 -5
  17. package/src/timeline/timeline.d.ts +6 -3
  18. package/src/timeline/timeline.js +107 -33
  19. package/styles/avatar/_bootstrap5.3-definition.scss +26 -0
  20. package/styles/avatar/_fluent2-definition.scss +28 -0
  21. package/styles/avatar/_layout.scss +22 -18
  22. package/styles/avatar/_material3-definition.scss +0 -7
  23. package/styles/avatar/bootstrap-dark.css +7 -4
  24. package/styles/avatar/bootstrap.css +7 -4
  25. package/styles/avatar/bootstrap4.css +7 -4
  26. package/styles/avatar/bootstrap5-dark.css +13 -10
  27. package/styles/avatar/bootstrap5.css +13 -10
  28. package/styles/avatar/fabric-dark.css +7 -4
  29. package/styles/avatar/fabric.css +7 -4
  30. package/styles/avatar/fluent-dark.css +11 -8
  31. package/styles/avatar/fluent.css +11 -8
  32. package/styles/avatar/fluent2.css +1097 -0
  33. package/styles/avatar/fluent2.scss +3 -0
  34. package/styles/avatar/highcontrast-light.css +7 -4
  35. package/styles/avatar/highcontrast.css +7 -4
  36. package/styles/avatar/material-dark.css +7 -4
  37. package/styles/avatar/material.css +7 -4
  38. package/styles/avatar/material3-dark.css +12 -9
  39. package/styles/avatar/material3.css +12 -9
  40. package/styles/avatar/tailwind-dark.css +11 -8
  41. package/styles/avatar/tailwind.css +11 -8
  42. package/styles/bootstrap-dark.css +359 -197
  43. package/styles/bootstrap-dark.scss +14 -5
  44. package/styles/bootstrap.css +359 -197
  45. package/styles/bootstrap.scss +14 -5
  46. package/styles/bootstrap4.css +357 -196
  47. package/styles/bootstrap4.scss +14 -5
  48. package/styles/bootstrap5-dark.css +370 -207
  49. package/styles/bootstrap5-dark.scss +14 -5
  50. package/styles/bootstrap5.css +370 -207
  51. package/styles/bootstrap5.scss +14 -5
  52. package/styles/card/_bootstrap5.3-definition.scss +125 -0
  53. package/styles/card/_fluent2-definition.scss +123 -0
  54. package/styles/card/_layout.scss +13 -4
  55. package/styles/card/_material3-definition.scss +0 -13
  56. package/styles/card/_theme.scss +4 -16
  57. package/styles/card/bootstrap-dark.css +95 -52
  58. package/styles/card/bootstrap.css +95 -52
  59. package/styles/card/bootstrap4.css +95 -52
  60. package/styles/card/bootstrap5-dark.css +95 -52
  61. package/styles/card/bootstrap5.css +95 -52
  62. package/styles/card/fabric-dark.css +95 -52
  63. package/styles/card/fabric.css +95 -52
  64. package/styles/card/fluent-dark.css +99 -54
  65. package/styles/card/fluent.css +99 -54
  66. package/styles/card/fluent2.css +1593 -0
  67. package/styles/card/fluent2.scss +3 -0
  68. package/styles/card/highcontrast-light.css +95 -52
  69. package/styles/card/highcontrast.css +95 -52
  70. package/styles/card/material-dark.css +95 -52
  71. package/styles/card/material.css +97 -53
  72. package/styles/card/material3-dark.css +99 -53
  73. package/styles/card/material3.css +99 -53
  74. package/styles/card/tailwind-dark.css +95 -52
  75. package/styles/card/tailwind.css +95 -52
  76. package/styles/dashboard-layout/_bootstrap5.3-definition.scss +108 -0
  77. package/styles/dashboard-layout/_fluent2-definition.scss +111 -0
  78. package/styles/dashboard-layout/_highcontrast-definition.scss +1 -1
  79. package/styles/dashboard-layout/_layout.scss +62 -60
  80. package/styles/dashboard-layout/_material3-definition.scss +0 -47
  81. package/styles/dashboard-layout/_theme.scss +19 -32
  82. package/styles/dashboard-layout/bootstrap-dark.css +41 -42
  83. package/styles/dashboard-layout/bootstrap.css +41 -42
  84. package/styles/dashboard-layout/bootstrap4.css +41 -42
  85. package/styles/dashboard-layout/bootstrap5-dark.css +48 -47
  86. package/styles/dashboard-layout/bootstrap5.css +48 -47
  87. package/styles/dashboard-layout/fabric-dark.css +41 -42
  88. package/styles/dashboard-layout/fabric.css +41 -42
  89. package/styles/dashboard-layout/fluent-dark.css +46 -46
  90. package/styles/dashboard-layout/fluent.css +46 -46
  91. package/styles/dashboard-layout/fluent2.css +1336 -0
  92. package/styles/dashboard-layout/fluent2.scss +4 -0
  93. package/styles/dashboard-layout/highcontrast-light.css +39 -41
  94. package/styles/dashboard-layout/highcontrast.css +43 -42
  95. package/styles/dashboard-layout/icons/_bootstrap5.3.scss +80 -0
  96. package/styles/dashboard-layout/icons/_fluent2.scss +80 -0
  97. package/styles/dashboard-layout/material-dark.css +41 -42
  98. package/styles/dashboard-layout/material.css +41 -42
  99. package/styles/dashboard-layout/material3-dark.css +48 -47
  100. package/styles/dashboard-layout/material3.css +48 -47
  101. package/styles/dashboard-layout/tailwind-dark.css +57 -55
  102. package/styles/dashboard-layout/tailwind.css +57 -55
  103. package/styles/fabric-dark.css +359 -197
  104. package/styles/fabric-dark.scss +14 -5
  105. package/styles/fabric.css +359 -197
  106. package/styles/fabric.scss +14 -5
  107. package/styles/fluent-dark.css +370 -206
  108. package/styles/fluent-dark.scss +14 -5
  109. package/styles/fluent.css +370 -206
  110. package/styles/fluent.scss +14 -5
  111. package/styles/fluent2.css +2803 -0
  112. package/styles/fluent2.scss +14 -0
  113. package/styles/highcontrast-light.css +357 -196
  114. package/styles/highcontrast-light.scss +13 -5
  115. package/styles/highcontrast.css +361 -197
  116. package/styles/highcontrast.scss +14 -5
  117. package/styles/material-dark.css +357 -196
  118. package/styles/material-dark.scss +14 -5
  119. package/styles/material.css +359 -197
  120. package/styles/material.scss +14 -5
  121. package/styles/material3-dark.css +370 -204
  122. package/styles/material3-dark.scss +14 -5
  123. package/styles/material3.css +370 -204
  124. package/styles/material3.scss +14 -5
  125. package/styles/splitter/_bootstrap5.3-definition.scss +31 -0
  126. package/styles/splitter/_fluent2-definition.scss +31 -0
  127. package/styles/splitter/_layout.scss +0 -4
  128. package/styles/splitter/_material3-definition.scss +0 -7
  129. package/styles/splitter/_theme.scss +0 -4
  130. package/styles/splitter/bootstrap-dark.css +115 -59
  131. package/styles/splitter/bootstrap.css +115 -59
  132. package/styles/splitter/bootstrap4.css +113 -58
  133. package/styles/splitter/bootstrap5-dark.css +113 -58
  134. package/styles/splitter/bootstrap5.css +113 -58
  135. package/styles/splitter/fabric-dark.css +115 -59
  136. package/styles/splitter/fabric.css +115 -59
  137. package/styles/splitter/fluent-dark.css +113 -58
  138. package/styles/splitter/fluent.css +113 -58
  139. package/styles/splitter/fluent2.css +1578 -0
  140. package/styles/splitter/fluent2.scss +4 -0
  141. package/styles/splitter/highcontrast-light.css +115 -59
  142. package/styles/splitter/highcontrast.css +115 -59
  143. package/styles/splitter/icons/_bootstrap5.3.scss +39 -0
  144. package/styles/splitter/icons/_fluent2.scss +39 -0
  145. package/styles/splitter/material-dark.css +113 -58
  146. package/styles/splitter/material.css +113 -58
  147. package/styles/splitter/material3-dark.css +114 -59
  148. package/styles/splitter/material3.css +114 -59
  149. package/styles/splitter/tailwind-dark.css +113 -58
  150. package/styles/splitter/tailwind.css +113 -58
  151. package/styles/tailwind-dark.css +377 -213
  152. package/styles/tailwind-dark.scss +14 -5
  153. package/styles/tailwind.css +377 -213
  154. package/styles/tailwind.scss +14 -5
  155. package/styles/timeline/_bootstrap5.3-definition.scss +18 -0
  156. package/styles/timeline/_fluent2-definition.scss +18 -0
  157. package/styles/timeline/_layout.scss +46 -7
  158. package/styles/timeline/bootstrap-dark.css +99 -39
  159. package/styles/timeline/bootstrap.css +99 -39
  160. package/styles/timeline/bootstrap4.css +99 -39
  161. package/styles/timeline/bootstrap5-dark.css +99 -39
  162. package/styles/timeline/bootstrap5.css +99 -39
  163. package/styles/timeline/fabric-dark.css +99 -39
  164. package/styles/timeline/fabric.css +99 -39
  165. package/styles/timeline/fluent-dark.css +99 -39
  166. package/styles/timeline/fluent.css +99 -39
  167. package/styles/timeline/fluent2.css +1332 -0
  168. package/styles/timeline/fluent2.scss +3 -0
  169. package/styles/timeline/highcontrast-light.css +99 -39
  170. package/styles/timeline/highcontrast.css +99 -39
  171. package/styles/timeline/material-dark.css +99 -39
  172. package/styles/timeline/material.css +99 -39
  173. package/styles/timeline/material3-dark.css +100 -40
  174. package/styles/timeline/material3.css +100 -40
  175. package/styles/timeline/tailwind-dark.css +99 -39
  176. package/styles/timeline/tailwind.css +99 -39
  177. package/CHANGELOG.md +0 -601
@@ -1,4 +1,4 @@
1
- import { Browser, ChildProperty, Collection, Component, Draggable, Event, EventHandler, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, append, attributes, closest, compile, detach, extend, formatUnit, getUniqueID, getValue, isNullOrUndefined, isUndefined, remove, removeClass, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
1
+ import { Property, ChildProperty, isNullOrUndefined, removeClass, addClass, Browser, EventHandler, SanitizeHtmlHelper, extend, detach, formatUnit, setStyleAttribute, select, selectAll, compile, Collection, Event, NotifyPropertyChanges, Component, setValue, append, isUndefined, closest, getValue, Draggable, getUniqueID, attributes, remove } from '@syncfusion/ej2-base';
2
2
 
3
3
  var __extends = (undefined && undefined.__extends) || (function () {
4
4
  var extendStatics = function (d, b) {
@@ -158,8 +158,9 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
158
158
  case 'paneSettings': {
159
159
  if (!(newProp.paneSettings instanceof Array && oldProp.paneSettings instanceof Array)) {
160
160
  var paneCounts = Object.keys(newProp.paneSettings);
161
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
162
- var isPaneContentChanged = paneCounts.some(function (count) { return !isNullOrUndefined(newProp.paneSettings[count].content); });
161
+ var isPaneContentChanged = paneCounts.some(function (count) {
162
+ return !isNullOrUndefined(newProp.paneSettings[count].content);
163
+ });
163
164
  if (this.isReact && isPaneContentChanged) {
164
165
  var cPaneCount = 0;
165
166
  for (var k = 0; k < this.paneSettings.length; k++) {
@@ -195,11 +196,14 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
195
196
  this.collapsibleModelUpdate(index);
196
197
  break;
197
198
  case 'collapsed':
198
- // eslint-disable-next-line
199
- newProp.paneSettings[index].collapsed ? this.isCollapsed(index) : this.collapsedOnchange(index);
199
+ if (newProp.paneSettings[index].collapsed) {
200
+ this.isCollapsed(index);
201
+ }
202
+ else {
203
+ this.collapsedOnchange(index);
204
+ }
200
205
  break;
201
206
  case 'cssClass':
202
- // eslint-disable-next-line max-len
203
207
  this.setCssClass(this.allPanes[index], newProp.paneSettings[index].cssClass);
204
208
  break;
205
209
  case 'size': {
@@ -528,8 +532,12 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
528
532
  return attribute.slice(attribute.lastIndexOf('-') + 1);
529
533
  };
530
534
  Splitter.prototype.setRTL = function (rtl) {
531
- // eslint-disable-next-line
532
- rtl ? addClass([this.element], RTL) : removeClass([this.element], RTL);
535
+ if (rtl) {
536
+ addClass([this.element], RTL);
537
+ }
538
+ else {
539
+ removeClass([this.element], RTL);
540
+ }
533
541
  };
534
542
  Splitter.prototype.setReversePane = function () {
535
543
  this.allPanes = this.allPanes.reverse();
@@ -550,9 +558,12 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
550
558
  };
551
559
  Splitter.prototype.getPanesDimensions = function () {
552
560
  for (var index = 0; index < this.allPanes.length; index++) {
553
- // eslint-disable-next-line
554
- this.orientation === 'Horizontal' ? this.panesDimensions.push(this.allPanes[index].getBoundingClientRect().width) :
561
+ if (this.orientation === 'Horizontal') {
562
+ this.panesDimensions.push(this.allPanes[index].getBoundingClientRect().width);
563
+ }
564
+ else {
555
565
  this.panesDimensions.push(this.allPanes[index].getBoundingClientRect().height);
566
+ }
556
567
  }
557
568
  };
558
569
  Splitter.prototype.setCssClass = function (element, className) {
@@ -579,9 +590,12 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
579
590
  this.showResizer(this.allBars[paneIndex]);
580
591
  removeClass([select('.' + RESIZE_BAR, this.allBars[paneIndex])], HIDE_HANDLER);
581
592
  this.allBars[paneIndex].classList.add(RESIZABLE_BAR);
582
- // eslint-disable-next-line
583
- (index === (this.allBars.length)) ? this.allPanes[index].classList.add(RESIZABLE_PANE) :
593
+ if (index === (this.allBars.length)) {
594
+ this.allPanes[index].classList.add(RESIZABLE_PANE);
595
+ }
596
+ else {
584
597
  this.allPanes[paneIndex].classList.add(RESIZABLE_PANE);
598
+ }
585
599
  this.updateResizablePanes(i);
586
600
  }
587
601
  }
@@ -589,9 +603,12 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
589
603
  this.updateResizablePanes(i);
590
604
  this.hideResizer(this.allBars[paneIndex]);
591
605
  this.allBars[paneIndex].classList.remove(RESIZABLE_BAR);
592
- // eslint-disable-next-line
593
- (index === (this.allBars.length)) ? this.allPanes[index].classList.remove(RESIZABLE_PANE) :
606
+ if (index === (this.allBars.length)) {
607
+ this.allPanes[index].classList.remove(RESIZABLE_PANE);
608
+ }
609
+ else {
594
610
  this.allPanes[paneIndex].classList.remove(RESIZABLE_PANE);
611
+ }
595
612
  }
596
613
  };
597
614
  Splitter.prototype.collapsibleModelUpdate = function (index) {
@@ -656,7 +673,6 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
656
673
  _this.updateIsCollapsed(index, _this.targetArrows().collapseArrow, _this.targetArrows().lastBarArrow);
657
674
  for (var i = 0; i < collapsedindex.length; i++) {
658
675
  if (!_this.allPanes[collapsedindex[i]].classList.contains(COLLAPSE_PANE)) {
659
- // eslint-disable-next-line max-len
660
676
  _this.updateIsCollapsed(collapsedindex[i], _this.targetArrows().collapseArrow, _this.targetArrows().lastBarArrow);
661
677
  }
662
678
  }
@@ -709,8 +725,12 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
709
725
  }
710
726
  };
711
727
  Splitter.prototype.isEnabled = function (enabled) {
712
- // eslint-disable-next-line
713
- enabled ? removeClass([this.element], DISABLED) : addClass([this.element], DISABLED);
728
+ if (enabled) {
729
+ removeClass([this.element], DISABLED);
730
+ }
731
+ else {
732
+ addClass([this.element], DISABLED);
733
+ }
714
734
  };
715
735
  Splitter.prototype.setSeparatorSize = function (size) {
716
736
  var sizeValue = isNullOrUndefined(size) ? 'auto' : size + 'px';
@@ -792,8 +812,12 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
792
812
  };
793
813
  Splitter.prototype.updateSeparatorSize = function (resizeHanlder) {
794
814
  var sizeValue = isNullOrUndefined(this.separatorSize) ? '1px' : this.separatorSize + 'px';
795
- // eslint-disable-next-line
796
- this.orientation === 'Horizontal' ? (resizeHanlder.style.width = sizeValue) : resizeHanlder.style.height = sizeValue;
815
+ if (this.orientation === 'Horizontal') {
816
+ resizeHanlder.style.width = sizeValue;
817
+ }
818
+ else {
819
+ resizeHanlder.style.height = sizeValue;
820
+ }
797
821
  };
798
822
  Splitter.prototype.addResizeHandler = function (currentBar) {
799
823
  var resizeHanlder = this.createElement('div');
@@ -817,16 +841,28 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
817
841
  Splitter.prototype.updateCollapseIcons = function (index, arrow1, arrow2) {
818
842
  if (!isNullOrUndefined(this.paneSettings[index])) {
819
843
  if (!isNullOrUndefined(this.paneSettings[index].collapsible)) {
820
- // eslint-disable-next-line
821
- this.paneSettings[index].collapsible ? removeClass([arrow2], [HIDE_ICON]) : addClass([arrow2], [HIDE_ICON]);
844
+ if (this.paneSettings[index].collapsible) {
845
+ removeClass([arrow2], [HIDE_ICON]);
846
+ }
847
+ else {
848
+ addClass([arrow2], [HIDE_ICON]);
849
+ }
822
850
  if (!isNullOrUndefined(this.paneSettings[index + 1])) {
823
- // eslint-disable-next-line
824
- this.paneSettings[index + 1].collapsible ? removeClass([arrow1], [HIDE_ICON]) : addClass([arrow1], [HIDE_ICON]);
851
+ if (this.paneSettings[index + 1].collapsible) {
852
+ removeClass([arrow1], [HIDE_ICON]);
853
+ }
854
+ else {
855
+ addClass([arrow1], [HIDE_ICON]);
856
+ }
825
857
  }
826
858
  if (!isNullOrUndefined(this.paneSettings[index + 1])) {
827
859
  if ((this.paneSettings[index + 1].collapsible)) {
828
- // eslint-disable-next-line
829
- this.paneSettings[index + 1].collapsible ? removeClass([arrow1], [HIDE_ICON]) : addClass([arrow1], [HIDE_ICON]);
860
+ if (this.paneSettings[index + 1].collapsible) {
861
+ removeClass([arrow1], [HIDE_ICON]);
862
+ }
863
+ else {
864
+ addClass([arrow1], [HIDE_ICON]);
865
+ }
830
866
  }
831
867
  }
832
868
  }
@@ -854,8 +890,7 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
854
890
  arrow1.setAttribute('type', 'button');
855
891
  arrow2.setAttribute('type', 'button');
856
892
  var size = isNullOrUndefined(this.separatorSize) ? '1px' : this.separatorSize + 'px';
857
- // eslint-disable-next-line
858
- var proxy = this;
893
+ var proxy = this;
859
894
  if (this.orientation === 'Horizontal') {
860
895
  this.updateIconClass();
861
896
  addClass([arrow2], [NAVIGATE_ARROW, ARROW_LEFT, HIDE_ICON]);
@@ -895,8 +930,12 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
895
930
  };
896
931
  Splitter.prototype.updateResizablePanes = function (index) {
897
932
  this.getPaneDetails();
898
- // eslint-disable-next-line
899
- this.isResizable() ? this.allPanes[index].classList.add(RESIZABLE_PANE) : this.allPanes[index].classList.remove(RESIZABLE_PANE);
933
+ if (this.isResizable()) {
934
+ this.allPanes[index].classList.add(RESIZABLE_PANE);
935
+ }
936
+ else {
937
+ this.allPanes[index].classList.remove(RESIZABLE_PANE);
938
+ }
900
939
  };
901
940
  Splitter.prototype.addSeparator = function (target) {
902
941
  var childCount = this.allPanes.length;
@@ -1050,9 +1089,9 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
1050
1089
  }
1051
1090
  for (var j = 0, len = this.allBars.length; j < len; j++) {
1052
1091
  totalWidth += this.orientation === 'Horizontal' ? parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) +
1053
- // eslint-disable-next-line max-len
1054
- parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) : parseInt(getComputedStyle(this.allBars[j]).marginTop, 10) +
1055
- parseInt(getComputedStyle(this.allBars[j]).marginBottom, 10);
1092
+ parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) :
1093
+ parseInt(getComputedStyle(this.allBars[j]).marginTop, 10) +
1094
+ parseInt(getComputedStyle(this.allBars[j]).marginBottom, 10);
1056
1095
  }
1057
1096
  var diff = this.orientation === 'Horizontal' ? this.element.offsetWidth -
1058
1097
  ((this.border * 2) + totalWidth) :
@@ -1858,8 +1897,7 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
1858
1897
  this.updateSplitterSize();
1859
1898
  }
1860
1899
  };
1861
- // eslint-disable-next-line
1862
- Splitter.prototype.validateMinRange = function (paneIndex, paneCurrentWidth, pane) {
1900
+ Splitter.prototype.validateMinRange = function (paneIndex, paneCurrentWidth) {
1863
1901
  var paneMinRange = null;
1864
1902
  var paneMinDimensions;
1865
1903
  var difference = 0;
@@ -1882,8 +1920,7 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
1882
1920
  }
1883
1921
  return isNullOrUndefined(validatedVal) ? paneCurrentWidth : validatedVal;
1884
1922
  };
1885
- // eslint-disable-next-line
1886
- Splitter.prototype.validateMaxRange = function (paneIndex, paneCurrentWidth, pane) {
1923
+ Splitter.prototype.validateMaxRange = function (paneIndex, paneCurrentWidth) {
1887
1924
  var paneMaxRange = null;
1888
1925
  var paneMaxDimensions;
1889
1926
  var validatedVal;
@@ -1905,13 +1942,13 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
1905
1942
  };
1906
1943
  Splitter.prototype.validateMinMaxValues = function () {
1907
1944
  //validate previous pane minimum range
1908
- this.prevPaneCurrentWidth = this.validateMinRange(this.prevPaneIndex, this.prevPaneCurrentWidth, this.previousPane);
1945
+ this.prevPaneCurrentWidth = this.validateMinRange(this.prevPaneIndex, this.prevPaneCurrentWidth);
1909
1946
  // Validate next pane minimum range
1910
- this.nextPaneCurrentWidth = this.validateMinRange(this.nextPaneIndex, this.nextPaneCurrentWidth, this.nextPane);
1947
+ this.nextPaneCurrentWidth = this.validateMinRange(this.nextPaneIndex, this.nextPaneCurrentWidth);
1911
1948
  // validate previous pane maximum range
1912
- this.prevPaneCurrentWidth = this.validateMaxRange(this.prevPaneIndex, this.prevPaneCurrentWidth, this.previousPane);
1949
+ this.prevPaneCurrentWidth = this.validateMaxRange(this.prevPaneIndex, this.prevPaneCurrentWidth);
1913
1950
  // validate next pane maximum range
1914
- this.nextPaneCurrentWidth = this.validateMaxRange(this.nextPaneIndex, this.nextPaneCurrentWidth, this.nextPane);
1951
+ this.nextPaneCurrentWidth = this.validateMaxRange(this.nextPaneIndex, this.nextPaneCurrentWidth);
1915
1952
  };
1916
1953
  Splitter.prototype.equatePaneWidths = function () {
1917
1954
  var difference;
@@ -2056,7 +2093,6 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
2056
2093
  };
2057
2094
  // eslint-disable-next-line
2058
2095
  Splitter.prototype.templateCompile = function (ele, cnt) {
2059
- // eslint-disable-next-line
2060
2096
  var tempEle = this.createElement('div');
2061
2097
  this.compileElement(tempEle, cnt, 'content');
2062
2098
  if (tempEle.childNodes.length !== 0) {
@@ -2066,7 +2102,6 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
2066
2102
  }
2067
2103
  };
2068
2104
  Splitter.prototype.compileElement = function (ele, val, prop) {
2069
- // eslint-disable-next-line
2070
2105
  if (typeof (val) === 'string') {
2071
2106
  if (val[0] === '.' || val[0] === '#') {
2072
2107
  var eleVal = document.querySelector(val);
@@ -2211,9 +2246,12 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
2211
2246
  }
2212
2247
  };
2213
2248
  Splitter.prototype.addPaneClass = function (pane) {
2214
- // eslint-disable-next-line
2215
- this.orientation === 'Horizontal' ? addClass([pane], [PANE, SPLIT_H_PANE, SCROLL_PANE]) :
2249
+ if (this.orientation === 'Horizontal') {
2250
+ addClass([pane], [PANE, SPLIT_H_PANE, SCROLL_PANE]);
2251
+ }
2252
+ else {
2216
2253
  addClass([pane], [PANE, SPLIT_V_PANE, SCROLL_PANE]);
2254
+ }
2217
2255
  return pane;
2218
2256
  };
2219
2257
  Splitter.prototype.removePaneOrders = function (paneClass) {
@@ -2366,10 +2404,6 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
2366
2404
  return Splitter;
2367
2405
  }(Component));
2368
2406
 
2369
- /**
2370
- * splitter modules
2371
- */
2372
-
2373
2407
  var __extends$1 = (undefined && undefined.__extends) || (function () {
2374
2408
  var extendStatics = function (d, b) {
2375
2409
  extendStatics = Object.setPrototypeOf ||
@@ -2658,9 +2692,11 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
2658
2692
  else {
2659
2693
  this.cellSize[0] = this.element.parentElement &&
2660
2694
  ((this.element.parentElement.offsetWidth));
2661
- this.cellSize[0] = this.element.parentElement
2662
- && ((this.element.parentElement.offsetWidth - ((this.maxCol() - 1) * this.cellSpacing[0]))
2663
- / (this.maxCol()));
2695
+ if (!isNullOrUndefined(this.cellSpacing)) {
2696
+ this.cellSize[0] = this.element.parentElement
2697
+ && ((this.element.parentElement.offsetWidth - ((this.maxCol() - 1) * this.cellSpacing[0]))
2698
+ / (this.maxCol()));
2699
+ }
2664
2700
  this.cellSize[1] = this.cellSize[0] / this.cellAspectRatio;
2665
2701
  }
2666
2702
  };
@@ -2689,9 +2725,9 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
2689
2725
  DashboardLayout.prototype.updateOldRowColumn = function () {
2690
2726
  for (var i = 0; i < this.panels.length; i++) {
2691
2727
  var id = this.panels[i].id;
2692
- if (this.element.querySelector("[id='" + id + "']")) {
2693
- var row = parseInt(this.element.querySelector("[id='" + id + "']").getAttribute('data-row'), 10);
2694
- var col = parseInt(this.element.querySelector("[id='" + id + "']").getAttribute('data-col'), 10);
2728
+ if (this.element.querySelector('[id=\'' + id + '\']')) {
2729
+ var row = parseInt(this.element.querySelector('[id=\'' + id + '\']').getAttribute('data-row'), 10);
2730
+ var col = parseInt(this.element.querySelector('[id=\'' + id + '\']').getAttribute('data-col'), 10);
2695
2731
  this.oldRowCol[this.panels[i].id] = { row: row, col: col };
2696
2732
  }
2697
2733
  else {
@@ -2750,7 +2786,6 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
2750
2786
  }
2751
2787
  }
2752
2788
  else {
2753
- // eslint-disable-next-line
2754
2789
  var compilerFn = templateFn({}, this, prop, type, isStringTemplate, null, appendElement);
2755
2790
  if (compilerFn) {
2756
2791
  for (var _i = 0, compilerFn_1 = compilerFn; _i < compilerFn_1.length; _i++) {
@@ -2830,7 +2865,6 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
2830
2865
  model.enabled = true;
2831
2866
  }
2832
2867
  panelElement.style.zIndex = '' + model.zIndex;
2833
- // eslint-disable-next-line
2834
2868
  var panelProp = new Panel(this, 'panels', model, true);
2835
2869
  this.panels.push(panelProp);
2836
2870
  this.oldRowCol[model.id] = { row: model.row, col: model.col };
@@ -2849,7 +2883,6 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
2849
2883
  };
2850
2884
  DashboardLayout.prototype.bindEvents = function () {
2851
2885
  this.refreshListener = this.refresh.bind(this);
2852
- // eslint-disable-next-line
2853
2886
  EventHandler.add(window, 'resize', this.refreshListener);
2854
2887
  this.resizeEvents();
2855
2888
  };
@@ -3262,7 +3295,6 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
3262
3295
  else {
3263
3296
  if (this.element.classList.contains(responsive)) {
3264
3297
  removeClass([this.element], [responsive]);
3265
- // eslint-disable-next-line
3266
3298
  var internalPanels = this.element.querySelectorAll(((this.element.id) ? '#' + this.element.id + ' > ' : '') + '.e-panel');
3267
3299
  for (var i = 0; i < internalPanels.length; i++) {
3268
3300
  var ele = internalPanels[i];
@@ -3340,7 +3372,6 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
3340
3372
  this.updatedRows = updatedPanel.length;
3341
3373
  for (var i = 0; i < updatedPanel.length; i++) {
3342
3374
  var panelElement = document.getElementById(updatedPanel[i].id);
3343
- // eslint-disable-next-line
3344
3375
  var updatedHeight = void 0;
3345
3376
  if (panelElement) {
3346
3377
  setStyleAttribute(panelElement, { 'width': '100%' });
@@ -3349,8 +3380,7 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
3349
3380
  if (updatedPanel[i].sizeY > 1) {
3350
3381
  updatedHeight = ((this.element.parentElement
3351
3382
  && this.element.parentElement.offsetWidth / this.cellAspectRatio) * updatedPanel[i].sizeY) +
3352
- // eslint-disable-next-line radix
3353
- parseInt((Math.round(updatedPanel[i].sizeY / 2) * this.cellSpacing[1]).toString(), 0);
3383
+ parseInt((Math.round(updatedPanel[i].sizeY / 2) * this.cellSpacing[1]).toString(), 10);
3354
3384
  panelElement.style.height = '' + updatedHeight + 'px';
3355
3385
  }
3356
3386
  this.resizeHeight = true;
@@ -3387,7 +3417,9 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
3387
3417
  };
3388
3418
  DashboardLayout.prototype.setHeightWidth = function () {
3389
3419
  var heightValue;
3390
- var widthValue;
3420
+ if (isNullOrUndefined(this.cellSpacing)) {
3421
+ return;
3422
+ }
3391
3423
  if (this.checkMediaQuery()) {
3392
3424
  var entirePanelsY = 0;
3393
3425
  for (var i = 0; i < this.panels.length; i++) {
@@ -3404,8 +3436,7 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
3404
3436
  (this.cellSize[0] / this.cellAspectRatio) + (this.maxRow() - 1) * this.cellSpacing[1]) + 'px';
3405
3437
  }
3406
3438
  setStyleAttribute(this.element, { 'height': heightValue });
3407
- // eslint-disable-next-line prefer-const
3408
- widthValue = window.getComputedStyle(this.element).width;
3439
+ var widthValue = window.getComputedStyle(this.element).width;
3409
3440
  setStyleAttribute(this.element, { 'width': widthValue });
3410
3441
  };
3411
3442
  DashboardLayout.prototype.setHeightAndWidth = function (panelElement, panelModel) {
@@ -3505,7 +3536,6 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
3505
3536
  }
3506
3537
  };
3507
3538
  DashboardLayout.prototype.panelPropertyChange = function (panel, value) {
3508
- // eslint-disable-next-line
3509
3539
  panel.setProperties(value, true);
3510
3540
  };
3511
3541
  DashboardLayout.prototype.renderDashBoardCells = function (cells) {
@@ -3548,9 +3578,9 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
3548
3578
  for (var h = 0; h < sizeY; ++h) {
3549
3579
  for (var w = 0; w < sizeX; ++w) {
3550
3580
  item = this.getPanel(row + h, col + w, ignore);
3551
- if (item && (!ignore || ignore.indexOf(this.element.querySelector("[id='" + item.id + "']")) === -1) &&
3552
- items.indexOf(this.element.querySelector("[id='" + item.id + "']")) === -1) {
3553
- items.push(this.element.querySelector("[id='" + item.id + "']"));
3581
+ if (item && (!ignore || ignore.indexOf(this.element.querySelector('[id=\'' + item.id + '\']')) === -1) &&
3582
+ items.indexOf(this.element.querySelector('[id=\'' + item.id + '\']')) === -1) {
3583
+ items.push(this.element.querySelector('[id=\'' + item.id + '\']'));
3554
3584
  }
3555
3585
  }
3556
3586
  }
@@ -3845,8 +3875,6 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
3845
3875
  exclusions.push(ele);
3846
3876
  if (updatedCollision.length === 0) {
3847
3877
  isRightAdjudtable = true;
3848
- // eslint-disable-next-line no-self-assign
3849
- this.spacedColumnValue = this.spacedColumnValue;
3850
3878
  return isRightAdjudtable;
3851
3879
  }
3852
3880
  else {
@@ -3918,7 +3946,7 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
3918
3946
  }
3919
3947
  if (this.mainElement && this.oldRowCol !== this.cloneObject) {
3920
3948
  for (var i = 0; i < this.panels.length; i++) {
3921
- var element = this.element.querySelector("[id='" + this.panels[i].id + "']");
3949
+ var element = this.element.querySelector('[id=\'' + this.panels[i].id + '\']');
3922
3950
  if (element === this.mainElement) {
3923
3951
  continue;
3924
3952
  }
@@ -4073,6 +4101,7 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4073
4101
  });
4074
4102
  };
4075
4103
  DashboardLayout.prototype.updatePanelLayout = function (element, panelModel) {
4104
+ var _this = this;
4076
4105
  this.collisionChecker = {};
4077
4106
  var initialModel = [];
4078
4107
  var checkForAdjustment;
@@ -4126,11 +4155,9 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4126
4155
  }
4127
4156
  }
4128
4157
  if (collisionModels.length > 0) {
4129
- // eslint-disable-next-line
4130
- var proxy_1 = this;
4131
4158
  collisionModels.forEach(function (item1) {
4132
- if (proxy_1.overlapElement.indexOf(item1) === -1) {
4133
- proxy_1.overlapElement.push(item1);
4159
+ if (_this.overlapElement.indexOf(item1) === -1) {
4160
+ _this.overlapElement.push(item1);
4134
4161
  }
4135
4162
  });
4136
4163
  if (this.overlapElement && this.overlapElement.indexOf(element) !== -1) {
@@ -4242,15 +4269,14 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4242
4269
  }
4243
4270
  };
4244
4271
  DashboardLayout.prototype.collisionPanel = function (collisionModels, colValue, updatedRow, clone) {
4272
+ var _this = this;
4245
4273
  var panelModel = this.getCellInstance(clone.id);
4246
4274
  this.panelPropertyChange(panelModel, { row: updatedRow, col: colValue });
4247
4275
  if (collisionModels.length > 0) {
4248
- // eslint-disable-next-line
4249
- var proxy_2 = this;
4250
4276
  this.overlapElement = [];
4251
4277
  this.shouldRestrict = true;
4252
4278
  collisionModels.forEach(function (item1) {
4253
- proxy_2.overlapElement.push(item1);
4279
+ _this.overlapElement.push(item1);
4254
4280
  });
4255
4281
  var overlapElementRow1 = parseInt(clone.getAttribute('data-row'), 10);
4256
4282
  for (var m = 0; m < this.overlapElement.length; m++) {
@@ -4263,27 +4289,21 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4263
4289
  this.sortedPanel();
4264
4290
  }
4265
4291
  if (this.overlapSubElementClone.length > 0) {
4266
- var _loop_5 = function (p) {
4267
- var rowVal = parseInt(this_3.overlapSubElementClone[p].getAttribute('data-row'), 10);
4268
- var colValue_1 = parseInt(this_3.overlapSubElementClone[p].getAttribute('data-col'), 10);
4269
- var sizeX = parseInt(this_3.overlapSubElementClone[p].getAttribute('data-sizeX'), 10);
4270
- var sizeY = parseInt(this_3.overlapSubElementClone[p].getAttribute('data-sizeY'), 10);
4271
- var collisionModels1 = this_3.collisions(rowVal, colValue_1, sizeX, sizeY, this_3.overlapSubElementClone);
4272
- if (this_3.mainElement && collisionModels1.indexOf(this_3.mainElement) !== -1) {
4273
- collisionModels1.splice(collisionModels1.indexOf(this_3.mainElement), 1);
4292
+ for (var p = 0; p < this.overlapSubElementClone.length; p++) {
4293
+ var rowVal = parseInt(this.overlapSubElementClone[p].getAttribute('data-row'), 10);
4294
+ var colValue_1 = parseInt(this.overlapSubElementClone[p].getAttribute('data-col'), 10);
4295
+ var sizeX = parseInt(this.overlapSubElementClone[p].getAttribute('data-sizeX'), 10);
4296
+ var sizeY = parseInt(this.overlapSubElementClone[p].getAttribute('data-sizeY'), 10);
4297
+ var collisionModels1 = this.collisions(rowVal, colValue_1, sizeX, sizeY, this.overlapSubElementClone);
4298
+ if (this.mainElement && collisionModels1.indexOf(this.mainElement) !== -1) {
4299
+ collisionModels1.splice(collisionModels1.indexOf(this.mainElement), 1);
4274
4300
  }
4275
- // eslint-disable-next-line
4276
- var proxy = this_3;
4277
4301
  collisionModels1.forEach(function (item1) {
4278
- proxy.overlapElement.push(item1);
4302
+ _this.overlapElement.push(item1);
4279
4303
  });
4280
4304
  if (collisionModels1.length > 0) {
4281
- this_3.updateRowColumn(rowVal, this_3.overlapElement, this_3.overlapSubElementClone[p]);
4305
+ this.updateRowColumn(rowVal, this.overlapElement, this.overlapSubElementClone[p]);
4282
4306
  }
4283
- };
4284
- var this_3 = this;
4285
- for (var p = 0; p < this.overlapSubElementClone.length; p++) {
4286
- _loop_5(p);
4287
4307
  }
4288
4308
  }
4289
4309
  this.overlapSubElementClone = [];
@@ -4343,14 +4363,14 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4343
4363
  DashboardLayout.prototype.setXYAttributes = function (element, panelModel) {
4344
4364
  var value = {
4345
4365
  value: {
4346
- sizeX: panelModel.sizeX.toString(),
4347
- sizeY: panelModel.sizeY.toString(),
4348
- minSizeX: panelModel.minSizeX.toString(),
4349
- minSizeY: panelModel.minSizeY.toString(),
4366
+ sizeX: !isNullOrUndefined(panelModel.sizeX) ? panelModel.sizeX.toString() : undefined,
4367
+ sizeY: !isNullOrUndefined(panelModel.sizeY) ? panelModel.sizeY.toString() : undefined,
4368
+ minSizeX: !isNullOrUndefined(panelModel.minSizeX) ? panelModel.minSizeX.toString() : undefined,
4369
+ minSizeY: !isNullOrUndefined(panelModel.minSizeY) ? panelModel.minSizeY.toString() : undefined,
4350
4370
  maxSizeX: !isNullOrUndefined(panelModel.maxSizeX) ? panelModel.maxSizeX.toString() : undefined,
4351
4371
  maxSizeY: !isNullOrUndefined(panelModel.maxSizeY) ? panelModel.maxSizeY.toString() : undefined,
4352
- row: panelModel.row.toString(),
4353
- col: panelModel.col.toString()
4372
+ row: !isNullOrUndefined(panelModel.row) ? panelModel.row.toString() : undefined,
4373
+ col: !isNullOrUndefined(panelModel.col) ? panelModel.col.toString() : undefined
4354
4374
  }
4355
4375
  };
4356
4376
  this.setAttributes(value, element);
@@ -4408,18 +4428,18 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4408
4428
  };
4409
4429
  DashboardLayout.prototype.enableDraggingContent = function (collections) {
4410
4430
  var _this = this;
4411
- var _loop_6 = function (i) {
4431
+ var _loop_5 = function (i) {
4412
4432
  var abortArray = ['.e-resize', '.' + dragRestrict];
4413
4433
  var cellElement = collections[i];
4414
4434
  {
4415
- this_4.dragobj = new Draggable(cellElement, {
4435
+ this_3.dragobj = new Draggable(cellElement, {
4416
4436
  preventDefault: false,
4417
4437
  clone: false,
4418
- dragArea: this_4.element,
4438
+ dragArea: this_3.element,
4419
4439
  isDragScroll: true,
4420
- handle: this_4.draggableHandle ? this_4.draggableHandle : '.e-panel',
4440
+ handle: this_3.draggableHandle ? this_3.draggableHandle : '.e-panel',
4421
4441
  abort: abortArray,
4422
- dragStart: this_4.onDraggingStart.bind(this_4),
4442
+ dragStart: this_3.onDraggingStart.bind(this_3),
4423
4443
  dragStop: function (args) {
4424
4444
  _this.trigger('dragStop', args);
4425
4445
  if (isNullOrUndefined(args.cancel)) {
@@ -4503,15 +4523,15 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4503
4523
  _this.onDragStart(args);
4504
4524
  }
4505
4525
  });
4506
- if (this_4.dragCollection.indexOf(this_4.dragobj) === -1) {
4507
- this_4.dragCollection.push(this_4.dragobj);
4526
+ if (this_3.dragCollection.indexOf(this_3.dragobj) === -1) {
4527
+ this_3.dragCollection.push(this_3.dragobj);
4508
4528
  }
4509
4529
  }
4510
4530
  out_i_1 = i;
4511
4531
  };
4512
- var this_4 = this, out_i_1;
4532
+ var this_3 = this, out_i_1;
4513
4533
  for (var i = 0; i < collections.length; i++) {
4514
- _loop_6(i);
4534
+ _loop_5(i);
4515
4535
  i = out_i_1;
4516
4536
  }
4517
4537
  };
@@ -4522,7 +4542,6 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4522
4542
  };
4523
4543
  DashboardLayout.prototype.updateDragArea = function () {
4524
4544
  this.dragCollection.forEach(function (dragobj) {
4525
- // eslint-disable-next-line
4526
4545
  dragobj.setDragArea();
4527
4546
  });
4528
4547
  };
@@ -4534,8 +4553,7 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4534
4553
  };
4535
4554
  DashboardLayout.prototype.onDraggingStart = function (args) {
4536
4555
  var dragArgs = args;
4537
- // eslint-disable-next-line
4538
- this.trigger('dragStart', dragArgs, function (dragArgs) {
4556
+ this.trigger('dragStart', dragArgs, function () {
4539
4557
  if (isNullOrUndefined(args.cancel)) {
4540
4558
  args.cancel = false;
4541
4559
  }
@@ -4569,13 +4587,11 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4569
4587
  removeClass([args.element], [dragging]);
4570
4588
  }
4571
4589
  };
4572
- // eslint-disable-next-line
4573
4590
  DashboardLayout.prototype.cloneModels = function (source, target) {
4574
4591
  if (target === undefined) {
4575
4592
  target = [];
4576
4593
  }
4577
4594
  for (var i = 0; i < source.length; i++) {
4578
- // tslint:disable-next-line
4579
4595
  if (!target[i]) {
4580
4596
  target[i] = {};
4581
4597
  }
@@ -4619,7 +4635,7 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4619
4635
  this.mainElement = args.element;
4620
4636
  var model = panelModel;
4621
4637
  this.checkCollision = this.collisions(model.row, model.col, model.sizeX, model.sizeY, args.element);
4622
- if (panelModel.col >= this.checkColumnValue) {
4638
+ if (panelModel.col >= 0 || panelModel.col >= this.checkColumnValue) {
4623
4639
  this.checkCollision = [];
4624
4640
  }
4625
4641
  this.updatePanelLayout(args.element, panelModel);
@@ -4735,7 +4751,6 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4735
4751
  panel.id = 'layout_' + this.panelID.toString();
4736
4752
  this.panelID = this.panelID + 1;
4737
4753
  }
4738
- // eslint-disable-next-line
4739
4754
  var panelProp = new Panel(this, 'panels', panel, true);
4740
4755
  this.panels.push(panelProp);
4741
4756
  this.panelsInitialModel = this.cloneModels(this.panels);
@@ -5058,7 +5073,6 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
5058
5073
  * @returns void
5059
5074
  */
5060
5075
  DashboardLayout.prototype.destroy = function () {
5061
- // eslint-disable-next-line
5062
5076
  EventHandler.remove(window, 'resize', this.refreshListener);
5063
5077
  removeClass([this.element], ['e-dashboardlayout', 'e-lib', 'e-responsive', 'e-control']);
5064
5078
  this.element.removeAttribute('style');
@@ -5159,8 +5173,7 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
5159
5173
  *
5160
5174
  * @private
5161
5175
  */
5162
- // eslint-disable-next-line
5163
- DashboardLayout.prototype.onPropertyChanged = function (newProp, oldProp) {
5176
+ DashboardLayout.prototype.onPropertyChanged = function (newProp) {
5164
5177
  var _this = this;
5165
5178
  if (newProp.panels && newProp.panels.length > 0 && newProp.panels[0] instanceof Panel) {
5166
5179
  this.checkForIDValues(newProp.panels);
@@ -5295,7 +5308,6 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
5295
5308
  var key = keys_1[_i];
5296
5309
  if ((typeof getValue(key, this) === 'object' && !isNullOrUndefined(getValue(key, this)))) {
5297
5310
  if (Array.isArray(getValue(key, this)) && key === 'panels') {
5298
- // eslint-disable-next-line
5299
5311
  this.mergePanels(dataObj[key], this[key]);
5300
5312
  this[key] = dataObj[key];
5301
5313
  }
@@ -5307,16 +5319,16 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
5307
5319
  /* istanbul ignore next */
5308
5320
  DashboardLayout.prototype.mergePanels = function (sortedPanels, panels) {
5309
5321
  var storedColumns = sortedPanels;
5310
- var _loop_7 = function (i) {
5311
- this_5.checkForIDValues(panels);
5322
+ var _loop_6 = function (i) {
5323
+ this_4.checkForIDValues(panels);
5312
5324
  var localPanel = panels.filter(function (pan) { return pan.id === storedColumns[i].id; })[0];
5313
5325
  if (!isNullOrUndefined(localPanel)) {
5314
5326
  storedColumns[i] = extend(localPanel, storedColumns[i], {}, true);
5315
5327
  }
5316
5328
  };
5317
- var this_5 = this;
5329
+ var this_4 = this;
5318
5330
  for (var i = 0; i < storedColumns.length; i++) {
5319
- _loop_7(i);
5331
+ _loop_6(i);
5320
5332
  }
5321
5333
  };
5322
5334
  /**
@@ -5404,10 +5416,6 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
5404
5416
  return DashboardLayout;
5405
5417
  }(Component));
5406
5418
 
5407
- /**
5408
- * dashboardlayout modules
5409
- */
5410
-
5411
5419
  var __extends$2 = (undefined && undefined.__extends) || (function () {
5412
5420
  var extendStatics = function (d, b) {
5413
5421
  extendStatics = Object.setPrototypeOf ||
@@ -5534,7 +5542,7 @@ var Timeline = /** @__PURE__ @class */ (function (_super) {
5534
5542
  /**
5535
5543
  * To get component name.
5536
5544
  *
5537
- * @returns {string} - Module Name
5545
+ * @returns {string} - It returns the current module name.
5538
5546
  * @private
5539
5547
  */
5540
5548
  Timeline.prototype.getModuleName = function () {
@@ -5544,7 +5552,7 @@ var Timeline = /** @__PURE__ @class */ (function (_super) {
5544
5552
  * This method is abstract member of the Component<HTMLElement>.
5545
5553
  *
5546
5554
  * @private
5547
- * @returns {string}
5555
+ * @returns {string} - It returns the persisted data.
5548
5556
  */
5549
5557
  Timeline.prototype.getPersistData = function () {
5550
5558
  return this.addOnPersist([]);
@@ -5562,14 +5570,16 @@ var Timeline = /** @__PURE__ @class */ (function (_super) {
5562
5570
  this.element.appendChild(this.timelineListEle);
5563
5571
  };
5564
5572
  Timeline.prototype.updateOrientation = function () {
5565
- var orientation = this.orientation.toLowerCase();
5566
- if (orientation === 'horizontal' || orientation === 'vertical') {
5567
- this.element.classList.remove(HORIZONTAL, VERTICAL);
5568
- this.element.classList.add('e-' + orientation);
5573
+ if (!(isNullOrUndefined(this.orientation))) {
5574
+ var orientation_1 = this.orientation.toLowerCase();
5575
+ if (orientation_1 === 'horizontal' || orientation_1 === 'vertical') {
5576
+ this.element.classList.remove(HORIZONTAL, VERTICAL);
5577
+ this.element.classList.add('e-' + orientation_1);
5578
+ }
5569
5579
  }
5570
5580
  };
5571
5581
  Timeline.prototype.updateCssClass = function (addCss, removeCss) {
5572
- if (removeCss === void 0) { removeCss = ""; }
5582
+ if (removeCss === void 0) { removeCss = ''; }
5573
5583
  var _a, _b;
5574
5584
  var cssClasses;
5575
5585
  if (removeCss) {
@@ -5585,10 +5595,12 @@ var Timeline = /** @__PURE__ @class */ (function (_super) {
5585
5595
  this.element.classList[this.enableRtl ? 'add' : 'remove'](RTL$1);
5586
5596
  };
5587
5597
  Timeline.prototype.updateAlign = function () {
5588
- var align = this.align.toLowerCase();
5589
- if (align === 'before' || align === 'after' || align === 'alternate' || align === 'alternatereverse') {
5590
- this.element.classList.remove('e-align-before', 'e-align-after', 'e-align-alternate', 'e-align-alternatereverse');
5591
- this.element.classList.add('e-align-' + align);
5598
+ if (!(isNullOrUndefined(this.align))) {
5599
+ var align = this.align.toLowerCase();
5600
+ if (align === 'before' || align === 'after' || align === 'alternate' || align === 'alternatereverse') {
5601
+ this.element.classList.remove('e-align-before', 'e-align-after', 'e-align-alternate', 'e-align-alternatereverse');
5602
+ this.element.classList.add('e-align-' + align);
5603
+ }
5592
5604
  }
5593
5605
  };
5594
5606
  Timeline.prototype.updateReverse = function () {
@@ -5597,19 +5609,14 @@ var Timeline = /** @__PURE__ @class */ (function (_super) {
5597
5609
  Timeline.prototype.renderItems = function () {
5598
5610
  var _this = this;
5599
5611
  var _a;
5612
+ this.haveOneSidecontent();
5600
5613
  for (var index = 0; index < this.items.length; index++) {
5601
5614
  var item = this.items[parseInt(index.toString(), 10)];
5602
5615
  var timelineItem = this.createElement('li', { className: ITEMCONTAINER + ' ' + ITEMCONNECTOR });
5603
5616
  if (!this.template) {
5604
5617
  var oppositeTextEle = this.createElement('div', { className: OPPOSITECONTENT });
5605
5618
  if (item.oppositeContent) {
5606
- var oppositeCtn = this.getTemplateFunction(item.oppositeContent);
5607
- if (typeof oppositeCtn === 'string') {
5608
- oppositeTextEle.innerText = oppositeCtn;
5609
- }
5610
- else {
5611
- append(oppositeCtn({ item: item, itemIndex: index }), oppositeTextEle);
5612
- }
5619
+ this.updateItemContent(false, item, index, oppositeTextEle);
5613
5620
  }
5614
5621
  timelineItem.appendChild(oppositeTextEle);
5615
5622
  var dotContainer = this.createElement('div', { className: DOTCONTAINER });
@@ -5619,13 +5626,7 @@ var Timeline = /** @__PURE__ @class */ (function (_super) {
5619
5626
  timelineItem.appendChild(dotContainer);
5620
5627
  var contentEle = this.createElement('div', { className: CONTENT });
5621
5628
  if (item.content) {
5622
- var ctn = this.getTemplateFunction(item.content);
5623
- if (typeof ctn === 'string') {
5624
- contentEle.innerText = ctn;
5625
- }
5626
- else {
5627
- append(ctn({ item: item, itemIndex: index }), contentEle);
5628
- }
5629
+ this.updateItemContent(true, item, index, contentEle);
5629
5630
  }
5630
5631
  timelineItem.appendChild(contentEle);
5631
5632
  if (item.cssClass) {
@@ -5642,6 +5643,36 @@ var Timeline = /** @__PURE__ @class */ (function (_super) {
5642
5643
  this.trigger('beforeItemRender', eventArgs, function (args) { _this.timelineListEle.appendChild(args.element); });
5643
5644
  }
5644
5645
  };
5646
+ Timeline.prototype.haveOneSidecontent = function () {
5647
+ var haveContent = false;
5648
+ var haveOppContent = false;
5649
+ for (var index = 0; index < this.items.length; index++) {
5650
+ var item = this.items[parseInt(index.toString(), 10)];
5651
+ if (!haveContent) {
5652
+ haveContent = item.content.length > 0;
5653
+ }
5654
+ if (!haveOppContent) {
5655
+ haveOppContent = item.oppositeContent.length > 0;
5656
+ }
5657
+ }
5658
+ this.element.classList.remove('e-content-only', 'e-opposite-content-only');
5659
+ if (haveContent && !haveOppContent) {
5660
+ this.element.classList.add('e-content-only');
5661
+ }
5662
+ if (haveOppContent && !haveContent) {
5663
+ this.element.classList.add('e-opposite-content-only');
5664
+ }
5665
+ };
5666
+ Timeline.prototype.updateItemContent = function (isContent, item, index, contentEle) {
5667
+ var notCompile = !(this.isReact || this.isVue);
5668
+ var ctn = this.getTemplateFunction(isContent ? item.content : item.oppositeContent, notCompile);
5669
+ if (typeof ctn === 'string') {
5670
+ contentEle.innerText = ctn;
5671
+ }
5672
+ else {
5673
+ append(ctn({ item: item, itemIndex: index }, this), contentEle);
5674
+ }
5675
+ };
5645
5676
  Timeline.prototype.updateTemplateFunction = function () {
5646
5677
  this.templateFunction = this.template ? this.getTemplateFunction(this.template, false) : null;
5647
5678
  };
@@ -5651,8 +5682,12 @@ var Timeline = /** @__PURE__ @class */ (function (_super) {
5651
5682
  this.removeItemContent(listItems[parseInt((index).toString(), 10)]);
5652
5683
  }
5653
5684
  if (this.template) {
5654
- isrerender ? listItems[parseInt((index).toString(), 10)].classList.add(TEMPLATE) :
5685
+ if (isrerender) {
5686
+ listItems[parseInt((index).toString(), 10)].classList.add(TEMPLATE);
5687
+ }
5688
+ else {
5655
5689
  timelineItem.classList.add(TEMPLATE);
5690
+ }
5656
5691
  var item = this.items[parseInt(index.toString(), 10)];
5657
5692
  append(this.templateFunction({ item: item, itemIndex: index }, this, 'timelineTemplate', (this.element.id + '_timelineTemplate'), this.isStringTemplate), isrerender ? listItems[parseInt((index).toString(), 10)] : timelineItem);
5658
5693
  }
@@ -5669,6 +5704,7 @@ var Timeline = /** @__PURE__ @class */ (function (_super) {
5669
5704
  * Gets template content based on the template property value.
5670
5705
  *
5671
5706
  * @param {string | Function} template - Template property value.
5707
+ * @param {boolean} notCompile - Compile property value.
5672
5708
  * @returns {Function} - Return template function.
5673
5709
  * @hidden
5674
5710
  */
@@ -5720,8 +5756,8 @@ var Timeline = /** @__PURE__ @class */ (function (_super) {
5720
5756
  _super.prototype.destroy.call(this);
5721
5757
  // unwires the events and detach the li elements
5722
5758
  this.removeItemElements();
5723
- this.element.removeAttribute("role");
5724
- this.element.removeAttribute("aria-label");
5759
+ this.element.removeAttribute('role');
5760
+ this.element.removeAttribute('aria-label');
5725
5761
  this.clearTemplate();
5726
5762
  if (this.timelineListEle) {
5727
5763
  remove(this.timelineListEle);
@@ -5729,6 +5765,43 @@ var Timeline = /** @__PURE__ @class */ (function (_super) {
5729
5765
  this.timelineListEle = null;
5730
5766
  this.updateElementClassArray();
5731
5767
  };
5768
+ Timeline.prototype.updateItems = function (newProp, oldPropItems, index, item) {
5769
+ var _a, _b, _c, _d;
5770
+ var timelineItemElements = this.timelineListEle.querySelectorAll('li');
5771
+ var dotEle;
5772
+ var contentEle;
5773
+ var oppositeEle;
5774
+ switch (newProp) {
5775
+ case 'dotCss':
5776
+ dotEle = timelineItemElements[parseInt(index.toString(), 10)].querySelector('.' + DOTCONTENT);
5777
+ if (oldPropItems.dotCss !== '') {
5778
+ (_a = dotEle.classList).remove.apply(_a, oldPropItems.dotCss.trim().split(' '));
5779
+ }
5780
+ (_b = dotEle.classList).add.apply(_b, this.items[parseInt(index.toString(), 10)].dotCss.trim().split(' '));
5781
+ break;
5782
+ case 'content':
5783
+ contentEle = timelineItemElements[parseInt(index.toString(), 10)].querySelector('.' + CONTENT);
5784
+ contentEle.innerText = '';
5785
+ this.updateItemContent(true, item, index, contentEle);
5786
+ this.haveOneSidecontent();
5787
+ break;
5788
+ case 'oppositeContent':
5789
+ oppositeEle = timelineItemElements[parseInt(index.toString(), 10)].querySelector('.' + OPPOSITECONTENT);
5790
+ oppositeEle.innerText = '';
5791
+ this.updateItemContent(false, item, index, oppositeEle);
5792
+ this.haveOneSidecontent();
5793
+ break;
5794
+ case 'disabled':
5795
+ timelineItemElements[parseInt(index.toString(), 10)].classList[this.items[parseInt(index.toString(), 10)].disabled ? 'add' : 'remove'](DISABLED$1);
5796
+ break;
5797
+ case 'cssClass':
5798
+ if (oldPropItems.cssClass !== '') {
5799
+ (_c = timelineItemElements[parseInt(index.toString(), 10)].classList).remove.apply(_c, oldPropItems.cssClass.trim().split(' '));
5800
+ }
5801
+ (_d = timelineItemElements[parseInt(index.toString(), 10)].classList).add.apply(_d, item.cssClass.trim().split(' '));
5802
+ break;
5803
+ }
5804
+ };
5732
5805
  /**
5733
5806
  * Called internally if any of the property value changed.
5734
5807
  *
@@ -5741,11 +5814,20 @@ var Timeline = /** @__PURE__ @class */ (function (_super) {
5741
5814
  for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
5742
5815
  var prop = _a[_i];
5743
5816
  switch (prop) {
5744
- case 'items': {
5745
- this.removeItemElements();
5746
- this.renderItems();
5817
+ case 'items':
5818
+ if (Array.isArray(newProp.items)) {
5819
+ this.removeItemElements();
5820
+ this.renderItems();
5821
+ }
5822
+ else {
5823
+ var itemObject = Object.keys(newProp.items);
5824
+ for (var i = 0; i < itemObject.length; i++) {
5825
+ var index = parseInt(Object.keys(newProp.items)[i], 10);
5826
+ var property = Object.keys(newProp.items[index])[0];
5827
+ this.updateItems(property, oldProp.items[index], index, newProp.items[index]);
5828
+ }
5829
+ }
5747
5830
  break;
5748
- }
5749
5831
  case 'orientation':
5750
5832
  this.updateOrientation();
5751
5833
  break;
@@ -5798,11 +5880,5 @@ var Timeline = /** @__PURE__ @class */ (function (_super) {
5798
5880
  return Timeline;
5799
5881
  }(Component));
5800
5882
 
5801
- /** Timeline export modules */
5802
-
5803
- /**
5804
- * Layout all modules
5805
- */
5806
-
5807
- export { PaneProperties, Splitter, Panel, DashboardLayout, TimelineOrientation, TimelineAlign, TimelineItem, Timeline };
5883
+ export { DashboardLayout, PaneProperties, Panel, Splitter, Timeline, TimelineAlign, TimelineItem, TimelineOrientation };
5808
5884
  //# sourceMappingURL=ej2-layouts.es5.js.map