@syncfusion/ej2-layouts 25.2.3 → 26.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +3 -2
- 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 +215 -140
- package/dist/es6/ej2-layouts.es2015.js.map +1 -1
- package/dist/es6/ej2-layouts.es5.js +243 -167
- 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/dashboard-layout/dashboard-layout.d.ts +2 -2
- package/src/dashboard-layout/dashboard-layout.js +55 -76
- package/src/splitter/splitter.js +81 -41
- package/src/timeline/timeline-model.d.ts +5 -5
- package/src/timeline/timeline.d.ts +6 -3
- package/src/timeline/timeline.js +107 -33
- package/styles/avatar/_bootstrap5.3-definition.scss +26 -0
- package/styles/avatar/_fluent2-definition.scss +28 -0
- package/styles/avatar/_layout.scss +22 -18
- package/styles/avatar/_material3-definition.scss +0 -7
- package/styles/avatar/bootstrap-dark.css +7 -4
- package/styles/avatar/bootstrap.css +7 -4
- package/styles/avatar/bootstrap4.css +7 -4
- package/styles/avatar/bootstrap5-dark.css +13 -10
- package/styles/avatar/bootstrap5.css +13 -10
- package/styles/avatar/fabric-dark.css +7 -4
- package/styles/avatar/fabric.css +7 -4
- package/styles/avatar/fluent-dark.css +11 -8
- package/styles/avatar/fluent.css +11 -8
- package/styles/avatar/fluent2.css +1097 -0
- package/styles/avatar/fluent2.scss +3 -0
- package/styles/avatar/highcontrast-light.css +7 -4
- package/styles/avatar/highcontrast.css +7 -4
- package/styles/avatar/material-dark.css +7 -4
- package/styles/avatar/material.css +7 -4
- package/styles/avatar/material3-dark.css +12 -9
- package/styles/avatar/material3.css +12 -9
- package/styles/avatar/tailwind-dark.css +11 -8
- package/styles/avatar/tailwind.css +11 -8
- package/styles/bootstrap-dark.css +359 -197
- package/styles/bootstrap-dark.scss +14 -5
- package/styles/bootstrap.css +359 -197
- package/styles/bootstrap.scss +14 -5
- package/styles/bootstrap4.css +357 -196
- package/styles/bootstrap4.scss +14 -5
- package/styles/bootstrap5-dark.css +370 -207
- package/styles/bootstrap5-dark.scss +14 -5
- package/styles/bootstrap5.css +370 -207
- package/styles/bootstrap5.scss +14 -5
- package/styles/card/_bootstrap5.3-definition.scss +125 -0
- package/styles/card/_fluent2-definition.scss +123 -0
- package/styles/card/_layout.scss +13 -4
- package/styles/card/_material3-definition.scss +0 -13
- package/styles/card/_theme.scss +4 -16
- package/styles/card/bootstrap-dark.css +95 -52
- package/styles/card/bootstrap.css +95 -52
- package/styles/card/bootstrap4.css +95 -52
- package/styles/card/bootstrap5-dark.css +95 -52
- package/styles/card/bootstrap5.css +95 -52
- package/styles/card/fabric-dark.css +95 -52
- package/styles/card/fabric.css +95 -52
- package/styles/card/fluent-dark.css +99 -54
- package/styles/card/fluent.css +99 -54
- package/styles/card/fluent2.css +1593 -0
- package/styles/card/fluent2.scss +3 -0
- package/styles/card/highcontrast-light.css +95 -52
- package/styles/card/highcontrast.css +95 -52
- package/styles/card/material-dark.css +95 -52
- package/styles/card/material.css +97 -53
- package/styles/card/material3-dark.css +99 -53
- package/styles/card/material3.css +99 -53
- package/styles/card/tailwind-dark.css +95 -52
- package/styles/card/tailwind.css +95 -52
- package/styles/dashboard-layout/_bootstrap5.3-definition.scss +108 -0
- package/styles/dashboard-layout/_fluent2-definition.scss +111 -0
- package/styles/dashboard-layout/_highcontrast-definition.scss +1 -1
- package/styles/dashboard-layout/_layout.scss +62 -60
- package/styles/dashboard-layout/_material3-definition.scss +0 -47
- package/styles/dashboard-layout/_theme.scss +19 -32
- package/styles/dashboard-layout/bootstrap-dark.css +41 -42
- package/styles/dashboard-layout/bootstrap.css +41 -42
- package/styles/dashboard-layout/bootstrap4.css +41 -42
- package/styles/dashboard-layout/bootstrap5-dark.css +48 -47
- package/styles/dashboard-layout/bootstrap5.css +48 -47
- package/styles/dashboard-layout/fabric-dark.css +41 -42
- package/styles/dashboard-layout/fabric.css +41 -42
- package/styles/dashboard-layout/fluent-dark.css +46 -46
- package/styles/dashboard-layout/fluent.css +46 -46
- package/styles/dashboard-layout/fluent2.css +1336 -0
- package/styles/dashboard-layout/fluent2.scss +4 -0
- package/styles/dashboard-layout/highcontrast-light.css +39 -41
- package/styles/dashboard-layout/highcontrast.css +43 -42
- package/styles/dashboard-layout/icons/_bootstrap5.3.scss +80 -0
- package/styles/dashboard-layout/icons/_fluent2.scss +80 -0
- package/styles/dashboard-layout/material-dark.css +41 -42
- package/styles/dashboard-layout/material.css +41 -42
- package/styles/dashboard-layout/material3-dark.css +48 -47
- package/styles/dashboard-layout/material3.css +48 -47
- package/styles/dashboard-layout/tailwind-dark.css +57 -55
- package/styles/dashboard-layout/tailwind.css +57 -55
- package/styles/fabric-dark.css +359 -197
- package/styles/fabric-dark.scss +14 -5
- package/styles/fabric.css +359 -197
- package/styles/fabric.scss +14 -5
- package/styles/fluent-dark.css +370 -206
- package/styles/fluent-dark.scss +14 -5
- package/styles/fluent.css +370 -206
- package/styles/fluent.scss +14 -5
- package/styles/fluent2.css +2803 -0
- package/styles/fluent2.scss +14 -0
- package/styles/highcontrast-light.css +357 -196
- package/styles/highcontrast-light.scss +13 -5
- package/styles/highcontrast.css +361 -197
- package/styles/highcontrast.scss +14 -5
- package/styles/material-dark.css +357 -196
- package/styles/material-dark.scss +14 -5
- package/styles/material.css +359 -197
- package/styles/material.scss +14 -5
- package/styles/material3-dark.css +370 -204
- package/styles/material3-dark.scss +14 -5
- package/styles/material3.css +370 -204
- package/styles/material3.scss +14 -5
- package/styles/splitter/_bootstrap5.3-definition.scss +31 -0
- package/styles/splitter/_fluent2-definition.scss +31 -0
- package/styles/splitter/_layout.scss +0 -4
- package/styles/splitter/_material3-definition.scss +0 -7
- package/styles/splitter/_theme.scss +0 -4
- package/styles/splitter/bootstrap-dark.css +115 -59
- package/styles/splitter/bootstrap.css +115 -59
- package/styles/splitter/bootstrap4.css +113 -58
- package/styles/splitter/bootstrap5-dark.css +113 -58
- package/styles/splitter/bootstrap5.css +113 -58
- package/styles/splitter/fabric-dark.css +115 -59
- package/styles/splitter/fabric.css +115 -59
- package/styles/splitter/fluent-dark.css +113 -58
- package/styles/splitter/fluent.css +113 -58
- package/styles/splitter/fluent2.css +1578 -0
- package/styles/splitter/fluent2.scss +4 -0
- package/styles/splitter/highcontrast-light.css +115 -59
- package/styles/splitter/highcontrast.css +115 -59
- package/styles/splitter/icons/_bootstrap5.3.scss +39 -0
- package/styles/splitter/icons/_fluent2.scss +39 -0
- package/styles/splitter/material-dark.css +113 -58
- package/styles/splitter/material.css +113 -58
- package/styles/splitter/material3-dark.css +114 -59
- package/styles/splitter/material3.css +114 -59
- package/styles/splitter/tailwind-dark.css +113 -58
- package/styles/splitter/tailwind.css +113 -58
- package/styles/tailwind-dark.css +377 -213
- package/styles/tailwind-dark.scss +14 -5
- package/styles/tailwind.css +377 -213
- package/styles/tailwind.scss +14 -5
- package/styles/timeline/_bootstrap5.3-definition.scss +18 -0
- package/styles/timeline/_fluent2-definition.scss +18 -0
- package/styles/timeline/_layout.scss +46 -7
- package/styles/timeline/bootstrap-dark.css +99 -39
- package/styles/timeline/bootstrap.css +99 -39
- package/styles/timeline/bootstrap4.css +99 -39
- package/styles/timeline/bootstrap5-dark.css +99 -39
- package/styles/timeline/bootstrap5.css +99 -39
- package/styles/timeline/fabric-dark.css +99 -39
- package/styles/timeline/fabric.css +99 -39
- package/styles/timeline/fluent-dark.css +99 -39
- package/styles/timeline/fluent.css +99 -39
- package/styles/timeline/fluent2.css +1332 -0
- package/styles/timeline/fluent2.scss +3 -0
- package/styles/timeline/highcontrast-light.css +99 -39
- package/styles/timeline/highcontrast.css +99 -39
- package/styles/timeline/material-dark.css +99 -39
- package/styles/timeline/material.css +99 -39
- package/styles/timeline/material3-dark.css +100 -40
- package/styles/timeline/material3.css +100 -40
- package/styles/timeline/tailwind-dark.css +99 -39
- package/styles/timeline/tailwind.css +99 -39
- package/CHANGELOG.md +0 -601
package/src/splitter/splitter.js
CHANGED
@@ -161,8 +161,9 @@ var Splitter = /** @class */ (function (_super) {
|
|
161
161
|
case 'paneSettings': {
|
162
162
|
if (!(newProp.paneSettings instanceof Array && oldProp.paneSettings instanceof Array)) {
|
163
163
|
var paneCounts = Object.keys(newProp.paneSettings);
|
164
|
-
|
165
|
-
|
164
|
+
var isPaneContentChanged = paneCounts.some(function (count) {
|
165
|
+
return !isNullOrUndefined(newProp.paneSettings[count].content);
|
166
|
+
});
|
166
167
|
if (this.isReact && isPaneContentChanged) {
|
167
168
|
var cPaneCount = 0;
|
168
169
|
for (var k = 0; k < this.paneSettings.length; k++) {
|
@@ -198,11 +199,14 @@ var Splitter = /** @class */ (function (_super) {
|
|
198
199
|
this.collapsibleModelUpdate(index);
|
199
200
|
break;
|
200
201
|
case 'collapsed':
|
201
|
-
|
202
|
-
|
202
|
+
if (newProp.paneSettings[index].collapsed) {
|
203
|
+
this.isCollapsed(index);
|
204
|
+
}
|
205
|
+
else {
|
206
|
+
this.collapsedOnchange(index);
|
207
|
+
}
|
203
208
|
break;
|
204
209
|
case 'cssClass':
|
205
|
-
// eslint-disable-next-line max-len
|
206
210
|
this.setCssClass(this.allPanes[index], newProp.paneSettings[index].cssClass);
|
207
211
|
break;
|
208
212
|
case 'size': {
|
@@ -531,8 +535,12 @@ var Splitter = /** @class */ (function (_super) {
|
|
531
535
|
return attribute.slice(attribute.lastIndexOf('-') + 1);
|
532
536
|
};
|
533
537
|
Splitter.prototype.setRTL = function (rtl) {
|
534
|
-
|
535
|
-
|
538
|
+
if (rtl) {
|
539
|
+
addClass([this.element], RTL);
|
540
|
+
}
|
541
|
+
else {
|
542
|
+
removeClass([this.element], RTL);
|
543
|
+
}
|
536
544
|
};
|
537
545
|
Splitter.prototype.setReversePane = function () {
|
538
546
|
this.allPanes = this.allPanes.reverse();
|
@@ -553,9 +561,12 @@ var Splitter = /** @class */ (function (_super) {
|
|
553
561
|
};
|
554
562
|
Splitter.prototype.getPanesDimensions = function () {
|
555
563
|
for (var index = 0; index < this.allPanes.length; index++) {
|
556
|
-
|
557
|
-
|
564
|
+
if (this.orientation === 'Horizontal') {
|
565
|
+
this.panesDimensions.push(this.allPanes[index].getBoundingClientRect().width);
|
566
|
+
}
|
567
|
+
else {
|
558
568
|
this.panesDimensions.push(this.allPanes[index].getBoundingClientRect().height);
|
569
|
+
}
|
559
570
|
}
|
560
571
|
};
|
561
572
|
Splitter.prototype.setCssClass = function (element, className) {
|
@@ -582,9 +593,12 @@ var Splitter = /** @class */ (function (_super) {
|
|
582
593
|
this.showResizer(this.allBars[paneIndex]);
|
583
594
|
removeClass([select('.' + RESIZE_BAR, this.allBars[paneIndex])], HIDE_HANDLER);
|
584
595
|
this.allBars[paneIndex].classList.add(RESIZABLE_BAR);
|
585
|
-
|
586
|
-
|
596
|
+
if (index === (this.allBars.length)) {
|
597
|
+
this.allPanes[index].classList.add(RESIZABLE_PANE);
|
598
|
+
}
|
599
|
+
else {
|
587
600
|
this.allPanes[paneIndex].classList.add(RESIZABLE_PANE);
|
601
|
+
}
|
588
602
|
this.updateResizablePanes(i);
|
589
603
|
}
|
590
604
|
}
|
@@ -592,9 +606,12 @@ var Splitter = /** @class */ (function (_super) {
|
|
592
606
|
this.updateResizablePanes(i);
|
593
607
|
this.hideResizer(this.allBars[paneIndex]);
|
594
608
|
this.allBars[paneIndex].classList.remove(RESIZABLE_BAR);
|
595
|
-
|
596
|
-
|
609
|
+
if (index === (this.allBars.length)) {
|
610
|
+
this.allPanes[index].classList.remove(RESIZABLE_PANE);
|
611
|
+
}
|
612
|
+
else {
|
597
613
|
this.allPanes[paneIndex].classList.remove(RESIZABLE_PANE);
|
614
|
+
}
|
598
615
|
}
|
599
616
|
};
|
600
617
|
Splitter.prototype.collapsibleModelUpdate = function (index) {
|
@@ -659,7 +676,6 @@ var Splitter = /** @class */ (function (_super) {
|
|
659
676
|
_this.updateIsCollapsed(index, _this.targetArrows().collapseArrow, _this.targetArrows().lastBarArrow);
|
660
677
|
for (var i = 0; i < collapsedindex.length; i++) {
|
661
678
|
if (!_this.allPanes[collapsedindex[i]].classList.contains(COLLAPSE_PANE)) {
|
662
|
-
// eslint-disable-next-line max-len
|
663
679
|
_this.updateIsCollapsed(collapsedindex[i], _this.targetArrows().collapseArrow, _this.targetArrows().lastBarArrow);
|
664
680
|
}
|
665
681
|
}
|
@@ -712,8 +728,12 @@ var Splitter = /** @class */ (function (_super) {
|
|
712
728
|
}
|
713
729
|
};
|
714
730
|
Splitter.prototype.isEnabled = function (enabled) {
|
715
|
-
|
716
|
-
|
731
|
+
if (enabled) {
|
732
|
+
removeClass([this.element], DISABLED);
|
733
|
+
}
|
734
|
+
else {
|
735
|
+
addClass([this.element], DISABLED);
|
736
|
+
}
|
717
737
|
};
|
718
738
|
Splitter.prototype.setSeparatorSize = function (size) {
|
719
739
|
var sizeValue = isNullOrUndefined(size) ? 'auto' : size + 'px';
|
@@ -795,8 +815,12 @@ var Splitter = /** @class */ (function (_super) {
|
|
795
815
|
};
|
796
816
|
Splitter.prototype.updateSeparatorSize = function (resizeHanlder) {
|
797
817
|
var sizeValue = isNullOrUndefined(this.separatorSize) ? '1px' : this.separatorSize + 'px';
|
798
|
-
|
799
|
-
|
818
|
+
if (this.orientation === 'Horizontal') {
|
819
|
+
resizeHanlder.style.width = sizeValue;
|
820
|
+
}
|
821
|
+
else {
|
822
|
+
resizeHanlder.style.height = sizeValue;
|
823
|
+
}
|
800
824
|
};
|
801
825
|
Splitter.prototype.addResizeHandler = function (currentBar) {
|
802
826
|
var resizeHanlder = this.createElement('div');
|
@@ -820,16 +844,28 @@ var Splitter = /** @class */ (function (_super) {
|
|
820
844
|
Splitter.prototype.updateCollapseIcons = function (index, arrow1, arrow2) {
|
821
845
|
if (!isNullOrUndefined(this.paneSettings[index])) {
|
822
846
|
if (!isNullOrUndefined(this.paneSettings[index].collapsible)) {
|
823
|
-
|
824
|
-
|
847
|
+
if (this.paneSettings[index].collapsible) {
|
848
|
+
removeClass([arrow2], [HIDE_ICON]);
|
849
|
+
}
|
850
|
+
else {
|
851
|
+
addClass([arrow2], [HIDE_ICON]);
|
852
|
+
}
|
825
853
|
if (!isNullOrUndefined(this.paneSettings[index + 1])) {
|
826
|
-
|
827
|
-
|
854
|
+
if (this.paneSettings[index + 1].collapsible) {
|
855
|
+
removeClass([arrow1], [HIDE_ICON]);
|
856
|
+
}
|
857
|
+
else {
|
858
|
+
addClass([arrow1], [HIDE_ICON]);
|
859
|
+
}
|
828
860
|
}
|
829
861
|
if (!isNullOrUndefined(this.paneSettings[index + 1])) {
|
830
862
|
if ((this.paneSettings[index + 1].collapsible)) {
|
831
|
-
|
832
|
-
|
863
|
+
if (this.paneSettings[index + 1].collapsible) {
|
864
|
+
removeClass([arrow1], [HIDE_ICON]);
|
865
|
+
}
|
866
|
+
else {
|
867
|
+
addClass([arrow1], [HIDE_ICON]);
|
868
|
+
}
|
833
869
|
}
|
834
870
|
}
|
835
871
|
}
|
@@ -857,8 +893,7 @@ var Splitter = /** @class */ (function (_super) {
|
|
857
893
|
arrow1.setAttribute('type', 'button');
|
858
894
|
arrow2.setAttribute('type', 'button');
|
859
895
|
var size = isNullOrUndefined(this.separatorSize) ? '1px' : this.separatorSize + 'px';
|
860
|
-
|
861
|
-
var proxy = this;
|
896
|
+
var proxy = null || this;
|
862
897
|
if (this.orientation === 'Horizontal') {
|
863
898
|
this.updateIconClass();
|
864
899
|
addClass([arrow2], [NAVIGATE_ARROW, ARROW_LEFT, HIDE_ICON]);
|
@@ -898,8 +933,12 @@ var Splitter = /** @class */ (function (_super) {
|
|
898
933
|
};
|
899
934
|
Splitter.prototype.updateResizablePanes = function (index) {
|
900
935
|
this.getPaneDetails();
|
901
|
-
|
902
|
-
|
936
|
+
if (this.isResizable()) {
|
937
|
+
this.allPanes[index].classList.add(RESIZABLE_PANE);
|
938
|
+
}
|
939
|
+
else {
|
940
|
+
this.allPanes[index].classList.remove(RESIZABLE_PANE);
|
941
|
+
}
|
903
942
|
};
|
904
943
|
Splitter.prototype.addSeparator = function (target) {
|
905
944
|
var childCount = this.allPanes.length;
|
@@ -1053,9 +1092,9 @@ var Splitter = /** @class */ (function (_super) {
|
|
1053
1092
|
}
|
1054
1093
|
for (var j = 0, len = this.allBars.length; j < len; j++) {
|
1055
1094
|
totalWidth += this.orientation === 'Horizontal' ? parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) +
|
1056
|
-
|
1057
|
-
parseInt(getComputedStyle(this.allBars[j]).
|
1058
|
-
|
1095
|
+
parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) :
|
1096
|
+
parseInt(getComputedStyle(this.allBars[j]).marginTop, 10) +
|
1097
|
+
parseInt(getComputedStyle(this.allBars[j]).marginBottom, 10);
|
1059
1098
|
}
|
1060
1099
|
var diff = this.orientation === 'Horizontal' ? this.element.offsetWidth -
|
1061
1100
|
((this.border * 2) + totalWidth) :
|
@@ -1861,8 +1900,7 @@ var Splitter = /** @class */ (function (_super) {
|
|
1861
1900
|
this.updateSplitterSize();
|
1862
1901
|
}
|
1863
1902
|
};
|
1864
|
-
|
1865
|
-
Splitter.prototype.validateMinRange = function (paneIndex, paneCurrentWidth, pane) {
|
1903
|
+
Splitter.prototype.validateMinRange = function (paneIndex, paneCurrentWidth) {
|
1866
1904
|
var paneMinRange = null;
|
1867
1905
|
var paneMinDimensions;
|
1868
1906
|
var difference = 0;
|
@@ -1885,8 +1923,7 @@ var Splitter = /** @class */ (function (_super) {
|
|
1885
1923
|
}
|
1886
1924
|
return isNullOrUndefined(validatedVal) ? paneCurrentWidth : validatedVal;
|
1887
1925
|
};
|
1888
|
-
|
1889
|
-
Splitter.prototype.validateMaxRange = function (paneIndex, paneCurrentWidth, pane) {
|
1926
|
+
Splitter.prototype.validateMaxRange = function (paneIndex, paneCurrentWidth) {
|
1890
1927
|
var paneMaxRange = null;
|
1891
1928
|
var paneMaxDimensions;
|
1892
1929
|
var validatedVal;
|
@@ -1908,13 +1945,13 @@ var Splitter = /** @class */ (function (_super) {
|
|
1908
1945
|
};
|
1909
1946
|
Splitter.prototype.validateMinMaxValues = function () {
|
1910
1947
|
//validate previous pane minimum range
|
1911
|
-
this.prevPaneCurrentWidth = this.validateMinRange(this.prevPaneIndex, this.prevPaneCurrentWidth
|
1948
|
+
this.prevPaneCurrentWidth = this.validateMinRange(this.prevPaneIndex, this.prevPaneCurrentWidth);
|
1912
1949
|
// Validate next pane minimum range
|
1913
|
-
this.nextPaneCurrentWidth = this.validateMinRange(this.nextPaneIndex, this.nextPaneCurrentWidth
|
1950
|
+
this.nextPaneCurrentWidth = this.validateMinRange(this.nextPaneIndex, this.nextPaneCurrentWidth);
|
1914
1951
|
// validate previous pane maximum range
|
1915
|
-
this.prevPaneCurrentWidth = this.validateMaxRange(this.prevPaneIndex, this.prevPaneCurrentWidth
|
1952
|
+
this.prevPaneCurrentWidth = this.validateMaxRange(this.prevPaneIndex, this.prevPaneCurrentWidth);
|
1916
1953
|
// validate next pane maximum range
|
1917
|
-
this.nextPaneCurrentWidth = this.validateMaxRange(this.nextPaneIndex, this.nextPaneCurrentWidth
|
1954
|
+
this.nextPaneCurrentWidth = this.validateMaxRange(this.nextPaneIndex, this.nextPaneCurrentWidth);
|
1918
1955
|
};
|
1919
1956
|
Splitter.prototype.equatePaneWidths = function () {
|
1920
1957
|
var difference;
|
@@ -2216,9 +2253,12 @@ var Splitter = /** @class */ (function (_super) {
|
|
2216
2253
|
}
|
2217
2254
|
};
|
2218
2255
|
Splitter.prototype.addPaneClass = function (pane) {
|
2219
|
-
|
2220
|
-
|
2256
|
+
if (this.orientation === 'Horizontal') {
|
2257
|
+
addClass([pane], [PANE, SPLIT_H_PANE, SCROLL_PANE]);
|
2258
|
+
}
|
2259
|
+
else {
|
2221
2260
|
addClass([pane], [PANE, SPLIT_V_PANE, SCROLL_PANE]);
|
2261
|
+
}
|
2222
2262
|
return pane;
|
2223
2263
|
};
|
2224
2264
|
Splitter.prototype.removePaneOrders = function (paneClass) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Component, INotifyPropertyChanged, ChildProperty, Collection, BaseEventArgs, Event, EmitType, NotifyPropertyChanges, Property, getUniqueID,
|
1
|
+
import { Component, INotifyPropertyChanged, ChildProperty, Collection, BaseEventArgs, Event, EmitType, NotifyPropertyChanges, Property, getUniqueID, attributes, select, compile, remove, removeClass, append, isNullOrUndefined } from '@syncfusion/ej2-base';
|
2
2
|
import {TimelineOrientation,TimelineAlign,TimelineRenderingEventArgs} from "./timeline";
|
3
3
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
4
4
|
|
@@ -63,7 +63,7 @@ export interface TimelineModel extends ComponentModel{
|
|
63
63
|
* The possible values are:
|
64
64
|
* * Horizontal
|
65
65
|
* * vertical
|
66
|
-
*
|
66
|
+
*
|
67
67
|
* {% codeBlock src='timeline/orientation/index.md' %}{% endcodeBlock %}
|
68
68
|
*
|
69
69
|
* @isenumeration true
|
@@ -80,7 +80,7 @@ export interface TimelineModel extends ComponentModel{
|
|
80
80
|
* * After
|
81
81
|
* * Alternate
|
82
82
|
* * AlternateReverse
|
83
|
-
*
|
83
|
+
*
|
84
84
|
* {% codeBlock src='timeline/align/index.md' %}{% endcodeBlock %}
|
85
85
|
*
|
86
86
|
* @isenumeration true
|
@@ -104,7 +104,7 @@ export interface TimelineModel extends ComponentModel{
|
|
104
104
|
cssClass?: string;
|
105
105
|
|
106
106
|
/**
|
107
|
-
* Defines whether to show the timeline items in reverse order or not.
|
107
|
+
* Defines whether to show the timeline items in reverse order or not.
|
108
108
|
*
|
109
109
|
* @default false
|
110
110
|
*/
|
@@ -112,7 +112,7 @@ export interface TimelineModel extends ComponentModel{
|
|
112
112
|
|
113
113
|
/**
|
114
114
|
* Defines the template content for each timeline item. The template context will contain the item model.
|
115
|
-
*
|
115
|
+
*
|
116
116
|
* {% codeBlock src='timeline/template/index.md' %}{% endcodeBlock %}
|
117
117
|
*
|
118
118
|
* @default ''
|
@@ -178,7 +178,6 @@ export declare class Timeline extends Component<HTMLElement> implements INotifyP
|
|
178
178
|
beforeItemRender: EmitType<TimelineRenderingEventArgs>;
|
179
179
|
private timelineListEle;
|
180
180
|
private templateFunction;
|
181
|
-
private isReact?;
|
182
181
|
/**
|
183
182
|
* * Constructor for creating the Timeline component.
|
184
183
|
*
|
@@ -191,7 +190,7 @@ export declare class Timeline extends Component<HTMLElement> implements INotifyP
|
|
191
190
|
/**
|
192
191
|
* To get component name.
|
193
192
|
*
|
194
|
-
* @returns {string} -
|
193
|
+
* @returns {string} - It returns the current module name.
|
195
194
|
* @private
|
196
195
|
*/
|
197
196
|
getModuleName(): string;
|
@@ -199,7 +198,7 @@ export declare class Timeline extends Component<HTMLElement> implements INotifyP
|
|
199
198
|
* This method is abstract member of the Component<HTMLElement>.
|
200
199
|
*
|
201
200
|
* @private
|
202
|
-
* @returns {string}
|
201
|
+
* @returns {string} - It returns the persisted data.
|
203
202
|
*/
|
204
203
|
protected getPersistData(): string;
|
205
204
|
protected render(): void;
|
@@ -209,6 +208,8 @@ export declare class Timeline extends Component<HTMLElement> implements INotifyP
|
|
209
208
|
protected updateAlign(): void;
|
210
209
|
protected updateReverse(): void;
|
211
210
|
private renderItems;
|
211
|
+
private haveOneSidecontent;
|
212
|
+
private updateItemContent;
|
212
213
|
private updateTemplateFunction;
|
213
214
|
private renderItemContent;
|
214
215
|
private removeItemContent;
|
@@ -216,6 +217,7 @@ export declare class Timeline extends Component<HTMLElement> implements INotifyP
|
|
216
217
|
* Gets template content based on the template property value.
|
217
218
|
*
|
218
219
|
* @param {string | Function} template - Template property value.
|
220
|
+
* @param {boolean} notCompile - Compile property value.
|
219
221
|
* @returns {Function} - Return template function.
|
220
222
|
* @hidden
|
221
223
|
*/
|
@@ -224,6 +226,7 @@ export declare class Timeline extends Component<HTMLElement> implements INotifyP
|
|
224
226
|
private updateElementClassArray;
|
225
227
|
private updateContent;
|
226
228
|
destroy(): void;
|
229
|
+
private updateItems;
|
227
230
|
/**
|
228
231
|
* Called internally if any of the property value changed.
|
229
232
|
*
|
package/src/timeline/timeline.js
CHANGED
@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
17
17
|
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;
|
18
18
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
19
19
|
};
|
20
|
-
import { Component, ChildProperty, Collection, Event, NotifyPropertyChanges, Property, getUniqueID, attributes, select, compile, remove, removeClass, append } from '@syncfusion/ej2-base';
|
20
|
+
import { Component, ChildProperty, Collection, Event, NotifyPropertyChanges, Property, getUniqueID, attributes, select, compile, remove, removeClass, append, isNullOrUndefined } from '@syncfusion/ej2-base';
|
21
21
|
var ITEMLISTCONTAINER = 'e-timeline-items';
|
22
22
|
var ITEMCONTAINER = 'e-timeline-item';
|
23
23
|
var OPPOSITECONTENT = 'e-opposite-content';
|
@@ -126,7 +126,7 @@ var Timeline = /** @class */ (function (_super) {
|
|
126
126
|
/**
|
127
127
|
* To get component name.
|
128
128
|
*
|
129
|
-
* @returns {string} -
|
129
|
+
* @returns {string} - It returns the current module name.
|
130
130
|
* @private
|
131
131
|
*/
|
132
132
|
Timeline.prototype.getModuleName = function () {
|
@@ -136,7 +136,7 @@ var Timeline = /** @class */ (function (_super) {
|
|
136
136
|
* This method is abstract member of the Component<HTMLElement>.
|
137
137
|
*
|
138
138
|
* @private
|
139
|
-
* @returns {string}
|
139
|
+
* @returns {string} - It returns the persisted data.
|
140
140
|
*/
|
141
141
|
Timeline.prototype.getPersistData = function () {
|
142
142
|
return this.addOnPersist([]);
|
@@ -154,14 +154,16 @@ var Timeline = /** @class */ (function (_super) {
|
|
154
154
|
this.element.appendChild(this.timelineListEle);
|
155
155
|
};
|
156
156
|
Timeline.prototype.updateOrientation = function () {
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
157
|
+
if (!(isNullOrUndefined(this.orientation))) {
|
158
|
+
var orientation_1 = this.orientation.toLowerCase();
|
159
|
+
if (orientation_1 === 'horizontal' || orientation_1 === 'vertical') {
|
160
|
+
this.element.classList.remove(HORIZONTAL, VERTICAL);
|
161
|
+
this.element.classList.add('e-' + orientation_1);
|
162
|
+
}
|
161
163
|
}
|
162
164
|
};
|
163
165
|
Timeline.prototype.updateCssClass = function (addCss, removeCss) {
|
164
|
-
if (removeCss === void 0) { removeCss =
|
166
|
+
if (removeCss === void 0) { removeCss = ''; }
|
165
167
|
var _a, _b;
|
166
168
|
var cssClasses;
|
167
169
|
if (removeCss) {
|
@@ -177,10 +179,12 @@ var Timeline = /** @class */ (function (_super) {
|
|
177
179
|
this.element.classList[this.enableRtl ? 'add' : 'remove'](RTL);
|
178
180
|
};
|
179
181
|
Timeline.prototype.updateAlign = function () {
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
182
|
+
if (!(isNullOrUndefined(this.align))) {
|
183
|
+
var align = this.align.toLowerCase();
|
184
|
+
if (align === 'before' || align === 'after' || align === 'alternate' || align === 'alternatereverse') {
|
185
|
+
this.element.classList.remove('e-align-before', 'e-align-after', 'e-align-alternate', 'e-align-alternatereverse');
|
186
|
+
this.element.classList.add('e-align-' + align);
|
187
|
+
}
|
184
188
|
}
|
185
189
|
};
|
186
190
|
Timeline.prototype.updateReverse = function () {
|
@@ -189,19 +193,14 @@ var Timeline = /** @class */ (function (_super) {
|
|
189
193
|
Timeline.prototype.renderItems = function () {
|
190
194
|
var _this = this;
|
191
195
|
var _a;
|
196
|
+
this.haveOneSidecontent();
|
192
197
|
for (var index = 0; index < this.items.length; index++) {
|
193
198
|
var item = this.items[parseInt(index.toString(), 10)];
|
194
199
|
var timelineItem = this.createElement('li', { className: ITEMCONTAINER + ' ' + ITEMCONNECTOR });
|
195
200
|
if (!this.template) {
|
196
201
|
var oppositeTextEle = this.createElement('div', { className: OPPOSITECONTENT });
|
197
202
|
if (item.oppositeContent) {
|
198
|
-
|
199
|
-
if (typeof oppositeCtn === 'string') {
|
200
|
-
oppositeTextEle.innerText = oppositeCtn;
|
201
|
-
}
|
202
|
-
else {
|
203
|
-
append(oppositeCtn({ item: item, itemIndex: index }), oppositeTextEle);
|
204
|
-
}
|
203
|
+
this.updateItemContent(false, item, index, oppositeTextEle);
|
205
204
|
}
|
206
205
|
timelineItem.appendChild(oppositeTextEle);
|
207
206
|
var dotContainer = this.createElement('div', { className: DOTCONTAINER });
|
@@ -211,13 +210,7 @@ var Timeline = /** @class */ (function (_super) {
|
|
211
210
|
timelineItem.appendChild(dotContainer);
|
212
211
|
var contentEle = this.createElement('div', { className: CONTENT });
|
213
212
|
if (item.content) {
|
214
|
-
|
215
|
-
if (typeof ctn === 'string') {
|
216
|
-
contentEle.innerText = ctn;
|
217
|
-
}
|
218
|
-
else {
|
219
|
-
append(ctn({ item: item, itemIndex: index }), contentEle);
|
220
|
-
}
|
213
|
+
this.updateItemContent(true, item, index, contentEle);
|
221
214
|
}
|
222
215
|
timelineItem.appendChild(contentEle);
|
223
216
|
if (item.cssClass) {
|
@@ -234,6 +227,36 @@ var Timeline = /** @class */ (function (_super) {
|
|
234
227
|
this.trigger('beforeItemRender', eventArgs, function (args) { _this.timelineListEle.appendChild(args.element); });
|
235
228
|
}
|
236
229
|
};
|
230
|
+
Timeline.prototype.haveOneSidecontent = function () {
|
231
|
+
var haveContent = false;
|
232
|
+
var haveOppContent = false;
|
233
|
+
for (var index = 0; index < this.items.length; index++) {
|
234
|
+
var item = this.items[parseInt(index.toString(), 10)];
|
235
|
+
if (!haveContent) {
|
236
|
+
haveContent = item.content.length > 0;
|
237
|
+
}
|
238
|
+
if (!haveOppContent) {
|
239
|
+
haveOppContent = item.oppositeContent.length > 0;
|
240
|
+
}
|
241
|
+
}
|
242
|
+
this.element.classList.remove('e-content-only', 'e-opposite-content-only');
|
243
|
+
if (haveContent && !haveOppContent) {
|
244
|
+
this.element.classList.add('e-content-only');
|
245
|
+
}
|
246
|
+
if (haveOppContent && !haveContent) {
|
247
|
+
this.element.classList.add('e-opposite-content-only');
|
248
|
+
}
|
249
|
+
};
|
250
|
+
Timeline.prototype.updateItemContent = function (isContent, item, index, contentEle) {
|
251
|
+
var notCompile = !(this.isReact || this.isVue);
|
252
|
+
var ctn = this.getTemplateFunction(isContent ? item.content : item.oppositeContent, notCompile);
|
253
|
+
if (typeof ctn === 'string') {
|
254
|
+
contentEle.innerText = ctn;
|
255
|
+
}
|
256
|
+
else {
|
257
|
+
append(ctn({ item: item, itemIndex: index }, this), contentEle);
|
258
|
+
}
|
259
|
+
};
|
237
260
|
Timeline.prototype.updateTemplateFunction = function () {
|
238
261
|
this.templateFunction = this.template ? this.getTemplateFunction(this.template, false) : null;
|
239
262
|
};
|
@@ -243,8 +266,12 @@ var Timeline = /** @class */ (function (_super) {
|
|
243
266
|
this.removeItemContent(listItems[parseInt((index).toString(), 10)]);
|
244
267
|
}
|
245
268
|
if (this.template) {
|
246
|
-
|
269
|
+
if (isrerender) {
|
270
|
+
listItems[parseInt((index).toString(), 10)].classList.add(TEMPLATE);
|
271
|
+
}
|
272
|
+
else {
|
247
273
|
timelineItem.classList.add(TEMPLATE);
|
274
|
+
}
|
248
275
|
var item = this.items[parseInt(index.toString(), 10)];
|
249
276
|
append(this.templateFunction({ item: item, itemIndex: index }, this, 'timelineTemplate', (this.element.id + '_timelineTemplate'), this.isStringTemplate), isrerender ? listItems[parseInt((index).toString(), 10)] : timelineItem);
|
250
277
|
}
|
@@ -261,6 +288,7 @@ var Timeline = /** @class */ (function (_super) {
|
|
261
288
|
* Gets template content based on the template property value.
|
262
289
|
*
|
263
290
|
* @param {string | Function} template - Template property value.
|
291
|
+
* @param {boolean} notCompile - Compile property value.
|
264
292
|
* @returns {Function} - Return template function.
|
265
293
|
* @hidden
|
266
294
|
*/
|
@@ -312,8 +340,8 @@ var Timeline = /** @class */ (function (_super) {
|
|
312
340
|
_super.prototype.destroy.call(this);
|
313
341
|
// unwires the events and detach the li elements
|
314
342
|
this.removeItemElements();
|
315
|
-
this.element.removeAttribute(
|
316
|
-
this.element.removeAttribute(
|
343
|
+
this.element.removeAttribute('role');
|
344
|
+
this.element.removeAttribute('aria-label');
|
317
345
|
this.clearTemplate();
|
318
346
|
if (this.timelineListEle) {
|
319
347
|
remove(this.timelineListEle);
|
@@ -321,6 +349,43 @@ var Timeline = /** @class */ (function (_super) {
|
|
321
349
|
this.timelineListEle = null;
|
322
350
|
this.updateElementClassArray();
|
323
351
|
};
|
352
|
+
Timeline.prototype.updateItems = function (newProp, oldPropItems, index, item) {
|
353
|
+
var _a, _b, _c, _d;
|
354
|
+
var timelineItemElements = this.timelineListEle.querySelectorAll('li');
|
355
|
+
var dotEle;
|
356
|
+
var contentEle;
|
357
|
+
var oppositeEle;
|
358
|
+
switch (newProp) {
|
359
|
+
case 'dotCss':
|
360
|
+
dotEle = timelineItemElements[parseInt(index.toString(), 10)].querySelector('.' + DOTCONTENT);
|
361
|
+
if (oldPropItems.dotCss !== '') {
|
362
|
+
(_a = dotEle.classList).remove.apply(_a, oldPropItems.dotCss.trim().split(' '));
|
363
|
+
}
|
364
|
+
(_b = dotEle.classList).add.apply(_b, this.items[parseInt(index.toString(), 10)].dotCss.trim().split(' '));
|
365
|
+
break;
|
366
|
+
case 'content':
|
367
|
+
contentEle = timelineItemElements[parseInt(index.toString(), 10)].querySelector('.' + CONTENT);
|
368
|
+
contentEle.innerText = '';
|
369
|
+
this.updateItemContent(true, item, index, contentEle);
|
370
|
+
this.haveOneSidecontent();
|
371
|
+
break;
|
372
|
+
case 'oppositeContent':
|
373
|
+
oppositeEle = timelineItemElements[parseInt(index.toString(), 10)].querySelector('.' + OPPOSITECONTENT);
|
374
|
+
oppositeEle.innerText = '';
|
375
|
+
this.updateItemContent(false, item, index, oppositeEle);
|
376
|
+
this.haveOneSidecontent();
|
377
|
+
break;
|
378
|
+
case 'disabled':
|
379
|
+
timelineItemElements[parseInt(index.toString(), 10)].classList[this.items[parseInt(index.toString(), 10)].disabled ? 'add' : 'remove'](DISABLED);
|
380
|
+
break;
|
381
|
+
case 'cssClass':
|
382
|
+
if (oldPropItems.cssClass !== '') {
|
383
|
+
(_c = timelineItemElements[parseInt(index.toString(), 10)].classList).remove.apply(_c, oldPropItems.cssClass.trim().split(' '));
|
384
|
+
}
|
385
|
+
(_d = timelineItemElements[parseInt(index.toString(), 10)].classList).add.apply(_d, item.cssClass.trim().split(' '));
|
386
|
+
break;
|
387
|
+
}
|
388
|
+
};
|
324
389
|
/**
|
325
390
|
* Called internally if any of the property value changed.
|
326
391
|
*
|
@@ -333,11 +398,20 @@ var Timeline = /** @class */ (function (_super) {
|
|
333
398
|
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
334
399
|
var prop = _a[_i];
|
335
400
|
switch (prop) {
|
336
|
-
case 'items':
|
337
|
-
|
338
|
-
|
401
|
+
case 'items':
|
402
|
+
if (Array.isArray(newProp.items)) {
|
403
|
+
this.removeItemElements();
|
404
|
+
this.renderItems();
|
405
|
+
}
|
406
|
+
else {
|
407
|
+
var itemObject = Object.keys(newProp.items);
|
408
|
+
for (var i = 0; i < itemObject.length; i++) {
|
409
|
+
var index = parseInt(Object.keys(newProp.items)[i], 10);
|
410
|
+
var property = Object.keys(newProp.items[index])[0];
|
411
|
+
this.updateItems(property, oldProp.items[index], index, newProp.items[index]);
|
412
|
+
}
|
413
|
+
}
|
339
414
|
break;
|
340
|
-
}
|
341
415
|
case 'orientation':
|
342
416
|
this.updateOrientation();
|
343
417
|
break;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
// Avatar Base
|
2
|
+
$avatar-base-border-radius: 2px !default;
|
3
|
+
$avatar-base-background-color: $content-bg-color-alt3 !default;
|
4
|
+
$avatar-base-font-size: $text-sm !default;
|
5
|
+
$avatar-base-width: 40px !default;
|
6
|
+
$avatar-base-height: 40px !default;
|
7
|
+
$avatar-base-line-height: 22px !default;
|
8
|
+
$avatar-base-text-color: $icon-color !default;
|
9
|
+
$avatar-base-font-weight: $font-weight-medium !default;
|
10
|
+
$avatar-base-img-height: 100% !default;
|
11
|
+
|
12
|
+
// Circle Avatar
|
13
|
+
$avatar-circle-border-radius: 50% !default;
|
14
|
+
|
15
|
+
// Avatar size
|
16
|
+
$avatar-xsmall-font-size: $text-xxs !default;
|
17
|
+
$avatar-small-font-size: $text-xs !default;
|
18
|
+
$avatar-large-font-size: $text-lg !default;
|
19
|
+
$avatar-xlarge-font-size: $text-xl !default;
|
20
|
+
$avatar-large-border-radius: 4px !default;
|
21
|
+
|
22
|
+
// Avatar Line Height
|
23
|
+
$avatar-base-xsmall-line-height: 16px !default;
|
24
|
+
$avatar-base-small-line-height: 18px !default;
|
25
|
+
$avatar-base-large-line-height: 28px !default;
|
26
|
+
$avatar-base-xlarge-line-height: 28px !default;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
// Avatar Base
|
2
|
+
$avatar-base-border-radius: 4px !default;
|
3
|
+
$avatar-base-background-color: $content-bg-color-alt3 !default;
|
4
|
+
$avatar-base-font-size: $text-sm !default;
|
5
|
+
$avatar-base-width: 40px !default;
|
6
|
+
$avatar-base-height: 40px !default;
|
7
|
+
$avatar-base-line-height: 22px !default;
|
8
|
+
$avatar-base-text-color: $content-text-color-alt2 !default;
|
9
|
+
$avatar-base-font-weight: $font-weight-normal !default;
|
10
|
+
$avatar-base-img-height: 100% !default;
|
11
|
+
|
12
|
+
// Circle Avatar
|
13
|
+
$avatar-circle-border-radius: 50% !default;
|
14
|
+
|
15
|
+
// Avatar size
|
16
|
+
$avatar-xsmall-font-size: $text-sm !default;
|
17
|
+
$avatar-small-font-size: $text-base !default;
|
18
|
+
$avatar-large-font-size: $text-xl !default;
|
19
|
+
$avatar-xlarge-font-size: 22px !default;
|
20
|
+
|
21
|
+
// Avatar Line Height
|
22
|
+
$avatar-base-xsmall-line-height: 16px !default;
|
23
|
+
$avatar-base-small-line-height: 18px !default;
|
24
|
+
$avatar-base-large-line-height: 28px !default;
|
25
|
+
$avatar-base-xlarge-line-height: 28px !default;
|
26
|
+
|
27
|
+
//border
|
28
|
+
$avatar-border: $dialog-border !default;
|