avances en plantillas
This commit is contained in:
parent
0f84beacf1
commit
da0530d79b
2062 changed files with 598814 additions and 22 deletions
37
storage/public/dist/libs/imask/esm/controls/html-input-mask-element.js
vendored
Normal file
37
storage/public/dist/libs/imask/esm/controls/html-input-mask-element.js
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import HTMLMaskElement from './html-mask-element.js';
|
||||
import IMask from '../core/holder.js';
|
||||
import './mask-element.js';
|
||||
|
||||
/** Bridge between InputElement and {@link Masked} */
|
||||
class HTMLInputMaskElement extends HTMLMaskElement {
|
||||
/** InputElement to use mask on */
|
||||
|
||||
constructor(input) {
|
||||
super(input);
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
/** Returns InputElement selection start */
|
||||
get _unsafeSelectionStart() {
|
||||
return this.input.selectionStart != null ? this.input.selectionStart : this.value.length;
|
||||
}
|
||||
|
||||
/** Returns InputElement selection end */
|
||||
get _unsafeSelectionEnd() {
|
||||
return this.input.selectionEnd;
|
||||
}
|
||||
|
||||
/** Sets InputElement selection */
|
||||
_unsafeSelect(start, end) {
|
||||
this.input.setSelectionRange(start, end);
|
||||
}
|
||||
get value() {
|
||||
return this.input.value;
|
||||
}
|
||||
set value(value) {
|
||||
this.input.value = value;
|
||||
}
|
||||
}
|
||||
IMask.HTMLMaskElement = HTMLMaskElement;
|
||||
|
||||
export { HTMLInputMaskElement as default };
|
||||
Loading…
Add table
Add a link
Reference in a new issue