@maskito/core
Advanced tools
Comparing version 2.3.2 to 2.4.0
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function getContentEditableSelection(element) { | ||
@@ -46,2 +44,5 @@ const { anchorOffset = 0, focusOffset = 0 } = element.ownerDocument.getSelection() || {}; | ||
} | ||
select() { | ||
this.setSelectionRange(0, this.value.length); | ||
} | ||
} | ||
@@ -371,3 +372,2 @@ function maskitoAdaptContentEditable(element) { | ||
*/ | ||
// eslint-disable-next-line sonar/deprecation | ||
event.keyCode === hotkeyCode); | ||
@@ -374,0 +374,0 @@ } |
@@ -42,2 +42,5 @@ function getContentEditableSelection(element) { | ||
} | ||
select() { | ||
this.setSelectionRange(0, this.value.length); | ||
} | ||
} | ||
@@ -367,3 +370,2 @@ function maskitoAdaptContentEditable(element) { | ||
*/ | ||
// eslint-disable-next-line sonar/deprecation | ||
event.keyCode === hotkeyCode); | ||
@@ -370,0 +372,0 @@ } |
{ | ||
"name": "@maskito/core", | ||
"version": "2.3.2", | ||
"version": "2.4.0", | ||
"description": "The main zero-dependency and framework-agnostic Maskito's package to create an input mask", | ||
@@ -34,2 +34,2 @@ "keywords": [ | ||
"main": "./index.cjs.js" | ||
} | ||
} |
@@ -1,3 +0,3 @@ | ||
export type TextfieldLike = Pick<HTMLInputElement, 'maxLength' | 'selectionEnd' | 'selectionStart' | 'setSelectionRange' | 'value'>; | ||
export type TextfieldLike = Pick<HTMLInputElement, 'maxLength' | 'select' | 'selectionEnd' | 'selectionStart' | 'setSelectionRange' | 'value'>; | ||
export type MaskitoElement = HTMLElement & TextfieldLike; | ||
//# sourceMappingURL=maskito-element.d.ts.map |
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
91037
90
1654