@syncfusion/ej2-layouts 24.2.4 → 25.1.37

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 (128) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/README.md +26 -6
  3. package/dist/ej2-layouts.min.js +2 -2
  4. package/dist/ej2-layouts.umd.min.js +2 -2
  5. package/dist/ej2-layouts.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-layouts.es2015.js +375 -4
  7. package/dist/es6/ej2-layouts.es2015.js.map +1 -1
  8. package/dist/es6/ej2-layouts.es5.js +401 -4
  9. package/dist/es6/ej2-layouts.es5.js.map +1 -1
  10. package/dist/global/ej2-layouts.min.js +2 -2
  11. package/dist/global/ej2-layouts.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +7 -7
  14. package/src/dashboard-layout/dashboard-layout.js +1 -0
  15. package/src/index.d.ts +1 -0
  16. package/src/index.js +1 -0
  17. package/src/splitter/splitter.js +6 -2
  18. package/src/timeline/index.d.ts +3 -0
  19. package/src/timeline/index.js +2 -0
  20. package/src/timeline/timeline-model.d.ts +140 -0
  21. package/src/timeline/timeline.d.ts +236 -0
  22. package/src/timeline/timeline.js +392 -0
  23. package/styles/avatar/_bds-definition.scss +32 -0
  24. package/styles/bootstrap-dark.css +239 -0
  25. package/styles/bootstrap-dark.scss +1 -0
  26. package/styles/bootstrap.css +239 -0
  27. package/styles/bootstrap.scss +1 -0
  28. package/styles/bootstrap4.css +239 -0
  29. package/styles/bootstrap4.scss +1 -0
  30. package/styles/bootstrap5-dark.css +239 -0
  31. package/styles/bootstrap5-dark.scss +1 -0
  32. package/styles/bootstrap5.css +239 -0
  33. package/styles/bootstrap5.scss +1 -0
  34. package/styles/card/_bds-definition.scss +123 -0
  35. package/styles/card/_layout.scss +2 -2
  36. package/styles/card/_theme.scss +24 -4
  37. package/styles/card/fabric.css +2 -2
  38. package/styles/card/highcontrast.css +2 -2
  39. package/styles/card/material3-dark.css +4 -4
  40. package/styles/card/material3.css +4 -4
  41. package/styles/dashboard-layout/_bds-definition.scss +109 -0
  42. package/styles/dashboard-layout/icons/_bds.scss +80 -0
  43. package/styles/fabric-dark.css +239 -0
  44. package/styles/fabric-dark.scss +1 -0
  45. package/styles/fabric.css +241 -2
  46. package/styles/fabric.scss +1 -0
  47. package/styles/fluent-dark.css +239 -0
  48. package/styles/fluent-dark.scss +1 -0
  49. package/styles/fluent.css +239 -0
  50. package/styles/fluent.scss +1 -0
  51. package/styles/highcontrast-light.css +239 -0
  52. package/styles/highcontrast-light.scss +1 -0
  53. package/styles/highcontrast.css +241 -2
  54. package/styles/highcontrast.scss +1 -0
  55. package/styles/material-dark.css +239 -0
  56. package/styles/material-dark.scss +1 -0
  57. package/styles/material.css +239 -0
  58. package/styles/material.scss +1 -0
  59. package/styles/material3-dark.css +243 -4
  60. package/styles/material3-dark.scss +1 -0
  61. package/styles/material3.css +243 -4
  62. package/styles/material3.scss +1 -0
  63. package/styles/splitter/_bds-definition.scss +31 -0
  64. package/styles/splitter/icons/_bds.scss +39 -0
  65. package/styles/tailwind-dark.css +239 -0
  66. package/styles/tailwind-dark.scss +1 -0
  67. package/styles/tailwind.css +239 -0
  68. package/styles/tailwind.scss +1 -0
  69. package/styles/timeline/_all.scss +2 -0
  70. package/styles/timeline/_bds-definition.scss +18 -0
  71. package/styles/timeline/_bootstrap-dark-definition.scss +18 -0
  72. package/styles/timeline/_bootstrap-definition.scss +18 -0
  73. package/styles/timeline/_bootstrap4-definition.scss +18 -0
  74. package/styles/timeline/_bootstrap5-dark-definition.scss +1 -0
  75. package/styles/timeline/_bootstrap5-definition.scss +18 -0
  76. package/styles/timeline/_fabric-dark-definition.scss +18 -0
  77. package/styles/timeline/_fabric-definition.scss +18 -0
  78. package/styles/timeline/_fluent-dark-definition.scss +1 -0
  79. package/styles/timeline/_fluent-definition.scss +18 -0
  80. package/styles/timeline/_fusionnew-definition.scss +18 -0
  81. package/styles/timeline/_highcontrast-definition.scss +18 -0
  82. package/styles/timeline/_highcontrast-light-definition.scss +18 -0
  83. package/styles/timeline/_layout.scss +273 -0
  84. package/styles/timeline/_material-dark-definition.scss +18 -0
  85. package/styles/timeline/_material-definition.scss +18 -0
  86. package/styles/timeline/_material3-dark-definition.scss +1 -0
  87. package/styles/timeline/_material3-definition.scss +18 -0
  88. package/styles/timeline/_tailwind-dark-definition.scss +1 -0
  89. package/styles/timeline/_tailwind-definition.scss +18 -0
  90. package/styles/timeline/_theme.scss +31 -0
  91. package/styles/timeline/bootstrap-dark.css +238 -0
  92. package/styles/timeline/bootstrap-dark.scss +3 -0
  93. package/styles/timeline/bootstrap.css +238 -0
  94. package/styles/timeline/bootstrap.scss +3 -0
  95. package/styles/timeline/bootstrap4.css +238 -0
  96. package/styles/timeline/bootstrap4.scss +3 -0
  97. package/styles/timeline/bootstrap5-dark.css +238 -0
  98. package/styles/timeline/bootstrap5-dark.scss +3 -0
  99. package/styles/timeline/bootstrap5.css +238 -0
  100. package/styles/timeline/bootstrap5.scss +3 -0
  101. package/styles/timeline/fabric-dark.css +238 -0
  102. package/styles/timeline/fabric-dark.scss +3 -0
  103. package/styles/timeline/fabric.css +238 -0
  104. package/styles/timeline/fabric.scss +3 -0
  105. package/styles/timeline/fluent-dark.css +238 -0
  106. package/styles/timeline/fluent-dark.scss +3 -0
  107. package/styles/timeline/fluent.css +238 -0
  108. package/styles/timeline/fluent.scss +3 -0
  109. package/styles/timeline/highcontrast-light.css +238 -0
  110. package/styles/timeline/highcontrast-light.scss +3 -0
  111. package/styles/timeline/highcontrast.css +238 -0
  112. package/styles/timeline/highcontrast.scss +3 -0
  113. package/styles/timeline/material-dark.css +238 -0
  114. package/styles/timeline/material-dark.scss +3 -0
  115. package/styles/timeline/material.css +238 -0
  116. package/styles/timeline/material.scss +3 -0
  117. package/styles/timeline/material3-dark.css +293 -0
  118. package/styles/timeline/material3-dark.scss +4 -0
  119. package/styles/timeline/material3.css +349 -0
  120. package/styles/timeline/material3.scss +4 -0
  121. package/styles/timeline/tailwind-dark.css +238 -0
  122. package/styles/timeline/tailwind-dark.scss +3 -0
  123. package/styles/timeline/tailwind.css +238 -0
  124. package/styles/timeline/tailwind.scss +3 -0
  125. package/timeline.d.ts +4 -0
  126. package/timeline.js +4 -0
  127. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -41
  128. package/.github/PULL_REQUEST_TEMPLATE/Feature.md +0 -27
