Skip to content

Commit 89b6d92

Browse files
author
pipeline
committed
v20.4.42 is released
1 parent 4718dd5 commit 89b6d92

File tree

1,520 files changed

+52317
-18471
lines changed

Some content is hidden

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

1,520 files changed

+52317
-18471
lines changed

controls/base/CHANGELOG.md

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

33
## [Unreleased]
44

5+
## 20.4.42 (2023-01-04)
6+
7+
### Common
8+
9+
#### Bug Fixes
10+
11+
- `I427250` - Resolved window undefined in server side rendering with React next JS.
12+
513
## 20.4.38 (2022-12-21)
614

715
### Common

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": "20.4.38",
3+
"version": "20.4.40",
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/intl/date-parser.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ describe('DateParser', () => {
867867
});
868868
it('year only format input returns correct year value',()=>{
869869
let tFormatter: Date = DateParser.dateParser('en', { format:'yy',calendar:'islamic' }, cldrData)('40');
870-
let iFormatter: Date = DateParser.dateParser('en', { format:'y',calendar:'islamic' }, cldrData)('1443');
870+
let iFormatter: Date = DateParser.dateParser('en', { format:'y',calendar:'islamic' }, cldrData)('1444');
871871
expect(iFormatter.getFullYear()).toBe(new Date().getFullYear());
872872
});
873873
it('full skeletom eleton returns proper value',()=>{

controls/base/src/browser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ export class Browser {
146146
*/
147147

148148
private static getValue(key: string, regX: RegExp): Object {
149-
const browserDetails: {} = window.browserDetails;
150-
if (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 && Browser.isTouch === true) {
149+
const browserDetails: {} = typeof window !== 'undefined' ? window.browserDetails : {};
150+
if (typeof navigator !== 'undefined' && navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 && Browser.isTouch === true) {
151151
browserDetails['isIos'] = true;
152152
browserDetails['isDevice'] = true;
153153
browserDetails['isTouch'] = true;

controls/base/src/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ export abstract class Component<ElementType extends HTMLElement> extends Base<El
313313
// tslint:disable-next-line:no-function-constructor-with-string-args
314314
onIntlChange.on('notifyExternalChange', this.detectFunction, this, this.randomId);
315315
// Based on the considered control list we have count the instance
316-
if (!validateLicense()) {
316+
if (typeof window !== "undefined" && typeof document !== "undefined" && !validateLicense()) {
317317
if (componentList.indexOf(this.getModuleName()) !== -1) {
318318
instancecount = instancecount + 1;
319319
if (instancecount > 5) {

controls/buttons/CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,22 @@
22

33
## [Unreleased]
44

5-
## 20.4.40 (2022-12-28)
5+
## 20.4.42 (2023-01-04)
6+
7+
### Checkbox
8+
9+
#### Bug Fixes
10+
11+
- `#I427235` - The issue `cssClass` property not updated properly while string with a white space in the end of the property in checkbox has been fixed.
612

713
### Chips
814

915
#### Bug Fixes
1016

1117
- `#I422262` - Added the aria-disabled attribute to the disabled Chip items.
1218

19+
## 20.4.40 (2022-12-28)
20+
1321
## 20.3.47 (2022-09-29)
1422

1523
### Floating Action Button `Preview`

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": "18.46.0",
3+
"version": "20.4.40",
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/src/button/button.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export class Button extends Component<HTMLButtonElement> implements INotifyPrope
171171

172172
private initialize(): void {
173173
if (this.cssClass) {
174-
addClass([this.element], this.cssClass.split(' '));
174+
addClass([this.element], this.cssClass.replace(/\s+/g, ' ').trim().split(' '));
175175
}
176176
if (this.isPrimary) {
177177
this.element.classList.add(cssClassName.PRIMARY);
@@ -355,7 +355,7 @@ export class Button extends Component<HTMLButtonElement> implements INotifyPrope
355355
removeClass([this.element], oldProp.cssClass.split(' '));
356356
}
357357
if (newProp.cssClass) {
358-
addClass([this.element], newProp.cssClass.split(' '));
358+
addClass([this.element], newProp.cssClass.replace(/\s+/g, ' ').trim().split(' '));
359359
}
360360
break;
361361
case 'enableRtl':

controls/buttons/src/check-box/check-box.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
351351
wrapper.classList.add(RTL);
352352
}
353353
if (this.cssClass) {
354-
addClass([wrapper], this.cssClass.split(' '));
354+
addClass([wrapper], this.cssClass.replace(/\s+/g, ' ').trim().split(' '));
355355
}
356356
wrapper.appendChild(label);
357357
label.appendChild(this.element);
@@ -438,7 +438,7 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
438438
removeClass([wrapper], oldProp.cssClass.split(' '));
439439
}
440440
if (newProp.cssClass) {
441-
addClass([wrapper], newProp.cssClass.split(' '));
441+
addClass([wrapper], newProp.cssClass.replace(/\s+/g, ' ').trim().split(' '));
442442
}
443443
break;
444444
case 'enableRtl':

controls/buttons/src/chips/chip-list.ts

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ export class ChipList extends Component<HTMLElement> implements INotifyPropertyC
451451

452452
private setAttributes(): void {
453453
if (this.type === 'chip') {
454-
this.enabled ? this.element.tabIndex = 0 : this.element.setAttribute('aria-disabled', 'true');
454+
if(this.enabled) this.element.tabIndex = 0;
455455
this.element.setAttribute('role', 'option');
456456
} else {
457457
this.element.classList.add(classNames.chipSet);
@@ -497,8 +497,10 @@ export class ChipList extends Component<HTMLElement> implements INotifyPropertyC
497497
if (fieldsData.value) {
498498
wrapper.setAttribute('data-value', fieldsData.value.toString());
499499
}
500-
if (!fieldsData.enabled) {
500+
if (fieldsData.enabled) { wrapper.setAttribute('aria-disabled', 'false'); }
501+
else {
501502
wrapper.removeAttribute('tabindex');
503+
wrapper.setAttribute('aria-disabled', 'true');
502504
}
503505
append(chipArray, wrapper);
504506
chipListArray.push(wrapper);
@@ -570,9 +572,11 @@ export class ChipList extends Component<HTMLElement> implements INotifyPropertyC
570572
/**
571573
* A function that finds chip based on given input.
572574
*
573-
* @param {number | HTMLElement } fields - We can pass index number or element of chip.
574575
* {% codeBlock src='chips/find/index.md' %}{% endcodeBlock %}
575576
*
577+
* @param {number | HTMLElement } fields - We can pass index number or element of chip.
578+
*
579+
* @returns {void}
576580
*/
577581

578582
public find(fields: number | HTMLElement): ChipDataArgs {
@@ -595,10 +599,12 @@ export class ChipList extends Component<HTMLElement> implements INotifyPropertyC
595599
/**
596600
* Allows adding the chip item(s) by passing a single or array of string, number, or ChipModel values.
597601
*
602+
* {% codeBlock src='chips/add/index.md' %}{% endcodeBlock %}
603+
*
598604
* @param {string[] | number[] | ChipModel[] | string | number | ChipModel} chipsData - We can pass array of string or
599605
* array of number or array of chip model or string data or number data or chip model.
600-
* {% codeBlock src='chips/add/index.md' %}{% endcodeBlock %}
601606
*
607+
* @returns {void}
602608
* @deprecated
603609
*/
604610

@@ -614,10 +620,12 @@ export class ChipList extends Component<HTMLElement> implements INotifyPropertyC
614620
/**
615621
* Allows selecting the chip item(s) by passing a single or array of string, number, or ChipModel values.
616622
*
623+
* {% codeBlock src='chips/select/index.md' %}{% endcodeBlock %}
624+
*
617625
* @param {number | number[] | HTMLElement | HTMLElement[]} fields - We can pass number or array of number
618626
* or chip element or array of chip element.
619-
* {% codeBlock src='chips/select/index.md' %}{% endcodeBlock %}
620627
*
628+
* @returns {void}
621629
*/
622630

623631
public select(fields: number | number[] | HTMLElement | HTMLElement[] | string[], selectionType?: selectionType): void {
@@ -686,10 +694,12 @@ export class ChipList extends Component<HTMLElement> implements INotifyPropertyC
686694
/**
687695
* Allows removing the chip item(s) by passing a single or array of string, number, or ChipModel values.
688696
*
697+
* {% codeBlock src='chips/remove/index.md' %}{% endcodeBlock %}
698+
*
689699
* @param {number | number[] | HTMLElement | HTMLElement[]} fields - We can pass number or array of number
690700
* or chip element or array of chip element.
691-
* {% codeBlock src='chips/remove/index.md' %}{% endcodeBlock %}
692701
*
702+
* @returns {void}
693703
*/
694704

695705
public remove(fields: number | number[] | HTMLElement | HTMLElement[]): void {
@@ -714,8 +724,10 @@ export class ChipList extends Component<HTMLElement> implements INotifyPropertyC
714724

715725
/**
716726
* Returns the selected chip(s) data.
727+
*
717728
* {% codeBlock src='chips/getSelectedChips/index.md' %}{% endcodeBlock %}
718729
*
730+
* @returns {void}
719731
*/
720732

721733
public getSelectedChips(): SelectedItem | SelectedItems {
@@ -906,8 +918,10 @@ export class ChipList extends Component<HTMLElement> implements INotifyPropertyC
906918

907919
/**
908920
* Removes the component from the DOM and detaches all its related event handlers. Also, it removes the attributes and classes.
921+
*
909922
* {% codeBlock src='chips/destroy/index.md' %}{% endcodeBlock %}
910923
*
924+
* @returns {void}
911925
*/
912926

913927
public destroy(): void {

0 commit comments

Comments
 (0)