UNPKG

29.9 kBSource Map (JSON)View Raw
1{"version":3,"file":"ScrollablePane.base.js","sourceRoot":"../src/","sources":["components/ScrollablePane/ScrollablePane.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,6CAQyB;AACzB,+DAA+D;AAiB/D,IAAM,aAAa,GAAG,8BAAkB,EAAoD,CAAC;AAE7F;IACU,8CAA2D;IAanE,4BAAY,KAA2B;QAAvC,YACE,kBAAM,KAAK,CAAC,SAgBb;QA5BO,WAAK,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;QAC1C,qBAAe,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;QACpD,qBAAe,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;QACpD,uBAAiB,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;QA6NvD,eAAS,GAAG,UAAC,OAAiB;YACnC,KAAI,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC;QAEK,iBAAW,GAAG,UAAC,OAAiB;YACrC,KAAI,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC,CAAC;QAEK,eAAS,GAAG,UAAC,MAAc;YAChC,KAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAE3B,kEAAkE;YAClE,IAAI,KAAI,CAAC,gBAAgB,EAAE;gBACzB,MAAM,CAAC,kBAAkB,CAAC,KAAI,CAAC,gBAAgB,CAAC,CAAC;gBACjD,KAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;aACzB;QACH,CAAC,CAAC;QAEK,kBAAY,GAAG,UAAC,MAAc;YACnC,KAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC9B,KAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC;YACzC,KAAI,CAAC,iBAAiB,EAAE,CAAC;QAC3B,CAAC,CAAC;QAEK,gBAAU,GAAG,UAAC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S,GA8dxB;AA/dY,gDAAkB","sourcesContent":["import * as React from 'react';\nimport {\n Async,\n EventGroup,\n classNamesFunction,\n divProperties,\n getNativeProps,\n getRTL,\n initializeComponentRef,\n} from '../../Utilities';\nimport { ScrollablePaneContext } from './ScrollablePane.types';\nimport { Sticky } from '../../Sticky';\nimport type {\n IScrollablePane,\n IScrollablePaneContext,\n IScrollablePaneProps,\n IScrollablePaneStyleProps,\n IScrollablePaneStyles,\n} from './ScrollablePane.types';\n\nexport interface IScrollablePaneState {\n stickyTopHeight: number;\n stickyBottomHeight: number;\n scrollbarWidth: number;\n scrollbarHeight: number;\n}\n\nconst getClassNames = classNamesFunction<IScrollablePaneStyleProps, IScrollablePaneStyles>();\n\nexport class ScrollablePaneBase\n extends React.Component<IScrollablePaneProps, IScrollablePaneState>\n implements IScrollablePane {\n private _root = React.createRef<HTMLDivElement>();\n private _stickyAboveRef = React.createRef<HTMLDivElement>();\n private _stickyBelowRef = React.createRef<HTMLDivElement>();\n private _contentContainer = React.createRef<HTMLDivElement>();\n private _subscribers: Set<Function>;\n private _stickies: Set<Sticky>;\n private _mutationObserver: MutationObserver;\n private _notifyThrottled: () => void;\n private _async: Async;\n private _events: EventGroup;\n\n constructor(props: IScrollablePaneProps) {\n super(props);\n this._subscribers = new Set<Function>();\n this._stickies = new Set<Sticky>();\n\n initializeComponentRef(this);\n this._async = new Async(this);\n this._events = new EventGroup(this);\n\n this.state = {\n stickyTopHeight: 0,\n stickyBottomHeight: 0,\n scrollbarWidth: 0,\n scrollbarHeight: 0,\n };\n\n this._notifyThrottled = this._async.throttle(this.notifySubscribers, 50);\n }\n\n public get root(): HTMLDivElement | null {\n return this._root.current;\n }\n\n public get stickyAbove(): HTMLDivElement | null {\n return this._stickyAboveRef.current;\n }\n\n public get stickyBelow(): HTMLDivElement | null {\n return this._stickyBelowRef.current;\n }\n\n public get contentContainer(): HTMLDivElement | null {\n return this._contentContainer.current;\n }\n\n public componentDidMount() {\n const { initialScrollPosition } = this.props;\n this._events.on(this.contentContainer, 'scroll', this._onScroll);\n this._events.on(window, 'resize', this._onWindowResize);\n if (this.contentContainer && initialScrollPosition) {\n this.contentContainer.scrollTop = initialScrollPosition;\n }\n\n // Set sticky distances from top property, then sort in correct order and notify subscribers\n this.setStickiesDistanceFromTop();\n this._stickies.forEach(sticky => {\n this.sortSticky(sticky);\n });\n this.notifySubscribers();\n\n if ('MutationObserver' in window) {\n this._mutationObserver = new MutationObserver(mutation => {\n // Function to check if mutation is occuring in stickyAbove or stickyBelow\n function checkIfMutationIsSticky(mutationRecord: MutationRecord): boolean {\n if (this.stickyAbove !== null && this.stickyBelow !== null) {\n return this.stickyAbove.contains(mutationRecord.target) || this.stickyBelow.contains(mutationRecord.target);\n }\n return false;\n }\n\n // Compute the scrollbar height, which might have changed if the content's width changed and caused overflow\n const scrollbarHeight = this._getScrollbarHeight();\n // If the scrollbar height changed, update state so it's postioned correctly below sticky footer\n if (scrollbarHeight !== this.state.scrollbarHeight) {\n this.setState({\n scrollbarHeight: scrollbarHeight,\n });\n }\n\n // Notify subscribers again to re-check whether Sticky should be Sticky'd or not\n this.notifySubscribers();\n\n // If mutation occurs in sticky header or footer, then update sticky top/bottom heights\n if (mutation.some(checkIfMutationIsSticky.bind(this))) {\n this.updateStickyRefHeights();\n } else {\n // If mutation occurs in scrollable region, then find Sticky it belongs to and force update\n const stickyList: Sticky[] = [];\n this._stickies.forEach(sticky => {\n if (sticky.root && sticky.root.contains(mutation[0].target)) {\n stickyList.push(sticky);\n }\n });\n if (stickyList.length) {\n stickyList.forEach(sticky => {\n sticky.forceUpdate();\n });\n }\n }\n });\n\n if (this.root) {\n this._mutationObserver.observe(this.root, {\n childList: true,\n attributes: true,\n subtree: true,\n characterData: true,\n });\n }\n }\n }\n\n public componentWillUnmount() {\n this._events.dispose();\n this._async.dispose();\n\n if (this._mutationObserver) {\n this._mutationObserver.disconnect();\n }\n }\n\n // Only updates if props/state change, just to prevent excessive setState with updateStickyRefHeights\n public shouldComponentUpdate(nextProps: IScrollablePaneProps, nextState: IScrollablePaneState): boolean {\n return (\n this.props.children !== nextProps.children ||\n this.props.initialScrollPosition !== nextProps.initialScrollPosition ||\n this.props.className !== nextProps.className ||\n this.state.stickyTopHeight !== nextState.stickyTopHeight ||\n this.state.stickyBottomHeight !== nextState.stickyBottomHeight ||\n this.state.scrollbarWidth !== nextState.scrollbarWidth ||\n this.state.scrollbarHeight !== nextState.scrollbarHeight\n );\n }\n\n public componentDidUpdate(prevProps: IScrollablePaneProps, prevState: IScrollablePaneState) {\n const initialScrollPosition = this.props.initialScrollPosition;\n if (\n this.contentContainer &&\n typeof initialScrollPosition === 'number' &&\n prevProps.initialScrollPosition !== initialScrollPosition\n ) {\n this.contentContainer.scrollTop = initialScrollPosition;\n }\n\n // Update subscribers when stickyTopHeight/stickyBottomHeight changes\n if (\n prevState.stickyTopHeight !== this.state.stickyTopHeight ||\n prevState.stickyBottomHeight !== this.state.stickyBottomHeight\n ) {\n this.notifySubscribers();\n }\n\n this._async.setTimeout(this._onWindowResize, 0);\n }\n\n public render(): JSX.Element {\n const { className, scrollContainerFocus, scrollContainerAriaLabel, theme, styles, onScroll } = this.props;\n const { stickyTopHeight, stickyBottomHeight } = this.state;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n scrollbarVisibility: this.props.scrollbarVisibility,\n });\n\n const scrollContainerProps = scrollContainerFocus\n ? {\n role: 'group',\n tabIndex: 0,\n 'aria-label': scrollContainerAriaLabel,\n onScroll,\n }\n : {\n onScroll,\n };\n\n return (\n <div\n {...getNativeProps(\n {\n ...this.props,\n },\n divProperties,\n // on React 17 onScroll is not being invoked on root element,\n // as a fix this method will be provided to the container element\n ['onScroll'],\n )}\n ref={this._root}\n className={classNames.root}\n >\n <div\n ref={this._stickyAboveRef}\n className={classNames.stickyAbove}\n style={this._getStickyContainerStyle(stickyTopHeight, true)}\n />\n <div\n ref={this._contentContainer}\n {...scrollContainerProps}\n className={classNames.contentContainer}\n data-is-scrollable={true}\n >\n <ScrollablePaneContext.Provider value={this._getScrollablePaneContext()}>\n {this.props.children}\n </ScrollablePaneContext.Provider>\n </div>\n <div className={classNames.stickyBelow} style={this._getStickyContainerStyle(stickyBottomHeight, false)}>\n <div ref={this._stickyBelowRef} className={classNames.stickyBelowItems} />\n </div>\n </div>\n );\n }\n\n public setStickiesDistanceFromTop(): void {\n if (this.contentContainer) {\n this._stickies.forEach(sticky => {\n sticky.setDistanceFromTop(this.contentContainer as HTMLDivElement);\n });\n }\n }\n\n public forceLayoutUpdate() {\n this._onWindowResize();\n }\n\n public subscribe = (handler: Function): void => {\n this._subscribers.add(handler);\n };\n\n public unsubscribe = (handler: Function): void => {\n this._subscribers.delete(handler);\n };\n\n public addSticky = (sticky: Sticky): void => {\n this._stickies.add(sticky);\n\n // If ScrollablePane is mounted, then sort sticky in correct place\n if (this.contentContainer) {\n sticky.setDistanceFromTop(this.contentContainer);\n this.sortSticky(sticky);\n }\n };\n\n public removeSticky = (sticky: Sticky): void => {\n this._stickies.delete(sticky);\n this._removeStickyFromContainers(sticky);\n this.notifySubscribers();\n };\n\n public sortSticky = (sticky: Sticky, sortAgain?: boolean): void => {\n if (this.stickyAbove && this.stickyBelow) {\n if (sortAgain) {\n this._removeStickyFromContainers(sticky);\n }\n if (sticky.canStickyTop && sticky.stickyContentTop) {\n this._addToStickyContainer(sticky, this.stickyAbove, sticky.stickyContentTop);\n }\n\n if (sticky.canStickyBottom && sticky.stickyContentBottom) {\n this._addToStickyContainer(sticky, this.stickyBelow, sticky.stickyContentBottom);\n }\n }\n };\n\n public updateStickyRefHeights = (): void => {\n const stickyItems = this._stickies;\n\n let stickyTopHeight = 0;\n let stickyBottomHeight = 0;\n\n stickyItems.forEach((sticky: Sticky) => {\n const { isStickyTop, isStickyBottom } = sticky.state;\n if (sticky.nonStickyContent) {\n if (isStickyTop) {\n stickyTopHeight += sticky.nonStickyContent.offsetHeight;\n }\n if (isStickyBottom) {\n stickyBottomHeight += sticky.nonStickyContent.offsetHeight;\n }\n this._checkStickyStatus(sticky);\n }\n });\n\n this.setState({\n stickyTopHeight: stickyTopHeight,\n stickyBottomHeight: stickyBottomHeight,\n });\n };\n\n public notifySubscribers = (): void => {\n if (this.contentContainer) {\n this._subscribers.forEach(handle => {\n // this.stickyBelow is passed in for calculating distance to determine Sticky status\n handle(this.contentContainer, this.stickyBelow);\n });\n }\n };\n\n public getScrollPosition = (): number => {\n if (this.contentContainer) {\n return this.contentContainer.scrollTop;\n }\n\n return 0;\n };\n\n public syncScrollSticky = (sticky: Sticky): void => {\n if (sticky && this.contentContainer) {\n sticky.syncScroll(this.contentContainer);\n }\n };\n\n private _getScrollablePaneContext = (): IScrollablePaneContext => {\n return {\n scrollablePane: {\n subscribe: this.subscribe,\n unsubscribe: this.unsubscribe,\n addSticky: this.addSticky,\n removeSticky: this.removeSticky,\n updateStickyRefHeights: this.updateStickyRefHeights,\n sortSticky: this.sortSticky,\n notifySubscribers: this.notifySubscribers,\n syncScrollSticky: this.syncScrollSticky,\n },\n };\n };\n\n private _checkStickyStatus(sticky: Sticky): void {\n if (this.stickyAbove && this.stickyBelow && this.contentContainer && sticky.nonStickyContent) {\n // If sticky is sticky, then append content to appropriate container\n if (sticky.state.isStickyTop || sticky.state.isStickyBottom) {\n if (\n sticky.state.isStickyTop &&\n !this.stickyAbove.contains(sticky.nonStickyContent) &&\n sticky.stickyContentTop\n ) {\n sticky.addSticky(sticky.stickyContentTop);\n }\n\n if (\n sticky.state.isStickyBottom &&\n !this.stickyBelow.contains(sticky.nonStickyContent) &&\n sticky.stickyContentBottom\n ) {\n sticky.addSticky(sticky.stickyContentBottom);\n }\n } else if (!this.contentContainer.contains(sticky.nonStickyContent)) {\n // Reset sticky if it's not sticky and not in the contentContainer element\n sticky.resetSticky();\n }\n }\n }\n\n private _addToStickyContainer = (\n sticky: Sticky,\n stickyContainer: HTMLDivElement,\n stickyContentToAdd: HTMLDivElement,\n ): void => {\n // If there's no children, append child to list, otherwise, sort though array and append at correct position\n if (!stickyContainer.children.length) {\n stickyContainer.appendChild(stickyContentToAdd);\n } else {\n // If stickyContentToAdd isn't a child element of target container, then append\n if (!stickyContainer.contains(stickyContentToAdd)) {\n const stickyChildrenElements: Element[] = [].slice.call(stickyContainer.children);\n\n const stickyList: Sticky[] = [];\n // Get stickies. Filter by canStickyTop/Bottom, then sort by distance from top, and then\n // filter by elements that are in the stickyContainer already.\n this._stickies.forEach(stickyItem => {\n if (stickyContainer === this.stickyAbove && sticky.canStickyTop) {\n stickyList.push(stickyItem);\n } else if (sticky.canStickyBottom) {\n stickyList.push(stickyItem);\n }\n });\n\n const stickyListSorted = stickyList\n .sort((a, b) => {\n return (a.state.distanceFromTop || 0) - (b.state.distanceFromTop || 0);\n })\n .filter(item => {\n const stickyContent =\n stickyContainer === this.stickyAbove ? item.stickyContentTop : item.stickyContentBottom;\n if (stickyContent) {\n return stickyChildrenElements.indexOf(stickyContent) > -1;\n }\n return false;\n });\n\n // Get first element that has a distance from top that is further than our sticky that is being added\n let targetStickyToAppendBefore: Sticky | undefined = undefined;\n for (const stickyListItem of stickyListSorted) {\n if ((stickyListItem.state.distanceFromTop || 0) >= (sticky.state.distanceFromTop || 0)) {\n targetStickyToAppendBefore = stickyListItem;\n break;\n }\n }\n\n // If target element to append before is known, grab respective stickyContentTop/Bottom element\n // and insert before\n let targetContainer: HTMLDivElement | null = null;\n if (targetStickyToAppendBefore) {\n targetContainer =\n stickyContainer === this.stickyAbove\n ? targetStickyToAppendBefore.stickyContentTop\n : targetStickyToAppendBefore.stickyContentBottom;\n }\n stickyContainer.insertBefore(stickyContentToAdd, targetContainer);\n }\n }\n };\n\n private _removeStickyFromContainers = (sticky: Sticky): void => {\n if (this.stickyAbove && sticky.stickyContentTop && this.stickyAbove.contains(sticky.stickyContentTop)) {\n this.stickyAbove.removeChild(sticky.stickyContentTop);\n }\n if (this.stickyBelow && sticky.stickyContentBottom && this.stickyBelow.contains(sticky.stickyContentBottom)) {\n this.stickyBelow.removeChild(sticky.stickyContentBottom);\n }\n };\n\n private _onWindowResize = (): void => {\n const scrollbarWidth = this._getScrollbarWidth();\n const scrollbarHeight = this._getScrollbarHeight();\n\n this.setState({\n scrollbarWidth,\n scrollbarHeight,\n });\n\n this.notifySubscribers();\n };\n\n private _getStickyContainerStyle = (height: number, isTop: boolean): React.CSSProperties => {\n return {\n height: height,\n ...(getRTL(this.props.theme)\n ? {\n right: '0',\n left: `${this.state.scrollbarWidth || this._getScrollbarWidth() || 0}px`,\n }\n : {\n left: '0',\n right: `${this.state.scrollbarWidth || this._getScrollbarWidth() || 0}px`,\n }),\n ...(isTop\n ? {\n top: '0',\n }\n : {\n bottom: `${this.state.scrollbarHeight || this._getScrollbarHeight() || 0}px`,\n }),\n };\n };\n\n private _getScrollbarWidth(): number {\n const { contentContainer } = this;\n return contentContainer ? contentContainer.offsetWidth - contentContainer.clientWidth : 0;\n }\n\n private _getScrollbarHeight(): number {\n const { contentContainer } = this;\n return contentContainer ? contentContainer.offsetHeight - contentContainer.clientHeight : 0;\n }\n\n private _onScroll = () => {\n const { contentContainer } = this;\n\n if (contentContainer) {\n this._stickies.forEach((sticky: Sticky) => {\n sticky.syncScroll(contentContainer);\n });\n }\n\n this._notifyThrottled();\n };\n}\n"]}
\No newline at end of file