Skip to content

Commit be01d3d

Browse files
author
pipeline
committed
v17.1.48 is released
1 parent 1566faf commit be01d3d

File tree

398 files changed

+6594
-2084
lines changed

Some content is hidden

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

398 files changed

+6594
-2084
lines changed

controls/base/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
## [Unreleased]
44

5+
## 17.1.48 (2019-05-21)
6+
7+
### Common
8+
9+
#### Bug Fixes
10+
11+
- Resolved Multiple space between class Names for template Engine support.
12+
13+
#### New Features
14+
15+
- Added the `httpRequest` argument to Ajax `beforeSend` event arguments.
16+
517
## 17.1.43 (2019-04-30)
618

719
### Common

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-base",
3-
"version": "17.1.43",
3+
"version": "17.1.47",
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/base/spec/template.spec.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { createElement} from '../src/dom';
77
let dsJSONArray: any = [{ name: 'one', info: { id: '01' } }, { name: 'two', info: { id: '02' } }];
88
let dsSubArray: any = [{ name: 'one', items: ['AR Item1', 'AR Item2'] }, { name: 'two', items: ['AR Item1', 'AR Item2'] }];
99
let dsJSONSubArray: any = [{ name: 'one', info: { id: '01', items: ['AR Item1', 'AR Item2'] } }, { name: 'two', info: { id: '02', items: ['AR Item1', 'AR Item2'] } }];
10+
let JSONArray: any = [{ name:'one two', info: { id:'01' } }, { name:'two three', info: { id:'02' } }];
1011

1112
let tempObj: any;
1213

@@ -41,6 +42,54 @@ describe('Template', () => {
4142
expect(outDOM(template.compile(templateStr), dsJSONArray)).toEqual(result);
4243
});
4344

