terra-base
Advanced tools
Comparing version 5.48.1 to 5.49.0
@@ -5,2 +5,7 @@ # Changelog | ||
## 5.49.0 - (December 7, 2022) | ||
* Changed | ||
* Minor dependency version bump | ||
## 5.48.1 - (January 4, 2022) | ||
@@ -7,0 +12,0 @@ |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,39 +8,22 @@ value: true | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _terraI18n = require("terra-i18n"); | ||
require("./baseStyles"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } | ||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } | ||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
var propTypes = { | ||
@@ -52,3 +34,2 @@ /** | ||
children: _propTypes.default.node.isRequired, | ||
/** | ||
@@ -58,7 +39,5 @@ * The locale name. | ||
locale: _propTypes.default.string.isRequired, | ||
/** | ||
* Customized translations provided by consuming application only for current locale. | ||
*/ | ||
/* eslint-disable consistent-return */ | ||
@@ -70,3 +49,2 @@ customMessages: function customMessages(props, propName, componentName) { | ||
}, | ||
/** | ||
@@ -76,3 +54,2 @@ * Activates [React Strict Mode](https://reactjs.org/docs/strict-mode.html) for descendants | ||
strictMode: _propTypes.default.bool, | ||
/** | ||
@@ -83,3 +60,2 @@ * Whether or not the error should be logged and thrown if something goes wrong. When false, the error will only be logged to the | ||
throwOnI18nLoadError: _propTypes.default.bool, | ||
/** | ||
@@ -96,13 +72,8 @@ * The component(s) that will be wrapped by `<Base />` ONLY in the event that translations have not been loaded yet. | ||
}; | ||
var Base = /*#__PURE__*/function (_React$Component) { | ||
_inherits(Base, _React$Component); | ||
var _super = _createSuper(Base); | ||
function Base(props) { | ||
var _this; | ||
_classCallCheck(this, Base); | ||
_this = _super.call(this, props); | ||
@@ -116,3 +87,2 @@ _this.state = { | ||
} | ||
_createClass(Base, [{ | ||
@@ -127,3 +97,2 @@ key: "componentDidMount", | ||
console.error(e); | ||
if (this.props.throwOnI18nLoadError) { | ||
@@ -144,3 +113,2 @@ throw e; | ||
console.error(e); | ||
if (this.props.throwOnI18nLoadError) { | ||
@@ -156,9 +124,7 @@ throw e; | ||
var _this$props = this.props, | ||
children = _this$props.children, | ||
customMessages = _this$props.customMessages, | ||
strictMode = _this$props.strictMode, | ||
translationsLoadingPlaceholder = _this$props.translationsLoadingPlaceholder; | ||
children = _this$props.children, | ||
customMessages = _this$props.customMessages, | ||
strictMode = _this$props.strictMode, | ||
translationsLoadingPlaceholder = _this$props.translationsLoadingPlaceholder; | ||
var messages = _objectSpread(_objectSpread({}, this.state.messages), customMessages); | ||
var renderChildren = strictMode ? /*#__PURE__*/_react.default.createElement(_react.default.StrictMode, null, children) : children; | ||
@@ -172,6 +138,4 @@ if (!this.state.areTranslationsLoaded) return /*#__PURE__*/_react.default.createElement("div", null, translationsLoadingPlaceholder); | ||
}]); | ||
return Base; | ||
}(_react.default.Component); | ||
Base.propTypes = propTypes; | ||
@@ -178,0 +142,0 @@ Base.defaultProps = defaultProps; |
"use strict"; | ||
require("./Base.scss"); | ||
// Checks to run when not in production | ||
@@ -6,0 +5,0 @@ if (process.env.NODE_ENV !== 'production') { |
{ | ||
"name": "terra-base", | ||
"main": "lib/Base.js", | ||
"version": "5.48.1", | ||
"version": "5.49.0", | ||
"description": "The base component sets minimal global styles for an application.", | ||
@@ -32,3 +32,3 @@ "repository": { | ||
"prop-types": "^15.5.8", | ||
"terra-i18n": "^4.38.1" | ||
"terra-i18n": "^4.39.0" | ||
}, | ||
@@ -48,3 +48,3 @@ "scripts": { | ||
}, | ||
"gitHead": "2b761729af5655a49c1f1cf8b6f4130d57f4ae30" | ||
"gitHead": "421b2643a58e6de628aa789a9cdd0778b0a942a2" | ||
} |
@@ -9,3 +9,3 @@ # Terra Base | ||
- [Getting Started](#getting-started) | ||
- [Documentation](https://engineering.cerner.com/terra-ui/components/terra-base/base/base) | ||
- [Documentation](https://engineering.cerner.com/terra-ui/components/cerner-terra-core-docs/base/about) | ||
- [LICENSE](#license) | ||
@@ -12,0 +12,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
48262
342
Updatedterra-i18n@^4.39.0