Skip to content

Commit

Permalink
v24.1.46 is released
Browse files Browse the repository at this point in the history
  • Loading branch information
pipeline committed Jan 17, 2024
1 parent 9d94074 commit bda8d8f
Show file tree
Hide file tree
Showing 235 changed files with 2,071 additions and 859 deletions.
2 changes: 1 addition & 1 deletion controls/barcodegenerator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [Unreleased]

## 24.1.45 (2024-01-09)
## 24.1.46 (2024-01-17)

### Barcode

Expand Down
8 changes: 8 additions & 0 deletions controls/base/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

## [Unreleased]

## 24.1.46 (2024-01-17)

### Common

#### Bug Fixes

- `#I531468` - The issue with "rendering the html template string" has been resolved.

## 23.2.6 (2023-11-28)

### Common
Expand Down
183 changes: 0 additions & 183 deletions controls/base/releasenotes/README.md

This file was deleted.

16 changes: 16 additions & 0 deletions controls/buttons/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

## [Unreleased]

## 24.1.46 (2024-01-17)

### Checkbox

#### Bug Fixes

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

## 24.1.45 (2024-01-09)

### Switch

#### Bug Fixes

- `#I530742` - The issue with "Switch unintentionally changed when we touch the switch and drag vertically" has been resolved.

## 24.1.41 (2023-12-18)

### RadioButton
Expand Down
2 changes: 1 addition & 1 deletion controls/buttons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@syncfusion/ej2-buttons",
"version": "24.1.41",
"version": "24.1.45",
"description": "A package of feature-rich Essential JS 2 components such as Button, CheckBox, RadioButton and Switch.",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
Expand Down
42 changes: 36 additions & 6 deletions controls/buttons/spec/switch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,44 @@ describe('Switch', () => {
});
it('Wrapper touch', () => {
specSwitch = new Switch({}, '#specSwitch');
const start: MouseEvent = document.createEvent('MouseEvent');
start.initEvent('touchstart', true, true);
const start: TouchEvent = new TouchEvent('touchstart', {
touches: [
new Touch({ identifier: 1, target: document.documentElement }),
],
targetTouches: [
new Touch({ identifier: 1, target: document.documentElement }),
],
changedTouches: [
new Touch({ identifier: 1, target: document.documentElement }),
],
bubbles: true, cancelable: true, composed: true,
});
element.parentElement.dispatchEvent(start);
const move: MouseEvent = document.createEvent('MouseEvent');
move.initEvent('touchmove', true, true);
const move: TouchEvent = new TouchEvent('touchmove', {
touches: [
new Touch({ identifier: 1, target: document.documentElement }),
],
targetTouches: [
new Touch({ identifier: 1, target: document.documentElement }),
],
changedTouches: [
new Touch({ identifier: 1, target: document.documentElement }),
],
bubbles: true, cancelable: true, composed: true,
});
element.parentElement.dispatchEvent(move);
const end: MouseEvent = document.createEvent('MouseEvent');
end.initEvent('touchend', true, true);
const end: TouchEvent = new TouchEvent('touchend', {
touches: [
new Touch({ identifier: 1, target: document.documentElement }),
],
targetTouches: [
new Touch({ identifier: 1, target: document.documentElement }),
],
changedTouches: [
new Touch({ identifier: 1, target: document.documentElement }),
],
bubbles: true, cancelable: true, composed: true,
});
element.parentElement.dispatchEvent(end);
expect(element.parentElement.children[1].classList.contains('e-switch-active')).toEqual(true);
const up: MouseEvent = document.createEvent('MouseEvent');
Expand Down
2 changes: 1 addition & 1 deletion controls/buttons/src/check-box/check-box.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const RIPPLECHECK: string = 'e-ripple-check';
const RIPPLEINDETERMINATE: string = 'e-ripple-stop';
const RTL: string = 'e-rtl';
const WRAPPER: string = 'e-checkbox-wrapper';
const containerAttr: string[] = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value'];
const containerAttr: string[] = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value', 'id'];

/**
* The CheckBox is a graphical user interface element that allows you to select one or more options from the choices.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ export class Fab extends Button implements INotifyPropertyChanged {
this.checkTarget();
this.setPosition();
break;
/* REF - 861739 */
case 'currencyCode':
this.refresh();
break;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion controls/buttons/src/radio-button/radio-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const LABEL: string = 'e-label';
const RIPPLE: string = 'e-ripple-container';
const RTL: string = 'e-rtl';
const WRAPPER: string = 'e-radio-wrapper';
const ATTRIBUTES: string[] = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value'];
const ATTRIBUTES: string[] = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value', 'id'];

/**
* The RadioButton is a graphical user interface element that allows you to select one option from the choices.
Expand Down
26 changes: 23 additions & 3 deletions controls/buttons/src/switch/switch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export class Switch extends Component<HTMLInputElement> implements INotifyProper
private delegateKeyUpHandler: Function;
private formElement: HTMLFormElement;
private initialSwitchCheckedValue: boolean;
private bTouchY: number;
private bTouchX: number;

/**
* Triggers when Switch state has been changed by user interaction.
Expand Down Expand Up @@ -427,19 +429,37 @@ export class Switch extends Component<HTMLInputElement> implements INotifyProper
}
}
private switchMouseUp(e: MouseEventArgs): void {
let aTouchY: number = 0; let yDiff: number = 0;
let aTouchX: number = 0; let xDiff: number = 0;
const target: Element = e.target as Element;
if (e.type === 'touchmove') {
e.preventDefault();
aTouchX = e.changedTouches[0].clientX;
aTouchY = e.changedTouches[0].clientY;
xDiff = this.bTouchX - aTouchX;
yDiff = this.bTouchY - aTouchY;
if (Math.abs(xDiff) < Math.abs(yDiff)) {
this.isDrag = false;
this.rippleTouchHandler('mouseup');
} else {
this.isDrag = true;
}
}
if (e.type === 'touchstart') {
this.bTouchX = e.changedTouches[0].clientX;
this.bTouchY = e.changedTouches[0].clientY;
this.isDrag = true;
this.rippleTouchHandler('mousedown');
}
if (this.isDrag) {
if ((e.type === 'mouseup' && target.className.indexOf('e-switch') < 0) || e.type === 'touchend') {
this.clickHandler(e);
this.rippleTouchHandler('mouseup');
e.preventDefault();
xDiff = this.bTouchX - e.changedTouches[0].clientX;
yDiff = this.bTouchY - e.changedTouches[0].clientY;
if (Math.abs(xDiff) >= Math.abs(yDiff)) {
this.clickHandler(e);
this.rippleTouchHandler('mouseup');
e.preventDefault();
}
}
}
}
Expand Down
Loading

0 comments on commit bda8d8f

Please sign in to comment.