45+
it('JSON Array Input With two space between class Names', () => {
46+
let templateStr: string = '<div class="class1 class2 class3">${name}</div>';
47+
let result: Element[] = [];
48+
result.push(createElement('div', { innerHTML: 'one', className:'class1 class2 class3' }));
49+
result.push(createElement('div', { innerHTML: 'two', className:'class1 class2 class3' }));
50+
expect(outDOM(template.compile(templateStr), dsJSONArray)).toEqual(result);
51+
});
52+
53+
it('JSON Array Input With more than two space between two class Names', () => {
54+
let templateStr: string = '<div class="class1 class2">${name}</div>';
55+
let result: Element[] = [];
56+
result.push(createElement('div', { innerHTML: 'one', className:'class1 class2' }));
57+
result.push(createElement('div', { innerHTML: 'two', className:'class1 class2' }));
58+
expect(outDOM(template.compile(templateStr), dsJSONArray)).toEqual(result);
59+
});
60+
61+
it('JSON Array Input With more than two space between three class Names', () => {
62+
let templateStr: string = '<div class="class1 class2 class3">${name}</div>';
63+
let result: Element[] = [];
64+
result.push(createElement('div', { innerHTML: 'one', className:'class1 class2 class3' }));
65+
result.push(createElement('div', { innerHTML: 'two', className:'class1 class2 class3' }));
66+
expect(outDOM(template.compile(templateStr), dsJSONArray)).toEqual(result);
67+
});
68+
69+
it('JSON Array Input With more than two space in first class name', () => {
70+
let templateStr: string = '<div class=" class1">${name}</div>';
71+
let result: Element[] = [];
72+
result.push(createElement('div', { innerHTML: 'one', className:' class1' }));
73+
result.push(createElement('div', { innerHTML: 'two', className:' class1' }));
74+
expect(outDOM(template.compile(templateStr), dsJSONArray)).toEqual(result);
75+
});
76+
77+
it('JSON Array Input With two space in first class name and multiple space between three class names', () => {
78+
let templateStr: string = '<div class=" class1 class2 class3">${name}</div>';
79+
let result: Element[] = [];
80+
result.push(createElement('div', { innerHTML: 'one', className:' class1 class2 class3' }));
81+
result.push(createElement('div', { innerHTML: 'two', className:' class1 class2 class3' }));
82+
expect(outDOM(template.compile(templateStr), dsJSONArray)).toEqual(result);
83+
});
84+
85+
it('JSON Array Input With multiple sapce between inner text', () => {
86+
let templateStr: string = '<div class=" class1 class2 class3">${name}</div>';
87+
let result: Element[] = [];
88+
result.push(createElement('div', { innerHTML: 'one two', className:' class1 class2 class3' }));
89+
result.push(createElement('div', { innerHTML: 'two three', className:' class1 class2 class3' }));
90+
expect(outDOM(template.compile(templateStr), JSONArray)).toEqual(result);
91+
});
92+
4493
it('JSON Array input with multiple key mapping String', () => {
4594
let templateStr: string = '<div>${name}${info.id}</div>';
4695
let result: Element[] = [];

controls/base/src/ajax.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ export class Ajax {
8686
public send(data?: string | Object): Promise<Ajax> {
8787
this.data = isNullOrUndefined(data) ? this.data : data;
8888
let eventArgs: BeforeSendEventArgs = {
89-
cancel: false
89+
cancel: false,
90+
httpRequest: null
9091
};
9192
let promise: Promise<Ajax> = new Promise((resolve: Function, reject: Function) => {
9293
this.httpRequest = new XMLHttpRequest();
@@ -112,13 +113,14 @@ export class Ajax {
112113
}
113114
this.httpRequest.open(this.type, this.url, this.mode);
114115
// Set default headers
115-
if (!isNullOrUndefined(this.data) && this.contentType !== null ) {
116+
if (!isNullOrUndefined(this.data) && this.contentType !== null) {
116117
this.httpRequest.setRequestHeader('Content-Type', this.contentType || 'application/json; charset=utf-8');
117118
}
118119
if (this.beforeSend) {
120+
eventArgs.httpRequest = this.httpRequest;
119121
this.beforeSend(eventArgs);
120122
}
121-
if (!eventArgs.cancel) {
123+
if (!eventArgs.cancel) {
122124
this.httpRequest.send(!isNullOrUndefined(this.data) ? this.data as Document : null);
123125
}
124126
});
@@ -175,7 +177,7 @@ export class Ajax {
175177
reject(new Error(this.failureHandler(this.httpRequest.statusText)));
176178
} else {
177179
resolve();
178-
}
180+
}
179181
}
180182
}
181183
}
@@ -205,12 +207,15 @@ export interface HeaderOptions {
205207
overrideMimeType?: Function;
206208
}
207209

208-
/**
209-
* Specifies the ajax beforeSend event arguments
210-
* @event
211-
*/
210+
/**
211+
* Specifies the ajax beforeSend event arguments
212+
* @event
213+
*/
212214
export interface BeforeSendEventArgs {
213215

214216
/** To cancel the ajax request in beforeSend */
215217
cancel?: boolean;
216-
}
218+
219+
/** Returns the request sent from the client end */
220+
httpRequest?: XMLHttpRequest;
221+
}

controls/base/src/template.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ function evalExp(str: string, nameSpace: string, helper?: Object): string {
7272
*/
7373
let localKeys: string[] = [];
7474

75+
let isClass: string[] = str.match(/class="([^\"]+|)\s{2}/g);
76+
let singleSpace: string = '';
77+
if (isClass) {
78+
isClass.forEach((value: string) => {
79+
singleSpace = value.replace(/\s\s+/g, ' ');
80+
str = str.replace(value, singleSpace);
81+
});
82+
}
83+
7584
return str.replace(LINES, '').replace(DBL_QUOTED_STR, '\'$1\'').replace(
7685

7786
exp,

controls/buttons/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-buttons",
3-
"version": "17.1.42",
3+
"version": "17.1.47",
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/calendars/CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22

33
## [Unreleased]
44

5+
## 17.1.48 (2019-05-21)
6+
7+
### Calendar
8+
9+
#### Bug Fixes
10+
11+
- #235561 - Now, you can navigate year within min and max range in decade view.
12+
13+
### DatePicker
14+
15+
#### Bug Fixes
16+
17+
- #216875 - Issue with some additional text appended to all day numbers when choose `Japanese` culture has been fixed.
18+
19+
### DateRangePicker
20+
21+
#### Bug Fixes
22+
23+
- #233687 - Issue with change event trigger twice when provide date format without date specifier has been fixed.
24+
525
## 17.1.43 (2019-04-30)
626

727
### DatePicker

controls/calendars/demos/datepicker/internationalization.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ <h3 class="header">Property Panel </h3>
6363
<option value="en">en</option>
6464
<option value="de" selected>de</option>
6565
<option value="zh">zh</option>
66+
<option value="ar">ar</option>
6667
</select>
6768
</div>
6869
</td>

controls/calendars/demos/datepicker/internationalization.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,22 @@ L10n.load({
2626

2727
/*Load culturefiles from cldr main folder*/
2828
function loadCultureFiles(name: string): void {
29+
2930
let files: string[] =
3031
['ca-gregorian.json', 'numbers.json', 'timeZoneNames.json', 'currencies.json'];
31-
for (let prop of files) {
32+
33+
if (name === 'ar') {
34+
files.push('numberingSystems.json');
35+
}
36+
for (let prop = 0; prop < files.length; prop++) {
3237
let val: Object;
3338
let ajax: Ajax;
34-
ajax = new Ajax('../../spec/cldr/main/' + name + '/' + prop, 'GET', false);
39+
40+
if (name === 'ar' && prop === files.length - 1) {
41+
ajax = new Ajax('../../spec/cldr/supplemental/' + files[prop], 'GET', false);
42+
} else {
43+
ajax = new Ajax('../../spec/cldr/main/' + name + '/' + files[prop], 'GET', false);
44+
}
3545
ajax.onSuccess = (value: JSON) => {
3646
val = value;
3747
};
@@ -53,6 +63,11 @@ function changeLocale(): void {
5363
if (culture !== 'en') {
5464
loadCultureFiles(culture);
5565
}
66+
if(culture == 'ar') {
67+
datepicker.enableRtl = true;
68+
} else {
69+
datepicker.enableRtl = false;
70+
}
5671
datepicker.locale = culture;
5772
datepicker.dataBind();
5873
}

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
628628
var tdEle = this.dayCell(localDate);
629629
var title = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'full' });
630630
var dayLink = this.createElement('span');
631-
dayLink.textContent = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'd' });
631+
dayLink.textContent = this.globalize.formatDate(localDate, { format: 'd', type: 'date', skeleton: 'yMd' });
632632
var disabled = (this.min > localDate) || (this.max < localDate);
633633
if (disabled) {
634634
addClass([tdEle], DISABLED);
@@ -805,6 +805,10 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
805805
dayLink.textContent = this.globalize.formatDate(localDate, { type: 'dateTime', skeleton: 'y' });
806806
if ((year < startFullYr) || (year > endFullYr)) {
807807
addClass([tdEle], OTHERDECADE);
808+
if (year < new Date(this.checkValue(this.min)).getFullYear() ||
809+
year > new Date(this.checkValue(this.max)).getFullYear()) {
810+
addClass([tdEle], DISABLED);
811+
}
808812
}
809813
else if (year < new Date(this.checkValue(this.min)).getFullYear() ||
810814
year > new Date(this.checkValue(this.max)).getFullYear()) {

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/calendars/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-calendars",
3-
"version": "17.1.43",
3+
"version": "17.1.47",
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/calendars/src/calendar/calendar.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ export class CalendarBase extends Component<HTMLElement> implements INotifyPrope
769769
let tdEle: HTMLElement = this.dayCell(localDate);
770770
let title: string = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'full' });
771771
let dayLink: HTMLElement = this.createElement('span');
772-
dayLink.textContent = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'd' });
772+
dayLink.textContent = this.globalize.formatDate(localDate, { format: 'd', type: 'date', skeleton: 'yMd'});
773773
let disabled: boolean = (this.min > localDate) || (this.max < localDate);
774774
if (disabled) {
775775
addClass([tdEle], DISABLED);
@@ -943,6 +943,10 @@ export class CalendarBase extends Component<HTMLElement> implements INotifyPrope
943943
dayLink.textContent = this.globalize.formatDate(localDate, { type: 'dateTime', skeleton: 'y' });
944944
if ((year < startFullYr) || (year > endFullYr)) {
945945
addClass([tdEle], OTHERDECADE);
946+
if (year < new Date(this.checkValue(this.min)).getFullYear() ||
947+
year > new Date(this.checkValue(this.max)).getFullYear()) {
948+
addClass([tdEle], DISABLED);
949+
}
946950
} else if (year < new Date(this.checkValue(this.min)).getFullYear() ||
947951
year > new Date(this.checkValue(this.max)).getFullYear()) {
948952
addClass([tdEle], DISABLED);

controls/calendars/src/timepicker/timepicker-model.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ export interface TimePickerModel extends ComponentModel{
117117
* Gets or sets the minimum time value that can be allowed to select in TimePicker.
118118
* > For more details refer to
119119
* [`Time Range`](../../timepicker/time-range/) documentation.
120-
* @default 00:00
120+
* @default null
121121
*/
122122
min?: Date;
123123

124124
/**
125125
* Gets or sets the maximum time value that can be allowed to select in TimePicker.
126126
* > For more details refer to
127127
* [`Time Range`](../../timepicker/time-range/) documentation.
128-
* @default 00:00
128+
* @default null
129129
*/
130130
max?: Date;
131131

0 commit comments

Comments
 (0)