Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-inputs

Package Overview
Dependencies
Maintainers
2
Versions
247
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-inputs - npm Package Compare versions

Comparing version 16.2.47 to 16.2.48

README.md

21

CHANGELOG.md

@@ -5,2 +5,23 @@ # Changelog

### Uploader
#### Bug Fixes
- In synchronous upload, while removing a particular file from file list will clear all the files now since couldn't manipulate each file details in input file element.
### NumericTextBox
#### Bug Fixes
- Issue in entering the text in NumericTextBox from Firefox browser has been fixed.
- Resolved the issue in NumericTextBox is not allowed to edit the value while using decimals count as 0.
### MaskedTextBox
#### Bug Fixes
- Resolved the issue with MaskedTextBox change event is triggered for multiple times while changing value dynamically.
## 16.2.47 (2018-08-07)
### TextBox

@@ -7,0 +28,0 @@

2

dist/global/index.d.ts
/*!
* filename: index.d.ts
* version : 16.2.47
* version : 16.2.48
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"name": "@syncfusion/ej2-inputs",
"version": "16.2.47",
"version": "16.2.48",
"description": "Essential JS 2 Input Components",

@@ -11,6 +11,6 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-base": "~16.2.46",
"@syncfusion/ej2-base": "~16.2.47",
"@syncfusion/ej2-buttons": "~16.2.47",
"@syncfusion/ej2-popups": "~16.2.47",
"@syncfusion/ej2-splitbuttons": "~16.2.46"
"@syncfusion/ej2-splitbuttons": "~16.2.48"
},

@@ -17,0 +17,0 @@ "devDependencies": {

@@ -16,3 +16,3 @@ /**

*/
function createInput(args: InputArgs): InputObject;
function createInput(args: InputArgs, internalCreateElement?: createElementParams): InputObject;
/**

@@ -81,3 +81,3 @@ * Sets the value to the input element.

function setEnabled(isEnable: boolean, element: HTMLInputElement, floatLabelType?: string): void;
function setClearButton(isClear: boolean, element: HTMLInputElement, inputObject: InputObject, initial?: boolean): void;
function setClearButton(isClear: boolean, element: HTMLInputElement, inputObject: InputObject, initial?: boolean, internalCreateElement?: createElementParams): void;
/**

@@ -110,3 +110,3 @@ * Removing the multiple attributes from the given element such as "disabled","id" , etc.

function removeFloating(input: InputObject): void;
function addFloating(input: HTMLInputElement, type: FloatLabelType | string, placeholder: string): void;
function addFloating(input: HTMLInputElement, type: FloatLabelType | string, placeholder: string, internalCreateElement?: createElementParams): void;
/**

@@ -132,3 +132,3 @@ * Enable or Disable the ripple effect on the icons inside the Input. Ripple effect is only applicable for material theme.

*/
function appendSpan(iconClass: string, container: HTMLElement): HTMLElement;
function appendSpan(iconClass: string, container: HTMLElement, internalCreateElement?: createElementParams): HTMLElement;
}

