@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 { ChildProperty, Property, Component, isNullOrUndefined, removeClass, addClass, Browser, EventHandler, SanitizeHtmlHelper, extend, detach, formatUnit, setStyleAttribute, select, selectAll, compile, Collection, Event, NotifyPropertyChanges, setValue, append, isUndefined, closest, Draggable, getValue, getUniqueID, attributes, remove } from '@syncfusion/ej2-base';
2
2
 
3
3
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
4
4
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -137,7 +137,6 @@ let Splitter = class Splitter extends Component {
137
137
  case 'paneSettings': {
138
138
  if (!(newProp.paneSettings instanceof Array && oldProp.paneSettings instanceof Array)) {
139
139
  const paneCounts = Object.keys(newProp.paneSettings);
140
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
141
140
  const isPaneContentChanged = paneCounts.some((count) => !isNullOrUndefined(newProp.paneSettings[count].content));
142
141
  if (this.isReact && isPaneContentChanged) {
143
142
  let cPaneCount = 0;
@@ -174,11 +173,14 @@ let Splitter = class Splitter extends Component {
174
173
  this.collapsibleModelUpdate(index);
175
174
  break;
176
175
  case 'collapsed':
177
- // eslint-disable-next-line
178
- newProp.paneSettings[index].collapsed ? this.isCollapsed(index) : this.collapsedOnchange(index);
176
+ if (newProp.paneSettings[index].collapsed) {
177
+ this.isCollapsed(index);
178
+ }
179
+ else {
180
+ this.collapsedOnchange(index);
181
+ }
179
182
  break;
180
183
  case 'cssClass':
181
- // eslint-disable-next-line max-len
182
184
  this.setCssClass(this.allPanes[index], newProp.paneSettings[index].cssClass);
183
185
  break;
184
186
  case 'size': {
@@ -507,8 +509,12 @@ let Splitter = class Splitter extends Component {
507
509
  return attribute.slice(attribute.lastIndexOf('-') + 1);
508
510
  }
509
511
  setRTL(rtl) {
510
- // eslint-disable-next-line
511
- rtl ? addClass([this.element], RTL) : removeClass([this.element], RTL);
512
+ if (rtl) {
513
+ addClass([this.element], RTL);
514
+ }
515
+ else {
516
+ removeClass([this.element], RTL);
517
+ }
512
518
  }
513
519
  setReversePane() {
514
520
  this.allPanes = this.allPanes.reverse();
@@ -529,9 +535,12 @@ let Splitter = class Splitter extends Component {
529
535
  }
530
536
  getPanesDimensions() {
531
537
  for (let index = 0; index < this.allPanes.length; index++) {
532
- // eslint-disable-next-line
533
- this.orientation === 'Horizontal' ? this.panesDimensions.push(this.allPanes[index].getBoundingClientRect().width) :
538
+ if (this.orientation === 'Horizontal') {
539
+ this.panesDimensions.push(this.allPanes[index].getBoundingClientRect().width);
540
+ }
541
+ else {
534
542
  this.panesDimensions.push(this.allPanes[index].getBoundingClientRect().height);
543
+ }
535
544
  }
536
545
  }
537
546
  setCssClass(element, className) {
@@ -558,9 +567,12 @@ let Splitter = class Splitter extends Component {
558
567
  this.showResizer(this.allBars[paneIndex]);
559
568
  removeClass([select('.' + RESIZE_BAR, this.allBars[paneIndex])], HIDE_HANDLER);
560
569
  this.allBars[paneIndex].classList.add(RESIZABLE_BAR);
561
- // eslint-disable-next-line
562
- (index === (this.allBars.length)) ? this.allPanes[index].classList.add(RESIZABLE_PANE) :
570
+ if (index === (this.allBars.length)) {
571
+ this.allPanes[index].classList.add(RESIZABLE_PANE);
572
+ }
573
+ else {
563
574
  this.allPanes[paneIndex].classList.add(RESIZABLE_PANE);
575
+ }
564
576
  this.updateResizablePanes(i);
565
577
  }
566
578
  }
@@ -568,9 +580,12 @@ let Splitter = class Splitter extends Component {
568
580
  this.updateResizablePanes(i);
569
581
  this.hideResizer(this.allBars[paneIndex]);
570
582
  this.allBars[paneIndex].classList.remove(RESIZABLE_BAR);
571
- // eslint-disable-next-line
572
- (index === (this.allBars.length)) ? this.allPanes[index].classList.remove(RESIZABLE_PANE) :
583
+ if (index === (this.allBars.length)) {
584
+ this.allPanes[index].classList.remove(RESIZABLE_PANE);
585
+ }
586
+ else {
573
587
  this.allPanes[paneIndex].classList.remove(RESIZABLE_PANE);
588
+ }
574
589
  }
575
590
  }
576
591
  collapsibleModelUpdate(index) {
@@ -634,7 +649,6 @@ let Splitter = class Splitter extends Component {
634
649
  this.updateIsCollapsed(index, this.targetArrows().collapseArrow, this.targetArrows().lastBarArrow);
635
650
  for (let i = 0; i < collapsedindex.length; i++) {
636
651
  if (!this.allPanes[collapsedindex[i]].classList.contains(COLLAPSE_PANE)) {
637
- // eslint-disable-next-line max-len
638
652
  this.updateIsCollapsed(collapsedindex[i], this.targetArrows().collapseArrow, this.targetArrows().lastBarArrow);
639
653
  }
640
654
  }
@@ -687,8 +701,12 @@ let Splitter = class Splitter extends Component {
687
701
  }
688
702
  }
689
703
  isEnabled(enabled) {
690
- // eslint-disable-next-line
691
- enabled ? removeClass([this.element], DISABLED) : addClass([this.element], DISABLED);
704
+ if (enabled) {
705
+ removeClass([this.element], DISABLED);
706
+ }
707
+ else {
708
+ addClass([this.element], DISABLED);
709
+ }
692
710
  }
693
711
  setSeparatorSize(size) {
694
712
  const sizeValue = isNullOrUndefined(size) ? 'auto' : size + 'px';
@@ -770,8 +788,12 @@ let Splitter = class Splitter extends Component {
770
788
  }
771
789
  updateSeparatorSize(resizeHanlder) {
772
790
  const sizeValue = isNullOrUndefined(this.separatorSize) ? '1px' : this.separatorSize + 'px';
773
- // eslint-disable-next-line
774
- this.orientation === 'Horizontal' ? (resizeHanlder.style.width = sizeValue) : resizeHanlder.style.height = sizeValue;
791
+ if (this.orientation === 'Horizontal') {
792
+ resizeHanlder.style.width = sizeValue;
793
+ }
794
+ else {
795
+ resizeHanlder.style.height = sizeValue;
796
+ }
775
797
  }
776
798
  addResizeHandler(currentBar) {
777
799
  const resizeHanlder = this.createElement('div');
@@ -795,16 +817,28 @@ let Splitter = class Splitter extends Component {
795
817
  updateCollapseIcons(index, arrow1, arrow2) {
796
818
  if (!isNullOrUndefined(this.paneSettings[index])) {
797
819
  if (!isNullOrUndefined(this.paneSettings[index].collapsible)) {
798
- // eslint-disable-next-line
799
- this.paneSettings[index].collapsible ? removeClass([arrow2], [HIDE_ICON]) : addClass([arrow2], [HIDE_ICON]);
820
+ if (this.paneSettings[index].collapsible) {
821
+ removeClass([arrow2], [HIDE_ICON]);
822
+ }
823
+ else {
824
+ addClass([arrow2], [HIDE_ICON]);
825
+ }
800
826
  if (!isNullOrUndefined(this.paneSettings[index + 1])) {
801
- // eslint-disable-next-line
802
- this.paneSettings[index + 1].collapsible ? removeClass([arrow1], [HIDE_ICON]) : addClass([arrow1], [HIDE_ICON]);
827
+ if (this.paneSettings[index + 1].collapsible) {
828
+ removeClass([arrow1], [HIDE_ICON]);
829
+ }
830
+ else {
831
+ addClass([arrow1], [HIDE_ICON]);
832
+ }
803
833
  }
804
834
  if (!isNullOrUndefined(this.paneSettings[index + 1])) {
805
835
  if ((this.paneSettings[index + 1].collapsible)) {
806
- // eslint-disable-next-line
807
- this.paneSettings[index + 1].collapsible ? removeClass([arrow1], [HIDE_ICON]) : addClass([arrow1], [HIDE_ICON]);
836
+ if (this.paneSettings[index + 1].collapsible) {
837
+ removeClass([arrow1], [HIDE_ICON]);
838
+ }
839
+ else {
840
+ addClass([arrow1], [HIDE_ICON]);
841
+ }
808
842
  }
809
843
  }
810
844
  }
@@ -832,8 +866,7 @@ let Splitter = class Splitter extends Component {
832
866
  arrow1.setAttribute('type', 'button');
833
867
  arrow2.setAttribute('type', 'button');
834
868
  const size = isNullOrUndefined(this.separatorSize) ? '1px' : this.separatorSize + 'px';
835
- // eslint-disable-next-line
836
- const proxy = this;
869
+ const proxy = this;
837
870
  if (this.orientation === 'Horizontal') {
838
871
  this.updateIconClass();
839
872
  addClass([arrow2], [NAVIGATE_ARROW, ARROW_LEFT, HIDE_ICON]);
@@ -873,8 +906,12 @@ let Splitter = class Splitter extends Component {
873
906
  }
874
907
  updateResizablePanes(index) {
875
908
  this.getPaneDetails();
876
- // eslint-disable-next-line
877
- this.isResizable() ? this.allPanes[index].classList.add(RESIZABLE_PANE) : this.allPanes[index].classList.remove(RESIZABLE_PANE);
909
+ if (this.isResizable()) {
910
+ this.allPanes[index].classList.add(RESIZABLE_PANE);
911
+ }
912
+ else {
913
+ this.allPanes[index].classList.remove(RESIZABLE_PANE);
914
+ }
878
915
  }
879
916
  addSeparator(target) {
880
917
  const childCount = this.allPanes.length;
@@ -1026,9 +1063,9 @@ let Splitter = class Splitter extends Component {
1026
1063
  }
1027
1064
  for (let j = 0, len = this.allBars.length; j < len; j++) {
1028
1065
  totalWidth += this.orientation === 'Horizontal' ? parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) +
1029
- // eslint-disable-next-line max-len
1030
- parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) : parseInt(getComputedStyle(this.allBars[j]).marginTop, 10) +
1031
- parseInt(getComputedStyle(this.allBars[j]).marginBottom, 10);
1066
+ parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) :
1067
+ parseInt(getComputedStyle(this.allBars[j]).marginTop, 10) +
1068
+ parseInt(getComputedStyle(this.allBars[j]).marginBottom, 10);
1032
1069
  }
1033
1070
  const diff = this.orientation === 'Horizontal' ? this.element.offsetWidth -
1034
1071
  ((this.border * 2) + totalWidth) :
@@ -1829,8 +1866,7 @@ let Splitter = class Splitter extends Component {
1829
1866
  this.updateSplitterSize();
1830
1867
  }
1831
1868
  }
1832
- // eslint-disable-next-line
1833
- validateMinRange(paneIndex, paneCurrentWidth, pane) {
1869
+ validateMinRange(paneIndex, paneCurrentWidth) {
1834
1870
  let paneMinRange = null;
1835
1871
  let paneMinDimensions;
1836
1872
  let difference = 0;
@@ -1853,8 +1889,7 @@ let Splitter = class Splitter extends Component {
1853
1889
  }
1854
1890
  return isNullOrUndefined(validatedVal) ? paneCurrentWidth : validatedVal;
1855
1891
  }
1856
- // eslint-disable-next-line
1857
- validateMaxRange(paneIndex, paneCurrentWidth, pane) {
1892
+ validateMaxRange(paneIndex, paneCurrentWidth) {
1858
1893
  let paneMaxRange = null;
1859
1894
  let paneMaxDimensions;
1860
1895
  let validatedVal;
@@ -1876,13 +1911,13 @@ let Splitter = class Splitter extends Component {
1876
1911
  }
1877
1912
  validateMinMaxValues() {
1878
1913
  //validate previous pane minimum range
1879
- this.prevPaneCurrentWidth = this.validateMinRange(this.prevPaneIndex, this.prevPaneCurrentWidth, this.previousPane);
1914
+ this.prevPaneCurrentWidth = this.validateMinRange(this.prevPaneIndex, this.prevPaneCurrentWidth);
1880
1915
  // Validate next pane minimum range
1881
- this.nextPaneCurrentWidth = this.validateMinRange(this.nextPaneIndex, this.nextPaneCurrentWidth, this.nextPane);
1916
+ this.nextPaneCurrentWidth = this.validateMinRange(this.nextPaneIndex, this.nextPaneCurrentWidth);
1882
1917
  // validate previous pane maximum range
1883
- this.prevPaneCurrentWidth = this.validateMaxRange(this.prevPaneIndex, this.prevPaneCurrentWidth, this.previousPane);
1918
+ this.prevPaneCurrentWidth = this.validateMaxRange(this.prevPaneIndex, this.prevPaneCurrentWidth);
1884
1919
  // validate next pane maximum range
1885
- this.nextPaneCurrentWidth = this.validateMaxRange(this.nextPaneIndex, this.nextPaneCurrentWidth, this.nextPane);
1920
+ this.nextPaneCurrentWidth = this.validateMaxRange(this.nextPaneIndex, this.nextPaneCurrentWidth);
1886
1921
  }
1887
1922
  equatePaneWidths() {
1888
1923
  let difference;
@@ -2027,7 +2062,6 @@ let Splitter = class Splitter extends Component {
2027
2062
  }
2028
2063
  // eslint-disable-next-line
2029
2064
  templateCompile(ele, cnt) {
2030
- // eslint-disable-next-line
2031
2065
  const tempEle = this.createElement('div');
2032
2066
  this.compileElement(tempEle, cnt, 'content');
2033
2067
  if (tempEle.childNodes.length !== 0) {
@@ -2037,7 +2071,6 @@ let Splitter = class Splitter extends Component {
2037
2071
  }
2038
2072
  }
2039
2073
  compileElement(ele, val, prop) {
2040
- // eslint-disable-next-line
2041
2074
  if (typeof (val) === 'string') {
2042
2075
  if (val[0] === '.' || val[0] === '#') {
2043
2076
  const eleVal = document.querySelector(val);
@@ -2182,9 +2215,12 @@ let Splitter = class Splitter extends Component {
2182
2215
  }
2183
2216
  }
2184
2217
  addPaneClass(pane) {
2185
- // eslint-disable-next-line
2186
- this.orientation === 'Horizontal' ? addClass([pane], [PANE, SPLIT_H_PANE, SCROLL_PANE]) :
2218
+ if (this.orientation === 'Horizontal') {
2219
+ addClass([pane], [PANE, SPLIT_H_PANE, SCROLL_PANE]);
2220
+ }
2221
+ else {
2187
2222
  addClass([pane], [PANE, SPLIT_V_PANE, SCROLL_PANE]);
2223
+ }
2188
2224
  return pane;
2189
2225
  }
2190
2226
  removePaneOrders(paneClass) {
@@ -2336,10 +2372,6 @@ Splitter = __decorate([
2336
2372
  NotifyPropertyChanges
2337
2373
  ], Splitter);
2338
2374
 
2339
- /**
2340
- * splitter modules
2341
- */
2342
-
2343
2375
  var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2344
2376
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2345
2377
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -2608,9 +2640,11 @@ let DashboardLayout = class DashboardLayout extends Component {
2608
2640
  else {
2609
2641
  this.cellSize[0] = this.element.parentElement &&
2610
2642
  ((this.element.parentElement.offsetWidth));
2611
- this.cellSize[0] = this.element.parentElement
2612
- && ((this.element.parentElement.offsetWidth - ((this.maxCol() - 1) * this.cellSpacing[0]))
2613
- / (this.maxCol()));
2643
+ if (!isNullOrUndefined(this.cellSpacing)) {
2644
+ this.cellSize[0] = this.element.parentElement
2645
+ && ((this.element.parentElement.offsetWidth - ((this.maxCol() - 1) * this.cellSpacing[0]))
2646
+ / (this.maxCol()));
2647
+ }
2614
2648
  this.cellSize[1] = this.cellSize[0] / this.cellAspectRatio;
2615
2649
  }
2616
2650
  }
@@ -2639,9 +2673,9 @@ let DashboardLayout = class DashboardLayout extends Component {
2639
2673
  updateOldRowColumn() {
2640
2674
  for (let i = 0; i < this.panels.length; i++) {
2641
2675
  const id = this.panels[i].id;
2642
- if (this.element.querySelector("[id='" + id + "']")) {
2643
- const row = parseInt(this.element.querySelector("[id='" + id + "']").getAttribute('data-row'), 10);
2644
- const col = parseInt(this.element.querySelector("[id='" + id + "']").getAttribute('data-col'), 10);
2676
+ if (this.element.querySelector('[id=\'' + id + '\']')) {
2677
+ const row = parseInt(this.element.querySelector('[id=\'' + id + '\']').getAttribute('data-row'), 10);
2678
+ const col = parseInt(this.element.querySelector('[id=\'' + id + '\']').getAttribute('data-col'), 10);
2645
2679
  this.oldRowCol[this.panels[i].id] = { row: row, col: col };
2646
2680
  }
2647
2681
  else {
@@ -2700,7 +2734,6 @@ let DashboardLayout = class DashboardLayout extends Component {
2700
2734
  }
2701
2735
  }
2702
2736
  else {
2703
- // eslint-disable-next-line
2704
2737
  const compilerFn = templateFn({}, this, prop, type, isStringTemplate, null, appendElement);
2705
2738
  if (compilerFn) {
2706
2739
  for (const item of compilerFn) {
@@ -2779,7 +2812,6 @@ let DashboardLayout = class DashboardLayout extends Component {
2779
2812
  model.enabled = true;
2780
2813
  }
2781
2814
  panelElement.style.zIndex = '' + model.zIndex;
2782
- // eslint-disable-next-line
2783
2815
  const panelProp = new Panel(this, 'panels', model, true);
2784
2816
  this.panels.push(panelProp);
2785
2817
  this.oldRowCol[model.id] = { row: model.row, col: model.col };
@@ -2798,7 +2830,6 @@ let DashboardLayout = class DashboardLayout extends Component {
2798
2830
  }
2799
2831
  bindEvents() {
2800
2832
  this.refreshListener = this.refresh.bind(this);
2801
- // eslint-disable-next-line
2802
2833
  EventHandler.add(window, 'resize', this.refreshListener);
2803
2834
  this.resizeEvents();
2804
2835
  }
@@ -3211,7 +3242,6 @@ let DashboardLayout = class DashboardLayout extends Component {
3211
3242
  else {
3212
3243
  if (this.element.classList.contains(responsive)) {
3213
3244
  removeClass([this.element], [responsive]);
3214
- // eslint-disable-next-line
3215
3245
  const internalPanels = this.element.querySelectorAll(((this.element.id) ? '#' + this.element.id + ' > ' : '') + '.e-panel');
3216
3246
  for (let i = 0; i < internalPanels.length; i++) {
3217
3247
  const ele = internalPanels[i];
@@ -3282,7 +3312,6 @@ let DashboardLayout = class DashboardLayout extends Component {
3282
3312
  this.updatedRows = updatedPanel.length;
3283
3313
  for (let i = 0; i < updatedPanel.length; i++) {
3284
3314
  const panelElement = document.getElementById(updatedPanel[i].id);
3285
- // eslint-disable-next-line
3286
3315
  let updatedHeight;
3287
3316
  if (panelElement) {
3288
3317
  setStyleAttribute(panelElement, { 'width': '100%' });
@@ -3291,8 +3320,7 @@ let DashboardLayout = class DashboardLayout extends Component {
3291
3320
  if (updatedPanel[i].sizeY > 1) {
3292
3321
  updatedHeight = ((this.element.parentElement
3293
3322
  && this.element.parentElement.offsetWidth / this.cellAspectRatio) * updatedPanel[i].sizeY) +
3294
- // eslint-disable-next-line radix
3295
- parseInt((Math.round(updatedPanel[i].sizeY / 2) * this.cellSpacing[1]).toString(), 0);
3323
+ parseInt((Math.round(updatedPanel[i].sizeY / 2) * this.cellSpacing[1]).toString(), 10);
3296
3324
  panelElement.style.height = '' + updatedHeight + 'px';
3297
3325
  }
3298
3326
  this.resizeHeight = true;
@@ -3329,7 +3357,9 @@ let DashboardLayout = class DashboardLayout extends Component {
3329
3357
  }
3330
3358
  setHeightWidth() {
3331
3359
  let heightValue;
3332
- let widthValue;
3360
+ if (isNullOrUndefined(this.cellSpacing)) {
3361
+ return;
3362
+ }
3333
3363
  if (this.checkMediaQuery()) {
3334
3364
  let entirePanelsY = 0;
3335
3365
  for (let i = 0; i < this.panels.length; i++) {
@@ -3346,8 +3376,7 @@ let DashboardLayout = class DashboardLayout extends Component {
3346
3376
  (this.cellSize[0] / this.cellAspectRatio) + (this.maxRow() - 1) * this.cellSpacing[1]) + 'px';
3347
3377
  }
3348
3378
  setStyleAttribute(this.element, { 'height': heightValue });
3349
- // eslint-disable-next-line prefer-const
3350
- widthValue = window.getComputedStyle(this.element).width;
3379
+ const widthValue = window.getComputedStyle(this.element).width;
3351
3380
  setStyleAttribute(this.element, { 'width': widthValue });
3352
3381
  }
3353
3382
  setHeightAndWidth(panelElement, panelModel) {
@@ -3447,7 +3476,6 @@ let DashboardLayout = class DashboardLayout extends Component {
3447
3476
  }
3448
3477
  }
3449
3478
  panelPropertyChange(panel, value) {
3450
- // eslint-disable-next-line
3451
3479
  panel.setProperties(value, true);
3452
3480
  }
3453
3481
  renderDashBoardCells(cells) {
@@ -3490,9 +3518,9 @@ let DashboardLayout = class DashboardLayout extends Component {
3490
3518
  for (let h = 0; h < sizeY; ++h) {
3491
3519
  for (let w = 0; w < sizeX; ++w) {
3492
3520
  item = this.getPanel(row + h, col + w, ignore);
3493
- if (item && (!ignore || ignore.indexOf(this.element.querySelector("[id='" + item.id + "']")) === -1) &&
3494
- items.indexOf(this.element.querySelector("[id='" + item.id + "']")) === -1) {
3495
- items.push(this.element.querySelector("[id='" + item.id + "']"));
3521
+ if (item && (!ignore || ignore.indexOf(this.element.querySelector('[id=\'' + item.id + '\']')) === -1) &&
3522
+ items.indexOf(this.element.querySelector('[id=\'' + item.id + '\']')) === -1) {
3523
+ items.push(this.element.querySelector('[id=\'' + item.id + '\']'));
3496
3524
  }
3497
3525
  }
3498
3526
  }
@@ -3785,8 +3813,6 @@ let DashboardLayout = class DashboardLayout extends Component {
3785
3813
  exclusions.push(ele);
3786
3814
  if (updatedCollision.length === 0) {
3787
3815
  isRightAdjudtable = true;
3788
- // eslint-disable-next-line no-self-assign
3789
- this.spacedColumnValue = this.spacedColumnValue;
3790
3816
  return isRightAdjudtable;
3791
3817
  }
3792
3818
  else {
@@ -3850,7 +3876,7 @@ let DashboardLayout = class DashboardLayout extends Component {
3850
3876
  }
3851
3877
  if (this.mainElement && this.oldRowCol !== this.cloneObject) {
3852
3878
  for (let i = 0; i < this.panels.length; i++) {
3853
- const element = this.element.querySelector("[id='" + this.panels[i].id + "']");
3879
+ const element = this.element.querySelector('[id=\'' + this.panels[i].id + '\']');
3854
3880
  if (element === this.mainElement) {
3855
3881
  continue;
3856
3882
  }
@@ -4057,11 +4083,9 @@ let DashboardLayout = class DashboardLayout extends Component {
4057
4083
  }
4058
4084
  }
4059
4085
  if (collisionModels.length > 0) {
4060
- // eslint-disable-next-line
4061
- const proxy = this;
4062
4086
  collisionModels.forEach((item1) => {
4063
- if (proxy.overlapElement.indexOf(item1) === -1) {
4064
- proxy.overlapElement.push(item1);
4087
+ if (this.overlapElement.indexOf(item1) === -1) {
4088
+ this.overlapElement.push(item1);
4065
4089
  }
4066
4090
  });
4067
4091
  if (this.overlapElement && this.overlapElement.indexOf(element) !== -1) {
@@ -4176,12 +4200,10 @@ let DashboardLayout = class DashboardLayout extends Component {
4176
4200
  const panelModel = this.getCellInstance(clone.id);
4177
4201
  this.panelPropertyChange(panelModel, { row: updatedRow, col: colValue });
4178
4202
  if (collisionModels.length > 0) {
4179
- // eslint-disable-next-line
4180
- const proxy = this;
4181
4203
  this.overlapElement = [];
4182
4204
  this.shouldRestrict = true;
4183
4205
  collisionModels.forEach((item1) => {
4184
- proxy.overlapElement.push(item1);
4206
+ this.overlapElement.push(item1);
4185
4207
  });
4186
4208
  const overlapElementRow1 = parseInt(clone.getAttribute('data-row'), 10);
4187
4209
  for (let m = 0; m < this.overlapElement.length; m++) {
@@ -4203,10 +4225,8 @@ let DashboardLayout = class DashboardLayout extends Component {
4203
4225
  if (this.mainElement && collisionModels1.indexOf(this.mainElement) !== -1) {
4204
4226
  collisionModels1.splice(collisionModels1.indexOf(this.mainElement), 1);
4205
4227
  }
4206
- // eslint-disable-next-line
4207
- const proxy = this;
4208
4228
  collisionModels1.forEach((item1) => {
4209
- proxy.overlapElement.push(item1);
4229
+ this.overlapElement.push(item1);
4210
4230
  });
4211
4231
  if (collisionModels1.length > 0) {
4212
4232
  this.updateRowColumn(rowVal, this.overlapElement, this.overlapSubElementClone[p]);
@@ -4270,14 +4290,14 @@ let DashboardLayout = class DashboardLayout extends Component {
4270
4290
  setXYAttributes(element, panelModel) {
4271
4291
  const value = {
4272
4292
  value: {
4273
- sizeX: panelModel.sizeX.toString(),
4274
- sizeY: panelModel.sizeY.toString(),
4275
- minSizeX: panelModel.minSizeX.toString(),
4276
- minSizeY: panelModel.minSizeY.toString(),
4293
+ sizeX: !isNullOrUndefined(panelModel.sizeX) ? panelModel.sizeX.toString() : undefined,
4294
+ sizeY: !isNullOrUndefined(panelModel.sizeY) ? panelModel.sizeY.toString() : undefined,
4295
+ minSizeX: !isNullOrUndefined(panelModel.minSizeX) ? panelModel.minSizeX.toString() : undefined,
4296
+ minSizeY: !isNullOrUndefined(panelModel.minSizeY) ? panelModel.minSizeY.toString() : undefined,
4277
4297
  maxSizeX: !isNullOrUndefined(panelModel.maxSizeX) ? panelModel.maxSizeX.toString() : undefined,
4278
4298
  maxSizeY: !isNullOrUndefined(panelModel.maxSizeY) ? panelModel.maxSizeY.toString() : undefined,
4279
- row: panelModel.row.toString(),
4280
- col: panelModel.col.toString()
4299
+ row: !isNullOrUndefined(panelModel.row) ? panelModel.row.toString() : undefined,
4300
+ col: !isNullOrUndefined(panelModel.col) ? panelModel.col.toString() : undefined
4281
4301
  }
4282
4302
  };
4283
4303
  this.setAttributes(value, element);
@@ -4442,7 +4462,6 @@ let DashboardLayout = class DashboardLayout extends Component {
4442
4462
  }
4443
4463
  updateDragArea() {
4444
4464
  this.dragCollection.forEach((dragobj) => {
4445
- // eslint-disable-next-line
4446
4465
  dragobj.setDragArea();
4447
4466
  });
4448
4467
  }
@@ -4454,8 +4473,7 @@ let DashboardLayout = class DashboardLayout extends Component {
4454
4473
  }
4455
4474
  onDraggingStart(args) {
4456
4475
  const dragArgs = args;
4457
- // eslint-disable-next-line
4458
- this.trigger('dragStart', dragArgs, (dragArgs) => {
4476
+ this.trigger('dragStart', dragArgs, () => {
4459
4477
  if (isNullOrUndefined(args.cancel)) {
4460
4478
  args.cancel = false;
4461
4479
  }
@@ -4489,13 +4507,11 @@ let DashboardLayout = class DashboardLayout extends Component {
4489
4507
  removeClass([args.element], [dragging]);
4490
4508
  }
4491
4509
  }
4492
- // eslint-disable-next-line
4493
4510
  cloneModels(source, target) {
4494
4511
  if (target === undefined) {
4495
4512
  target = [];
4496
4513
  }
4497
4514
  for (let i = 0; i < source.length; i++) {
4498
- // tslint:disable-next-line
4499
4515
  if (!target[i]) {
4500
4516
  target[i] = {};
4501
4517
  }
@@ -4539,7 +4555,7 @@ let DashboardLayout = class DashboardLayout extends Component {
4539
4555
  this.mainElement = args.element;
4540
4556
  const model = panelModel;
4541
4557
  this.checkCollision = this.collisions(model.row, model.col, model.sizeX, model.sizeY, args.element);
4542
- if (panelModel.col >= this.checkColumnValue) {
4558
+ if (panelModel.col >= 0 || panelModel.col >= this.checkColumnValue) {
4543
4559
  this.checkCollision = [];
4544
4560
  }
4545
4561
  this.updatePanelLayout(args.element, panelModel);
@@ -4655,7 +4671,6 @@ let DashboardLayout = class DashboardLayout extends Component {
4655
4671
  panel.id = 'layout_' + this.panelID.toString();
4656
4672
  this.panelID = this.panelID + 1;
4657
4673
  }
4658
- // eslint-disable-next-line
4659
4674
  const panelProp = new Panel(this, 'panels', panel, true);
4660
4675
  this.panels.push(panelProp);
4661
4676
  this.panelsInitialModel = this.cloneModels(this.panels);
@@ -4977,7 +4992,6 @@ let DashboardLayout = class DashboardLayout extends Component {
4977
4992
  * @returns void
4978
4993
  */
4979
4994
  destroy() {
4980
- // eslint-disable-next-line
4981
4995
  EventHandler.remove(window, 'resize', this.refreshListener);
4982
4996
  removeClass([this.element], ['e-dashboardlayout', 'e-lib', 'e-responsive', 'e-control']);
4983
4997
  this.element.removeAttribute('style');
@@ -5077,8 +5091,7 @@ let DashboardLayout = class DashboardLayout extends Component {
5077
5091
  *
5078
5092
  * @private
5079
5093
  */
5080
- // eslint-disable-next-line
5081
- onPropertyChanged(newProp, oldProp) {
5094
+ onPropertyChanged(newProp) {
5082
5095
  if (newProp.panels && newProp.panels.length > 0 && newProp.panels[0] instanceof Panel) {
5083
5096
  this.checkForIDValues(newProp.panels);
5084
5097
  }
@@ -5210,7 +5223,6 @@ let DashboardLayout = class DashboardLayout extends Component {
5210
5223
  for (const key of keys) {
5211
5224
  if ((typeof getValue(key, this) === 'object' && !isNullOrUndefined(getValue(key, this)))) {
5212
5225
  if (Array.isArray(getValue(key, this)) && key === 'panels') {
5213
- // eslint-disable-next-line
5214
5226
  this.mergePanels(dataObj[key], this[key]);
5215
5227
  this[key] = dataObj[key];
5216
5228
  }
@@ -5314,10 +5326,6 @@ DashboardLayout = __decorate$1([
5314
5326
  NotifyPropertyChanges
5315
5327
  ], DashboardLayout);
5316
5328
 
5317
- /**
5318
- * dashboardlayout modules
5319
- */
5320
-
5321
5329
  var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
5322
5330
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
5323
5331
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -5425,7 +5433,7 @@ let Timeline = class Timeline extends Component {
5425
5433
  /**
5426
5434
  * To get component name.
5427
5435
  *
5428
- * @returns {string} - Module Name
5436
+ * @returns {string} - It returns the current module name.
5429
5437
  * @private
5430
5438
  */
5431
5439
  getModuleName() {
@@ -5435,7 +5443,7 @@ let Timeline = class Timeline extends Component {
5435
5443
  * This method is abstract member of the Component<HTMLElement>.
5436
5444
  *
5437
5445
  * @private
5438
- * @returns {string}
5446
+ * @returns {string} - It returns the persisted data.
5439
5447
  */
5440
5448
  getPersistData() {
5441
5449
  return this.addOnPersist([]);
@@ -5453,13 +5461,15 @@ let Timeline = class Timeline extends Component {
5453
5461
  this.element.appendChild(this.timelineListEle);
5454
5462
  }
5455
5463
  updateOrientation() {
5456
- const orientation = this.orientation.toLowerCase();
5457
- if (orientation === 'horizontal' || orientation === 'vertical') {
5458
- this.element.classList.remove(HORIZONTAL, VERTICAL);
5459
- this.element.classList.add('e-' + orientation);
5464
+ if (!(isNullOrUndefined(this.orientation))) {
5465
+ const orientation = this.orientation.toLowerCase();
5466
+ if (orientation === 'horizontal' || orientation === 'vertical') {
5467
+ this.element.classList.remove(HORIZONTAL, VERTICAL);
5468
+ this.element.classList.add('e-' + orientation);
5469
+ }
5460
5470
  }
5461
5471
  }
5462
- updateCssClass(addCss, removeCss = "") {
5472
+ updateCssClass(addCss, removeCss = '') {
5463
5473
  let cssClasses;
5464
5474
  if (removeCss) {
5465
5475
  cssClasses = removeCss.trim().split(' ');
@@ -5474,29 +5484,26 @@ let Timeline = class Timeline extends Component {
5474
5484
  this.element.classList[this.enableRtl ? 'add' : 'remove'](RTL$1);
5475
5485
  }
5476
5486
  updateAlign() {
5477
- const align = this.align.toLowerCase();
5478
- if (align === 'before' || align === 'after' || align === 'alternate' || align === 'alternatereverse') {
5479
- this.element.classList.remove('e-align-before', 'e-align-after', 'e-align-alternate', 'e-align-alternatereverse');
5480
- this.element.classList.add('e-align-' + align);
5487
+ if (!(isNullOrUndefined(this.align))) {
5488
+ const align = this.align.toLowerCase();
5489
+ if (align === 'before' || align === 'after' || align === 'alternate' || align === 'alternatereverse') {
5490
+ this.element.classList.remove('e-align-before', 'e-align-after', 'e-align-alternate', 'e-align-alternatereverse');
5491
+ this.element.classList.add('e-align-' + align);
5492
+ }
5481
5493
  }
5482
5494
  }
5483
5495
  updateReverse() {
5484
5496
  this.element.classList[this.reverse ? 'add' : 'remove'](TIMELINEREVERSE);
5485
5497
  }
5486
5498
  renderItems() {
5499
+ this.haveOneSidecontent();
5487
5500
  for (let index = 0; index < this.items.length; index++) {
5488
5501
  const item = this.items[parseInt(index.toString(), 10)];
5489
5502
  const timelineItem = this.createElement('li', { className: ITEMCONTAINER + ' ' + ITEMCONNECTOR });
5490
5503
  if (!this.template) {
5491
5504
  const oppositeTextEle = this.createElement('div', { className: OPPOSITECONTENT });
5492
5505
  if (item.oppositeContent) {
5493
- const oppositeCtn = this.getTemplateFunction(item.oppositeContent);
5494
- if (typeof oppositeCtn === 'string') {
5495
- oppositeTextEle.innerText = oppositeCtn;
5496
- }
5497
- else {
5498
- append(oppositeCtn({ item: item, itemIndex: index }), oppositeTextEle);
5499
- }
5506
+ this.updateItemContent(false, item, index, oppositeTextEle);
5500
5507
  }
5501
5508
  timelineItem.appendChild(oppositeTextEle);
5502
5509
  const dotContainer = this.createElement('div', { className: DOTCONTAINER });
@@ -5506,13 +5513,7 @@ let Timeline = class Timeline extends Component {
5506
5513
  timelineItem.appendChild(dotContainer);
5507
5514
  const contentEle = this.createElement('div', { className: CONTENT });
5508
5515
  if (item.content) {
5509
- const ctn = this.getTemplateFunction(item.content);
5510
- if (typeof ctn === 'string') {
5511
- contentEle.innerText = ctn;
5512
- }
5513
- else {
5514
- append(ctn({ item: item, itemIndex: index }), contentEle);
5515
- }
5516
+ this.updateItemContent(true, item, index, contentEle);
5516
5517
  }
5517
5518
  timelineItem.appendChild(contentEle);
5518
5519
  if (item.cssClass) {
@@ -5529,6 +5530,36 @@ let Timeline = class Timeline extends Component {
5529
5530
  this.trigger('beforeItemRender', eventArgs, (args) => { this.timelineListEle.appendChild(args.element); });
5530
5531
  }
5531
5532
  }
5533
+ haveOneSidecontent() {
5534
+ let haveContent = false;
5535
+ let haveOppContent = false;
5536
+ for (let index = 0; index < this.items.length; index++) {
5537
+ const item = this.items[parseInt(index.toString(), 10)];
5538
+ if (!haveContent) {
5539
+ haveContent = item.content.length > 0;
5540
+ }
5541
+ if (!haveOppContent) {
5542
+ haveOppContent = item.oppositeContent.length > 0;
5543
+ }
5544
+ }
5545
+ this.element.classList.remove('e-content-only', 'e-opposite-content-only');
5546
+ if (haveContent && !haveOppContent) {
5547
+ this.element.classList.add('e-content-only');
5548
+ }
5549
+ if (haveOppContent && !haveContent) {
5550
+ this.element.classList.add('e-opposite-content-only');
5551
+ }
5552
+ }
5553
+ updateItemContent(isContent, item, index, contentEle) {
5554
+ const notCompile = !(this.isReact || this.isVue);
5555
+ const ctn = this.getTemplateFunction(isContent ? item.content : item.oppositeContent, notCompile);
5556
+ if (typeof ctn === 'string') {
5557
+ contentEle.innerText = ctn;
5558
+ }
5559
+ else {
5560
+ append(ctn({ item: item, itemIndex: index }, this), contentEle);
5561
+ }
5562
+ }
5532
5563
  updateTemplateFunction() {
5533
5564
  this.templateFunction = this.template ? this.getTemplateFunction(this.template, false) : null;
5534
5565
  }
@@ -5538,8 +5569,12 @@ let Timeline = class Timeline extends Component {
5538
5569
  this.removeItemContent(listItems[parseInt((index).toString(), 10)]);
5539
5570
  }
5540
5571
  if (this.template) {
5541
- isrerender ? listItems[parseInt((index).toString(), 10)].classList.add(TEMPLATE) :
5572
+ if (isrerender) {
5573
+ listItems[parseInt((index).toString(), 10)].classList.add(TEMPLATE);
5574
+ }
5575
+ else {
5542
5576
  timelineItem.classList.add(TEMPLATE);
5577
+ }
5543
5578
  const item = this.items[parseInt(index.toString(), 10)];
5544
5579
  append(this.templateFunction({ item: item, itemIndex: index }, this, 'timelineTemplate', (this.element.id + '_timelineTemplate'), this.isStringTemplate), isrerender ? listItems[parseInt((index).toString(), 10)] : timelineItem);
5545
5580
  }
@@ -5556,6 +5591,7 @@ let Timeline = class Timeline extends Component {
5556
5591
  * Gets template content based on the template property value.
5557
5592
  *
5558
5593
  * @param {string | Function} template - Template property value.
5594
+ * @param {boolean} notCompile - Compile property value.
5559
5595
  * @returns {Function} - Return template function.
5560
5596
  * @hidden
5561
5597
  */
@@ -5606,8 +5642,8 @@ let Timeline = class Timeline extends Component {
5606
5642
  super.destroy();
5607
5643
  // unwires the events and detach the li elements
5608
5644
  this.removeItemElements();
5609
- this.element.removeAttribute("role");
5610
- this.element.removeAttribute("aria-label");
5645
+ this.element.removeAttribute('role');
5646
+ this.element.removeAttribute('aria-label');
5611
5647
  this.clearTemplate();
5612
5648
  if (this.timelineListEle) {
5613
5649
  remove(this.timelineListEle);
@@ -5615,6 +5651,42 @@ let Timeline = class Timeline extends Component {
5615
5651
  this.timelineListEle = null;
5616
5652
  this.updateElementClassArray();
5617
5653
  }
5654
+ updateItems(newProp, oldPropItems, index, item) {
5655
+ const timelineItemElements = this.timelineListEle.querySelectorAll('li');
5656
+ let dotEle;
5657
+ let contentEle;
5658
+ let oppositeEle;
5659
+ switch (newProp) {
5660
+ case 'dotCss':
5661
+ dotEle = timelineItemElements[parseInt(index.toString(), 10)].querySelector('.' + DOTCONTENT);
5662
+ if (oldPropItems.dotCss !== '') {
5663
+ dotEle.classList.remove(...oldPropItems.dotCss.trim().split(' '));
5664
+ }
5665
+ dotEle.classList.add(...this.items[parseInt(index.toString(), 10)].dotCss.trim().split(' '));
5666
+ break;
5667
+ case 'content':
5668
+ contentEle = timelineItemElements[parseInt(index.toString(), 10)].querySelector('.' + CONTENT);
5669
+ contentEle.innerText = '';
5670
+ this.updateItemContent(true, item, index, contentEle);
5671
+ this.haveOneSidecontent();
5672
+ break;
5673
+ case 'oppositeContent':
5674
+ oppositeEle = timelineItemElements[parseInt(index.toString(), 10)].querySelector('.' + OPPOSITECONTENT);
5675
+ oppositeEle.innerText = '';
5676
+ this.updateItemContent(false, item, index, oppositeEle);
5677
+ this.haveOneSidecontent();
5678
+ break;
5679
+ case 'disabled':
5680
+ timelineItemElements[parseInt(index.toString(), 10)].classList[this.items[parseInt(index.toString(), 10)].disabled ? 'add' : 'remove'](DISABLED$1);
5681
+ break;
5682
+ case 'cssClass':
5683
+ if (oldPropItems.cssClass !== '') {
5684
+ timelineItemElements[parseInt(index.toString(), 10)].classList.remove(...oldPropItems.cssClass.trim().split(' '));
5685
+ }
5686
+ timelineItemElements[parseInt(index.toString(), 10)].classList.add(...item.cssClass.trim().split(' '));
5687
+ break;
5688
+ }
5689
+ }
5618
5690
  /**
5619
5691
  * Called internally if any of the property value changed.
5620
5692
  *
@@ -5626,11 +5698,20 @@ let Timeline = class Timeline extends Component {
5626
5698
  onPropertyChanged(newProp, oldProp) {
5627
5699
  for (const prop of Object.keys(newProp)) {
5628
5700
  switch (prop) {
5629
- case 'items': {
5630
- this.removeItemElements();
5631
- this.renderItems();
5701
+ case 'items':
5702
+ if (Array.isArray(newProp.items)) {
5703
+ this.removeItemElements();
5704
+ this.renderItems();
5705
+ }
5706
+ else {
5707
+ const itemObject = Object.keys(newProp.items);
5708
+ for (let i = 0; i < itemObject.length; i++) {
5709
+ const index = parseInt(Object.keys(newProp.items)[i], 10);
5710
+ const property = Object.keys(newProp.items[index])[0];
5711
+ this.updateItems(property, oldProp.items[index], index, newProp.items[index]);
5712
+ }
5713
+ }
5632
5714
  break;
5633
- }
5634
5715
  case 'orientation':
5635
5716
  this.updateOrientation();
5636
5717
  break;
@@ -5682,11 +5763,5 @@ Timeline = __decorate$2([
5682
5763
  NotifyPropertyChanges
5683
5764
  ], Timeline);
5684
5765
 
5685
- /** Timeline export modules */
5686
-
5687
- /**
5688
- * Layout all modules
5689
- */
5690
-
5691
- export { PaneProperties, Splitter, Panel, DashboardLayout, TimelineOrientation, TimelineAlign, TimelineItem, Timeline };
5766
+ export { DashboardLayout, PaneProperties, Panel, Splitter, Timeline, TimelineAlign, TimelineItem, TimelineOrientation };
5692
5767
  //# sourceMappingURL=ej2-layouts.es2015.js.map