How to use the text-mask-addons/dist/textMaskAddons.createNumberMask function in text-mask-addons

To help you get started, we’ve selected a few text-mask-addons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eosrio / simpleos / src / app / dashboard / send / send.component.ts View on Github external
) {
		this.sendModal = false;
		this.newContactModal = false;
		this.contactExist = true;
		this.fromAccount = '';
		this.busy = false;
		this.sendForm = this.fb.group ( {
			token: [ aService.activeChain[ 'symbol' ] , Validators.required ] ,
			to: [ '' , Validators.required ] ,
			amount: [ '' , Validators.required ] ,
			memo: [ '' ] ,
			add: [ false ] ,
			alias: [ '' ] ,
		} );

		this.numberMask = createNumberMask ( {
			prefix: '' ,
			allowDecimal: true ,
			includeThousandsSeparator: false ,
			decimalLimit: this.aService.activeChain.precision ,
		} );

		this.contactForm = this.fb.group ( {
			account: [ '' , Validators.required ] ,
			name: [ '' , Validators.required ] ,
		} );
		this.searchForm = this.fb.group ( {
			search: [ '' ]
		} );
		this.confirmForm = this.fb.group ( {
			pass: [ '' , [ Validators.required , Validators.minLength ( 10 ) ] ]
		} );
github eosrio / simpleos / src / app / dashboard / dashboard.component.js View on Github external
this.generated = false;
        this.final_creator = '';
        this.final_active = '';
        this.final_owner = '';
        this.final_name = '';
        this.delegate_transfer = false;
        this.confirmationID = '';
        this.success = false;
        this.wrongwalletpass = '';
        this.numberMask = textMaskAddons_1.createNumberMask({
            prefix: '',
            allowDecimal: true,
            includeThousandsSeparator: false,
            decimalLimit: 4,
        });
        this.intMask = textMaskAddons_1.createNumberMask({
            prefix: '',
            allowDecimal: false,
            includeThousandsSeparator: false
        });
        this.selectedAccRem = null;
        this.accRemovalIndex = null;
        this.selectedTab = '';
        this.importedPublicKey = '';
        this.newAccountModal = false;
        this.importKeyModal = false;
        this.deleteAccModal = false;
        this.appVersion = window['appversion'];
        this.passform = this.fb.group({
            matchingPassword: this.fb.group({
                pass1: ['', [forms_1.Validators.required, forms_1.Validators.minLength(10)]],
                pass2: ['', [forms_1.Validators.required, forms_1.Validators.minLength(10)]]
github eosrio / simpleos / src / app / dashboard / send / send.component.js View on Github external
function SendComponent(fb, aService, eos, crypto, toaster) {
        this.fb = fb;
        this.aService = aService;
        this.eos = eos;
        this.crypto = crypto;
        this.toaster = toaster;
        this.numberMask = textMaskAddons_1.createNumberMask({
            prefix: '',
            allowDecimal: true,
            includeThousandsSeparator: false,
            decimalLimit: 4,
        });
        this.token_balance = 0.0000;
        this.selectedToken = {};
        this.selectedEditContact = null;
        this.selectedDeleteContactName = '';
        this.knownExchanges = [
            'bitfinexdep1', 'krakenkraken', 'chainceoneos',
            'huobideposit', 'zbeoscharge1', 'okbtothemoon',
            'gateiowallet', 'eosusrwallet', 'binancecleos'
        ];
        this.memoMsg = 'optional';
        this.sendModal = false;
github eosrio / simpleos / src / app / dashboard / vote / vote.component.js View on Github external
function VoteComponent(voteService, http, aService, eos, crypto, fb, toaster, cdr) {
        this.voteService = voteService;
        this.http = http;
        this.aService = aService;
        this.eos = eos;
        this.crypto = crypto;
        this.fb = fb;
        this.toaster = toaster;
        this.cdr = cdr;
        this.minToStake = 0.01;
        this.numberMask = textMaskAddons_1.createNumberMask({
            prefix: '',
            allowDecimal: true,
            includeThousandsSeparator: false,
            decimalLimit: 4,
        });
        this.percentMask = textMaskAddons_1.createNumberMask({
            prefix: '',
            allowDecimal: true,
            includeThousandsSeparator: false,
            decimalLimit: 1,
            integerLimit: 3,
        });
        this.showAdvancedRatio = false;
        this.initOptions = {
            renderer: 'z',
            width: 1000,
github eosrio / simpleos / src / app / dashboard / dashboard.component.js View on Github external
this.ownerpk = '';
        this.ownerpub = '';
        this.activepk = '';
        this.activepub = '';
        this.agreeKeys = false;
        this.generating = false;
        this.generated = false;
        this.final_creator = '';
        this.final_active = '';
        this.final_owner = '';
        this.final_name = '';
        this.delegate_transfer = false;
        this.confirmationID = '';
        this.success = false;
        this.wrongwalletpass = '';
        this.numberMask = textMaskAddons_1.createNumberMask({
            prefix: '',
            allowDecimal: true,
            includeThousandsSeparator: false,
            decimalLimit: 4,
        });
        this.intMask = textMaskAddons_1.createNumberMask({
            prefix: '',
            allowDecimal: false,
            includeThousandsSeparator: false
        });
        this.selectedAccRem = null;
        this.accRemovalIndex = null;
        this.selectedTab = '';
        this.importedPublicKey = '';
        this.newAccountModal = false;
        this.importKeyModal = false;
github eosrio / simpleos / src / app / dashboard / vote / vote.component.js View on Github external
this.voteService = voteService;
        this.http = http;
        this.aService = aService;
        this.eos = eos;
        this.crypto = crypto;
        this.fb = fb;
        this.toaster = toaster;
        this.cdr = cdr;
        this.minToStake = 0.01;
        this.numberMask = textMaskAddons_1.createNumberMask({
            prefix: '',
            allowDecimal: true,
            includeThousandsSeparator: false,
            decimalLimit: 4,
        });
        this.percentMask = textMaskAddons_1.createNumberMask({
            prefix: '',
            allowDecimal: true,
            includeThousandsSeparator: false,
            decimalLimit: 1,
            integerLimit: 3,
        });
        this.showAdvancedRatio = false;
        this.initOptions = {
            renderer: 'z',
            width: 1000,
            height: 400
        };
        this.net_weight = '';
        this.cpu_weight = '';
        this.stakingRatio = 75;
        this.voteService.bpsByChain(this.aService.activeChain.id);
github eosrio / simpleos / src / app / dashboard / acc_resources / resources.component.js View on Github external
this.errormsgD = '';
        this.errormsgD2 = '';
        this.errormsgD3 = '';
        this.busy = false;
        this.ramActionModal = false;
        this.wrongpassbuy = '';
        this.wrongpasssell = '';
        this.wrongpassundelegate = '';
        this.wrongpassdelegate = '';
        this.errormsg = '';
        this.errormsg2 = '';
        this.errormsgeos = '';
        this.handleIcon = 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,' +
            '8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z';
        this.sellValue = 0;
        this.numberMask = textMaskAddons_1.createNumberMask({
            prefix: '',
            allowDecimal: true,
            includeThousandsSeparator: false,
            decimalLimit: 4
        });
        this.dataDT = [];
        this.dataVAL = [];
        this.ram_chartMerge = [];
        this.wrongpassbuy = '';
        this.wrongpasssell = '';
        this.wrongpassundelegate = '';
        this.wrongpassdelegate = '';
        this.errormsg = '';
        this.errormsg2 = '';
        this.errormsgeos = '';
        this.errormsgD = '';
github BioPhoton / angular-formatter-parser / src / text-mask-implementation / textMask.service.ts View on Github external
getConfig(config: ITextMaskConfigOptions, addon?: { name, config }): ITextMaskConfigOptions {
    const safeConfig: ITextMaskConfigOptions = this.getBasicConfig(config);

    const addonName = (addon && 'name' in addon) ? addon.name : '';
    switch (addonName) {
      case 'createNumberMask':
        const numberMask = createNumberMask(addon.config);
        safeConfig.mask = numberMask;
        break;
      case 'emailMask':
        safeConfig.mask = emailMask;
        break;
      case 'createAutoCorrectedDatePipe':
        safeConfig.pipe = createAutoCorrectedDatePipe('mm/dd/yyyy');
        safeConfig.keepCharPositions = true;
        break;
    }


    return safeConfig;
  }