Skip to content

Commit 04d6d63

Browse files
author
pipeline
committed
v17.3.27 is released
1 parent 35e6fa8 commit 04d6d63

File tree

369 files changed

+7909
-1793
lines changed

Some content is hidden

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

369 files changed

+7909
-1793
lines changed

controls/base/CHANGELOG.md

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

33
## [Unreleased]
44

5+
## 17.3.27 (2019-11-12)
6+
7+
### Common
8+
9+
#### Bug Fixes
10+
11+
- Resolved Template support for Special characters(@) in helper function
12+
- Resolved Template support for Short string/numeric string in IF condition with Special characters(@)
13+
514
## 17.3.16 (2019-10-09)
615

716
### Common

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

+1-1
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

+1-1
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

+41-21
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

+1-1
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

+41-21
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

+1-1
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

+1-1
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

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

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.3.19",
3+
"version": "17.3.26",
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

+47-8
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ window.getName = function () {
5050
return "TestName";
5151
}
5252

53+
window.check = function (args: number) {
54+
if(args % 2 === 0) {
55+
return true;
56+
}
57+
else {
58+
return false;
59+
}
60+
}
61+
5362
let outDOM: Function = (tempFunction: Function, data: Object[]) => {
5463
let output: any[] = [];
5564
for (let item of data) {
@@ -345,18 +354,48 @@ describe('Template', () => {
345354
expect(output).toEqual("<div>ASTONHIMARTIN</div>");
346355
});
347356
it('JSON Array Input with IF Condition which has window function', () => {
348-
window.check = function (args: number) {
349-
if(args % 2 == 0) {
350-
return true;
351-
}
352-
else {
353-
return false;
354-
}
355-
}
356357
let templateStr: string = '${if(window.check(IDPRATICA))}<div>true</div>${else}<div>false</div>${/if}';
357358
let result: Element[] = [];
358359
result.push(createElement('div', { innerHTML: 'true' }));
359360
expect(outDOM(template.compile(templateStr), arrayOfObj)).toEqual(result);
360361
});
362+
it('JSON Array Input With IF Condition with window function which has special character', () => {
363+
let templateStr: string = '${if(window.check(@DRNT))}<div>true</div>${else}<div>false</div>${/if}';
364+
let result: Element[] = [];
365+
result.push(createElement('div', { innerHTML: 'true' }));
366+
expect(outDOM(template.compile(templateStr), arrayOfObj)).toEqual(result);
367+
});
368+
it('JSON Array Input With IF Condition with window function which has array of value within object', () => {
369+
let templateStr: string = '${if(window.check(Giorni[0].IDSTATO))}<div>true</div>${else}<div>false</div>${/if}';
370+
let result: Element[] = [];
371+
result.push(createElement('div', { innerHTML: 'false' }));
372+
expect(outDOM(template.compile(templateStr), arrayOfObj)).toEqual(result);
373+
});
374+
375+
it('JSON Array Input With IF Condition with window function which has special character with array of value within object', () => {
376+
let templateStr: string = '${if(window.check(@Prior[0].IDTAG))}<div>true</div>${else}<div>false</div>${/if}';
377+
let result: Element[] = [];
378+
result.push(createElement('div', { innerHTML: 'true' }));
379+
expect(outDOM(template.compile(templateStr), arrayOfObj)).toEqual(result);
380+
});
381+
382+
it('JSON Array Input with window function which has special character', () => {
383+
let templateStr: string = '<div>${window.check(@DRNT)}</div>';
384+
let result: Element[] = [];
385+
result.push(createElement('div', { innerHTML: 'true' }));
386+
expect(outDOM(template.compile(templateStr), arrayOfObj)).toEqual(result);
387+
});
388+
it('JSON Array Input With window function which has array of value within object', () => {
389+
let templateStr: string = '<div>${window.check(Giorni[0].IDSTATO)}</div>';
390+
let result: Element[] = [];
391+
result.push(createElement('div', { innerHTML: 'false' }));
392+
expect(outDOM(template.compile(templateStr), arrayOfObj)).toEqual(result);
393+
});
394+
it('JSON Array Input With window function which has special character with array of value within object', () => {
395+
let templateStr: string = '<div>${window.check(@Prior[0].IDTAG)}</div>';
396+
let result: Element[] = [];
397+
result.push(createElement('div', { innerHTML: 'true' }));
398+
expect(outDOM(template.compile(templateStr), arrayOfObj)).toEqual(result);
399+
});
361400

362401
});

controls/base/src/draggable.ts

+2
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ export class Draggable extends Base<HTMLElement> implements INotifyPropertyChang
335335
private dragProcessStarted: boolean = false;
336336
/* tslint:disable no-any */
337337
private tapHoldTimer: any = 0;
338+
public currentStateTarget: any;
338339
private externalInitialize: boolean = false;
339340
private diffY: number = 0;
340341
private pageY: number;
@@ -425,6 +426,7 @@ export class Draggable extends Base<HTMLElement> implements INotifyPropertyChang
425426
let horizontalScrollParent: HTMLElement = this.getScrollableParent(this.element.parentNode as HTMLElement, 'horizontal');
426427
}
427428
private initialize(evt: MouseEvent & TouchEvent, curTarget?: EventTarget): void {
429+
this.currentStateTarget = evt.target;
428430
if (this.isDragStarted()) {
429431
return;
430432
} else {

0 commit comments

Comments
 (0)