Skip to content

Commit 1ab03cb

Browse files
author
pipeline
committed
v25.1.35 is released
1 parent 878cdef commit 1ab03cb

File tree

1,356 files changed

+114720
-37758
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,356 files changed

+114720
-37758
lines changed

Diff for: controls/barcodegenerator/CHANGELOG.md

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

33
## [Unreleased]
44

5-
## 24.2.9 (2024-03-06)
5+
## 25.1.35 (2024-03-15)
66

77
### Barcode
88

Diff for: controls/buttons/CHANGELOG.md

+1-27
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,14 @@
22

33
## [Unreleased]
44

5-
## 24.2.9 (2024-03-06)
6-
7-
### Button
8-
9-
#### Bug Fixes
10-
11-
- `#I551397` - The issue with "Tailwind theme when changing the primary text color in the button the text color is not changed" has been resolved.
12-
13-
## 24.2.3 (2024-01-31)
14-
15-
### Switch
16-
17-
#### Bug Fixes
18-
19-
- `#I547814` - The issue with "Script error thrown when using toggle in angular platform" has been resolved.
20-
21-
## 24.1.46 (2024-01-17)
5+
## 25.1.35 (2024-03-15)
226

237
### Checkbox
248

259
#### Bug Fixes
2610

2711
- `#I535107` - Need to set `HtmlAttributes` Id in input element checkbox has been resolved.
2812

29-
## 24.1.45 (2024-01-09)
30-
31-
### Switch
32-
33-
#### Bug Fixes
34-
35-
- `#I530742` - The issue with "Switch unintentionally changed when we touch the switch and drag vertically" has been resolved.
36-
37-
## 24.1.41 (2023-12-18)
38-
3913
### RadioButton
4014

4115
#### Bug Fixes

Diff for: controls/buttons/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-buttons",
3-
"version": "24.2.5",
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",
@@ -11,6 +11,7 @@
1111
"@syncfusion/ej2-base": "*"
1212
},
1313
"devDependencies": {
14+
"@syncfusion/ej2-staging": "^1.0.1",
1415
"@types/chai": "^3.4.28",
1516
"@types/jasmine": "2.8.9",
1617
"@types/jasmine-ajax": "^3.1.27",

Diff for: controls/buttons/spec/button.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ describe('Button', () => {
188188
});
189189

190190
it('Enable Html Sanitizer testing', () => {
191-
button = new Button({ content: 'Button<style>body{background:rgb(0, 0, 255)}</style>', enableHtmlSanitizer: true }, '#button');
191+
button = new Button({ content: 'Button<style>body{background:rgb(0, 0, 255)}</style>' }, '#button');
192192
const htmlele: Element = document.body;
193193
expect(button.content).toEqual('Button<style>body{background:rgb(0, 0, 255)}</style>');
194194
expect(window.getComputedStyle(htmlele).backgroundColor).not.toBe('rgb(0, 0, 255)');
195195
});
196196

197197
it('Enable Html Sanitizer disabled testing', () => {
198-
button = new Button({ content: '<style>body{background:rgb(0, 0, 255)}</style>' }, '#button');
198+
button = new Button({ content: '<style>body{background:rgb(0, 0, 255)}</style>', enableHtmlSanitizer: false }, '#button');
199199
const htmlele: Element = document.body;
200200
expect(window.getComputedStyle(htmlele).backgroundColor).toBe('rgb(0, 0, 255)');
201201
});

Diff for: controls/buttons/spec/check-box.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,13 @@ describe('CheckBox', () => {
154154
});
155155

156156
it('Enable Html Sanitizer testing', () => {
157-
checkbox = new CheckBox({ label: '<style>body{background:rgb(0, 0, 255)}</style>', enableHtmlSanitizer: true, }, '#checkbox');
157+
checkbox = new CheckBox({ label: '<style>body{background:rgb(0, 0, 255)}</style>' }, '#checkbox');
158158
const htmlele: Element = document.body;
159159
expect(window.getComputedStyle(htmlele).backgroundColor).not.toBe('rgb(0, 0, 255)');
160160
});
161161

162162
it('Enable Html Sanitizer disabled testing', () => {
163-
checkbox = new CheckBox({ label: 'Banking<style>body{background:rgb(0, 0, 255)}</style>' }, '#checkbox');
163+
checkbox = new CheckBox({ label: 'Banking<style>body{background:rgb(0, 0, 255)}</style>', enableHtmlSanitizer: false }, '#checkbox');
164164
const htmlele: Element = document.body;
165165
expect(window.getComputedStyle(htmlele).backgroundColor).toBe('rgb(0, 0, 255)');
166166
});

Diff for: controls/buttons/spec/chips.spec.ts

+12-3
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,10 @@ describe('Chips', () => {
733733
it('Find method - should not work', () => {
734734
chips = new ChipList({ text: 'chip content' }, '#chip');
735735
let resultantdata: ChipDataArgs = chips.find(0);
736-
expect(resultantdata).toBe(undefined);
736+
expect(resultantdata.text).toBe('');
737+
expect(resultantdata.index).toBe(-1);
738+
expect(resultantdata.element).toBe(chips.element);
739+
expect(resultantdata.data).toBe('');
737740
});
738741

739742
it('select & getSelectedChips method - should not work', () => {
@@ -892,7 +895,10 @@ describe('Chips', () => {
892895
expect(resultantData.text).toBe('chip2');
893896
//wrong data
894897
resultantData = chips.find(8);
895-
expect(resultantData).toBe(undefined);
898+
expect(resultantData.text).toBe('');
899+
expect(resultantData.index).toBe(-1);
900+
expect(resultantData.element).toBe(chips.element);
901+
expect(resultantData.data).toBe('');
896902
});
897903

898904
it('Find method using htmlElement', () => {
@@ -916,7 +922,10 @@ describe('Chips', () => {
916922
expect(resultantData.text).toBe('');
917923
//wrong data
918924
resultantData = chips.find(8);
919-
expect(resultantData).toBe(undefined);
925+
expect(resultantData.text).toBe('');
926+
expect(resultantData.index).toBe(-1);
927+
expect(resultantData.element).toBe(chips.element);
928+
expect(resultantData.data).toBe('');
920929
});
921930

922931
it('select & getSelectedChips method using index [Single selection]', () => {

Diff for: controls/buttons/spec/radio-button.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -139,20 +139,20 @@ describe('RadioButton', () => {
139139
});
140140

141141
it('Enable Html Sanitizer testing', () => {
142-
radio = new RadioButton({ label: '<style>body{background:rgb(0, 0, 255)}</style>', enableHtmlSanitizer: true }, '#radio');
142+
radio = new RadioButton({ label: '<style>body{background:rgb(0, 0, 255)}</style>' }, '#radio');
143143
const htmlele: Element = document.body;
144144
expect(window.getComputedStyle(htmlele).backgroundColor).not.toBe('rgb(0, 0, 255)');
145145
});
146146

147147
it('Enable Html Sanitizer disabled testing', () => {
148-
radio = new RadioButton({ label: '<style>body{background:rgb(0, 0, 255)}</style>' }, '#radio');
148+
radio = new RadioButton({ label: '<style>body{background:rgb(0, 0, 255)}</style>', enableHtmlSanitizer: false }, '#radio');
149149
const htmlele: Element = document.body;
150150
expect(window.getComputedStyle(htmlele).backgroundColor).toBe('rgb(0, 0, 255)');
151151
});
152152
it('Enable Html Attributes testing', () => {
153153
radio = new RadioButton({ htmlAttributes: {'title':'Choose Option'}, label: '<style>body{background:rgb(0, 0, 255)}</style>' }, '#radio');
154154
const htmlele: Element = document.body;
155-
expect(window.getComputedStyle(htmlele).backgroundColor).toBe('rgb(0, 0, 255)');
155+
expect(window.getComputedStyle(htmlele).backgroundColor).not.toBe('rgb(0, 0, 255)');
156156
});
157157
});
158158

Diff for: controls/buttons/src/button/button-model.d.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ export interface ButtonModel extends ComponentModel{
7474
locale?: string;
7575

7676
/**
77-
* Defines whether to allow the cross-scripting site or not.
77+
* Specifies whether to enable the rendering of untrusted HTML values in the Button component.
78+
* If 'enableHtmlSanitizer' set to true, the component will sanitize any suspected untrusted strings and scripts before rendering them.
7879
*
79-
* @default false
80+
* @default true
8081
*/
8182
enableHtmlSanitizer?: boolean;
8283

Diff for: controls/buttons/src/button/button.ts

+13-12
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,12 @@ export class Button extends Component<HTMLButtonElement> implements INotifyPrope
128128
public locale: string;
129129

130130
/**
131-
* Defines whether to allow the cross-scripting site or not.
131+
* Specifies whether to enable the rendering of untrusted HTML values in the Button component.
132+
* If 'enableHtmlSanitizer' set to true, the component will sanitize any suspected untrusted strings and scripts before rendering them.
132133
*
133-
* @default false
134+
* @default true
134135
*/
135-
@Property(false)
136+
@Property(true)
136137
public enableHtmlSanitizer: boolean;
137138

138139
/**
@@ -200,7 +201,7 @@ export class Button extends Component<HTMLButtonElement> implements INotifyPrope
200201
private setIconCss(): void {
201202
if (this.iconCss) {
202203
const span: HTMLElement = this.createElement('span', { className: 'e-btn-icon ' + this.iconCss });
203-
if (!this.element.textContent.trim()) {
204+
if (!this.element.textContent!.trim()) {
204205
this.element.classList.add(cssClassName.ICONBTN);
205206
} else {
206207
span.classList.add('e-icon-' + this.iconPosition.toLowerCase());
@@ -261,7 +262,7 @@ export class Button extends Component<HTMLButtonElement> implements INotifyPrope
261262
if (this.content) {
262263
this.element.innerHTML = this.element.innerHTML.replace(this.content, '');
263264
}
264-
const span: Element = this.element.querySelector('span.e-btn-icon');
265+
const span: Element = this.element.querySelector('span.e-btn-icon') as Element;
265266
if (span) {
266267
detach(span);
267268
}
@@ -310,7 +311,7 @@ export class Button extends Component<HTMLButtonElement> implements INotifyPrope
310311
* @private
311312
*/
312313
public onPropertyChanged(newProp: ButtonModel, oldProp: ButtonModel): void {
313-
let span: Element = this.element.querySelector('span.e-btn-icon');
314+
let span: Element = this.element.querySelector('span.e-btn-icon') as Element;
314315
for (const prop of Object.keys(newProp)) {
315316
switch (prop) {
316317
case 'isPrimary':
@@ -321,14 +322,14 @@ export class Button extends Component<HTMLButtonElement> implements INotifyPrope
321322
}
322323
break;
323324
case 'disabled':
324-
this.controlStatus(newProp.disabled);
325+
this.controlStatus(newProp.disabled as boolean);
325326
break;
326327
case 'iconCss': {
327-
span = this.element.querySelector('span.e-btn-icon');
328+
span = this.element.querySelector('span.e-btn-icon') as Element;
328329
if (span) {
329330
if (newProp.iconCss) {
330331
span.className = 'e-btn-icon ' + newProp.iconCss;
331-
if (this.element.textContent.trim()) {
332+
if (this.element.textContent!.trim()) {
332333
if (this.iconPosition === 'Left') {
333334
span.classList.add('e-icon-left');
334335
} else {
@@ -345,7 +346,7 @@ export class Button extends Component<HTMLButtonElement> implements INotifyPrope
345346
}
346347
case 'iconPosition':
347348
removeClass([this.element], ['e-top-icon-btn', 'e-bottom-icon-btn']);
348-
span = this.element.querySelector('span.e-btn-icon');
349+
span = this.element.querySelector('span.e-btn-icon') as Element;
349350
if (span) {
350351
detach(span);
351352
}
@@ -373,9 +374,9 @@ export class Button extends Component<HTMLButtonElement> implements INotifyPrope
373374
}
374375
if (!isBlazor() || (isBlazor() && !this.isServerRendered && this.getModuleName() !== 'progress-btn')) {
375376
if (this.enableHtmlSanitizer) {
376-
newProp.content = SanitizeHtmlHelper.sanitize(newProp.content);
377+
newProp.content = SanitizeHtmlHelper.sanitize(newProp.content as string);
377378
}
378-
this.element.innerHTML = newProp.content;
379+
this.element.innerHTML = newProp.content as string;
379380
this.setIconCss();
380381
}
381382
break;

Diff for: controls/buttons/src/check-box/check-box-model.d.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,10 @@ export interface CheckBoxModel extends ComponentModel{
8787
value?: string;
8888

8989
/**
90-
* Defines whether to allow the cross-scripting site or not.
90+
* Specifies whether to enable the rendering of untrusted HTML values in the CheckBox component.
91+
* If 'enableHtmlSanitizer' set to true, the component will sanitize any suspected untrusted strings and scripts before rendering them.
9192
*
92-
* @default false
93+
* @default true
9394
*/
9495
enableHtmlSanitizer?: boolean;
9596

0 commit comments

Comments
 (0)