Skip to content

Commit 1cded32

Browse files
author
pipeline
committed
v22.2.9 is released
1 parent a35cac5 commit 1cded32

File tree

2,590 files changed

+1631
-438955
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,590 files changed

+1631
-438955
lines changed

controls/base/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## [Unreleased]
44

5+
## 22.2.9 (2023-08-15)
6+
7+
### Common
8+
9+
#### Bug Fixes
10+
11+
- `#I476890` - Memory leak issue in syncfusion components when using enable Persistence.
12+
513
## 22.2.5 (2023-07-27)
614

715
### Common

controls/base/src/component.ts

+21-1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export abstract class Component<ElementType extends HTMLElement> extends Base<El
9191
if (this.isDestroyed) { return; }
9292
if (this.enablePersistence) {
9393
this.setPersistData();
94+
this.detachUnloadEvent();
9495
}
9596
this.localObserver.destroy();
9697
if (this.refreshing) { return; }
@@ -149,6 +150,25 @@ export abstract class Component<ElementType extends HTMLElement> extends Base<El
149150
return window.localStorage.getItem(eleId);
150151
}
151152
}
153+
/**
154+
* Adding unload event to persist data when enable persistence true
155+
*/
156+
public attachUnloadEvent():any {
157+
this.handleUnload = this.handleUnload.bind(this);
158+
window.addEventListener('unload', this.handleUnload);
159+
}
160+
/**
161+
* Handling unload event to persist data when enable persistence true
162+
*/
163+
public handleUnload():any{
164+
this.setPersistData();
165+
}
166+
/**
167+
* Removing unload event to persist data when enable persistence true
168+
*/
169+
public detachUnloadEvent():any {
170+
window.removeEventListener('unload',this.handleUnload);
171+
}
152172
/**
153173
* Appends the control within the given HTML element
154174
*
@@ -170,7 +190,7 @@ export abstract class Component<ElementType extends HTMLElement> extends Base<El
170190
}
171191
if (this.enablePersistence) {
172192
this.mergePersistData();
173-
window.addEventListener('unload', this.setPersistData.bind(this));
193+
this.attachUnloadEvent();
174194
}
175195
const inst: Object[] = getValue('ej2_instances', this.element);
176196
if (!inst || inst.indexOf(this) === -1) {

controls/buttons/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## [Unreleased]
44

5+
## 22.2.9 (2023-08-15)
6+
7+
### Checkbox
8+
9+
#### Bug Fixes
10+
11+
- `#I488474` - The issue with "Hovering the checkbox checked items of checkbox is unchecked while using RTL mode" in Bigger mode has been resolved.
12+
513
## 22.2.8 (2023-08-08)
614

715
### Checkbox

controls/buttons/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-buttons",
3-
"version": "22.2.5",
3+
"version": "22.2.8",
44
"description": "A package of feature-rich Essential JS 2 components such as Button, CheckBox, RadioButton and Switch.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/buttons/styles/check-box/_layout.scss

+6-2
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,12 @@
357357
margin: 0;
358358

359359
&:hover {
360-
background-color: $cbox-hover-bgcolor;
361-
border-color: $cbox-hover-border-color;
360+
@if $skin-name != 'FluentUI' {
361+
&.e-check {
362+
background-color: $cbox-checkmark-hover-bgcolor;
363+
border-color: $cbox-checkmark-hover-border-color;
364+
}
365+
}
362366
@if $skin-name == 'FluentUI' {
363367
&:not(.e-check),
364368
&:not(.e-stop)::before {

controls/calendars/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 22.2.8 (2023-08-08)
5+
## 22.2.9 (2023-08-15)
66

77
### TimePicker
88

controls/charts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-charts",
3-
"version": "22.2.7",
3+
"version": "22.2.8",
44
"description": "Feature-rich chart control with built-in support for over 25 chart types, technical indictors, trendline, zooming, tooltip, selection, crosshair and trackball.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/charts/spec/chart/legend/legend.spec.ts

+56-59
Large diffs are not rendered by default.

controls/charts/spec/pie/renderer/legend.spec.ts

+27-28
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,7 @@ describe('Legend checking for the pie series', () => {
787787
},
788788
position: 'Bottom',
789789
margin: { top: 10 },
790+
enablePages: false
790791
},
791792
// Initialize tht tooltip
792793
tooltip: { enable: true, format: '${point.x} : <b>${point.y}</b>' },
@@ -824,14 +825,14 @@ describe('Legend checking for the pie series', () => {
824825
xValue = titleElement.getAttribute('x');
825826
expect(xValue === '150').toBe(true);
826827
yValue = titleElement.getAttribute('y');
827-
expect(yValue === '229.01694285833028' || yValue === '255.98433900949567').toBe(true);
828+
expect(yValue === '254.989169209323' || yValue === '255.98433900949567').toBe(true);
828829
backArrow = getElement('container_chart_legend_pageup');
829830
path = backArrow.getAttribute('d');
830-
expect(path === 'M 36 286.51694285833025 L 28 290.51694285833025 L 36 294.51694285833025 L 36 292.51694285833025 L 32 290.51694285833025 L36 288.51694285833025 Z' ||
831+
expect(path === 'M 44 267.489169209323 L 36 271.489169209323 L 44 275.489169209323 L 44 273.489169209323 L 40 271.489169209323 L44 269.489169209323 Z' ||
831832
path === 'M 27 268.48433900949567 L 19 272.48433900949567 L 27 276.48433900949567 L 27 274.48433900949567 L 23 272.48433900949567 L27 270.48433900949567 Z').toBe;
832833
fontArrow = getElement('container_chart_legend_pagedown');
833834
path = fontArrow.getAttribute('d');
834-
expect(path === 'M 70 286.51694285833025 L 78 290.51694285833025 L 70 294.51694285833025 L 70 292.51694285833025 L 74 290.51694285833025 L70 288.51694285833025 Z'||
835+
expect(path === 'M 256 267.489169209323 L 264 271.489169209323 L 256 275.489169209323 L 256 273.489169209323 L 260 271.489169209323 L256 269.489169209323 Z'||
835836
path === 'M 273 268.48433900949567 L 281 272.48433900949567 L 273 276.48433900949567 L 273 274.48433900949567 L 277 272.48433900949567 L273 270.48433900949567 Z').toBe;
836837
legendGroup = getElement('container_chart_legend_translate_g');
837838
expect(legendGroup.childElementCount === 7).toBe(true);
@@ -846,16 +847,16 @@ describe('Legend checking for the pie series', () => {
846847
titleElement = getElement('container_chart_legend_title');
847848
expect(titleElement.textContent === 'Countries').toBe(true);
848849
xValue = titleElement.getAttribute('x');
849-
expect(xValue === '17' || xValue === '33').toBe(true);
850+
expect(xValue === '17' || xValue === '19.5').toBe(true);
850851
yValue = titleElement.getAttribute('y');
851-
expect(yValue === '254.51694285833028' || yValue === '275.96501821018626').toBe(true);
852+
expect(yValue === '276.21622576014306' || yValue === '275.96501821018626').toBe(true);
852853
backArrow = getElement('container_chart_legend_pageup');
853854
path = backArrow.getAttribute('d');
854-
expect(path === 'M 36 278.51694285833025 L 28 282.51694285833025 L 36 286.51694285833025 L 36 284.51694285833025 L 32 282.51694285833025 L36 280.51694285833025 Z' ||
855+
expect(path === 'M 88 268.46501821018626 L 80 272.46501821018626 L 88 276.46501821018626 L 88 274.46501821018626 L 84 272.46501821018626 L88 270.46501821018626 Z' ||
855856
path === 'M 98 267.71501821018626 L 90 271.71501821018626 L 98 275.71501821018626 L 98 273.71501821018626 L 94 271.71501821018626 L98 269.71501821018626 Z').toBe;
856857
fontArrow = getElement('container_chart_legend_pagedown');
857858
path = fontArrow.getAttribute('d');
858-
expect(path === 'M 70 278.51694285833025 L 78 282.51694285833025 L 70 286.51694285833025 L 70 284.51694285833025 L 74 282.51694285833025 L70 280.51694285833025 Z' ||
859+
expect(path === 'M 271 268.46501821018626 L 279 272.46501821018626 L 271 276.46501821018626 L 271 274.46501821018626 L 275 272.46501821018626 L271 270.46501821018626 Z' ||
859860
path === 'M 256 267.71501821018626 L 264 271.71501821018626 L 256 275.71501821018626 L 256 273.71501821018626 L 260 271.71501821018626 L256 269.71501821018626 Z').toBe;
860861
legendGroup = getElement('container_chart_legend_translate_g');
861862
expect(legendGroup.childElementCount === 7).toBe(true);
@@ -870,16 +871,16 @@ describe('Legend checking for the pie series', () => {
870871
titleElement = getElement('container_chart_legend_title');
871872
expect(titleElement.textContent === 'Countries').toBe(true);
872873
xValue = titleElement.getAttribute('x');
873-
expect(xValue === '208' || xValue === '226.5').toBe(true);
874+
expect(xValue === '224' || xValue === '226.5').toBe(true);
874875
yValue = titleElement.getAttribute('y');
875-
expect(yValue === '254.51694285833028' || yValue === '275.96501821018626').toBe(true);
876+
expect(yValue === '276.21622576014306' || yValue === '275.96501821018626').toBe(true);
876877
backArrow = getElement('container_chart_legend_pageup');
877878
path = backArrow.getAttribute('d');
878-
expect(path === 'M 36 278.51694285833025 L 28 282.51694285833025 L 36 286.51694285833025 L 36 284.51694285833025 L 32 282.51694285833025 L36 280.51694285833025 Z' ||
879+
expect(path === 'M 38.5 267.46622576014306 L 30.5 271.46622576014306 L 38.5 275.46622576014306 L 38.5 273.46622576014306 L 34.5 271.46622576014306 L38.5 269.46622576014306 Z' ||
879880
path === 'M 29 268.46501821018626 L 21 272.46501821018626 L 29 276.46501821018626 L 29 274.46501821018626 L 25 272.46501821018626 L29 270.46501821018626 Z').toBe;
880881
fontArrow = getElement('container_chart_legend_pagedown');
881882
path = fontArrow.getAttribute('d');
882-
expect(path === 'M 70 278.51694285833025 L 78 282.51694285833025 L 70 286.51694285833025 L 70 284.51694285833025 L 74 282.51694285833025 L70 280.51694285833025 Z' ||
883+
expect(path === 'M 197.5 267.46622576014306 L 205.5 271.46622576014306 L 197.5 275.46622576014306 L 197.5 273.46622576014306 L 201.5 271.46622576014306 L197.5 269.46622576014306 Z' ||
883884
path === 'M 207 268.46501821018626 L 215 272.46501821018626 L 207 276.46501821018626 L 207 274.46501821018626 L 211 272.46501821018626 L207 270.46501821018626 Z').toBe;
884885
legendGroup = getElement('container_chart_legend_translate_g');
885886
expect(legendGroup.childElementCount === 7).toBe(true);
@@ -917,14 +918,14 @@ describe('Legend checking for the pie series', () => {
917918
xValue = titleElement.getAttribute('x');
918919
expect(xValue === '150').toBe(true);
919920
yValue = titleElement.getAttribute('y');
920-
expect(yValue === '32' || yValue === '31.999999999999993').toBe(true);
921+
expect(yValue === '35' || yValue === '31.999999999999993').toBe(true);
921922
backArrow = getElement('container_chart_legend_pageup');
922923
path = backArrow.getAttribute('d');
923-
expect(path === 'M 36 89.5 L 28 93.5 L 36 97.5 L 36 95.5 L 32 93.5 L36 91.5 Z' ||
924+
expect(path === 'M 44 47.5 L 36 51.5 L 44 55.5 L 44 53.5 L 40 51.5 L44 49.5 Z' ||
924925
path === 'M 48.5 44.49999999999999 L 40.5 48.49999999999999 L 48.5 52.49999999999999 L 48.5 50.49999999999999 L 44.5 48.49999999999999 L48.5 46.49999999999999 Z').toBe;
925926
fontArrow = getElement('container_chart_legend_pagedown');
926927
path = fontArrow.getAttribute('d');
927-
expect(path === 'M 70 89.5 L 78 93.5 L 70 97.5 L 70 95.5 L 74 93.5 L70 91.5 Z' ||
928+
expect(path === 'M 256 47.5 L 264 51.5 L 256 55.5 L 256 53.5 L 260 51.5 L256 49.5 Z' ||
928929
path === 'M 251.5 44.49999999999999 L 259.5 48.49999999999999 L 251.5 52.49999999999999 L 251.5 50.49999999999999 L 255.5 48.49999999999999 L251.5 46.49999999999999 Z').toBe;
929930
legendGroup = getElement('container_chart_legend_translate_g');
930931
expect(legendGroup.childElementCount === 7).toBe(true);
@@ -940,17 +941,17 @@ describe('Legend checking for the pie series', () => {
940941
titleElement = getElement('container_chart_legend_title');
941942
expect(titleElement.textContent === 'Countries').toBe(true);
942943
xValue = titleElement.getAttribute('x');
943-
expect(xValue === '17' || xValue === '33').toBe(true);
944+
expect(xValue === '17' || xValue === '19.5').toBe(true);
944945
yValue = titleElement.getAttribute('y');
945-
expect(yValue === '52.25' || yValue === '57.5').toBe(true);
946+
expect(yValue === '37.25' || yValue === '36').toBe(true);
946947
backArrow = getElement('container_chart_legend_pageup');
947948
path = backArrow.getAttribute('d');
948-
expect(path === 'M 36 81.5 L 28 85.5 L 36 89.5 L 36 87.5 L 32 85.5 L36 83.5 Z' ||
949+
expect(path === 'M 97.5 28.5 L 89.5 32.5 L 97.5 36.5 L 97.5 34.5 L 93.5 32.5 L97.5 30.5 Z' ||
949950
path === 'M 88 28.5 L 80 32.5 L 88 36.5 L 88 34.5 L 84 32.5 L88 30.5 Z').toBe;
950951
fontArrow = getElement('container_chart_legend_pagedown');
951952
path = fontArrow.getAttribute('d');
952953
expect(path === 'M 261.5 28.5 L 269.5 32.5 L 261.5 36.5 L 261.5 34.5 L 265.5 32.5 L261.5 30.5 Z' ||
953-
path === 'M 70 81.5 L 78 85.5 L 70 89.5 L 70 87.5 L 74 85.5 L70 83.5 Z').toBe;
954+
path === 'M 271 28.5 L 279 32.5 L 271 36.5 L 271 34.5 L 275 32.5 L271 30.5 Z').toBe;
954955
legendGroup = getElement('container_chart_legend_translate_g');
955956
expect(legendGroup.childElementCount === 7).toBe(true);
956957
done();
@@ -965,16 +966,16 @@ describe('Legend checking for the pie series', () => {
965966
titleElement = getElement('container_chart_legend_title');
966967
expect(titleElement.textContent === 'Countries').toBe(true);
967968
xValue = titleElement.getAttribute('x');
968-
expect(xValue === '208' || xValue === '226.5').toBe(true);
969+
expect(xValue === '224' || xValue === '226.5').toBe(true);
969970
yValue = titleElement.getAttribute('y');
970-
expect(yValue === '57.5' || yValue === '52').toBe(true);
971+
expect(yValue === '37.25' || yValue === '36').toBe(true);
971972
backArrow = getElement('container_chart_legend_pageup');
972973
path = backArrow.getAttribute('d');
973-
expect(path === 'M 36 81.5 L 28 85.5 L 36 89.5 L 36 87.5 L 32 85.5 L36 83.5 Z' ||
974+
expect(path === 'M 29 28.5 L 21 32.5 L 29 36.5 L 29 34.5 L 25 32.5 L29 30.5 Z' ||
974975
path === 'M 44 28.5 L 36 32.5 L 44 36.5 L 44 34.5 L 40 32.5 L44 30.5 Z').toBe;
975976
fontArrow = getElement('container_chart_legend_pagedown');
976977
path = fontArrow.getAttribute('d');
977-
expect(path === 'M 70 81.5 L 78 85.5 L 70 89.5 L 70 87.5 L 74 85.5 L70 83.5 Z' ||
978+
expect(path === 'M 207 28.5 L 215 32.5 L 207 36.5 L 207 34.5 L 211 32.5 L207 30.5 Z' ||
978979
path === 'M 197 28.5 L 205 32.5 L 197 36.5 L 197 34.5 L 201 32.5 L197 30.5 Z').toBe;
979980
legendGroup = getElement('container_chart_legend_translate_g');
980981
expect(legendGroup.childElementCount === 7).toBe(true);
@@ -990,25 +991,23 @@ describe('Legend checking for the pie series', () => {
990991
titleElement = getElement('container_chart_legend_title');
991992
expect(titleElement.textContent === 'Countries').toBe(true);
992993
xValue = titleElement.getAttribute('x');
993-
console.log(xValue);
994-
expect(xValue === '334.6450498628827').toBe(true);
994+
expect(xValue === '339.5').toBe(true);
995995
yValue = titleElement.getAttribute('y');
996-
console.log(yValue);
997996
expect(yValue === '29' || yValue === '26').toBe(true);
998997
backArrow = getElement('container_chart_legend_pageup');
999998
path = backArrow.getAttribute('d');
1000-
expect(path === 'M 292.6450498628827 139 L 284.6450498628827 143 L 292.6450498628827 147 L 292.6450498628827 145 L 288.6450498628827 143 L292.6450498628827 141 Z' ||
999+
expect(path === 'M 335.5 45 L 339.5 37 L 343.5 45L 341.5 45 L 339.5 41L337.5 45 Z' ||
10011000
path === 'M 335.5 42 L 339.5 34 L 343.5 42L 341.5 42 L 339.5 38L337.5 42 Z').toBe;
10021001
fontArrow = getElement('container_chart_legend_pagedown');
10031002
path = fontArrow.getAttribute('d');
1004-
expect(path === 'M 326.6450498628827 139 L 334.6450498628827 143 L 326.6450498628827 147 L 326.6450498628827 145 L 330.6450498628827 143 L326.6450498628827 141 Z'||
1003+
expect(path === 'M 335.5 174 L 339.5 182 L 343.5 174L 341.5 174 L 339.5 178L337.5 174 Z' ||
10051004
path === 'M 335.5 174 L 339.5 182 L 343.5 174L 341.5 174 L 339.5 178L337.5 174 Z').toBe;
10061005
legendGroup = getElement('container_chart_legend_translate_g');
10071006
expect(legendGroup.childElementCount === 7).toBe(true);
10081007
done();
10091008
};
10101009
chartContainer.style.width = '400px';
1011-
chartContainer.style.height = '150px';
1010+
chartContainer.style.height = '200px';
10121011
pieObj.legendSettings.title = 'Countries';
10131012
pieObj.legendSettings.titlePosition = 'Top';
10141013
pieObj.legendSettings.position = 'Right';

controls/charts/src/accumulation-chart/renderer/legend.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export class AccumulationLegend extends BaseLegend {
165165
this.getLegendHeight(legendOption, legend, legendBounds, rowWidth, this.maxItemHeight, padding);
166166
if (this.isVertical) {
167167
columnHeight += legendOption.textSize.height + ((i === 0) ? padding : this.itemPadding);
168-
if (columnHeight + this.itemPadding + arrowHeight > (legendBounds.height)) {
168+
if (columnHeight + this.itemPadding + (arrowHeight / this.pageButtonSize) > (legendBounds.height)) {
169169
//columnHeight = Math.max(columnHeight, (rowCount * (this.maxItemHeight + padding)) + padding + arrowHeight);
170170
rowWidth = rowWidth + maximumWidth;
171171
pageRowWidth = this.getPageWidth(pageWidth);
@@ -331,6 +331,8 @@ export class AccumulationLegend extends BaseLegend {
331331
private getAvailWidth(tx: number, width: number): number {
332332
if (this.isVertical) {
333333
width = this.maxWidth;
334+
} else if (!this.isVertical && this.isPaging && !this.legend.enablePages) {
335+
return width - tx - this.fivePixel;
334336
}
335337
return width - ((this.legend.padding * 2) + this.legend.shapeWidth + this.legend.shapePadding);
336338
}

controls/charts/src/chart/legend/legend.ts

+3
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,9 @@ export class Legend extends BaseLegend {
316316
}
317317
let availwidth: number = (!this.isRtlEnable) ? (this.legendBounds.x + this.legendBounds.width) - (legendOption.location.x +
318318
textPadding - this.itemPadding - this.legend.shapeWidth / 2) : (legendOption.location.x - textPadding + this.itemPadding + (this.legend.shapeWidth / 2)) - this.legendBounds.x;
319+
if (!this.isVertical && this.isPaging && !this.legend.enablePages) {
320+
availwidth = this.legendBounds.width - legendOption.location.x - this.fivePixel;
321+
}
319322
availwidth = this.legend.maximumLabelWidth ? Math.min(this.legend.maximumLabelWidth, availwidth) : availwidth;
320323
if (this.legend.textOverflow === 'Ellipsis' && this.legend.textWrap === 'Normal') {
321324
legendOption.text = textTrim(+availwidth.toFixed(4), legendOption.text, this.legend.textStyle, this.chart.themeStyle.legendLabelFont);

0 commit comments

Comments
 (0)