@true-directive/base
Version:
The set of base classes for the TrueDirective Grid
23 lines (22 loc) • 787 B
JavaScript
/**
* Copyright (c) 2018-2019 Aleksey Melnikov, True Directive Company.
* @link https://truedirective.com/
* @license MIT
*/
import { MaskSectionValue } from './mask-section-value.class';
var MaskValue = /** @class */ (function () {
function MaskValue() {
}
MaskValue.prototype.nextSectionPos = function () {
return this.before.length + this.section.length + this.delimiter.length;
};
MaskValue.prototype.update = function (s, selStart) {
this.section = new MaskSectionValue(s, this.sectionPos, selStart);
return this.value();
};
MaskValue.prototype.value = function () {
return this.before + this.section.value() + this.delimiter + this.after;
};
return MaskValue;
}());
export { MaskValue };