@wordpress/element
Advanced tools
Comparing version 4.0.3 to 4.0.4
@@ -21,6 +21,7 @@ /** | ||
export default function RawHTML({ | ||
children, | ||
...props | ||
}) { | ||
export default function RawHTML(_ref) { | ||
let { | ||
children, | ||
...props | ||
} = _ref; | ||
let rawHtml = ''; // Cast children as an array, and concatenate each element if it is a string. | ||
@@ -27,0 +28,0 @@ |
@@ -182,3 +182,7 @@ /** | ||
export function concatChildren(...childrenArguments) { | ||
export function concatChildren() { | ||
for (var _len = arguments.length, childrenArguments = new Array(_len), _key = 0; _key < _len; _key++) { | ||
childrenArguments[_key] = arguments[_key]; | ||
} | ||
return childrenArguments.reduce((accumulator, children, i) => { | ||
@@ -185,0 +189,0 @@ Children.forEach(children, (child, j) => { |
@@ -241,3 +241,5 @@ /** | ||
export function renderElement(element, context, legacyContext = {}) { | ||
export function renderElement(element, context) { | ||
let legacyContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
if (null === element || undefined === element || false === element) { | ||
@@ -320,3 +322,4 @@ return ''; | ||
export function renderNativeComponent(type, props, context, legacyContext = {}) { | ||
export function renderNativeComponent(type, props, context) { | ||
let legacyContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; | ||
let content = ''; | ||
@@ -362,3 +365,4 @@ | ||
export function renderComponent(Component, props, context, legacyContext = {}) { | ||
export function renderComponent(Component, props, context) { | ||
let legacyContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; | ||
const instance = new | ||
@@ -391,3 +395,4 @@ /** @type {import('react').ComponentClass} */ | ||
function renderChildren(children, context, legacyContext = {}) { | ||
function renderChildren(children, context) { | ||
let legacyContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
let result = ''; | ||
@@ -394,0 +399,0 @@ children = castArray(children); |
@@ -14,24 +14,24 @@ "use strict"; | ||
}; | ||
Object.defineProperty(exports, "createInterpolateElement", { | ||
Object.defineProperty(exports, "Platform", { | ||
enumerable: true, | ||
get: function () { | ||
return _createInterpolateElement.default; | ||
return _platform.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Platform", { | ||
Object.defineProperty(exports, "RawHTML", { | ||
enumerable: true, | ||
get: function () { | ||
return _platform.default; | ||
return _rawHtml.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, "renderToString", { | ||
Object.defineProperty(exports, "createInterpolateElement", { | ||
enumerable: true, | ||
get: function () { | ||
return _serialize.default; | ||
return _createInterpolateElement.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, "RawHTML", { | ||
Object.defineProperty(exports, "renderToString", { | ||
enumerable: true, | ||
get: function () { | ||
return _rawHtml.default; | ||
return _serialize.default; | ||
} | ||
@@ -38,0 +38,0 @@ }); |
@@ -29,6 +29,7 @@ "use strict"; | ||
*/ | ||
function RawHTML({ | ||
children, | ||
...props | ||
}) { | ||
function RawHTML(_ref) { | ||
let { | ||
children, | ||
...props | ||
} = _ref; | ||
let rawHtml = ''; // Cast children as an array, and concatenate each element if it is a string. | ||
@@ -35,0 +36,0 @@ |
@@ -6,4 +6,2 @@ "use strict"; | ||
}); | ||
exports.concatChildren = concatChildren; | ||
exports.switchChildrenNodeName = switchChildrenNodeName; | ||
Object.defineProperty(exports, "Children", { | ||
@@ -15,8 +13,2 @@ enumerable: true, | ||
}); | ||
Object.defineProperty(exports, "cloneElement", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.cloneElement; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Component", { | ||
@@ -28,90 +20,92 @@ enumerable: true, | ||
}); | ||
Object.defineProperty(exports, "createContext", { | ||
Object.defineProperty(exports, "Fragment", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.createContext; | ||
return _react.Fragment; | ||
} | ||
}); | ||
Object.defineProperty(exports, "createElement", { | ||
Object.defineProperty(exports, "StrictMode", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.createElement; | ||
return _react.StrictMode; | ||
} | ||
}); | ||
Object.defineProperty(exports, "createRef", { | ||
Object.defineProperty(exports, "Suspense", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.createRef; | ||
return _react.Suspense; | ||
} | ||
}); | ||
Object.defineProperty(exports, "forwardRef", { | ||
Object.defineProperty(exports, "cloneElement", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.forwardRef; | ||
return _react.cloneElement; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Fragment", { | ||
exports.concatChildren = concatChildren; | ||
Object.defineProperty(exports, "createContext", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.Fragment; | ||
return _react.createContext; | ||
} | ||
}); | ||
Object.defineProperty(exports, "isValidElement", { | ||
Object.defineProperty(exports, "createElement", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.isValidElement; | ||
return _react.createElement; | ||
} | ||
}); | ||
Object.defineProperty(exports, "memo", { | ||
Object.defineProperty(exports, "createRef", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.memo; | ||
return _react.createRef; | ||
} | ||
}); | ||
Object.defineProperty(exports, "StrictMode", { | ||
Object.defineProperty(exports, "forwardRef", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.StrictMode; | ||
return _react.forwardRef; | ||
} | ||
}); | ||
Object.defineProperty(exports, "useState", { | ||
Object.defineProperty(exports, "isValidElement", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.useState; | ||
return _react.isValidElement; | ||
} | ||
}); | ||
Object.defineProperty(exports, "useEffect", { | ||
Object.defineProperty(exports, "lazy", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.useEffect; | ||
return _react.lazy; | ||
} | ||
}); | ||
Object.defineProperty(exports, "useContext", { | ||
Object.defineProperty(exports, "memo", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.useContext; | ||
return _react.memo; | ||
} | ||
}); | ||
Object.defineProperty(exports, "useReducer", { | ||
exports.switchChildrenNodeName = switchChildrenNodeName; | ||
Object.defineProperty(exports, "useCallback", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.useReducer; | ||
return _react.useCallback; | ||
} | ||
}); | ||
Object.defineProperty(exports, "useCallback", { | ||
Object.defineProperty(exports, "useContext", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.useCallback; | ||
return _react.useContext; | ||
} | ||
}); | ||
Object.defineProperty(exports, "useMemo", { | ||
Object.defineProperty(exports, "useDebugValue", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.useMemo; | ||
return _react.useDebugValue; | ||
} | ||
}); | ||
Object.defineProperty(exports, "useRef", { | ||
Object.defineProperty(exports, "useEffect", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.useRef; | ||
return _react.useEffect; | ||
} | ||
@@ -131,20 +125,26 @@ }); | ||
}); | ||
Object.defineProperty(exports, "useDebugValue", { | ||
Object.defineProperty(exports, "useMemo", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.useDebugValue; | ||
return _react.useMemo; | ||
} | ||
}); | ||
Object.defineProperty(exports, "lazy", { | ||
Object.defineProperty(exports, "useReducer", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.lazy; | ||
return _react.useReducer; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Suspense", { | ||
Object.defineProperty(exports, "useRef", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.Suspense; | ||
return _react.useRef; | ||
} | ||
}); | ||
Object.defineProperty(exports, "useState", { | ||
enumerable: true, | ||
get: function () { | ||
return _react.useState; | ||
} | ||
}); | ||
@@ -311,3 +311,7 @@ var _react = require("react"); | ||
*/ | ||
function concatChildren(...childrenArguments) { | ||
function concatChildren() { | ||
for (var _len = arguments.length, childrenArguments = new Array(_len), _key = 0; _key < _len; _key++) { | ||
childrenArguments[_key] = arguments[_key]; | ||
} | ||
return childrenArguments.reduce((accumulator, children, i) => { | ||
@@ -314,0 +318,0 @@ _react.Children.forEach(children, (child, j) => { |
@@ -8,9 +8,9 @@ "use strict"; | ||
}); | ||
exports.default = void 0; | ||
exports.hasPrefix = hasPrefix; | ||
exports.renderAttributes = renderAttributes; | ||
exports.renderComponent = renderComponent; | ||
exports.renderElement = renderElement; | ||
exports.renderNativeComponent = renderNativeComponent; | ||
exports.renderComponent = renderComponent; | ||
exports.renderAttributes = renderAttributes; | ||
exports.renderStyle = renderStyle; | ||
exports.default = void 0; | ||
@@ -262,3 +262,5 @@ var _lodash = require("lodash"); | ||
function renderElement(element, context, legacyContext = {}) { | ||
function renderElement(element, context) { | ||
let legacyContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
if (null === element || undefined === element || false === element) { | ||
@@ -342,3 +344,4 @@ return ''; | ||
function renderNativeComponent(type, props, context, legacyContext = {}) { | ||
function renderNativeComponent(type, props, context) { | ||
let legacyContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; | ||
let content = ''; | ||
@@ -385,3 +388,4 @@ | ||
function renderComponent(Component, props, context, legacyContext = {}) { | ||
function renderComponent(Component, props, context) { | ||
let legacyContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; | ||
const instance = new | ||
@@ -415,3 +419,4 @@ /** @type {import('react').ComponentClass} */ | ||
function renderChildren(children, context, legacyContext = {}) { | ||
function renderChildren(children, context) { | ||
let legacyContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
let result = ''; | ||
@@ -418,0 +423,0 @@ children = (0, _lodash.castArray)(children); |
{ | ||
"name": "@wordpress/element", | ||
"version": "4.0.3", | ||
"version": "4.0.4", | ||
"description": "Element React module for WordPress.", | ||
@@ -31,6 +31,6 @@ "author": "The WordPress Contributors", | ||
"dependencies": { | ||
"@babel/runtime": "^7.13.10", | ||
"@babel/runtime": "^7.16.0", | ||
"@types/react": "^16.9.0", | ||
"@types/react-dom": "^16.9.0", | ||
"@wordpress/escape-html": "^2.2.2", | ||
"@wordpress/escape-html": "^2.2.3", | ||
"lodash": "^4.17.21", | ||
@@ -43,3 +43,3 @@ "react": "^17.0.1", | ||
}, | ||
"gitHead": "157f4ae53ab98e574af01f72213ae5a9613159ff" | ||
"gitHead": "9a1dd3474d937468e4cf9caf9886ad61ef0a8f50" | ||
} |
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
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
350633
4990
Updated@babel/runtime@^7.16.0