@@ -232,2 +232,11 @@ export interface InputObject {

}
export declare type createElementParams = (tag: string, prop?: {
id?: string;
className?: string;
innerHTML?: string;
styles?: string;
attrs?: {
[key: string]: string;
};
}) => HTMLElement;
/**

@@ -234,0 +243,0 @@ * Defines the argument for the focus event.

@@ -35,6 +35,7 @@ import { createElement, attributes, addClass, removeClass, detach, classList, closest, isNullOrUndefined } from '@syncfusion/ej2-base';

*/
function createInput(args) {
function createInput(args, internalCreateElement) {
var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
var inputObject = { container: null, buttons: [], clearButton: null };
if (isNullOrUndefined(args.floatLabelType) || args.floatLabelType === 'Never') {
inputObject.container = createInputContainer(args, CLASSNAMES.INPUTGROUP, CLASSNAMES.INPUTCUSTOMTAG, 'span');
inputObject.container = createInputContainer(args, CLASSNAMES.INPUTGROUP, CLASSNAMES.INPUTCUSTOMTAG, 'span', makeElement);
args.element.parentNode.insertBefore(inputObject.container, args.element);

@@ -45,3 +46,3 @@ addClass([args.element], CLASSNAMES.INPUT);

else {
createFloatingInput(args, inputObject);
createFloatingInput(args, inputObject, makeElement);
}

@@ -61,3 +62,3 @@ args.element.addEventListener('focus', function () {

if (!isNullOrUndefined(args.properties) && !isNullOrUndefined(args.properties.showClearButton) && args.properties.showClearButton) {
setClearButton(args.properties.showClearButton, args.element, inputObject, true);
setClearButton(args.properties.showClearButton, args.element, inputObject, true, makeElement);
if (inputObject.container.classList.contains(CLASSNAMES.FLOATINPUT)) {

@@ -69,3 +70,3 @@ addClass([inputObject.container], CLASSNAMES.INPUTGROUP);

for (var i = 0; i < args.buttons.length; i++) {
inputObject.buttons.push(appendSpan(args.buttons[i], inputObject.container));
inputObject.buttons.push(appendSpan(args.buttons[i], inputObject.container, makeElement));
}

@@ -103,3 +104,4 @@ }

}
function createFloatingInput(args, inputObject) {
function createFloatingInput(args, inputObject, internalCreateElement) {
var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
var inputElement;

@@ -112,3 +114,3 @@ var floatLinelement;

if (isNullOrUndefined(inputObject.container)) {
inputObject.container = createInputContainer(args, CLASSNAMES.FLOATINPUT, CLASSNAMES.FLOATCUSTOMTAG, 'div');
inputObject.container = createInputContainer(args, CLASSNAMES.FLOATINPUT, CLASSNAMES.FLOATCUSTOMTAG, 'div', makeElement);
args.element.parentNode.insertBefore(inputObject.container, args.element);

@@ -122,4 +124,4 @@ }

}
floatLinelement = createElement('span', { className: CLASSNAMES.FLOATLINE });
floatLabelElement = createElement('label', { className: CLASSNAMES.FLOATTEXT });
floatLinelement = makeElement('span', { className: CLASSNAMES.FLOATLINE });
floatLabelElement = makeElement('label', { className: CLASSNAMES.FLOATTEXT });
if (!isNullOrUndefined(args.element.id) && args.element.id !== '') {

@@ -213,4 +215,5 @@ floatLabelElement.id = 'label_' + args.element.id.replace(/ /g, '_');

*/
function createClearButton(element, inputObject, initial) {
var button = createElement('span', { className: CLASSNAMES.CLEARICON });
function createClearButton(element, inputObject, initial, internalCreateElement) {
var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
var button = makeElement('span', { className: CLASSNAMES.CLEARICON });
var container = inputObject.container;

@@ -264,10 +267,11 @@ if (!isNullOrUndefined(initial)) {

*/
function createInputContainer(args, className, tagClass, tag) {
function createInputContainer(args, className, tagClass, tag, internalCreateElement) {
var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
var container;
if (!isNullOrUndefined(args.customTag)) {
container = createElement(args.customTag, { className: className });
container = makeElement(args.customTag, { className: className });
container.classList.add(tagClass);
}
else {
container = createElement(tag, { className: className });
container = makeElement(tag, { className: className });
}

@@ -420,5 +424,6 @@ container.classList.add('e-control-wrapper');

Input.setEnabled = setEnabled;
function setClearButton(isClear, element, inputObject, initial) {
function setClearButton(isClear, element, inputObject, initial, internalCreateElement) {
var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
if (isClear) {
inputObject.clearButton = createClearButton(element, inputObject, initial);
inputObject.clearButton = createClearButton(element, inputObject, initial, makeElement);
}

@@ -509,3 +514,4 @@ else {

Input.removeFloating = removeFloating;
function addFloating(input, type, placeholder) {
function addFloating(input, type, placeholder, internalCreateElement) {
var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
var container = closest(input, '.' + CLASSNAMES.INPUTGROUP);

@@ -519,3 +525,3 @@ if (type !== 'Never') {

input.classList.remove(CLASSNAMES.INPUT);
createFloatingInput(args, inputObj);
createFloatingInput(args, inputObj, makeElement);
if (isNullOrUndefined(iconEle)) {

@@ -597,4 +603,5 @@ iconEle = container.querySelector('.e-input-group-icon');

*/
function appendSpan(iconClass, container) {
var button = createElement('span', { className: iconClass });
function appendSpan(iconClass, container, internalCreateElement) {
var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
var button = makeElement('span', { className: iconClass });
button.classList.add('e-input-group-icon');

@@ -601,0 +608,0 @@ container.appendChild(button);

@@ -309,2 +309,5 @@ /**

}
else {
triggerMaskChangeEvent.call(_this, event, oldValue_1);
}
}, 1);

@@ -316,2 +319,3 @@ }

if (this.mask) {
var preValue_1 = this.element.value;
var sIndex_2 = this.element.selectionStart;

@@ -325,2 +329,5 @@ var eIndex = this.element.selectionEnd;

_this.element.selectionStart = _this.element.selectionEnd = sIndex_2;
if (_this.element.value !== preValue_1) {
triggerMaskChangeEvent.call(_this, event, null);
}
}, 0);

@@ -359,2 +366,5 @@ }

} while (i < value.length);
if (this.element.value !== this.preEleVal) {
triggerMaskChangeEvent.call(this, event, null);
}
}

@@ -447,2 +457,3 @@ var val = strippedValue.call(this, this.element);

var multipleDel = false;
var preValue = this.element.value;
if (startIndex > 0 || ((event.keyCode === 8 || event.keyCode === 46) && startIndex < this.element.value.length

@@ -523,3 +534,5 @@ && ((this.element.selectionEnd - startIndex) !== this.element.value.length))) {

});
triggerMaskChangeEvent.call(this, event, oldEventVal);
if (this.element.value !== preValue) {
triggerMaskChangeEvent.call(this, event, oldEventVal);
}
}

@@ -548,7 +561,9 @@ }

}
triggerMaskChangeEvent.call(this, event, oldValue);
if (this.element.value !== oldValue) {
triggerMaskChangeEvent.call(this, event, oldValue);
}
}
}
function triggerMaskChangeEvent(event, oldValue) {
if (!isNullOrUndefined(this.changeEventArgs)) {
if (!isNullOrUndefined(this.changeEventArgs) && !this.isInitial) {
var eventArgs = {};

@@ -566,2 +581,3 @@ this.changeEventArgs = { value: this.element.value, maskedValue: this.element.value, isInteraction: false };

}
this.preEleVal = this.element.value;
attributes(this.element, { 'aria-valuenow': this.element.value });

@@ -761,3 +777,2 @@ }

}
triggerMaskChangeEvent.call(this, event, eventOldVal);
}

@@ -787,3 +802,2 @@ function preventUnsupportedValues(event, sIdx, idx, key, ctrl, chkSupport) {

eventOldVal = this.element.value;
triggerMaskChangeEvent.call(this, event, eventOldVal);
addMaskErrorClass.call(this);

@@ -874,3 +888,3 @@ }

export function setMaskValue(val) {
if (this.mask && val !== undefined && (val === '' || this.prevValue !== val)) {
if (this.mask && val !== undefined && (this.prevValue === undefined || this.prevValue !== val)) {
this.maskKeyPress = true;

@@ -887,3 +901,6 @@ setElementValue.call(this, this.promptMask);

}
this.value = strippedValue.call(this, this.element);
var newVal = strippedValue.call(this, this.element);
this.prevValue = newVal;
this.value = newVal;
triggerMaskChangeEvent.call(this, null, null);
this.maskKeyPress = false;

@@ -890,0 +907,0 @@ var labelElement = this.element.parentNode.querySelector('.e-float-text');

@@ -34,2 +34,3 @@ import { Component, EmitType, INotifyPropertyChanged, BaseEventArgs } from '@syncfusion/ej2-base';

private isIosInvalid;
private preEleVal;
/**

@@ -36,0 +37,0 @@ * Gets or sets the CSS classes to root element of the MaskedTextBox which helps to customize the

@@ -117,2 +117,3 @@ var __extends = (this && this.__extends) || (function () {

this.setWidth(this.width);
this.preEleVal = this.element.value;
}

@@ -176,3 +177,3 @@ };

}
});
}, this.createElement);
this.inputObj.container.setAttribute('class', ROOT + ' ' + this.inputObj.container.getAttribute('class'));

@@ -214,3 +215,3 @@ };

case 'showClearButton':
Input.setClearButton(newProp.showClearButton, this.element, this.inputObj);
Input.setClearButton(newProp.showClearButton, this.element, this.inputObj, undefined, this.createElement);
bindClearEvent.call(this);

@@ -221,3 +222,3 @@ break;

Input.removeFloating(this.inputObj);
Input.addFloating(this.element, this.floatLabelType, this.placeholder);
Input.addFloating(this.element, this.floatLabelType, this.placeholder, this.createElement);
break;

@@ -224,0 +225,0 @@ case 'mask':

@@ -30,3 +30,3 @@ var __extends = (this && this.__extends) || (function () {

var DECREMENT = 'decrement';
var INTREGEXP = new RegExp('/^(-)?(\d*)$/');
var INTREGEXP = new RegExp('^(-)?(\\d*)$');
var DECIMALSEPARATOR = '.';

@@ -177,3 +177,3 @@ var COMPONENT = 'e-numerictextbox';

}
});
}, this.createElement);
this.inputWrapper = inputObj;

@@ -196,3 +196,3 @@ this.container = inputObj.container;

NumericTextBox.prototype.spinBtnCreation = function () {
this.spinDown = Input.appendSpan(SPINICON + ' ' + SPINDOWN, this.container);
this.spinDown = Input.appendSpan(SPINICON + ' ' + SPINDOWN, this.container, this.createElement);
attributes(this.spinDown, {

@@ -202,3 +202,3 @@ 'title': this.l10n.getConstant('decrementTitle'),

});
this.spinUp = Input.appendSpan(SPINICON + ' ' + SPINUP, this.container);
this.spinUp = Input.appendSpan(SPINICON + ' ' + SPINUP, this.container, this.createElement);
attributes(this.spinUp, {

@@ -424,3 +424,4 @@ 'title': this.l10n.getConstant('incrementTitle'),

var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
if (iOS && Browser.isDevice) {
var fireFox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
if ((fireFox || iOS) && Browser.isDevice) {
this.preventHandler();

@@ -576,2 +577,7 @@ }

NumericTextBox.prototype.keyPressHandler = function (event) {
if (!Browser.isDevice && Browser.info.version === '11.0' && event.keyCode === 13) {
var parsedInput = this.instance.getNumberParser({ format: 'n' })(this.element.value);
this.updateValue(parsedInput, event);
return true;
}
if (event.which === 0 || event.metaKey || event.ctrlKey || event.keyCode === 8 || event.keyCode === 13) {

@@ -600,3 +606,3 @@ return true;

}
if (this.decimals === 0) {
if (this.decimals === 0 && this.validateDecimalOnType) {
return INTREGEXP;

@@ -735,3 +741,3 @@ }

this.hiddenInput.remove();
Input.addFloating(this.element, this.floatLabelType, this.placeholder);
Input.addFloating(this.element, this.floatLabelType, this.placeholder, this.createElement);
this.container.insertBefore(hiddenInput, this.container.childNodes[1]);

@@ -847,3 +853,3 @@ };

case 'showClearButton':
Input.setClearButton(newProp.showClearButton, this.element, this.inputWrapper);
Input.setClearButton(newProp.showClearButton, this.element, this.inputWrapper, undefined, this.createElement);
this.bindClearEvent();

@@ -850,0 +856,0 @@ break;

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

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 not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc