avances en plantillas
This commit is contained in:
parent
0f84beacf1
commit
da0530d79b
2062 changed files with 598814 additions and 22 deletions
49
storage/public/dist/libs/imask/esm/controls/mask-element.js
vendored
Normal file
49
storage/public/dist/libs/imask/esm/controls/mask-element.js
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
import IMask from '../core/holder.js';
|
||||
|
||||
/** Generic element API to use with mask */
|
||||
class MaskElement {
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** Safely returns selection start */
|
||||
get selectionStart() {
|
||||
let start;
|
||||
try {
|
||||
start = this._unsafeSelectionStart;
|
||||
} catch {}
|
||||
return start != null ? start : this.value.length;
|
||||
}
|
||||
|
||||
/** Safely returns selection end */
|
||||
get selectionEnd() {
|
||||
let end;
|
||||
try {
|
||||
end = this._unsafeSelectionEnd;
|
||||
} catch {}
|
||||
return end != null ? end : this.value.length;
|
||||
}
|
||||
|
||||
/** Safely sets element selection */
|
||||
select(start, end) {
|
||||
if (start == null || end == null || start === this.selectionStart && end === this.selectionEnd) return;
|
||||
try {
|
||||
this._unsafeSelect(start, end);
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** */
|
||||
get isActive() {
|
||||
return false;
|
||||
}
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
}
|
||||
IMask.MaskElement = MaskElement;
|
||||
|
||||
export { MaskElement as default };
|
||||
Loading…
Add table
Add a link
Reference in a new issue