@instructure/ui-react-utils
Advanced tools
Comparing version 8.56.2-pr-snapshot-1721749364069 to 8.56.2-snapshot-2
@@ -6,3 +6,3 @@ # Change Log | ||
## [8.56.2-pr-snapshot-1721749364069](https://github.com/instructure/instructure-ui/compare/v8.56.1...v8.56.2-pr-snapshot-1721749364069) (2024-07-23) | ||
## [8.56.2-snapshot-2](https://github.com/instructure/instructure-ui/compare/v8.56.1...v8.56.2-snapshot-2) (2024-08-06) | ||
@@ -9,0 +9,0 @@ **Note:** Version bump only for package @instructure/ui-react-utils |
@@ -5,3 +5,3 @@ "use strict"; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _uiUtils = require("@instructure/ui-utils"); | ||
var _createChainedFunction = require("@instructure/ui-utils/lib/createChainedFunction.js"); | ||
var _react2 = require("@testing-library/react"); | ||
@@ -81,3 +81,3 @@ require("@testing-library/jest-dom"); | ||
props: { | ||
onClick: (0, _uiUtils.createChainedFunction)(onClickB, onClickC) | ||
onClick: (0, _createChainedFunction.createChainedFunction)(onClickB, onClickC) | ||
} | ||
@@ -84,0 +84,0 @@ })); |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.deprecated = exports.default = void 0; | ||
var _uiDecorator = require("@instructure/ui-decorator"); | ||
var _decorator = require("@instructure/ui-decorator/lib/decorator.js"); | ||
var _console = require("@instructure/console"); | ||
@@ -46,3 +46,3 @@ /* | ||
} | ||
const deprecated = (0, _uiDecorator.decorator)((ComposedComponent, version, oldProps, message = '') => { | ||
const deprecated = (0, _decorator.decorator)((ComposedComponent, version, oldProps, message = '') => { | ||
/** | ||
@@ -49,0 +49,0 @@ * --- |
@@ -12,4 +12,4 @@ "use strict"; | ||
var _DeterministicIdContext = require("./DeterministicIdContext"); | ||
var _uiDecorator = require("@instructure/ui-decorator"); | ||
var _uiUtils = require("@instructure/ui-utils"); | ||
var _decorator = require("@instructure/ui-decorator/lib/decorator.js"); | ||
var _generateId = require("@instructure/ui-utils/lib/generateId.js"); | ||
var _console = require("@instructure/console"); | ||
@@ -48,7 +48,7 @@ /* | ||
*/ | ||
const withDeterministicId = exports.withDeterministicId = (0, _uiDecorator.decorator)(ComposedComponent => { | ||
const withDeterministicId = exports.withDeterministicId = (0, _decorator.decorator)(ComposedComponent => { | ||
const WithDeterministicId = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => { | ||
const componentName = ComposedComponent.componentId || ComposedComponent.displayName || ComposedComponent.name; | ||
const instanceCounterMap = (0, _react.useContext)(_DeterministicIdContext.DeterministicIdContext); | ||
const deterministicId = (instanceName = componentName) => (0, _uiUtils.generateId)(instanceName, instanceCounterMap); | ||
const deterministicId = (instanceName = componentName) => (0, _generateId.generateId)(instanceName, instanceCounterMap); | ||
if (props.deterministicId) { | ||
@@ -55,0 +55,0 @@ (0, _console.warn)(false, `Manually passing the "deterministicId" property is not allowed on the ${componentName} component.\n`, props.deterministicId); |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.experimental = exports.default = void 0; | ||
var _uiDecorator = require("@instructure/ui-decorator"); | ||
var _decorator = require("@instructure/ui-decorator/lib/decorator.js"); | ||
var _console = require("@instructure/console"); | ||
@@ -34,3 +34,3 @@ /* | ||
const experimental = exports.experimental = process.env.NODE_ENV == 'production' ? () => ReactComponent => ReactComponent : (0, _uiDecorator.decorator)((ComposedComponent, experimentalProps, message) => { | ||
const experimental = exports.experimental = process.env.NODE_ENV == 'production' ? () => ReactComponent => ReactComponent : (0, _decorator.decorator)((ComposedComponent, experimentalProps, message) => { | ||
return class ExperimentalComponent extends ComposedComponent { | ||
@@ -37,0 +37,0 @@ componentDidMount() { |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.hack = exports.default = void 0; | ||
var _uiDecorator = require("@instructure/ui-decorator"); | ||
var _decorator = require("@instructure/ui-decorator/lib/decorator.js"); | ||
var _console = require("@instructure/console"); | ||
@@ -55,3 +55,3 @@ /* | ||
*/ | ||
const hack = exports.hack = process.env.NODE_ENV == 'production' ? () => Component => Component : (0, _uiDecorator.decorator)((ComposedComponent, hackProps, message) => { | ||
const hack = exports.hack = process.env.NODE_ENV == 'production' ? () => Component => Component : (0, _decorator.decorator)((ComposedComponent, hackProps, message) => { | ||
return class HackComponent extends ComposedComponent { | ||
@@ -58,0 +58,0 @@ componentDidMount() { |
@@ -11,3 +11,3 @@ "use strict"; | ||
var _console = require("@instructure/console"); | ||
var _uiUtils = require("@instructure/ui-utils"); | ||
var _createChainedFunction = require("@instructure/ui-utils/lib/createChainedFunction.js"); | ||
/* | ||
@@ -74,3 +74,3 @@ * The MIT License (MIT) | ||
; | ||
mergedProps[prop] = (0, _uiUtils.createChainedFunction)(element.props[prop], props[prop]); | ||
mergedProps[prop] = (0, _createChainedFunction.createChainedFunction)(element.props[prop], props[prop]); | ||
} | ||
@@ -77,0 +77,0 @@ }); |
@@ -9,4 +9,4 @@ "use strict"; | ||
exports.windowMessageListener = void 0; | ||
var _uiDecorator = require("@instructure/ui-decorator"); | ||
var _uiDomUtils = require("@instructure/ui-dom-utils"); | ||
var _decorator = require("@instructure/ui-decorator/lib/decorator.js"); | ||
var _ownerWindow = require("@instructure/ui-dom-utils/lib/ownerWindow.js"); | ||
/* | ||
@@ -49,3 +49,3 @@ * The MIT License (MIT) | ||
*/ | ||
const windowMessageListener = exports.windowMessageListener = (0, _uiDecorator.decorator)((ComposedComponent, messageHandler, validSource) => { | ||
const windowMessageListener = exports.windowMessageListener = (0, _decorator.decorator)((ComposedComponent, messageHandler, validSource) => { | ||
var _class; | ||
@@ -62,3 +62,3 @@ return _class = class extends ComposedComponent { | ||
componentDidMount() { | ||
const win = (0, _uiDomUtils.ownerWindow)(this); | ||
const win = (0, _ownerWindow.ownerWindow)(this); | ||
win.addEventListener('message', this.handleMessage, false); | ||
@@ -70,3 +70,3 @@ if (super.componentDidMount) { | ||
componentWillUnmount() { | ||
const win = (0, _uiDomUtils.ownerWindow)(this); | ||
const win = (0, _ownerWindow.ownerWindow)(this); | ||
win.removeEventListener('message', this.handleMessage, false); | ||
@@ -103,3 +103,3 @@ if (super.componentDidMount) { | ||
function origin(node) { | ||
const ownWindow = (0, _uiDomUtils.ownerWindow)(node); | ||
const ownWindow = (0, _ownerWindow.ownerWindow)(node); | ||
const location = ownWindow.location; | ||
@@ -106,0 +106,0 @@ if (location.protocol === 'file:') { |
{ | ||
"name": "@instructure/ui-react-utils", | ||
"version": "8.56.2-pr-snapshot-1721749364069", | ||
"version": "8.56.2-snapshot-2", | ||
"description": "A React utility library made by Instructure Inc.", | ||
@@ -25,3 +25,3 @@ "author": "Instructure, Inc. Engineering and Product Design", | ||
"devDependencies": { | ||
"@instructure/ui-babel-preset": "8.56.2-pr-snapshot-1721749364069", | ||
"@instructure/ui-babel-preset": "8.56.2-snapshot-2", | ||
"@testing-library/jest-dom": "^6.1.4", | ||
@@ -33,7 +33,7 @@ "@testing-library/react": "^14.1.2" | ||
"@emotion/is-prop-valid": "^1.2.1", | ||
"@instructure/console": "8.56.2-pr-snapshot-1721749364069", | ||
"@instructure/shared-types": "8.56.2-pr-snapshot-1721749364069", | ||
"@instructure/ui-decorator": "8.56.2-pr-snapshot-1721749364069", | ||
"@instructure/ui-dom-utils": "8.56.2-pr-snapshot-1721749364069", | ||
"@instructure/ui-utils": "8.56.2-pr-snapshot-1721749364069", | ||
"@instructure/console": "8.56.2-snapshot-2", | ||
"@instructure/shared-types": "8.56.2-snapshot-2", | ||
"@instructure/ui-decorator": "8.56.2-snapshot-2", | ||
"@instructure/ui-dom-utils": "8.56.2-snapshot-2", | ||
"@instructure/ui-utils": "8.56.2-snapshot-2", | ||
"hoist-non-react-statics": "^3.3.2", | ||
@@ -40,0 +40,0 @@ "prop-types": "^15.8.1" |
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
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
496718
+ Added@instructure/console@8.56.2-snapshot-2(transitive)
+ Added@instructure/shared-types@8.56.2-snapshot-2(transitive)
+ Added@instructure/ui-decorator@8.56.2-snapshot-2(transitive)
+ Added@instructure/ui-dom-utils@8.56.2-snapshot-2(transitive)
+ Added@instructure/ui-utils@8.56.2-snapshot-2(transitive)
- Removed@instructure/console@8.56.2-pr-snapshot-1721749364069(transitive)
- Removed@instructure/shared-types@8.56.2-pr-snapshot-1721749364069(transitive)
- Removed@instructure/ui-decorator@8.56.2-pr-snapshot-1721749364069(transitive)
- Removed@instructure/ui-dom-utils@8.56.2-pr-snapshot-1721749364069(transitive)
- Removed@instructure/ui-utils@8.56.2-pr-snapshot-1721749364069(transitive)