@@ -1,4 +1,4 @@
1
- import { Browser, ChildProperty, Collection, Component, Draggable, Event, EventHandler, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, append, closest, compile, detach, extend, formatUnit, getValue, isNullOrUndefined, isUndefined, removeClass, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
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';
2
2
 
3
3
  var __extends = (undefined && undefined.__extends) || (function () {
4
4
  var extendStatics = function (d, b) {
@@ -251,7 +251,9 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
251
251
  - staticPaneWidth - (this.border * 2);
252
252
  var avgDiffWidth = flexPaneWidth / flexPaneIndexes.length;
253
253
  for (var j = 0; j < flexPaneIndexes.length; j++) {
254
- this.allPanes[flexPaneIndexes[j]].style.flexBasis = avgDiffWidth + 'px';
254
+ if (this.allPanes[flexPaneIndexes[j]].style.flexBasis !== '') {
255
+ this.allPanes[flexPaneIndexes[j]].style.flexBasis = avgDiffWidth + 'px';
256
+ }
255
257
  }
256
258
  this.allPanes[index].classList.add(STATIC_PANE);
257
259
  };
@@ -1025,7 +1027,9 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
1025
1027
  if (paneCount - 1 === i) {
1026
1028
  var staticPaneCount = this.element.querySelectorAll('.' + STATIC_PANE).length;
1027
1029
  if (staticPaneCount === paneCount) {
1028
- removeClass([this.allPanes[i]], STATIC_PANE);
1030
+ if (this.allPanes[i].style.flexBasis === '') {
1031
+ removeClass([this.allPanes[i]], STATIC_PANE);
1032
+ }
1029
1033
  }
1030
1034
  }
1031
1035
  }
@@ -5293,6 +5297,7 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
5293
5297
  if (Array.isArray(getValue(key, this)) && key === 'panels') {
5294
5298
  // eslint-disable-next-line
5295
5299
  this.mergePanels(dataObj[key], this[key]);
5300
+ this[key] = dataObj[key];
5296
5301
  }
5297
5302
  }
5298
5303
  }
