PATH:
opt
/
bitninja-dispatcher
/
node_modules
/
libphonenumber-js
/
build
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } var AsYouTypeState = /*#__PURE__*/function () { function AsYouTypeState(_ref) { var onCountryChange = _ref.onCountryChange, onCallingCodeChange = _ref.onCallingCodeChange; _classCallCheck(this, AsYouTypeState); this.onCountryChange = onCountryChange; this.onCallingCodeChange = onCallingCodeChange; } _createClass(AsYouTypeState, [{ key: "reset", value: function reset(defaultCountry, defaultCallingCode) { this.international = false; this.IDDPrefix = undefined; this.missingPlus = undefined; this.callingCode = undefined; this.digits = ''; this.resetNationalSignificantNumber(); this.initCountryAndCallingCode(defaultCountry, defaultCallingCode); } }, { key: "resetNationalSignificantNumber", value: function resetNationalSignificantNumber() { this.nationalSignificantNumber = this.getNationalDigits(); this.nationalSignificantNumberMatchesInput = true; this.nationalPrefix = undefined; this.carrierCode = undefined; this.complexPrefixBeforeNationalSignificantNumber = undefined; } }, { key: "update", value: function update(properties) { for (var _i = 0, _Object$keys = Object.keys(properties); _i < _Object$keys.length; _i++) { var key = _Object$keys[_i]; this[key] = properties[key]; } } }, { key: "initCountryAndCallingCode", value: function initCountryAndCallingCode(country, callingCode) { this.setCountry(country); this.setCallingCode(callingCode); } }, { key: "setCountry", value: function setCountry(country) { this.country = country; this.onCountryChange(country); } }, { key: "setCallingCode", value: function setCallingCode(callingCode) { this.callingCode = callingCode; this.onCallingCodeChange(callingCode, this.country); } }, { key: "startInternationalNumber", value: function startInternationalNumber(country, callingCode) { // Prepend the `+` to parsed input. this.international = true; // If a default country was set then reset it // because an explicitly international phone // number is being entered. this.initCountryAndCallingCode(country, callingCode); } }, { key: "appendDigits", value: function appendDigits(nextDigits) { this.digits += nextDigits; } }, { key: "appendNationalSignificantNumberDigits", value: function appendNationalSignificantNumberDigits(nextDigits) { this.nationalSignificantNumber += nextDigits; } /** * Returns the part of `this.digits` that corresponds to the national number. * Basically, all digits that have been input by the user, except for the * international prefix and the country calling code part * (if the number is an international one). * @return {string} */ }, { key: "getNationalDigits", value: function getNationalDigits() { if (this.international) { return this.digits.slice((this.IDDPrefix ? this.IDDPrefix.length : 0) + (this.callingCode ? this.callingCode.length : 0)); } return this.digits; } }, { key: "getDigitsWithoutInternationalPrefix", value: function getDigitsWithoutInternationalPrefix() { if (this.international) { if (this.IDDPrefix) { return this.digits.slice(this.IDDPrefix.length); } } return this.digits; } }]); return AsYouTypeState; }(); exports["default"] = AsYouTypeState; //# sourceMappingURL=AsYouTypeState.js.map
[+]
..
[-] parsePhoneNumberFromString.test.js
[edit]
[-] AsYouTypeFormatter.PatternMatcher.js.map
[edit]
[-] parseIncompletePhoneNumber.js.map
[edit]
[-] metadata.js
[edit]
[-] isPossibleNumber_.js.map
[edit]
[-] PhoneNumber.js
[edit]
[-] findNumbers.js.map
[edit]
[-] parsePhoneNumber.js
[edit]
[-] isPossibleNumber.test.js.map
[edit]
[-] isPossiblePhoneNumber.test.js
[edit]
[-] findNumbers.js
[edit]
[-] isPossibleNumber.js
[edit]
[-] getNumberType.js
[edit]
[-] getNumberType.js.map
[edit]
[-] AsYouTypeFormatter.PatternMatcher.js
[edit]
[-] parseIncompletePhoneNumber.test.js.map
[edit]
[-] parse_.js
[edit]
[-] getExampleNumber.js.map
[edit]
[-] format.test.js.map
[edit]
[-] parsePhoneNumber_.js.map
[edit]
[-] getExampleNumber.test.js
[edit]
[-] AsYouTypeState.js.map
[edit]
[-] formatNumberForMobileDialing.js.map
[edit]
[-] formatIncompletePhoneNumber.test.js.map
[edit]
[-] AsYouTypeParser.js
[edit]
[-] getExampleNumber.test.js.map
[edit]
[-] validate_.js
[edit]
[-] PhoneNumberMatcher.js.map
[edit]
[-] parsePhoneNumberFromString_.js
[edit]
[-] getNumberType.test.js.map
[edit]
[-] getCountryCallingCode.js.map
[edit]
[-] AsYouTypeFormatter.PatternMatcher.test.js.map
[edit]
[-] searchPhoneNumbersInText.test.js
[edit]
[-] isValidPhoneNumber.test.js.map
[edit]
[-] format_.js.map
[edit]
[-] constants.js.map
[edit]
[-] parse.js.map
[edit]
[-] AsYouTypeFormatter.js.map
[edit]
[-] getCountries.test.js
[edit]
[-] searchPhoneNumbersInText.js
[edit]
[-] AsYouTypeFormatter.PatternParser.test.js
[edit]
[-] isPossiblePhoneNumber.test.js.map
[edit]
[-] PhoneNumber.test.js.map
[edit]
[-] parsePhoneNumber.test.js.map
[edit]
[-] formatNumberForMobileDialing.js
[edit]
[-] AsYouTypeFormatter.util.test.js.map
[edit]
[-] getCountryCallingCode.js
[edit]
[-] searchNumbers.test.js.map
[edit]
[-] findPhoneNumbers.test.js
[edit]
[-] package.json
[edit]
[-] isPossibleNumber.js.map
[edit]
[-] parsePhoneNumber.test.js
[edit]
[-] isValidPhoneNumber.test.js
[edit]
[-] metadata.test.js.map
[edit]
[-] searchPhoneNumbersInText.test.js.map
[edit]
[-] AsYouTypeFormatter.PatternParser.test.js.map
[edit]
[-] AsYouType.test.js
[edit]
[-] isPossiblePhoneNumber.js.map
[edit]
[-] getCountries.js
[edit]
[-] validate.test.js
[edit]
[-] getCountryCallingCode.test.js.map
[edit]
[-] AsYouTypeFormatter.js
[edit]
[-] PhoneNumberMatcher.js
[edit]
[-] validate.test.js.map
[edit]
[-] findNumbers_.js
[edit]
[-] getCountries.js.map
[edit]
[-] formatIncompletePhoneNumber.test.js
[edit]
[-] format.test.js
[edit]
[-] findPhoneNumbers.js
[edit]
[-] searchNumbers.js
[edit]
[-] findPhoneNumbersInText.test.js.map
[edit]
[-] findPhoneNumbersInText.js
[edit]
[-] findPhoneNumbersInText.test.js
[edit]
[-] metadata.test.js
[edit]
[-] validatePhoneNumberLength.test.js.map
[edit]
[-] parse.js
[edit]
[-] validate_.js.map
[edit]
[-] validatePhoneNumberLength.test.js
[edit]
[-] format.js.map
[edit]
[-] findNumbers.test.js
[edit]
[-] AsYouTypeFormatter.complete.js.map
[edit]
[+]
tools
[-] AsYouTypeParser.js.map
[edit]
[-] parsePhoneNumberFromString.js
[edit]
[-] getCountryCallingCode.test.js
[edit]
[-] isPossibleNumber.test.js
[edit]
[-] findPhoneNumbers.test.js.map
[edit]
[-] AsYouTypeFormatter.PatternParser.js.map
[edit]
[-] parse.test.js
[edit]
[-] parsePhoneNumber_.js
[edit]
[-] parsePhoneNumberFromString_.js.map
[edit]
[-] ParseError.js
[edit]
[-] searchNumbers.js.map
[edit]
[-] PhoneNumber.test.js
[edit]
[-] AsYouTypeFormatter.PatternMatcher.test.js
[edit]
[-] getNumberType.test.js
[edit]
[-] AsYouTypeFormatter.PatternParser.js
[edit]
[-] validatePhoneNumberLength.js
[edit]
[-] isValidPhoneNumber.js
[edit]
[-] PhoneNumber.js.map
[edit]
[-] parsePhoneNumberFromString.js.map
[edit]
[-] isValidNumberForRegion.js.map
[edit]
[+]
helpers
[-] parseIncompletePhoneNumber.test.js
[edit]
[-] formatNumberForMobileDialing.test.js
[edit]
[-] isValidNumberForRegion_.js.map
[edit]
[-] parse.test.js.map
[edit]
[-] isValidNumberForRegion_.js
[edit]
[-] PhoneNumberMatcher.test.js
[edit]
[-] isPossibleNumber_.js
[edit]
[-] AsYouTypeFormatter.util.js
[edit]
[-] format.js
[edit]
[-] isValidNumberForRegion.test.js
[edit]
[-] AsYouType.js
[edit]
[-] AsYouTypeFormatter.complete.js
[edit]
[-] formatNumberForMobileDialing.test.js.map
[edit]
[+]
findNumbers
[-] findNumbers_.js.map
[edit]
[-] getExampleNumber.js
[edit]
[-] format_.js
[edit]
[-] isPossiblePhoneNumber.js
[edit]
[-] findPhoneNumbers_.js
[edit]
[-] isValidNumberForRegion.test.js.map
[edit]
[-] AsYouType.test.js.map
[edit]
[-] isValidNumberForRegion.js
[edit]
[-] ParseError.js.map
[edit]
[-] parsePhoneNumberFromString.test.js.map
[edit]
[-] findPhoneNumbersInText.js.map
[edit]
[-] findPhoneNumbers.js.map
[edit]
[-] getCountries.test.js.map
[edit]
[-] validate.js
[edit]
[-] AsYouTypeState.js
[edit]
[-] parsePhoneNumber.js.map
[edit]
[-] formatIncompletePhoneNumber.js
[edit]
[-] AsYouTypeFormatter.util.js.map
[edit]
[-] constants.js
[edit]
[-] validate.js.map
[edit]
[-] PhoneNumberMatcher.test.js.map
[edit]
[-] parse_.js.map
[edit]
[-] findNumbers.test.js.map
[edit]
[-] findPhoneNumbers_.js.map
[edit]
[-] metadata.js.map
[edit]
[-] parseIncompletePhoneNumber.js
[edit]
[-] searchNumbers.test.js
[edit]
[-] AsYouType.js.map
[edit]
[-] searchPhoneNumbersInText.js.map
[edit]
[-] validatePhoneNumberLength.js.map
[edit]
[-] AsYouTypeFormatter.util.test.js
[edit]
[-] formatIncompletePhoneNumber.js.map
[edit]
[-] isValidPhoneNumber.js.map
[edit]