Skip to content

Commit f7e89bd

Browse files
author
pipeline
committed
v17.1.40 is released
1 parent bfdd396 commit f7e89bd

File tree

239 files changed

+2782
-1077
lines changed

Some content is hidden

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

239 files changed

+2782
-1077
lines changed

controls/base/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-base",
3-
"version": "17.1.32",
3+
"version": "17.1.38",
44
"description": "A common package of Essential JS 2 base libraries, methods and class definitions",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/buttons/CHANGELOG.md

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

33
## [Unreleased]
44

5+
## 17.1.40 (2019-04-09)
6+
7+
### RadioButton
8+
9+
#### New Features
10+
11+
- Provided `getSelectedValue` method to find the value of selected radio button in a group.
12+
513
## 17.1.1-beta (2019-01-29)
614

715
### Chips

controls/buttons/dist/ej2-buttons.umd.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/buttons/dist/ej2-buttons.umd.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/buttons/dist/es6/ej2-buttons.es2015.js

+20-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/buttons/dist/es6/ej2-buttons.es2015.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/buttons/dist/es6/ej2-buttons.es5.js

+20-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/buttons/dist/es6/ej2-buttons.es5.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/buttons/dist/global/ej2-buttons.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/buttons/dist/global/ej2-buttons.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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": "17.1.32",
3+
"version": "17.1.38",
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/spec/radio-button.spec.ts

+12
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,18 @@ describe('RadioButton', () => {
273273
expect(radio.element.id).toContain('e-radio');
274274
expect(radio.element.type).toEqual('radio');
275275
});
276+
it('getSelectedValue method', () => {
277+
document.body.appendChild(createElement('input', { id: 'group1', attrs: { 'type': 'radio' } }));
278+
document.body.appendChild(createElement('input', { id: 'group2', attrs: { 'type': 'radio' } }));
279+
radio = new RadioButton({ name: 'group', value: '1' }, '#group1');
280+
let radio2: RadioButton = new RadioButton({ name: 'group', value: '2' }, '#group2');
281+
expect(radio.getSelectedValue()).toEqual('');
282+
radio.element.click();
283+
expect(radio2.getSelectedValue()).toEqual('1');
284+
radio2.element.click();
285+
expect(radio.getSelectedValue()).toEqual('2');
286+
radio2.destroy();
287+
});
276288
});
277289

