react-intl
Advanced tools
+5
-5
| { | ||
| "name": "react-intl", | ||
| "description": "Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.", | ||
| "version": "8.0.9", | ||
| "version": "8.0.10", | ||
| "license": "BSD-3-Clause", | ||
@@ -17,6 +17,6 @@ "author": "Eric Ferraiuolo <edf@ericf.me>", | ||
| "tslib": "^2.8.0", | ||
| "@formatjs/ecma402-abstract": "3.0.6", | ||
| "@formatjs/icu-messageformat-parser": "3.2.0", | ||
| "@formatjs/intl": "4.0.7", | ||
| "intl-messageformat": "11.0.7" | ||
| "@formatjs/ecma402-abstract": "3.0.7", | ||
| "@formatjs/intl": "4.0.8", | ||
| "@formatjs/icu-messageformat-parser": "3.2.1", | ||
| "intl-messageformat": "11.0.8" | ||
| }, | ||
@@ -23,0 +23,0 @@ "peerDependencies": { |
| import { __rest } from "tslib"; | ||
| import { jsx as _jsx } from "react/jsx-runtime"; | ||
| import * as React from 'react'; | ||
@@ -58,3 +59,3 @@ import useIntl from './useIntl.js'; | ||
| var Text = intl.textComponent || React.Fragment; | ||
| return React.createElement(Text, null, formattedValue); | ||
| return _jsx(Text, { children: formattedValue }); | ||
| }; | ||
@@ -61,0 +62,0 @@ Component.displayName = DisplayName[name]; |
| import { __rest } from "tslib"; | ||
| import { jsx as _jsx } from "react/jsx-runtime"; | ||
| import * as React from 'react'; | ||
@@ -12,5 +13,5 @@ import useIntl from './useIntl.js'; | ||
| var Text = intl.textComponent || React.Fragment; | ||
| return React.createElement(Text, null, formattedValue); | ||
| return _jsx(Text, { children: formattedValue }); | ||
| }; | ||
| FormattedDateTimeRange.displayName = 'FormattedDateTimeRange'; | ||
| export default FormattedDateTimeRange; |
| var _a; | ||
| import { __assign } from "tslib"; | ||
| import { jsx as _jsx } from "react/jsx-runtime"; | ||
| import * as hoistNonReactStaticsNs from 'hoist-non-react-statics'; | ||
@@ -21,10 +22,10 @@ import * as React from 'react'; | ||
| var _a = options || {}, _b = _a.intlPropName, intlPropName = _b === void 0 ? 'intl' : _b, _c = _a.forwardRef, forwardRef = _c === void 0 ? false : _c, _d = _a.enforceContext, enforceContext = _d === void 0 ? true : _d; | ||
| var WithIntl = function (props) { return (React.createElement(IntlConsumer, null, function (intl) { | ||
| var _a; | ||
| if (enforceContext) { | ||
| invariantIntlContext(intl); | ||
| } | ||
| var intlProp = (_a = {}, _a[intlPropName] = intl, _a); | ||
| return (React.createElement(WrappedComponent, __assign({}, props, intlProp, { ref: forwardRef ? props.forwardedRef : null }))); | ||
| })); }; | ||
| var WithIntl = function (props) { return (_jsx(IntlConsumer, { children: function (intl) { | ||
| var _a; | ||
| if (enforceContext) { | ||
| invariantIntlContext(intl); | ||
| } | ||
| var intlProp = (_a = {}, _a[intlPropName] = intl, _a); | ||
| return (_jsx(WrappedComponent, __assign({}, props, intlProp, { ref: forwardRef ? props.forwardedRef : null }))); | ||
| } })); }; | ||
| WithIntl.displayName = "injectIntl(".concat(getDisplayName(WrappedComponent), ")"); | ||
@@ -35,5 +36,5 @@ WithIntl.WrappedComponent = WrappedComponent; | ||
| // @ts-expect-error | ||
| React.forwardRef(function (props, ref) { return (React.createElement(WithIntl, __assign({}, props, { forwardedRef: ref }))); }), WrappedComponent); | ||
| React.forwardRef(function (props, ref) { return (_jsx(WithIntl, __assign({}, props, { forwardedRef: ref }))); }), WrappedComponent); | ||
| } | ||
| return hoistNonReactStatics(WithIntl, WrappedComponent); | ||
| } |
@@ -1,7 +0,3 @@ | ||
| /* | ||
| * Copyright 2015, Yahoo Inc. | ||
| * Copyrights licensed under the New BSD License. | ||
| * See the accompanying LICENSE file for terms. | ||
| */ | ||
| import { __rest } from "tslib"; | ||
| import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime"; | ||
| import * as React from 'react'; | ||
@@ -28,5 +24,5 @@ import { shallowEqual } from '../utils.js'; | ||
| if (Component) { | ||
| return React.createElement(Component, null, nodes); | ||
| return _jsx(Component, { children: nodes }); | ||
| } | ||
| return React.createElement(React.Fragment, null, nodes); | ||
| return _jsx(_Fragment, { children: nodes }); | ||
| } | ||
@@ -33,0 +29,0 @@ FormattedMessage.displayName = 'FormattedMessage'; |
@@ -1,7 +0,2 @@ | ||
| /* | ||
| * Copyright 2015, Yahoo Inc. | ||
| * Copyrights licensed under the New BSD License. | ||
| * See the accompanying LICENSE file for terms. | ||
| */ | ||
| import * as React from 'react'; | ||
| import { jsx as _jsx } from "react/jsx-runtime"; | ||
| import useIntl from './useIntl.js'; | ||
@@ -17,3 +12,3 @@ var FormattedPlural = function (props) { | ||
| if (Text) { | ||
| return React.createElement(Text, null, formattedPlural); | ||
| return _jsx(Text, { children: formattedPlural }); | ||
| } | ||
@@ -20,0 +15,0 @@ // Work around @types/react where React.FC cannot return string |
@@ -0,1 +1,3 @@ | ||
| import { __extends } from "tslib"; | ||
| import { jsx as _jsx } from "react/jsx-runtime"; | ||
| /* | ||
@@ -6,3 +8,2 @@ * Copyright 2015, Yahoo Inc. | ||
| */ | ||
| import { __extends } from "tslib"; | ||
| import { createIntlCache } from '@formatjs/intl'; | ||
@@ -54,3 +55,3 @@ import * as React from 'react'; | ||
| invariantIntlContext(this.state.intl); | ||
| return React.createElement(Provider, { value: this.state.intl }, this.props.children); | ||
| return _jsx(Provider, { value: this.state.intl, children: this.props.children }); | ||
| }; | ||
@@ -57,0 +58,0 @@ IntlProvider.displayName = 'IntlProvider'; |
| import { __assign, __rest } from "tslib"; | ||
| import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime"; | ||
| /* | ||
@@ -68,5 +69,5 @@ * Copyright 2015, Yahoo Inc. | ||
| if (Text) { | ||
| return React.createElement(Text, null, formattedRelativeTime); | ||
| return _jsx(Text, { children: formattedRelativeTime }); | ||
| } | ||
| return React.createElement(React.Fragment, null, formattedRelativeTime); | ||
| return _jsx(_Fragment, { children: formattedRelativeTime }); | ||
| }; | ||
@@ -123,5 +124,5 @@ var FormattedRelativeTime = function (_a) { | ||
| } | ||
| return (React.createElement(SimpleFormattedRelativeTime, __assign({ value: currentValue, unit: currentUnit }, otherProps))); | ||
| return (_jsx(SimpleFormattedRelativeTime, __assign({ value: currentValue, unit: currentUnit }, otherProps))); | ||
| }; | ||
| FormattedRelativeTime.displayName = 'FormattedRelativeTime'; | ||
| export default FormattedRelativeTime; |
+2
-1
| import { __assign } from "tslib"; | ||
| import { jsx as _jsx } from "react/jsx-runtime"; | ||
| import * as React from 'react'; | ||
@@ -31,3 +32,3 @@ import { DEFAULT_INTL_CONFIG as CORE_DEFAULT_INTL_CONFIG } from '@formatjs/intl'; | ||
| if (React.isValidElement(child)) { | ||
| return React.createElement(React.Fragment, { key: index }, child); | ||
| return _jsx(React.Fragment, { children: child }, index); | ||
| } | ||
@@ -34,0 +35,0 @@ return child; |
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
189489
0.47%5535
0.16%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated