@syncfusion/ej2-layouts 24.2.4 → 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.
- package/CHANGELOG.md +13 -3
- package/dist/ej2-layouts.min.js +2 -2
- package/dist/ej2-layouts.umd.min.js +2 -2
- package/dist/ej2-layouts.umd.min.js.map +1 -1
- package/dist/es6/ej2-layouts.es2015.js +374 -4
- package/dist/es6/ej2-layouts.es2015.js.map +1 -1
- package/dist/es6/ej2-layouts.es5.js +400 -4
- package/dist/es6/ej2-layouts.es5.js.map +1 -1
- package/dist/global/ej2-layouts.min.js +2 -2
- package/dist/global/ej2-layouts.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +7 -7
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/splitter/splitter.js +6 -2
- package/src/timeline/index.d.ts +3 -0
- package/src/timeline/index.js +2 -0
- package/src/timeline/timeline-model.d.ts +140 -0
- package/src/timeline/timeline.d.ts +236 -0
- package/src/timeline/timeline.js +392 -0
- package/styles/avatar/_bds-definition.scss +32 -0
- package/styles/bootstrap-dark.css +239 -0
- package/styles/bootstrap-dark.scss +1 -0
- package/styles/bootstrap.css +239 -0
- package/styles/bootstrap.scss +1 -0
- package/styles/bootstrap4.css +239 -0
- package/styles/bootstrap4.scss +1 -0
- package/styles/bootstrap5-dark.css +239 -0
- package/styles/bootstrap5-dark.scss +1 -0
- package/styles/bootstrap5.css +239 -0
- package/styles/bootstrap5.scss +1 -0
- package/styles/card/_bds-definition.scss +123 -0
- package/styles/card/_layout.scss +2 -2
- package/styles/card/_theme.scss +24 -4
- package/styles/card/fabric.css +2 -2
- package/styles/card/highcontrast.css +2 -2
- package/styles/card/material3-dark.css +4 -4
- package/styles/card/material3.css +4 -4
- package/styles/dashboard-layout/_bds-definition.scss +109 -0
- package/styles/dashboard-layout/icons/_bds.scss +80 -0
- package/styles/fabric-dark.css +239 -0
- package/styles/fabric-dark.scss +1 -0
- package/styles/fabric.css +241 -2
- package/styles/fabric.scss +1 -0
- package/styles/fluent-dark.css +239 -0
- package/styles/fluent-dark.scss +1 -0
- package/styles/fluent.css +239 -0
- package/styles/fluent.scss +1 -0
- package/styles/highcontrast-light.css +239 -0
- package/styles/highcontrast-light.scss +1 -0
- package/styles/highcontrast.css +241 -2
- package/styles/highcontrast.scss +1 -0
- package/styles/material-dark.css +239 -0
- package/styles/material-dark.scss +1 -0
- package/styles/material.css +239 -0
- package/styles/material.scss +1 -0
- package/styles/material3-dark.css +243 -4
- package/styles/material3-dark.scss +1 -0
- package/styles/material3.css +243 -4
- package/styles/material3.scss +1 -0
- package/styles/splitter/_bds-definition.scss +31 -0
- package/styles/splitter/icons/_bds.scss +39 -0
- package/styles/tailwind-dark.css +239 -0
- package/styles/tailwind-dark.scss +1 -0
- package/styles/tailwind.css +239 -0
- package/styles/tailwind.scss +1 -0
- package/styles/timeline/_all.scss +2 -0
- package/styles/timeline/_bds-definition.scss +18 -0
- package/styles/timeline/_bootstrap-dark-definition.scss +18 -0
- package/styles/timeline/_bootstrap-definition.scss +18 -0
- package/styles/timeline/_bootstrap4-definition.scss +18 -0
- package/styles/timeline/_bootstrap5-dark-definition.scss +1 -0
- package/styles/timeline/_bootstrap5-definition.scss +18 -0
- package/styles/timeline/_fabric-dark-definition.scss +18 -0
- package/styles/timeline/_fabric-definition.scss +18 -0
- package/styles/timeline/_fluent-dark-definition.scss +1 -0
- package/styles/timeline/_fluent-definition.scss +18 -0
- package/styles/timeline/_fusionnew-definition.scss +18 -0
- package/styles/timeline/_highcontrast-definition.scss +18 -0
- package/styles/timeline/_highcontrast-light-definition.scss +18 -0
- package/styles/timeline/_layout.scss +273 -0
- package/styles/timeline/_material-dark-definition.scss +18 -0
- package/styles/timeline/_material-definition.scss +18 -0
- package/styles/timeline/_material3-dark-definition.scss +1 -0
- package/styles/timeline/_material3-definition.scss +18 -0
- package/styles/timeline/_tailwind-dark-definition.scss +1 -0
- package/styles/timeline/_tailwind-definition.scss +18 -0
- package/styles/timeline/_theme.scss +31 -0
- package/styles/timeline/bootstrap-dark.css +238 -0
- package/styles/timeline/bootstrap-dark.scss +3 -0
- package/styles/timeline/bootstrap.css +238 -0
- package/styles/timeline/bootstrap.scss +3 -0
- package/styles/timeline/bootstrap4.css +238 -0
- package/styles/timeline/bootstrap4.scss +3 -0
- package/styles/timeline/bootstrap5-dark.css +238 -0
- package/styles/timeline/bootstrap5-dark.scss +3 -0
- package/styles/timeline/bootstrap5.css +238 -0
- package/styles/timeline/bootstrap5.scss +3 -0
- package/styles/timeline/fabric-dark.css +238 -0
- package/styles/timeline/fabric-dark.scss +3 -0
- package/styles/timeline/fabric.css +238 -0
- package/styles/timeline/fabric.scss +3 -0
- package/styles/timeline/fluent-dark.css +238 -0
- package/styles/timeline/fluent-dark.scss +3 -0
- package/styles/timeline/fluent.css +238 -0
- package/styles/timeline/fluent.scss +3 -0
- package/styles/timeline/highcontrast-light.css +238 -0
- package/styles/timeline/highcontrast-light.scss +3 -0
- package/styles/timeline/highcontrast.css +238 -0
- package/styles/timeline/highcontrast.scss +3 -0
- package/styles/timeline/material-dark.css +238 -0
- package/styles/timeline/material-dark.scss +3 -0
- package/styles/timeline/material.css +238 -0
- package/styles/timeline/material.scss +3 -0
- package/styles/timeline/material3-dark.css +293 -0
- package/styles/timeline/material3-dark.scss +4 -0
- package/styles/timeline/material3.css +349 -0
- package/styles/timeline/material3.scss +4 -0
- package/styles/timeline/tailwind-dark.css +238 -0
- package/styles/timeline/tailwind-dark.scss +3 -0
- package/styles/timeline/tailwind.css +238 -0
- package/styles/timeline/tailwind.scss +3 -0
- package/timeline.d.ts +4 -0
- package/timeline.js +4 -0
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -41
- 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
|
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
|
-
|
1006
|
+
if (this.allPanes[i].style.flexBasis === '') {
|
1007
|
+
removeClass([this.allPanes[i]], STATIC_PANE);
|
1008
|
+
}
|
1005
1009
|
}
|
1006
1010
|
}
|
1007
1011
|
}
|
@@ -5313,9 +5317,375 @@ DashboardLayout = __decorate$1([
|
|
5313
5317
|
* dashboardlayout modules
|
5314
5318
|
*/
|
5315
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
|
+
|
5316
5686
|
/**
|
5317
5687
|
* Layout all modules
|
5318
5688
|
*/
|
5319
5689
|
|
5320
|
-
export { PaneProperties, Splitter, Panel, DashboardLayout };
|
5690
|
+
export { PaneProperties, Splitter, Panel, DashboardLayout, TimelineOrientation, TimelineAlign, TimelineItem, Timeline };
|
5321
5691
|
//# sourceMappingURL=ej2-layouts.es2015.js.map
|