@syncfusion/ej2-buttons
Advanced tools
Comparing version 20.4.42 to 20.4.44
@@ -5,2 +5,10 @@ # Changelog | ||
### Switch | ||
#### Bug Fixes | ||
- `#I427994` - Provided the `htmlAttributes` support to the switch component. | ||
## 20.4.42 (2023-01-04) | ||
### Checkbox | ||
@@ -7,0 +15,0 @@ |
/*! | ||
* filename: index.d.ts | ||
* version : 20.4.42 | ||
* version : 20.4.44 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"_from": "@syncfusion/ej2-buttons@*", | ||
"_id": "@syncfusion/ej2-buttons@20.4.40", | ||
"_id": "@syncfusion/ej2-buttons@20.4.42", | ||
"_inBundle": false, | ||
"_integrity": "sha512-JQQGhmvAsh0LJuEw9ze146KmyH55VfjzBd0BZ/nbJmgPRi8VqvqU/ukvdsxCU0kAPlSgF8iqAO2L43bDfDDZBg==", | ||
"_integrity": "sha512-RnS3reGI0YMofaYNICFitgbM53nEKJfCFzIRTVH4gqS6qSCMZS46C9HHmIuPiYy7D+1qSV2kPMV5ZlBY0N0ahA==", | ||
"_location": "/@syncfusion/ej2-buttons", | ||
@@ -46,4 +46,4 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-buttons/-/ej2-buttons-20.4.40.tgz", | ||
"_shasum": "09663eb95e74febdd2a9573475151e83e7802899", | ||
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-buttons/-/ej2-buttons-20.4.42.tgz", | ||
"_shasum": "c0e9b687af6f531399114dd2355853f54898f74a", | ||
"_spec": "@syncfusion/ej2-buttons@*", | ||
@@ -59,3 +59,3 @@ "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included", | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~20.4.42" | ||
"@syncfusion/ej2-base": "~20.4.44" | ||
}, | ||
@@ -106,4 +106,4 @@ "deprecated": false, | ||
"typings": "index.d.ts", | ||
"version": "20.4.42", | ||
"version": "20.4.44", | ||
"sideEffects": false | ||
} |
@@ -532,2 +532,8 @@ var __extends = (this && this.__extends) || (function () { | ||
} | ||
else if (key === 'disabled') { | ||
if (this.htmlAttributes["" + key] === 'true') { | ||
this.setDisabled(); | ||
} | ||
this.element.setAttribute(key, this.htmlAttributes["" + key]); | ||
} | ||
else { | ||
@@ -534,0 +540,0 @@ this.element.setAttribute(key, this.htmlAttributes["" + key]); |
@@ -22,2 +22,3 @@ import { getUniqueID, INotifyPropertyChanged, NotifyPropertyChanges, Property, EventHandler } from '@syncfusion/ej2-base';import { select } from '@syncfusion/ej2-base';import { Button } from '../button/button'; | ||
* * BottomRight: Positions the FAB at the target's bottom right corner. | ||
* | ||
* To refresh the position of FAB on target resize, use refreshPosition method. | ||
@@ -24,0 +25,0 @@ * The position will be refreshed automatically when browser resized. |
@@ -62,2 +62,3 @@ /// <reference path="../button/button-model.d.ts" /> | ||
* * BottomRight: Positions the FAB at the target's bottom right corner. | ||
* | ||
* To refresh the position of FAB on target resize, use refreshPosition method. | ||
@@ -64,0 +65,0 @@ * The position will be refreshed automatically when browser resized. |
@@ -248,2 +248,3 @@ import { BaseEventArgs, EmitType, Event, ChildProperty, Collection, Complex, Component, INotifyPropertyChanged, NotifyPropertyChanges, Property, getUniqueID, EventHandler, isRippleEnabled, removeClass, addClass, attributes } from '@syncfusion/ej2-base';import { select, extend, deleteObject, KeyboardEvents, append, rippleEffect, remove, closest, selectAll, KeyboardEventArgs, isNullOrUndefined, compile, formatUnit, Animation, AnimationModel, Effect as baseEffect } from '@syncfusion/ej2-base';import { Fab, FabPosition } from './../floating-action-button/index';import { IconPosition } from './../button/index'; | ||
* * BottomRight: Positions the FAB at the target's bottom right corner. | ||
* | ||
* To refresh the position of FAB on target resize, use refreshPosition method. | ||
@@ -250,0 +251,0 @@ * The position will be refreshed automatically when browser resized. |
@@ -388,2 +388,3 @@ import { BaseEventArgs, EmitType, ChildProperty, Component, INotifyPropertyChanged } from '@syncfusion/ej2-base'; | ||
* * BottomRight: Positions the FAB at the target's bottom right corner. | ||
* | ||
* To refresh the position of FAB on target resize, use refreshPosition method. | ||
@@ -390,0 +391,0 @@ * The position will be refreshed automatically when browser resized. |
@@ -613,6 +613,6 @@ var __extends = (this && this.__extends) || (function () { | ||
SpeedDial.prototype.keyActionHandler = function (e) { | ||
e.preventDefault(); | ||
switch (e.action) { | ||
case 'enter': | ||
case 'space': | ||
e.preventDefault(); | ||
if (this.isMenuOpen) { | ||
@@ -704,6 +704,2 @@ if (this.focusedIndex !== -1) { | ||
SpeedDial.prototype.focusLinearElement = function (isLeftUp) { | ||
if (this.focusedIndex === -1) { | ||
this.focusFirstElement(); | ||
return; | ||
} | ||
var isReversed = this.popupEle.classList.contains(SDVERTICALBOTTOM) || | ||
@@ -724,6 +720,2 @@ this.popupEle.classList.contains(SDHORIZONTALRIGHT); | ||
SpeedDial.prototype.focusLeftRightElement = function (isLeft) { | ||
if (this.focusedIndex === -1) { | ||
this.focusFirstElement(); | ||
return; | ||
} | ||
/*radialTop position and left + anticlock or right + clock is previous | ||
@@ -742,6 +734,2 @@ other positions and right + anticlock or left + clock is previous | ||
SpeedDial.prototype.focusUpDownElement = function (isUp) { | ||
if (this.focusedIndex === -1) { | ||
this.focusFirstElement(); | ||
return; | ||
} | ||
/*radialRight position and up + anticlock or down + clock is previous | ||
@@ -748,0 +736,0 @@ other positions and down + anticlock or up + clock is previous |
@@ -76,2 +76,10 @@ import { Component, INotifyPropertyChanged, NotifyPropertyChanges, Property, closest } from '@syncfusion/ej2-base';import { EmitType, Event, EventHandler, MouseEventArgs } from '@syncfusion/ej2-base';import { addClass, isRippleEnabled, removeClass, rippleEffect, isNullOrUndefined } from '@syncfusion/ej2-base';import { rippleMouseHandler, destroy, preRender, ChangeEventArgs, setHiddenInput } from './../common/common'; | ||
/** | ||
* You can add the additional html attributes such as disabled, value etc., to the element. | ||
* If you configured both property and equivalent html attribute then the component considers the property value. | ||
* | ||
* @default {} | ||
*/ | ||
htmlAttributes?: { [key: string]: string; }; | ||
} |
@@ -83,2 +83,11 @@ import { Component, INotifyPropertyChanged } from '@syncfusion/ej2-base'; | ||
/** | ||
* You can add the additional html attributes such as disabled, value etc., to the element. | ||
* If you configured both property and equivalent html attribute then the component considers the property value. | ||
* | ||
* @default {} | ||
*/ | ||
htmlAttributes: { | ||
[key: string]: string; | ||
}; | ||
/** | ||
* Constructor for creating the widget. | ||
@@ -147,2 +156,3 @@ * | ||
private setLabel; | ||
private updateHtmlAttribute; | ||
private switchFocusHandler; | ||
@@ -149,0 +159,0 @@ private switchMouseUp; |
@@ -30,2 +30,3 @@ var __extends = (this && this.__extends) || (function () { | ||
var ACTIVE = 'e-switch-active'; | ||
var ATTRIBUTES = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value']; | ||
/** | ||
@@ -243,2 +244,5 @@ * The Switch is a graphical user interface element that allows you to toggle between checked and unchecked states. | ||
break; | ||
case 'htmlAttributes': | ||
this.updateHtmlAttribute(); | ||
break; | ||
} | ||
@@ -272,2 +276,3 @@ } | ||
this.renderComplete(); | ||
this.updateHtmlAttribute(); | ||
}; | ||
@@ -305,2 +310,30 @@ Switch.prototype.rippleHandler = function (e) { | ||
}; | ||
Switch.prototype.updateHtmlAttribute = function () { | ||
if (!isNullOrUndefined(this.htmlAttributes)) { | ||
for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) { | ||
var key = _a[_i]; | ||
if (ATTRIBUTES.indexOf(key) > -1) { | ||
var wrapper = this.getWrapper(); | ||
if (key === 'class') { | ||
addClass([wrapper], this.htmlAttributes["" + key].split(' ')); | ||
} | ||
else if (key === 'title') { | ||
wrapper.setAttribute(key, this.htmlAttributes["" + key]); | ||
} | ||
else if (key === 'style') { | ||
wrapper.setAttribute(key, this.htmlAttributes["" + key]); | ||
} | ||
else if (key === 'disabled') { | ||
if (this.htmlAttributes["" + key] === 'true') { | ||
this.setDisabled(); | ||
} | ||
this.element.setAttribute(key, this.htmlAttributes["" + key]); | ||
} | ||
else { | ||
this.element.setAttribute(key, this.htmlAttributes["" + key]); | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
Switch.prototype.switchFocusHandler = function () { | ||
@@ -414,2 +447,5 @@ if (this.isFocused) { | ||
], Switch.prototype, "value", void 0); | ||
__decorate([ | ||
Property({}) | ||
], Switch.prototype, "htmlAttributes", void 0); | ||
Switch = __decorate([ | ||
@@ -416,0 +452,0 @@ NotifyPropertyChanges |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8839523
181323