Browse Source

Js proto changes (#1730)

* Updating the phonemetadata.pb.js file, deleting handling for a field
that does not exist, and adding a couple of @final notes for the closure
compiler.
pull/1734/head
lararennie 9 years ago
committed by Keghani Kouzoujian
parent
commit
e1e5af3252
2 changed files with 7 additions and 58 deletions
  1. +2
    -2
      javascript/i18n/phonenumbers/demo-compiled.js
  2. +5
    -56
      javascript/i18n/phonenumbers/phonemetadata.pb.js

+ 2
- 2
javascript/i18n/phonenumbers/demo-compiled.js View File

@ -29,8 +29,8 @@ B.prototype.i=function(a,b){var c=a.h(),d;for(d in b){var e,f=b[d],g=!/[^0-9]/.t
limitations under the License.
*/
function E(){r.call(this)}m(E,r);var Ja=null;function F(){r.call(this)}m(F,r);var Ka=null;function G(){r.call(this)}m(G,r);var La=null;
E.prototype.h=function(){var a=Ja;a||(Ja=a=Ha(E,{0:{name:"NumberFormat",ba:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",u:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}}));return a};E.h=E.prototype.h;
F.prototype.h=function(){var a=Ka;a||(Ka=a=Ha(F,{0:{name:"PhoneNumberDesc",ba:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},3:{name:"possible_number_pattern",c:9,type:String},9:{name:"possible_length",u:!0,c:5,type:Number},10:{name:"possible_length_local_only",u:!0,c:5,type:Number},6:{name:"example_number",c:9,type:String},7:{name:"national_number_matcher_data",c:12,type:String},8:{name:"possible_number_matcher_data",c:12,type:String}}));return a};F.h=F.prototype.h;
E.prototype.h=function(){var a=Ja;a||(Ja=a=Ha(E,{0:{name:"NumberFormat",ba:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",u:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,defaultValue:!1,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}}));return a};E.h=E.prototype.h;
F.prototype.h=function(){var a=Ka;a||(Ka=a=Ha(F,{0:{name:"PhoneNumberDesc",ba:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},3:{name:"possible_number_pattern",c:9,type:String},9:{name:"possible_length",u:!0,c:5,type:Number},10:{name:"possible_length_local_only",u:!0,c:5,type:Number},6:{name:"example_number",c:9,type:String},7:{name:"national_number_matcher_data",c:12,type:String}}));return a};F.h=F.prototype.h;
G.prototype.h=function(){var a=La;a||(La=a=Ha(G,{0:{name:"PhoneMetadata",ba:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:F},2:{name:"fixed_line",c:11,type:F},3:{name:"mobile",c:11,type:F},4:{name:"toll_free",c:11,type:F},5:{name:"premium_rate",c:11,type:F},6:{name:"shared_cost",c:11,type:F},7:{name:"personal_number",c:11,type:F},8:{name:"voip",c:11,type:F},21:{name:"pager",c:11,type:F},25:{name:"uan",c:11,type:F},27:{name:"emergency",c:11,type:F},28:{name:"voicemail",c:11,type:F},
24:{name:"no_international_dialling",c:11,type:F},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,
type:Boolean},19:{name:"number_format",u:!0,c:11,type:E},20:{name:"intl_number_format",u:!0,c:11,type:E},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}}));return a};G.h=G.prototype.h;function Ma(){}m(Ma,A);Ma.prototype.f=function(a,b){var c=new a.b;c.g=this;c.b=b;c.a={};return c};Ma.prototype.i=function(){throw Error("Unimplemented");};function H(){}m(H,Ma);H.prototype.g=function(a){for(var b=Aa(a.h()),c=[],d=0;d<b.length;d++){var e=b[d];if(a.has(e)){var f=e.a;if(e.f){c[f]=[];for(var g=0;g<z(a,e.a);g++)c[f][g]=this.b(e,a.get(e,g))}else c[f]=this.b(e,a.get(e))}}Ca(a,function(a,b){c[a]=b});return c};H.prototype.b=function(a,b){return 8==a.b?b?1:0:A.prototype.b.apply(this,arguments)};H.prototype.a=function(a,b){return 8==a.b?!!b:A.prototype.a.apply(this,arguments)};function I(){r.call(this)}var Na;m(I,r);var Oa={la:1,ka:5,ja:10,ia:20};


+ 5
- 56
javascript/i18n/phonenumbers/phonemetadata.pb.js View File

@ -35,6 +35,7 @@ goog.require('goog.proto2.Message');
* Message NumberFormat.
* @constructor
* @extends {goog.proto2.Message}
* @final
*/
i18n.phonenumbers.NumberFormat = function() {
goog.proto2.Message.call(this);
@ -379,6 +380,7 @@ i18n.phonenumbers.NumberFormat.prototype.clearDomesticCarrierCodeFormattingRule
* Message PhoneNumberDesc.
* @constructor
* @extends {goog.proto2.Message}
* @final
*/
i18n.phonenumbers.PhoneNumberDesc = function() {
goog.proto2.Message.call(this);
@ -729,62 +731,12 @@ i18n.phonenumbers.PhoneNumberDesc.prototype.clearNationalNumberMatcherData = fun
};
/**
* Gets the value of the possible_number_matcher_data field.
* @return {?string} The value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.getPossibleNumberMatcherData = function() {
return /** @type {?string} */ (this.get$Value(8));
};
/**
* Gets the value of the possible_number_matcher_data field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.getPossibleNumberMatcherDataOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(8));
};
/**
* Sets the value of the possible_number_matcher_data field.
* @param {string} value The value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.setPossibleNumberMatcherData = function(value) {
this.set$Value(8, value);
};
/**
* @return {boolean} Whether the possible_number_matcher_data field has a value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.hasPossibleNumberMatcherData = function() {
return this.has$Value(8);
};
/**
* @return {number} The number of values in the possible_number_matcher_data field.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.possibleNumberMatcherDataCount = function() {
return this.count$Values(8);
};
/**
* Clears the values in the possible_number_matcher_data field.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.clearPossibleNumberMatcherData = function() {
this.clear$Field(8);
};
/**
* Message PhoneMetadata.
* @constructor
* @extends {goog.proto2.Message}
* @final
*/
i18n.phonenumbers.PhoneMetadata = function() {
goog.proto2.Message.call(this);
@ -2210,6 +2162,7 @@ i18n.phonenumbers.PhoneMetadata.prototype.clearLeadingZeroPossible = function()
* Message PhoneMetadataCollection.
* @constructor
* @extends {goog.proto2.Message}
* @final
*/
i18n.phonenumbers.PhoneMetadataCollection = function() {
goog.proto2.Message.call(this);
@ -2330,6 +2283,7 @@ i18n.phonenumbers.NumberFormat.prototype.getDescriptor = function() {
6: {
name: 'national_prefix_optional_when_formatting',
fieldType: goog.proto2.Message.FieldType.BOOL,
defaultValue: false,
type: Boolean
},
5: {
@ -2392,11 +2346,6 @@ i18n.phonenumbers.PhoneNumberDesc.prototype.getDescriptor = function() {
name: 'national_number_matcher_data',
fieldType: goog.proto2.Message.FieldType.BYTES,
type: String
},
8: {
name: 'possible_number_matcher_data',
fieldType: goog.proto2.Message.FieldType.BYTES,
type: String
}
};
i18n.phonenumbers.PhoneNumberDesc.descriptor_ = descriptor =


Loading…
Cancel
Save