UNPKG

react-intl

Version:

Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.

47 lines (46 loc) 4.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FormattedTimeParts = exports.FormattedDateParts = exports.FormattedDisplayName = exports.FormattedList = exports.FormattedNumber = exports.FormattedTime = exports.FormattedDate = exports.defineMessage = exports.defineMessages = void 0; var createFormattedComponent_1 = require("./src/components/createFormattedComponent"); var intl_1 = require("@formatjs/intl"); Object.defineProperty(exports, "createIntlCache", { enumerable: true, get: function () { return intl_1.createIntlCache; } }); Object.defineProperty(exports, "UnsupportedFormatterError", { enumerable: true, get: function () { return intl_1.UnsupportedFormatterError; } }); Object.defineProperty(exports, "InvalidConfigError", { enumerable: true, get: function () { return intl_1.InvalidConfigError; } }); Object.defineProperty(exports, "MissingDataError", { enumerable: true, get: function () { return intl_1.MissingDataError; } }); Object.defineProperty(exports, "MessageFormatError", { enumerable: true, get: function () { return intl_1.MessageFormatError; } }); Object.defineProperty(exports, "MissingTranslationError", { enumerable: true, get: function () { return intl_1.MissingTranslationError; } }); Object.defineProperty(exports, "ReactIntlErrorCode", { enumerable: true, get: function () { return intl_1.IntlErrorCode; } }); Object.defineProperty(exports, "ReactIntlError", { enumerable: true, get: function () { return intl_1.IntlError; } }); function defineMessages(msgs) { return msgs; } exports.defineMessages = defineMessages; function defineMessage(msg) { return msg; } exports.defineMessage = defineMessage; var injectIntl_1 = require("./src/components/injectIntl"); Object.defineProperty(exports, "injectIntl", { enumerable: true, get: function () { return injectIntl_1.default; } }); Object.defineProperty(exports, "RawIntlProvider", { enumerable: true, get: function () { return injectIntl_1.Provider; } }); Object.defineProperty(exports, "IntlContext", { enumerable: true, get: function () { return injectIntl_1.Context; } }); var useIntl_1 = require("./src/components/useIntl"); Object.defineProperty(exports, "useIntl", { enumerable: true, get: function () { return useIntl_1.default; } }); var provider_1 = require("./src/components/provider"); Object.defineProperty(exports, "IntlProvider", { enumerable: true, get: function () { return provider_1.default; } }); Object.defineProperty(exports, "createIntl", { enumerable: true, get: function () { return provider_1.createIntl; } }); // IMPORTANT: Explicit here to prevent api-extractor from outputing `import('./src/types').CustomFormatConfig` exports.FormattedDate = createFormattedComponent_1.createFormattedComponent('formatDate'); exports.FormattedTime = createFormattedComponent_1.createFormattedComponent('formatTime'); exports.FormattedNumber = createFormattedComponent_1.createFormattedComponent('formatNumber'); exports.FormattedList = createFormattedComponent_1.createFormattedComponent('formatList'); exports.FormattedDisplayName = createFormattedComponent_1.createFormattedComponent('formatDisplayName'); exports.FormattedDateParts = createFormattedComponent_1.createFormattedDateTimePartsComponent('formatDate'); exports.FormattedTimeParts = createFormattedComponent_1.createFormattedDateTimePartsComponent('formatTime'); var createFormattedComponent_2 = require("./src/components/createFormattedComponent"); Object.defineProperty(exports, "FormattedNumberParts", { enumerable: true, get: function () { return createFormattedComponent_2.FormattedNumberParts; } }); var relative_1 = require("./src/components/relative"); Object.defineProperty(exports, "FormattedRelativeTime", { enumerable: true, get: function () { return relative_1.default; } }); var plural_1 = require("./src/components/plural"); Object.defineProperty(exports, "FormattedPlural", { enumerable: true, get: function () { return plural_1.default; } }); var message_1 = require("./src/components/message"); Object.defineProperty(exports, "FormattedMessage", { enumerable: true, get: function () { return message_1.default; } });