@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 __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;
@@ -230,7 +230,9 @@ let Splitter = class Splitter extends Component {
230
230
  - staticPaneWidth - (this.border * 2);
231
231
  const avgDiffWidth = flexPaneWidth / flexPaneIndexes.length;
232
232
  for (let j = 0; j < flexPaneIndexes.length; j++) {
233
- this.allPanes[flexPaneIndexes[j]].style.flexBasis = avgDiffWidth + 'px';
233
+ if (this.allPanes[flexPaneIndexes[j]].style.flexBasis !== '') {
234
+ this.allPanes[flexPaneIndexes[j]].style.flexBasis = avgDiffWidth + 'px';
235
+ }
234
236
  }
235
237
  this.allPanes[index].classList.add(STATIC_PANE);
236
238
  }
@@ -1001,7 +1003,9 @@ let Splitter = class Splitter extends Component {
1001
1003
  if (paneCount - 1 === i) {
1002
1004
  const staticPaneCount = this.element.querySelectorAll('.' + STATIC_PANE).length;
1003
1005
  if (staticPaneCount === paneCount) {
1004
- removeClass([this.allPanes[i]], STATIC_PANE);
1006
+ if (this.allPanes[i].style.flexBasis === '') {
1007
+ removeClass([this.allPanes[i]], STATIC_PANE);
1008
+ }
1005
1009
  }
1006
1010
  }
1007
1011
  }
@@ -3223,10 +3227,14 @@ let DashboardLayout = class DashboardLayout extends Component {
3223
3227
  this.panelResponsiveUpdate();
3224
3228
  this.updateGridLines();
3225
3229
  }
3226
- this.removeResizeClasses(this.panelCollection);
3227
- this.setClasses(this.panelCollection);
3230
+ if (!isNullOrUndefined(this.panelCollection)) {
3231
+ this.removeResizeClasses(this.panelCollection);
3232
+ this.setClasses(this.panelCollection);
3233
+ }
3228
3234
  this.resizeEvents();
3229
- this.checkDragging(this.dragCollection);
3235
+ if (!isNullOrUndefined(this.panelCollection)) {
3236
+ this.checkDragging(this.dragCollection);
3237
+ }
3230
3238
  }