278290
describe('RadioButton in HTML5 forms', () => {

controls/buttons/src/radio-button/radio-button.ts

+19-2
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ export class RadioButton extends Component<HTMLInputElement> implements INotifyP
121121

122122
private updateChange(state: boolean): void {
123123
let input: HTMLInputElement; let instance: RadioButton;
124-
let name: string = this.element.getAttribute('name');
125-
let radioGrp: NodeListOf<Element> = document.querySelectorAll('input.e-radio[name="' + name + '"]');
124+
let radioGrp: NodeListOf<Element> = this.getRadioGroup();
126125
for (let i: number = 0; i < radioGrp.length; i++) {
127126
input = radioGrp[i] as HTMLInputElement;
128127
if (input !== this.element) {
@@ -171,6 +170,24 @@ export class RadioButton extends Component<HTMLInputElement> implements INotifyP
171170
return 'radio';
172171
}
173172

173+
/**
174+
* To get the value of selected radio button in a group.
175+
* @method getSelectedValue
176+
* @return {string}
177+
*/
178+
public getSelectedValue(): string {
179+
let input: HTMLInputElement; let radioGrp: NodeListOf<Element> = this.getRadioGroup();
180+
for (let i: number = 0, len: number = radioGrp.length; i < len; i++) {
181+
input = radioGrp[i] as HTMLInputElement;
182+
if (input.checked ) { return input.value; }
183+
}
184+
return '';
185+
}
186+
187+
private getRadioGroup(): NodeListOf<Element> {
188+
return document.querySelectorAll('input.e-radio[name="' + this.element.getAttribute('name') + '"]');
189+
}
190+
174191
/**
175192
* Gets the properties to be maintained in the persistence state.
176193
* @private

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.1.32",
3+
"version": "17.1.38",
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

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

33
## [Unreleased]
44

5+
## 17.1.40 (2019-04-09)
6+
7+
### Accumulation chart
8+
9+
#### Bug Fixes
10+
11+
- Now Accumulation chart is refreshing properly on data change.
12+
13+
### Chart
14+
15+
#### Bug Fixes
16+
17+
- Stacking column is not rendered properly when yvalue in string is fixed.
18+
- Zoomposition is not proper, when the axis is inversed is fixed.
19+
- Multiline label alignment is not proper, when breaking the labels into smaller text issue fixed
20+
521
## 17.1.32-beta (2019-03-13)
622

723
### Chart

controls/charts/dist/ej2-charts.umd.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/charts/dist/ej2-charts.umd.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/charts/dist/es6/ej2-charts.es2015.js

+36-16
Original file line numberDiff line numberDiff line change
@@ -1410,14 +1410,8 @@ class Axis extends ChildProperty {
14101410
let baseRange = this.actualRange;
14111411
let start;
14121412
let end;
1413-
if (!this.isInversed) {
1414-
start = this.actualRange.min + this.zoomPosition * this.actualRange.delta;
1415-
end = start + this.zoomFactor * this.actualRange.delta;
1416-
}
1417-
else {
1418-
start = this.actualRange.max - (this.zoomPosition * this.actualRange.delta);
1419-
end = start - (this.zoomFactor * this.actualRange.delta);
1420-
}
1413+
start = this.actualRange.min + this.zoomPosition * this.actualRange.delta;
1414+
end = start + this.zoomFactor * this.actualRange.delta;
14211415
if (start < baseRange.min) {
14221416
end = end + (baseRange.min - start);
14231417
start = baseRange.min;
@@ -4216,7 +4210,7 @@ class CartesianAxisLayoutPanel {
42164210
intervalLength = rect.width / length;
42174211
width = ((axis.labelIntersectAction === 'Trim' || axis.labelIntersectAction === 'Wrap') && angle === 0
42184212
&& elementSize.width > intervalLength) ? intervalLength : elementSize.width;
4219-
if (breakLabels.indexOf('<br>') !== -1 && label.breakLabelSize.width < axis.maxLabelSize.width) {
4213+
if (breakLabels.indexOf('<br>') !== -1 && label.breakLabelSize.width <= axis.maxLabelSize.width) {
42204214
pointX -= label.breakLabelSize.width / 2;
42214215
}
42224216
else {
@@ -5343,7 +5337,7 @@ class Series extends SeriesBase {
53435337
stackingSeies.push(series);
53445338
for (let j = 0, pointsLength = series.points.length; j < pointsLength; j++) {
53455339
lastValue = 0;
5346-
value = yValues[j];
5340+
value = +yValues[j]; // Fix for chart not rendering while y value is given as string issue
53475341
if (lastPositive[stackingGroup][series.points[j].xValue] === undefined) {
53485342
lastPositive[stackingGroup][series.points[j].xValue] = 0;
53495343
}
@@ -7561,6 +7555,8 @@ let Chart = class Chart extends Component {
75617555
element.style.webkitUserSelect = 'none';
75627556
element.style.position = 'relative';
75637557
element.style.display = 'block';
7558+
// To fix angular and react tooltip div scrollbar issue
7559+
element.style.overflow = 'hidden';
75647560
}
75657561
/**
75667562
* Finds the orientation.
@@ -22977,6 +22973,17 @@ let AccumulationChart = class AccumulationChart extends Component {
2297722973
}
2297822974
return false;
2297922975
}
22976+
/**
22977+
* Get visible series for accumulation chart by index
22978+
*/
22979+
changeVisibleSeries(visibleSeries, index) {
22980+
for (let series of visibleSeries) {
22981+
if (index === series.index) {
22982+
return series;
22983+
}
22984+
}
22985+
return null;
22986+
}
2298022987
/**
2298122988
* Get the properties to be maintained in the persisted state.
2298222989
* @private
@@ -23032,8 +23039,11 @@ let AccumulationChart = class AccumulationChart extends Component {
2303223039
if (!this.animateselected) {
2303323040
let len = this.series.length;
2303423041
let seriesRefresh = false;
23042+
let series;
2303523043
for (let i = 0; i < len; i++) {
23044+
series = newProp.series[i];
2303623045
if (newProp.series[i] && (newProp.series[i].dataSource || newProp.series[i].yName || newProp.series[i].xName)) {
23046+
extend(this.changeVisibleSeries(this.visibleSeries, i), series, null, true);
2303723047
seriesRefresh = true;
2303823048
}
2303923049
if (newProp.series[i] && newProp.series[i].explodeIndex !== oldProp.series[i].explodeIndex) {
@@ -29174,7 +29184,7 @@ class StockEvents extends BaseTooltip {
2917429184
textSize = measureText(stockEvent.text + 'W', stockEvent.textStyle);
2917529185
if (!argsData.cancel) {
2917629186
stockEventElement = sChart.renderer.createGroup({ id: this.chartId + '_Series_' + series.index + '_StockEvents_' + i });
29177-
if (withIn(stockEvent.date.getTime(), series.xAxis.visibleRange)) {
29187+
if (withIn(this.dateParse(stockEvent.date).getTime(), series.xAxis.visibleRange)) {
2917829188
symbolLocation = this.findClosePoint(series, stockEvent);
2917929189
if (!stockEvent.showOnSeries) {
2918029190
symbolLocation.y = series.yAxis.rect.y + series.yAxis.rect.height;
@@ -29189,7 +29199,7 @@ class StockEvents extends BaseTooltip {
2918929199
return stockEventsElementGroup;
2919029200
}
2919129201
findClosePoint(series, sEvent) {
29192-
let closeIndex = this.getClosest(series, sEvent.date.getTime());
29202+
let closeIndex = this.getClosest(series, this.dateParse(sEvent.date).getTime());
2919329203
let pointData;
2919429204
let point;
2919529205
let xPixel;
@@ -29222,9 +29232,9 @@ class StockEvents extends BaseTooltip {
2922229232
case 'Flag':
2922329233
case 'Circle':
2922429234
case 'Square':
29225-
stockEventElement.appendChild(drawSymbol(new ChartLocation(lx, ly), 'Circle', new Size(2, 2), '', new PathOption(stockId + '_Circle', 'transparent', border.width, border.color), stockEve.date.toDateString()));
29226-
stockEventElement.appendChild(drawSymbol(new ChartLocation(lx, ly - 5), 'VerticalLine', new Size(9, 9), '', new PathOption(stockId + '_Path', border.color, border.width, border.color), stockEve.date.toDateString()));
29227-
stockEventElement.appendChild(drawSymbol(new ChartLocation(stockEve.type !== 'Flag' ? lx : lx + result.width / 2, ly - result.height), stockEve.type, result, '', new PathOption(stockId + '_Shape', stockEve.background, border.width, border.color), stockEve.date.toDateString()));
29235+
stockEventElement.appendChild(drawSymbol(new ChartLocation(lx, ly), 'Circle', new Size(2, 2), '', new PathOption(stockId + '_Circle', 'transparent', border.width, border.color), this.dateParse(stockEve.date).toISOString()));
29236+
stockEventElement.appendChild(drawSymbol(new ChartLocation(lx, ly - 5), 'VerticalLine', new Size(9, 9), '', new PathOption(stockId + '_Path', border.color, border.width, border.color), this.dateParse(stockEve.date).toISOString()));
29237+
stockEventElement.appendChild(drawSymbol(new ChartLocation(stockEve.type !== 'Flag' ? lx : lx + result.width / 2, ly - result.height), stockEve.type, result, '', new PathOption(stockId + '_Shape', stockEve.background, border.width, border.color), this.dateParse(stockEve.date).toISOString()));
2922829238
textElement(new TextOption(stockId + '_Text', stockEve.type !== 'Flag' ? symbolLocation.x : symbolLocation.x + result.width / 2, (symbolLocation.y - result.height), 'middle', stockEve.text, '', 'middle'), stockEve.textStyle, stockEve.textStyle.color, stockEventElement);
2922929239
break;
2923029240
case 'ArrowUp':
@@ -29239,7 +29249,7 @@ class StockEvents extends BaseTooltip {
2923929249
case 'InvertedTriangle':
2924029250
result.height = 3 * textSize.height;
2924129251
result.width = textSize.width + (1.5 * textSize.width);
29242-
stockEventElement.appendChild(drawSymbol(new ChartLocation(symbolLocation.x, symbolLocation.y), stockEve.type, new Size(20, 20), '', new PathOption(stockId + '_Shape', stockEve.background, border.width, border.color), stockEve.date.toDateString()));
29252+
stockEventElement.appendChild(drawSymbol(new ChartLocation(symbolLocation.x, symbolLocation.y), stockEve.type, new Size(20, 20), '', new PathOption(stockId + '_Shape', stockEve.background, border.width, border.color), this.dateParse(stockEve.date).toISOString()));
2924329253
textElement(new TextOption(stockId + '_Text', symbolLocation.x, symbolLocation.y, 'middle', stockEve.text, '', 'middle'), stockEve.textStyle, stockEve.textStyle.color, stockEventElement);
2924429254
break;
2924529255
case 'Text':
@@ -29355,6 +29365,16 @@ class StockEvents extends BaseTooltip {
2935529365
getElement(elementId).setAttribute('opacity', opacity.toString());
2935629366
}
2935729367
}
29368+
/**
29369+
* @param value
29370+
* To convert the c# or javascript date formats into js format
29371+
* refer chart control's dateTime processing.
29372+
*/
29373+
dateParse(value) {
29374+
let dateParser = this.chart.intl.getDateParser({ skeleton: 'full', type: 'dateTime' });
29375+
let dateFormatter = this.chart.intl.getDateFormat({ skeleton: 'full', type: 'dateTime' });
29376+
return new Date((Date.parse(dateParser(dateFormatter(new Date(DataUtil.parse.parseJson({ val: value }).val))))));
29377+
}
2935829378
}
2935929379
function initialArray(numrows, numcols, initial) {
2936029380
let arr = [];

controls/charts/dist/es6/ej2-charts.es2015.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)