react-fixed-bottom
Advanced tools
| version: 2 | ||
| updates: | ||
| - package-ecosystem: npm | ||
| directory: "/" | ||
| schedule: | ||
| interval: daily | ||
| open-pull-requests-limit: 40 | ||
| assignees: | ||
| - Toolo | ||
| ignore: | ||
| - dependency-name: rollup | ||
| versions: | ||
| - 2.38.1 | ||
| - 2.38.3 | ||
| - 2.38.4 | ||
| - 2.38.5 | ||
| - 2.39.0 | ||
| - 2.39.1 | ||
| - 2.40.0 | ||
| - 2.41.0 | ||
| - 2.41.1 | ||
| - 2.41.2 | ||
| - 2.41.3 | ||
| - 2.41.4 | ||
| - 2.41.5 | ||
| - 2.42.0 | ||
| - 2.42.2 | ||
| - 2.42.3 | ||
| - 2.42.4 | ||
| - 2.43.1 | ||
| - 2.44.0 | ||
| - 2.45.0 | ||
| - 2.45.1 | ||
| - 2.45.2 | ||
| - dependency-name: "@types/jest" | ||
| versions: | ||
| - 26.0.20 | ||
| - 26.0.21 | ||
| - 26.0.22 | ||
| - dependency-name: husky | ||
| versions: | ||
| - 4.3.8 | ||
| - 5.0.9 | ||
| - 5.1.0 | ||
| - 5.1.1 | ||
| - 5.1.2 | ||
| - 5.1.3 | ||
| - 5.2.0 | ||
| - dependency-name: "@types/react" | ||
| versions: | ||
| - 17.0.0 | ||
| - 17.0.1 | ||
| - 17.0.2 | ||
| - 17.0.3 | ||
| - dependency-name: typescript | ||
| versions: | ||
| - 4.1.3 | ||
| - 4.1.4 | ||
| - 4.1.5 | ||
| - 4.2.2 | ||
| - 4.2.3 | ||
| - dependency-name: rollup-plugin-typescript2 | ||
| versions: | ||
| - 0.29.0 | ||
| - dependency-name: lint-staged | ||
| versions: | ||
| - 10.5.3 | ||
| - dependency-name: "@types/react-test-renderer" | ||
| versions: | ||
| - 17.0.0 |
+15
-1
@@ -1,2 +0,16 @@ | ||
| "use strict";function _interopDefault(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var React=_interopDefault(require("react")),extendStatics=function(t,e){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)};function __extends(t,e){function o(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}var __assign=function(){return(__assign=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},FUNC_ERROR_TEXT="Expected a function",NAN=NaN,symbolTag="[object Symbol]",reTrim=/^\s+|\s+$/g,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt,freeGlobal="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),objectProto=Object.prototype,objectToString=objectProto.toString,nativeMax=Math.max,nativeMin=Math.min,now=function(){return root.Date.now()};function debounce(t,e,o){var n,r,i,a,f,c,s=0,l=!1,u=!1,d=!0;if("function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);function p(e){var o=n,i=r;return n=r=void 0,s=e,a=t.apply(i,o)}function b(t){var o=t-c;return void 0===c||o>=e||o<0||u&&t-s>=i}function m(){var t=now();if(b(t))return h(t);f=setTimeout(m,function(t){var o=e-(t-c);return u?nativeMin(o,i-(t-s)):o}(t))}function h(t){return f=void 0,d&&n?p(t):(n=r=void 0,a)}function v(){var t=now(),o=b(t);if(n=arguments,r=this,c=t,o){if(void 0===f)return function(t){return s=t,f=setTimeout(m,e),l?p(t):a}(c);if(u)return f=setTimeout(m,e),p(c)}return void 0===f&&(f=setTimeout(m,e)),a}return e=toNumber(e)||0,isObject(o)&&(l=!!o.leading,i=(u="maxWait"in o)?nativeMax(toNumber(o.maxWait)||0,e):i,d="trailing"in o?!!o.trailing:d),v.cancel=function(){void 0!==f&&clearTimeout(f),s=0,n=c=r=f=void 0},v.flush=function(){return void 0===f?a:h(now())},v}function throttle(t,e,o){var n=!0,r=!0;if("function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);return isObject(o)&&(n="leading"in o?!!o.leading:n,r="trailing"in o?!!o.trailing:r),debounce(t,e,{leading:n,maxWait:e,trailing:r})}function isObject(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function isObjectLike(t){return!!t&&"object"==typeof t}function isSymbol(t){return"symbol"==typeof t||isObjectLike(t)&&objectToString.call(t)==symbolTag}function toNumber(t){if("number"==typeof t)return t;if(isSymbol(t))return NAN;if(isObject(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=isObject(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(reTrim,"");var o=reIsBinary.test(t);return o||reIsOctal.test(t)?freeParseInt(t.slice(2),o?2:8):reIsBadHex.test(t)?NAN:+t}var lodash_throttle=throttle;function isSafariMobile(){if("undefined"==typeof window||void 0===window.navigator)return!1;var t=window.navigator.userAgent;return/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)&&!/(CriOS|FxiOS|OPiOS|mercury)/i.test(t)}var SAFARI_MOBILE_BOTTOM_MENU_HEIGHT=44,FixedBottom=function(t){function e(e){var o=t.call(this,e)||this;return o.state={bottom:o.props.offset||0},o.isSafariMobile=isSafariMobile(),o.anchorRef=React.createRef(),o.computeOffsetBottom=function(){if(o.anchorRef.current){var t=o.anchorRef.current.getBoundingClientRect().bottom,e=o.props.offset,n=void 0===e?0:e;Math.floor(Number(t))>window.innerHeight?o.setState({bottom:n+SAFARI_MOBILE_BOTTOM_MENU_HEIGHT}):o.setState({bottom:n})}},o.handleScroll=lodash_throttle(o.computeOffsetBottom,200),o}return __extends(e,t),e.prototype.componentDidMount=function(){this.isSafariMobile&&(window.addEventListener("scroll",this.handleScroll),this.deferredComputeOffsetBottom=setTimeout(this.computeOffsetBottom))},e.prototype.componentWillUnmount=function(){this.isSafariMobile&&(this.handleScroll.cancel(),window.removeEventListener("scroll",this.handleScroll),window.clearTimeout(this.deferredComputeOffsetBottom))},e.prototype.render=function(){var t=this.state.bottom,e=this.props,o=e.children,n=e.offset,r=React.cloneElement(o,{style:__assign({},o.props.style,{bottom:t,position:"fixed"})});return React.createElement(React.Fragment,null,r,this.isSafariMobile&&React.createElement("div",{ref:this.anchorRef,style:{position:"fixed",bottom:n}}))},e}(React.PureComponent);exports.FixedBottom=FixedBottom; | ||
| "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=(t=require("react"))&&"object"==typeof t&&"default"in t?t.default:t,o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)}; | ||
| /*! ***************************************************************************** | ||
| Copyright (c) Microsoft Corporation. | ||
| Permission to use, copy, modify, and/or distribute this software for any | ||
| purpose with or without fee is hereby granted. | ||
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
| REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
| AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
| INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
| LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
| OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
| PERFORMANCE OF THIS SOFTWARE. | ||
| ***************************************************************************** */var n=function(){return(n=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,a=/^0o[0-7]+$/i,c=parseInt,l="object"==typeof r&&r&&r.Object===Object&&r,s="object"==typeof self&&self&&self.Object===Object&&self,p=l||s||Function("return this")(),d=Object.prototype.toString,m=Math.max,v=Math.min,y=function(){return p.Date.now()};function h(t,e,o){var n,r,i,f,u,a,c=0,l=!1,s=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var o=n,i=r;return n=r=void 0,c=e,f=t.apply(i,o)}function h(t){return c=t,u=setTimeout(O,e),l?d(t):f}function g(t){var o=t-a;return void 0===a||o>=e||o<0||s&&t-c>=i}function O(){var t=y();if(g(t))return j(t);u=setTimeout(O,function(t){var o=e-(t-a);return s?v(o,i-(t-c)):o}(t))}function j(t){return u=void 0,p&&n?d(t):(n=r=void 0,f)}function S(){var t=y(),o=g(t);if(n=arguments,r=this,a=t,o){if(void 0===u)return h(a);if(s)return u=setTimeout(O,e),d(a)}return void 0===u&&(u=setTimeout(O,e)),f}return e=w(e)||0,b(o)&&(l=!!o.leading,i=(s="maxWait"in o)?m(w(o.maxWait)||0,e):i,p="trailing"in o?!!o.trailing:p),S.cancel=function(){void 0!==u&&clearTimeout(u),c=0,n=a=r=u=void 0},S.flush=function(){return void 0===u?f:j(y())},S}function b(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function w(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==d.call(t)}(t))return NaN;if(b(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var o=u.test(t);return o||a.test(t)?c(t.slice(2),o?2:8):f.test(t)?NaN:+t}var g=function(t,e,o){var n=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return b(o)&&(n="leading"in o?!!o.leading:n,r="trailing"in o?!!o.trailing:r),h(t,e,{leading:n,maxWait:e,trailing:r})};var O=function(t){function r(o){var n=t.call(this,o)||this;return n.state={bottom:n.props.offset||0},n.isSafariMobile=function(){if("undefined"==typeof window||void 0===window.navigator)return!1;var t=window.navigator.userAgent;return/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)&&!/(CriOS|FxiOS|OPiOS|mercury)/i.test(t)}(),n.anchorRef=e.createRef(),n.computeOffsetBottom=function(){if(n.anchorRef.current){var t=n.anchorRef.current.getBoundingClientRect().bottom,e=n.props.offset,o=void 0===e?0:e;Math.floor(Number(t))>window.innerHeight?n.setState({bottom:o+44}):n.setState({bottom:o})}},n.handleScroll=g(n.computeOffsetBottom,200),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(r,t),r.prototype.componentDidMount=function(){this.isSafariMobile&&(window.addEventListener("scroll",this.handleScroll),this.deferredComputeOffsetBottom=setTimeout(this.computeOffsetBottom))},r.prototype.componentWillUnmount=function(){this.isSafariMobile&&(this.handleScroll.cancel(),window.removeEventListener("scroll",this.handleScroll),window.clearTimeout(this.deferredComputeOffsetBottom))},r.prototype.render=function(){var t=this.state.bottom,o=this.props,r=o.children,i=o.offset,f=e.cloneElement(r,{style:n({},r.props.style,{bottom:t,position:"fixed"})});return e.createElement(e.Fragment,null,f,this.isSafariMobile&&e.createElement("div",{ref:this.anchorRef,style:{position:"fixed",bottom:i}}))},r}(e.PureComponent);exports.FixedBottom=O; | ||
| //# sourceMappingURL=index.js.map |
+4
-4
| { | ||
| "name": "react-fixed-bottom", | ||
| "version": "1.0.7", | ||
| "version": "1.0.8", | ||
| "description": "React component to make fixed:bottom styles usable in Safari mobile", | ||
@@ -42,4 +42,4 @@ "main": "dist/index.js", | ||
| "@types/lodash.throttle": "^4.1.6", | ||
| "@types/react": "^16.9.2", | ||
| "@types/react-test-renderer": "^16.9.0", | ||
| "@types/react": "^17.0.40", | ||
| "@types/react-test-renderer": "^17.0.1", | ||
| "babel-jest": "^24.7.1", | ||
@@ -66,3 +66,3 @@ "babel-plugin-transform-react-remove-prop-types": "^0.4.24", | ||
| "rollup-plugin-terser": "^5.1.1", | ||
| "rollup-plugin-typescript2": "^0.24.3", | ||
| "rollup-plugin-typescript2": "^0.30.0", | ||
| "ts-jest": "^24.0.2", | ||
@@ -69,0 +69,0 @@ "typescript": "^3.5.3" |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
24463
5.71%18
5.88%398
2.31%