Skip to content

Commit 6c89a4c

Browse files
author
pipeline
committed
v17.2.46 is released
1 parent 75747d3 commit 6c89a4c

File tree

379 files changed

+7100
-2411
lines changed

Some content is hidden

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

379 files changed

+7100
-2411
lines changed

controls/barcodegenerator/dist/ej2-barcode-generator.umd.min.js

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

controls/barcodegenerator/dist/ej2-barcode-generator.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/barcodegenerator/dist/es6/ej2-barcode-generator.es2015.js

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

controls/barcodegenerator/dist/es6/ej2-barcode-generator.es2015.js.map

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

controls/barcodegenerator/dist/es6/ej2-barcode-generator.es5.js

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

controls/barcodegenerator/dist/es6/ej2-barcode-generator.es5.js.map

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

controls/barcodegenerator/dist/global/ej2-barcode-generator.min.js

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

controls/barcodegenerator/dist/global/ej2-barcode-generator.min.js.map

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

controls/barcodegenerator/src/barcode/barcode.ts

+1
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ export class BarcodeGenerator extends Component<HTMLElement> implements INotifyP
381381
this.trigger('load');
382382
this.notify('initial-end', {});
383383
this.renderElements();
384+
this.renderComplete();
384385
}
385386

386387

controls/barcodegenerator/src/datamatrix/datamatrix.ts

+1
Original file line numberDiff line numberDiff line change
@@ -295,5 +295,6 @@ export class DataMatrixGenerator extends Component<HTMLElement> implements INoti
295295
this.trigger('load');
296296
this.notify('initial-end', {});
297297
this.renderElements();
298+
this.renderComplete();
298299
}
299300
}

controls/barcodegenerator/src/qrcode/qrcode.ts

+1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ export class QRCodeGenerator extends Component<HTMLElement> implements INotifyPr
149149

150150
this.notify('initial-end', {});
151151
this.renderElements();
152+
this.renderComplete();
152153
}
153154