@@ -5403,9 +5408,401 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
5403
5408
  * dashboardlayout modules
5404
5409
  */
5405
5410
 
5411
+ var __extends$2 = (undefined && undefined.__extends) || (function () {
5412
+ var extendStatics = function (d, b) {
5413
+ extendStatics = Object.setPrototypeOf ||
5414
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5415
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5416
+ return extendStatics(d, b);
5417
+ };
5418
+ return function (d, b) {
5419
+ extendStatics(d, b);
5420
+ function __() { this.constructor = d; }
5421
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
5422
+ };
5423
+ })();
5424
+ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
5425
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
5426
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5427
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5428
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
5429
+ };
5430
+ var ITEMLISTCONTAINER = 'e-timeline-items';
5431
+ var ITEMCONTAINER = 'e-timeline-item';
5432
+ var OPPOSITECONTENT = 'e-opposite-content';
5433
+ var DOTCONTAINER = 'e-dot-item';
5434
+ var DOTCONTENT = 'e-dot';
5435
+ var CONTENT = 'e-content';
5436
+ var ITEMCONNECTOR = 'e-connector';
5437
+ var VERTICAL = 'e-vertical';
5438
+ var HORIZONTAL = 'e-horizontal';
5439
+ var TIMELINEREVERSE = 'e-timeline-reverse';
5440
+ var RTL$1 = 'e-rtl';
5441
+ var DISABLED$1 = 'e-item-disabled';
5442
+ var TEMPLATE = 'e-item-template';
5443
+ /**
5444
+ * Defines the orientation type of the Timeline.
5445
+ */
5446
+ var TimelineOrientation;
5447
+ (function (TimelineOrientation) {
5448
+ /**
5449
+ * Items are displayed horizontally.
5450
+ */
5451
+ TimelineOrientation["Horizontal"] = "Horizontal";
5452
+ /**
5453
+ * Items are displayed vertically.
5454
+ */
5455
+ TimelineOrientation["Vertical"] = "Vertical";
5456
+ })(TimelineOrientation || (TimelineOrientation = {}));
5457
+ /**
5458
+ * Specifies the alignment of item content within the Timeline.
5459
+ */
5460
+ var TimelineAlign;
5461
+ (function (TimelineAlign) {
5462
+ /**
5463
+ * Aligns item content to the top and opposite content to the bottom when the Timeline is in a horizontal orientation, or the content to the left and opposite content to the right when the Timeline is in a vertical orientation.
5464
+ */
5465
+ TimelineAlign["Before"] = "Before";
5466
+ /**
5467
+ * Aligns item content to the bottom and opposite content to the top when the Timeline is in a horizontal orientation, or the content to the right and opposite content to the left when the Timeline is in a vertical orientation.
5468
+ */
5469
+ TimelineAlign["After"] = "After";
5470
+ /**
5471
+ * Aligns item content alternatively, regardless of the Timeline's orientation.
5472
+ */
5473
+ TimelineAlign["Alternate"] = "Alternate";
5474
+ /**
5475
+ * Aligns item content in alternate reverse, regardless of the Timeline's orientation.
5476
+ */
5477
+ TimelineAlign["AlternateReverse"] = "AlternateReverse";
5478
+ })(TimelineAlign || (TimelineAlign = {}));
5479
+ /**
5480
+ * Specifies the items of the Timeline.
5481
+ */
5482
+ var TimelineItem = /** @__PURE__ @class */ (function (_super) {
5483
+ __extends$2(TimelineItem, _super);
5484
+ function TimelineItem() {
5485
+ return _super !== null && _super.apply(this, arguments) || this;
5486
+ }
5487
+ __decorate$2([
5488
+ Property('')
5489
+ ], TimelineItem.prototype, "dotCss", void 0);
5490
+ __decorate$2([
5491
+ Property('')
5492
+ ], TimelineItem.prototype, "content", void 0);
5493
+ __decorate$2([
5494
+ Property('')
5495
+ ], TimelineItem.prototype, "oppositeContent", void 0);
5496
+ __decorate$2([
5497
+ Property(false)
5498
+ ], TimelineItem.prototype, "disabled", void 0);
5499
+ __decorate$2([
5500
+ Property('')
5501
+ ], TimelineItem.prototype, "cssClass", void 0);
5502
+ return TimelineItem;
5503
+ }(ChildProperty));
5504
+ /**
5505
+ * The Timeline component presents a series of events or activities in chronological order, allowing users to track the progression of time.
5506
+ *
5507
+ * ```html
5508
+ * <div id="timeline"></div>
5509
+ * ```
5510
+ * ```typescript
5511
+ * <script>
5512
+ * let timelineObj: Timeline = new Timeline({items : [{}, {}, {}, {}, {}]});
5513
+ * timelineObj.appendTo('#timeline');
5514
+ * </script>
5515
+ * ```
5516
+ */
5517
+ var Timeline = /** @__PURE__ @class */ (function (_super) {
5518
+ __extends$2(Timeline, _super);
5519
+ /**
5520
+ * * Constructor for creating the Timeline component.
5521
+ *
5522
+ * @param {TimelineModel} options - Specifies the Timeline model.
5523
+ * @param {string | HTMLElement} element - Specifies the element to render as component.
5524
+ * @private
5525
+ */
5526
+ function Timeline(options, element) {
5527
+ return _super.call(this, options, element) || this;
5528
+ }
5529
+ Timeline.prototype.preRender = function () {
5530
+ if (!this.element.id) {
5531
+ this.element.id = getUniqueID('e-' + this.getModuleName());
5532
+ }
5533
+ };
5534
+ /**
5535
+ * To get component name.
5536
+ *
5537
+ * @returns {string} - Module Name
5538
+ * @private
5539
+ */
5540
+ Timeline.prototype.getModuleName = function () {
5541
+ return 'timeline';
5542
+ };
5543
+ /**
5544
+ * This method is abstract member of the Component<HTMLElement>.
5545
+ *
5546
+ * @private
5547
+ * @returns {string}
5548
+ */
5549
+ Timeline.prototype.getPersistData = function () {
5550
+ return this.addOnPersist([]);
5551
+ };
5552
+ Timeline.prototype.render = function () {
5553
+ attributes(this.element, { 'role': 'navigation', 'aria-label': this.element.id });
5554
+ this.timelineListEle = this.createElement('ol', { className: ITEMLISTCONTAINER });
5555
+ this.updateOrientation();
5556
+ this.updateCssClass(this.cssClass);
5557
+ this.updateAlign();
5558
+ this.updateReverse();
5559
+ this.updateRtl();
5560
+ this.updateTemplateFunction();
5561
+ this.renderItems();
5562
+ this.element.appendChild(this.timelineListEle);
5563
+ };
5564
+ 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);
5569
+ }
5570
+ };
5571
+ Timeline.prototype.updateCssClass = function (addCss, removeCss) {
5572
+ if (removeCss === void 0) { removeCss = ""; }
5573
+ var _a, _b;
5574
+ var cssClasses;
5575
+ if (removeCss) {
5576
+ cssClasses = removeCss.trim().split(' ');
5577
+ (_a = this.element.classList).remove.apply(_a, cssClasses);
5578
+ }
5579
+ if (addCss) {
5580
+ cssClasses = addCss.trim().split(' ');
5581
+ (_b = this.element.classList).add.apply(_b, cssClasses);
5582
+ }
5583
+ };
5584
+ Timeline.prototype.updateRtl = function () {
5585
+ this.element.classList[this.enableRtl ? 'add' : 'remove'](RTL$1);
5586
+ };
5587
+ 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);
5592
+ }
5593
+ };
5594
+ Timeline.prototype.updateReverse = function () {
5595
+ this.element.classList[this.reverse ? 'add' : 'remove'](TIMELINEREVERSE);
5596
+ };
5597
+ Timeline.prototype.renderItems = function () {
5598
+ var _this = this;
5599
+ var _a;
5600
+ for (var index = 0; index < this.items.length; index++) {
5601
+ var item = this.items[parseInt(index.toString(), 10)];
5602
+ var timelineItem = this.createElement('li', { className: ITEMCONTAINER + ' ' + ITEMCONNECTOR });
5603
+ if (!this.template) {
5604
+ var oppositeTextEle = this.createElement('div', { className: OPPOSITECONTENT });
5605
+ 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
+ }
5613
+ }
5614
+ timelineItem.appendChild(oppositeTextEle);
5615
+ var dotContainer = this.createElement('div', { className: DOTCONTAINER });
5616
+ var dotEleCss = item.dotCss ? DOTCONTENT + ' ' + item.dotCss.trim() : DOTCONTENT;
5617
+ var dotEle = this.createElement('div', { className: dotEleCss });
5618
+ dotContainer.appendChild(dotEle);
5619
+ timelineItem.appendChild(dotContainer);
5620
+ var contentEle = this.createElement('div', { className: CONTENT });
5621
+ 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
+ }
5630
+ timelineItem.appendChild(contentEle);
5631
+ if (item.cssClass) {
5632
+ (_a = timelineItem.classList).add.apply(_a, item.cssClass.trim().split(' '));
5633
+ }
5634
+ if (item.disabled) {
5635
+ timelineItem.classList.add(DISABLED$1);
5636
+ }
5637
+ }
5638
+ else {
5639
+ this.renderItemContent(index, false, timelineItem);
5640
+ }
5641
+ var eventArgs = { element: timelineItem, index: index };
5642
+ this.trigger('beforeItemRender', eventArgs, function (args) { _this.timelineListEle.appendChild(args.element); });
5643
+ }
5644
+ };
5645
+ Timeline.prototype.updateTemplateFunction = function () {
5646
+ this.templateFunction = this.template ? this.getTemplateFunction(this.template, false) : null;
5647
+ };
5648
+ Timeline.prototype.renderItemContent = function (index, isrerender, timelineItem) {
5649
+ var listItems = this.timelineListEle.querySelectorAll('li');
5650
+ if (isrerender) {
5651
+ this.removeItemContent(listItems[parseInt((index).toString(), 10)]);
5652
+ }
5653
+ if (this.template) {
5654
+ isrerender ? listItems[parseInt((index).toString(), 10)].classList.add(TEMPLATE) :
5655
+ timelineItem.classList.add(TEMPLATE);
5656
+ var item = this.items[parseInt(index.toString(), 10)];
5657
+ append(this.templateFunction({ item: item, itemIndex: index }, this, 'timelineTemplate', (this.element.id + '_timelineTemplate'), this.isStringTemplate), isrerender ? listItems[parseInt((index).toString(), 10)] : timelineItem);
5658
+ }
5659
+ this.renderReactTemplates();
5660
+ };
5661
+ Timeline.prototype.removeItemContent = function (ele) {
5662
+ ele.classList.remove(TEMPLATE);
5663
+ var firstChild = ele.firstElementChild;
5664
+ for (var i = 0; i < ele.childElementCount; i++) {
5665
+ firstChild.remove();
5666
+ }
5667
+ };
5668
+ /**
5669
+ * Gets template content based on the template property value.
5670
+ *
5671
+ * @param {string | Function} template - Template property value.
5672
+ * @returns {Function} - Return template function.
5673
+ * @hidden
5674
+ */
5675
+ Timeline.prototype.getTemplateFunction = function (template, notCompile) {
5676
+ if (notCompile === void 0) { notCompile = true; }
5677
+ if (typeof template === 'string') {
5678
+ var content = '';
5679
+ try {
5680
+ var tempEle = select(template);
5681
+ if (tempEle) {
5682
+ //Return innerHTML incase of jsrenderer script else outerHTML
5683
+ content = tempEle.tagName === 'SCRIPT' ? tempEle.innerHTML : tempEle.outerHTML;
5684
+ notCompile = false;
5685
+ }
5686
+ else {
5687
+ content = template;
5688
+ }
5689
+ }
5690
+ catch (e) {
5691
+ content = template;
5692
+ }
5693
+ return notCompile ? content : compile(content);
5694
+ }
5695
+ else {
5696
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
5697
+ return compile(template);
5698
+ }
5699
+ };
5700
+ Timeline.prototype.removeItemElements = function () {
5701
+ var listItems = this.timelineListEle.querySelectorAll('li');
5702
+ for (var i = 0; i < listItems.length; i++) {
5703
+ remove(listItems[parseInt(i.toString(), 10)]);
5704
+ }
5705
+ };
5706
+ Timeline.prototype.updateElementClassArray = function () {
5707
+ var classArray = [RTL$1, 'e-align-before', 'e-align-after', 'e-outline', 'e-fill', 'e-align-alternate',
5708
+ 'e-align-alternatereverse', TIMELINEREVERSE, HORIZONTAL, VERTICAL];
5709
+ removeClass([this.element], classArray);
5710
+ };
5711
+ Timeline.prototype.updateContent = function () {
5712
+ if (this.isReact) {
5713
+ this.clearTemplate(['timelineTemplate']);
5714
+ }
5715
+ for (var i = 0; i < this.items.length; i++) {
5716
+ this.renderItemContent(i, true);
5717
+ }
5718
+ };
5719
+ Timeline.prototype.destroy = function () {
5720
+ _super.prototype.destroy.call(this);
5721
+ // unwires the events and detach the li elements
5722
+ this.removeItemElements();
5723
+ this.element.removeAttribute("role");
5724
+ this.element.removeAttribute("aria-label");
5725
+ this.clearTemplate();
5726
+ if (this.timelineListEle) {
5727
+ remove(this.timelineListEle);
5728
+ }
5729
+ this.timelineListEle = null;
5730
+ this.updateElementClassArray();
5731
+ };
5732
+ /**
5733
+ * Called internally if any of the property value changed.
5734
+ *
5735
+ * @param {TimelineModel} newProp - Specifies new properties
5736
+ * @param {TimelineModel} oldProp - Specifies old properties
5737
+ * @returns {void}
5738
+ * @private
5739
+ */
5740
+ Timeline.prototype.onPropertyChanged = function (newProp, oldProp) {
5741
+ for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
5742
+ var prop = _a[_i];
5743
+ switch (prop) {
5744
+ case 'items': {
5745
+ this.removeItemElements();
5746
+ this.renderItems();
5747
+ break;
5748
+ }
5749
+ case 'orientation':
5750
+ this.updateOrientation();
5751
+ break;
5752
+ case 'align':
5753
+ this.updateAlign();
5754
+ break;
5755
+ case 'enableRtl':
5756
+ this.updateRtl();
5757
+ break;
5758
+ case 'cssClass':
5759
+ this.updateCssClass(newProp.cssClass, oldProp.cssClass);
5760
+ break;
5761
+ case 'reverse':
5762
+ this.element.classList[this.reverse ? 'add' : 'remove'](TIMELINEREVERSE);
5763
+ break;
5764
+ case 'template':
5765
+ this.updateTemplateFunction();
5766
+ this.updateContent();
5767
+ break;
5768
+ }
5769
+ }
5770
+ };
5771
+ __decorate$2([
5772
+ Property(TimelineOrientation.Vertical)
5773
+ ], Timeline.prototype, "orientation", void 0);
5774
+ __decorate$2([
5775
+ Property(TimelineAlign.After)
5776
+ ], Timeline.prototype, "align", void 0);
5777
+ __decorate$2([
5778
+ Collection([], TimelineItem)
5779
+ ], Timeline.prototype, "items", void 0);
5780
+ __decorate$2([
5781
+ Property('')
5782
+ ], Timeline.prototype, "cssClass", void 0);
5783
+ __decorate$2([
5784
+ Property(false)
5785
+ ], Timeline.prototype, "reverse", void 0);
5786
+ __decorate$2([
5787
+ Property('')
5788
+ ], Timeline.prototype, "template", void 0);
5789
+ __decorate$2([
5790
+ Event()
5791
+ ], Timeline.prototype, "created", void 0);
5792
+ __decorate$2([
5793
+ Event()
5794
+ ], Timeline.prototype, "beforeItemRender", void 0);
5795
+ Timeline = __decorate$2([
5796
+ NotifyPropertyChanges
5797
+ ], Timeline);
5798
+ return Timeline;
5799
+ }(Component));
5800
+
5801
+ /** Timeline export modules */
5802
+
5406
5803
  /**
5407
5804
  * Layout all modules
5408
5805
  */
5409
5806
 
5410
- export { PaneProperties, Splitter, Panel, DashboardLayout };
5807
+ export { PaneProperties, Splitter, Panel, DashboardLayout, TimelineOrientation, TimelineAlign, TimelineItem, Timeline };
5411
5808
  //# sourceMappingURL=ej2-layouts.es5.js.map