@syncfusion/ej2-layouts 24.2.3 → 25.1.35-579988

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