@easymais-ui/text-input
Advanced tools
Comparing version 1.0.0-next.53 to 1.0.0-next.54
{ | ||
"name": "@easymais-ui/text-input", | ||
"version": "1.0.0-next.53", | ||
"version": "1.0.0-next.54", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -341,3 +341,4 @@ function _array_like_to_array(arr, len) { | ||
}; | ||
_proto.handleKeydown = function handleKeydown(event) { | ||
_proto.handleKeyup = function handleKeyup(event) { | ||
var _this_shadowRoot_querySelector; | ||
if (event.key === ';' || event.key === ',') { | ||
@@ -355,4 +356,5 @@ event.preventDefault(); | ||
} | ||
var _this_shadowRoot_querySelector_value; | ||
this.valueAtual = (_this_shadowRoot_querySelector_value = (_this_shadowRoot_querySelector = this.shadowRoot.querySelector('input')) === null || _this_shadowRoot_querySelector === void 0 ? void 0 : _this_shadowRoot_querySelector.value) !== null && _this_shadowRoot_querySelector_value !== void 0 ? _this_shadowRoot_querySelector_value : ''; | ||
if (event.key === 'Backspace') { | ||
this.valueAtual = this.valueAtual.slice(0, this.valueAtual.length - 1); | ||
if (!this.valueAtual) { | ||
@@ -359,0 +361,0 @@ this.countBackspace += 1; |
@@ -178,7 +178,7 @@ function e(e, t) { | ||
return !1; | ||
}, f.handleKeydown = function(e) { | ||
}, f.handleKeyup = function(e) { | ||
if ((';' === e.key || ',' === e.key) && e.preventDefault(), 'Backspace' !== e.key && (this.countBackspace = 0), ' ' !== e.key) { | ||
if (('ArrowUp' === e.key || 'ArrowDown' === e.key) && e.preventDefault(), 'Backspace' === e.key && (this.valueAtual = this.valueAtual.slice(0, this.valueAtual.length - 1), !this.valueAtual && (this.countBackspace += 1, this.countBackspace > 1))) { | ||
var t, n = l(this.querySelectorAll('emc-tag')); | ||
n.length > 0 && (n[n.length - 1].remove(), this.selected.pop(), this.selected = l(this.selected), this.value = this.selected.toString(), this.countBackspace = 1, null === (t = this._internals) || void 0 === t || t.setFormValue(this.value || ''), this.dispatchEvent(new Event('change', { | ||
if (('ArrowUp' === e.key || 'ArrowDown' === e.key) && e.preventDefault(), this.valueAtual = null !== (n = null === (t = this.shadowRoot.querySelector('input')) || void 0 === t ? void 0 : t.value) && void 0 !== n ? n : '', 'Backspace' === e.key && !this.valueAtual && (this.countBackspace += 1, this.countBackspace > 1)) { | ||
var t, n, i, r = l(this.querySelectorAll('emc-tag')); | ||
r.length > 0 && (r[r.length - 1].remove(), this.selected.pop(), this.selected = l(this.selected), this.value = this.selected.toString(), this.countBackspace = 1, null === (i = this._internals) || void 0 === i || i.setFormValue(this.value || ''), this.dispatchEvent(new Event('change', { | ||
bubbles: !0, | ||
@@ -185,0 +185,0 @@ composed: !0 |
@@ -135,3 +135,3 @@ function _assert_this_initialized(self) { | ||
"\n @keypress=", | ||
"\n @keydown=", | ||
"\n @keyup=", | ||
"\n ?required=", | ||
@@ -249,3 +249,3 @@ "\n ?readonly=", | ||
_proto.render = function render() { | ||
return html(_templateObject(), ifDefined(this.disabled || undefined), ifDefined(this.invalid || undefined), ifDefined(this.placeholder || undefined), this.type, live(this.displayValue()), this.handleChange, this.handleInput, this.handleKeypress, this.handleKeydown, this.required, this.readonly, this.disabled, this.autofocus); | ||
return html(_templateObject(), ifDefined(this.disabled || undefined), ifDefined(this.invalid || undefined), ifDefined(this.placeholder || undefined), this.type, live(this.displayValue()), this.handleChange, this.handleInput, this.handleKeypress, this.handleKeyup, this.required, this.readonly, this.disabled, this.autofocus); | ||
}; | ||
@@ -291,3 +291,3 @@ _proto.renderTextArea = function renderTextArea() { | ||
}; | ||
_proto.handleKeydown = function handleKeydown(event) { | ||
_proto.handleKeyup = function handleKeyup(event) { | ||
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') { | ||
@@ -294,0 +294,0 @@ event.preventDefault(); |
@@ -52,3 +52,3 @@ function t(t, e) { | ||
"\n @keypress=", | ||
"\n @keydown=", | ||
"\n @keyup=", | ||
"\n ?required=", | ||
@@ -154,3 +154,3 @@ "\n ?readonly=", | ||
}, m.render = function() { | ||
return u(r(), h(this.disabled || void 0), h(this.invalid || void 0), h(this.placeholder || void 0), this.type, y(this.displayValue()), this.handleChange, this.handleInput, this.handleKeypress, this.handleKeydown, this.required, this.readonly, this.disabled, this.autofocus); | ||
return u(r(), h(this.disabled || void 0), h(this.invalid || void 0), h(this.placeholder || void 0), this.type, y(this.displayValue()), this.handleChange, this.handleInput, this.handleKeypress, this.handleKeyup, this.required, this.readonly, this.disabled, this.autofocus); | ||
}, m.renderTextArea = function() { | ||
@@ -179,3 +179,3 @@ return u(s(), this.disabled ? -1 : 0, h(this.disabled || void 0), h(this.invalid || void 0), h(this.placeholder || void 0), this.type, y(this.displayValue()), this.handleChange, this.handleInput, this.handleKeypress, this.required, this.readonly, this.disabled, this.autofocus, h(this.rows > -1 ? this.rows : void 0), h(this.cols > -1 ? this.cols : void 0)); | ||
}, 'value', 'unmaskedValue') : this._value = e.value, e.value = this.displayValue(); | ||
}, m.handleKeydown = function(t) { | ||
}, m.handleKeyup = function(t) { | ||
('ArrowUp' === t.key || 'ArrowDown' === t.key) && t.preventDefault(); | ||
@@ -182,0 +182,0 @@ }, m.handleKeypress = function(t) { |
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
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
308091
3656