Skip to content

Commit bda8d8f

Browse files
author
pipeline
committed
v24.1.46 is released
1 parent 9d94074 commit bda8d8f

File tree

235 files changed

+2071
-859
lines changed

Some content is hidden

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

235 files changed

+2071
-859
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-
## 24.1.45 (2024-01-09)
5+
## 24.1.46 (2024-01-17)
66

77
### Barcode
88

controls/base/CHANGELOG.md

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

33
## [Unreleased]
44

5+
## 24.1.46 (2024-01-17)
6+
7+
### Common
8+
9+
#### Bug Fixes
10+
11+
- `#I531468` - The issue with "rendering the html template string" has been resolved.
12+
513
## 23.2.6 (2023-11-28)
614

715
### Common

controls/base/releasenotes/README.md

-183
This file was deleted.

controls/buttons/CHANGELOG.md

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

33
## [Unreleased]
44

5+
## 24.1.46 (2024-01-17)
6+
7+
### Checkbox
8+
9+
#### Bug Fixes
10+
11+
- `#I535107` - Need to set `HtmlAttributes` Id in input element checkbox has been resolved.
12+
13+
## 24.1.45 (2024-01-09)
14+
15+
### Switch
16+
17+
#### Bug Fixes
18+
19+
- `#I530742` - The issue with "Switch unintentionally changed when we touch the switch and drag vertically" has been resolved.
20+
521
## 24.1.41 (2023-12-18)
622

723
### RadioButton

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": "24.1.41",
3+
"version": "24.1.45",
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/switch.spec.ts

+36-6
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,44 @@ describe('Switch', () => {
122122
});
123123
it('Wrapper touch', () => {
124124
specSwitch = new Switch({}, '#specSwitch');
125-
const start: MouseEvent = document.createEvent('MouseEvent');
126-
start.initEvent('touchstart', true, true);
125+
const start: TouchEvent = new TouchEvent('touchstart', {
126+
touches: [
127+
new Touch({ identifier: 1, target: document.documentElement }),
128+
],
129+
targetTouches: [
130+
new Touch({ identifier: 1, target: document.documentElement }),
131+
],
132+
changedTouches: [
133+
new Touch({ identifier: 1, target: document.documentElement }),
134+
],
135+
bubbles: true, cancelable: true, composed: true,
136+
});
127137
element.parentElement.dispatchEvent(start);
128-
const move: MouseEvent = document.createEvent('MouseEvent');
129-
move.initEvent('touchmove', true, true);
138+
const move: TouchEvent = new TouchEvent('touchmove', {
139+
touches: [
140+
new Touch({ identifier: 1, target: document.documentElement }),
141+
],
142+
targetTouches: [
143+
new Touch({ identifier: 1, target: document.documentElement }),
144+
],
145+
changedTouches: [
146+
new Touch({ identifier: 1, target: document.documentElement }),
147+
],
148+
bubbles: true, cancelable: true, composed: true,
149+
});
130150
element.parentElement.dispatchEvent(move);
131-
const end: MouseEvent = document.createEvent('MouseEvent');
132-
end.initEvent('touchend', true, true);
151+
const end: TouchEvent = new TouchEvent('touchend', {
152+
touches: [
153+
new Touch({ identifier: 1, target: document.documentElement }),
154+
],
155+
targetTouches: [
156+
new Touch({ identifier: 1, target: document.documentElement }),
157+
],
158+
changedTouches: [
159+
new Touch({ identifier: 1, target: document.documentElement }),
160+
],
161+
bubbles: true, cancelable: true, composed: true,
162+
});
133163
element.parentElement.dispatchEvent(end);
134164
expect(element.parentElement.children[1].classList.contains('e-switch-active')).toEqual(true);
135165
const up: MouseEvent = document.createEvent('MouseEvent');

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const RIPPLECHECK: string = 'e-ripple-check';
2222
const RIPPLEINDETERMINATE: string = 'e-ripple-stop';
2323
const RTL: string = 'e-rtl';
2424
const WRAPPER: string = 'e-checkbox-wrapper';
25-
const containerAttr: string[] = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value'];
25+
const containerAttr: string[] = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value', 'id'];
2626

2727
/**
2828
* The CheckBox is a graphical user interface element that allows you to select one or more options from the choices.

controls/buttons/src/floating-action-button/floating-action-button.ts

+4
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ export class Fab extends Button implements INotifyPropertyChanged {
285285
this.checkTarget();
286286
this.setPosition();
287287
break;
288+
/* REF - 861739 */
289+
case 'currencyCode':
290+
this.refresh();
291+
break;
288292
}
289293
}
290294
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const LABEL: string = 'e-label';
1616
const RIPPLE: string = 'e-ripple-container';
1717
const RTL: string = 'e-rtl';
1818
const WRAPPER: string = 'e-radio-wrapper';
19-
const ATTRIBUTES: string[] = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value'];
19+
const ATTRIBUTES: string[] = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value', 'id'];
2020

2121
/**
2222
* The RadioButton is a graphical user interface element that allows you to select one option from the choices.

controls/buttons/src/switch/switch.ts

+23-3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ export class Switch extends Component<HTMLInputElement> implements INotifyProper
3333
private delegateKeyUpHandler: Function;
3434
private formElement: HTMLFormElement;
3535
private initialSwitchCheckedValue: boolean;
36+
private bTouchY: number;
37+
private bTouchX: number;
3638

3739
/**
3840
* Triggers when Switch state has been changed by user interaction.
@@ -427,19 +429,37 @@ export class Switch extends Component<HTMLInputElement> implements INotifyProper
427429
}
428430
}
429431
private switchMouseUp(e: MouseEventArgs): void {
432+
let aTouchY: number = 0; let yDiff: number = 0;
433+
let aTouchX: number = 0; let xDiff: number = 0;
430434
const target: Element = e.target as Element;
431435
if (e.type === 'touchmove') {
432436
e.preventDefault();
437+
aTouchX = e.changedTouches[0].clientX;
438+
aTouchY = e.changedTouches[0].clientY;
439+
xDiff = this.bTouchX - aTouchX;
440+
yDiff = this.bTouchY - aTouchY;
441+
if (Math.abs(xDiff) < Math.abs(yDiff)) {
442+
this.isDrag = false;
443+
this.rippleTouchHandler('mouseup');
444+
} else {
445+
this.isDrag = true;
446+
}
433447
}
434448
if (e.type === 'touchstart') {
449+
this.bTouchX = e.changedTouches[0].clientX;
450+
this.bTouchY = e.changedTouches[0].clientY;
435451
this.isDrag = true;
436452
this.rippleTouchHandler('mousedown');
437453
}
438454
if (this.isDrag) {
439455
if ((e.type === 'mouseup' && target.className.indexOf('e-switch') < 0) || e.type === 'touchend') {
440-
this.clickHandler(e);
441-
this.rippleTouchHandler('mouseup');
442-
e.preventDefault();
456+
xDiff = this.bTouchX - e.changedTouches[0].clientX;
457+
yDiff = this.bTouchY - e.changedTouches[0].clientY;
458+
if (Math.abs(xDiff) >= Math.abs(yDiff)) {
459+
this.clickHandler(e);
460+
this.rippleTouchHandler('mouseup');
461+
e.preventDefault();
462+
}
443463
}
444464
}
445465
}

0 commit comments

Comments
 (0)