@fluentui/react-component-ref
Advanced tools
Comparing version 0.56.1-beta.1 to 0.57.0
@@ -48,3 +48,3 @@ "use strict"; | ||
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; | ||
_this.prevNode = null; | ||
_this.prevNode = void 0; | ||
return _this; | ||
@@ -51,0 +51,0 @@ } |
@@ -27,3 +27,3 @@ "use strict"; | ||
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; | ||
_this.currentNode = null; | ||
_this.currentNode = void 0; | ||
@@ -30,0 +30,0 @@ _this.handleRefOverride = function (node) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RefForward = exports.RefFindNode = exports.Ref = void 0; | ||
var tslib_1 = require("tslib"); | ||
var Ref_1 = require("./Ref"); | ||
exports.Ref = Ref_1.Ref; | ||
Object.defineProperty(exports, "Ref", { enumerable: true, get: function () { return Ref_1.Ref; } }); | ||
var RefFindNode_1 = require("./RefFindNode"); | ||
exports.RefFindNode = RefFindNode_1.RefFindNode; | ||
Object.defineProperty(exports, "RefFindNode", { enumerable: true, get: function () { return RefFindNode_1.RefFindNode; } }); | ||
var RefForward_1 = require("./RefForward"); | ||
exports.RefForward = RefForward_1.RefForward; | ||
Object.defineProperty(exports, "RefForward", { enumerable: true, get: function () { return RefForward_1.RefForward; } }); | ||
tslib_1.__exportStar(require("./utils"), exports); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Ref = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -8,3 +9,3 @@ var React = require("react"); | ||
var RefForward_1 = require("./RefForward"); | ||
exports.Ref = function (props) { | ||
var Ref = function (props) { | ||
var children = props.children, innerRef = props.innerRef, rest = tslib_1.__rest(props, ["children", "innerRef"]); | ||
@@ -16,1 +17,2 @@ var child = React.Children.only(children); | ||
}; | ||
exports.Ref = Ref; |
import * as React from 'react'; | ||
import { RefProps } from './utils'; | ||
export declare class RefFindNode extends React.Component<RefProps> { | ||
prevNode: Node | null; | ||
prevNode?: Node | null; | ||
componentDidMount(): void; | ||
@@ -6,0 +6,0 @@ componentDidUpdate(prevProps: RefProps): void; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RefFindNode = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -26,5 +27,3 @@ var React = require("react"); | ||
function RefFindNode() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.prevNode = null; | ||
return _this; | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
@@ -31,0 +30,0 @@ RefFindNode.prototype.componentDidMount = function () { |
import * as React from 'react'; | ||
import { RefProps } from './utils'; | ||
export declare class RefForward extends React.Component<RefProps> { | ||
currentNode: Node | null; | ||
currentNode?: Node | null; | ||
handleRefOverride: (node: HTMLElement) => void; | ||
@@ -6,0 +6,0 @@ componentDidUpdate(prevProps: RefProps): void; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RefForward = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -10,3 +11,2 @@ var React = require("react"); | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.currentNode = null; | ||
_this.handleRefOverride = function (node) { | ||
@@ -13,0 +13,0 @@ var _a = _this.props, children = _a.children, innerRef = _a.innerRef; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isRefObject = exports.handleRef = void 0; | ||
/** | ||
@@ -9,3 +10,3 @@ * The function that correctly handles passing refs. | ||
*/ | ||
exports.handleRef = function (ref, node) { | ||
var handleRef = function (ref, node) { | ||
if (process.env.NODE_ENV !== 'production') { | ||
@@ -26,6 +27,8 @@ if (typeof ref === 'string') { | ||
}; | ||
exports.handleRef = handleRef; | ||
/** Checks that the passed object is a valid React ref object. */ | ||
exports.isRefObject = function (ref) { | ||
var isRefObject = function (ref) { | ||
// https://github.com/facebook/react/blob/v16.8.2/packages/react-reconciler/src/ReactFiberCommitWork.js#L665 | ||
return ref !== null && typeof ref === 'object' && ref.hasOwnProperty('current'); | ||
}; | ||
exports.isRefObject = isRefObject; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ForwardedRef = exports.CompositeClass = exports.DOMClass = exports.CompositeFunction = exports.DOMFunction = void 0; | ||
var tslib_1 = require("tslib"); | ||
var React = require("react"); | ||
exports.DOMFunction = function (props) { return React.createElement("div", tslib_1.__assign({}, props, { id: "node" })); }; | ||
exports.CompositeFunction = function (props) { return React.createElement(exports.DOMFunction, tslib_1.__assign({}, props)); }; | ||
var DOMFunction = function (props) { return React.createElement("div", tslib_1.__assign({}, props, { id: "node" })); }; | ||
exports.DOMFunction = DOMFunction; | ||
var CompositeFunction = function (props) { return React.createElement(exports.DOMFunction, tslib_1.__assign({}, props)); }; | ||
exports.CompositeFunction = CompositeFunction; | ||
var DOMClass = /** @class */ (function (_super) { | ||
@@ -8,0 +11,0 @@ tslib_1.__extends(DOMClass, _super); |
import * as React from 'react'; | ||
import { RefProps } from './utils'; | ||
export declare class RefFindNode extends React.Component<RefProps> { | ||
prevNode: Node | null; | ||
prevNode?: Node | null; | ||
componentDidMount(): void; | ||
@@ -6,0 +6,0 @@ componentDidUpdate(prevProps: RefProps): void; |
@@ -38,3 +38,3 @@ import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose"; | ||
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; | ||
_this.prevNode = null; | ||
_this.prevNode = void 0; | ||
return _this; | ||
@@ -41,0 +41,0 @@ } |
import * as React from 'react'; | ||
import { RefProps } from './utils'; | ||
export declare class RefForward extends React.Component<RefProps> { | ||
currentNode: Node | null; | ||
currentNode?: Node | null; | ||
handleRefOverride: (node: HTMLElement) => void; | ||
@@ -6,0 +6,0 @@ componentDidUpdate(prevProps: RefProps): void; |
@@ -15,3 +15,3 @@ import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose"; | ||
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; | ||
_this.currentNode = null; | ||
_this.currentNode = void 0; | ||
@@ -18,0 +18,0 @@ _this.handleRefOverride = function (node) { |
{ | ||
"name": "@fluentui/react-component-ref", | ||
"description": "A set of components and utils to deal with React refs.", | ||
"version": "0.56.1-beta.1", | ||
"version": "0.57.0", | ||
"author": "Oleksandr Fediashov <olfedias@microsoft.com>", | ||
@@ -52,3 +52,3 @@ "bugs": "https://github.com/microsoft/fluentui/issues", | ||
"types": "dist/es/index.d.ts", | ||
"gitHead": "e739e52a1d894fe863367843a459af939cfee6ec" | ||
"gitHead": "9ed48c7056dc8f76437c210040943dbd022e9980" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
117330
854