Skip to content

Commit a9c200a

Browse files
author
pipeline
committed
v16.4.42 is released
1 parent fe166e3 commit a9c200a

File tree

171 files changed

+1127
-243
lines changed

Some content is hidden

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

171 files changed

+1127
-243
lines changed

components/base/CHANGELOG.md

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

33
## [Unreleased]
44

5+
## 16.4.42 (2018-12-10)
6+
7+
### Common
8+
9+
#### Bug Fixes
10+
11+
- Fixed ng-dirty class adding issue when patching object value to control.
12+
513
## 16.3.17 (2018-09-12)
614

715
### Common

components/base/dist/ej2-angular-base.umd.min.js

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

components/base/dist/ej2-angular-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.

components/base/dist/es6/ej2-angular-base.es2015.js

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

components/base/dist/es6/ej2-angular-base.es2015.js.map

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

components/base/dist/es6/ej2-angular-base.es5.js

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

components/base/dist/es6/ej2-angular-base.es5.js.map

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

components/base/dist/global/ej2-angular-base.min.js

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

components/base/dist/global/ej2-angular-base.min.js.map

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

components/base/package.json

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

components/base/spec/form-base.spec.ts

+10
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,16 @@ describe('Form Base Coverage Test', () => {
140140
formCmpt.writeValue(formCmpt.value);
141141
expect(formCmpt.angularValue).toBe('name');
142142
});
143+
it("checking value type, if obj type do stringify", () => {
144+
let formCmpt: FormBase<any> = new FormBase();
145+
formCmpt.value = { value: { check: 'hello' } };
146+
formCmpt.writeValue(formCmpt.value);
147+
formCmpt.localChange(formCmpt.value);
148+
let check = formCmpt.objCheck;
149+
let stringy = JSON.stringify(formCmpt.value.value);
150+
expect(check).toBe(true);
151+
expect(stringy).toBe(formCmpt.duplicateValue);
152+
});
143153
it("test for setDisableState", () => {
144154
let formCmpt: FormBase<any> = new FormBase();
145155
formCmpt.setDisabledState(true);

components/base/src/form-base.ts

+19-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { EventEmitter, ElementRef } from '@angular/core';
2-
import { getValue, setValue, isNullOrUndefined } from '@syncfusion/ej2-base';
2+
import { getValue, setValue, isNullOrUndefined, isObject } from '@syncfusion/ej2-base';
33
import { ControlValueAccessor } from '@angular/forms';
44
/**
55
* Angular Form Base Module
@@ -13,6 +13,9 @@ export class FormBase<T> implements ControlValueAccessor {
1313
public propagateTouch(): void { return; }
1414
public enabled: Object;
1515
public angularValue: T;
16+
public objCheck: Boolean;
17+
public duplicateValue: string;
18+
public duplicateAngularValue: string;
1619

1720
public element: HTMLElement;
1821
public inputElement: HTMLInputElement;
@@ -24,10 +27,21 @@ export class FormBase<T> implements ControlValueAccessor {
2427

2528
public localChange(e: { value?: T, checked?: T }): void {
2629
let value: T = (e.checked === undefined ? e.value : e.checked);
27-
if (value !== this.angularValue && this.propagateChange !== undefined && value !== undefined) {
28-
// Update angular from our control
29-
this.propagateChange(value);
30-
this.angularValue = value;
30+
this.objCheck = isObject(value);
31+
if (this.objCheck === true) {
32+
this.duplicateValue = JSON.stringify(value);
33+
this.duplicateAngularValue = JSON.stringify(this.angularValue);
34+
if (this.duplicateValue !== this.duplicateAngularValue && this.propagateChange !== undefined && value !== undefined) {
35+
// Update angular from our control
36+
this.propagateChange(value);
37+
this.angularValue = value;
38+
}
39+
} else {
40+
if (value !== this.angularValue && this.propagateChange !== undefined && value !== undefined) {
41+
// Update angular from our control
42+
this.propagateChange(value);
43+
this.angularValue = value;
44+
}
3145
}
3246
}
3347

components/buttons/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-angular-buttons",
3-
"version": "16.2.41",
3+
"version": "16.4.40",
44
"description": "A package of feature-rich Essential JS 2 components such as Button, CheckBox, RadioButton and Switch. for Angular",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Rule } from '@angular-devkit/schematics';
2+
import { componentBuilder } from "@syncfusion/ej2-angular-base/schematics";
3+
import { Schema } from './schema';
4+
import * as sampleDetails from './sample-details';
5+
6+
export default function (options: Schema): Rule {
7+
return componentBuilder(options, sampleDetails);
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const componentName: string = 'button';
2+
export const sampleName: string = 'default';
3+
export const diModules: string = null;
4+
export const packageName: string = '@syncfusion/ej2-angular-buttons';
5+
export const libModules: string = 'ButtonModule';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { Component, ViewChild } from '@angular/core';
2+
import { ButtonComponent } from '@syncfusion/ej2-angular-buttons';
3+
/**
4+
* Default Button Controller
5+
*/
6+
@Component({
7+
selector: '<%=dasherize(selector)%>',
8+
templateUrl: '<%=dasherize(name)%>.component.html',
9+
styleUrls: ['<%=dasherize(name)%>.component.css']
10+
})
11+
12+
export class <%= classify(name) %>Component {
13+
@ViewChild('toggleBtn')
14+
public toggleBtn: ButtonComponent;
15+
16+
// Toggle button click event handler
17+
private btnClick(): void {
18+
if (this.toggleBtn.element.classList.contains('e-active')) {
19+
this.toggleBtn.content = 'Play';
20+
this.toggleBtn.iconCss = 'e-btn-sb-icons e-play-icon';
21+
} else {
22+
this.toggleBtn.content = 'Pause';
23+
this.toggleBtn.iconCss = 'e-btn-sb-icons e-pause-icon';
24+
}
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { Schema as ComponentSchema } from '@schematics/angular/component/schema';
2+
3+
export interface Schema extends ComponentSchema { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Rule } from '@angular-devkit/schematics';
2+
import { componentBuilder } from "@syncfusion/ej2-angular-base/schematics";
3+
import { Schema } from './schema';
4+
import * as sampleDetails from './sample-details';
5+
6+
export default function (options: Schema): Rule {
7+
return componentBuilder(options, sampleDetails);
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const componentName: string = 'checkbox';
2+
export const sampleName: string = 'default';
3+
export const diModules: string = null;
4+
export const packageName: string = '@syncfusion/ej2-angular-buttons';
5+
export const libModules: string = 'CheckBoxModule';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { Component, ViewChild } from '@angular/core';
2+
import { CheckBoxComponent } from '@syncfusion/ej2-angular-buttons';
3+
4+
/**
5+
* CheckBox Controller
6+
*/
7+
@Component({
8+
selector: '<%=dasherize(selector)%>',
9+
templateUrl: '<%=dasherize(name)%>.component.html',
10+
styleUrls: ['<%=dasherize(name)%>.component.css']
11+
})
12+
13+
export class <%= classify(name) %>Component {
14+
@ViewChild('checkbox')
15+
public checkbox: CheckBoxComponent;
16+
17+
// function to handle the CheckBox change event
18+
public changeHandler(): void {
19+
this.checkbox.label = 'CheckBox: ' + this.checkbox.checked;
20+
}
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { Schema as ComponentSchema } from '@schematics/angular/component/schema';
2+
3+
export interface Schema extends ComponentSchema { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Rule } from '@angular-devkit/schematics';
2+
import { componentBuilder } from "@syncfusion/ej2-angular-base/schematics";
3+
import { Schema } from './schema';
4+
import * as sampleDetails from './sample-details';
5+
6+
export default function (options: Schema): Rule {
7+
return componentBuilder(options, sampleDetails);
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const componentName: string = 'radiobutton';
2+
export const sampleName: string = 'default';
3+
export const diModules: string = null;
4+
export const packageName: string = '@syncfusion/ej2-angular-buttons';
5+
export const libModules: string = 'RadioButtonModule';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component } from '@angular/core';
2+
3+
4+
/**
5+
* CheckBox Controller
6+
*/
7+
@Component({
8+
selector: '<%=dasherize(selector)%>',
9+
templateUrl: '<%=dasherize(name)%>.component.html',
10+
styleUrls: ['<%=dasherize(name)%>.component.css']
11+
})
12+
13+
export class <%= classify(name) %>Component {
14+
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { Schema as ComponentSchema } from '@schematics/angular/component/schema';
2+
3+
export interface Schema extends ComponentSchema { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Rule } from '@angular-devkit/schematics';
2+
import { componentBuilder } from "@syncfusion/ej2-angular-base/schematics";
3+
import { Schema } from './schema';
4+
import * as sampleDetails from './sample-details';
5+
6+
export default function (options: Schema): Rule {
7+
return componentBuilder(options, sampleDetails);
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const componentName: string = 'switch';
2+
export const sampleName: string = 'default';
3+
export const diModules: string = null;
4+
export const packageName: string = '@syncfusion/ej2-angular-buttons';
5+
export const libModules: string = 'SwitchModule';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { Component, ViewChild } from '@angular/core';
2+
import { SwitchComponent } from '@syncfusion/ej2-angular-buttons';
3+
import { rippleMouseHandler } from '@syncfusion/ej2-buttons';
4+
5+
/**
6+
* CheckBox Controller
7+
*/
8+
@Component({
9+
selector: '<%=dasherize(selector)%>',
10+
templateUrl: '<%=dasherize(name)%>.component.html',
11+
styleUrls: ['<%=dasherize(name)%>.component.css']
12+
})
13+
14+
export class <%= classify(name) %>Component {
15+
@ViewChild('switch')
16+
public switch: SwitchComponent;
17+
18+
public ngOnInit(): void {
19+
let elemArray: NodeListOf<Element> = document.querySelectorAll('.switch-control label');
20+
for (let i: number = 0, len: number = elemArray.length; i < len; i++) {
21+
elemArray[i].addEventListener('mouseup', rippleHandler);
22+
elemArray[i].addEventListener('mousedown', rippleHandler);
23+
}
24+
}
25+
}
26+
27+
function rippleHandler(e: MouseEvent): void {
28+
let rippleSpan: Element = this.nextElementSibling.querySelector('.e-ripple-container');
29+
if (rippleSpan) {
30+
rippleMouseHandler(e, rippleSpan);
31+
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { Schema as ComponentSchema } from '@schematics/angular/component/schema';
2+
3+
export interface Schema extends ComponentSchema { }
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export const pkgName = '@syncfusion/ej2-angular-buttons';
2-
export const pkgVer = '^16.2.41';
2+
export const pkgVer = '^16.4.40';
33
export const moduleName = 'ButtonModule, CheckBoxModule, RadioButtonModule, SwitchModule, ChipListModule';
4-
export const themeVer = '~16.2.41';
4+
export const themeVer = '~16.4.40';

components/buttons/src/chips/chips.directive.ts

+7
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,37 @@ export class ChipDirective extends ComplexBase<ChipDirective> {
2929

3030
/**
3131
* This avatarIconCss property helps to customize avatar element.
32+
* @default ''
3233
*/
3334
public avatarIconCss: any;
3435
/**
3536
* This avatarText property helps to customize avatar content.
37+
* @default ''
3638
*/
3739
public avatarText: any;
3840
/**
3941
* This cssClass property helps to customize ChipList component.
42+
* @default ''
4043
*/
4144
public cssClass: any;
4245
/**
4346
* This enabled property helps to enable/disable ChipList component.
47+
* @default true
4448
*/
4549
public enabled: any;
4650
/**
4751
* This leadingIconCss property helps to customize leading icon element.
52+
* @default ''
4853
*/
4954
public leadingIconCss: any;
5055
/**
5156
* This text property helps to render ChipList component.
57+
* @default ''
5258
*/
5359
public text: any;
5460
/**
5561
* This trailingIconCss property helps to customize trailing icon element.
62+
* @default ''
5663
*/
5764
public trailingIconCss: any;
5865

0 commit comments

Comments
 (0)