Skip to content

Commit 7cb4a9a

Browse files
author
pipeline
committed
v19.2.47 is released
1 parent 9be09ef commit 7cb4a9a

File tree

272 files changed

+6819
-2111
lines changed

Some content is hidden

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

272 files changed

+6819
-2111
lines changed

controls/base/CHANGELOG.md

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

33
## [Unreleased]
44

5+
## 19.2.47 (2021-07-13)
6+
7+
### Common
8+
9+
- `I327143`,`I332883` - Resolved the issue with Template Compilation malfunctions when value have special character apostrophe.
10+
511
## 19.1.64 (2021-05-19)
612

713
### Common

controls/base/src/animation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export interface AnimationOptions extends AnimationModel {
283283
export function rippleEffect(element: HTMLElement, rippleOptions?: RippleOptions, done?: Function): () => void {
284284
let rippleModel: RippleOptions = getRippleModel(rippleOptions);
285285
if (rippleModel.rippleFlag === false || (rippleModel.rippleFlag === undefined && !isRippleEnabled)) {
286-
return Function;
286+
return (() => {});
287287
}
288288
element.setAttribute('data-ripple', 'true');
289289
EventHandler.add(element, 'mousedown', rippleHandler, { parent: element, rippleOptions: rippleModel });

controls/base/src/template.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ export function compile(template: string, helper?: Object, ignorePrefix?: boolea
6060
let argName: string = 'data';
6161

6262
let evalExpResult: string = evalExp(template, argName, helper, ignorePrefix);
63-
let fnCode: string = `var str="${evalExpResult}"; return str;`;
63+
let condtion = `if(str.match(/value='([^\/]+)'\\s/g)){
64+
var check = str.match(/value='([^\/]+)'/g)[0].split('=')[1];
65+
var change = check.replace(/^\'/, '\"');
66+
change = change.replace(/.$/,'\"');
67+
str = str.replace(check, change);
68+
}`;
69+
let fnCode = "var str=\"" + evalExpResult + "\";" + condtion + " return str;";
70+
// let fnCode: string = `var str="${evalExpResult}"; return str;`;
6471

6572
// tslint:disable-next-line:no-function-constructor-with-string-args
6673
let fn: Function = new Function(argName, fnCode);
@@ -234,4 +241,4 @@ function HandleSpecialCharArrObj(str: string, nameSpaceNew: string, keys: string
234241
} else {
235242
return str;
236243
}
237-
}
244+
}

controls/buttons/CHANGELOG.md

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

33
## [Unreleased]
44

5+
## 19.2.47 (2021-07-13)
6+
7+
### Checkbox
8+
9+
#### Bug Fixes
10+
11+
- Issue with checkbox icon on Mac OS has been resolved.
12+
513
## 19.2.46 (2021-07-06)
614

715
### Chips

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": "19.1.63",
3+
"version": "19.2.46",
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/_bootstrap4-definition.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ $cbox-indeterminate-disabled-border-color: $primary-font !default;
5050
$cbox-indeterminate-disabled-color: $primary-font !default;
5151
$cbox-indeterminate-fontsize: 8px !default;
5252
$cbox-indeterminate-hover-color: $white !default;
53-
$cbox-indeterminate-lineheight: 13px !default;
53+
$cbox-indeterminate-lineheight: 1.5 !default;
5454
$cbox-key-focussed-bgcolor: transparent !default;
55-
$cbox-lineheight: 13px !default;
55+
$cbox-lineheight: 1.5 !default;
5656
$cbox-margin: 8px !default;
5757
$cbox-padding: 0 !default;
5858
$cbox-ripple-bgcolor: transparent !default;

controls/calendars/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-calendars",
3-
"version": "17.2.48",
3+
"version": "19.2.46",
44
"description": "A complete package of date or time components with built-in features such as date formatting, inline editing, multiple (range) selection, range restriction, month and year selection, strict mode, and globalization.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/charts/CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,29 @@
22

33
## [Unreleased]
44

5+
## 19.2.47 (2021-07-13)
6+
7+
### Chart
8+
9+
#### Bug Fixes
10+
11+
- `#333145` - Point selection is now working properly, when specifying the selection on load.
12+
- `#334269` - Range area series is now rendering properly in stock chart.
13+
514
## 19.2.46 (2021-07-06)
615

716
### Chart
817

918
#### Bug Fixes
1019

20+
- `#332577` - `StepArea` gets truncated while using canvas mode issue has been fixed.
21+
22+
## 19.2.44 (2021-06-30)
23+
24+
### Chart
25+
26+
#### Bug Fixes
27+
1128
- `#331558` - Zooming working fine when the pan element not shown in toolbar.
1229

1330
#### New Features

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": "19.1.65",
3+
"version": "19.2.46",
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/src/chart/axis/multi-level-labels.ts

+20-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Axis } from '../axis/axis';
1111
import { FontModel } from '../../common/model/base-model';
1212
import { isNullOrUndefined } from '@syncfusion/ej2-base';
1313
import { textWrap, appendClipElement, appendChildElement } from '../../common/utils/helper';
14-
import { valueToCoefficient, textTrim, textElement } from '../../common/utils/helper';
14+
import { valueToCoefficient, textTrim, textElement, withInBounds } from '../../common/utils/helper';
1515
import { Size, measureText, TextOption, PathOption, Rect, SvgRenderer } from '@syncfusion/ej2-svg-base';
1616
import { MultiLevelLabels, MultiLevelCategories } from '../model/chart-base';
1717
import { IAxisMultiLabelRenderEventArgs, IMultiLevelLabelClickEventArgs } from '../../chart/model/chart-interface';
@@ -38,6 +38,10 @@ export class MultiLevelLabel {
3838
public multiElements: Element;
3939
/** @private */
4040
public labelElement: Element;
41+
/** @private */
42+
public multiLevelLabelRectXRegion: Rect[] = [];
43+
/** @private */
44+
public xLabelCollection: TextOption[] = [];
4145
/**
4246
* Constructor for the logerithmic module.
4347
*
@@ -170,6 +174,11 @@ export class MultiLevelLabel {
170174
this.chart.renderer, options, argsData.textStyle, argsData.textStyle.color || this.chart.themeStyle.axisLabel,
171175
this.labelElement, false, this.chart.redraw, true, null, null, null, null, null, this.chart.enableCanvas
172176
);
177+
if (this.chart.enableCanvas) {
178+
let textSize: Size = measureText(argsData.text, argsData.textStyle);
179+
this.multiLevelLabelRectXRegion.push(new Rect(options.x, options.y, textSize.width, textSize.height));
180+
this.xLabelCollection.push(options);
181+
}
173182
if (multiLevel.border.width > 0 && multiLevel.border.type !== 'WithoutBorder') {
174183
pathRect = this.renderXAxisLabelBorder(
175184
level, endX - startX - padding, axis, startX, startY, labelSize, options, axisRect, argsData.alignment,
@@ -511,11 +520,20 @@ export class MultiLevelLabel {
511520
* @private
512521
*/
513522
public click(event: Event): void {
514-
const targetId: string = (<HTMLElement>event.target).id;
523+
let targetId: string = (<HTMLElement>event.target).id;
515524
const multiLevelID: string = '_Axis_MultiLevelLabel_Level_';
516525
let textId: string;
517526
let elementId: string;
518527
let axisIndex: number;
528+
if (this.chart.enableCanvas) {
529+
for (let i: number = 0; i < this.multiLevelLabelRectXRegion.length; i++) {
530+
if (withInBounds(
531+
event['x'], event['y'], this.multiLevelLabelRectXRegion[i],
532+
this.multiLevelLabelRectXRegion[i].width, this.multiLevelLabelRectXRegion[i].height)) {
533+
targetId = this.xLabelCollection[i].id;
534+
}
535+
}
536+
}
519537
if (targetId.indexOf(multiLevelID) > -1) {
520538
textId = targetId.split(multiLevelID)[1];
521539
elementId = targetId.split(multiLevelID)[0];

controls/charts/src/chart/chart.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -1928,6 +1928,10 @@ export class Chart extends Component<HTMLElement> implements INotifyPropertyChan
19281928
*/
19291929
public renderSeries(): void {
19301930
let visibility: boolean;
1931+
if (this.enableCanvas) {
1932+
// To clip the series rect for canvas
1933+
(this.renderer as CanvasRenderer).canvasClip(this.chartAxisLayoutPanel.seriesClipRect);
1934+
}
19311935
for (const item of this.visibleSeries) {
19321936
if (item.category === 'TrendLine') {
19331937
visibility = this.series[item.sourceIndex].trendlines[item.index].visible;
@@ -1940,8 +1944,6 @@ export class Chart extends Component<HTMLElement> implements INotifyPropertyChan
19401944
if (this.enableCanvas) {
19411945
// To render scatter and bubble series in canvas
19421946
this.renderCanvasSeries(item);
1943-
// To clip the series rect for canvas
1944-
(this.renderer as CanvasRenderer).canvasClip(this.chartAxisLayoutPanel.seriesClipRect);
19451947
}
19461948
item.renderSeries(this);
19471949
if (this.enableCanvas) {
@@ -3578,6 +3580,7 @@ export class Chart extends Component<HTMLElement> implements INotifyPropertyChan
35783580
* Called internally if any of the property value changed.
35793581
* @private
35803582
*/
3583+
// tslint:disable-next-line:max-func-body-length
35813584
public onPropertyChanged(newProp: ChartModel, oldProp: ChartModel): void {
35823585
let renderer: boolean = false;
35833586
let refreshBounds: boolean = false;
@@ -3702,6 +3705,13 @@ export class Chart extends Component<HTMLElement> implements INotifyPropertyChan
37023705
renderer = true;
37033706
break;
37043707
case 'selectedDataIndexes':
3708+
if (this.selectionModule) {
3709+
this.selectionModule.currentMode = this.selectionMode;
3710+
this.selectionModule.selectedDataIndexes = this.selectedDataIndexes as Indexes[];
3711+
this.selectionModule.styleId = this.element.id + '_ej2_chart_selection';
3712+
this.selectionModule.redrawSelection(this, oldProp.selectionMode, true);
3713+
}
3714+
break;
37053715
case 'selectionMode':
37063716
if (this.selectionModule && newProp.selectionMode && newProp.selectionMode.indexOf('Drag') === -1) {
37073717
this.selectionModule.currentMode = this.selectionMode;

controls/charts/src/chart/utils/get-data.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export class ChartData {
210210
public getClosest(series: Series, value: number, xvalues?: number[]): number {
211211
let closest: number; let data: number;
212212
const xData: number[] = xvalues ? xvalues : series.xData;
213-
if (value >= <number>series.xMin - 0.5 && value <= <number>series.xMax + 0.5) {
213+
if (value >= <number>series.xAxis.visibleRange.min && value <= <number>series.xAxis.visibleRange.max) {
214214
for (let i: number = 0; i < xData.length; i++) {
215215
data = xData[i];
216216
if (closest == null || Math.abs(data - value) < Math.abs(closest - value)) {

controls/circulargauge/CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@
44

55
## [Unreleased]
66

7+
## 19.2.47 (2021-07-13)
8+
9+
### CircularGauge
10+
11+
#### Bug Fixes
12+
13+
- `#I333600` - No script errors are thrown when the same start and end values are set in the range using the `setRangeValue()` method.
14+
15+
## 19.2.46 (2021-07-06)
16+
17+
### CircularGauge
18+
19+
#### Bug Fixes
20+
21+
- `#I333600` - No script errors are thrown when the same start and end values are set in the range using the `setRangeValue()` method.
22+
- `#I333600` - When the `start` and `end` values of the range are set to the same value, the range's path will be correct now.
23+
724
## 19.1.58 (2021-04-27)
825

926
### CircularGauge

controls/circulargauge/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-circulargauge",
3-
"version": "17.4.39",
3+
"version": "19.2.46",
44
"description": "Essential JS 2 CircularGauge Components",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/circulargauge/spec/circulargauge/axes/range.spec.ts

+22-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe('Circular-Gauge Control', () => {
6969
it('Checking the axis range element', (done: Function) => {
7070
gauge.loaded = (args: ILoadedEventArgs): void => {
7171
value = document.getElementById('container_Axis_Ranges_0').childElementCount;
72-
expect(value == 0).toBe(true);
72+
expect(value == 1).toBe(true);
7373
done();
7474
};
7575
gauge.refresh();
@@ -87,7 +87,7 @@ describe('Circular-Gauge Control', () => {
8787
it('Checking the axis range element with given range both positive - same', (done: Function) => {
8888
gauge.loaded = (args: ILoadedEventArgs): void => {
8989
value = document.getElementById('container_Axis_Ranges_0').childElementCount;
90-
expect(value == 0).toBe(true);
90+
expect(value == 1).toBe(true);
9191
done();
9292
};
9393
gauge.axes[0].ranges[0].start = 10;
@@ -327,6 +327,26 @@ describe('Circular-Gauge Control', () => {
327327
gauge.axes[0].ranges[1].radius = '50';
328328
gauge.refresh();
329329
});
330+
it('Checking axis range start value change by setRangeValue method', (done: Function) => {
331+
gauge.loaded = (args: ILoadedEventArgs): void => {
332+
ele = <HTMLElement>document.getElementById('container_Axis_Ranges_0').childNodes[0];
333+
let start = gauge.axes[0].ranges[0].start;
334+
gauge.setRangeValue(0, 0, 10, 50);
335+
expect(start !== gauge.axes[0].ranges[0].start).toBe(true);
336+
done();
337+
};
338+
gauge.refresh();
339+
});
340+
it('Checking axis range end value change by setRangeValue method', (done: Function) => {
341+
gauge.loaded = (args: ILoadedEventArgs): void => {
342+
ele = <HTMLElement>document.getElementById('container_Axis_Ranges_0').childNodes[0];
343+
let end = gauge.axes[0].ranges[0].end;
344+
gauge.setRangeValue(0, 0, 10, 40);
345+
expect(end !== gauge.axes[0].ranges[0].end).toBe(true);
346+
done();
347+
};
348+
gauge.refresh();
349+
});
330350
});
331351

332352
describe('Checking range radius with multiple scenarios', () => {

controls/circulargauge/spec/circulargauge/axes/semi-half.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ describe('Circular-Gauge Control', () => {
133133
it('Checking start angle greater than 90 and end angle less than 360', (done: Function) => {
134134
gauge.loaded = (args: ILoadedEventArgs): void => {
135135
ele = document.getElementById("container_Axis_Ranges_0");
136-
expect(ele.childElementCount === 0).toBe(true);
136+
expect(ele.childElementCount === 1).toBe(true);
137137
done();
138138
};
139139
gauge.axes = [{

controls/circulargauge/spec/circulargauge/user-interaction/theme.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ describe('Circular-Gauge Control', () => {
515515
it('Axis label font family Bootstrap4 color', (): void => {
516516
gauge.loaded = (args: ILoadedEventArgs): void => {
517517
svg = document.getElementById('container_Axis_0_Label_0');
518-
expect(svg.style.fontFamily).toBe('HelveticaNeue');
518+
expect(svg.style.fontFamily).toBe('Roboto');
519519
};
520520
gauge.refresh();
521521
});

controls/circulargauge/src/circular-gauge/axes/axis-renderer.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export class AxisRenderer {
174174
if ((i === 0 && style.hiddenLabel === 'First') || (i === (length - 1) && style.hiddenLabel === 'Last')) {
175175
continue;
176176
}
177-
style.font.fontFamily = this.gauge.themeStyle.labelFontFamily || style.font.fontFamily;
177+
style.font.fontFamily = style.font.fontFamily || this.gauge.themeStyle.labelFontFamily;
178178
if (axis.hideIntersectingLabel && (i !== 0)) {
179179
//To remove the labels which is intersecting with last label.
180180
const lastlabel: boolean = ((i !== (labelCollection.length - 1)) && ((isCompleteAngle(axis.startAngle, axis.endAngle) ||
@@ -585,6 +585,11 @@ export class AxisRenderer {
585585
Math.floor(startAngle), Math.ceil(endAngle), colorIndex
586586
);
587587
}
588+
} else if ((range.start === range.end) && ((range.start >= min && range.end <= max) || (range.end >= min && range.start <= max))) {
589+
this.rangeAppendPathCalculation(
590+
range, rangeIndex, index, startWidth, endWidth, rangeElement,
591+
Math.floor(startAngle), Math.ceil(endAngle), colorIndex
592+
);
588593
}
589594
}
590595

controls/circulargauge/src/circular-gauge/circular-gauge.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,8 @@ export class CircularGauge extends Component<HTMLElement> implements INotifyProp
470470
public startValue: number;
471471
/** @private */
472472
public endValue: number;
473+
/** @private */
474+
private isRangeUpdate: boolean = false;
473475
/**
474476
* Render axis panel for gauge.
475477
*
@@ -1485,6 +1487,9 @@ export class CircularGauge extends Component<HTMLElement> implements INotifyProp
14851487
const isClockWise: boolean = axis.direction === 'ClockWise';
14861488
const startValue: number = Math.min(Math.max(start, axisRange.min), end);
14871489
const endValue: number = Math.min(Math.max(start, end), axisRange.max);
1490+
range.start = start;
1491+
range.end = end;
1492+
this.isRangeUpdate = true;
14881493
let startAngle: number = getAngleFromValue(startValue, axisRange.max, axisRange.min, axis.startAngle, axis.endAngle, isClockWise);
14891494
let endAngle: number = getAngleFromValue(endValue, axisRange.max, axisRange.min, axis.startAngle, axis.endAngle, isClockWise);
14901495
let startWidth: number;
@@ -1644,7 +1649,7 @@ export class CircularGauge extends Component<HTMLElement> implements INotifyProp
16441649
break;
16451650
}
16461651
}
1647-
if (!isPointerValueSame) {
1652+
if (!isPointerValueSame && !this.isRangeUpdate) {
16481653
if (!refreshBounds && renderer) {
16491654
this.removeSvg();
16501655
this.renderElements();
@@ -1660,6 +1665,7 @@ export class CircularGauge extends Component<HTMLElement> implements INotifyProp
16601665
this.renderElements(false);
16611666
}
16621667
}
1668+
this.isRangeUpdate = false;
16631669
}
16641670

16651671
/**

0 commit comments

Comments
 (0)