154155
private triggerEvent(eventName: BarcodeEvent, message: string): void {

controls/base/CHANGELOG.md

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

33
## [Unreleased]
44

5+
## 17.2.46 (2019-08-22)
6+
7+
### Common
8+
9+
#### Bug Fixes
10+
11+
- Resolved template Engine support is not working while using Special characters `(@)` in `if` condition.
12+
513
## 17.2.40 (2019-08-06)
614

715
### Common
816

917
#### Bug Fixes
1018

1119
- `#I240696` - Resolved drag issue for actual drag element for scrolled parent element.
20+
- `#I237495` - Fixed template engine support is not working while passing an array of value within the object.
1221

1322
## 17.2.39 (2019-07-30)
1423

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

+22-3
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

+22-3
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/spec/component.spec.ts

+29-3
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class Styler extends Component<HTMLElement> implements INotifyPropertyCha
110110
export class Styler1 extends Styler implements INotifyPropertyChanged {
111111
@Event()
112112
public destroyed: Function;
113-
constructor(fontObj: { size: string, enablePersistence?: boolean, destroyed?: Function}, id?: string | HTMLElement) {
113+
constructor(fontObj: { size: string, enablePersistence?: boolean, destroyed?: Function }, id?: string | HTMLElement) {
114114
super(fontObj, id);
115115
}
116116

@@ -201,7 +201,7 @@ describe('Component', () => {
201201
it('Check wheter changing currencyCode will not trigger threw error on property change', () => {
202202
let elem: HTMLElement = createElement('div', { id: 'myStyleDiv0' });
203203
document.body.appendChild(elem);
204-
let currencyStyler: any = new ObserveComponent('#myStyleDiv0',{});
204+
let currencyStyler: any = new ObserveComponent('#myStyleDiv0', {});
205205
let curSpy: jasmine.Spy = jasmine.createSpy('curChange');
206206
currencyStyler.__proto__.onPropertyChanged = curSpy;
207207
setCurrencyCode('EUR');
@@ -211,7 +211,7 @@ describe('Component', () => {
211211
document.body.innerHTML = '';
212212
setCurrencyCode('USD');
213213
});
214-
214+
215215
it('Injecting dependent modules with required modules', () => {
216216
Styler1.Inject(Touch);
217217
let elem: HTMLElement = createElement('div', { id: 'myStyleDiv0' });
@@ -823,4 +823,30 @@ describe('Component', () => {
823823
expect(spy).toHaveBeenCalled();
824824
});
825825
});
826+
827+
describe('renderComplete method ', () => {
828+
it(' - isRendered property as false', () => {
829+
let obj: any = new Styler();
830+
expect(obj.isRendered).toBe(false);
831+
});
832+
it(' - isRendered property as true after renderComplete call', () => {
833+
let obj: any = new Styler();
834+
delete window['Blazor'];
835+
obj.renderComplete();
836+
expect(obj.isRendered).toBe(true);
837+
});
838+
it(' - wrapper element and blazor testing', () => {
839+
window['Blazor'] = {};
840+
window['ejsInterop'] = {
841+
renderComplete: function (wrapper: any) {
842+
return wrapper;
843+
}
844+
};
845+
let elem: HTMLElement = createElement('div');
846+
let obj: any = new Styler({ size: '10px' }, elem);
847+
let wrapper: HTMLElement = createElement('div');
848+
obj.renderComplete(wrapper);
849+
expect(obj.isRendered).toBe(true);
850+
});
851+
});
826852
});

controls/base/spec/template.spec.ts

+26-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { createElement} from '../src/dom';
77
let arrayOfObj = [
88
{
99
"IDPRATICA": 700,
10+
"@DRNT": 0,
1011
"Giorni": [
1112
{
1213
"Data": "2019-05-01T00:00:00",
@@ -16,6 +17,16 @@ let arrayOfObj = [
1617
"Data": "2019-05-02T00:00:00",
1718
"IDSTATO": 99,
1819
}
20+
],
21+
"@Prior": [
22+
{
23+
"IDTAG": 0,
24+
"Date": "2019-05-02T00:00:00",
25+
},
26+
{
27+
"IDTAG": 10,
28+
"Date": "2019-05-02T00:00:00",
29+
}
1930
]
2031
}
2132
];
@@ -58,12 +69,19 @@ describe('Template', () => {
5869
expect(outDOM(template.compile(templateStr), dsJSONArray)).toEqual(result);
5970
});
6071

61-
it('JSON Array Input With Template Stringn which has special charactor', () => {
72+
it('JSON Array Input With Template String which has special character', () => {
6273
let templateStr: string = '<div>${@ShipCountry}</div>';
6374
let result: Element[] = [];
6475
result.push(createElement('div', { innerHTML: 'France' }));
6576
expect(outDOM(template.compile(templateStr), specialCharValue)).toEqual(result);
6677
});
78+
79+
it('JSON Array Input With IF Condition which has special character', () => {
80+
let templateStr: string = '${if(@DRNT==0)}<div>true</div>${else}<div>false</div>${/if}';
81+
let result: Element[] = [];
82+
result.push(createElement('div', { innerHTML: 'true' }));
83+
expect(outDOM(template.compile(templateStr), arrayOfObj)).toEqual(result);
84+
});
6785

6886
it('JSON Array Input With Template String with array of value within object', () => {
6987
let templateStr: string = '${if(Giorni[0].IDSTATO==99)}<div>true</div>${else}<div>false</div>${/if}';
@@ -72,6 +90,13 @@ describe('Template', () => {
7290
expect(outDOM(template.compile(templateStr), arrayOfObj)).toEqual(result);
7391
});
7492

93+
it('JSON Array Input With IF Condition which has special character with array of value within object', () => {
94+
let templateStr: string = '${if(@Prior[0].IDTAG==0)}<div>true</div>${else}<div>false</div>${/if}';
95+
let result: Element[] = [];
96+
result.push(createElement('div', { innerHTML: 'true' }));
97+
expect(outDOM(template.compile(templateStr), arrayOfObj)).toEqual(result);
98+
});
99+
75100
it('JSON Array Input With two space between class Names', () => {
76101
let templateStr: string = '<div class="class1 class2 class3">${name}</div>';
77102
let result: Element[] = [];
@@ -104,7 +129,6 @@ describe('Template', () => {
104129
expect(outDOM(template.compile(templateStr), dsJSONArray)).toEqual(result);
105130
});
106131

107-
108132
it('JSON Array Input With two space in first class name and multiple space between three class names', () => {
109133
let templateStr: string = '<div class=" class1 class2 class3">${name}</div>';
110134
let result: Element[] = [];

controls/base/src/component-model.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isUndefined, getValue, isNullOrUndefined, setValue, uniqueID } from './util';import { ModuleLoader, ModuleDeclaration } from './module-loader';import { Base } from './base';import { Observer, BoundOptions } from './observer';import { ChildProperty } from './child-property';import { Property, NotifyPropertyChanges } from './notify-property-change';import { onIntlChange, rightToLeft, defaultCulture } from './internationalization';import { createElement, addClass, removeClass } from './dom';
1+
import { isUndefined, getValue, isNullOrUndefined, setValue, uniqueID, isBlazor } from './util';import { ModuleLoader, ModuleDeclaration } from './module-loader';import { Base } from './base';import { Observer, BoundOptions } from './observer';import { ChildProperty } from './child-property';import { Property, NotifyPropertyChanges } from './notify-property-change';import { onIntlChange, rightToLeft, defaultCulture } from './internationalization';import { createElement, addClass, removeClass } from './dom';
22

33
/**
44
* Interface for a class Component

controls/base/src/component.ts

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isUndefined, getValue, isNullOrUndefined, setValue, uniqueID } from './util';
1+
import { isUndefined, getValue, isNullOrUndefined, setValue, uniqueID, isBlazor } from './util';
22
import { ModuleLoader, ModuleDeclaration } from './module-loader';
33
import { Base } from './base';
44
import { Observer, BoundOptions } from './observer';
@@ -52,7 +52,7 @@ export abstract class Component<ElementType extends HTMLElement> extends Base<El
5252
protected requiredModules(): ModuleDeclaration[] {
5353
return [];
5454
};
55-
55+
protected isRendered: boolean = false;
5656
/**
5757
* Destroys the sub modules while destroying the widget
5858
*/
@@ -115,6 +115,18 @@ export abstract class Component<ElementType extends HTMLElement> extends Base<El
115115
}
116116
}
117117

118+
/**
119+
* It is used to process the post rendering functionalities to a component.
120+
*/
121+
protected renderComplete(wrapperElement?: Node): void {
122+
if (isBlazor()) {
123+
let ejsInterop: string = 'ejsInterop';
124+
// tslint:disable-next-line:no-any
125+
(window as any)[ejsInterop].renderComplete(this.element, wrapperElement);
126+
}
127+
this.isRendered = true;
128+
}
129+
118130
/**
119131
* When invoked, applies the pending property changes immediately to the component.
120132
*/

0 commit comments

Comments
 (0)