function FormattedDate(props, context) {
classCallCheck(this, FormattedDate);
var _this = possibleConstructorReturn(this, (FormattedDate.__proto__ || Object.getPrototypeOf(FormattedDate)).call(this, props
, context));
invariantIntlContext(context);
return _this;
}n/a
function FormattedHTMLMessage(props, context) {
classCallCheck(this, FormattedHTMLMessage);
var _this = possibleConstructorReturn(this, (FormattedHTMLMessage.__proto__ || Object.getPrototypeOf(FormattedHTMLMessage)).
call(this, props, context));
invariantIntlContext(context);
return _this;
}n/a
function FormattedMessage(props, context) {
classCallCheck(this, FormattedMessage);
var _this = possibleConstructorReturn(this, (FormattedMessage.__proto__ || Object.getPrototypeOf(FormattedMessage)).call(this
, props, context));
invariantIntlContext(context);
return _this;
}n/a
function FormattedNumber(props, context) {
classCallCheck(this, FormattedNumber);
var _this = possibleConstructorReturn(this, (FormattedNumber.__proto__ || Object.getPrototypeOf(FormattedNumber)).call(this,
props, context));
invariantIntlContext(context);
return _this;
}n/a
function FormattedPlural(props, context) {
classCallCheck(this, FormattedPlural);
var _this = possibleConstructorReturn(this, (FormattedPlural.__proto__ || Object.getPrototypeOf(FormattedPlural)).call(this,
props, context));
invariantIntlContext(context);
return _this;
}n/a
function FormattedRelative(props, context) {
classCallCheck(this, FormattedRelative);
var _this = possibleConstructorReturn(this, (FormattedRelative.__proto__ || Object.getPrototypeOf(FormattedRelative)).call(this
, props, context));
invariantIntlContext(context);
var now = isFinite(props.initialNow) ? Number(props.initialNow) : context.intl.now();
// `now` is stored as state so that `render()` remains a function of
// props + state, instead of accessing `Date.now()` inside `render()`.
_this.state = { now: now };
return _this;
}n/a
function FormattedTime(props, context) {
classCallCheck(this, FormattedTime);
var _this = possibleConstructorReturn(this, (FormattedTime.__proto__ || Object.getPrototypeOf(FormattedTime)).call(this, props
, context));
invariantIntlContext(context);
return _this;
}n/a
function IntlProvider(props) {
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
classCallCheck(this, IntlProvider);
var _this = possibleConstructorReturn(this, (IntlProvider.__proto__ || Object.getPrototypeOf(IntlProvider)).call(this, props
, context));
invariant(typeof Intl !== 'undefined', '[React Intl] The `Intl` APIs must be available in the runtime, ' + 'and do not appear
to be built-in. An `Intl` polyfill should be loaded.\n' + 'See: http://formatjs.io/guides/runtime-environments/');
var intlContext = context.intl;
// Used to stabilize time when performing an initial rendering so that
// all relative times use the same reference "now" time.
var initialNow = void 0;
if (isFinite(props.initialNow)) {
initialNow = Number(props.initialNow);
} else {
// When an `initialNow` isn't provided via `props`, look to see an
// <IntlProvider> exists in the ancestry and call its `now()`
// function to propagate its value for "now".
initialNow = intlContext ? intlContext.now() : Date.now();
}
// Creating `Intl*` formatters is expensive. If there's a parent
// `<IntlProvider>`, then its formatters will be used. Otherwise, this
// memoize the `Intl*` constructors and cache them for the lifecycle of
// this IntlProvider instance.
var _ref = intlContext || {},
_ref$formatters = _ref.formatters,
formatters = _ref$formatters === undefined ? {
getDateTimeFormat: memoizeIntlConstructor(Intl.DateTimeFormat),
getNumberFormat: memoizeIntlConstructor(Intl.NumberFormat),
getMessageFormat: memoizeIntlConstructor(IntlMessageFormat),
getRelativeFormat: memoizeIntlConstructor(IntlRelativeFormat),
getPluralFormat: memoizeIntlConstructor(IntlPluralFormat)
} : _ref$formatters;
_this.state = _extends({}, formatters, {
// Wrapper to provide stable "now" time for initial render.
now: function now() {
return _this._didDisplay ? Date.now() : initialNow;
}
});
return _this;
}n/a
function addLocaleData() {
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var locales = Array.isArray(data) ? data : [data];
locales.forEach(function (localeData) {
if (localeData && localeData.locale) {
IntlMessageFormat.__addLocaleData(localeData);
IntlRelativeFormat.__addLocaleData(localeData);
}
});
}n/a
function defineMessages(messageDescriptors) {
// This simply returns what's passed-in because it's meant to be a hook for
// babel-plugin-react-intl.
return messageDescriptors;
}n/a
function injectIntl(WrappedComponent) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _options$intlPropName = options.intlPropName,
intlPropName = _options$intlPropName === undefined ? 'intl' : _options$intlPropName,
_options$withRef = options.withRef,
withRef = _options$withRef === undefined ? false : _options$withRef;
var InjectIntl = function (_Component) {
inherits(InjectIntl, _Component);
function InjectIntl(props, context) {
classCallCheck(this, InjectIntl);
var _this = possibleConstructorReturn(this, (InjectIntl.__proto__ || Object.getPrototypeOf(InjectIntl)).call(this, props
, context));
invariantIntlContext(context);
return _this;
}
createClass(InjectIntl, [{
key: 'getWrappedInstance',
value: function getWrappedInstance() {
invariant(withRef, '[React Intl] To access the wrapped instance, ' + 'the `{withRef: true}` option must be set when
calling: ' + '`injectIntl()`');
return this.refs.wrappedInstance;
}
}, {
key: 'render',
value: function render() {
return React__default.createElement(WrappedComponent, _extends({}, this.props, defineProperty({}, intlPropName,
this.context.intl), {
ref: withRef ? 'wrappedInstance' : null
}));
}
}]);
return InjectIntl;
}(React.Component);
InjectIntl.displayName = 'InjectIntl(' + getDisplayName(WrappedComponent) + ')';
InjectIntl.contextTypes = {
intl: intlShape
};
InjectIntl.WrappedComponent = WrappedComponent;
return InjectIntl;
}n/a
intlShape = function () { [native code] }n/a
intlShape = function () { [native code] }n/a
isRequired = function () { [native code] }n/a