UNPKG

angular-l10n

Version:

An Angular library to translate messages, dates and numbers

223 lines 6.61 kB
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ /** * @record */ export function DateTimeOptions() { } if (false) { /** @type {?|undefined} */ DateTimeOptions.prototype.weekday; /** @type {?|undefined} */ DateTimeOptions.prototype.era; /** @type {?|undefined} */ DateTimeOptions.prototype.year; /** @type {?|undefined} */ DateTimeOptions.prototype.month; /** @type {?|undefined} */ DateTimeOptions.prototype.day; /** @type {?|undefined} */ DateTimeOptions.prototype.hour; /** @type {?|undefined} */ DateTimeOptions.prototype.minute; /** @type {?|undefined} */ DateTimeOptions.prototype.second; /** @type {?|undefined} */ DateTimeOptions.prototype.timeZoneName; /** @type {?|undefined} */ DateTimeOptions.prototype.hour12; } /** * @record */ export function DigitsOptions() { } if (false) { /** @type {?|undefined} */ DigitsOptions.prototype.minimumIntegerDigits; /** @type {?|undefined} */ DigitsOptions.prototype.minimumFractionDigits; /** @type {?|undefined} */ DigitsOptions.prototype.maximumFractionDigits; /** @type {?|undefined} */ DigitsOptions.prototype.minimumSignificantDigits; /** @type {?|undefined} */ DigitsOptions.prototype.maximumSignificantDigits; /** @type {?|undefined} */ DigitsOptions.prototype.useGrouping; } /** * @record */ export function RelativeTimeOptions() { } if (false) { /** @type {?|undefined} */ RelativeTimeOptions.prototype.numeric; /** @type {?|undefined} */ RelativeTimeOptions.prototype.style; } /** * @record */ export function Locale() { } if (false) { /** * ISO 639 two-letter or three-letter code. * @type {?} */ Locale.prototype.languageCode; /** * ISO 3166 two-letter, uppercase code. * @type {?|undefined} */ Locale.prototype.countryCode; /** * ISO 15924 four-letter script code. * @type {?|undefined} */ Locale.prototype.scriptCode; } /** * @record */ export function DefaultLocale() { } if (false) { /** @type {?|undefined} */ DefaultLocale.prototype.numberingSystem; /** @type {?|undefined} */ DefaultLocale.prototype.calendar; } /** * @record */ export function Language() { } if (false) { /** * ISO 639 two-letter or three-letter code. * @type {?} */ Language.prototype.code; /** * 'ltr' or 'rtl'. * @type {?} */ Language.prototype.dir; } /** * @record */ export function Decimal() { } if (false) { /** @type {?} */ Decimal.prototype.minusSign; /** @type {?} */ Decimal.prototype.decimalSeparator; /** @type {?} */ Decimal.prototype.thousandSeparator; } /** * @record */ export function Schema() { } if (false) { /** @type {?|undefined} */ Schema.prototype.currency; /** @type {?|undefined} */ Schema.prototype.timezone; /** @type {?|undefined} */ Schema.prototype.text; } /** * @record */ export function Log() { } if (false) { /** @type {?} */ Log.prototype.name; /** @type {?} */ Log.prototype.message; } /** @enum {number} */ var StorageStrategy = { Session: 0, Local: 1, Cookie: 2, Disabled: 3, }; export { StorageStrategy }; StorageStrategy[StorageStrategy.Session] = 'Session'; StorageStrategy[StorageStrategy.Local] = 'Local'; StorageStrategy[StorageStrategy.Cookie] = 'Cookie'; StorageStrategy[StorageStrategy.Disabled] = 'Disabled'; /** @enum {number} */ var ProviderType = { Fallback: 0, Static: 1, WebAPI: 2, }; export { ProviderType }; ProviderType[ProviderType.Fallback] = 'Fallback'; ProviderType[ProviderType.Static] = 'Static'; ProviderType[ProviderType.WebAPI] = 'WebAPI'; /** @enum {string} */ var ISOCode = { Language: 'languageCode', Country: 'countryCode', Script: 'scriptCode', }; export { ISOCode }; /** @enum {string} */ var ExtraCode = { NumberingSystem: 'numberingSystem', Calendar: 'calendar', Currency: 'currency', Timezone: 'timezone', }; export { ExtraCode }; /** @enum {string} */ var LogLevel = { Error: 'error', Warn: 'warn', Info: 'info', Log: 'log', Off: 'off', }; export { LogLevel }; /** @enum {number} */ var NumberFormatStyle = { Decimal: 0, Percent: 1, Currency: 2, }; export { NumberFormatStyle }; NumberFormatStyle[NumberFormatStyle.Decimal] = 'Decimal'; NumberFormatStyle[NumberFormatStyle.Percent] = 'Percent'; NumberFormatStyle[NumberFormatStyle.Currency] = 'Currency'; /** @type {?} */ export var NUMBER_FORMAT_REGEXP = /^(\d+)?\.((\d+)(\-(\d+))?)?$/; /** @type {?} */ export var ISO8601_DATE_REGEX = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; /** @type {?} */ export var FORMAT_ALIASES = { 'short': { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric' }, 'medium': { year: 'numeric', month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' }, 'long': { year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' }, 'full': { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' }, 'shortDate': { year: 'numeric', month: 'numeric', day: 'numeric' }, 'mediumDate': { year: 'numeric', month: 'short', day: 'numeric' }, 'longDate': { year: 'numeric', month: 'long', day: 'numeric' }, 'fullDate': { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }, 'shortTime': { hour: 'numeric', minute: 'numeric' }, 'mediumTime': { hour: 'numeric', minute: 'numeric', second: 'numeric' } }; /** @type {?} */ export var LOG_MESSAGES = { 'missingOnInit': "Missing 'ngOnInit' method: required by AoT compilation", 'missingOnDestroy': "Missing 'ngOnDestroy' method to cancel subscriptions: required by AoT compilation", 'missingLang': "Missing 'lang' parameter", 'missingDefaultLocale': "Missing 'defaultLocale' parameter", 'missingCurrency': "Missing 'currency' parameter", 'invalidNumberFormatAlias': "Invalid number format alias: the default format will be used", 'invalidDateFormatAlias': "Invalid date format alias: the default format will be used" }; //# sourceMappingURL=types.js.map