New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@alfalab/core-components-portal

Package Overview
Dependencies
Maintainers
12
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alfalab/core-components-portal - npm Package Compare versions

Comparing version 1.1.3 to 1.2.0

dist/modern/Component.d.ts

13

dist/Component.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = require("react");
const react_dom_1 = require("react-dom");
const portalContainer_1 = require("./portalContainer");
exports.Portal = ({ children, getPortalContainer = portalContainer_1.getDefaultPortalContainer, }) => {
const [isMount, setIsMount] = react_1.useState(false);
react_1.useEffect(() => {
var react_1 = require("react");
var react_dom_1 = require("react-dom");
var portalContainer_1 = require("./portalContainer");
exports.Portal = function (_a) {
var children = _a.children, _b = _a.getPortalContainer, getPortalContainer = _b === void 0 ? portalContainer_1.getDefaultPortalContainer : _b;
var _c = react_1.useState(false), isMount = _c[0], setIsMount = _c[1];
react_1.useEffect(function () {
setIsMount(true);

@@ -10,0 +11,0 @@ }, []);

@@ -5,3 +5,3 @@ "use strict";

function createPortalContainer() {
const portalContainer = document.createElement('div');
var portalContainer = document.createElement('div');
portalContainer.setAttribute(exports.PORTAL_CONTAINER_ATTRIBUTE, '');

@@ -11,2 +11,4 @@ document.body.appendChild(portalContainer);

}
exports.getDefaultPortalContainer = () => document.querySelector(`[${exports.PORTAL_CONTAINER_ATTRIBUTE}]`) || createPortalContainer();
exports.getDefaultPortalContainer = function () {
return document.querySelector("[" + exports.PORTAL_CONTAINER_ATTRIBUTE + "]") || createPortalContainer();
};
{
"name": "@alfalab/core-components-portal",
"version": "1.1.3",
"version": "1.2.0",
"description": "Portal component",

@@ -18,3 +18,3 @@ "keywords": [],

},
"gitHead": "e76512cbc5336ab0420b6ea5afa8c0979cebb749"
"gitHead": "dc692d3f87268477e5b61271fa883588d251a88e"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc