Skip to content

Commit 542c538

Browse files
author
pipeline
committed
v24.1.41 is released
1 parent 4903766 commit 542c538

File tree

1,329 files changed

+126827
-38060
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,329 files changed

+126827
-38060
lines changed

controls/barcodegenerator/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 23.2.7 (2023-12-05)
5+
## 24.1.41 (2023-12-18)
66

77
### Barcode
88

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": "23.2.6",
3+
"version": "18.92.0",
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/number-parser.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ describe('numberParser', () => {
276276
});
277277
});
278278
});
279-
describe('Currency filtering ,changeCurrencySymbol function', () => {
279+
describe('Currency filtering ,changeCurrencySymbon function', () => {
280280
it('negative currency filtering for format -#,##0.00 ¤', () => {
281281
let result: string = IntlBase.changeCurrencySymbol(" $","");
282282
expect(result).toBe("")

controls/base/spec/santize-helper.spec.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,12 @@ describe('Sanitize Html Helper', () => {
9797
detach(htmlObject);
9898
});
9999
})
100-
100+
101101
describe('Handle file name when using more then one & sign : ', () => {
102102
var value='Test & Test & Test.jpg'
103103
var newValue: string = SanitizeHtmlHelper.sanitize(value);
104104
it('check the input and output appears same', () => {
105105
expect(newValue).toBe(value);
106106
});
107107
})
108-
109108
});

controls/base/src/intl/date-parser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ export class DateParser {
369369
// eslint-disable-next-line
370370
matchString = ((prop === 'month') && (!(<any>parseOptions).isIslamic) && ((<any>parseOptions).culture === 'en' || (<any>parseOptions).culture === 'en-GB' || (<any>parseOptions).culture === 'en-US'))
371371
? matchString[0].toUpperCase() + matchString.substring(1).toLowerCase() : matchString;
372-
matchString = ((prop !== 'month') && (prop === 'designator') && (<any>parseOptions).culture === 'en-GB') ? matchString.toLowerCase() : matchString;
372+
matchString = ((prop !== 'month') && (prop === 'designator') && (<any>parseOptions).culture === 'en-GB') ? matchString.toLowerCase() : matchString;
373373
// eslint-disable-next-line
374374
(<any>retOptions)[prop] = (<any>parseOptions)[prop][matchString];
375375
}

controls/base/src/intl/intl-base.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ export namespace IntlBase {
864864
*/
865865
export function changeCurrencySymbol(val: string, sym: string): string {
866866
if (val) {
867-
val = val.replace(defaultCurrency, sym);
867+
val = val.replace(IntlBase.defaultCurrency, sym);
868868
return (sym === '')? val.trim() : val;
869869
}
870870
return '';

controls/base/src/sanitize-helper.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export class SanitizeHtmlHelper {
167167
this.removeXssAttrs();
168168
const tempEleValue: string = this.wrapElement.innerHTML;
169169
this.removeElement();
170-
return tempEleValue.replace(/&amp;/g, '&');
170+
return tempEleValue.replace(/&amp;/g, '&');
171171
}
172172

173173
private static removeElement(): void {

controls/base/src/validate-lic.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let accountURL: string;
1414
class LicenseValidator {
1515
private isValidated: boolean = false;
1616
public isLicensed: boolean = true;
17-
public version: string = '23';
17+
public version: string = '24';
1818
public platform: RegExp = /JavaScript|ASPNET|ASPNETCORE|ASPNETMVC|FileFormats|essentialstudio/i;
1919
private errors: IErrorType = {
2020
noLicense: '<span>This application was built using a trial version of Syncfusion Essential Studio.' +
@@ -114,7 +114,7 @@ class LicenseValidator {
114114
}
115115
}
116116
if (validateMsg && typeof document !== 'undefined' && !isNullOrUndefined(document)) {
117-
accountURL = (validateURL && validateURL !== '')? validateURL : "https://www.syncfusion.com/account/claim-license-key?pl=SmF2YVNjcmlwdA==&vs=MjM=&utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information";
117+
accountURL = (validateURL && validateURL !== '')? validateURL : "https://www.syncfusion.com/account/claim-license-key?pl=SmF2YVNjcmlwdA==&vs=MjQ=&utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information";
118118
const errorDiv: HTMLElement = createElement('div', {
119119
innerHTML: `<img src='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE5OV80KSI+CjxwYXRoIGQ9Ik0xMiAyMUMxNi45NzA2IDIxIDIxIDE2Ljk3MDYgMjEgMTJDMjEgNy4wMjk0NCAxNi45NzA2IDMgMTIgM0M3LjAyOTQ0IDMgMyA3LjAyOTQ0IDMgMTJDMyAxNi45NzA2IDcuMDI5NDQgMjEgMTIgMjFaIiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBmaWxsPSIjNjE2MDYzIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS44MTI1IDlDMTIuNDMzOCA5IDEyLjkzNzUgOC40OTYzMiAxMi45Mzc1IDcuODc1QzEyLjkzNzUgNy4yNTM2OCAxMi40MzM4IDYuNzUgMTEuODEyNSA2Ljc1QzExLjE5MTIgNi43NSAxMC42ODc1IDcuMjUzNjggMTAuNjg3NSA3Ljg3NUMxMC42ODc1IDguNDk2MzIgMTEuMTkxMiA5IDExLjgxMjUgOVoiIGZpbGw9IiM3MzczNzMiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xOTlfNCI+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K' style="top: 6px;
120120
position: absolute;

controls/buttons/CHANGELOG.md

+1-17
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,32 @@
22

33
## [Unreleased]
44

5-
## 23.2.7 (2023-12-05)
6-
7-
### Chip
8-
9-
#### Bug Fixes
10-
11-
- `#I525416` - The issue when updating the `chips` property when multiple chip component rendered in the page has been resolved.
12-
13-
## 23.1.43 (2023-10-31)
5+
## 24.1.41 (2023-12-18)
146

157
### RadioButton
168

179
#### Bug Fixes
1810

1911
- `#F513731` - The issue with "`HtmlAttributes` property not working properly in RadioButton component" has been resolved.
2012

21-
## 23.1.42 (2023-10-24)
22-
2313
### Button
2414

2515
#### Bug Fixes
2616

2717
- `#I512179` - The issue with "Duplicate Icon Span while using the `onPropertyChange` of button" has been resolved.
2818

29-
## 23.1.41 (2023-10-17)
30-
3119
### Checkbox
3220

3321
#### Bug Fixes
3422

3523
- `#I509029` - The issue with "`HtmlAttributes` property not working properly in checkBox component" has been resolved.
3624

37-
## 23.1.39 (2023-10-04)
38-
3925
### Checkbox
4026

4127
#### Bug Fixes
4228

4329
- `#I505814` - The issue with "Script error thrown in CheckBox While using the change event in React" has been resolved.
4430

45-
## 23.1.36 (2023-09-15)
46-
4731
### Checkbox
4832

4933
#### Bug Fixes

controls/buttons/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-buttons",
3-
"version": "23.2.4",
3+
"version": "18.64.1",
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/spec/check-box.spec.ts

+6
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,12 @@ describe('CheckBox', () => {
541541
expect(element.parentElement.children[1].classList.contains('e-stop')).toEqual(false);
542542
expect(element.parentElement.children[1].classList.contains('e-check')).toEqual(false);
543543
});
544+
545+
it('HtmlAttributes property not working properly in CheckBox', () => {
546+
checkbox = new CheckBox({htmlAttributes: { 'data-containerid': 'error-agreement', 'test': 'test' }}, '#checkbox');
547+
expect(element.parentElement.parentElement.getAttribute("data-containerid").indexOf("error-agreement")).toEqual(0);
548+
expect(element.parentElement.parentElement.getAttribute("test").indexOf("test")).toEqual(0);
549+
});
544550

545551
});
546552

controls/buttons/spec/radio-button.spec.ts

+9
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,15 @@ describe('RadioButton', () => {
307307
radio.click();
308308
radio.focusIn();
309309
});
310+
it('Refresh methods ', () => {
311+
document.body.appendChild(createElement('input', { id: 'group1', attrs: { 'type': 'radio' } }));
312+
document.body.appendChild(createElement('input', { id: 'group2', attrs: { 'type': 'radio' } }));
313+
radio = new RadioButton({ name: 'group', value: '1' }, '#group1');
314+
const radio2: RadioButton = new RadioButton({ name: 'group', value: '2' }, '#group2');
315+
radio.refresh();
316+
radio2.refresh();
317+
});
318+
310319
it('HtmlAttributes property not working properly in RadioButton', () => {
311320
radio = new RadioButton({htmlAttributes: { 'data-containerid': 'error-agreement', 'test': 'test' }}, '#radio');
312321
expect(radio.element.parentElement.getAttribute('data-containerid').indexOf('error-agreement')).toEqual(0);

controls/buttons/spec/speed-dial.spec.ts

+48-2
Original file line numberDiff line numberDiff line change
@@ -1187,14 +1187,19 @@ describe('Floating Action Button', () => {
11871187
});
11881188
describe('Keyboard Actions', () => {
11891189
let speedDial: SpeedDial;
1190-
let speedDialEle: HTMLElement
1191-
let tarEle: HTMLElement
1190+
let speedDial1: SpeedDial;
1191+
let speedDialEle: HTMLElement;
1192+
let speedDialEle1: HTMLElement;
1193+
let tarEle: HTMLElement;
11921194
let keyboardEventArgs: any;
1195+
let keyboardEventArgs1: any;
11931196

11941197
beforeAll(() => {
11951198
SpeedDial.Inject(SpeedDial);
11961199
speedDialEle = createElement('button', { id: 'speedDial' });
11971200
document.body.appendChild(speedDialEle);
1201+
speedDialEle1 = createElement('button', { id: 'speedDial1' });
1202+
document.body.appendChild(speedDialEle1);
11981203
tarEle = createElement('div', { id: 'speedDialtarget', styles: "margin:10px;border:1px solid red; height:400px; width:400px; position: relative;" });
11991204
document.body.appendChild(tarEle);
12001205

@@ -1204,15 +1209,28 @@ describe('Floating Action Button', () => {
12041209
target: speedDialEle,
12051210
stopImmediatePropagation: (): void => { },
12061211
};
1212+
1213+
keyboardEventArgs1 = {
1214+
preventDefault: (): void => { },
1215+
action: null,
1216+
target: null,
1217+
stopImmediatePropagation: (): void => { },
1218+
};
1219+
12071220
})
12081221
afterEach(() => {
12091222
if (speedDial) {
12101223
speedDial.destroy();
12111224
speedDial = undefined;
12121225
}
1226+
if (speedDial1) {
1227+
speedDial1.destroy();
1228+
speedDial1 = undefined;
1229+
}
12131230
});
12141231
afterAll(() => {
12151232
remove(speedDialEle);
1233+
remove(speedDialEle1);
12161234
remove(tarEle);
12171235
});
12181236
it('Enter Key', () => {
@@ -1238,6 +1256,34 @@ describe('Floating Action Button', () => {
12381256
expect(isClicked).toBe(true);
12391257
expect(popupEle.classList.contains("e-speeddial-hidden")).toBe(true);
12401258
});
1259+
it('Switching between two speedDial', () => {
1260+
speedDial = new SpeedDial({
1261+
items: data, openIconCss: "open-icon", position: "TopLeft", target: "#speedDialtarget", animation: NoAnimation
1262+
});
1263+
speedDial.appendTo('#speedDial');
1264+
speedDial1 = new SpeedDial({
1265+
items: data, openIconCss: "open-icon", position: "TopCenter", target: "#speedDialtarget", animation: NoAnimation
1266+
});
1267+
speedDial1.appendTo('#speedDial1');
1268+
let popupEle = (speedDial as any).popupEle;
1269+
expect(popupEle.classList.contains("e-speeddial-hidden")).toBe(true);
1270+
let popupEle1 = (speedDial1 as any).popupEle;
1271+
expect(popupEle1.classList.contains("e-speeddial-hidden")).toBe(true);
1272+
keyboardEventArgs1.action = 'enter';
1273+
(speedDial as any).popupKeyActionHandler(keyboardEventArgs1);
1274+
(speedDial1 as any).popupKeyActionHandler(keyboardEventArgs1);
1275+
(speedDial as any).keyActionHandler(keyboardEventArgs1);
1276+
expect(popupEle.classList.contains("e-speeddial-hidden")).toBe(false);
1277+
expect(popupEle1.classList.contains("e-speeddial-hidden")).toBe(true);
1278+
(speedDial as any).popupKeyActionHandler(keyboardEventArgs1);
1279+
(speedDial1 as any).popupKeyActionHandler(keyboardEventArgs1);
1280+
(speedDial1 as any).keyActionHandler(keyboardEventArgs1);
1281+
expect(popupEle.classList.contains("e-speeddial-hidden")).toBe(true);
1282+
expect(popupEle1.classList.contains("e-speeddial-hidden")).toBe(false);
1283+
(speedDial1 as any).keyActionHandler(keyboardEventArgs1);
1284+
expect(popupEle.classList.contains("e-speeddial-hidden")).toBe(true);
1285+
expect(popupEle1.classList.contains("e-speeddial-hidden")).toBe(true);
1286+
});
12411287
it('esc Key', () => {
12421288
speedDial = new SpeedDial({ items: data, position: "TopLeft", target: "#speedDialtarget", animation: NoAnimation });
12431289
speedDial.appendTo('#speedDial');

controls/buttons/spec/switch.spec.ts

+4
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,10 @@ describe('Switch', () => {
380380
specSwitch.click();
381381
specSwitch.focusIn();
382382
});
383+
it('Refresh methods', () => {
384+
specSwitch = new Switch({}, '#specSwitch');
385+
specSwitch.refresh();
386+
});
383387
});
384388

385389
describe('Switch in HTML5 forms', () => {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';import { EmitType, Event, EventHandler, isNullOrUndefined, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { addClass, detach, getUniqueID, isRippleEnabled, removeClass, rippleEffect, closest } from '@syncfusion/ej2-base';import { wrapperInitialize, rippleMouseHandler, ChangeEventArgs, setHiddenInput } from './../common/common';
1+
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, Property, setValue } from '@syncfusion/ej2-base';import { EmitType, Event, EventHandler, isNullOrUndefined, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { addClass, detach, getUniqueID, isRippleEnabled, removeClass, rippleEffect, closest } from '@syncfusion/ej2-base';import { wrapperInitialize, rippleMouseHandler, ChangeEventArgs, setHiddenInput } from './../common/common';
22
import {LabelPosition} from "./check-box";
33
import {ComponentModel} from '@syncfusion/ej2-base';
44

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

+30-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';
1+
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, Property, setValue } from '@syncfusion/ej2-base';
22
import { EmitType, Event, EventHandler, isNullOrUndefined, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
33
import { addClass, detach, getUniqueID, isRippleEnabled, removeClass, rippleEffect, closest } from '@syncfusion/ej2-base';
44
import { CheckBoxModel } from './check-box-model';
@@ -279,6 +279,13 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
279279
wrapper.removeAttribute(key);
280280
});
281281
wrapper.innerHTML = '';
282+
this.element = wrapper as HTMLInputElement;
283+
if (this.refreshing) {
284+
['e-control', 'e-checkbox', 'e-lib'].forEach((key: string) => {
285+
this.element.classList.add(key);
286+
});
287+
setValue('ej2_instances', [this], this.element);
288+
}
282289
}
283290
}
284291
}
@@ -323,6 +330,14 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
323330
}
324331
}
325332

333+
private getLabel(): Element {
334+
if (this.element) {
335+
return this.element.parentElement;
336+
} else {
337+
return null;
338+
}
339+
}
340+
326341
private initialize(): void {
327342
if (isNullOrUndefined(this.initialCheckedValue)) {
328343
this.initialCheckedValue = this.checked;
@@ -394,6 +409,17 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
394409
rippleMouseHandler(e, rippleSpan);
395410
}
396411

412+
private labelMouseLeaveHandler(e: MouseEvent): void {
413+
const rippleSpan: Element = this.getLabel().getElementsByClassName(RIPPLE)[0];
414+
if (rippleSpan) {
415+
const rippleElem: NodeListOf<Element> = rippleSpan.querySelectorAll('.e-ripple-element');
416+
for (let i: number = rippleElem.length - 1; i > 0; i--) {
417+
rippleSpan.removeChild(rippleSpan.childNodes[i as number]);
418+
}
419+
rippleMouseHandler(e, rippleSpan);
420+
}
421+
}
422+
397423
private labelMouseUpHandler(e: MouseEvent): void {
398424
this.isMouseClick = true;
399425
const rippleSpan: Element = this.getWrapper().getElementsByClassName(RIPPLE)[0];
@@ -571,6 +597,7 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
571597
const label: Element = wrapper.getElementsByTagName('label')[0];
572598
EventHandler.remove(label, 'mousedown', this.labelMouseDownHandler);
573599
EventHandler.remove(label, 'mouseup', this.labelMouseUpHandler);
600+
EventHandler.remove(label, 'mouseleave', this.labelMouseLeaveHandler);
574601
const formElem: HTMLFormElement = <HTMLFormElement>closest(this.element, 'form');
575602
if (formElem) {
576603
EventHandler.remove(formElem, 'reset', this.formResetHandler);
@@ -590,6 +617,7 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
590617
const label: Element = wrapper.getElementsByTagName('label')[0];
591618
EventHandler.add(label, 'mousedown', this.labelMouseDownHandler, this);
592619
EventHandler.add(label, 'mouseup', this.labelMouseUpHandler, this);
620+
EventHandler.add(label, 'mouseleave', this.labelMouseLeaveHandler, this);
593621
const formElem: HTMLFormElement = <HTMLFormElement>closest(this.element, 'form');
594622
if (formElem) {
595623
EventHandler.add(formElem, 'reset', this.formResetHandler, this);
@@ -649,8 +677,7 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
649677
else {
650678
this.element.setAttribute(key, this.htmlAttributes[`${key}`]);
651679
}
652-
}
653-
else {
680+
} else {
654681
wrapper.setAttribute(key, this.htmlAttributes[`${key}`]);
655682
}
656683
}

controls/buttons/src/common/common.ts

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export function destroy(ejInst: Switch | CheckBox, wrapper: Element, tagName: st
7878
wrapper.removeAttribute(key);
7979
});
8080
wrapper.innerHTML = '';
81+
ejInst.element = wrapper as HTMLInputElement;
8182
}
8283
}
8384

controls/buttons/src/radio-button/radio-button-model.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, INotifyPropertyChanged, rippleEffect, NotifyPropertyChanges, Property, closest } from '@syncfusion/ej2-base';import { addClass, getInstance, getUniqueID, isRippleEnabled, removeClass, attributes, isNullOrUndefined } from '@syncfusion/ej2-base';import { BaseEventArgs, detach, EmitType, Event, EventHandler, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { wrapperInitialize, rippleMouseHandler } from './../common/common';
1+
import { Component, INotifyPropertyChanged, rippleEffect, NotifyPropertyChanges, Property, closest, setValue } from '@syncfusion/ej2-base';import { addClass, getInstance, getUniqueID, isRippleEnabled, removeClass, attributes, isNullOrUndefined } from '@syncfusion/ej2-base';import { BaseEventArgs, detach, EmitType, Event, EventHandler, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { wrapperInitialize, rippleMouseHandler } from './../common/common';
22
import {ChangeArgs,RadioLabelPosition} from "./radio-button";
33
import {ComponentModel} from '@syncfusion/ej2-base';
44

0 commit comments

Comments
 (0)