@syncfusion/ej2-inputs 25.2.3 → 25.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/ej2-inputs.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js.map +1 -1
- package/dist/es6/ej2-inputs.es2015.js +26 -3
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +26 -3
- package/dist/es6/ej2-inputs.es5.js.map +1 -1
- package/dist/global/ej2-inputs.min.js +2 -2
- package/dist/global/ej2-inputs.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +9 -9
- package/src/input/input.js +24 -2
- package/src/numerictextbox/numerictextbox-model.d.ts +5 -0
- package/src/numerictextbox/numerictextbox.d.ts +5 -0
- package/src/textbox/textbox.d.ts +1 -0
- package/src/textbox/textbox.js +2 -1
|
@@ -448,6 +448,9 @@ var Input;
|
|
|
448
448
|
if (args.properties.showClearButton) {
|
|
449
449
|
unWireClearBtnEvents(args.element, button);
|
|
450
450
|
}
|
|
451
|
+
if (!isNullOrUndefined(args.buttons)) {
|
|
452
|
+
_internalRipple(false, null, args.buttons);
|
|
453
|
+
}
|
|
451
454
|
unwireFloatingEvents(args.element);
|
|
452
455
|
if (!isNullOrUndefined(args.element)) {
|
|
453
456
|
delete args.element.__eventHandlers;
|
|
@@ -554,6 +557,9 @@ var Input;
|
|
|
554
557
|
* @param {HTMLElement} container - The parent element which is need to get the label span to calculate width
|
|
555
558
|
*/
|
|
556
559
|
function calculateWidth(element, container, moduleName) {
|
|
560
|
+
if (moduleName !== 'multiselect' && !_isElementVisible(element)) {
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
557
563
|
const elementWidth = moduleName === 'multiselect' ? element : element.clientWidth - parseInt(getComputedStyle(element, null).getPropertyValue('padding-left'), 10);
|
|
558
564
|
if (!isNullOrUndefined(container.getElementsByClassName('e-float-text-content')[0])) {
|
|
559
565
|
if (container.getElementsByClassName('e-float-text-content')[0].classList.contains('e-float-text-overflow')) {
|
|
@@ -876,8 +882,8 @@ var Input;
|
|
|
876
882
|
}
|
|
877
883
|
else if (buttons.length > 0) {
|
|
878
884
|
for (let index = 0; index < buttons.length; index++) {
|
|
879
|
-
buttons[parseInt(index.toString())].removeEventListener('mousedown', _onMouseDownRipple
|
|
880
|
-
buttons[parseInt(index.toString())].removeEventListener('mouseup', _onMouseUpRipple
|
|
885
|
+
buttons[parseInt(index.toString())].removeEventListener('mousedown', _onMouseDownRipple);
|
|
886
|
+
buttons[parseInt(index.toString())].removeEventListener('mouseup', _onMouseUpRipple);
|
|
881
887
|
}
|
|
882
888
|
}
|
|
883
889
|
}
|
|
@@ -886,6 +892,22 @@ var Input;
|
|
|
886
892
|
button.classList.add('e-input-btn-ripple');
|
|
887
893
|
}
|
|
888
894
|
}
|
|
895
|
+
function _isElementVisible(element) {
|
|
896
|
+
if (!element) {
|
|
897
|
+
return false;
|
|
898
|
+
}
|
|
899
|
+
// Check if the element or any of its parents are hidden using display: none
|
|
900
|
+
let currentElement = element;
|
|
901
|
+
while (currentElement && currentElement !== document.body) {
|
|
902
|
+
const style = window.getComputedStyle(currentElement);
|
|
903
|
+
if (style.display === 'none') {
|
|
904
|
+
return false;
|
|
905
|
+
}
|
|
906
|
+
currentElement = currentElement.parentElement;
|
|
907
|
+
}
|
|
908
|
+
// If none of the elements have display: none, the element is considered visible
|
|
909
|
+
return true;
|
|
910
|
+
}
|
|
889
911
|
function _onMouseDownRipple() {
|
|
890
912
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
891
913
|
const ele = this;
|
|
@@ -13393,6 +13415,7 @@ let TextBox = class TextBox extends Component {
|
|
|
13393
13415
|
this.isForm = false;
|
|
13394
13416
|
this.inputPreviousValue = null;
|
|
13395
13417
|
this.isVue = false;
|
|
13418
|
+
this.isReact = false;
|
|
13396
13419
|
this.textboxOptions = options;
|
|
13397
13420
|
}
|
|
13398
13421
|
/**
|
|
@@ -13537,7 +13560,7 @@ let TextBox = class TextBox extends Component {
|
|
|
13537
13560
|
if (this.element.tagName !== 'TEXTAREA') {
|
|
13538
13561
|
this.element.setAttribute('type', this.type);
|
|
13539
13562
|
}
|
|
13540
|
-
if (this.type === 'text') {
|
|
13563
|
+
if (this.type === 'text' || (this.element.tagName === 'INPUT' && this.multiline && this.isReact)) {
|
|
13541
13564
|
this.element.setAttribute('role', 'textbox');
|
|
13542
13565
|
}
|
|
13543
13566
|
this.globalize = new Internationalization(this.locale);
|