react-virtualized-auto-sizer
Advanced tools
@@ -1,18 +0,39 @@ | ||
| import { Component, HTMLAttributes, ReactElement, ReactNode } from "react"; | ||
| export type Size = { | ||
| height?: number; | ||
| width?: number; | ||
| scaledHeight?: number; | ||
| scaledWidth?: number; | ||
| import { HTMLAttributes, ReactNode, Component, ReactElement } from "react"; | ||
| export type HorizontalSize = { | ||
| width: number; | ||
| scaledWidth: number; | ||
| }; | ||
| export type Props = { | ||
| export type VerticalSize = { | ||
| height: number; | ||
| scaledHeight: number; | ||
| }; | ||
| export type Size = HorizontalSize & VerticalSize; | ||
| type BaseProps = { | ||
| nonce?: string; | ||
| tagName?: string; | ||
| } & Omit<HTMLAttributes<HTMLDivElement>, "children" | "onResize">; | ||
| export type HeightOnlyProps = BaseProps & { | ||
| children: (size: VerticalSize) => ReactNode; | ||
| defaultHeight?: number; | ||
| disableWidth: true; | ||
| onResize?: (size: VerticalSize) => void; | ||
| }; | ||
| export type WidthOnlyProps = BaseProps & { | ||
| children: (size: HorizontalSize) => ReactNode; | ||
| defaultWidth?: number; | ||
| disableHeight: true; | ||
| onResize?: (size: HorizontalSize) => void; | ||
| }; | ||
| export type HeightAndWidthProps = BaseProps & { | ||
| children: (size: Size) => ReactNode; | ||
| defaultHeight?: number; | ||
| defaultWidth?: number; | ||
| disableHeight?: boolean; | ||
| disableWidth?: boolean; | ||
| nonce?: string; | ||
| disableHeight?: false; | ||
| disableWidth?: false; | ||
| onResize?: (size: Size) => void; | ||
| tagName?: string; | ||
| } & Omit<HTMLAttributes<HTMLDivElement>, "children" | "onResize">; | ||
| }; | ||
| export type Props = HeightOnlyProps | WidthOnlyProps | HeightAndWidthProps; | ||
| export function isHeightAndWidthProps(props: any): props is HeightAndWidthProps; | ||
| export function isHeightOnlyProps(props: any): props is HeightOnlyProps; | ||
| export function isWidthOnlyProps(props: any): props is WidthOnlyProps; | ||
| type State = { | ||
@@ -30,8 +51,2 @@ height: number; | ||
| declare class AutoSizer extends Component<Props, State> { | ||
| static defaultProps: { | ||
| onResize: () => void; | ||
| disableHeight: boolean; | ||
| disableWidth: boolean; | ||
| style: {}; | ||
| }; | ||
| state: { | ||
@@ -38,0 +53,0 @@ height: number; |
@@ -1,1 +0,1 @@ | ||
| {"mappings":";AAYA,mBAAmB;IAEjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAoB;IAClB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,IAAI,CAAC,eAAe,cAAc,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC;AAElE,aAAa;IACX,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,qBAAqB,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;AAE1E,2BAA2B;IACzB,iBAAiB,EAAE,aAAa,CAAC;IACjC,oBAAoB,EAAE,aAAa,CAAC;CACrC,CAAC;AAEF,uBAAuB,SAAQ,UAAU,KAAK,EAAE,KAAK,CAAC;IACpD,MAAM,CAAC,YAAY;;;;;MAKjB;IAEF,KAAK;;;;;MAKH;IAEF,UAAU,EAAE,WAAW,GAAG,IAAI,CAAQ;IACtC,oBAAoB,EAAE,mBAAmB,GAAG,IAAI,CAAQ;IACxD,WAAW,EAAE,WAAW,GAAG,IAAI,CAAQ;IACvC,eAAe,EAAE,cAAc,GAAG,IAAI,CAAQ;IAE9C,iBAAiB;IA0CjB,oBAAoB;IAgBpB,MAAM,IAAI,YAAY;IA0DtB,SAAS,aAyCP;IAEF,OAAO,cAAe,WAAW,GAAG,IAAI,UAEtC;CACH;ACnOD,eAAe,SAAS,CAAC","sources":["src/src/AutoSizer.ts","src/src/index.ts","src/index.ts"],"sourcesContent":[null,null,"import { AutoSizer, Props, Size } from \"./AutoSizer\";\n\nexport default AutoSizer;\n\nexport type { Props, Size };\n"],"names":[],"version":3,"file":"react-virtualized-auto-sizer.d.ts.map"} | ||
| {"mappings":";AAEA,6BAA6B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AACF,2BAA2B;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AACF,mBAAmB,cAAc,GAAG,YAAY,CAAC;AAEjD,iBAAiB;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,IAAI,CAAC,eAAe,cAAc,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC;AAElE,8BAA8B,SAAS,GAAG;IACxC,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,SAAS,CAAC;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,6BAA6B,SAAS,GAAG;IACvC,QAAQ,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,SAAS,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,I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iB;IA0CjB,oBAAoB;IAgBpB,MAAM,IAAI,YAAY;IA0DtB,SAAS,aA0CP;IAEF,OAAO,cAAe,WAAW,GAAG,IAAI,UAEtC;CACH;AClMD,eAAe,SAAS,CAAC","sources":["src/src/types.ts","src/src/AutoSizer.ts","src/src/index.ts","src/index.ts"],"sourcesContent":[null,null,null,"import { AutoSizer } from \"./AutoSizer\";\n\nexport default AutoSizer;\n\nexport * from \"./types\";\n"],"names":[],"version":3,"file":"react-virtualized-auto-sizer.d.ts.map"} |
@@ -6,2 +6,18 @@ var $8zHUo$react = require("react"); | ||
| } | ||
| function $parcel$exportWildcard(dest, source) { | ||
| Object.keys(source).forEach(function(key) { | ||
| if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) { | ||
| return; | ||
| } | ||
| Object.defineProperty(dest, key, { | ||
| enumerable: true, | ||
| get: function get() { | ||
| return source[key]; | ||
| } | ||
| }); | ||
| }); | ||
| return dest; | ||
| } | ||
| function $parcel$export(e, n, v, s) { | ||
@@ -322,3 +338,3 @@ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); | ||
| render() { | ||
| const { children: children , defaultHeight: defaultHeight , defaultWidth: defaultWidth , disableHeight: disableHeight , disableWidth: disableWidth , nonce: nonce , onResize: onResize , style: style , tagName: tagName = "div" , ...rest } = this.props; | ||
| const { children: children , defaultHeight: defaultHeight , defaultWidth: defaultWidth , disableHeight: disableHeight = false , disableWidth: disableWidth = false , nonce: nonce , onResize: onResize , style: style = {} , tagName: tagName = "div" , ...rest } = this.props; | ||
| const { height: height , scaledHeight: scaledHeight , scaledWidth: scaledWidth , width: width } = this.state; | ||
@@ -357,13 +373,24 @@ // Outer div should not force width/height since that may prevent containers from shrinking. | ||
| } | ||
| $4fd1a97a17b80f9f$var$_defineProperty($4fd1a97a17b80f9f$export$9d94f4ee1d930ff, "defaultProps", { | ||
| onResize: ()=>{}, | ||
| disableHeight: false, | ||
| disableWidth: false, | ||
| style: {} | ||
| }); | ||
| var $faefaad95e5fcca0$exports = {}; | ||
| $parcel$export($faefaad95e5fcca0$exports, "isHeightAndWidthProps", () => $faefaad95e5fcca0$export$6a9e233b3261c1f); | ||
| $parcel$export($faefaad95e5fcca0$exports, "isHeightOnlyProps", () => $faefaad95e5fcca0$export$232069b3e05ce32a); | ||
| $parcel$export($faefaad95e5fcca0$exports, "isWidthOnlyProps", () => $faefaad95e5fcca0$export$10ec32941a097f36); | ||
| function $faefaad95e5fcca0$export$6a9e233b3261c1f(props) { | ||
| return props && props.disableHeight !== true && props.disableWidth !== true; | ||
| } | ||
| function $faefaad95e5fcca0$export$232069b3e05ce32a(props) { | ||
| return props && props.disableHeight !== true && props.disableWidth === true; | ||
| } | ||
| function $faefaad95e5fcca0$export$10ec32941a097f36(props) { | ||
| return props && props.disableHeight === true && props.disableWidth !== true; | ||
| } | ||
| var $882b6d93070905b3$export$2e2bcd8739ae039 = (0, $4fd1a97a17b80f9f$export$9d94f4ee1d930ff); | ||
| $parcel$exportWildcard(module.exports, $faefaad95e5fcca0$exports); | ||
| //# sourceMappingURL=react-virtualized-auto-sizer.js.map |
@@ -1,1 +0,1 @@ | ||
| {"mappings":";;;;;;;;;;;;;;;;;;;;;;A;;AEAA;;;;;;;;;;EAUA,GAEA,iEAAA;AACA,IAAI6E;AACJ,IAAI,OAAOnC,WAAW,aACpBmC,qCAAenC;KAGV,IAAI,OAAOoC,SAAS,aACzB,iDAAA;AACAD,qCAAeC;KAEfD,qCAAeE;AAGjB,IAAIC,oCAAc,IAAI;AACtB,IAAIC,qCAAe,IAAI;AAEvB,MAAMC,yCAAmB;AAEzB,MAAMC,uCAAiBN,mCAAaO,YAAY;AAChD,MAAMC,qCAAeR,mCAAad,UAAU;AAE5C,MAAMuB,+CACJT,mCAAaU,oBAAoB,IACjCV,mCAAaW,uBAAuB,IACpCX,mCAAaY,0BAA0B;AAEzC,MAAMC,gDACJb,mCAAac,qBAAqB,IAClCd,mCAAae,wBAAwB,IACrCf,mCAAagB,2BAA2B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;QACA,IAAIC,oBAAoB,KAAK;QAE7B,IAAI,CAACxD,eAAe;YAClB,IAAIR,WAAW,GACbgE,oBAAoB,IAAI;YAE1BH,WAAW7D,MAAM,GAAG;YACpB+D,YAAY/D,MAAM,GAAGA;YACrB+D,YAAY7D,YAAY,GAAGA;QAC7B,CAAA;QAEA,IAAI,CAACO,cAAc;YACjB,IAAIR,UAAU,GACZ+D,oBAAoB,IAAI;YAE1BH,WAAW5D,KAAK,GAAG;YACnB8D,YAAY9D,KAAK,GAAGA;YACpB8D,YAAY5D,WAAW,GAAGA;QAC5B,CAAA;QAEA,OAAOT,CAAAA,GAAAA,0BAAa,AAAbA,EACLkB,SACA;YACEqD,KAAK,IAAI,CAACC,OAAO;YACjBnC,OAAO;gBACL,GAAG8B,UAAU;gBACb,GAAG9B,KAAH;YACF;YACA,GAAG6B,IAAH;QACF,GACA,CAACI,qBAAqB5D,SAAS2D;IAEnC;AAgDF;AAACvC,sCAtLYlC,0CAAS,gBACE;IACpBqB,UAAUA,IAAM,CAAC;IACjBH,eAAe,KAAK;IACpBC,cAAc,KAAK;IACnBsB,OAAO,CAAC;AACV;;ADrDF;IAEA,2CAAezC,CAAAA,GAAAA,wCAAAA","sources":["src/index.ts","src/AutoSizer.ts","vendor/detectElementResize.js"],"sourcesContent":["import { AutoSizer, Props, Size } from \"./AutoSizer\";\n\nexport default AutoSizer;\n\nexport type { Props, Size };\n","import {\n Component,\n createElement,\n CSSProperties,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n} from \"react\";\n\n// @ts-ignore\nimport { createDetectElementResize } from \"../vendor/detectElementResize\";\n\nexport type Size = {\n // Legacy width and height parameters (offsetWidth and offsetHeight)\n height?: number;\n width?: number;\n\n // Take transform:scale into account (getBoundingClientRect)\n scaledHeight?: number;\n scaledWidth?: number;\n};\n\nexport type Props = {\n children: (size: Size) => ReactNode;\n defaultHeight?: number;\n defaultWidth?: number;\n disableHeight?: boolean;\n disableWidth?: boolean;\n nonce?: string;\n onResize?: (size: Size) => void;\n tagName?: string;\n} & Omit<HTMLAttributes<HTMLDivElement>, \"children\" | \"onResize\">;\n\ntype State = {\n height: number;\n scaledHeight: number;\n scaledWidth: number;\n width: number;\n};\n\ntype ResizeHandler = (element: HTMLElement, onResize: () => void) => void;\n\ntype DetectElementResize = {\n addResizeListener: ResizeHandler;\n removeResizeListener: ResizeHandler;\n};\n\nexport class AutoSizer extends Component<Props, State> {\n static defaultProps = {\n onResize: () => {},\n disableHeight: false,\n disableWidth: false,\n style: {},\n };\n\n state = {\n height: this.props.defaultHeight || 0,\n scaledHeight: this.props.defaultHeight || 0,\n scaledWidth: this.props.defaultWidth || 0,\n width: this.props.defaultWidth || 0,\n };\n\n _autoSizer: HTMLElement | null = null;\n _detectElementResize: DetectElementResize | null = null;\n _parentNode: HTMLElement | null = null;\n _resizeObserver: ResizeObserver | null = null;\n\n componentDidMount() {\n const { nonce } = this.props;\n\n if (\n this._autoSizer &&\n this._autoSizer.parentNode &&\n this._autoSizer.parentNode.ownerDocument &&\n this._autoSizer.parentNode.ownerDocument.defaultView &&\n this._autoSizer.parentNode instanceof\n this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement\n ) {\n // Delay access of parentNode until mount.\n // This handles edge-cases where the component has already been unmounted before its ref has been set,\n // As well as libraries like react-lite which have a slightly different lifecycle.\n this._parentNode = this._autoSizer.parentNode;\n\n // Defer requiring resize handler in order to support server-side rendering.\n // See issue #41\n if (this._parentNode != null) {\n if (typeof ResizeObserver !== \"undefined\") {\n this._resizeObserver = new ResizeObserver(() => {\n // Guard against \"ResizeObserver loop limit exceeded\" error;\n // could be triggered if the state update causes the ResizeObserver handler to run long.\n // See https://github.com/bvaughn/react-virtualized-auto-sizer/issues/55\n setTimeout(this._onResize, 0);\n });\n this._resizeObserver.observe(this._parentNode);\n } else {\n this._detectElementResize = createDetectElementResize(\n nonce\n ) as DetectElementResize;\n this._detectElementResize.addResizeListener(\n this._parentNode,\n this._onResize\n );\n }\n\n this._onResize();\n }\n }\n }\n\n componentWillUnmount() {\n if (this._parentNode) {\n if (this._detectElementResize) {\n this._detectElementResize.removeResizeListener(\n this._parentNode,\n this._onResize\n );\n }\n\n if (this._resizeObserver) {\n this._resizeObserver.observe(this._parentNode);\n this._resizeObserver.disconnect();\n }\n }\n }\n\n render(): ReactElement {\n const {\n children,\n defaultHeight,\n defaultWidth,\n disableHeight,\n disableWidth,\n nonce,\n onResize,\n style,\n tagName = \"div\",\n ...rest\n } = this.props;\n\n const { height, scaledHeight, scaledWidth, width } = this.state;\n\n // Outer div should not force width/height since that may prevent containers from shrinking.\n // Inner component should overflow and use calculated width/height.\n // See issue #68 for more information.\n const outerStyle: CSSProperties = { overflow: \"visible\" };\n const childParams: Size = {};\n\n // Avoid rendering children before the initial measurements have been collected.\n // At best this would just be wasting cycles.\n let bailoutOnChildren = false;\n\n if (!disableHeight) {\n if (height === 0) {\n bailoutOnChildren = true;\n }\n outerStyle.height = 0;\n childParams.height = height;\n childParams.scaledHeight = scaledHeight;\n }\n\n if (!disableWidth) {\n if (width === 0) {\n bailoutOnChildren = true;\n }\n outerStyle.width = 0;\n childParams.width = width;\n childParams.scaledWidth = scaledWidth;\n }\n\n return createElement(\n tagName,\n {\n ref: this._setRef,\n style: {\n ...outerStyle,\n ...style,\n },\n ...rest,\n },\n !bailoutOnChildren && children(childParams)\n );\n }\n\n _onResize = () => {\n const { disableHeight, disableWidth, onResize } = this.props;\n\n if (this._parentNode) {\n // Guard against AutoSizer component being removed from the DOM immediately after being added.\n // This can result in invalid style values which can result in NaN values if we don't handle them.\n // See issue #150 for more context.\n\n const style = window.getComputedStyle(this._parentNode) || {};\n const paddingLeft = parseFloat(style.paddingLeft ?? \"0\");\n const paddingRight = parseFloat(style.paddingRight ?? \"0\");\n const paddingTop = parseFloat(style.paddingTop ?? \"0\");\n const paddingBottom = parseFloat(style.paddingBottom ?? \"0\");\n\n const rect = this._parentNode.getBoundingClientRect();\n const scaledHeight = rect.height - paddingTop - paddingBottom;\n const scaledWidth = rect.width - paddingLeft - paddingRight;\n\n const height = this._parentNode.offsetHeight - paddingTop - paddingBottom;\n const width = this._parentNode.offsetWidth - paddingLeft - paddingRight;\n\n if (\n (!disableHeight &&\n (this.state.height !== height ||\n this.state.scaledHeight !== scaledHeight)) ||\n (!disableWidth &&\n (this.state.width !== width ||\n this.state.scaledWidth !== scaledWidth))\n ) {\n this.setState({\n height,\n width,\n scaledHeight,\n scaledWidth,\n });\n\n if (typeof onResize === \"function\") {\n onResize({ height, scaledHeight, scaledWidth, width });\n }\n }\n }\n };\n\n _setRef = (autoSizer: HTMLElement | null) => {\n this._autoSizer = autoSizer;\n };\n}\n","/**\n * Detect Element Resize.\n * https://github.com/sdecima/javascript-detect-element-resize\n * Sebastian Decima\n *\n * Forked from version 0.5.3; includes the following modifications:\n * 1) Guard against unsafe 'window' and 'document' references (to support SSR).\n * 2) Defer initialization code via a top-level function wrapper (to support SSR).\n * 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.\n * 4) Add nonce for style element.\n **/\n\n// Check `document` and `window` in case of server-side rendering\nlet windowObject;\nif (typeof window !== \"undefined\") {\n windowObject = window;\n\n // eslint-disable-next-line no-restricted-globals\n} else if (typeof self !== \"undefined\") {\n // eslint-disable-next-line no-restricted-globals\n windowObject = self;\n} else {\n windowObject = global;\n}\n\nlet cancelFrame = null;\nlet requestFrame = null;\n\nconst TIMEOUT_DURATION = 20;\n\nconst clearTimeoutFn = windowObject.clearTimeout;\nconst setTimeoutFn = windowObject.setTimeout;\n\nconst cancelAnimationFrameFn =\n windowObject.cancelAnimationFrame ||\n windowObject.mozCancelAnimationFrame ||\n windowObject.webkitCancelAnimationFrame;\n\nconst requestAnimationFrameFn =\n windowObject.requestAnimationFrame ||\n windowObject.mozRequestAnimationFrame ||\n windowObject.webkitRequestAnimationFrame;\n\nif (cancelAnimationFrameFn == null || requestAnimationFrameFn == null) {\n // For environments that don't support animation frame,\n // fallback to a setTimeout based approach.\n cancelFrame = clearTimeoutFn;\n requestFrame = function requestAnimationFrameViaSetTimeout(callback) {\n return setTimeoutFn(callback, TIMEOUT_DURATION);\n };\n} else {\n // Counter intuitively, environments that support animation frames can be trickier.\n // Chrome's \"Throttle non-visible cross-origin iframes\" flag can prevent rAFs from being called.\n // In this case, we should fallback to a setTimeout() implementation.\n cancelFrame = function cancelFrame([animationFrameID, timeoutID]) {\n cancelAnimationFrameFn(animationFrameID);\n clearTimeoutFn(timeoutID);\n };\n requestFrame = function requestAnimationFrameWithSetTimeoutFallback(\n callback\n ) {\n const animationFrameID = requestAnimationFrameFn(\n function animationFrameCallback() {\n clearTimeoutFn(timeoutID);\n callback();\n }\n );\n\n const timeoutID = setTimeoutFn(function timeoutCallback() {\n cancelAnimationFrameFn(animationFrameID);\n callback();\n }, TIMEOUT_DURATION);\n\n return [animationFrameID, timeoutID];\n };\n}\n\nfunction createDetectElementResize(nonce) {\n let animationKeyframes;\n let animationName;\n let animationStartEvent;\n let animationStyle;\n let checkTriggers;\n let resetTriggers;\n let scrollListener;\n\n const attachEvent = typeof document !== \"undefined\" && document.attachEvent;\n if (!attachEvent) {\n resetTriggers = function (element) {\n const triggers = element.__resizeTriggers__,\n expand = triggers.firstElementChild,\n contract = triggers.lastElementChild,\n expandChild = expand.firstElementChild;\n contract.scrollLeft = contract.scrollWidth;\n contract.scrollTop = contract.scrollHeight;\n expandChild.style.width = expand.offsetWidth + 1 + \"px\";\n expandChild.style.height = expand.offsetHeight + 1 + \"px\";\n expand.scrollLeft = expand.scrollWidth;\n expand.scrollTop = expand.scrollHeight;\n };\n\n checkTriggers = function (element) {\n return (\n element.offsetWidth !== element.__resizeLast__.width ||\n element.offsetHeight !== element.__resizeLast__.height\n );\n };\n\n scrollListener = function (e) {\n // Don't measure (which forces) reflow for scrolls that happen inside of children!\n if (\n e.target.className &&\n typeof e.target.className.indexOf === \"function\" &&\n e.target.className.indexOf(\"contract-trigger\") < 0 &&\n e.target.className.indexOf(\"expand-trigger\") < 0\n ) {\n return;\n }\n\n const element = this;\n resetTriggers(this);\n if (this.__resizeRAF__) {\n cancelFrame(this.__resizeRAF__);\n }\n this.__resizeRAF__ = requestFrame(function animationFrame() {\n if (checkTriggers(element)) {\n element.__resizeLast__.width = element.offsetWidth;\n element.__resizeLast__.height = element.offsetHeight;\n element.__resizeListeners__.forEach(function forEachResizeListener(\n fn\n ) {\n fn.call(element, e);\n });\n }\n });\n };\n\n /* Detect CSS Animations support to detect element display/re-attach */\n let animation = false;\n let keyframeprefix = \"\";\n animationStartEvent = \"animationstart\";\n const domPrefixes = \"Webkit Moz O ms\".split(\" \");\n let startEvents =\n \"webkitAnimationStart animationstart oAnimationStart MSAnimationStart\".split(\n \" \"\n );\n let pfx = \"\";\n {\n const elm = document.createElement(\"fakeelement\");\n if (elm.style.animationName !== undefined) {\n animation = true;\n }\n\n if (animation === false) {\n for (let i = 0; i < domPrefixes.length; i++) {\n if (elm.style[domPrefixes[i] + \"AnimationName\"] !== undefined) {\n pfx = domPrefixes[i];\n keyframeprefix = \"-\" + pfx.toLowerCase() + \"-\";\n animationStartEvent = startEvents[i];\n animation = true;\n break;\n }\n }\n }\n }\n\n animationName = \"resizeanim\";\n animationKeyframes =\n \"@\" +\n keyframeprefix +\n \"keyframes \" +\n animationName +\n \" { from { opacity: 0; } to { opacity: 0; } } \";\n animationStyle = keyframeprefix + \"animation: 1ms \" + animationName + \"; \";\n }\n\n const createStyles = function (doc) {\n if (!doc.getElementById(\"detectElementResize\")) {\n //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360\n const css =\n (animationKeyframes ? animationKeyframes : \"\") +\n \".resize-triggers { \" +\n (animationStyle ? animationStyle : \"\") +\n \"visibility: hidden; opacity: 0; } \" +\n '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',\n head = doc.head || doc.getElementsByTagName(\"head\")[0],\n style = doc.createElement(\"style\");\n\n style.id = \"detectElementResize\";\n style.type = \"text/css\";\n\n if (nonce != null) {\n style.setAttribute(\"nonce\", nonce);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(doc.createTextNode(css));\n }\n\n head.appendChild(style);\n }\n };\n\n const addResizeListener = function (element, fn) {\n if (attachEvent) {\n element.attachEvent(\"onresize\", fn);\n } else {\n if (!element.__resizeTriggers__) {\n const doc = element.ownerDocument;\n const elementStyle = windowObject.getComputedStyle(element);\n if (elementStyle && elementStyle.position === \"static\") {\n element.style.position = \"relative\";\n }\n createStyles(doc);\n element.__resizeLast__ = {};\n element.__resizeListeners__ = [];\n (element.__resizeTriggers__ = doc.createElement(\"div\")).className =\n \"resize-triggers\";\n const expandTrigger = doc.createElement(\"div\");\n expandTrigger.className = \"expand-trigger\";\n expandTrigger.appendChild(doc.createElement(\"div\"));\n const contractTrigger = doc.createElement(\"div\");\n contractTrigger.className = \"contract-trigger\";\n element.__resizeTriggers__.appendChild(expandTrigger);\n element.__resizeTriggers__.appendChild(contractTrigger);\n element.appendChild(element.__resizeTriggers__);\n resetTriggers(element);\n element.addEventListener(\"scroll\", scrollListener, true);\n\n /* Listen for a css animation to detect element display/re-attach */\n if (animationStartEvent) {\n element.__resizeTriggers__.__animationListener__ =\n function animationListener(e) {\n if (e.animationName === animationName) {\n resetTriggers(element);\n }\n };\n element.__resizeTriggers__.addEventListener(\n animationStartEvent,\n element.__resizeTriggers__.__animationListener__\n );\n }\n }\n element.__resizeListeners__.push(fn);\n }\n };\n\n const removeResizeListener = function (element, fn) {\n if (attachEvent) {\n element.detachEvent(\"onresize\", fn);\n } else {\n element.__resizeListeners__.splice(\n element.__resizeListeners__.indexOf(fn),\n 1\n );\n if (!element.__resizeListeners__.length) {\n element.removeEventListener(\"scroll\", scrollListener, true);\n if (element.__resizeTriggers__.__animationListener__) {\n element.__resizeTriggers__.removeEventListener(\n animationStartEvent,\n element.__resizeTriggers__.__animationListener__\n );\n element.__resizeTriggers__.__animationListener__ = null;\n }\n try {\n element.__resizeTriggers__ = !element.removeChild(\n element.__resizeTriggers__\n );\n } catch (e) {\n // Preact compat; see developit/preact-compat/issues/228\n }\n }\n }\n };\n\n return {\n addResizeListener,\n removeResizeListener,\n };\n}\n\nmodule.exports = { createDetectElementResize };\n"],"names":["AutoSizer","Props","Size","Component","createElement","CSSProperties","HTMLAttributes","ReactElement","ReactNode","createDetectElementResize","height","width","scaledHeight","scaledWidth","children","size","defaultHeight","defaultWidth","disableHeight","disableWidth","nonce","onResize","tagName","Omit","HTMLDivElement","State","ResizeHandler","element","HTMLElement","DetectElementResize","addResizeListener","removeResizeListener","constructor","args","_defineProperty","props","_parentNode","_style$paddingLeft","_style$paddingRight","_style$paddingTop","_style$paddingBottom","style","window","getComputedStyle","paddingLeft","parseFloat","paddingRight","paddingTop","paddingBottom","rect","getBoundingClientRect","offsetHeight","offsetWidth","state","setState","autoSizer","_autoSizer","componentDidMount","parentNode","ownerDocument","defaultView","ResizeObserver","_resizeObserver","setTimeout","_onResize","observe","_detectElementResize","componentWillUnmount","disconnect","render","rest","outerStyle","overflow","childParams","bailoutOnChildren","ref","_setRef","windowObject","self","global","cancelFrame","requestFrame","TIMEOUT_DURATION","clearTimeoutFn","clearTimeout","setTimeoutFn","cancelAnimationFrameFn","cancelAnimationFrame","mozCancelAnimationFrame","webkitCancelAnimationFrame","requestAnimationFrameFn","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","requestAnimationFrameViaSetTimeout","callback","animationFrameID","timeoutID","requestAnimationFrameWithSetTimeoutFallback","animationFrameCallback","timeoutCallback","animationKeyframes","animationName","animationStartEvent","animationStyle","checkTriggers","resetTriggers","scrollListener","attachEvent","document","triggers","__resizeTriggers__","expand","firstElementChild","contract","lastElementChild","expandChild","scrollLeft","scrollWidth","scrollTop","scrollHeight","__resizeLast__","e","target","className","indexOf","__resizeRAF__","animationFrame","__resizeListeners__","forEach","forEachResizeListener","fn","call","animation","keyframeprefix","domPrefixes","split","startEvents","pfx","elm","undefined","i","length","toLowerCase","createStyles","doc","getElementById","css","head","getElementsByTagName","id","type","setAttribute","styleSheet","cssText","appendChild","createTextNode","elementStyle","position","expandTrigger","contractTrigger","addEventListener","__animationListener__","animationListener","push","detachEvent","splice","removeEventListener","removeChild","module","exports"],"version":3,"file":"react-virtualized-auto-sizer.js.map"} | ||
| {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA;;;;;;;;;;EAUA,GAEA,iEAAA;AACA,IAAI0E;AACJ,IAAI,OAAOvC,WAAW,aACpBuC,qCAAevC;KAGV,IAAI,OAAOwC,SAAS,aACzB,iDAAA;AACAD,qCAAeC;KAEfD,qCAAeE;AAGjB,IAAIC,oCAAc;AAClB,IAAIC,qCAAe;AAEnB,MAAMC,yCAAmB;AAEzB,MAAMC,uCAAiBN,mCAAaO;AACpC,MAAMC,qCAAeR,mCAAajB;AAElC,MAAM0B,+CACJT,mCAAaU,wBACbV,mCAAaW,2BACbX,mCAAaY;AAEf,MAAMC,gDACJb,mCAAac,yBACbd,mCAAae,4BACbf,mCAAagB;AAEf,IAAIP,gDAA0B,QAAQI,iDAA2B,MAAM;IACrE,uDAAA;IACA,2CAAA;IACAV,oCAAcG;IACdF,qCAAe,SAASa,mCAAmCC,QAAQ;QACjE,OAAOV,mCAAaU,UAAUb;IAChC;AACF,OAAO;IACL,mFAAA;IACA,gGAAA;IACA,qEAAA;IACAF,oCAAc,SAASA,YAAY,CAACgB,kBAAkBC,UAAU;QAC9DX,6CAAuBU;QACvBb,qCAAec;IACjB;IACAhB,qCAAe,SAASiB,4CACtBH,QAAQ;QAER,MAAMC,mBAAmBN,8CACvB,SAASS;YACPhB,qCAAec;YACfF;QACF;QAGF,MAAME,YAAYZ,mCAAa,SAASe;YACtCd,6CAAuBU;YACvBD;QACF,GAAGb;QAEH,OAAO;YAACc;YAAkBC;SAAU;I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iBAAiB;AACzE;;;IHpDA,2CAAe5B,CAAAA,GAAAA,wCAAAA","sources":["src/index.ts","src/AutoSizer.ts","vendor/detectElementResize.js","src/types.ts"],"sourcesContent":["import { AutoSizer } from \"./AutoSizer\";\n\nexport default AutoSizer;\n\nexport * from \"./types\";\n","import { Component, createElement, CSSProperties, ReactElement } from \"react\";\n\n// @ts-ignore\nimport { createDetectElementResize } from \"../vendor/detectElementResize\";\nimport { HeightAndWidthProps, Props, Size } from \"./types\";\n\ntype State = {\n height: number;\n scaledHeight: number;\n scaledWidth: number;\n width: number;\n};\n\ntype ResizeHandler = (element: HTMLElement, onResize: () => void) => void;\n\ntype DetectElementResize = {\n addResizeListener: ResizeHandler;\n removeResizeListener: ResizeHandler;\n};\n\nexport class AutoSizer extends Component<Props, State> {\n state = {\n height: (this.props as HeightAndWidthProps).defaultHeight || 0,\n scaledHeight: (this.props as HeightAndWidthProps).defaultHeight || 0,\n scaledWidth: (this.props as HeightAndWidthProps).defaultWidth || 0,\n width: (this.props as HeightAndWidthProps).defaultWidth || 0,\n };\n\n _autoSizer: HTMLElement | null = null;\n _detectElementResize: DetectElementResize | null = null;\n _parentNode: HTMLElement | null = null;\n _resizeObserver: ResizeObserver | null = null;\n\n componentDidMount() {\n const { nonce } = this.props;\n\n if (\n this._autoSizer &&\n this._autoSizer.parentNode &&\n this._autoSizer.parentNode.ownerDocument &&\n this._autoSizer.parentNode.ownerDocument.defaultView &&\n this._autoSizer.parentNode instanceof\n this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement\n ) {\n // Delay access of parentNode until mount.\n // This handles edge-cases where the component has already been unmounted before its ref has been set,\n // As well as libraries like react-lite which have a slightly different lifecycle.\n this._parentNode = this._autoSizer.parentNode;\n\n // Defer requiring resize handler in order to support server-side rendering.\n // See issue #41\n if (this._parentNode != null) {\n if (typeof ResizeObserver !== \"undefined\") {\n this._resizeObserver = new ResizeObserver(() => {\n // Guard against \"ResizeObserver loop limit exceeded\" error;\n // could be triggered if the state update causes the ResizeObserver handler to run long.\n // See https://github.com/bvaughn/react-virtualized-auto-sizer/issues/55\n setTimeout(this._onResize, 0);\n });\n this._resizeObserver.observe(this._parentNode);\n } else {\n this._detectElementResize = createDetectElementResize(\n nonce\n ) as DetectElementResize;\n this._detectElementResize.addResizeListener(\n this._parentNode,\n this._onResize\n );\n }\n\n this._onResize();\n }\n }\n }\n\n componentWillUnmount() {\n if (this._parentNode) {\n if (this._detectElementResize) {\n this._detectElementResize.removeResizeListener(\n this._parentNode,\n this._onResize\n );\n }\n\n if (this._resizeObserver) {\n this._resizeObserver.observe(this._parentNode);\n this._resizeObserver.disconnect();\n }\n }\n }\n\n render(): ReactElement {\n const {\n children,\n defaultHeight,\n defaultWidth,\n disableHeight = false,\n disableWidth = false,\n nonce,\n onResize,\n style = {},\n tagName = \"div\",\n ...rest\n } = this.props as HeightAndWidthProps;\n\n const { height, scaledHeight, scaledWidth, width } = this.state;\n\n // Outer div should not force width/height since that may prevent containers from shrinking.\n // Inner component should overflow and use calculated width/height.\n // See issue #68 for more information.\n const outerStyle: CSSProperties = { overflow: \"visible\" };\n const childParams: Partial<Size> = {};\n\n // Avoid rendering children before the initial measurements have been collected.\n // At best this would just be wasting cycles.\n let bailoutOnChildren = false;\n\n if (!disableHeight) {\n if (height === 0) {\n bailoutOnChildren = true;\n }\n outerStyle.height = 0;\n childParams.height = height;\n childParams.scaledHeight = scaledHeight;\n }\n\n if (!disableWidth) {\n if (width === 0) {\n bailoutOnChildren = true;\n }\n outerStyle.width = 0;\n childParams.width = width;\n childParams.scaledWidth = scaledWidth;\n }\n\n return createElement(\n tagName,\n {\n ref: this._setRef,\n style: {\n ...outerStyle,\n ...style,\n },\n ...rest,\n },\n !bailoutOnChildren && children(childParams as Size)\n );\n }\n\n _onResize = () => {\n const { disableHeight, disableWidth, onResize } = this\n .props as HeightAndWidthProps;\n\n if (this._parentNode) {\n // Guard against AutoSizer component being removed from the DOM immediately after being added.\n // This can result in invalid style values which can result in NaN values if we don't handle them.\n // See issue #150 for more context.\n\n const style = window.getComputedStyle(this._parentNode) || {};\n const paddingLeft = parseFloat(style.paddingLeft ?? \"0\");\n const paddingRight = parseFloat(style.paddingRight ?? \"0\");\n const paddingTop = parseFloat(style.paddingTop ?? \"0\");\n const paddingBottom = parseFloat(style.paddingBottom ?? \"0\");\n\n const rect = this._parentNode.getBoundingClientRect();\n const scaledHeight = rect.height - paddingTop - paddingBottom;\n const scaledWidth = rect.width - paddingLeft - paddingRight;\n\n const height = this._parentNode.offsetHeight - paddingTop - paddingBottom;\n const width = this._parentNode.offsetWidth - paddingLeft - paddingRight;\n\n if (\n (!disableHeight &&\n (this.state.height !== height ||\n this.state.scaledHeight !== scaledHeight)) ||\n (!disableWidth &&\n (this.state.width !== width ||\n this.state.scaledWidth !== scaledWidth))\n ) {\n this.setState({\n height,\n width,\n scaledHeight,\n scaledWidth,\n });\n\n if (typeof onResize === \"function\") {\n onResize({ height, scaledHeight, scaledWidth, width });\n }\n }\n }\n };\n\n _setRef = (autoSizer: HTMLElement | null) => {\n this._autoSizer = autoSizer;\n };\n}\n","/**\n * Detect Element Resize.\n * https://github.com/sdecima/javascript-detect-element-resize\n * Sebastian Decima\n *\n * Forked from version 0.5.3; includes the following modifications:\n * 1) Guard against unsafe 'window' and 'document' references (to support SSR).\n * 2) Defer initialization code via a top-level function wrapper (to support SSR).\n * 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.\n * 4) Add nonce for style element.\n **/\n\n// Check `document` and `window` in case of server-side rendering\nlet windowObject;\nif (typeof window !== \"undefined\") {\n windowObject = window;\n\n // eslint-disable-next-line no-restricted-globals\n} else if (typeof self !== \"undefined\") {\n // eslint-disable-next-line no-restricted-globals\n windowObject = self;\n} else {\n windowObject = global;\n}\n\nlet cancelFrame = null;\nlet requestFrame = null;\n\nconst TIMEOUT_DURATION = 20;\n\nconst clearTimeoutFn = windowObject.clearTimeout;\nconst setTimeoutFn = windowObject.setTimeout;\n\nconst cancelAnimationFrameFn =\n windowObject.cancelAnimationFrame ||\n windowObject.mozCancelAnimationFrame ||\n windowObject.webkitCancelAnimationFrame;\n\nconst requestAnimationFrameFn =\n windowObject.requestAnimationFrame ||\n windowObject.mozRequestAnimationFrame ||\n windowObject.webkitRequestAnimationFrame;\n\nif (cancelAnimationFrameFn == null || requestAnimationFrameFn == null) {\n // For environments that don't support animation frame,\n // fallback to a setTimeout based approach.\n cancelFrame = clearTimeoutFn;\n requestFrame = function requestAnimationFrameViaSetTimeout(callback) {\n return setTimeoutFn(callback, TIMEOUT_DURATION);\n };\n} else {\n // Counter intuitively, environments that support animation frames can be trickier.\n // Chrome's \"Throttle non-visible cross-origin iframes\" flag can prevent rAFs from being called.\n // In this case, we should fallback to a setTimeout() implementation.\n cancelFrame = function cancelFrame([animationFrameID, timeoutID]) {\n cancelAnimationFrameFn(animationFrameID);\n clearTimeoutFn(timeoutID);\n };\n requestFrame = function requestAnimationFrameWithSetTimeoutFallback(\n callback\n ) {\n const animationFrameID = requestAnimationFrameFn(\n function animationFrameCallback() {\n clearTimeoutFn(timeoutID);\n callback();\n }\n );\n\n const timeoutID = setTimeoutFn(function timeoutCallback() {\n cancelAnimationFrameFn(animationFrameID);\n callback();\n }, TIMEOUT_DURATION);\n\n return [animationFrameID, timeoutID];\n };\n}\n\nfunction createDetectElementResize(nonce) {\n let animationKeyframes;\n let animationName;\n let animationStartEvent;\n let animationStyle;\n let checkTriggers;\n let resetTriggers;\n let scrollListener;\n\n const attachEvent = typeof document !== \"undefined\" && document.attachEvent;\n if (!attachEvent) {\n resetTriggers = function (element) {\n const triggers = element.__resizeTriggers__,\n expand = triggers.firstElementChild,\n contract = triggers.lastElementChild,\n expandChild = expand.firstElementChild;\n contract.scrollLeft = contract.scrollWidth;\n contract.scrollTop = contract.scrollHeight;\n expandChild.style.width = expand.offsetWidth + 1 + \"px\";\n expandChild.style.height = expand.offsetHeight + 1 + \"px\";\n expand.scrollLeft = expand.scrollWidth;\n expand.scrollTop = expand.scrollHeight;\n };\n\n checkTriggers = function (element) {\n return (\n element.offsetWidth !== element.__resizeLast__.width ||\n element.offsetHeight !== element.__resizeLast__.height\n );\n };\n\n scrollListener = function (e) {\n // Don't measure (which forces) reflow for scrolls that happen inside of children!\n if (\n e.target.className &&\n typeof e.target.className.indexOf === \"function\" &&\n e.target.className.indexOf(\"contract-trigger\") < 0 &&\n e.target.className.indexOf(\"expand-trigger\") < 0\n ) {\n return;\n }\n\n const element = this;\n resetTriggers(this);\n if (this.__resizeRAF__) {\n cancelFrame(this.__resizeRAF__);\n }\n this.__resizeRAF__ = requestFrame(function animationFrame() {\n if (checkTriggers(element)) {\n element.__resizeLast__.width = element.offsetWidth;\n element.__resizeLast__.height = element.offsetHeight;\n element.__resizeListeners__.forEach(function forEachResizeListener(\n fn\n ) {\n fn.call(element, e);\n });\n }\n });\n };\n\n /* Detect CSS Animations support to detect element display/re-attach */\n let animation = false;\n let keyframeprefix = \"\";\n animationStartEvent = \"animationstart\";\n const domPrefixes = \"Webkit Moz O ms\".split(\" \");\n let startEvents =\n \"webkitAnimationStart animationstart oAnimationStart MSAnimationStart\".split(\n \" \"\n );\n let pfx = \"\";\n {\n const elm = document.createElement(\"fakeelement\");\n if (elm.style.animationName !== undefined) {\n animation = true;\n }\n\n if (animation === false) {\n for (let i = 0; i < domPrefixes.length; i++) {\n if (elm.style[domPrefixes[i] + \"AnimationName\"] !== undefined) {\n pfx = domPrefixes[i];\n keyframeprefix = \"-\" + pfx.toLowerCase() + \"-\";\n animationStartEvent = startEvents[i];\n animation = true;\n break;\n }\n }\n }\n }\n\n animationName = \"resizeanim\";\n animationKeyframes =\n \"@\" +\n keyframeprefix +\n \"keyframes \" +\n animationName +\n \" { from { opacity: 0; } to { opacity: 0; } } \";\n animationStyle = keyframeprefix + \"animation: 1ms \" + animationName + \"; \";\n }\n\n const createStyles = function (doc) {\n if (!doc.getElementById(\"detectElementResize\")) {\n //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360\n const css =\n (animationKeyframes ? animationKeyframes : \"\") +\n \".resize-triggers { \" +\n (animationStyle ? animationStyle : \"\") +\n \"visibility: hidden; opacity: 0; } \" +\n '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',\n head = doc.head || doc.getElementsByTagName(\"head\")[0],\n style = doc.createElement(\"style\");\n\n style.id = \"detectElementResize\";\n style.type = \"text/css\";\n\n if (nonce != null) {\n style.setAttribute(\"nonce\", nonce);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(doc.createTextNode(css));\n }\n\n head.appendChild(style);\n }\n };\n\n const addResizeListener = function (element, fn) {\n if (attachEvent) {\n element.attachEvent(\"onresize\", fn);\n } else {\n if (!element.__resizeTriggers__) {\n const doc = element.ownerDocument;\n const elementStyle = windowObject.getComputedStyle(element);\n if (elementStyle && elementStyle.position === \"static\") {\n element.style.position = \"relative\";\n }\n createStyles(doc);\n element.__resizeLast__ = {};\n element.__resizeListeners__ = [];\n (element.__resizeTriggers__ = doc.createElement(\"div\")).className =\n \"resize-triggers\";\n const expandTrigger = doc.createElement(\"div\");\n expandTrigger.className = \"expand-trigger\";\n expandTrigger.appendChild(doc.createElement(\"div\"));\n const contractTrigger = doc.createElement(\"div\");\n contractTrigger.className = \"contract-trigger\";\n element.__resizeTriggers__.appendChild(expandTrigger);\n element.__resizeTriggers__.appendChild(contractTrigger);\n element.appendChild(element.__resizeTriggers__);\n resetTriggers(element);\n element.addEventListener(\"scroll\", scrollListener, true);\n\n /* Listen for a css animation to detect element display/re-attach */\n if (animationStartEvent) {\n element.__resizeTriggers__.__animationListener__ =\n function animationListener(e) {\n if (e.animationName === animationName) {\n resetTriggers(element);\n }\n };\n element.__resizeTriggers__.addEventListener(\n animationStartEvent,\n element.__resizeTriggers__.__animationListener__\n );\n }\n }\n element.__resizeListeners__.push(fn);\n }\n };\n\n const removeResizeListener = function (element, fn) {\n if (attachEvent) {\n element.detachEvent(\"onresize\", fn);\n } else {\n element.__resizeListeners__.splice(\n element.__resizeListeners__.indexOf(fn),\n 1\n );\n if (!element.__resizeListeners__.length) {\n element.removeEventListener(\"scroll\", scrollListener, true);\n if (element.__resizeTriggers__.__animationListener__) {\n element.__resizeTriggers__.removeEventListener(\n animationStartEvent,\n element.__resizeTriggers__.__animationListener__\n );\n element.__resizeTriggers__.__animationListener__ = null;\n }\n try {\n element.__resizeTriggers__ = !element.removeChild(\n element.__resizeTriggers__\n );\n } catch (e) {\n // Preact compat; see developit/preact-compat/issues/228\n }\n }\n }\n };\n\n return {\n addResizeListener,\n removeResizeListener,\n };\n}\n\nmodule.exports = { createDetectElementResize };\n","import { HTMLAttributes, ReactNode } from \"react\";\n\nexport type HorizontalSize = {\n width: number;\n scaledWidth: number;\n};\nexport type VerticalSize = {\n height: number;\n scaledHeight: number;\n};\nexport type Size = HorizontalSize & VerticalSize;\n\ntype BaseProps = {\n nonce?: string;\n tagName?: string;\n} & Omit<HTMLAttributes<HTMLDivElement>, \"children\" | \"onResize\">;\n\nexport type HeightOnlyProps = BaseProps & {\n children: (size: VerticalSize) => ReactNode;\n defaultHeight?: number;\n disableWidth: true;\n onResize?: (size: VerticalSize) => void;\n};\n\nexport type WidthOnlyProps = BaseProps & {\n children: (size: HorizontalSize) => ReactNode;\n defaultWidth?: number;\n disableHeight: true;\n onResize?: (size: HorizontalSize) => void;\n};\n\nexport type HeightAndWidthProps = BaseProps & {\n children: (size: Size) => ReactNode;\n defaultHeight?: number;\n defaultWidth?: number;\n disableHeight?: false;\n disableWidth?: false;\n onResize?: (size: Size) => void;\n};\n\nexport type Props = HeightOnlyProps | WidthOnlyProps | HeightAndWidthProps;\n\nexport function isHeightAndWidthProps(\n props: any\n): props is HeightAndWidthProps {\n return props && props.disableHeight !== true && props.disableWidth !== true;\n}\n\nexport function isHeightOnlyProps(props: any): props is HeightOnlyProps {\n return props && props.disableHeight !== true && props.disableWidth === true;\n}\n\nexport function isWidthOnlyProps(props: any): props is WidthOnlyProps {\n return props && props.disableHeight === true && props.disableWidth !== true;\n}\n"],"names":["AutoSizer","Component","createElement","CSSProperties","ReactElement","createDetectElementResize","HeightAndWidthProps","Props","Size","State","height","scaledHeight","scaledWidth","width","ResizeHandler","element","HTMLElement","onResize","DetectElementResize","addResizeListener","removeResizeListener","constructor","args","_defineProperty","props","defaultHeight","defaultWidth","disableHeight","disableWidth","_parentNode","_style$paddingLeft","_style$paddingRight","_style$paddingTop","_style$paddingBottom","style","window","getComputedStyle","paddingLeft","parseFloat","paddingRight","paddingTop","paddingBottom","rect","getBoundingClientRect","offsetHeight","offsetWidth","state","setState","autoSizer","_autoSizer","componentDidMount","nonce","parentNode","ownerDocument","defaultView","ResizeObserver","_resizeObserver","setTimeout","_onResize","observe","_detectElementResize","componentWillUnmount","disconnect","render","children","tagName","rest","outerStyle","overflow","childParams","Partial","bailoutOnChildren","ref","_setRef","windowObject","self","global","cancelFrame","requestFrame","TIMEOUT_DURATION","clearTimeoutFn","clearTimeout","setTimeoutFn","cancelAnimationFrameFn","cancelAnimationFrame","mozCancelAnimationFrame","webkitCancelAnimationFrame","requestAnimationFrameFn","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","requestAnimationFrameViaSetTimeout","callback","animationFrameID","timeoutID","requestAnimationFrameWithSetTimeoutFallback","animationFrameCallback","timeoutCallback","animationKeyframes","animationName","animationStartEvent","animationStyle","checkTriggers","resetTriggers","scrollListener","attachEvent","document","triggers","__resizeTriggers__","expand","firstElementChild","contract","lastElementChild","expandChild","scrollLeft","scrollWidth","scrollTop","scrollHeight","__resizeLast__","e","target","className","indexOf","__resizeRAF__","animationFrame","__resizeListeners__","forEach","forEachResizeListener","fn","call","animation","keyframeprefix","domPrefixes","split","startEvents","pfx","elm","undefined","i","length","toLowerCase","createStyles","doc","getElementById","css","head","getElementsByTagName","id","type","setAttribute","styleSheet","cssText","appendChild","createTextNode","elementStyle","position","expandTrigger","contractTrigger","addEventListener","__animationListener__","animationListener","push","detachEvent","splice","removeEventListener","removeChild","module","exports","HTMLAttributes","ReactNode","HorizontalSize","VerticalSize","BaseProps","Omit","HTMLDivElement","HeightOnlyProps","size","WidthOnlyProps","isHeightAndWidthProps","isHeightOnlyProps","isWidthOnlyProps"],"version":3,"file":"react-virtualized-auto-sizer.js.map"} |
@@ -13,2 +13,5 @@ import {createElement as $hgUW1$createElement, Component as $hgUW1$Component} from "react"; | ||
| : {}; | ||
| function $parcel$export(e, n, v, s) { | ||
| Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); | ||
| } | ||
@@ -312,3 +315,3 @@ var $3e40d2fd7fdb47d2$exports = {}; | ||
| render() { | ||
| const { children: children , defaultHeight: defaultHeight , defaultWidth: defaultWidth , disableHeight: disableHeight , disableWidth: disableWidth , nonce: nonce , onResize: onResize , style: style , tagName: tagName = "div" , ...rest } = this.props; | ||
| const { children: children , defaultHeight: defaultHeight , defaultWidth: defaultWidth , disableHeight: disableHeight = false , disableWidth: disableWidth = false , nonce: nonce , onResize: onResize , style: style = {} , tagName: tagName = "div" , ...rest } = this.props; | ||
| const { height: height , scaledHeight: scaledHeight , scaledWidth: scaledWidth , width: width } = this.state; | ||
@@ -347,14 +350,24 @@ // Outer div should not force width/height since that may prevent containers from shrinking. | ||
| } | ||
| $6e2bb92d9db3b0c8$var$_defineProperty($6e2bb92d9db3b0c8$export$9d94f4ee1d930ff, "defaultProps", { | ||
| onResize: ()=>{}, | ||
| disableHeight: false, | ||
| disableWidth: false, | ||
| style: {} | ||
| }); | ||
| var $81c1b644006d48ec$exports = {}; | ||
| $parcel$export($81c1b644006d48ec$exports, "isHeightAndWidthProps", () => $81c1b644006d48ec$export$6a9e233b3261c1f); | ||
| $parcel$export($81c1b644006d48ec$exports, "isHeightOnlyProps", () => $81c1b644006d48ec$export$232069b3e05ce32a); | ||
| $parcel$export($81c1b644006d48ec$exports, "isWidthOnlyProps", () => $81c1b644006d48ec$export$10ec32941a097f36); | ||
| function $81c1b644006d48ec$export$6a9e233b3261c1f(props) { | ||
| return props && props.disableHeight !== true && props.disableWidth !== true; | ||
| } | ||
| function $81c1b644006d48ec$export$232069b3e05ce32a(props) { | ||
| return props && props.disableHeight !== true && props.disableWidth === true; | ||
| } | ||
| function $81c1b644006d48ec$export$10ec32941a097f36(props) { | ||
| return props && props.disableHeight === true && props.disableWidth !== true; | ||
| } | ||
| var $149c1bd638913645$export$2e2bcd8739ae039 = (0, $6e2bb92d9db3b0c8$export$9d94f4ee1d930ff); | ||
| export {$149c1bd638913645$export$2e2bcd8739ae039 as default}; | ||
| export {$149c1bd638913645$export$2e2bcd8739ae039 as default, $81c1b644006d48ec$export$6a9e233b3261c1f as isHeightAndWidthProps, $81c1b644006d48ec$export$232069b3e05ce32a as isHeightOnlyProps, $81c1b644006d48ec$export$10ec32941a097f36 as isWidthOnlyProps}; | ||
| //# sourceMappingURL=react-virtualized-auto-sizer.module.js.map |
@@ -1,1 +0,1 @@ | ||
| {"mappings":";;;;;;;;;;;;A;;AEAA;;;;;;;;;;EAUA,GAEA,iEAAA;AACA,IAAI6E;AACJ,IAAI,OAAOnC,WAAW,aACpBmC,qCAAenC;KAGV,IAAI,OAAOoC,SAAS,aACzB,iDAAA;AACAD,qCAAeC;KAEfD,qCAAeE;AAGjB,IAAIC,oCAAc,IAAI;AACtB,IAAIC,qCAAe,IAAI;AAEvB,MAAMC,yCAAmB;AAEzB,MAAMC,uCAAiBN,mCAAaO,YAAY;AAChD,MAAMC,qCAAeR,mCAAad,UAAU;AAE5C,MAAMuB,+CACJT,mCAAaU,oBAAoB,IACjCV,mCAAaW,uBAAuB,IACpCX,mCAAaY,0BAA0B;AAEzC,MAAMC,gDACJb,mCAAac,qBAAqB,IAClCd,mCAAae,wBAAwB,IACrCf,mCAAagB,2BAA2B;AAE1C,IAAIP,gDAA0B,IAAI,IAAII,iDAA2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AACxD,eAAe;YAClB,IAAIR,WAAW,GACbgE,oBAAoB,IAAI;YAE1BH,WAAW7D,MAAM,GAAG;YACpB+D,YAAY/D,MAAM,GAAGA;YACrB+D,YAAY7D,YAAY,GAAGA;QAC7B,CAAA;QAEA,IAAI,CAACO,cAAc;YACjB,IAAIR,UAAU,GACZ+D,oBAAoB,IAAI;YAE1BH,WAAW5D,KAAK,GAAG;YACnB8D,YAAY9D,KAAK,GAAGA;YACpB8D,YAAY5D,WAAW,GAAGA;QAC5B,CAAA;QAEA,OAAOT,CAAAA,GAAAA,oBAAa,AAAbA,EACLkB,SACA;YACEqD,KAAK,IAAI,CAACC,OAAO;YACjBnC,OAAO;gBACL,GAAG8B,UAAU;gBACb,GAAG9B,KAAH;YACF;YACA,GAAG6B,IAAH;QACF,GACA,CAACI,qBAAqB5D,SAAS2D;IAEnC;AAgDF;AAACvC,sCAtLYlC,0CAAS,gBACE;IACpBqB,UAAUA,IAAM,CAAC;IACjBH,eAAe,KAAK;IACpBC,cAAc,KAAK;IACnBsB,OAAO,CAAC;AACV;;ADrDF;IAEA,2CAAezC,CAAAA,GAAAA,wCAAAA","sources":["src/index.ts","src/AutoSizer.ts","vendor/detectElementResize.js"],"sourcesContent":["import { AutoSizer, Props, Size } from \"./AutoSizer\";\n\nexport default AutoSizer;\n\nexport type { Props, Size };\n","import {\n Component,\n createElement,\n CSSProperties,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n} from \"react\";\n\n// @ts-ignore\nimport { createDetectElementResize } from \"../vendor/detectElementResize\";\n\nexport type Size = {\n // Legacy width and height parameters (offsetWidth and offsetHeight)\n height?: number;\n width?: number;\n\n // Take transform:scale into account (getBoundingClientRect)\n scaledHeight?: number;\n scaledWidth?: number;\n};\n\nexport type Props = {\n children: (size: Size) => ReactNode;\n defaultHeight?: number;\n defaultWidth?: number;\n disableHeight?: boolean;\n disableWidth?: boolean;\n nonce?: string;\n onResize?: (size: Size) => void;\n tagName?: string;\n} & Omit<HTMLAttributes<HTMLDivElement>, \"children\" | \"onResize\">;\n\ntype State = {\n height: number;\n scaledHeight: number;\n scaledWidth: number;\n width: number;\n};\n\ntype ResizeHandler = (element: HTMLElement, onResize: () => void) => void;\n\ntype DetectElementResize = {\n addResizeListener: ResizeHandler;\n removeResizeListener: ResizeHandler;\n};\n\nexport class AutoSizer extends Component<Props, State> {\n static defaultProps = {\n onResize: () => {},\n disableHeight: false,\n disableWidth: false,\n style: {},\n };\n\n state = {\n height: this.props.defaultHeight || 0,\n scaledHeight: this.props.defaultHeight || 0,\n scaledWidth: this.props.defaultWidth || 0,\n width: this.props.defaultWidth || 0,\n };\n\n _autoSizer: HTMLElement | null = null;\n _detectElementResize: DetectElementResize | null = null;\n _parentNode: HTMLElement | null = null;\n _resizeObserver: ResizeObserver | null = null;\n\n componentDidMount() {\n const { nonce } = this.props;\n\n if (\n this._autoSizer &&\n this._autoSizer.parentNode &&\n this._autoSizer.parentNode.ownerDocument &&\n this._autoSizer.parentNode.ownerDocument.defaultView &&\n this._autoSizer.parentNode instanceof\n this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement\n ) {\n // Delay access of parentNode until mount.\n // This handles edge-cases where the component has already been unmounted before its ref has been set,\n // As well as libraries like react-lite which have a slightly different lifecycle.\n this._parentNode = this._autoSizer.parentNode;\n\n // Defer requiring resize handler in order to support server-side rendering.\n // See issue #41\n if (this._parentNode != null) {\n if (typeof ResizeObserver !== \"undefined\") {\n this._resizeObserver = new ResizeObserver(() => {\n // Guard against \"ResizeObserver loop limit exceeded\" error;\n // could be triggered if the state update causes the ResizeObserver handler to run long.\n // See https://github.com/bvaughn/react-virtualized-auto-sizer/issues/55\n setTimeout(this._onResize, 0);\n });\n this._resizeObserver.observe(this._parentNode);\n } else {\n this._detectElementResize = createDetectElementResize(\n nonce\n ) as DetectElementResize;\n this._detectElementResize.addResizeListener(\n this._parentNode,\n this._onResize\n );\n }\n\n this._onResize();\n }\n }\n }\n\n componentWillUnmount() {\n if (this._parentNode) {\n if (this._detectElementResize) {\n this._detectElementResize.removeResizeListener(\n this._parentNode,\n this._onResize\n );\n }\n\n if (this._resizeObserver) {\n this._resizeObserver.observe(this._parentNode);\n this._resizeObserver.disconnect();\n }\n }\n }\n\n render(): ReactElement {\n const {\n children,\n defaultHeight,\n defaultWidth,\n disableHeight,\n disableWidth,\n nonce,\n onResize,\n style,\n tagName = \"div\",\n ...rest\n } = this.props;\n\n const { height, scaledHeight, scaledWidth, width } = this.state;\n\n // Outer div should not force width/height since that may prevent containers from shrinking.\n // Inner component should overflow and use calculated width/height.\n // See issue #68 for more information.\n const outerStyle: CSSProperties = { overflow: \"visible\" };\n const childParams: Size = {};\n\n // Avoid rendering children before the initial measurements have been collected.\n // At best this would just be wasting cycles.\n let bailoutOnChildren = false;\n\n if (!disableHeight) {\n if (height === 0) {\n bailoutOnChildren = true;\n }\n outerStyle.height = 0;\n childParams.height = height;\n childParams.scaledHeight = scaledHeight;\n }\n\n if (!disableWidth) {\n if (width === 0) {\n bailoutOnChildren = true;\n }\n outerStyle.width = 0;\n childParams.width = width;\n childParams.scaledWidth = scaledWidth;\n }\n\n return createElement(\n tagName,\n {\n ref: this._setRef,\n style: {\n ...outerStyle,\n ...style,\n },\n ...rest,\n },\n !bailoutOnChildren && children(childParams)\n );\n }\n\n _onResize = () => {\n const { disableHeight, disableWidth, onResize } = this.props;\n\n if (this._parentNode) {\n // Guard against AutoSizer component being removed from the DOM immediately after being added.\n // This can result in invalid style values which can result in NaN values if we don't handle them.\n // See issue #150 for more context.\n\n const style = window.getComputedStyle(this._parentNode) || {};\n const paddingLeft = parseFloat(style.paddingLeft ?? \"0\");\n const paddingRight = parseFloat(style.paddingRight ?? \"0\");\n const paddingTop = parseFloat(style.paddingTop ?? \"0\");\n const paddingBottom = parseFloat(style.paddingBottom ?? \"0\");\n\n const rect = this._parentNode.getBoundingClientRect();\n const scaledHeight = rect.height - paddingTop - paddingBottom;\n const scaledWidth = rect.width - paddingLeft - paddingRight;\n\n const height = this._parentNode.offsetHeight - paddingTop - paddingBottom;\n const width = this._parentNode.offsetWidth - paddingLeft - paddingRight;\n\n if (\n (!disableHeight &&\n (this.state.height !== height ||\n this.state.scaledHeight !== scaledHeight)) ||\n (!disableWidth &&\n (this.state.width !== width ||\n this.state.scaledWidth !== scaledWidth))\n ) {\n this.setState({\n height,\n width,\n scaledHeight,\n scaledWidth,\n });\n\n if (typeof onResize === \"function\") {\n onResize({ height, scaledHeight, scaledWidth, width });\n }\n }\n }\n };\n\n _setRef = (autoSizer: HTMLElement | null) => {\n this._autoSizer = autoSizer;\n };\n}\n","/**\n * Detect Element Resize.\n * https://github.com/sdecima/javascript-detect-element-resize\n * Sebastian Decima\n *\n * Forked from version 0.5.3; includes the following modifications:\n * 1) Guard against unsafe 'window' and 'document' references (to support SSR).\n * 2) Defer initialization code via a top-level function wrapper (to support SSR).\n * 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.\n * 4) Add nonce for style element.\n **/\n\n// Check `document` and `window` in case of server-side rendering\nlet windowObject;\nif (typeof window !== \"undefined\") {\n windowObject = window;\n\n // eslint-disable-next-line no-restricted-globals\n} else if (typeof self !== \"undefined\") {\n // eslint-disable-next-line no-restricted-globals\n windowObject = self;\n} else {\n windowObject = global;\n}\n\nlet cancelFrame = null;\nlet requestFrame = null;\n\nconst TIMEOUT_DURATION = 20;\n\nconst clearTimeoutFn = windowObject.clearTimeout;\nconst setTimeoutFn = windowObject.setTimeout;\n\nconst cancelAnimationFrameFn =\n windowObject.cancelAnimationFrame ||\n windowObject.mozCancelAnimationFrame ||\n windowObject.webkitCancelAnimationFrame;\n\nconst requestAnimationFrameFn =\n windowObject.requestAnimationFrame ||\n windowObject.mozRequestAnimationFrame ||\n windowObject.webkitRequestAnimationFrame;\n\nif (cancelAnimationFrameFn == null || requestAnimationFrameFn == null) {\n // For environments that don't support animation frame,\n // fallback to a setTimeout based approach.\n cancelFrame = clearTimeoutFn;\n requestFrame = function requestAnimationFrameViaSetTimeout(callback) {\n return setTimeoutFn(callback, TIMEOUT_DURATION);\n };\n} else {\n // Counter intuitively, environments that support animation frames can be trickier.\n // Chrome's \"Throttle non-visible cross-origin iframes\" flag can prevent rAFs from being called.\n // In this case, we should fallback to a setTimeout() implementation.\n cancelFrame = function cancelFrame([animationFrameID, timeoutID]) {\n cancelAnimationFrameFn(animationFrameID);\n clearTimeoutFn(timeoutID);\n };\n requestFrame = function requestAnimationFrameWithSetTimeoutFallback(\n callback\n ) {\n const animationFrameID = requestAnimationFrameFn(\n function animationFrameCallback() {\n clearTimeoutFn(timeoutID);\n callback();\n }\n );\n\n const timeoutID = setTimeoutFn(function timeoutCallback() {\n cancelAnimationFrameFn(animationFrameID);\n callback();\n }, TIMEOUT_DURATION);\n\n return [animationFrameID, timeoutID];\n };\n}\n\nfunction createDetectElementResize(nonce) {\n let animationKeyframes;\n let animationName;\n let animationStartEvent;\n let animationStyle;\n let checkTriggers;\n let resetTriggers;\n let scrollListener;\n\n const attachEvent = typeof document !== \"undefined\" && document.attachEvent;\n if (!attachEvent) {\n resetTriggers = function (element) {\n const triggers = element.__resizeTriggers__,\n expand = triggers.firstElementChild,\n contract = triggers.lastElementChild,\n expandChild = expand.firstElementChild;\n contract.scrollLeft = contract.scrollWidth;\n contract.scrollTop = contract.scrollHeight;\n expandChild.style.width = expand.offsetWidth + 1 + \"px\";\n expandChild.style.height = expand.offsetHeight + 1 + \"px\";\n expand.scrollLeft = expand.scrollWidth;\n expand.scrollTop = expand.scrollHeight;\n };\n\n checkTriggers = function (element) {\n return (\n element.offsetWidth !== element.__resizeLast__.width ||\n element.offsetHeight !== element.__resizeLast__.height\n );\n };\n\n scrollListener = function (e) {\n // Don't measure (which forces) reflow for scrolls that happen inside of children!\n if (\n e.target.className &&\n typeof e.target.className.indexOf === \"function\" &&\n e.target.className.indexOf(\"contract-trigger\") < 0 &&\n e.target.className.indexOf(\"expand-trigger\") < 0\n ) {\n return;\n }\n\n const element = this;\n resetTriggers(this);\n if (this.__resizeRAF__) {\n cancelFrame(this.__resizeRAF__);\n }\n this.__resizeRAF__ = requestFrame(function animationFrame() {\n if (checkTriggers(element)) {\n element.__resizeLast__.width = element.offsetWidth;\n element.__resizeLast__.height = element.offsetHeight;\n element.__resizeListeners__.forEach(function forEachResizeListener(\n fn\n ) {\n fn.call(element, e);\n });\n }\n });\n };\n\n /* Detect CSS Animations support to detect element display/re-attach */\n let animation = false;\n let keyframeprefix = \"\";\n animationStartEvent = \"animationstart\";\n const domPrefixes = \"Webkit Moz O ms\".split(\" \");\n let startEvents =\n \"webkitAnimationStart animationstart oAnimationStart MSAnimationStart\".split(\n \" \"\n );\n let pfx = \"\";\n {\n const elm = document.createElement(\"fakeelement\");\n if (elm.style.animationName !== undefined) {\n animation = true;\n }\n\n if (animation === false) {\n for (let i = 0; i < domPrefixes.length; i++) {\n if (elm.style[domPrefixes[i] + \"AnimationName\"] !== undefined) {\n pfx = domPrefixes[i];\n keyframeprefix = \"-\" + pfx.toLowerCase() + \"-\";\n animationStartEvent = startEvents[i];\n animation = true;\n break;\n }\n }\n }\n }\n\n animationName = \"resizeanim\";\n animationKeyframes =\n \"@\" +\n keyframeprefix +\n \"keyframes \" +\n animationName +\n \" { from { opacity: 0; } to { opacity: 0; } } \";\n animationStyle = keyframeprefix + \"animation: 1ms \" + animationName + \"; \";\n }\n\n const createStyles = function (doc) {\n if (!doc.getElementById(\"detectElementResize\")) {\n //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360\n const css =\n (animationKeyframes ? animationKeyframes : \"\") +\n \".resize-triggers { \" +\n (animationStyle ? animationStyle : \"\") +\n \"visibility: hidden; opacity: 0; } \" +\n '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',\n head = doc.head || doc.getElementsByTagName(\"head\")[0],\n style = doc.createElement(\"style\");\n\n style.id = \"detectElementResize\";\n style.type = \"text/css\";\n\n if (nonce != null) {\n style.setAttribute(\"nonce\", nonce);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(doc.createTextNode(css));\n }\n\n head.appendChild(style);\n }\n };\n\n const addResizeListener = function (element, fn) {\n if (attachEvent) {\n element.attachEvent(\"onresize\", fn);\n } else {\n if (!element.__resizeTriggers__) {\n const doc = element.ownerDocument;\n const elementStyle = windowObject.getComputedStyle(element);\n if (elementStyle && elementStyle.position === \"static\") {\n element.style.position = \"relative\";\n }\n createStyles(doc);\n element.__resizeLast__ = {};\n element.__resizeListeners__ = [];\n (element.__resizeTriggers__ = doc.createElement(\"div\")).className =\n \"resize-triggers\";\n const expandTrigger = doc.createElement(\"div\");\n expandTrigger.className = \"expand-trigger\";\n expandTrigger.appendChild(doc.createElement(\"div\"));\n const contractTrigger = doc.createElement(\"div\");\n contractTrigger.className = \"contract-trigger\";\n element.__resizeTriggers__.appendChild(expandTrigger);\n element.__resizeTriggers__.appendChild(contractTrigger);\n element.appendChild(element.__resizeTriggers__);\n resetTriggers(element);\n element.addEventListener(\"scroll\", scrollListener, true);\n\n /* Listen for a css animation to detect element display/re-attach */\n if (animationStartEvent) {\n element.__resizeTriggers__.__animationListener__ =\n function animationListener(e) {\n if (e.animationName === animationName) {\n resetTriggers(element);\n }\n };\n element.__resizeTriggers__.addEventListener(\n animationStartEvent,\n element.__resizeTriggers__.__animationListener__\n );\n }\n }\n element.__resizeListeners__.push(fn);\n }\n };\n\n const removeResizeListener = function (element, fn) {\n if (attachEvent) {\n element.detachEvent(\"onresize\", fn);\n } else {\n element.__resizeListeners__.splice(\n element.__resizeListeners__.indexOf(fn),\n 1\n );\n if (!element.__resizeListeners__.length) {\n element.removeEventListener(\"scroll\", scrollListener, true);\n if (element.__resizeTriggers__.__animationListener__) {\n element.__resizeTriggers__.removeEventListener(\n animationStartEvent,\n element.__resizeTriggers__.__animationListener__\n );\n element.__resizeTriggers__.__animationListener__ = null;\n }\n try {\n element.__resizeTriggers__ = !element.removeChild(\n element.__resizeTriggers__\n );\n } catch (e) {\n // Preact compat; see developit/preact-compat/issues/228\n }\n }\n }\n };\n\n return {\n addResizeListener,\n removeResizeListener,\n };\n}\n\nmodule.exports = { createDetectElementResize };\n"],"names":["AutoSizer","Props","Size","Component","createElement","CSSProperties","HTMLAttributes","ReactElement","ReactNode","createDetectElementResize","height","width","scaledHeight","scaledWidth","children","size","defaultHeight","defaultWidth","disableHeight","disableWidth","nonce","onResize","tagName","Omit","HTMLDivElement","State","ResizeHandler","element","HTMLElement","DetectElementResize","addResizeListener","removeResizeListener","constructor","args","_defineProperty","props","_parentNode","_style$paddingLeft","_style$paddingRight","_style$paddingTop","_style$paddingBottom","style","window","getComputedStyle","paddingLeft","parseFloat","paddingRight","paddingTop","paddingBottom","rect","getBoundingClientRect","offsetHeight","offsetWidth","state","setState","autoSizer","_autoSizer","componentDidMount","parentNode","ownerDocument","defaultView","ResizeObserver","_resizeObserver","setTimeout","_onResize","observe","_detectElementResize","componentWillUnmount","disconnect","render","rest","outerStyle","overflow","childParams","bailoutOnChildren","ref","_setRef","windowObject","self","global","cancelFrame","requestFrame","TIMEOUT_DURATION","clearTimeoutFn","clearTimeout","setTimeoutFn","cancelAnimationFrameFn","cancelAnimationFrame","mozCancelAnimationFrame","webkitCancelAnimationFrame","requestAnimationFrameFn","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","requestAnimationFrameViaSetTimeout","callback","animationFrameID","timeoutID","requestAnimationFrameWithSetTimeoutFallback","animationFrameCallback","timeoutCallback","animationKeyframes","animationName","animationStartEvent","animationStyle","checkTriggers","resetTriggers","scrollListener","attachEvent","document","triggers","__resizeTriggers__","expand","firstElementChild","contract","lastElementChild","expandChild","scrollLeft","scrollWidth","scrollTop","scrollHeight","__resizeLast__","e","target","className","indexOf","__resizeRAF__","animationFrame","__resizeListeners__","forEach","forEachResizeListener","fn","call","animation","keyframeprefix","domPrefixes","split","startEvents","pfx","elm","undefined","i","length","toLowerCase","createStyles","doc","getElementById","css","head","getElementsByTagName","id","type","setAttribute","styleSheet","cssText","appendChild","createTextNode","elementStyle","position","expandTrigger","contractTrigger","addEventListener","__animationListener__","animationListener","push","detachEvent","splice","removeEventListener","removeChild","module","exports"],"version":3,"file":"react-virtualized-auto-sizer.module.js.map"} | ||
| {"mappings":";;;;;;;;;;;;;;;;;AEAA;;;;;;;;;;EAUA,GAEA,iEAAA;AACA,IAAI0E;AACJ,IAAI,OAAOvC,WAAW,aACpBuC,qCAAevC;KAGV,IAAI,OAAOwC,SAAS,aACzB,iDAAA;AACAD,qCAAeC;KAEfD,qCAAeE;AAGjB,IAAIC,oCAAc;AAClB,IAAIC,qCAAe;AAEnB,MAAMC,yCAAmB;AAEzB,MAAMC,uCAAiBN,mCAAaO;AACpC,MAAMC,qCAAeR,mCAAajB;AAElC,MAAM0B,+CACJT,mCAAaU,wBACbV,mCAAaW,2BACbX,mCAAaY;AAEf,MAAMC,gDACJb,mCAAac,yBACbd,mCAAae,4BACbf,mCAAagB;AAEf,IAAIP,gDAA0B,QAAQI,iDAA2B,MAAM;IACrE,uDAAA;IACA,2CAAA;IACAV,oCAAcG;IACdF,qCAAe,SAASa,mCAAmCC,QAAQ;QACjE,OAAOV,mCAAaU,UAAUb;IAChC;AACF,OAAO;IACL,mFAAA;IACA,gGAAA;IACA,qEAAA;IACAF,oCAAc,SAASA,YAAY,CAACgB,kBAAkBC,UAAU;QAC9DX,6CAAuBU;QACvBb,qCAAec;IACjB;IACAhB,qCAAe,SAASiB,4CACtBH,QAAQ;QAER,MAAMC,mBAAmBN,8CACvB,SAASS;YACPhB,qCAAec;YACfF;QACF;QAGF,MAAME,YAAYZ,mCAAa,SAASe;YACtCd,6CAAuBU;YACvBD;QACF,GAAGb;QAEH,OAAO;YAACc;YAAkBC;SAAU;IACtC;AACF;AAEA,SAASzF,gDAA0B8C,KAAK;IACtC,IAAI+C;IACJ,IAAIC;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ts","src/AutoSizer.ts","vendor/detectElementResize.js","src/types.ts"],"sourcesContent":["import { AutoSizer } from \"./AutoSizer\";\n\nexport default AutoSizer;\n\nexport * from \"./types\";\n","import { Component, createElement, CSSProperties, ReactElement } from \"react\";\n\n// @ts-ignore\nimport { createDetectElementResize } from \"../vendor/detectElementResize\";\nimport { HeightAndWidthProps, Props, Size } from \"./types\";\n\ntype State = {\n height: number;\n scaledHeight: number;\n scaledWidth: number;\n width: number;\n};\n\ntype ResizeHandler = (element: HTMLElement, onResize: () => void) => void;\n\ntype DetectElementResize = {\n addResizeListener: ResizeHandler;\n removeResizeListener: ResizeHandler;\n};\n\nexport class AutoSizer extends Component<Props, State> {\n state = {\n height: (this.props as HeightAndWidthProps).defaultHeight || 0,\n scaledHeight: (this.props as HeightAndWidthProps).defaultHeight || 0,\n scaledWidth: (this.props as HeightAndWidthProps).defaultWidth || 0,\n width: (this.props as HeightAndWidthProps).defaultWidth || 0,\n };\n\n _autoSizer: HTMLElement | null = null;\n _detectElementResize: DetectElementResize | null = null;\n _parentNode: HTMLElement | null = null;\n _resizeObserver: ResizeObserver | null = null;\n\n componentDidMount() {\n const { nonce } = this.props;\n\n if (\n this._autoSizer &&\n this._autoSizer.parentNode &&\n this._autoSizer.parentNode.ownerDocument &&\n this._autoSizer.parentNode.ownerDocument.defaultView &&\n this._autoSizer.parentNode instanceof\n this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement\n ) {\n // Delay access of parentNode until mount.\n // This handles edge-cases where the component has already been unmounted before its ref has been set,\n // As well as libraries like react-lite which have a slightly different lifecycle.\n this._parentNode = this._autoSizer.parentNode;\n\n // Defer requiring resize handler in order to support server-side rendering.\n // See issue #41\n if (this._parentNode != null) {\n if (typeof ResizeObserver !== \"undefined\") {\n this._resizeObserver = new ResizeObserver(() => {\n // Guard against \"ResizeObserver loop limit exceeded\" error;\n // could be triggered if the state update causes the ResizeObserver handler to run long.\n // See https://github.com/bvaughn/react-virtualized-auto-sizer/issues/55\n setTimeout(this._onResize, 0);\n });\n this._resizeObserver.observe(this._parentNode);\n } else {\n this._detectElementResize = createDetectElementResize(\n nonce\n ) as DetectElementResize;\n this._detectElementResize.addResizeListener(\n this._parentNode,\n this._onResize\n );\n }\n\n this._onResize();\n }\n }\n }\n\n componentWillUnmount() {\n if (this._parentNode) {\n if (this._detectElementResize) {\n this._detectElementResize.removeResizeListener(\n this._parentNode,\n this._onResize\n );\n }\n\n if (this._resizeObserver) {\n this._resizeObserver.observe(this._parentNode);\n this._resizeObserver.disconnect();\n }\n }\n }\n\n render(): ReactElement {\n const {\n children,\n defaultHeight,\n defaultWidth,\n disableHeight = false,\n disableWidth = false,\n nonce,\n onResize,\n style = {},\n tagName = \"div\",\n ...rest\n } = this.props as HeightAndWidthProps;\n\n const { height, scaledHeight, scaledWidth, width } = this.state;\n\n // Outer div should not force width/height since that may prevent containers from shrinking.\n // Inner component should overflow and use calculated width/height.\n // See issue #68 for more information.\n const outerStyle: CSSProperties = { overflow: \"visible\" };\n const childParams: Partial<Size> = {};\n\n // Avoid rendering children before the initial measurements have been collected.\n // At best this would just be wasting cycles.\n let bailoutOnChildren = false;\n\n if (!disableHeight) {\n if (height === 0) {\n bailoutOnChildren = true;\n }\n outerStyle.height = 0;\n childParams.height = height;\n childParams.scaledHeight = scaledHeight;\n }\n\n if (!disableWidth) {\n if (width === 0) {\n bailoutOnChildren = true;\n }\n outerStyle.width = 0;\n childParams.width = width;\n childParams.scaledWidth = scaledWidth;\n }\n\n return createElement(\n tagName,\n {\n ref: this._setRef,\n style: {\n ...outerStyle,\n ...style,\n },\n ...rest,\n },\n !bailoutOnChildren && children(childParams as Size)\n );\n }\n\n _onResize = () => {\n const { disableHeight, disableWidth, onResize } = this\n .props as HeightAndWidthProps;\n\n if (this._parentNode) {\n // Guard against AutoSizer component being removed from the DOM immediately after being added.\n // This can result in invalid style values which can result in NaN values if we don't handle them.\n // See issue #150 for more context.\n\n const style = window.getComputedStyle(this._parentNode) || {};\n const paddingLeft = parseFloat(style.paddingLeft ?? \"0\");\n const paddingRight = parseFloat(style.paddingRight ?? \"0\");\n const paddingTop = parseFloat(style.paddingTop ?? \"0\");\n const paddingBottom = parseFloat(style.paddingBottom ?? \"0\");\n\n const rect = this._parentNode.getBoundingClientRect();\n const scaledHeight = rect.height - paddingTop - paddingBottom;\n const scaledWidth = rect.width - paddingLeft - paddingRight;\n\n const height = this._parentNode.offsetHeight - paddingTop - paddingBottom;\n const width = this._parentNode.offsetWidth - paddingLeft - paddingRight;\n\n if (\n (!disableHeight &&\n (this.state.height !== height ||\n this.state.scaledHeight !== scaledHeight)) ||\n (!disableWidth &&\n (this.state.width !== width ||\n this.state.scaledWidth !== scaledWidth))\n ) {\n this.setState({\n height,\n width,\n scaledHeight,\n scaledWidth,\n });\n\n if (typeof onResize === \"function\") {\n onResize({ height, scaledHeight, scaledWidth, width });\n }\n }\n }\n };\n\n _setRef = (autoSizer: HTMLElement | null) => {\n this._autoSizer = autoSizer;\n };\n}\n","/**\n * Detect Element Resize.\n * https://github.com/sdecima/javascript-detect-element-resize\n * Sebastian Decima\n *\n * Forked from version 0.5.3; includes the following modifications:\n * 1) Guard against unsafe 'window' and 'document' references (to support SSR).\n * 2) Defer initialization code via a top-level function wrapper (to support SSR).\n * 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.\n * 4) Add nonce for style element.\n **/\n\n// Check `document` and `window` in case of server-side rendering\nlet windowObject;\nif (typeof window !== \"undefined\") {\n windowObject = window;\n\n // eslint-disable-next-line no-restricted-globals\n} else if (typeof self !== \"undefined\") {\n // eslint-disable-next-line no-restricted-globals\n windowObject = self;\n} else {\n windowObject = global;\n}\n\nlet cancelFrame = null;\nlet requestFrame = null;\n\nconst TIMEOUT_DURATION = 20;\n\nconst clearTimeoutFn = windowObject.clearTimeout;\nconst setTimeoutFn = windowObject.setTimeout;\n\nconst cancelAnimationFrameFn =\n windowObject.cancelAnimationFrame ||\n windowObject.mozCancelAnimationFrame ||\n windowObject.webkitCancelAnimationFrame;\n\nconst requestAnimationFrameFn =\n windowObject.requestAnimationFrame ||\n windowObject.mozRequestAnimationFrame ||\n windowObject.webkitRequestAnimationFrame;\n\nif (cancelAnimationFrameFn == null || requestAnimationFrameFn == null) {\n // For environments that don't support animation frame,\n // fallback to a setTimeout based approach.\n cancelFrame = clearTimeoutFn;\n requestFrame = function requestAnimationFrameViaSetTimeout(callback) {\n return setTimeoutFn(callback, TIMEOUT_DURATION);\n };\n} else {\n // Counter intuitively, environments that support animation frames can be trickier.\n // Chrome's \"Throttle non-visible cross-origin iframes\" flag can prevent rAFs from being called.\n // In this case, we should fallback to a setTimeout() implementation.\n cancelFrame = function cancelFrame([animationFrameID, timeoutID]) {\n cancelAnimationFrameFn(animationFrameID);\n clearTimeoutFn(timeoutID);\n };\n requestFrame = function requestAnimationFrameWithSetTimeoutFallback(\n callback\n ) {\n const animationFrameID = requestAnimationFrameFn(\n function animationFrameCallback() {\n clearTimeoutFn(timeoutID);\n callback();\n }\n );\n\n const timeoutID = setTimeoutFn(function timeoutCallback() {\n cancelAnimationFrameFn(animationFrameID);\n callback();\n }, TIMEOUT_DURATION);\n\n return [animationFrameID, timeoutID];\n };\n}\n\nfunction createDetectElementResize(nonce) {\n let animationKeyframes;\n let animationName;\n let animationStartEvent;\n let animationStyle;\n let checkTriggers;\n let resetTriggers;\n let scrollListener;\n\n const attachEvent = typeof document !== \"undefined\" && document.attachEvent;\n if (!attachEvent) {\n resetTriggers = function (element) {\n const triggers = element.__resizeTriggers__,\n expand = triggers.firstElementChild,\n contract = triggers.lastElementChild,\n expandChild = expand.firstElementChild;\n contract.scrollLeft = contract.scrollWidth;\n contract.scrollTop = contract.scrollHeight;\n expandChild.style.width = expand.offsetWidth + 1 + \"px\";\n expandChild.style.height = expand.offsetHeight + 1 + \"px\";\n expand.scrollLeft = expand.scrollWidth;\n expand.scrollTop = expand.scrollHeight;\n };\n\n checkTriggers = function (element) {\n return (\n element.offsetWidth !== element.__resizeLast__.width ||\n element.offsetHeight !== element.__resizeLast__.height\n );\n };\n\n scrollListener = function (e) {\n // Don't measure (which forces) reflow for scrolls that happen inside of children!\n if (\n e.target.className &&\n typeof e.target.className.indexOf === \"function\" &&\n e.target.className.indexOf(\"contract-trigger\") < 0 &&\n e.target.className.indexOf(\"expand-trigger\") < 0\n ) {\n return;\n }\n\n const element = this;\n resetTriggers(this);\n if (this.__resizeRAF__) {\n cancelFrame(this.__resizeRAF__);\n }\n this.__resizeRAF__ = requestFrame(function animationFrame() {\n if (checkTriggers(element)) {\n element.__resizeLast__.width = element.offsetWidth;\n element.__resizeLast__.height = element.offsetHeight;\n element.__resizeListeners__.forEach(function forEachResizeListener(\n fn\n ) {\n fn.call(element, e);\n });\n }\n });\n };\n\n /* Detect CSS Animations support to detect element display/re-attach */\n let animation = false;\n let keyframeprefix = \"\";\n animationStartEvent = \"animationstart\";\n const domPrefixes = \"Webkit Moz O ms\".split(\" \");\n let startEvents =\n \"webkitAnimationStart animationstart oAnimationStart MSAnimationStart\".split(\n \" \"\n );\n let pfx = \"\";\n {\n const elm = document.createElement(\"fakeelement\");\n if (elm.style.animationName !== undefined) {\n animation = true;\n }\n\n if (animation === false) {\n for (let i = 0; i < domPrefixes.length; i++) {\n if (elm.style[domPrefixes[i] + \"AnimationName\"] !== undefined) {\n pfx = domPrefixes[i];\n keyframeprefix = \"-\" + pfx.toLowerCase() + \"-\";\n animationStartEvent = startEvents[i];\n animation = true;\n break;\n }\n }\n }\n }\n\n animationName = \"resizeanim\";\n animationKeyframes =\n \"@\" +\n keyframeprefix +\n \"keyframes \" +\n animationName +\n \" { from { opacity: 0; } to { opacity: 0; } } \";\n animationStyle = keyframeprefix + \"animation: 1ms \" + animationName + \"; \";\n }\n\n const createStyles = function (doc) {\n if (!doc.getElementById(\"detectElementResize\")) {\n //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360\n const css =\n (animationKeyframes ? animationKeyframes : \"\") +\n \".resize-triggers { \" +\n (animationStyle ? animationStyle : \"\") +\n \"visibility: hidden; opacity: 0; } \" +\n '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',\n head = doc.head || doc.getElementsByTagName(\"head\")[0],\n style = doc.createElement(\"style\");\n\n style.id = \"detectElementResize\";\n style.type = \"text/css\";\n\n if (nonce != null) {\n style.setAttribute(\"nonce\", nonce);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(doc.createTextNode(css));\n }\n\n head.appendChild(style);\n }\n };\n\n const addResizeListener = function (element, fn) {\n if (attachEvent) {\n element.attachEvent(\"onresize\", fn);\n } else {\n if (!element.__resizeTriggers__) {\n const doc = element.ownerDocument;\n const elementStyle = windowObject.getComputedStyle(element);\n if (elementStyle && elementStyle.position === \"static\") {\n element.style.position = \"relative\";\n }\n createStyles(doc);\n element.__resizeLast__ = {};\n element.__resizeListeners__ = [];\n (element.__resizeTriggers__ = doc.createElement(\"div\")).className =\n \"resize-triggers\";\n const expandTrigger = doc.createElement(\"div\");\n expandTrigger.className = \"expand-trigger\";\n expandTrigger.appendChild(doc.createElement(\"div\"));\n const contractTrigger = doc.createElement(\"div\");\n contractTrigger.className = \"contract-trigger\";\n element.__resizeTriggers__.appendChild(expandTrigger);\n element.__resizeTriggers__.appendChild(contractTrigger);\n element.appendChild(element.__resizeTriggers__);\n resetTriggers(element);\n element.addEventListener(\"scroll\", scrollListener, true);\n\n /* Listen for a css animation to detect element display/re-attach */\n if (animationStartEvent) {\n element.__resizeTriggers__.__animationListener__ =\n function animationListener(e) {\n if (e.animationName === animationName) {\n resetTriggers(element);\n }\n };\n element.__resizeTriggers__.addEventListener(\n animationStartEvent,\n element.__resizeTriggers__.__animationListener__\n );\n }\n }\n element.__resizeListeners__.push(fn);\n }\n };\n\n const removeResizeListener = function (element, fn) {\n if (attachEvent) {\n element.detachEvent(\"onresize\", fn);\n } else {\n element.__resizeListeners__.splice(\n element.__resizeListeners__.indexOf(fn),\n 1\n );\n if (!element.__resizeListeners__.length) {\n element.removeEventListener(\"scroll\", scrollListener, true);\n if (element.__resizeTriggers__.__animationListener__) {\n element.__resizeTriggers__.removeEventListener(\n animationStartEvent,\n element.__resizeTriggers__.__animationListener__\n );\n element.__resizeTriggers__.__animationListener__ = null;\n }\n try {\n element.__resizeTriggers__ = !element.removeChild(\n element.__resizeTriggers__\n );\n } catch (e) {\n // Preact compat; see developit/preact-compat/issues/228\n }\n }\n }\n };\n\n return {\n addResizeListener,\n removeResizeListener,\n };\n}\n\nmodule.exports = { createDetectElementResize };\n","import { HTMLAttributes, ReactNode } from \"react\";\n\nexport type HorizontalSize = {\n width: number;\n scaledWidth: number;\n};\nexport type VerticalSize = {\n height: number;\n scaledHeight: number;\n};\nexport type Size = HorizontalSize & VerticalSize;\n\ntype BaseProps = {\n nonce?: string;\n tagName?: string;\n} & Omit<HTMLAttributes<HTMLDivElement>, \"children\" | \"onResize\">;\n\nexport type HeightOnlyProps = BaseProps & {\n children: (size: VerticalSize) => ReactNode;\n defaultHeight?: number;\n disableWidth: true;\n onResize?: (size: VerticalSize) => void;\n};\n\nexport type WidthOnlyProps = BaseProps & {\n children: (size: HorizontalSize) => ReactNode;\n defaultWidth?: number;\n disableHeight: true;\n onResize?: (size: HorizontalSize) => void;\n};\n\nexport type HeightAndWidthProps = BaseProps & {\n children: (size: Size) => ReactNode;\n defaultHeight?: number;\n defaultWidth?: number;\n disableHeight?: false;\n disableWidth?: false;\n onResize?: (size: Size) => void;\n};\n\nexport type Props = HeightOnlyProps | WidthOnlyProps | HeightAndWidthProps;\n\nexport function isHeightAndWidthProps(\n props: any\n): props is HeightAndWidthProps {\n return props && props.disableHeight !== true && props.disableWidth !== true;\n}\n\nexport function isHeightOnlyProps(props: any): props is HeightOnlyProps {\n return props && props.disableHeight !== true && props.disableWidth === true;\n}\n\nexport function isWidthOnlyProps(props: any): props is WidthOnlyProps {\n return props && props.disableHeight === true && props.disableWidth !== true;\n}\n"],"names":["AutoSizer","Component","createElement","CSSProperties","ReactElement","createDetectElementResize","HeightAndWidthProps","Props","Size","State","height","scaledHeight","scaledWidth","width","ResizeHandler","element","HTMLElement","onResize","DetectElementResize","addResizeListener","removeResizeListener","constructor","args","_defineProperty","props","defaultHeight","defaultWidth","disableHeight","disableWidth","_parentNode","_style$paddingLeft","_style$paddingRight","_style$paddingTop","_style$paddingBottom","style","window","getComputedStyle","paddingLeft","parseFloat","paddingRight","paddingTop","paddingBottom","rect","getBoundingClientRect","offsetHeight","offsetWidth","state","setState","autoSizer","_autoSizer","componentDidMount","nonce","parentNode","ownerDocument","defaultView","ResizeObserver","_resizeObserver","setTimeout","_onResize","observe","_detectElementResize","componentWillUnmount","disconnect","render","children","tagName","rest","outerStyle","overflow","childParams","Partial","bailoutOnChildren","ref","_setRef","windowObject","self","global","cancelFrame","requestFrame","TIMEOUT_DURATION","clearTimeoutFn","clearTimeout","setTimeoutFn","cancelAnimationFrameFn","cancelAnimationFrame","mozCancelAnimationFrame","webkitCancelAnimationFrame","requestAnimationFrameFn","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","requestAnimationFrameViaSetTimeout","callback","animationFrameID","timeoutID","requestAnimationFrameWithSetTimeoutFallback","animationFrameCallback","timeoutCallback","animationKeyframes","animationName","animationStartEvent","animationStyle","checkTriggers","resetTriggers","scrollListener","attachEvent","document","triggers","__resizeTriggers__","expand","firstElementChild","contract","lastElementChild","expandChild","scrollLeft","scrollWidth","scrollTop","scrollHeight","__resizeLast__","e","target","className","indexOf","__resizeRAF__","animationFrame","__resizeListeners__","forEach","forEachResizeListener","fn","call","animation","keyframeprefix","domPrefixes","split","startEvents","pfx","elm","undefined","i","length","toLowerCase","createStyles","doc","getElementById","css","head","getElementsByTagName","id","type","setAttribute","styleSheet","cssText","appendChild","createTextNode","elementStyle","position","expandTrigger","contractTrigger","addEventListener","__animationListener__","animationListener","push","detachEvent","splice","removeEventListener","removeChild","module","exports","HTMLAttributes","ReactNode","HorizontalSize","VerticalSize","BaseProps","Omit","HTMLDivElement","HeightOnlyProps","size","WidthOnlyProps","isHeightAndWidthProps","isHeightOnlyProps","isWidthOnlyProps"],"version":3,"file":"react-virtualized-auto-sizer.module.js.map"} |
+5
-5
| { | ||
| "name": "react-virtualized-auto-sizer", | ||
| "version": "1.0.17", | ||
| "version": "1.0.18", | ||
| "description": "Standalone version of the AutoSizer component from react-virtualized", | ||
@@ -60,5 +60,5 @@ "author": "Brian Vaughn <brian.david.vaughn@gmail.com> (https://github.com/bvaughn/)", | ||
| "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", | ||
| "@parcel/core": "^2.8.3", | ||
| "@parcel/packager-ts": "^2.8.3", | ||
| "@parcel/transformer-typescript-types": "^2.8.3", | ||
| "@parcel/core": "^2.9.0", | ||
| "@parcel/packager-ts": "^2.9.0", | ||
| "@parcel/transformer-typescript-types": "^2.9.0", | ||
| "@types/jest": "^26.0.15", | ||
@@ -69,3 +69,3 @@ "@types/react": "^18", | ||
| "jest-environment-jsdom": "^29.4.3", | ||
| "parcel": "^2.8.3", | ||
| "parcel": "^2.9.0", | ||
| "prettier": "^2.8.6", | ||
@@ -72,0 +72,0 @@ "react": "^18", |
+1
-1
@@ -18,3 +18,3 @@ # react-virtualized-auto-sizer | ||
| | :------------ | :------- | :-------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | children | Function | ✓ | Function responsible for rendering children. This function should implement the following signature: `({ height: number, width: number }) => PropTypes.element` | | ||
| | children | Function | ✓ | Function responsible for rendering children. This function should implement the following signature: `({ height?: number | undefined, width?: number | undefined }) => PropTypes.element` | | ||
| | className | String | | Optional custom CSS class name to attach to root `AutoSizer` element. This is an advanced property and is not typically necessary. | | ||
@@ -21,0 +21,0 @@ | defaultHeight | Number | | Height passed to child for initial render; useful for server-side rendering. This value will be overridden with an accurate height after mounting. | |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
113992
2.94%807
6.18%