3231
3239
  updateGridLines() {
3232
3240
  if (this.element.querySelector('.e-dashboard-gridline-table')) {
@@ -3291,9 +3299,13 @@ let DashboardLayout = class DashboardLayout extends Component {
3291
3299
  this.panelPropertyChange(updatedPanel[i], { row: i, col: 0 });
3292
3300
  this.setPanelPosition(panelElement, updatedPanel[i].row, updatedPanel[i].col);
3293
3301
  this.panelsSizeY = this.panelsSizeY + updatedPanel[i].sizeY;
3294
- this.setClasses(this.panelCollection);
3295
- this.checkDragging(this.dragCollection);
3296
- this.removeResizeClasses(this.panelCollection);
3302
+ if (!isNullOrUndefined(this.panelCollection)) {
3303
+ this.setClasses(this.panelCollection);
3304
+ this.removeResizeClasses(this.panelCollection);
3305
+ }
3306
+ if (!isNullOrUndefined(this.dragCollection)) {
3307
+ this.checkDragging(this.dragCollection);
3308
+ }
3297
3309
  }
3298
3310
  }
3299
3311
  this.updateRowHeight();
@@ -5305,9 +5317,375 @@ DashboardLayout = __decorate$1([
5305
5317
  * dashboardlayout modules
5306
5318
  */
5307
5319
 
5320
+ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
5321
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
5322
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5323
+ 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;
5324
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
5325
+ };
5326
+ const ITEMLISTCONTAINER = 'e-timeline-items';
5327
+ const ITEMCONTAINER = 'e-timeline-item';
5328
+ const OPPOSITECONTENT = 'e-opposite-content';
5329
+ const DOTCONTAINER = 'e-dot-item';
5330
+ const DOTCONTENT = 'e-dot';
5331
+ const CONTENT = 'e-content';
5332
+ const ITEMCONNECTOR = 'e-connector';
5333
+ const VERTICAL = 'e-vertical';
5334
+ const HORIZONTAL = 'e-horizontal';
5335
+ const TIMELINEREVERSE = 'e-timeline-reverse';
5336
+ const RTL$1 = 'e-rtl';
5337
+ const DISABLED$1 = 'e-item-disabled';
5338
+ const TEMPLATE = 'e-item-template';
5339
+ /**
5340
+ * Defines the orientation type of the Timeline.
5341
+ */
5342
+ var TimelineOrientation;
5343
+ (function (TimelineOrientation) {
5344
+ /**
5345
+ * Items are displayed horizontally.
5346
+ */
5347
+ TimelineOrientation["Horizontal"] = "Horizontal";
5348
+ /**
5349
+ * Items are displayed vertically.
5350
+ */
5351
+ TimelineOrientation["Vertical"] = "Vertical";
5352
+ })(TimelineOrientation || (TimelineOrientation = {}));
5353
+ /**
5354
+ * Specifies the alignment of item content within the Timeline.
5355
+ */
5356
+ var TimelineAlign;
5357
+ (function (TimelineAlign) {
5358
+ /**
5359
+ * 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.
5360
+ */
5361
+ TimelineAlign["Before"] = "Before";
5362
+ /**
5363
+ * 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.
5364
+ */
5365
+ TimelineAlign["After"] = "After";
5366
+ /**
5367
+ * Aligns item content alternatively, regardless of the Timeline's orientation.
5368
+ */
5369
+ TimelineAlign["Alternate"] = "Alternate";
5370
+ /**
5371
+ * Aligns item content in alternate reverse, regardless of the Timeline's orientation.
5372
+ */
5373
+ TimelineAlign["AlternateReverse"] = "AlternateReverse";
5374
+ })(TimelineAlign || (TimelineAlign = {}));
5375
+ /**
5376
+ * Specifies the items of the Timeline.
5377
+ */
5378
+ class TimelineItem extends ChildProperty {
5379
+ }
5380
+ __decorate$2([
5381
+ Property('')
5382
+ ], TimelineItem.prototype, "dotCss", void 0);
5383
+ __decorate$2([
5384
+ Property('')
5385
+ ], TimelineItem.prototype, "content", void 0);
5386
+ __decorate$2([
5387
+ Property('')
5388
+ ], TimelineItem.prototype, "oppositeContent", void 0);
5389
+ __decorate$2([
5390
+ Property(false)
5391
+ ], TimelineItem.prototype, "disabled", void 0);
5392
+ __decorate$2([
5393
+ Property('')
5394
+ ], TimelineItem.prototype, "cssClass", void 0);
5395
+ /**
5396
+ * The Timeline component presents a series of events or activities in chronological order, allowing users to track the progression of time.
5397
+ *
5398
+ * ```html
5399
+ * <div id="timeline"></div>
5400
+ * ```
5401
+ * ```typescript
5402
+ * <script>
5403
+ * let timelineObj: Timeline = new Timeline({items : [{}, {}, {}, {}, {}]});
5404
+ * timelineObj.appendTo('#timeline');
5405
+ * </script>
5406
+ * ```
5407
+ */
5408
+ let Timeline = class Timeline extends Component {
5409
+ /**
5410
+ * * Constructor for creating the Timeline component.
5411
+ *
5412
+ * @param {TimelineModel} options - Specifies the Timeline model.
5413
+ * @param {string | HTMLElement} element - Specifies the element to render as component.
5414
+ * @private
5415
+ */
5416
+ constructor(options, element) {
5417
+ super(options, element);
5418
+ }
5419
+ preRender() {
5420
+ if (!this.element.id) {
5421
+ this.element.id = getUniqueID('e-' + this.getModuleName());
5422
+ }
5423
+ }
5424
+ /**
5425
+ * To get component name.
5426
+ *
5427
+ * @returns {string} - Module Name
5428
+ * @private
5429
+ */
5430
+ getModuleName() {
5431
+ return 'timeline';
5432
+ }
5433
+ /**
5434
+ * This method is abstract member of the Component<HTMLElement>.
5435
+ *
5436
+ * @private
5437
+ * @returns {string}
5438
+ */
5439
+ getPersistData() {
5440
+ return this.addOnPersist([]);
5441
+ }
5442
+ render() {
5443
+ attributes(this.element, { 'role': 'navigation', 'aria-label': this.element.id });
5444
+ this.timelineListEle = this.createElement('ol', { className: ITEMLISTCONTAINER });
5445
+ this.updateOrientation();
5446
+ this.updateCssClass(this.cssClass);
5447
+ this.updateAlign();
5448
+ this.updateReverse();
5449
+ this.updateRtl();
5450
+ this.updateTemplateFunction();
5451
+ this.renderItems();
5452
+ this.element.appendChild(this.timelineListEle);
5453
+ }
5454
+ updateOrientation() {
5455
+ const orientation = this.orientation.toLowerCase();
5456
+ if (orientation === 'horizontal' || orientation === 'vertical') {
5457
+ this.element.classList.remove(HORIZONTAL, VERTICAL);
5458
+ this.element.classList.add('e-' + orientation);
5459
+ }
5460
+ }
5461
+ updateCssClass(addCss, removeCss = "") {
5462
+ let cssClasses;
5463
+ if (removeCss) {
5464
+ cssClasses = removeCss.trim().split(' ');
5465
+ this.element.classList.remove(...cssClasses);
5466
+ }
5467
+ if (addCss) {
5468
+ cssClasses = addCss.trim().split(' ');
5469
+ this.element.classList.add(...cssClasses);
5470
+ }
5471
+ }
5472
+ updateRtl() {
5473
+ this.element.classList[this.enableRtl ? 'add' : 'remove'](RTL$1);
5474
+ }
5475
+ updateAlign() {
5476
+ const align = this.align.toLowerCase();
5477
+ if (align === 'before' || align === 'after' || align === 'alternate' || align === 'alternatereverse') {
5478
+ this.element.classList.remove('e-align-before', 'e-align-after', 'e-align-alternate', 'e-align-alternatereverse');
5479
+ this.element.classList.add('e-align-' + align);
5480
+ }
5481
+ }
5482
+ updateReverse() {
5483
+ this.element.classList[this.reverse ? 'add' : 'remove'](TIMELINEREVERSE);
5484
+ }
5485
+ renderItems() {
5486
+ for (let index = 0; index < this.items.length; index++) {
5487
+ const item = this.items[parseInt(index.toString(), 10)];
5488
+ const timelineItem = this.createElement('li', { className: ITEMCONTAINER + ' ' + ITEMCONNECTOR });
5489
+ if (!this.template) {
5490
+ const oppositeTextEle = this.createElement('div', { className: OPPOSITECONTENT });
5491
+ if (item.oppositeContent) {
5492
+ const oppositeCtn = this.getTemplateFunction(item.oppositeContent);
5493
+ if (typeof oppositeCtn === 'string') {
5494
+ oppositeTextEle.innerText = oppositeCtn;
5495
+ }
5496
+ else {
5497
+ append(oppositeCtn({ item: item, itemIndex: index }), oppositeTextEle);
5498
+ }
5499
+ }
5500
+ timelineItem.appendChild(oppositeTextEle);
5501
+ const dotContainer = this.createElement('div', { className: DOTCONTAINER });
5502
+ const dotEleCss = item.dotCss ? DOTCONTENT + ' ' + item.dotCss.trim() : DOTCONTENT;
5503
+ const dotEle = this.createElement('div', { className: dotEleCss });
5504
+ dotContainer.appendChild(dotEle);
5505
+ timelineItem.appendChild(dotContainer);
5506
+ const contentEle = this.createElement('div', { className: CONTENT });
5507
+ if (item.content) {
5508
+ const ctn = this.getTemplateFunction(item.content);
5509
+ if (typeof ctn === 'string') {
5510
+ contentEle.innerText = ctn;
5511
+ }
5512
+ else {
5513
+ append(ctn({ item: item, itemIndex: index }), contentEle);
5514
+ }
5515
+ }
5516
+ timelineItem.appendChild(contentEle);
5517
+ if (item.cssClass) {
5518
+ timelineItem.classList.add(...item.cssClass.trim().split(' '));
5519
+ }
5520
+ if (item.disabled) {
5521
+ timelineItem.classList.add(DISABLED$1);
5522
+ }
5523
+ }
5524
+ else {
5525
+ this.renderItemContent(index, false, timelineItem);
5526
+ }
5527
+ const eventArgs = { element: timelineItem, index: index };
5528
+ this.trigger('beforeItemRender', eventArgs, (args) => { this.timelineListEle.appendChild(args.element); });
5529
+ }
5530
+ }
5531
+ updateTemplateFunction() {
5532
+ this.templateFunction = this.template ? this.getTemplateFunction(this.template, false) : null;
5533
+ }
5534
+ renderItemContent(index, isrerender, timelineItem) {
5535
+ const listItems = this.timelineListEle.querySelectorAll('li');
5536
+ if (isrerender) {
5537
+ this.removeItemContent(listItems[parseInt((index).toString(), 10)]);
5538
+ }
5539
+ if (this.template) {
5540
+ isrerender ? listItems[parseInt((index).toString(), 10)].classList.add(TEMPLATE) :
5541
+ timelineItem.classList.add(TEMPLATE);
5542
+ const item = this.items[parseInt(index.toString(), 10)];
5543
+ append(this.templateFunction({ item: item, itemIndex: index }, this, 'timelineTemplate', (this.element.id + '_timelineTemplate'), this.isStringTemplate), isrerender ? listItems[parseInt((index).toString(), 10)] : timelineItem);
5544
+ }
5545
+ this.renderReactTemplates();
5546
+ }
5547
+ removeItemContent(ele) {
5548
+ ele.classList.remove(TEMPLATE);
5549
+ const firstChild = ele.firstElementChild;
5550
+ for (let i = 0; i < ele.childElementCount; i++) {
5551
+ firstChild.remove();
5552
+ }
5553
+ }
5554
+ /**
5555
+ * Gets template content based on the template property value.
5556
+ *
5557
+ * @param {string | Function} template - Template property value.
5558
+ * @returns {Function} - Return template function.
5559
+ * @hidden
5560
+ */
5561
+ getTemplateFunction(template, notCompile = true) {
5562
+ if (typeof template === 'string') {
5563
+ let content = '';
5564
+ try {
5565
+ const tempEle = select(template);
5566
+ if (tempEle) {
5567
+ //Return innerHTML incase of jsrenderer script else outerHTML
5568
+ content = tempEle.tagName === 'SCRIPT' ? tempEle.innerHTML : tempEle.outerHTML;
5569
+ notCompile = false;
5570
+ }
5571
+ else {
5572
+ content = template;
5573
+ }
5574
+ }
5575
+ catch (e) {
5576
+ content = template;
5577
+ }
5578
+ return notCompile ? content : compile(content);
5579
+ }
5580
+ else {
5581
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
5582
+ return compile(template);
5583
+ }
5584
+ }
5585
+ removeItemElements() {
5586
+ const listItems = this.timelineListEle.querySelectorAll('li');
5587
+ for (let i = 0; i < listItems.length; i++) {
5588
+ remove(listItems[parseInt(i.toString(), 10)]);
5589
+ }
5590
+ }
5591
+ updateElementClassArray() {
5592
+ const classArray = [RTL$1, 'e-align-before', 'e-align-after', 'e-outline', 'e-fill', 'e-align-alternate',
5593
+ 'e-align-alternatereverse', TIMELINEREVERSE, HORIZONTAL, VERTICAL];
5594
+ removeClass([this.element], classArray);
5595
+ }
5596
+ updateContent() {
5597
+ if (this.isReact) {
5598
+ this.clearTemplate(['timelineTemplate']);
5599
+ }
5600
+ for (let i = 0; i < this.items.length; i++) {
5601
+ this.renderItemContent(i, true);
5602
+ }
5603
+ }
5604
+ destroy() {
5605
+ super.destroy();
5606
+ // unwires the events and detach the li elements
5607
+ this.removeItemElements();
5608
+ this.element.removeAttribute("role");
5609
+ this.element.removeAttribute("aria-label");
5610
+ this.clearTemplate();
5611
+ if (this.timelineListEle) {
5612
+ remove(this.timelineListEle);
5613
+ }
5614
+ this.timelineListEle = null;
5615
+ this.updateElementClassArray();
5616
+ }
5617
+ /**
5618
+ * Called internally if any of the property value changed.
5619
+ *
5620
+ * @param {TimelineModel} newProp - Specifies new properties
5621
+ * @param {TimelineModel} oldProp - Specifies old properties
5622
+ * @returns {void}
5623
+ * @private
5624
+ */
5625
+ onPropertyChanged(newProp, oldProp) {
5626
+ for (const prop of Object.keys(newProp)) {
5627
+ switch (prop) {
5628
+ case 'items': {
5629
+ this.removeItemElements();
5630
+ this.renderItems();
5631
+ break;
5632
+ }
5633
+ case 'orientation':
5634
+ this.updateOrientation();
5635
+ break;
5636
+ case 'align':
5637
+ this.updateAlign();
5638
+ break;
5639
+ case 'enableRtl':
5640
+ this.updateRtl();
5641
+ break;
5642
+ case 'cssClass':
5643
+ this.updateCssClass(newProp.cssClass, oldProp.cssClass);
5644
+ break;
5645
+ case 'reverse':
5646
+ this.element.classList[this.reverse ? 'add' : 'remove'](TIMELINEREVERSE);
5647
+ break;
5648
+ case 'template':
5649
+ this.updateTemplateFunction();
5650
+ this.updateContent();
5651
+ break;
5652
+ }
5653
+ }
5654
+ }
5655
+ };
5656
+ __decorate$2([
5657
+ Property(TimelineOrientation.Vertical)
5658
+ ], Timeline.prototype, "orientation", void 0);
5659
+ __decorate$2([
5660
+ Property(TimelineAlign.After)
5661
+ ], Timeline.prototype, "align", void 0);
5662
+ __decorate$2([
5663
+ Collection([], TimelineItem)
5664
+ ], Timeline.prototype, "items", void 0);
5665
+ __decorate$2([
5666
+ Property('')
5667
+ ], Timeline.prototype, "cssClass", void 0);
5668
+ __decorate$2([
5669
+ Property(false)
5670
+ ], Timeline.prototype, "reverse", void 0);
5671
+ __decorate$2([
5672
+ Property('')
5673
+ ], Timeline.prototype, "template", void 0);
5674
+ __decorate$2([
5675
+ Event()
5676
+ ], Timeline.prototype, "created", void 0);
5677
+ __decorate$2([
5678
+ Event()
5679
+ ], Timeline.prototype, "beforeItemRender", void 0);
5680
+ Timeline = __decorate$2([
5681
+ NotifyPropertyChanges
5682
+ ], Timeline);
5683
+
5684
+ /** Timeline export modules */
5685
+
5308
5686
  /**
5309
5687
  * Layout all modules
5310
5688
  */
5311
5689
 
5312
- export { PaneProperties, Splitter, Panel, DashboardLayout };
5690
+ export { PaneProperties, Splitter, Panel, DashboardLayout, TimelineOrientation, TimelineAlign, TimelineItem, Timeline };
5313
5691
  //# sourceMappingURL=ej2-layouts.es2015.js.map