@angular/cdk-experimental 14.0.3 → 14.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"scrolling.mjs","sources":["../../../../../../src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts","../../../../../../src/cdk-experimental/scrolling/scrolling-module.ts","../../../../../../src/cdk-experimental/scrolling/public-api.ts","../../../../../../src/cdk-experimental/scrolling/index.ts","../../../../../../src/cdk-experimental/scrolling/scrolling_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {ListRange} from '@angular/cdk/collections';\nimport {\n CdkVirtualScrollViewport,\n VIRTUAL_SCROLL_STRATEGY,\n VirtualScrollStrategy,\n} from '@angular/cdk/scrolling';\nimport {Directive, forwardRef, Input, OnChanges} from '@angular/core';\nimport {Observable} from 'rxjs';\n\n/**\n * A class that tracks the size of items that have been seen and uses it to estimate the average\n * item size.\n */\nexport class ItemSizeAverager {\n /** The total amount of weight behind the current average. */\n private _totalWeight = 0;\n\n /** The current average item size. */\n private _averageItemSize: number;\n\n /** The default size to use for items when no data is available. */\n private _defaultItemSize: number;\n\n /** @param defaultItemSize The default size to use for items when no data is available. */\n constructor(defaultItemSize = 50) {\n this._defaultItemSize = defaultItemSize;\n this._averageItemSize = defaultItemSize;\n }\n\n /** Returns the average item size. */\n getAverageItemSize(): number {\n return this._averageItemSize;\n }\n\n /**\n * Adds a measurement sample for the estimator to consider.\n * @param range The measured range.\n * @param size The measured size of the given range in pixels.\n */\n addSample(range: ListRange, size: number) {\n const newTotalWeight = this._totalWeight + range.end - range.start;\n if (newTotalWeight) {\n const newAverageItemSize =\n (size + this._averageItemSize * this._totalWeight) / newTotalWeight;\n if (newAverageItemSize) {\n this._averageItemSize = newAverageItemSize;\n this._totalWeight = newTotalWeight;\n }\n }\n }\n\n /** Resets the averager. */\n reset() {\n this._averageItemSize = this._defaultItemSize;\n this._totalWeight = 0;\n }\n}\n\n/** Virtual scrolling strategy for lists with items of unknown or dynamic size. */\nexport class AutoSizeVirtualScrollStrategy implements VirtualScrollStrategy {\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n scrolledIndexChange = new Observable<number>(() => {\n // TODO(mmalerba): Implement.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw Error(\n 'cdk-virtual-scroll: scrolledIndexChange is currently not supported for the' +\n ' autosize scroll strategy',\n );\n }\n });\n\n /** The attached viewport. */\n private _viewport: CdkVirtualScrollViewport | null = null;\n\n /** The minimum amount of buffer rendered beyond the viewport (in pixels). */\n private _minBufferPx: number;\n\n /** The number of buffer items to render beyond the edge of the viewport (in pixels). */\n private _maxBufferPx: number;\n\n /** The estimator used to estimate the size of unseen items. */\n private _averager: ItemSizeAverager;\n\n /** The last measured scroll offset of the viewport. */\n private _lastScrollOffset: number;\n\n /** The last measured size of the rendered content in the viewport. */\n private _lastRenderedContentSize: number;\n\n /** The last measured size of the rendered content in the viewport. */\n private _lastRenderedContentOffset: number;\n\n /**\n * The number of consecutive cycles where removing extra items has failed. Failure here means that\n * we estimated how many items we could safely remove, but our estimate turned out to be too much\n * and it wasn't safe to remove that many elements.\n */\n private _removalFailures = 0;\n\n /**\n * @param minBufferPx The minimum amount of buffer rendered beyond the viewport (in pixels).\n * If the amount of buffer dips below this number, more items will be rendered.\n * @param maxBufferPx The number of pixels worth of buffer to shoot for when rendering new items.\n * If the actual amount turns out to be less it will not necessarily trigger an additional\n * rendering cycle (as long as the amount of buffer is still greater than `minBufferPx`).\n * @param averager The averager used to estimate the size of unseen items.\n */\n constructor(minBufferPx: number, maxBufferPx: number, averager = new ItemSizeAverager()) {\n this._minBufferPx = minBufferPx;\n this._maxBufferPx = maxBufferPx;\n this._averager = averager;\n }\n\n /**\n * Attaches this scroll strategy to a viewport.\n * @param viewport The viewport to attach this strategy to.\n */\n attach(viewport: CdkVirtualScrollViewport) {\n this._averager.reset();\n this._viewport = viewport;\n this._renderContentForCurrentOffset();\n }\n\n /** Detaches this scroll strategy from the currently attached viewport. */\n detach() {\n this._viewport = null;\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onContentScrolled() {\n if (this._viewport) {\n this._updateRenderedContentAfterScroll();\n }\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onDataLengthChanged() {\n if (this._viewport) {\n this._renderContentForCurrentOffset();\n this._checkRenderedContentSize();\n }\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onContentRendered() {\n if (this._viewport) {\n this._checkRenderedContentSize();\n }\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onRenderedOffsetChanged() {\n if (this._viewport) {\n this._checkRenderedContentOffset();\n }\n }\n\n /** Scroll to the offset for the given index. */\n scrollToIndex(): void {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // TODO(mmalerba): Implement.\n throw Error(\n 'cdk-virtual-scroll: scrollToIndex is currently not supported for the autosize' +\n ' scroll strategy',\n );\n }\n }\n\n /**\n * Update the buffer parameters.\n * @param minBufferPx The minimum amount of buffer rendered beyond the viewport (in pixels).\n * @param maxBufferPx The number of buffer items to render beyond the edge of the viewport (in\n * pixels).\n */\n updateBufferSize(minBufferPx: number, maxBufferPx: number) {\n if (maxBufferPx < minBufferPx) {\n throw 'CDK virtual scroll: maxBufferPx must be greater than or equal to minBufferPx';\n }\n this._minBufferPx = minBufferPx;\n this._maxBufferPx = maxBufferPx;\n }\n\n /** Update the rendered content after the user scrolls. */\n private _updateRenderedContentAfterScroll() {\n const viewport = this._viewport!;\n\n // The current scroll offset.\n const scrollOffset = viewport.measureScrollOffset();\n // The delta between the current scroll offset and the previously recorded scroll offset.\n let scrollDelta = scrollOffset - this._lastScrollOffset;\n // The magnitude of the scroll delta.\n let scrollMagnitude = Math.abs(scrollDelta);\n\n // The currently rendered range.\n const renderedRange = viewport.getRenderedRange();\n\n // If we're scrolling toward the top, we need to account for the fact that the predicted amount\n // of content and the actual amount of scrollable space may differ. We address this by slowly\n // correcting the difference on each scroll event.\n let offsetCorrection = 0;\n if (scrollDelta < 0) {\n // The content offset we would expect based on the average item size.\n const predictedOffset = renderedRange.start * this._averager.getAverageItemSize();\n // The difference between the predicted size of the unrendered content at the beginning and\n // the actual available space to scroll over. We need to reduce this to zero by the time the\n // user scrolls to the top.\n // - 0 indicates that the predicted size and available space are the same.\n // - A negative number that the predicted size is smaller than the available space.\n // - A positive number indicates the predicted size is larger than the available space\n const offsetDifference = predictedOffset - this._lastRenderedContentOffset;\n // The amount of difference to correct during this scroll event. We calculate this as a\n // percentage of the total difference based on the percentage of the distance toward the top\n // that the user scrolled.\n offsetCorrection = Math.round(\n offsetDifference *\n Math.max(0, Math.min(1, scrollMagnitude / (scrollOffset + scrollMagnitude))),\n );\n\n // Based on the offset correction above, we pretend that the scroll delta was bigger or\n // smaller than it actually was, this way we can start to eliminate the difference.\n scrollDelta = scrollDelta - offsetCorrection;\n scrollMagnitude = Math.abs(scrollDelta);\n }\n\n // The current amount of buffer past the start of the viewport.\n const startBuffer = this._lastScrollOffset - this._lastRenderedContentOffset;\n // The current amount of buffer past the end of the viewport.\n const endBuffer =\n this._lastRenderedContentOffset +\n this._lastRenderedContentSize -\n (this._lastScrollOffset + viewport.getViewportSize());\n // The amount of unfilled space that should be filled on the side the user is scrolling toward\n // in order to safely absorb the scroll delta.\n const underscan =\n scrollMagnitude + this._minBufferPx - (scrollDelta < 0 ? startBuffer : endBuffer);\n\n // Check if there's unfilled space that we need to render new elements to fill.\n if (underscan > 0) {\n // Check if the scroll magnitude was larger than the viewport size. In this case the user\n // won't notice a discontinuity if we just jump to the new estimated position in the list.\n // However, if the scroll magnitude is smaller than the viewport the user might notice some\n // jitteriness if we just jump to the estimated position. Instead we make sure to scroll by\n // the same number of pixels as the scroll magnitude.\n if (scrollMagnitude >= viewport.getViewportSize()) {\n this._renderContentForCurrentOffset();\n } else {\n // The number of new items to render on the side the user is scrolling towards. Rather than\n // just filling the underscan space, we actually fill enough to have a buffer size of\n // `maxBufferPx`. This gives us a little wiggle room in case our item size estimate is off.\n const addItems = Math.max(\n 0,\n Math.ceil(\n (underscan - this._minBufferPx + this._maxBufferPx) /\n this._averager.getAverageItemSize(),\n ),\n );\n // The amount of filled space beyond what is necessary on the side the user is scrolling\n // away from.\n const overscan =\n (scrollDelta < 0 ? endBuffer : startBuffer) - this._minBufferPx + scrollMagnitude;\n // The number of currently rendered items to remove on the side the user is scrolling away\n // from. If removal has failed in recent cycles we are less aggressive in how much we try to\n // remove.\n const unboundedRemoveItems = Math.floor(\n overscan / this._averager.getAverageItemSize() / (this._removalFailures + 1),\n );\n const removeItems = Math.min(\n renderedRange.end - renderedRange.start,\n Math.max(0, unboundedRemoveItems),\n );\n\n // The new range we will tell the viewport to render. We first expand it to include the new\n // items we want rendered, we then contract the opposite side to remove items we no longer\n // want rendered.\n const range = this._expandRange(\n renderedRange,\n scrollDelta < 0 ? addItems : 0,\n scrollDelta > 0 ? addItems : 0,\n );\n if (scrollDelta < 0) {\n range.end = Math.max(range.start + 1, range.end - removeItems);\n } else {\n range.start = Math.min(range.end - 1, range.start + removeItems);\n }\n\n // The new offset we want to set on the rendered content. To determine this we measure the\n // number of pixels we removed and then adjust the offset to the start of the rendered\n // content or to the end of the rendered content accordingly (whichever one doesn't require\n // that the newly added items to be rendered to calculate.)\n let contentOffset: number;\n let contentOffsetTo: 'to-start' | 'to-end';\n if (scrollDelta < 0) {\n let removedSize = viewport.measureRangeSize({\n start: range.end,\n end: renderedRange.end,\n });\n // Check that we're not removing too much.\n if (removedSize <= overscan) {\n contentOffset =\n this._lastRenderedContentOffset + this._lastRenderedContentSize - removedSize;\n this._removalFailures = 0;\n } else {\n // If the removal is more than the overscan can absorb just undo it and record the fact\n // that the removal failed so we can be less aggressive next time.\n range.end = renderedRange.end;\n contentOffset = this._lastRenderedContentOffset + this._lastRenderedContentSize;\n this._removalFailures++;\n }\n contentOffsetTo = 'to-end';\n } else {\n const removedSize = viewport.measureRangeSize({\n start: renderedRange.start,\n end: range.start,\n });\n // Check that we're not removing too much.\n if (removedSize <= overscan) {\n contentOffset = this._lastRenderedContentOffset + removedSize;\n this._removalFailures = 0;\n } else {\n // If the removal is more than the overscan can absorb just undo it and record the fact\n // that the removal failed so we can be less aggressive next time.\n range.start = renderedRange.start;\n contentOffset = this._lastRenderedContentOffset;\n this._removalFailures++;\n }\n contentOffsetTo = 'to-start';\n }\n\n // Set the range and offset we calculated above.\n viewport.setRenderedRange(range);\n viewport.setRenderedContentOffset(contentOffset + offsetCorrection, contentOffsetTo);\n }\n } else if (offsetCorrection) {\n // Even if the rendered range didn't change, we may still need to adjust the content offset to\n // simulate scrolling slightly slower or faster than the user actually scrolled.\n viewport.setRenderedContentOffset(this._lastRenderedContentOffset + offsetCorrection);\n }\n\n // Save the scroll offset to be compared to the new value on the next scroll event.\n this._lastScrollOffset = scrollOffset;\n }\n\n /**\n * Checks the size of the currently rendered content and uses it to update the estimated item size\n * and estimated total content size.\n */\n private _checkRenderedContentSize() {\n const viewport = this._viewport!;\n this._lastRenderedContentSize = viewport.measureRenderedContentSize();\n this._averager.addSample(viewport.getRenderedRange(), this._lastRenderedContentSize);\n this._updateTotalContentSize(this._lastRenderedContentSize);\n }\n\n /** Checks the currently rendered content offset and saves the value for later use. */\n private _checkRenderedContentOffset() {\n const viewport = this._viewport!;\n this._lastRenderedContentOffset = viewport.getOffsetToRenderedContentStart()!;\n }\n\n /**\n * Recalculates the rendered content based on our estimate of what should be shown at the current\n * scroll offset.\n */\n private _renderContentForCurrentOffset() {\n const viewport = this._viewport!;\n const scrollOffset = viewport.measureScrollOffset();\n this._lastScrollOffset = scrollOffset;\n this._removalFailures = 0;\n\n const itemSize = this._averager.getAverageItemSize();\n const firstVisibleIndex = Math.min(\n viewport.getDataLength() - 1,\n Math.floor(scrollOffset / itemSize),\n );\n const bufferSize = Math.ceil(this._maxBufferPx / itemSize);\n const range = this._expandRange(\n this._getVisibleRangeForIndex(firstVisibleIndex),\n bufferSize,\n bufferSize,\n );\n\n viewport.setRenderedRange(range);\n viewport.setRenderedContentOffset(itemSize * range.start);\n }\n\n // TODO: maybe move to base class, can probably share with fixed size strategy.\n /**\n * Gets the visible range of data for the given start index. If the start index is too close to\n * the end of the list it may be backed up to ensure the estimated size of the range is enough to\n * fill the viewport.\n * Note: must not be called if `this._viewport` is null\n * @param startIndex The index to start the range at\n * @return a range estimated to be large enough to fill the viewport when rendered.\n */\n private _getVisibleRangeForIndex(startIndex: number): ListRange {\n const viewport = this._viewport!;\n const range: ListRange = {\n start: startIndex,\n end: startIndex + Math.ceil(viewport.getViewportSize() / this._averager.getAverageItemSize()),\n };\n const extra = range.end - viewport.getDataLength();\n if (extra > 0) {\n range.start = Math.max(0, range.start - extra);\n }\n return range;\n }\n\n // TODO: maybe move to base class, can probably share with fixed size strategy.\n /**\n * Expand the given range by the given amount in either direction.\n * Note: must not be called if `this._viewport` is null\n * @param range The range to expand\n * @param expandStart The number of items to expand the start of the range by.\n * @param expandEnd The number of items to expand the end of the range by.\n * @return The expanded range.\n */\n private _expandRange(range: ListRange, expandStart: number, expandEnd: number): ListRange {\n const viewport = this._viewport!;\n const start = Math.max(0, range.start - expandStart);\n const end = Math.min(viewport.getDataLength(), range.end + expandEnd);\n return {start, end};\n }\n\n /** Update the viewport's total content size. */\n private _updateTotalContentSize(renderedContentSize: number) {\n const viewport = this._viewport!;\n const renderedRange = viewport.getRenderedRange();\n const totalSize =\n renderedContentSize +\n (viewport.getDataLength() - (renderedRange.end - renderedRange.start)) *\n this._averager.getAverageItemSize();\n viewport.setTotalContentSize(totalSize);\n }\n}\n\n/**\n * Provider factory for `AutoSizeVirtualScrollStrategy` that simply extracts the already created\n * `AutoSizeVirtualScrollStrategy` from the given directive.\n * @param autoSizeDir The instance of `CdkAutoSizeVirtualScroll` to extract the\n * `AutoSizeVirtualScrollStrategy` from.\n */\nexport function _autoSizeVirtualScrollStrategyFactory(autoSizeDir: CdkAutoSizeVirtualScroll) {\n return autoSizeDir._scrollStrategy;\n}\n\n/** A virtual scroll strategy that supports unknown or dynamic size items. */\n@Directive({\n selector: 'cdk-virtual-scroll-viewport[autosize]',\n providers: [\n {\n provide: VIRTUAL_SCROLL_STRATEGY,\n useFactory: _autoSizeVirtualScrollStrategyFactory,\n deps: [forwardRef(() => CdkAutoSizeVirtualScroll)],\n },\n ],\n})\nexport class CdkAutoSizeVirtualScroll implements OnChanges {\n /**\n * The minimum amount of buffer rendered beyond the viewport (in pixels).\n * If the amount of buffer dips below this number, more items will be rendered. Defaults to 100px.\n */\n @Input()\n get minBufferPx(): number {\n return this._minBufferPx;\n }\n set minBufferPx(value: NumberInput) {\n this._minBufferPx = coerceNumberProperty(value);\n }\n _minBufferPx = 100;\n\n /**\n * The number of pixels worth of buffer to shoot for when rendering new items.\n * If the actual amount turns out to be less it will not necessarily trigger an additional\n * rendering cycle (as long as the amount of buffer is still greater than `minBufferPx`).\n * Defaults to 200px.\n */\n @Input()\n get maxBufferPx(): number {\n return this._maxBufferPx;\n }\n set maxBufferPx(value: NumberInput) {\n this._maxBufferPx = coerceNumberProperty(value);\n }\n _maxBufferPx = 200;\n\n /** The scroll strategy used by this directive. */\n _scrollStrategy = new AutoSizeVirtualScrollStrategy(this.minBufferPx, this.maxBufferPx);\n\n ngOnChanges() {\n this._scrollStrategy.updateBufferSize(this.minBufferPx, this.maxBufferPx);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkAutoSizeVirtualScroll} from './auto-size-virtual-scroll';\n\n@NgModule({\n exports: [CdkAutoSizeVirtualScroll],\n declarations: [CdkAutoSizeVirtualScroll],\n})\nexport class ScrollingModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './auto-size-virtual-scroll';\nexport * from './scrolling-module';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;AAMG;AAYH;;;AAGG;MACU,gBAAgB,CAAA;;IAW3B,WAAY,CAAA,eAAe,GAAG,EAAE,EAAA;;AATxB,QAAA,IAAY,CAAA,YAAA,GAAG,CAAC,CAAC;AAUvB,QAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;AACxC,QAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;KACzC;;IAGD,kBAAkB,GAAA;QAChB,OAAO,IAAI,CAAC,gBAAgB,CAAC;KAC9B;AAED;;;;AAIG;IACH,SAAS,CAAC,KAAgB,EAAE,IAAY,EAAA;AACtC,QAAA,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC;AACnE,QAAA,IAAI,cAAc,EAAE;AAClB,YAAA,MAAM,kBAAkB,GACtB,CAAC,IAAI,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,YAAY,IAAI,cAAc,CAAC;AACtE,YAAA,IAAI,kBAAkB,EAAE;AACtB,gBAAA,IAAI,CAAC,gBAAgB,GAAG,kBAAkB,CAAC;AAC3C,gBAAA,IAAI,CAAC,YAAY,GAAG,cAAc,CAAC;AACpC,aAAA;AACF,SAAA;KACF;;IAGD,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;AAC9C,QAAA,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;KAC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A,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,wBAAwB,CAAC;oBACnC,YAAY,EAAE,CAAC,wBAAwB,CAAC;iBACzC,CAAA;;;ACdD;;;;;;AAMG;;ACNH;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"scrolling.mjs","sources":["../../../../../../src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts","../../../../../../src/cdk-experimental/scrolling/scrolling-module.ts","../../../../../../src/cdk-experimental/scrolling/public-api.ts","../../../../../../src/cdk-experimental/scrolling/index.ts","../../../../../../src/cdk-experimental/scrolling/scrolling_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {ListRange} from '@angular/cdk/collections';\nimport {\n CdkVirtualScrollViewport,\n VIRTUAL_SCROLL_STRATEGY,\n VirtualScrollStrategy,\n} from '@angular/cdk/scrolling';\nimport {Directive, forwardRef, Input, OnChanges} from '@angular/core';\nimport {Observable} from 'rxjs';\n\n/**\n * A class that tracks the size of items that have been seen and uses it to estimate the average\n * item size.\n */\nexport class ItemSizeAverager {\n /** The total amount of weight behind the current average. */\n private _totalWeight = 0;\n\n /** The current average item size. */\n private _averageItemSize: number;\n\n /** The default size to use for items when no data is available. */\n private _defaultItemSize: number;\n\n /** @param defaultItemSize The default size to use for items when no data is available. */\n constructor(defaultItemSize = 50) {\n this._defaultItemSize = defaultItemSize;\n this._averageItemSize = defaultItemSize;\n }\n\n /** Returns the average item size. */\n getAverageItemSize(): number {\n return this._averageItemSize;\n }\n\n /**\n * Adds a measurement sample for the estimator to consider.\n * @param range The measured range.\n * @param size The measured size of the given range in pixels.\n */\n addSample(range: ListRange, size: number) {\n const newTotalWeight = this._totalWeight + range.end - range.start;\n if (newTotalWeight) {\n const newAverageItemSize =\n (size + this._averageItemSize * this._totalWeight) / newTotalWeight;\n if (newAverageItemSize) {\n this._averageItemSize = newAverageItemSize;\n this._totalWeight = newTotalWeight;\n }\n }\n }\n\n /** Resets the averager. */\n reset() {\n this._averageItemSize = this._defaultItemSize;\n this._totalWeight = 0;\n }\n}\n\n/** Virtual scrolling strategy for lists with items of unknown or dynamic size. */\nexport class AutoSizeVirtualScrollStrategy implements VirtualScrollStrategy {\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n scrolledIndexChange = new Observable<number>(() => {\n // TODO(mmalerba): Implement.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw Error(\n 'cdk-virtual-scroll: scrolledIndexChange is currently not supported for the' +\n ' autosize scroll strategy',\n );\n }\n });\n\n /** The attached viewport. */\n private _viewport: CdkVirtualScrollViewport | null = null;\n\n /** The minimum amount of buffer rendered beyond the viewport (in pixels). */\n private _minBufferPx: number;\n\n /** The number of buffer items to render beyond the edge of the viewport (in pixels). */\n private _maxBufferPx: number;\n\n /** The estimator used to estimate the size of unseen items. */\n private _averager: ItemSizeAverager;\n\n /** The last measured scroll offset of the viewport. */\n private _lastScrollOffset: number;\n\n /** The last measured size of the rendered content in the viewport. */\n private _lastRenderedContentSize: number;\n\n /** The last measured size of the rendered content in the viewport. */\n private _lastRenderedContentOffset: number;\n\n /**\n * The number of consecutive cycles where removing extra items has failed. Failure here means that\n * we estimated how many items we could safely remove, but our estimate turned out to be too much\n * and it wasn't safe to remove that many elements.\n */\n private _removalFailures = 0;\n\n /**\n * @param minBufferPx The minimum amount of buffer rendered beyond the viewport (in pixels).\n * If the amount of buffer dips below this number, more items will be rendered.\n * @param maxBufferPx The number of pixels worth of buffer to shoot for when rendering new items.\n * If the actual amount turns out to be less it will not necessarily trigger an additional\n * rendering cycle (as long as the amount of buffer is still greater than `minBufferPx`).\n * @param averager The averager used to estimate the size of unseen items.\n */\n constructor(minBufferPx: number, maxBufferPx: number, averager = new ItemSizeAverager()) {\n this._minBufferPx = minBufferPx;\n this._maxBufferPx = maxBufferPx;\n this._averager = averager;\n }\n\n /**\n * Attaches this scroll strategy to a viewport.\n * @param viewport The viewport to attach this strategy to.\n */\n attach(viewport: CdkVirtualScrollViewport) {\n this._averager.reset();\n this._viewport = viewport;\n this._renderContentForCurrentOffset();\n }\n\n /** Detaches this scroll strategy from the currently attached viewport. */\n detach() {\n this._viewport = null;\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onContentScrolled() {\n if (this._viewport) {\n this._updateRenderedContentAfterScroll();\n }\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onDataLengthChanged() {\n if (this._viewport) {\n this._renderContentForCurrentOffset();\n this._checkRenderedContentSize();\n }\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onContentRendered() {\n if (this._viewport) {\n this._checkRenderedContentSize();\n }\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onRenderedOffsetChanged() {\n if (this._viewport) {\n this._checkRenderedContentOffset();\n }\n }\n\n /** Scroll to the offset for the given index. */\n scrollToIndex(): void {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // TODO(mmalerba): Implement.\n throw Error(\n 'cdk-virtual-scroll: scrollToIndex is currently not supported for the autosize' +\n ' scroll strategy',\n );\n }\n }\n\n /**\n * Update the buffer parameters.\n * @param minBufferPx The minimum amount of buffer rendered beyond the viewport (in pixels).\n * @param maxBufferPx The number of buffer items to render beyond the edge of the viewport (in\n * pixels).\n */\n updateBufferSize(minBufferPx: number, maxBufferPx: number) {\n if (maxBufferPx < minBufferPx) {\n throw 'CDK virtual scroll: maxBufferPx must be greater than or equal to minBufferPx';\n }\n this._minBufferPx = minBufferPx;\n this._maxBufferPx = maxBufferPx;\n }\n\n /** Update the rendered content after the user scrolls. */\n private _updateRenderedContentAfterScroll() {\n const viewport = this._viewport!;\n\n // The current scroll offset.\n const scrollOffset = viewport.measureScrollOffset();\n // The delta between the current scroll offset and the previously recorded scroll offset.\n let scrollDelta = scrollOffset - this._lastScrollOffset;\n // The magnitude of the scroll delta.\n let scrollMagnitude = Math.abs(scrollDelta);\n\n // The currently rendered range.\n const renderedRange = viewport.getRenderedRange();\n\n // If we're scrolling toward the top, we need to account for the fact that the predicted amount\n // of content and the actual amount of scrollable space may differ. We address this by slowly\n // correcting the difference on each scroll event.\n let offsetCorrection = 0;\n if (scrollDelta < 0) {\n // The content offset we would expect based on the average item size.\n const predictedOffset = renderedRange.start * this._averager.getAverageItemSize();\n // The difference between the predicted size of the un-rendered content at the beginning and\n // the actual available space to scroll over. We need to reduce this to zero by the time the\n // user scrolls to the top.\n // - 0 indicates that the predicted size and available space are the same.\n // - A negative number that the predicted size is smaller than the available space.\n // - A positive number indicates the predicted size is larger than the available space\n const offsetDifference = predictedOffset - this._lastRenderedContentOffset;\n // The amount of difference to correct during this scroll event. We calculate this as a\n // percentage of the total difference based on the percentage of the distance toward the top\n // that the user scrolled.\n offsetCorrection = Math.round(\n offsetDifference *\n Math.max(0, Math.min(1, scrollMagnitude / (scrollOffset + scrollMagnitude))),\n );\n\n // Based on the offset correction above, we pretend that the scroll delta was bigger or\n // smaller than it actually was, this way we can start to eliminate the difference.\n scrollDelta = scrollDelta - offsetCorrection;\n scrollMagnitude = Math.abs(scrollDelta);\n }\n\n // The current amount of buffer past the start of the viewport.\n const startBuffer = this._lastScrollOffset - this._lastRenderedContentOffset;\n // The current amount of buffer past the end of the viewport.\n const endBuffer =\n this._lastRenderedContentOffset +\n this._lastRenderedContentSize -\n (this._lastScrollOffset + viewport.getViewportSize());\n // The amount of unfilled space that should be filled on the side the user is scrolling toward\n // in order to safely absorb the scroll delta.\n const underscan =\n scrollMagnitude + this._minBufferPx - (scrollDelta < 0 ? startBuffer : endBuffer);\n\n // Check if there's unfilled space that we need to render new elements to fill.\n if (underscan > 0) {\n // Check if the scroll magnitude was larger than the viewport size. In this case the user\n // won't notice a discontinuity if we just jump to the new estimated position in the list.\n // However, if the scroll magnitude is smaller than the viewport the user might notice some\n // jitteriness if we just jump to the estimated position. Instead we make sure to scroll by\n // the same number of pixels as the scroll magnitude.\n if (scrollMagnitude >= viewport.getViewportSize()) {\n this._renderContentForCurrentOffset();\n } else {\n // The number of new items to render on the side the user is scrolling towards. Rather than\n // just filling the underscan space, we actually fill enough to have a buffer size of\n // `maxBufferPx`. This gives us a little wiggle room in case our item size estimate is off.\n const addItems = Math.max(\n 0,\n Math.ceil(\n (underscan - this._minBufferPx + this._maxBufferPx) /\n this._averager.getAverageItemSize(),\n ),\n );\n // The amount of filled space beyond what is necessary on the side the user is scrolling\n // away from.\n const overscan =\n (scrollDelta < 0 ? endBuffer : startBuffer) - this._minBufferPx + scrollMagnitude;\n // The number of currently rendered items to remove on the side the user is scrolling away\n // from. If removal has failed in recent cycles we are less aggressive in how much we try to\n // remove.\n const unboundedRemoveItems = Math.floor(\n overscan / this._averager.getAverageItemSize() / (this._removalFailures + 1),\n );\n const removeItems = Math.min(\n renderedRange.end - renderedRange.start,\n Math.max(0, unboundedRemoveItems),\n );\n\n // The new range we will tell the viewport to render. We first expand it to include the new\n // items we want rendered, we then contract the opposite side to remove items we no longer\n // want rendered.\n const range = this._expandRange(\n renderedRange,\n scrollDelta < 0 ? addItems : 0,\n scrollDelta > 0 ? addItems : 0,\n );\n if (scrollDelta < 0) {\n range.end = Math.max(range.start + 1, range.end - removeItems);\n } else {\n range.start = Math.min(range.end - 1, range.start + removeItems);\n }\n\n // The new offset we want to set on the rendered content. To determine this we measure the\n // number of pixels we removed and then adjust the offset to the start of the rendered\n // content or to the end of the rendered content accordingly (whichever one doesn't require\n // that the newly added items to be rendered to calculate.)\n let contentOffset: number;\n let contentOffsetTo: 'to-start' | 'to-end';\n if (scrollDelta < 0) {\n let removedSize = viewport.measureRangeSize({\n start: range.end,\n end: renderedRange.end,\n });\n // Check that we're not removing too much.\n if (removedSize <= overscan) {\n contentOffset =\n this._lastRenderedContentOffset + this._lastRenderedContentSize - removedSize;\n this._removalFailures = 0;\n } else {\n // If the removal is more than the overscan can absorb just undo it and record the fact\n // that the removal failed so we can be less aggressive next time.\n range.end = renderedRange.end;\n contentOffset = this._lastRenderedContentOffset + this._lastRenderedContentSize;\n this._removalFailures++;\n }\n contentOffsetTo = 'to-end';\n } else {\n const removedSize = viewport.measureRangeSize({\n start: renderedRange.start,\n end: range.start,\n });\n // Check that we're not removing too much.\n if (removedSize <= overscan) {\n contentOffset = this._lastRenderedContentOffset + removedSize;\n this._removalFailures = 0;\n } else {\n // If the removal is more than the overscan can absorb just undo it and record the fact\n // that the removal failed so we can be less aggressive next time.\n range.start = renderedRange.start;\n contentOffset = this._lastRenderedContentOffset;\n this._removalFailures++;\n }\n contentOffsetTo = 'to-start';\n }\n\n // Set the range and offset we calculated above.\n viewport.setRenderedRange(range);\n viewport.setRenderedContentOffset(contentOffset + offsetCorrection, contentOffsetTo);\n }\n } else if (offsetCorrection) {\n // Even if the rendered range didn't change, we may still need to adjust the content offset to\n // simulate scrolling slightly slower or faster than the user actually scrolled.\n viewport.setRenderedContentOffset(this._lastRenderedContentOffset + offsetCorrection);\n }\n\n // Save the scroll offset to be compared to the new value on the next scroll event.\n this._lastScrollOffset = scrollOffset;\n }\n\n /**\n * Checks the size of the currently rendered content and uses it to update the estimated item size\n * and estimated total content size.\n */\n private _checkRenderedContentSize() {\n const viewport = this._viewport!;\n this._lastRenderedContentSize = viewport.measureRenderedContentSize();\n this._averager.addSample(viewport.getRenderedRange(), this._lastRenderedContentSize);\n this._updateTotalContentSize(this._lastRenderedContentSize);\n }\n\n /** Checks the currently rendered content offset and saves the value for later use. */\n private _checkRenderedContentOffset() {\n const viewport = this._viewport!;\n this._lastRenderedContentOffset = viewport.getOffsetToRenderedContentStart()!;\n }\n\n /**\n * Recalculates the rendered content based on our estimate of what should be shown at the current\n * scroll offset.\n */\n private _renderContentForCurrentOffset() {\n const viewport = this._viewport!;\n const scrollOffset = viewport.measureScrollOffset();\n this._lastScrollOffset = scrollOffset;\n this._removalFailures = 0;\n\n const itemSize = this._averager.getAverageItemSize();\n const firstVisibleIndex = Math.min(\n viewport.getDataLength() - 1,\n Math.floor(scrollOffset / itemSize),\n );\n const bufferSize = Math.ceil(this._maxBufferPx / itemSize);\n const range = this._expandRange(\n this._getVisibleRangeForIndex(firstVisibleIndex),\n bufferSize,\n bufferSize,\n );\n\n viewport.setRenderedRange(range);\n viewport.setRenderedContentOffset(itemSize * range.start);\n }\n\n // TODO: maybe move to base class, can probably share with fixed size strategy.\n /**\n * Gets the visible range of data for the given start index. If the start index is too close to\n * the end of the list it may be backed up to ensure the estimated size of the range is enough to\n * fill the viewport.\n * Note: must not be called if `this._viewport` is null\n * @param startIndex The index to start the range at\n * @return a range estimated to be large enough to fill the viewport when rendered.\n */\n private _getVisibleRangeForIndex(startIndex: number): ListRange {\n const viewport = this._viewport!;\n const range: ListRange = {\n start: startIndex,\n end: startIndex + Math.ceil(viewport.getViewportSize() / this._averager.getAverageItemSize()),\n };\n const extra = range.end - viewport.getDataLength();\n if (extra > 0) {\n range.start = Math.max(0, range.start - extra);\n }\n return range;\n }\n\n // TODO: maybe move to base class, can probably share with fixed size strategy.\n /**\n * Expand the given range by the given amount in either direction.\n * Note: must not be called if `this._viewport` is null\n * @param range The range to expand\n * @param expandStart The number of items to expand the start of the range by.\n * @param expandEnd The number of items to expand the end of the range by.\n * @return The expanded range.\n */\n private _expandRange(range: ListRange, expandStart: number, expandEnd: number): ListRange {\n const viewport = this._viewport!;\n const start = Math.max(0, range.start - expandStart);\n const end = Math.min(viewport.getDataLength(), range.end + expandEnd);\n return {start, end};\n }\n\n /** Update the viewport's total content size. */\n private _updateTotalContentSize(renderedContentSize: number) {\n const viewport = this._viewport!;\n const renderedRange = viewport.getRenderedRange();\n const totalSize =\n renderedContentSize +\n (viewport.getDataLength() - (renderedRange.end - renderedRange.start)) *\n this._averager.getAverageItemSize();\n viewport.setTotalContentSize(totalSize);\n }\n}\n\n/**\n * Provider factory for `AutoSizeVirtualScrollStrategy` that simply extracts the already created\n * `AutoSizeVirtualScrollStrategy` from the given directive.\n * @param autoSizeDir The instance of `CdkAutoSizeVirtualScroll` to extract the\n * `AutoSizeVirtualScrollStrategy` from.\n */\nexport function _autoSizeVirtualScrollStrategyFactory(autoSizeDir: CdkAutoSizeVirtualScroll) {\n return autoSizeDir._scrollStrategy;\n}\n\n/** A virtual scroll strategy that supports unknown or dynamic size items. */\n@Directive({\n selector: 'cdk-virtual-scroll-viewport[autosize]',\n providers: [\n {\n provide: VIRTUAL_SCROLL_STRATEGY,\n useFactory: _autoSizeVirtualScrollStrategyFactory,\n deps: [forwardRef(() => CdkAutoSizeVirtualScroll)],\n },\n ],\n})\nexport class CdkAutoSizeVirtualScroll implements OnChanges {\n /**\n * The minimum amount of buffer rendered beyond the viewport (in pixels).\n * If the amount of buffer dips below this number, more items will be rendered. Defaults to 100px.\n */\n @Input()\n get minBufferPx(): number {\n return this._minBufferPx;\n }\n set minBufferPx(value: NumberInput) {\n this._minBufferPx = coerceNumberProperty(value);\n }\n _minBufferPx = 100;\n\n /**\n * The number of pixels worth of buffer to shoot for when rendering new items.\n * If the actual amount turns out to be less it will not necessarily trigger an additional\n * rendering cycle (as long as the amount of buffer is still greater than `minBufferPx`).\n * Defaults to 200px.\n */\n @Input()\n get maxBufferPx(): number {\n return this._maxBufferPx;\n }\n set maxBufferPx(value: NumberInput) {\n this._maxBufferPx = coerceNumberProperty(value);\n }\n _maxBufferPx = 200;\n\n /** The scroll strategy used by this directive. */\n _scrollStrategy = new AutoSizeVirtualScrollStrategy(this.minBufferPx, this.maxBufferPx);\n\n ngOnChanges() {\n this._scrollStrategy.updateBufferSize(this.minBufferPx, this.maxBufferPx);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkAutoSizeVirtualScroll} from './auto-size-virtual-scroll';\n\n@NgModule({\n exports: [CdkAutoSizeVirtualScroll],\n declarations: [CdkAutoSizeVirtualScroll],\n})\nexport class ScrollingModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './auto-size-virtual-scroll';\nexport * from './scrolling-module';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;AAMG;AAYH;;;AAGG;MACU,gBAAgB,CAAA;;IAW3B,WAAY,CAAA,eAAe,GAAG,EAAE,EAAA;;AATxB,QAAA,IAAY,CAAA,YAAA,GAAG,CAAC,CAAC;AAUvB,QAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;AACxC,QAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;KACzC;;IAGD,kBAAkB,GAAA;QAChB,OAAO,IAAI,CAAC,gBAAgB,CAAC;KAC9B;AAED;;;;AAIG;IACH,SAAS,CAAC,KAAgB,EAAE,IAAY,EAAA;AACtC,QAAA,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC;AACnE,QAAA,IAAI,cAAc,EAAE;AAClB,YAAA,MAAM,kBAAkB,GACtB,CAAC,IAAI,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,YAAY,IAAI,cAAc,CAAC;AACtE,YAAA,IAAI,kBAAkB,EAAE;AACtB,gBAAA,IAAI,CAAC,gBAAgB,GAAG,kBAAkB,CAAC;AAC3C,gBAAA,IAAI,CAAC,YAAY,GAAG,cAAc,CAAC;AACpC,aAAA;AACF,SAAA;KACF;;IAGD,KAAK,GAAA;AACH,QAAA,IAAI,CAAC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AAA,CAD7B,wBAAwB,CAAA,EAAA,CAAA,CAAA;6GAGvB,eAAe,EAAA,CAAA,CAAA;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,wBAAwB,CAAC;oBACnC,YAAY,EAAE,CAAC,wBAAwB,CAAC;iBACzC,CAAA;;;ACdD;;;;;;AAMG;;ACNH;;;;;;AAMG;;ACNH;;AAEG;;;;"}
@@ -8,7 +8,7 @@ import { Version } from '@angular/core';
8
8
  * found in the LICENSE file at https://angular.io/license
9
9
  */
10
10
  /** Current version of the CDK Experimental package. */
11
- const VERSION = new Version('14.0.3');
11
+ const VERSION = new Version('14.0.6');
12
12
 
13
13
  /**
14
14
  * @license
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-experimental.mjs","sources":["../../../../../../src/cdk-experimental/version.ts","../../../../../../src/cdk-experimental/public-api.ts","../../../../../../src/cdk-experimental/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the CDK Experimental package. */\nexport const VERSION = new Version('14.0.3');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './version';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;AAMG;AAIH;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;ACXtD;;;;;;AAMG;;ACNH;;;;;;AAMG;;;;"}
1
+ {"version":3,"file":"cdk-experimental.mjs","sources":["../../../../../../src/cdk-experimental/version.ts","../../../../../../src/cdk-experimental/public-api.ts","../../../../../../src/cdk-experimental/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the CDK Experimental package. */\nexport const VERSION = new Version('14.0.6');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './version';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;AAMG;AAIH;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;ACXtD;;;;;;AAMG;;ACNH;;;;;;AAMG;;;;"}
@@ -249,7 +249,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImpor
249
249
  type: Injectable
250
250
  }] });
251
251
  /**
252
- * The optimially performing resize strategy for &lt;table&gt; elements with table-layout: fixed.
252
+ * The optimally performing resize strategy for &lt;table&gt; elements with table-layout: fixed.
253
253
  * Tested against and outperformed:
254
254
  * CSS selector
255
255
  * CSS selector w/ CSS variable
@@ -1 +1 @@
1
- {"version":3,"file":"column-resize.mjs","sources":["../../../../../../src/cdk-experimental/column-resize/selectors.ts","../../../../../../src/cdk-experimental/column-resize/column-resize.ts","../../../../../../src/cdk-experimental/column-resize/column-resize-notifier.ts","../../../../../../src/cdk-experimental/column-resize/event-dispatcher.ts","../../../../../../src/cdk-experimental/column-resize/resize-strategy.ts","../../../../../../src/cdk-experimental/column-resize/column-resize-directives/constants.ts","../../../../../../src/cdk-experimental/column-resize/column-resize-directives/column-resize.ts","../../../../../../src/cdk-experimental/column-resize/column-resize-directives/column-resize-flex.ts","../../../../../../src/cdk-experimental/column-resize/column-resize-directives/default-enabled-column-resize.ts","../../../../../../src/cdk-experimental/column-resize/column-resize-directives/default-enabled-column-resize-flex.ts","../../../../../../src/cdk-experimental/column-resize/column-resize-module.ts","../../../../../../src/cdk-experimental/column-resize/column-size-store.ts","../../../../../../src/cdk-experimental/column-resize/resize-ref.ts","../../../../../../src/cdk-experimental/column-resize/resizable.ts","../../../../../../src/cdk-experimental/column-resize/overlay-handle.ts","../../../../../../src/cdk-experimental/column-resize/public-api.ts","../../../../../../src/cdk-experimental/column-resize/index.ts","../../../../../../src/cdk-experimental/column-resize/column-resize_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// TODO: Figure out how to remove `mat-` classes from the CDK part of the\n// column resize implementation.\n\nexport const HEADER_CELL_SELECTOR = '.cdk-header-cell, .mat-header-cell';\n\nexport const HEADER_ROW_SELECTOR = '.cdk-header-row, .mat-header-row';\n\nexport const RESIZE_OVERLAY_SELECTOR = '.mat-column-resize-overlay-thumb';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterViewInit, Directive, ElementRef, NgZone, OnDestroy} from '@angular/core';\nimport {fromEvent, merge, Subject} from 'rxjs';\nimport {filter, map, mapTo, pairwise, startWith, take, takeUntil} from 'rxjs/operators';\n\nimport {_closest} from '@angular/cdk-experimental/popover-edit';\n\nimport {ColumnResizeNotifier, ColumnResizeNotifierSource} from './column-resize-notifier';\nimport {HEADER_CELL_SELECTOR, RESIZE_OVERLAY_SELECTOR} from './selectors';\nimport {HeaderRowEventDispatcher} from './event-dispatcher';\n\nconst HOVER_OR_ACTIVE_CLASS = 'cdk-column-resize-hover-or-active';\nconst WITH_RESIZED_COLUMN_CLASS = 'cdk-column-resize-with-resized-column';\n\nlet nextId = 0;\n\n/**\n * Base class for ColumnResize directives which attach to mat-table elements to\n * provide common events and services for column resizing.\n */\n@Directive()\nexport abstract class ColumnResize implements AfterViewInit, OnDestroy {\n protected readonly destroyed = new Subject<void>();\n\n /* Publicly accessible interface for triggering and being notified of resizes. */\n abstract readonly columnResizeNotifier: ColumnResizeNotifier;\n\n /* ElementRef that this directive is attached to. Exposed For use by column-level directives */\n abstract readonly elementRef: ElementRef<HTMLElement>;\n\n protected abstract readonly eventDispatcher: HeaderRowEventDispatcher;\n protected abstract readonly ngZone: NgZone;\n protected abstract readonly notifier: ColumnResizeNotifierSource;\n\n /** Unique ID for this table instance. */\n protected readonly selectorId = `${++nextId}`;\n\n /** The id attribute of the table, if specified. */\n id?: string;\n\n ngAfterViewInit() {\n this.elementRef.nativeElement!.classList.add(this.getUniqueCssClass());\n\n this._listenForRowHoverEvents();\n this._listenForResizeActivity();\n this._listenForHoverActivity();\n }\n\n ngOnDestroy() {\n this.destroyed.next();\n this.destroyed.complete();\n }\n\n /** Gets the unique CSS class name for this table instance. */\n getUniqueCssClass() {\n return `cdk-column-resize-${this.selectorId}`;\n }\n\n /** Called when a column in the table is resized. Applies a css class to the table element. */\n setResized() {\n this.elementRef.nativeElement!.classList.add(WITH_RESIZED_COLUMN_CLASS);\n }\n\n private _listenForRowHoverEvents() {\n this.ngZone.runOutsideAngular(() => {\n const element = this.elementRef.nativeElement!;\n\n fromEvent<MouseEvent>(element, 'mouseover')\n .pipe(\n map(event => _closest(event.target, HEADER_CELL_SELECTOR)),\n takeUntil(this.destroyed),\n )\n .subscribe(this.eventDispatcher.headerCellHovered);\n fromEvent<MouseEvent>(element, 'mouseleave')\n .pipe(\n filter(\n event =>\n !!event.relatedTarget &&\n !(event.relatedTarget as Element).matches(RESIZE_OVERLAY_SELECTOR),\n ),\n mapTo(null),\n takeUntil(this.destroyed),\n )\n .subscribe(this.eventDispatcher.headerCellHovered);\n });\n }\n\n private _listenForResizeActivity() {\n merge(\n this.eventDispatcher.overlayHandleActiveForCell.pipe(mapTo(undefined)),\n this.notifier.triggerResize.pipe(mapTo(undefined)),\n this.notifier.resizeCompleted.pipe(mapTo(undefined)),\n )\n .pipe(take(1), takeUntil(this.destroyed))\n .subscribe(() => {\n this.setResized();\n });\n }\n\n private _listenForHoverActivity() {\n this.eventDispatcher.headerRowHoveredOrActiveDistinct\n .pipe(startWith(null), pairwise(), takeUntil(this.destroyed))\n .subscribe(([previousRow, hoveredRow]) => {\n if (hoveredRow) {\n hoveredRow.classList.add(HOVER_OR_ACTIVE_CLASS);\n }\n if (previousRow) {\n previousRow.classList.remove(HOVER_OR_ACTIVE_CLASS);\n }\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\n/** Indicates the width of a column. */\nexport interface ColumnSize {\n /** The ID/name of the column, as defined in CdkColumnDef. */\n readonly columnId: string;\n\n /** The width in pixels of the column. */\n readonly size: number;\n\n /** The width in pixels of the column prior to this update, if known. */\n readonly previousSize?: number;\n}\n\n/** Interface describing column size changes. */\nexport interface ColumnSizeAction extends ColumnSize {\n /**\n * Whether the resize action should be applied instantaneously. False for events triggered during\n * a UI-triggered resize (such as with the mouse) until the mouse button is released. True\n * for all programmatically triggered resizes.\n */\n readonly completeImmediately?: boolean;\n\n /**\n * Whether the resize action is being applied to a sticky/stickyEnd column.\n */\n readonly isStickyColumn?: boolean;\n}\n\n/**\n * Originating source of column resize events within a table.\n * @docs-private\n */\n@Injectable()\nexport class ColumnResizeNotifierSource {\n /** Emits when an in-progress resize is canceled. */\n readonly resizeCanceled = new Subject<ColumnSizeAction>();\n\n /** Emits when a resize is applied. */\n readonly resizeCompleted = new Subject<ColumnSize>();\n\n /** Triggers a resize action. */\n readonly triggerResize = new Subject<ColumnSizeAction>();\n}\n\n/** Service for triggering column resizes imperatively or being notified of them. */\n@Injectable()\nexport class ColumnResizeNotifier {\n /** Emits whenever a column is resized. */\n readonly resizeCompleted: Observable<ColumnSize> = this._source.resizeCompleted;\n\n constructor(private readonly _source: ColumnResizeNotifierSource) {}\n\n /** Instantly resizes the specified column. */\n resize(columnId: string, size: number): void {\n this._source.triggerResize.next({\n columnId,\n size,\n completeImmediately: true,\n isStickyColumn: true,\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, NgZone} from '@angular/core';\nimport {combineLatest, MonoTypeOperatorFunction, Observable, Subject} from 'rxjs';\nimport {distinctUntilChanged, map, share, skip, startWith} from 'rxjs/operators';\n\nimport {_closest} from '@angular/cdk-experimental/popover-edit';\n\nimport {HEADER_ROW_SELECTOR} from './selectors';\n\n/** Coordinates events between the column resize directives. */\n@Injectable()\nexport class HeaderRowEventDispatcher {\n /**\n * Emits the currently hovered header cell or null when no header cells are hovered.\n * Exposed publicly for events to feed in, but subscribers should use headerCellHoveredDistinct,\n * defined below.\n */\n readonly headerCellHovered = new Subject<Element | null>();\n\n /**\n * Emits the header cell for which a user-triggered resize is active or null\n * when no resize is in progress.\n */\n readonly overlayHandleActiveForCell = new Subject<Element | null>();\n\n constructor(private readonly _ngZone: NgZone) {}\n\n /** Distinct and shared version of headerCellHovered. */\n readonly headerCellHoveredDistinct = this.headerCellHovered.pipe(distinctUntilChanged(), share());\n\n /**\n * Emits the header that is currently hovered or hosting an active resize event (with active\n * taking precedence).\n */\n readonly headerRowHoveredOrActiveDistinct = combineLatest([\n this.headerCellHoveredDistinct.pipe(\n map(cell => _closest(cell, HEADER_ROW_SELECTOR)),\n startWith(null),\n distinctUntilChanged(),\n ),\n this.overlayHandleActiveForCell.pipe(\n map(cell => _closest(cell, HEADER_ROW_SELECTOR)),\n startWith(null),\n distinctUntilChanged(),\n ),\n ]).pipe(\n skip(1), // Ignore initial [null, null] emission.\n map(([hovered, active]) => active || hovered),\n distinctUntilChanged(),\n share(),\n );\n\n private readonly _headerRowHoveredOrActiveDistinctReenterZone =\n this.headerRowHoveredOrActiveDistinct.pipe(this._enterZone(), share());\n\n // Optimization: Share row events observable with subsequent callers.\n // At startup, calls will be sequential by row (and typically there's only one).\n private _lastSeenRow: Element | null = null;\n private _lastSeenRowHover: Observable<boolean> | null = null;\n\n /**\n * Emits whether the specified row should show its overlay controls.\n * Emission occurs within the NgZone.\n */\n resizeOverlayVisibleForHeaderRow(row: Element): Observable<boolean> {\n if (row !== this._lastSeenRow) {\n this._lastSeenRow = row;\n this._lastSeenRowHover = this._headerRowHoveredOrActiveDistinctReenterZone.pipe(\n map(hoveredRow => hoveredRow === row),\n distinctUntilChanged(),\n share(),\n );\n }\n\n return this._lastSeenRowHover!;\n }\n\n private _enterZone<T>(): MonoTypeOperatorFunction<T> {\n return (source: Observable<T>) =>\n new Observable<T>(observer =>\n source.subscribe({\n next: value => this._ngZone.run(() => observer.next(value)),\n error: err => observer.error(err),\n complete: () => observer.complete(),\n }),\n );\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, Injectable, OnDestroy, Provider} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {coerceCssPixelValue} from '@angular/cdk/coercion';\nimport {CdkTable, _CoalescedStyleScheduler, _COALESCED_STYLE_SCHEDULER} from '@angular/cdk/table';\n\nimport {ColumnResize} from './column-resize';\n\n/**\n * Provides an implementation for resizing a column.\n * The details of how resizing works for tables for flex mat-tables are quite different.\n */\n@Injectable()\nexport abstract class ResizeStrategy {\n protected abstract readonly columnResize: ColumnResize;\n protected abstract readonly styleScheduler: _CoalescedStyleScheduler;\n protected abstract readonly table: CdkTable<unknown>;\n\n private _pendingResizeDelta: number | null = null;\n\n /** Updates the width of the specified column. */\n abstract applyColumnSize(\n cssFriendlyColumnName: string,\n columnHeader: HTMLElement,\n sizeInPx: number,\n previousSizeInPx?: number,\n ): void;\n\n /** Applies a minimum width to the specified column, updating its current width as needed. */\n abstract applyMinColumnSize(\n cssFriendlyColumnName: string,\n columnHeader: HTMLElement,\n minSizeInPx: number,\n ): void;\n\n /** Applies a maximum width to the specified column, updating its current width as needed. */\n abstract applyMaxColumnSize(\n cssFriendlyColumnName: string,\n columnHeader: HTMLElement,\n minSizeInPx: number,\n ): void;\n\n /** Adjusts the width of the table element by the specified delta. */\n protected updateTableWidthAndStickyColumns(delta: number): void {\n if (this._pendingResizeDelta === null) {\n const tableElement = this.columnResize.elementRef.nativeElement;\n const tableWidth = getElementWidth(tableElement);\n\n this.styleScheduler.schedule(() => {\n tableElement.style.width = coerceCssPixelValue(tableWidth + this._pendingResizeDelta!);\n\n this._pendingResizeDelta = null;\n });\n\n this.styleScheduler.scheduleEnd(() => {\n this.table.updateStickyColumnStyles();\n });\n }\n\n this._pendingResizeDelta = (this._pendingResizeDelta ?? 0) + delta;\n }\n}\n\n/**\n * The optimially performing resize strategy for &lt;table&gt; elements with table-layout: fixed.\n * Tested against and outperformed:\n * CSS selector\n * CSS selector w/ CSS variable\n * Updating all cell nodes\n */\n@Injectable()\nexport class TableLayoutFixedResizeStrategy extends ResizeStrategy {\n constructor(\n protected readonly columnResize: ColumnResize,\n @Inject(_COALESCED_STYLE_SCHEDULER)\n protected readonly styleScheduler: _CoalescedStyleScheduler,\n protected readonly table: CdkTable<unknown>,\n ) {\n super();\n }\n\n applyColumnSize(\n _: string,\n columnHeader: HTMLElement,\n sizeInPx: number,\n previousSizeInPx?: number,\n ): void {\n const delta = sizeInPx - (previousSizeInPx ?? getElementWidth(columnHeader));\n\n if (delta === 0) {\n return;\n }\n\n this.styleScheduler.schedule(() => {\n columnHeader.style.width = coerceCssPixelValue(sizeInPx);\n });\n\n this.updateTableWidthAndStickyColumns(delta);\n }\n\n applyMinColumnSize(_: string, columnHeader: HTMLElement, sizeInPx: number): void {\n const currentWidth = getElementWidth(columnHeader);\n const newWidth = Math.max(currentWidth, sizeInPx);\n\n this.applyColumnSize(_, columnHeader, newWidth, currentWidth);\n }\n\n applyMaxColumnSize(_: string, columnHeader: HTMLElement, sizeInPx: number): void {\n const currentWidth = getElementWidth(columnHeader);\n const newWidth = Math.min(currentWidth, sizeInPx);\n\n this.applyColumnSize(_, columnHeader, newWidth, currentWidth);\n }\n}\n\n/**\n * The optimally performing resize strategy for flex mat-tables.\n * Tested against and outperformed:\n * CSS selector w/ CSS variable\n * Updating all mat-cell nodes\n */\n@Injectable()\nexport class CdkFlexTableResizeStrategy extends ResizeStrategy implements OnDestroy {\n private readonly _document: Document;\n private readonly _columnIndexes = new Map<string, number>();\n private readonly _columnProperties = new Map<string, Map<string, string>>();\n\n private _styleElement?: HTMLStyleElement;\n private _indexSequence = 0;\n\n protected readonly defaultMinSize = 0;\n protected readonly defaultMaxSize = Number.MAX_SAFE_INTEGER;\n\n constructor(\n protected readonly columnResize: ColumnResize,\n @Inject(_COALESCED_STYLE_SCHEDULER)\n protected readonly styleScheduler: _CoalescedStyleScheduler,\n protected readonly table: CdkTable<unknown>,\n @Inject(DOCUMENT) document: any,\n ) {\n super();\n this._document = document;\n }\n\n applyColumnSize(\n cssFriendlyColumnName: string,\n columnHeader: HTMLElement,\n sizeInPx: number,\n previousSizeInPx?: number,\n ): void {\n // Optimization: Check applied width first as we probably set it already before reading\n // offsetWidth which triggers layout.\n const delta =\n sizeInPx -\n (previousSizeInPx ??\n (this._getAppliedWidth(cssFriendlyColumnName) || columnHeader.offsetWidth));\n\n if (delta === 0) {\n return;\n }\n\n const cssSize = coerceCssPixelValue(sizeInPx);\n\n this._applyProperty(cssFriendlyColumnName, 'flex', `0 0.01 ${cssSize}`);\n this.updateTableWidthAndStickyColumns(delta);\n }\n\n applyMinColumnSize(cssFriendlyColumnName: string, _: HTMLElement, sizeInPx: number): void {\n const cssSize = coerceCssPixelValue(sizeInPx);\n\n this._applyProperty(\n cssFriendlyColumnName,\n 'min-width',\n cssSize,\n sizeInPx !== this.defaultMinSize,\n );\n this.updateTableWidthAndStickyColumns(0);\n }\n\n applyMaxColumnSize(cssFriendlyColumnName: string, _: HTMLElement, sizeInPx: number): void {\n const cssSize = coerceCssPixelValue(sizeInPx);\n\n this._applyProperty(\n cssFriendlyColumnName,\n 'max-width',\n cssSize,\n sizeInPx !== this.defaultMaxSize,\n );\n this.updateTableWidthAndStickyColumns(0);\n }\n\n protected getColumnCssClass(cssFriendlyColumnName: string): string {\n return `cdk-column-${cssFriendlyColumnName}`;\n }\n\n ngOnDestroy(): void {\n this._styleElement?.remove();\n this._styleElement = undefined;\n }\n\n private _getPropertyValue(cssFriendlyColumnName: string, key: string): string | undefined {\n const properties = this._getColumnPropertiesMap(cssFriendlyColumnName);\n return properties.get(key);\n }\n\n private _getAppliedWidth(cssFriendslyColumnName: string): number {\n return coercePixelsFromFlexValue(this._getPropertyValue(cssFriendslyColumnName, 'flex'));\n }\n\n private _applyProperty(\n cssFriendlyColumnName: string,\n key: string,\n value: string,\n enable = true,\n ): void {\n const properties = this._getColumnPropertiesMap(cssFriendlyColumnName);\n\n this.styleScheduler.schedule(() => {\n if (enable) {\n properties.set(key, value);\n } else {\n properties.delete(key);\n }\n this._applySizeCss(cssFriendlyColumnName);\n });\n }\n\n private _getStyleSheet(): CSSStyleSheet {\n if (!this._styleElement) {\n this._styleElement = this._document.createElement('style');\n this._styleElement.appendChild(this._document.createTextNode(''));\n this._document.head.appendChild(this._styleElement);\n }\n\n return this._styleElement.sheet as CSSStyleSheet;\n }\n\n private _getColumnPropertiesMap(cssFriendlyColumnName: string): Map<string, string> {\n let properties = this._columnProperties.get(cssFriendlyColumnName);\n if (properties === undefined) {\n properties = new Map<string, string>();\n this._columnProperties.set(cssFriendlyColumnName, properties);\n }\n return properties;\n }\n\n private _applySizeCss(cssFriendlyColumnName: string) {\n const properties = this._getColumnPropertiesMap(cssFriendlyColumnName);\n const propertyKeys = Array.from(properties.keys());\n\n let index = this._columnIndexes.get(cssFriendlyColumnName);\n if (index === undefined) {\n if (!propertyKeys.length) {\n // Nothing to set or unset.\n return;\n }\n\n index = this._indexSequence++;\n this._columnIndexes.set(cssFriendlyColumnName, index);\n } else {\n this._getStyleSheet().deleteRule(index);\n }\n\n const columnClassName = this.getColumnCssClass(cssFriendlyColumnName);\n const tableClassName = this.columnResize.getUniqueCssClass();\n\n const selector = `.${tableClassName} .${columnClassName}`;\n const body = propertyKeys.map(key => `${key}:${properties.get(key)}`).join(';');\n\n this._getStyleSheet().insertRule(`${selector} {${body}}`, index!);\n }\n}\n\n/** Converts CSS pixel values to numbers, eg \"123px\" to 123. Returns NaN for non pixel values. */\nfunction coercePixelsFromCssValue(cssValue: string): number {\n return Number(cssValue.match(/(\\d+)px/)?.[1]);\n}\n\n/** Gets the style.width pixels on the specified element if present, otherwise its offsetWidth. */\nfunction getElementWidth(element: HTMLElement) {\n // Optimization: Check style.width first as we probably set it already before reading\n // offsetWidth which triggers layout.\n return coercePixelsFromCssValue(element.style.width) || element.offsetWidth;\n}\n\n/**\n * Converts CSS flex values as set in CdkFlexTableResizeStrategy to numbers,\n * eg \"0 0.01 123px\" to 123.\n */\nfunction coercePixelsFromFlexValue(flexValue: string | undefined): number {\n return Number(flexValue?.match(/0 0\\.01 (\\d+)px/)?.[1]);\n}\n\nexport const TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER: Provider = {\n provide: ResizeStrategy,\n useClass: TableLayoutFixedResizeStrategy,\n};\nexport const FLEX_RESIZE_STRATEGY_PROVIDER: Provider = {\n provide: ResizeStrategy,\n useClass: CdkFlexTableResizeStrategy,\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Provider} from '@angular/core';\nimport {ColumnResizeNotifier, ColumnResizeNotifierSource} from '../column-resize-notifier';\nimport {HeaderRowEventDispatcher} from '../event-dispatcher';\nimport {\n TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER,\n FLEX_RESIZE_STRATEGY_PROVIDER,\n} from '../resize-strategy';\n\nconst PROVIDERS: Provider[] = [\n ColumnResizeNotifier,\n HeaderRowEventDispatcher,\n ColumnResizeNotifierSource,\n];\n\nexport const TABLE_PROVIDERS: Provider[] = [\n ...PROVIDERS,\n TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER,\n];\nexport const FLEX_PROVIDERS: Provider[] = [...PROVIDERS, FLEX_RESIZE_STRATEGY_PROVIDER];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, NgZone} from '@angular/core';\nimport {CdkTable} from '@angular/cdk/table';\n\nimport {ColumnResize} from '../column-resize';\nimport {ColumnResizeNotifier, ColumnResizeNotifierSource} from '../column-resize-notifier';\nimport {HeaderRowEventDispatcher} from '../event-dispatcher';\nimport {TABLE_PROVIDERS} from './constants';\n\n/**\n * Explicitly enables column resizing for a table-based cdk-table.\n * Individual columns must be annotated specifically.\n */\n@Directive({\n selector: 'table[cdk-table][columnResize]',\n providers: [...TABLE_PROVIDERS, {provide: ColumnResize, useExisting: CdkColumnResize}],\n})\nexport class CdkColumnResize extends ColumnResize {\n constructor(\n readonly columnResizeNotifier: ColumnResizeNotifier,\n readonly elementRef: ElementRef<HTMLElement>,\n protected readonly eventDispatcher: HeaderRowEventDispatcher,\n protected readonly ngZone: NgZone,\n protected readonly notifier: ColumnResizeNotifierSource,\n protected readonly table: CdkTable<unknown>,\n ) {\n super();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, NgZone} from '@angular/core';\nimport {CdkTable} from '@angular/cdk/table';\n\nimport {ColumnResize} from '../column-resize';\nimport {ColumnResizeNotifier, ColumnResizeNotifierSource} from '../column-resize-notifier';\nimport {HeaderRowEventDispatcher} from '../event-dispatcher';\nimport {FLEX_PROVIDERS} from './constants';\n\n/**\n * Explicitly enables column resizing for a flexbox-based cdk-table.\n * Individual columns must be annotated specifically.\n */\n@Directive({\n selector: 'cdk-table[columnResize]',\n providers: [...FLEX_PROVIDERS, {provide: ColumnResize, useExisting: CdkColumnResizeFlex}],\n})\nexport class CdkColumnResizeFlex extends ColumnResize {\n constructor(\n readonly columnResizeNotifier: ColumnResizeNotifier,\n readonly elementRef: ElementRef<HTMLElement>,\n protected readonly eventDispatcher: HeaderRowEventDispatcher,\n protected readonly ngZone: NgZone,\n protected readonly notifier: ColumnResizeNotifierSource,\n protected readonly table: CdkTable<unknown>,\n ) {\n super();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, NgZone} from '@angular/core';\nimport {CdkTable} from '@angular/cdk/table';\n\nimport {ColumnResize} from '../column-resize';\nimport {ColumnResizeNotifier, ColumnResizeNotifierSource} from '../column-resize-notifier';\nimport {HeaderRowEventDispatcher} from '../event-dispatcher';\nimport {TABLE_PROVIDERS} from './constants';\n\n/**\n * Implicitly enables column resizing for a table-based cdk-table.\n * Individual columns will be resizable unless opted out.\n */\n@Directive({\n selector: 'table[cdk-table]',\n providers: [\n ...TABLE_PROVIDERS,\n {provide: ColumnResize, useExisting: CdkDefaultEnabledColumnResize},\n ],\n})\nexport class CdkDefaultEnabledColumnResize extends ColumnResize {\n constructor(\n readonly columnResizeNotifier: ColumnResizeNotifier,\n readonly elementRef: ElementRef<HTMLElement>,\n protected readonly eventDispatcher: HeaderRowEventDispatcher,\n protected readonly ngZone: NgZone,\n protected readonly notifier: ColumnResizeNotifierSource,\n protected readonly table: CdkTable<unknown>,\n ) {\n super();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, NgZone} from '@angular/core';\nimport {CdkTable} from '@angular/cdk/table';\n\nimport {ColumnResize} from '../column-resize';\nimport {ColumnResizeNotifier, ColumnResizeNotifierSource} from '../column-resize-notifier';\nimport {HeaderRowEventDispatcher} from '../event-dispatcher';\nimport {FLEX_PROVIDERS} from './constants';\n\n/**\n * Implicitly enables column resizing for a flex cdk-table.\n * Individual columns will be resizable unless opted out.\n */\n@Directive({\n selector: 'cdk-table',\n providers: [\n ...FLEX_PROVIDERS,\n {provide: ColumnResize, useExisting: CdkDefaultEnabledColumnResizeFlex},\n ],\n})\nexport class CdkDefaultEnabledColumnResizeFlex extends ColumnResize {\n constructor(\n readonly columnResizeNotifier: ColumnResizeNotifier,\n readonly elementRef: ElementRef<HTMLElement>,\n protected readonly eventDispatcher: HeaderRowEventDispatcher,\n protected readonly ngZone: NgZone,\n protected readonly notifier: ColumnResizeNotifierSource,\n protected readonly table: CdkTable<unknown>,\n ) {\n super();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\n\nimport {CdkColumnResize} from './column-resize-directives/column-resize';\nimport {CdkColumnResizeFlex} from './column-resize-directives/column-resize-flex';\nimport {CdkDefaultEnabledColumnResize} from './column-resize-directives/default-enabled-column-resize';\nimport {CdkDefaultEnabledColumnResizeFlex} from './column-resize-directives/default-enabled-column-resize-flex';\n\n/**\n * One of two NgModules for use with CdkColumnResize.\n * When using this module, columns are resizable by default.\n */\n@NgModule({\n declarations: [CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex],\n exports: [CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex],\n})\nexport class CdkColumnResizeDefaultEnabledModule {}\n\n/**\n * One of two NgModules for use with CdkColumnResize.\n * When using this module, columns are not resizable by default.\n */\n@NgModule({\n declarations: [CdkColumnResize, CdkColumnResizeFlex],\n exports: [CdkColumnResize, CdkColumnResizeFlex],\n})\nexport class CdkColumnResizeModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\n\n/**\n * Can be provided by the host application to enable persistence of column resize state.\n */\n@Injectable()\nexport abstract class ColumnSizeStore {\n /** Returns the persisted size of the specified column in the specified table. */\n abstract getSize(tableId: string, columnId: string): number;\n\n /** Persists the size of the specified column in the specified table. */\n abstract setSize(tableId: string, columnId: string): void;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ElementRef} from '@angular/core';\nimport {OverlayRef} from '@angular/cdk/overlay';\n\n/** Tracks state of resize events in progress. */\nexport class ResizeRef {\n constructor(\n readonly origin: ElementRef,\n readonly overlayRef: OverlayRef,\n readonly minWidthPx: number,\n readonly maxWidthPx: number,\n ) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n AfterViewInit,\n Directive,\n ElementRef,\n Injector,\n NgZone,\n OnDestroy,\n Type,\n ViewContainerRef,\n ChangeDetectorRef,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {ComponentPortal} from '@angular/cdk/portal';\nimport {Overlay, OverlayRef} from '@angular/cdk/overlay';\nimport {CdkColumnDef, _CoalescedStyleScheduler} from '@angular/cdk/table';\nimport {merge, Subject} from 'rxjs';\nimport {filter, takeUntil} from 'rxjs/operators';\n\nimport {_closest} from '@angular/cdk-experimental/popover-edit';\n\nimport {HEADER_ROW_SELECTOR} from './selectors';\nimport {ResizeOverlayHandle} from './overlay-handle';\nimport {ColumnResize} from './column-resize';\nimport {ColumnSizeAction, ColumnResizeNotifierSource} from './column-resize-notifier';\nimport {HeaderRowEventDispatcher} from './event-dispatcher';\nimport {ResizeRef} from './resize-ref';\nimport {ResizeStrategy} from './resize-strategy';\n\nconst OVERLAY_ACTIVE_CLASS = 'cdk-resizable-overlay-thumb-active';\n\n/**\n * Base class for Resizable directives which are applied to column headers to make those columns\n * resizable.\n */\n@Directive()\nexport abstract class Resizable<HandleComponent extends ResizeOverlayHandle>\n implements AfterViewInit, OnDestroy\n{\n protected minWidthPxInternal: number = 0;\n protected maxWidthPxInternal: number = Number.MAX_SAFE_INTEGER;\n\n protected inlineHandle?: HTMLElement;\n protected overlayRef?: OverlayRef;\n protected readonly destroyed = new Subject<void>();\n\n protected abstract readonly columnDef: CdkColumnDef;\n protected abstract readonly columnResize: ColumnResize;\n protected abstract readonly directionality: Directionality;\n protected abstract readonly document: Document;\n protected abstract readonly elementRef: ElementRef;\n protected abstract readonly eventDispatcher: HeaderRowEventDispatcher;\n protected abstract readonly injector: Injector;\n protected abstract readonly ngZone: NgZone;\n protected abstract readonly overlay: Overlay;\n protected abstract readonly resizeNotifier: ColumnResizeNotifierSource;\n protected abstract readonly resizeStrategy: ResizeStrategy;\n protected abstract readonly styleScheduler: _CoalescedStyleScheduler;\n protected abstract readonly viewContainerRef: ViewContainerRef;\n protected abstract readonly changeDetectorRef: ChangeDetectorRef;\n\n private _viewInitialized = false;\n private _isDestroyed = false;\n\n /** The minimum width to allow the column to be sized to. */\n get minWidthPx(): number {\n return this.minWidthPxInternal;\n }\n set minWidthPx(value: number) {\n this.minWidthPxInternal = value;\n\n this.columnResize.setResized();\n if (this.elementRef.nativeElement && this._viewInitialized) {\n this._applyMinWidthPx();\n }\n }\n\n /** The maximum width to allow the column to be sized to. */\n get maxWidthPx(): number {\n return this.maxWidthPxInternal;\n }\n set maxWidthPx(value: number) {\n this.maxWidthPxInternal = value;\n\n this.columnResize.setResized();\n if (this.elementRef.nativeElement && this._viewInitialized) {\n this._applyMaxWidthPx();\n }\n }\n\n ngAfterViewInit() {\n this._listenForRowHoverEvents();\n this._listenForResizeEvents();\n this._appendInlineHandle();\n\n this.styleScheduler.scheduleEnd(() => {\n if (this._isDestroyed) return;\n this._viewInitialized = true;\n this._applyMinWidthPx();\n this._applyMaxWidthPx();\n });\n }\n\n ngOnDestroy(): void {\n this._isDestroyed = true;\n this.destroyed.next();\n this.destroyed.complete();\n this.inlineHandle?.remove();\n this.overlayRef?.dispose();\n }\n\n protected abstract getInlineHandleCssClassName(): string;\n\n protected abstract getOverlayHandleComponentType(): Type<HandleComponent>;\n\n private _createOverlayForHandle(): OverlayRef {\n // Use of overlays allows us to properly capture click events spanning parts\n // of two table cells and is also useful for displaying a resize thumb\n // over both cells and extending it down the table as needed.\n\n const isRtl = this.directionality.value === 'rtl';\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef.nativeElement!)\n .withFlexibleDimensions(false)\n .withGrowAfterOpen(false)\n .withPush(false)\n .withDefaultOffsetX(isRtl ? 1 : 0)\n .withPositions([\n {\n originX: isRtl ? 'start' : 'end',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'top',\n },\n ]);\n\n return this.overlay.create({\n // Always position the overlay based on left-indexed coordinates.\n direction: 'ltr',\n disposeOnNavigation: true,\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n width: '16px',\n });\n }\n\n private _listenForRowHoverEvents(): void {\n const element = this.elementRef.nativeElement!;\n const takeUntilDestroyed = takeUntil<boolean>(this.destroyed);\n\n this.eventDispatcher\n .resizeOverlayVisibleForHeaderRow(_closest(element, HEADER_ROW_SELECTOR)!)\n .pipe(takeUntilDestroyed)\n .subscribe(hoveringRow => {\n if (hoveringRow) {\n if (!this.overlayRef) {\n this.overlayRef = this._createOverlayForHandle();\n }\n\n this._showHandleOverlay();\n } else if (this.overlayRef) {\n // todo - can't detach during an active resize - need to work that out\n this.overlayRef.detach();\n }\n });\n }\n\n private _listenForResizeEvents() {\n const takeUntilDestroyed = takeUntil<ColumnSizeAction>(this.destroyed);\n\n merge(this.resizeNotifier.resizeCanceled, this.resizeNotifier.triggerResize)\n .pipe(\n takeUntilDestroyed,\n filter(columnSize => columnSize.columnId === this.columnDef.name),\n )\n .subscribe(({size, previousSize, completeImmediately}) => {\n this.elementRef.nativeElement!.classList.add(OVERLAY_ACTIVE_CLASS);\n this._applySize(size, previousSize);\n\n if (completeImmediately) {\n this._completeResizeOperation();\n }\n });\n\n merge(this.resizeNotifier.resizeCanceled, this.resizeNotifier.resizeCompleted)\n .pipe(takeUntilDestroyed)\n .subscribe(columnSize => {\n this._cleanUpAfterResize(columnSize);\n });\n }\n\n private _completeResizeOperation(): void {\n this.ngZone.run(() => {\n this.resizeNotifier.resizeCompleted.next({\n columnId: this.columnDef.name,\n size: this.elementRef.nativeElement!.offsetWidth,\n });\n });\n }\n\n private _cleanUpAfterResize(columnSize: ColumnSizeAction): void {\n this.elementRef.nativeElement!.classList.remove(OVERLAY_ACTIVE_CLASS);\n\n if (this.overlayRef && this.overlayRef.hasAttached()) {\n this._updateOverlayHandleHeight();\n this.overlayRef.updatePosition();\n\n if (columnSize.columnId === this.columnDef.name) {\n this.inlineHandle!.focus();\n }\n }\n }\n\n private _createHandlePortal(): ComponentPortal<HandleComponent> {\n const injector = Injector.create({\n parent: this.injector,\n providers: [\n {\n provide: ResizeRef,\n useValue: new ResizeRef(\n this.elementRef,\n this.overlayRef!,\n this.minWidthPx,\n this.maxWidthPx,\n ),\n },\n ],\n });\n\n return new ComponentPortal(\n this.getOverlayHandleComponentType(),\n this.viewContainerRef,\n injector,\n );\n }\n\n private _showHandleOverlay(): void {\n this._updateOverlayHandleHeight();\n this.overlayRef!.attach(this._createHandlePortal());\n\n // Needed to ensure that all of the lifecycle hooks inside the overlay run immediately.\n this.changeDetectorRef.markForCheck();\n }\n\n private _updateOverlayHandleHeight() {\n this.overlayRef!.updateSize({height: this.elementRef.nativeElement!.offsetHeight});\n }\n\n private _applySize(sizeInPixels: number, previousSize?: number): void {\n const sizeToApply = Math.min(Math.max(sizeInPixels, this.minWidthPx, 0), this.maxWidthPx);\n\n this.resizeStrategy.applyColumnSize(\n this.columnDef.cssClassFriendlyName,\n this.elementRef.nativeElement!,\n sizeToApply,\n previousSize,\n );\n }\n\n private _applyMinWidthPx(): void {\n this.resizeStrategy.applyMinColumnSize(\n this.columnDef.cssClassFriendlyName,\n this.elementRef.nativeElement,\n this.minWidthPx,\n );\n }\n\n private _applyMaxWidthPx(): void {\n this.resizeStrategy.applyMaxColumnSize(\n this.columnDef.cssClassFriendlyName,\n this.elementRef.nativeElement,\n this.maxWidthPx,\n );\n }\n\n private _appendInlineHandle(): void {\n this.styleScheduler.schedule(() => {\n this.inlineHandle = this.document.createElement('div');\n this.inlineHandle.tabIndex = 0;\n this.inlineHandle.className = this.getInlineHandleCssClassName();\n\n // TODO: Apply correct aria role (probably slider) after a11y spec questions resolved.\n\n this.elementRef.nativeElement!.appendChild(this.inlineHandle);\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterViewInit, Directive, ElementRef, OnDestroy, NgZone} from '@angular/core';\nimport {coerceCssPixelValue} from '@angular/cdk/coercion';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {ESCAPE} from '@angular/cdk/keycodes';\nimport {CdkColumnDef, _CoalescedStyleScheduler} from '@angular/cdk/table';\nimport {fromEvent, Subject, merge} from 'rxjs';\nimport {\n distinctUntilChanged,\n filter,\n map,\n mapTo,\n pairwise,\n startWith,\n takeUntil,\n} from 'rxjs/operators';\n\nimport {_closest} from '@angular/cdk-experimental/popover-edit';\n\nimport {HEADER_CELL_SELECTOR} from './selectors';\nimport {ColumnResizeNotifierSource} from './column-resize-notifier';\nimport {HeaderRowEventDispatcher} from './event-dispatcher';\nimport {ResizeRef} from './resize-ref';\n\n// TODO: Take another look at using cdk drag drop. IIRC I ran into a couple\n// good reasons for not using it but I don't remember what they were at this point.\n/**\n * Base class for a component shown over the edge of a resizable column that is responsible\n * for handling column resize mouse events and displaying any visible UI on the column edge.\n */\n@Directive()\nexport abstract class ResizeOverlayHandle implements AfterViewInit, OnDestroy {\n protected readonly destroyed = new Subject<void>();\n\n protected abstract readonly columnDef: CdkColumnDef;\n protected abstract readonly document: Document;\n protected abstract readonly directionality: Directionality;\n protected abstract readonly elementRef: ElementRef;\n protected abstract readonly eventDispatcher: HeaderRowEventDispatcher;\n protected abstract readonly ngZone: NgZone;\n protected abstract readonly resizeNotifier: ColumnResizeNotifierSource;\n protected abstract readonly resizeRef: ResizeRef;\n protected abstract readonly styleScheduler: _CoalescedStyleScheduler;\n\n ngAfterViewInit() {\n this._listenForMouseEvents();\n }\n\n ngOnDestroy() {\n this.destroyed.next();\n this.destroyed.complete();\n }\n\n private _listenForMouseEvents() {\n this.ngZone.runOutsideAngular(() => {\n fromEvent<MouseEvent>(this.elementRef.nativeElement!, 'mouseenter')\n .pipe(mapTo(this.resizeRef.origin.nativeElement!), takeUntil(this.destroyed))\n .subscribe(cell => this.eventDispatcher.headerCellHovered.next(cell));\n\n fromEvent<MouseEvent>(this.elementRef.nativeElement!, 'mouseleave')\n .pipe(\n map(\n event =>\n event.relatedTarget && _closest(event.relatedTarget as Element, HEADER_CELL_SELECTOR),\n ),\n takeUntil(this.destroyed),\n )\n .subscribe(cell => this.eventDispatcher.headerCellHovered.next(cell));\n\n fromEvent<MouseEvent>(this.elementRef.nativeElement!, 'mousedown')\n .pipe(takeUntil(this.destroyed))\n .subscribe(mousedownEvent => {\n this._dragStarted(mousedownEvent);\n });\n });\n }\n\n private _dragStarted(mousedownEvent: MouseEvent) {\n // Only allow dragging using the left mouse button.\n if (mousedownEvent.button !== 0) {\n return;\n }\n\n const mouseup = fromEvent<MouseEvent>(this.document, 'mouseup');\n const mousemove = fromEvent<MouseEvent>(this.document, 'mousemove');\n const escape = fromEvent<KeyboardEvent>(this.document, 'keyup').pipe(\n filter(event => event.keyCode === ESCAPE),\n );\n\n const startX = mousedownEvent.screenX;\n\n const initialSize = this._getOriginWidth();\n let overlayOffset = 0;\n let originOffset = this._getOriginOffset();\n let size = initialSize;\n let overshot = 0;\n\n this.updateResizeActive(true);\n\n mouseup.pipe(takeUntil(merge(escape, this.destroyed))).subscribe(({screenX}) => {\n this.styleScheduler.scheduleEnd(() => {\n this._notifyResizeEnded(size, screenX !== startX);\n });\n });\n\n escape.pipe(takeUntil(merge(mouseup, this.destroyed))).subscribe(() => {\n this._notifyResizeEnded(initialSize);\n });\n\n mousemove\n .pipe(\n map(({screenX}) => screenX),\n startWith(startX),\n distinctUntilChanged(),\n pairwise(),\n takeUntil(merge(mouseup, escape, this.destroyed)),\n )\n .subscribe(([prevX, currX]) => {\n let deltaX = currX - prevX;\n\n // If the mouse moved further than the resize was able to match, limit the\n // movement of the overlay to match the actual size and position of the origin.\n if (overshot !== 0) {\n if ((overshot < 0 && deltaX < 0) || (overshot > 0 && deltaX > 0)) {\n overshot += deltaX;\n return;\n } else {\n const remainingOvershot = overshot + deltaX;\n overshot =\n overshot > 0 ? Math.max(remainingOvershot, 0) : Math.min(remainingOvershot, 0);\n deltaX = remainingOvershot - overshot;\n\n if (deltaX === 0) {\n return;\n }\n }\n }\n\n let computedNewSize: number = size + (this._isLtr() ? deltaX : -deltaX);\n computedNewSize = Math.min(\n Math.max(computedNewSize, this.resizeRef.minWidthPx, 0),\n this.resizeRef.maxWidthPx,\n );\n\n this.resizeNotifier.triggerResize.next({\n columnId: this.columnDef.name,\n size: computedNewSize,\n previousSize: size,\n isStickyColumn: this.columnDef.sticky || this.columnDef.stickyEnd,\n });\n\n this.styleScheduler.scheduleEnd(() => {\n const originNewSize = this._getOriginWidth();\n const originNewOffset = this._getOriginOffset();\n const originOffsetDeltaX = originNewOffset - originOffset;\n const originSizeDeltaX = originNewSize - size;\n size = originNewSize;\n originOffset = originNewOffset;\n\n overshot += deltaX + (this._isLtr() ? -originSizeDeltaX : originSizeDeltaX);\n overlayOffset += originOffsetDeltaX + (this._isLtr() ? originSizeDeltaX : 0);\n\n this._updateOverlayOffset(overlayOffset);\n });\n });\n }\n\n protected updateResizeActive(active: boolean): void {\n this.eventDispatcher.overlayHandleActiveForCell.next(\n active ? this.resizeRef.origin.nativeElement! : null,\n );\n }\n\n private _getOriginWidth(): number {\n return this.resizeRef.origin.nativeElement!.offsetWidth;\n }\n\n private _getOriginOffset(): number {\n return this.resizeRef.origin.nativeElement!.offsetLeft;\n }\n\n private _updateOverlayOffset(offset: number): void {\n this.resizeRef.overlayRef.overlayElement.style.transform = `translateX(${coerceCssPixelValue(\n offset,\n )})`;\n }\n\n private _isLtr(): boolean {\n return this.directionality.value === 'ltr';\n }\n\n private _notifyResizeEnded(size: number, completedSuccessfully = false): void {\n this.updateResizeActive(false);\n\n this.ngZone.run(() => {\n const sizeMessage = {columnId: this.columnDef.name, size};\n if (completedSuccessfully) {\n this.resizeNotifier.resizeCompleted.next(sizeMessage);\n } else {\n this.resizeNotifier.resizeCanceled.next(sizeMessage);\n }\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './column-resize';\nexport * from './column-resize-directives/column-resize';\nexport * from './column-resize-directives/column-resize-flex';\nexport * from './column-resize-directives/default-enabled-column-resize';\nexport * from './column-resize-directives/default-enabled-column-resize-flex';\nexport * from './column-resize-module';\nexport * from './column-resize-notifier';\nexport * from './column-size-store';\nexport * from './event-dispatcher';\nexport * from './resizable';\nexport * from './resize-ref';\nexport * from './resize-strategy';\nexport * from './overlay-handle';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","i1.ColumnResize","i1.ColumnResizeNotifier","i2.Header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AS,GAAG,CAAc,WAAA,EAAA,mBAAmB,CAC1F,MAAM,CACP,GAAG,CAAC;KACN;IAEO,MAAM,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,KAAK,KAAK,CAAC;KAC5C;AAEO,IAAA,kBAAkB,CAAC,IAAY,EAAE,qBAAqB,GAAG,KAAK,EAAA;AACpE,QAAA,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAE/B,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAK;AACnB,YAAA,MAAM,WAAW,GAAG,EAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAC,CAAC;AAC1D,YAAA,IAAI,qBAAqB,EAAE;gBACzB,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AACvD,aAAA;AAAM,iBAAA;gBACL,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AACtD,aAAA;AACH,SAAC,CAAC,CAAC;KACJ;;gHA3KmB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;oGAAnB,mBAAmB,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBADxC,SAAS;;;ACrCV;;;;;;AAMG;;ACNH;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"column-resize.mjs","sources":["../../../../../../src/cdk-experimental/column-resize/selectors.ts","../../../../../../src/cdk-experimental/column-resize/column-resize.ts","../../../../../../src/cdk-experimental/column-resize/column-resize-notifier.ts","../../../../../../src/cdk-experimental/column-resize/event-dispatcher.ts","../../../../../../src/cdk-experimental/column-resize/resize-strategy.ts","../../../../../../src/cdk-experimental/column-resize/column-resize-directives/constants.ts","../../../../../../src/cdk-experimental/column-resize/column-resize-directives/column-resize.ts","../../../../../../src/cdk-experimental/column-resize/column-resize-directives/column-resize-flex.ts","../../../../../../src/cdk-experimental/column-resize/column-resize-directives/default-enabled-column-resize.ts","../../../../../../src/cdk-experimental/column-resize/column-resize-directives/default-enabled-column-resize-flex.ts","../../../../../../src/cdk-experimental/column-resize/column-resize-module.ts","../../../../../../src/cdk-experimental/column-resize/column-size-store.ts","../../../../../../src/cdk-experimental/column-resize/resize-ref.ts","../../../../../../src/cdk-experimental/column-resize/resizable.ts","../../../../../../src/cdk-experimental/column-resize/overlay-handle.ts","../../../../../../src/cdk-experimental/column-resize/public-api.ts","../../../../../../src/cdk-experimental/column-resize/index.ts","../../../../../../src/cdk-experimental/column-resize/column-resize_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// TODO: Figure out how to remove `mat-` classes from the CDK part of the\n// column resize implementation.\n\nexport const HEADER_CELL_SELECTOR = '.cdk-header-cell, .mat-header-cell';\n\nexport const HEADER_ROW_SELECTOR = '.cdk-header-row, .mat-header-row';\n\nexport const RESIZE_OVERLAY_SELECTOR = '.mat-column-resize-overlay-thumb';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterViewInit, Directive, ElementRef, NgZone, OnDestroy} from '@angular/core';\nimport {fromEvent, merge, Subject} from 'rxjs';\nimport {filter, map, mapTo, pairwise, startWith, take, takeUntil} from 'rxjs/operators';\n\nimport {_closest} from '@angular/cdk-experimental/popover-edit';\n\nimport {ColumnResizeNotifier, ColumnResizeNotifierSource} from './column-resize-notifier';\nimport {HEADER_CELL_SELECTOR, RESIZE_OVERLAY_SELECTOR} from './selectors';\nimport {HeaderRowEventDispatcher} from './event-dispatcher';\n\nconst HOVER_OR_ACTIVE_CLASS = 'cdk-column-resize-hover-or-active';\nconst WITH_RESIZED_COLUMN_CLASS = 'cdk-column-resize-with-resized-column';\n\nlet nextId = 0;\n\n/**\n * Base class for ColumnResize directives which attach to mat-table elements to\n * provide common events and services for column resizing.\n */\n@Directive()\nexport abstract class ColumnResize implements AfterViewInit, OnDestroy {\n protected readonly destroyed = new Subject<void>();\n\n /* Publicly accessible interface for triggering and being notified of resizes. */\n abstract readonly columnResizeNotifier: ColumnResizeNotifier;\n\n /* ElementRef that this directive is attached to. Exposed For use by column-level directives */\n abstract readonly elementRef: ElementRef<HTMLElement>;\n\n protected abstract readonly eventDispatcher: HeaderRowEventDispatcher;\n protected abstract readonly ngZone: NgZone;\n protected abstract readonly notifier: ColumnResizeNotifierSource;\n\n /** Unique ID for this table instance. */\n protected readonly selectorId = `${++nextId}`;\n\n /** The id attribute of the table, if specified. */\n id?: string;\n\n ngAfterViewInit() {\n this.elementRef.nativeElement!.classList.add(this.getUniqueCssClass());\n\n this._listenForRowHoverEvents();\n this._listenForResizeActivity();\n this._listenForHoverActivity();\n }\n\n ngOnDestroy() {\n this.destroyed.next();\n this.destroyed.complete();\n }\n\n /** Gets the unique CSS class name for this table instance. */\n getUniqueCssClass() {\n return `cdk-column-resize-${this.selectorId}`;\n }\n\n /** Called when a column in the table is resized. Applies a css class to the table element. */\n setResized() {\n this.elementRef.nativeElement!.classList.add(WITH_RESIZED_COLUMN_CLASS);\n }\n\n private _listenForRowHoverEvents() {\n this.ngZone.runOutsideAngular(() => {\n const element = this.elementRef.nativeElement!;\n\n fromEvent<MouseEvent>(element, 'mouseover')\n .pipe(\n map(event => _closest(event.target, HEADER_CELL_SELECTOR)),\n takeUntil(this.destroyed),\n )\n .subscribe(this.eventDispatcher.headerCellHovered);\n fromEvent<MouseEvent>(element, 'mouseleave')\n .pipe(\n filter(\n event =>\n !!event.relatedTarget &&\n !(event.relatedTarget as Element).matches(RESIZE_OVERLAY_SELECTOR),\n ),\n mapTo(null),\n takeUntil(this.destroyed),\n )\n .subscribe(this.eventDispatcher.headerCellHovered);\n });\n }\n\n private _listenForResizeActivity() {\n merge(\n this.eventDispatcher.overlayHandleActiveForCell.pipe(mapTo(undefined)),\n this.notifier.triggerResize.pipe(mapTo(undefined)),\n this.notifier.resizeCompleted.pipe(mapTo(undefined)),\n )\n .pipe(take(1), takeUntil(this.destroyed))\n .subscribe(() => {\n this.setResized();\n });\n }\n\n private _listenForHoverActivity() {\n this.eventDispatcher.headerRowHoveredOrActiveDistinct\n .pipe(startWith(null), pairwise(), takeUntil(this.destroyed))\n .subscribe(([previousRow, hoveredRow]) => {\n if (hoveredRow) {\n hoveredRow.classList.add(HOVER_OR_ACTIVE_CLASS);\n }\n if (previousRow) {\n previousRow.classList.remove(HOVER_OR_ACTIVE_CLASS);\n }\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\n/** Indicates the width of a column. */\nexport interface ColumnSize {\n /** The ID/name of the column, as defined in CdkColumnDef. */\n readonly columnId: string;\n\n /** The width in pixels of the column. */\n readonly size: number;\n\n /** The width in pixels of the column prior to this update, if known. */\n readonly previousSize?: number;\n}\n\n/** Interface describing column size changes. */\nexport interface ColumnSizeAction extends ColumnSize {\n /**\n * Whether the resize action should be applied instantaneously. False for events triggered during\n * a UI-triggered resize (such as with the mouse) until the mouse button is released. True\n * for all programmatically triggered resizes.\n */\n readonly completeImmediately?: boolean;\n\n /**\n * Whether the resize action is being applied to a sticky/stickyEnd column.\n */\n readonly isStickyColumn?: boolean;\n}\n\n/**\n * Originating source of column resize events within a table.\n * @docs-private\n */\n@Injectable()\nexport class ColumnResizeNotifierSource {\n /** Emits when an in-progress resize is canceled. */\n readonly resizeCanceled = new Subject<ColumnSizeAction>();\n\n /** Emits when a resize is applied. */\n readonly resizeCompleted = new Subject<ColumnSize>();\n\n /** Triggers a resize action. */\n readonly triggerResize = new Subject<ColumnSizeAction>();\n}\n\n/** Service for triggering column resizes imperatively or being notified of them. */\n@Injectable()\nexport class ColumnResizeNotifier {\n /** Emits whenever a column is resized. */\n readonly resizeCompleted: Observable<ColumnSize> = this._source.resizeCompleted;\n\n constructor(private readonly _source: ColumnResizeNotifierSource) {}\n\n /** Instantly resizes the specified column. */\n resize(columnId: string, size: number): void {\n this._source.triggerResize.next({\n columnId,\n size,\n completeImmediately: true,\n isStickyColumn: true,\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, NgZone} from '@angular/core';\nimport {combineLatest, MonoTypeOperatorFunction, Observable, Subject} from 'rxjs';\nimport {distinctUntilChanged, map, share, skip, startWith} from 'rxjs/operators';\n\nimport {_closest} from '@angular/cdk-experimental/popover-edit';\n\nimport {HEADER_ROW_SELECTOR} from './selectors';\n\n/** Coordinates events between the column resize directives. */\n@Injectable()\nexport class HeaderRowEventDispatcher {\n /**\n * Emits the currently hovered header cell or null when no header cells are hovered.\n * Exposed publicly for events to feed in, but subscribers should use headerCellHoveredDistinct,\n * defined below.\n */\n readonly headerCellHovered = new Subject<Element | null>();\n\n /**\n * Emits the header cell for which a user-triggered resize is active or null\n * when no resize is in progress.\n */\n readonly overlayHandleActiveForCell = new Subject<Element | null>();\n\n constructor(private readonly _ngZone: NgZone) {}\n\n /** Distinct and shared version of headerCellHovered. */\n readonly headerCellHoveredDistinct = this.headerCellHovered.pipe(distinctUntilChanged(), share());\n\n /**\n * Emits the header that is currently hovered or hosting an active resize event (with active\n * taking precedence).\n */\n readonly headerRowHoveredOrActiveDistinct = combineLatest([\n this.headerCellHoveredDistinct.pipe(\n map(cell => _closest(cell, HEADER_ROW_SELECTOR)),\n startWith(null),\n distinctUntilChanged(),\n ),\n this.overlayHandleActiveForCell.pipe(\n map(cell => _closest(cell, HEADER_ROW_SELECTOR)),\n startWith(null),\n distinctUntilChanged(),\n ),\n ]).pipe(\n skip(1), // Ignore initial [null, null] emission.\n map(([hovered, active]) => active || hovered),\n distinctUntilChanged(),\n share(),\n );\n\n private readonly _headerRowHoveredOrActiveDistinctReenterZone =\n this.headerRowHoveredOrActiveDistinct.pipe(this._enterZone(), share());\n\n // Optimization: Share row events observable with subsequent callers.\n // At startup, calls will be sequential by row (and typically there's only one).\n private _lastSeenRow: Element | null = null;\n private _lastSeenRowHover: Observable<boolean> | null = null;\n\n /**\n * Emits whether the specified row should show its overlay controls.\n * Emission occurs within the NgZone.\n */\n resizeOverlayVisibleForHeaderRow(row: Element): Observable<boolean> {\n if (row !== this._lastSeenRow) {\n this._lastSeenRow = row;\n this._lastSeenRowHover = this._headerRowHoveredOrActiveDistinctReenterZone.pipe(\n map(hoveredRow => hoveredRow === row),\n distinctUntilChanged(),\n share(),\n );\n }\n\n return this._lastSeenRowHover!;\n }\n\n private _enterZone<T>(): MonoTypeOperatorFunction<T> {\n return (source: Observable<T>) =>\n new Observable<T>(observer =>\n source.subscribe({\n next: value => this._ngZone.run(() => observer.next(value)),\n error: err => observer.error(err),\n complete: () => observer.complete(),\n }),\n );\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, Injectable, OnDestroy, Provider} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {coerceCssPixelValue} from '@angular/cdk/coercion';\nimport {CdkTable, _CoalescedStyleScheduler, _COALESCED_STYLE_SCHEDULER} from '@angular/cdk/table';\n\nimport {ColumnResize} from './column-resize';\n\n/**\n * Provides an implementation for resizing a column.\n * The details of how resizing works for tables for flex mat-tables are quite different.\n */\n@Injectable()\nexport abstract class ResizeStrategy {\n protected abstract readonly columnResize: ColumnResize;\n protected abstract readonly styleScheduler: _CoalescedStyleScheduler;\n protected abstract readonly table: CdkTable<unknown>;\n\n private _pendingResizeDelta: number | null = null;\n\n /** Updates the width of the specified column. */\n abstract applyColumnSize(\n cssFriendlyColumnName: string,\n columnHeader: HTMLElement,\n sizeInPx: number,\n previousSizeInPx?: number,\n ): void;\n\n /** Applies a minimum width to the specified column, updating its current width as needed. */\n abstract applyMinColumnSize(\n cssFriendlyColumnName: string,\n columnHeader: HTMLElement,\n minSizeInPx: number,\n ): void;\n\n /** Applies a maximum width to the specified column, updating its current width as needed. */\n abstract applyMaxColumnSize(\n cssFriendlyColumnName: string,\n columnHeader: HTMLElement,\n minSizeInPx: number,\n ): void;\n\n /** Adjusts the width of the table element by the specified delta. */\n protected updateTableWidthAndStickyColumns(delta: number): void {\n if (this._pendingResizeDelta === null) {\n const tableElement = this.columnResize.elementRef.nativeElement;\n const tableWidth = getElementWidth(tableElement);\n\n this.styleScheduler.schedule(() => {\n tableElement.style.width = coerceCssPixelValue(tableWidth + this._pendingResizeDelta!);\n\n this._pendingResizeDelta = null;\n });\n\n this.styleScheduler.scheduleEnd(() => {\n this.table.updateStickyColumnStyles();\n });\n }\n\n this._pendingResizeDelta = (this._pendingResizeDelta ?? 0) + delta;\n }\n}\n\n/**\n * The optimally performing resize strategy for &lt;table&gt; elements with table-layout: fixed.\n * Tested against and outperformed:\n * CSS selector\n * CSS selector w/ CSS variable\n * Updating all cell nodes\n */\n@Injectable()\nexport class TableLayoutFixedResizeStrategy extends ResizeStrategy {\n constructor(\n protected readonly columnResize: ColumnResize,\n @Inject(_COALESCED_STYLE_SCHEDULER)\n protected readonly styleScheduler: _CoalescedStyleScheduler,\n protected readonly table: CdkTable<unknown>,\n ) {\n super();\n }\n\n applyColumnSize(\n _: string,\n columnHeader: HTMLElement,\n sizeInPx: number,\n previousSizeInPx?: number,\n ): void {\n const delta = sizeInPx - (previousSizeInPx ?? getElementWidth(columnHeader));\n\n if (delta === 0) {\n return;\n }\n\n this.styleScheduler.schedule(() => {\n columnHeader.style.width = coerceCssPixelValue(sizeInPx);\n });\n\n this.updateTableWidthAndStickyColumns(delta);\n }\n\n applyMinColumnSize(_: string, columnHeader: HTMLElement, sizeInPx: number): void {\n const currentWidth = getElementWidth(columnHeader);\n const newWidth = Math.max(currentWidth, sizeInPx);\n\n this.applyColumnSize(_, columnHeader, newWidth, currentWidth);\n }\n\n applyMaxColumnSize(_: string, columnHeader: HTMLElement, sizeInPx: number): void {\n const currentWidth = getElementWidth(columnHeader);\n const newWidth = Math.min(currentWidth, sizeInPx);\n\n this.applyColumnSize(_, columnHeader, newWidth, currentWidth);\n }\n}\n\n/**\n * The optimally performing resize strategy for flex mat-tables.\n * Tested against and outperformed:\n * CSS selector w/ CSS variable\n * Updating all mat-cell nodes\n */\n@Injectable()\nexport class CdkFlexTableResizeStrategy extends ResizeStrategy implements OnDestroy {\n private readonly _document: Document;\n private readonly _columnIndexes = new Map<string, number>();\n private readonly _columnProperties = new Map<string, Map<string, string>>();\n\n private _styleElement?: HTMLStyleElement;\n private _indexSequence = 0;\n\n protected readonly defaultMinSize = 0;\n protected readonly defaultMaxSize = Number.MAX_SAFE_INTEGER;\n\n constructor(\n protected readonly columnResize: ColumnResize,\n @Inject(_COALESCED_STYLE_SCHEDULER)\n protected readonly styleScheduler: _CoalescedStyleScheduler,\n protected readonly table: CdkTable<unknown>,\n @Inject(DOCUMENT) document: any,\n ) {\n super();\n this._document = document;\n }\n\n applyColumnSize(\n cssFriendlyColumnName: string,\n columnHeader: HTMLElement,\n sizeInPx: number,\n previousSizeInPx?: number,\n ): void {\n // Optimization: Check applied width first as we probably set it already before reading\n // offsetWidth which triggers layout.\n const delta =\n sizeInPx -\n (previousSizeInPx ??\n (this._getAppliedWidth(cssFriendlyColumnName) || columnHeader.offsetWidth));\n\n if (delta === 0) {\n return;\n }\n\n const cssSize = coerceCssPixelValue(sizeInPx);\n\n this._applyProperty(cssFriendlyColumnName, 'flex', `0 0.01 ${cssSize}`);\n this.updateTableWidthAndStickyColumns(delta);\n }\n\n applyMinColumnSize(cssFriendlyColumnName: string, _: HTMLElement, sizeInPx: number): void {\n const cssSize = coerceCssPixelValue(sizeInPx);\n\n this._applyProperty(\n cssFriendlyColumnName,\n 'min-width',\n cssSize,\n sizeInPx !== this.defaultMinSize,\n );\n this.updateTableWidthAndStickyColumns(0);\n }\n\n applyMaxColumnSize(cssFriendlyColumnName: string, _: HTMLElement, sizeInPx: number): void {\n const cssSize = coerceCssPixelValue(sizeInPx);\n\n this._applyProperty(\n cssFriendlyColumnName,\n 'max-width',\n cssSize,\n sizeInPx !== this.defaultMaxSize,\n );\n this.updateTableWidthAndStickyColumns(0);\n }\n\n protected getColumnCssClass(cssFriendlyColumnName: string): string {\n return `cdk-column-${cssFriendlyColumnName}`;\n }\n\n ngOnDestroy(): void {\n this._styleElement?.remove();\n this._styleElement = undefined;\n }\n\n private _getPropertyValue(cssFriendlyColumnName: string, key: string): string | undefined {\n const properties = this._getColumnPropertiesMap(cssFriendlyColumnName);\n return properties.get(key);\n }\n\n private _getAppliedWidth(cssFriendslyColumnName: string): number {\n return coercePixelsFromFlexValue(this._getPropertyValue(cssFriendslyColumnName, 'flex'));\n }\n\n private _applyProperty(\n cssFriendlyColumnName: string,\n key: string,\n value: string,\n enable = true,\n ): void {\n const properties = this._getColumnPropertiesMap(cssFriendlyColumnName);\n\n this.styleScheduler.schedule(() => {\n if (enable) {\n properties.set(key, value);\n } else {\n properties.delete(key);\n }\n this._applySizeCss(cssFriendlyColumnName);\n });\n }\n\n private _getStyleSheet(): CSSStyleSheet {\n if (!this._styleElement) {\n this._styleElement = this._document.createElement('style');\n this._styleElement.appendChild(this._document.createTextNode(''));\n this._document.head.appendChild(this._styleElement);\n }\n\n return this._styleElement.sheet as CSSStyleSheet;\n }\n\n private _getColumnPropertiesMap(cssFriendlyColumnName: string): Map<string, string> {\n let properties = this._columnProperties.get(cssFriendlyColumnName);\n if (properties === undefined) {\n properties = new Map<string, string>();\n this._columnProperties.set(cssFriendlyColumnName, properties);\n }\n return properties;\n }\n\n private _applySizeCss(cssFriendlyColumnName: string) {\n const properties = this._getColumnPropertiesMap(cssFriendlyColumnName);\n const propertyKeys = Array.from(properties.keys());\n\n let index = this._columnIndexes.get(cssFriendlyColumnName);\n if (index === undefined) {\n if (!propertyKeys.length) {\n // Nothing to set or unset.\n return;\n }\n\n index = this._indexSequence++;\n this._columnIndexes.set(cssFriendlyColumnName, index);\n } else {\n this._getStyleSheet().deleteRule(index);\n }\n\n const columnClassName = this.getColumnCssClass(cssFriendlyColumnName);\n const tableClassName = this.columnResize.getUniqueCssClass();\n\n const selector = `.${tableClassName} .${columnClassName}`;\n const body = propertyKeys.map(key => `${key}:${properties.get(key)}`).join(';');\n\n this._getStyleSheet().insertRule(`${selector} {${body}}`, index!);\n }\n}\n\n/** Converts CSS pixel values to numbers, eg \"123px\" to 123. Returns NaN for non pixel values. */\nfunction coercePixelsFromCssValue(cssValue: string): number {\n return Number(cssValue.match(/(\\d+)px/)?.[1]);\n}\n\n/** Gets the style.width pixels on the specified element if present, otherwise its offsetWidth. */\nfunction getElementWidth(element: HTMLElement) {\n // Optimization: Check style.width first as we probably set it already before reading\n // offsetWidth which triggers layout.\n return coercePixelsFromCssValue(element.style.width) || element.offsetWidth;\n}\n\n/**\n * Converts CSS flex values as set in CdkFlexTableResizeStrategy to numbers,\n * eg \"0 0.01 123px\" to 123.\n */\nfunction coercePixelsFromFlexValue(flexValue: string | undefined): number {\n return Number(flexValue?.match(/0 0\\.01 (\\d+)px/)?.[1]);\n}\n\nexport const TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER: Provider = {\n provide: ResizeStrategy,\n useClass: TableLayoutFixedResizeStrategy,\n};\nexport const FLEX_RESIZE_STRATEGY_PROVIDER: Provider = {\n provide: ResizeStrategy,\n useClass: CdkFlexTableResizeStrategy,\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Provider} from '@angular/core';\nimport {ColumnResizeNotifier, ColumnResizeNotifierSource} from '../column-resize-notifier';\nimport {HeaderRowEventDispatcher} from '../event-dispatcher';\nimport {\n TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER,\n FLEX_RESIZE_STRATEGY_PROVIDER,\n} from '../resize-strategy';\n\nconst PROVIDERS: Provider[] = [\n ColumnResizeNotifier,\n HeaderRowEventDispatcher,\n ColumnResizeNotifierSource,\n];\n\nexport const TABLE_PROVIDERS: Provider[] = [\n ...PROVIDERS,\n TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER,\n];\nexport const FLEX_PROVIDERS: Provider[] = [...PROVIDERS, FLEX_RESIZE_STRATEGY_PROVIDER];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, NgZone} from '@angular/core';\nimport {CdkTable} from '@angular/cdk/table';\n\nimport {ColumnResize} from '../column-resize';\nimport {ColumnResizeNotifier, ColumnResizeNotifierSource} from '../column-resize-notifier';\nimport {HeaderRowEventDispatcher} from '../event-dispatcher';\nimport {TABLE_PROVIDERS} from './constants';\n\n/**\n * Explicitly enables column resizing for a table-based cdk-table.\n * Individual columns must be annotated specifically.\n */\n@Directive({\n selector: 'table[cdk-table][columnResize]',\n providers: [...TABLE_PROVIDERS, {provide: ColumnResize, useExisting: CdkColumnResize}],\n})\nexport class CdkColumnResize extends ColumnResize {\n constructor(\n readonly columnResizeNotifier: ColumnResizeNotifier,\n readonly elementRef: ElementRef<HTMLElement>,\n protected readonly eventDispatcher: HeaderRowEventDispatcher,\n protected readonly ngZone: NgZone,\n protected readonly notifier: ColumnResizeNotifierSource,\n protected readonly table: CdkTable<unknown>,\n ) {\n super();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, NgZone} from '@angular/core';\nimport {CdkTable} from '@angular/cdk/table';\n\nimport {ColumnResize} from '../column-resize';\nimport {ColumnResizeNotifier, ColumnResizeNotifierSource} from '../column-resize-notifier';\nimport {HeaderRowEventDispatcher} from '../event-dispatcher';\nimport {FLEX_PROVIDERS} from './constants';\n\n/**\n * Explicitly enables column resizing for a flexbox-based cdk-table.\n * Individual columns must be annotated specifically.\n */\n@Directive({\n selector: 'cdk-table[columnResize]',\n providers: [...FLEX_PROVIDERS, {provide: ColumnResize, useExisting: CdkColumnResizeFlex}],\n})\nexport class CdkColumnResizeFlex extends ColumnResize {\n constructor(\n readonly columnResizeNotifier: ColumnResizeNotifier,\n readonly elementRef: ElementRef<HTMLElement>,\n protected readonly eventDispatcher: HeaderRowEventDispatcher,\n protected readonly ngZone: NgZone,\n protected readonly notifier: ColumnResizeNotifierSource,\n protected readonly table: CdkTable<unknown>,\n ) {\n super();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, NgZone} from '@angular/core';\nimport {CdkTable} from '@angular/cdk/table';\n\nimport {ColumnResize} from '../column-resize';\nimport {ColumnResizeNotifier, ColumnResizeNotifierSource} from '../column-resize-notifier';\nimport {HeaderRowEventDispatcher} from '../event-dispatcher';\nimport {TABLE_PROVIDERS} from './constants';\n\n/**\n * Implicitly enables column resizing for a table-based cdk-table.\n * Individual columns will be resizable unless opted out.\n */\n@Directive({\n selector: 'table[cdk-table]',\n providers: [\n ...TABLE_PROVIDERS,\n {provide: ColumnResize, useExisting: CdkDefaultEnabledColumnResize},\n ],\n})\nexport class CdkDefaultEnabledColumnResize extends ColumnResize {\n constructor(\n readonly columnResizeNotifier: ColumnResizeNotifier,\n readonly elementRef: ElementRef<HTMLElement>,\n protected readonly eventDispatcher: HeaderRowEventDispatcher,\n protected readonly ngZone: NgZone,\n protected readonly notifier: ColumnResizeNotifierSource,\n protected readonly table: CdkTable<unknown>,\n ) {\n super();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, NgZone} from '@angular/core';\nimport {CdkTable} from '@angular/cdk/table';\n\nimport {ColumnResize} from '../column-resize';\nimport {ColumnResizeNotifier, ColumnResizeNotifierSource} from '../column-resize-notifier';\nimport {HeaderRowEventDispatcher} from '../event-dispatcher';\nimport {FLEX_PROVIDERS} from './constants';\n\n/**\n * Implicitly enables column resizing for a flex cdk-table.\n * Individual columns will be resizable unless opted out.\n */\n@Directive({\n selector: 'cdk-table',\n providers: [\n ...FLEX_PROVIDERS,\n {provide: ColumnResize, useExisting: CdkDefaultEnabledColumnResizeFlex},\n ],\n})\nexport class CdkDefaultEnabledColumnResizeFlex extends ColumnResize {\n constructor(\n readonly columnResizeNotifier: ColumnResizeNotifier,\n readonly elementRef: ElementRef<HTMLElement>,\n protected readonly eventDispatcher: HeaderRowEventDispatcher,\n protected readonly ngZone: NgZone,\n protected readonly notifier: ColumnResizeNotifierSource,\n protected readonly table: CdkTable<unknown>,\n ) {\n super();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\n\nimport {CdkColumnResize} from './column-resize-directives/column-resize';\nimport {CdkColumnResizeFlex} from './column-resize-directives/column-resize-flex';\nimport {CdkDefaultEnabledColumnResize} from './column-resize-directives/default-enabled-column-resize';\nimport {CdkDefaultEnabledColumnResizeFlex} from './column-resize-directives/default-enabled-column-resize-flex';\n\n/**\n * One of two NgModules for use with CdkColumnResize.\n * When using this module, columns are resizable by default.\n */\n@NgModule({\n declarations: [CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex],\n exports: [CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex],\n})\nexport class CdkColumnResizeDefaultEnabledModule {}\n\n/**\n * One of two NgModules for use with CdkColumnResize.\n * When using this module, columns are not resizable by default.\n */\n@NgModule({\n declarations: [CdkColumnResize, CdkColumnResizeFlex],\n exports: [CdkColumnResize, CdkColumnResizeFlex],\n})\nexport class CdkColumnResizeModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\n\n/**\n * Can be provided by the host application to enable persistence of column resize state.\n */\n@Injectable()\nexport abstract class ColumnSizeStore {\n /** Returns the persisted size of the specified column in the specified table. */\n abstract getSize(tableId: string, columnId: string): number;\n\n /** Persists the size of the specified column in the specified table. */\n abstract setSize(tableId: string, columnId: string): void;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ElementRef} from '@angular/core';\nimport {OverlayRef} from '@angular/cdk/overlay';\n\n/** Tracks state of resize events in progress. */\nexport class ResizeRef {\n constructor(\n readonly origin: ElementRef,\n readonly overlayRef: OverlayRef,\n readonly minWidthPx: number,\n readonly maxWidthPx: number,\n ) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n AfterViewInit,\n Directive,\n ElementRef,\n Injector,\n NgZone,\n OnDestroy,\n Type,\n ViewContainerRef,\n ChangeDetectorRef,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {ComponentPortal} from '@angular/cdk/portal';\nimport {Overlay, OverlayRef} from '@angular/cdk/overlay';\nimport {CdkColumnDef, _CoalescedStyleScheduler} from '@angular/cdk/table';\nimport {merge, Subject} from 'rxjs';\nimport {filter, takeUntil} from 'rxjs/operators';\n\nimport {_closest} from '@angular/cdk-experimental/popover-edit';\n\nimport {HEADER_ROW_SELECTOR} from './selectors';\nimport {ResizeOverlayHandle} from './overlay-handle';\nimport {ColumnResize} from './column-resize';\nimport {ColumnSizeAction, ColumnResizeNotifierSource} from './column-resize-notifier';\nimport {HeaderRowEventDispatcher} from './event-dispatcher';\nimport {ResizeRef} from './resize-ref';\nimport {ResizeStrategy} from './resize-strategy';\n\nconst OVERLAY_ACTIVE_CLASS = 'cdk-resizable-overlay-thumb-active';\n\n/**\n * Base class for Resizable directives which are applied to column headers to make those columns\n * resizable.\n */\n@Directive()\nexport abstract class Resizable<HandleComponent extends ResizeOverlayHandle>\n implements AfterViewInit, OnDestroy\n{\n protected minWidthPxInternal: number = 0;\n protected maxWidthPxInternal: number = Number.MAX_SAFE_INTEGER;\n\n protected inlineHandle?: HTMLElement;\n protected overlayRef?: OverlayRef;\n protected readonly destroyed = new Subject<void>();\n\n protected abstract readonly columnDef: CdkColumnDef;\n protected abstract readonly columnResize: ColumnResize;\n protected abstract readonly directionality: Directionality;\n protected abstract readonly document: Document;\n protected abstract readonly elementRef: ElementRef;\n protected abstract readonly eventDispatcher: HeaderRowEventDispatcher;\n protected abstract readonly injector: Injector;\n protected abstract readonly ngZone: NgZone;\n protected abstract readonly overlay: Overlay;\n protected abstract readonly resizeNotifier: ColumnResizeNotifierSource;\n protected abstract readonly resizeStrategy: ResizeStrategy;\n protected abstract readonly styleScheduler: _CoalescedStyleScheduler;\n protected abstract readonly viewContainerRef: ViewContainerRef;\n protected abstract readonly changeDetectorRef: ChangeDetectorRef;\n\n private _viewInitialized = false;\n private _isDestroyed = false;\n\n /** The minimum width to allow the column to be sized to. */\n get minWidthPx(): number {\n return this.minWidthPxInternal;\n }\n set minWidthPx(value: number) {\n this.minWidthPxInternal = value;\n\n this.columnResize.setResized();\n if (this.elementRef.nativeElement && this._viewInitialized) {\n this._applyMinWidthPx();\n }\n }\n\n /** The maximum width to allow the column to be sized to. */\n get maxWidthPx(): number {\n return this.maxWidthPxInternal;\n }\n set maxWidthPx(value: number) {\n this.maxWidthPxInternal = value;\n\n this.columnResize.setResized();\n if (this.elementRef.nativeElement && this._viewInitialized) {\n this._applyMaxWidthPx();\n }\n }\n\n ngAfterViewInit() {\n this._listenForRowHoverEvents();\n this._listenForResizeEvents();\n this._appendInlineHandle();\n\n this.styleScheduler.scheduleEnd(() => {\n if (this._isDestroyed) return;\n this._viewInitialized = true;\n this._applyMinWidthPx();\n this._applyMaxWidthPx();\n });\n }\n\n ngOnDestroy(): void {\n this._isDestroyed = true;\n this.destroyed.next();\n this.destroyed.complete();\n this.inlineHandle?.remove();\n this.overlayRef?.dispose();\n }\n\n protected abstract getInlineHandleCssClassName(): string;\n\n protected abstract getOverlayHandleComponentType(): Type<HandleComponent>;\n\n private _createOverlayForHandle(): OverlayRef {\n // Use of overlays allows us to properly capture click events spanning parts\n // of two table cells and is also useful for displaying a resize thumb\n // over both cells and extending it down the table as needed.\n\n const isRtl = this.directionality.value === 'rtl';\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef.nativeElement!)\n .withFlexibleDimensions(false)\n .withGrowAfterOpen(false)\n .withPush(false)\n .withDefaultOffsetX(isRtl ? 1 : 0)\n .withPositions([\n {\n originX: isRtl ? 'start' : 'end',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'top',\n },\n ]);\n\n return this.overlay.create({\n // Always position the overlay based on left-indexed coordinates.\n direction: 'ltr',\n disposeOnNavigation: true,\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n width: '16px',\n });\n }\n\n private _listenForRowHoverEvents(): void {\n const element = this.elementRef.nativeElement!;\n const takeUntilDestroyed = takeUntil<boolean>(this.destroyed);\n\n this.eventDispatcher\n .resizeOverlayVisibleForHeaderRow(_closest(element, HEADER_ROW_SELECTOR)!)\n .pipe(takeUntilDestroyed)\n .subscribe(hoveringRow => {\n if (hoveringRow) {\n if (!this.overlayRef) {\n this.overlayRef = this._createOverlayForHandle();\n }\n\n this._showHandleOverlay();\n } else if (this.overlayRef) {\n // todo - can't detach during an active resize - need to work that out\n this.overlayRef.detach();\n }\n });\n }\n\n private _listenForResizeEvents() {\n const takeUntilDestroyed = takeUntil<ColumnSizeAction>(this.destroyed);\n\n merge(this.resizeNotifier.resizeCanceled, this.resizeNotifier.triggerResize)\n .pipe(\n takeUntilDestroyed,\n filter(columnSize => columnSize.columnId === this.columnDef.name),\n )\n .subscribe(({size, previousSize, completeImmediately}) => {\n this.elementRef.nativeElement!.classList.add(OVERLAY_ACTIVE_CLASS);\n this._applySize(size, previousSize);\n\n if (completeImmediately) {\n this._completeResizeOperation();\n }\n });\n\n merge(this.resizeNotifier.resizeCanceled, this.resizeNotifier.resizeCompleted)\n .pipe(takeUntilDestroyed)\n .subscribe(columnSize => {\n this._cleanUpAfterResize(columnSize);\n });\n }\n\n private _completeResizeOperation(): void {\n this.ngZone.run(() => {\n this.resizeNotifier.resizeCompleted.next({\n columnId: this.columnDef.name,\n size: this.elementRef.nativeElement!.offsetWidth,\n });\n });\n }\n\n private _cleanUpAfterResize(columnSize: ColumnSizeAction): void {\n this.elementRef.nativeElement!.classList.remove(OVERLAY_ACTIVE_CLASS);\n\n if (this.overlayRef && this.overlayRef.hasAttached()) {\n this._updateOverlayHandleHeight();\n this.overlayRef.updatePosition();\n\n if (columnSize.columnId === this.columnDef.name) {\n this.inlineHandle!.focus();\n }\n }\n }\n\n private _createHandlePortal(): ComponentPortal<HandleComponent> {\n const injector = Injector.create({\n parent: this.injector,\n providers: [\n {\n provide: ResizeRef,\n useValue: new ResizeRef(\n this.elementRef,\n this.overlayRef!,\n this.minWidthPx,\n this.maxWidthPx,\n ),\n },\n ],\n });\n\n return new ComponentPortal(\n this.getOverlayHandleComponentType(),\n this.viewContainerRef,\n injector,\n );\n }\n\n private _showHandleOverlay(): void {\n this._updateOverlayHandleHeight();\n this.overlayRef!.attach(this._createHandlePortal());\n\n // Needed to ensure that all of the lifecycle hooks inside the overlay run immediately.\n this.changeDetectorRef.markForCheck();\n }\n\n private _updateOverlayHandleHeight() {\n this.overlayRef!.updateSize({height: this.elementRef.nativeElement!.offsetHeight});\n }\n\n private _applySize(sizeInPixels: number, previousSize?: number): void {\n const sizeToApply = Math.min(Math.max(sizeInPixels, this.minWidthPx, 0), this.maxWidthPx);\n\n this.resizeStrategy.applyColumnSize(\n this.columnDef.cssClassFriendlyName,\n this.elementRef.nativeElement!,\n sizeToApply,\n previousSize,\n );\n }\n\n private _applyMinWidthPx(): void {\n this.resizeStrategy.applyMinColumnSize(\n this.columnDef.cssClassFriendlyName,\n this.elementRef.nativeElement,\n this.minWidthPx,\n );\n }\n\n private _applyMaxWidthPx(): void {\n this.resizeStrategy.applyMaxColumnSize(\n this.columnDef.cssClassFriendlyName,\n this.elementRef.nativeElement,\n this.maxWidthPx,\n );\n }\n\n private _appendInlineHandle(): void {\n this.styleScheduler.schedule(() => {\n this.inlineHandle = this.document.createElement('div');\n this.inlineHandle.tabIndex = 0;\n this.inlineHandle.className = this.getInlineHandleCssClassName();\n\n // TODO: Apply correct aria role (probably slider) after a11y spec questions resolved.\n\n this.elementRef.nativeElement!.appendChild(this.inlineHandle);\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterViewInit, Directive, ElementRef, OnDestroy, NgZone} from '@angular/core';\nimport {coerceCssPixelValue} from '@angular/cdk/coercion';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {ESCAPE} from '@angular/cdk/keycodes';\nimport {CdkColumnDef, _CoalescedStyleScheduler} from '@angular/cdk/table';\nimport {fromEvent, Subject, merge} from 'rxjs';\nimport {\n distinctUntilChanged,\n filter,\n map,\n mapTo,\n pairwise,\n startWith,\n takeUntil,\n} from 'rxjs/operators';\n\nimport {_closest} from '@angular/cdk-experimental/popover-edit';\n\nimport {HEADER_CELL_SELECTOR} from './selectors';\nimport {ColumnResizeNotifierSource} from './column-resize-notifier';\nimport {HeaderRowEventDispatcher} from './event-dispatcher';\nimport {ResizeRef} from './resize-ref';\n\n// TODO: Take another look at using cdk drag drop. IIRC I ran into a couple\n// good reasons for not using it but I don't remember what they were at this point.\n/**\n * Base class for a component shown over the edge of a resizable column that is responsible\n * for handling column resize mouse events and displaying any visible UI on the column edge.\n */\n@Directive()\nexport abstract class ResizeOverlayHandle implements AfterViewInit, OnDestroy {\n protected readonly destroyed = new Subject<void>();\n\n protected abstract readonly columnDef: CdkColumnDef;\n protected abstract readonly document: Document;\n protected abstract readonly directionality: Directionality;\n protected abstract readonly elementRef: ElementRef;\n protected abstract readonly eventDispatcher: HeaderRowEventDispatcher;\n protected abstract readonly ngZone: NgZone;\n protected abstract readonly resizeNotifier: ColumnResizeNotifierSource;\n protected abstract readonly resizeRef: ResizeRef;\n protected abstract readonly styleScheduler: _CoalescedStyleScheduler;\n\n ngAfterViewInit() {\n this._listenForMouseEvents();\n }\n\n ngOnDestroy() {\n this.destroyed.next();\n this.destroyed.complete();\n }\n\n private _listenForMouseEvents() {\n this.ngZone.runOutsideAngular(() => {\n fromEvent<MouseEvent>(this.elementRef.nativeElement!, 'mouseenter')\n .pipe(mapTo(this.resizeRef.origin.nativeElement!), takeUntil(this.destroyed))\n .subscribe(cell => this.eventDispatcher.headerCellHovered.next(cell));\n\n fromEvent<MouseEvent>(this.elementRef.nativeElement!, 'mouseleave')\n .pipe(\n map(\n event =>\n event.relatedTarget && _closest(event.relatedTarget as Element, HEADER_CELL_SELECTOR),\n ),\n takeUntil(this.destroyed),\n )\n .subscribe(cell => this.eventDispatcher.headerCellHovered.next(cell));\n\n fromEvent<MouseEvent>(this.elementRef.nativeElement!, 'mousedown')\n .pipe(takeUntil(this.destroyed))\n .subscribe(mousedownEvent => {\n this._dragStarted(mousedownEvent);\n });\n });\n }\n\n private _dragStarted(mousedownEvent: MouseEvent) {\n // Only allow dragging using the left mouse button.\n if (mousedownEvent.button !== 0) {\n return;\n }\n\n const mouseup = fromEvent<MouseEvent>(this.document, 'mouseup');\n const mousemove = fromEvent<MouseEvent>(this.document, 'mousemove');\n const escape = fromEvent<KeyboardEvent>(this.document, 'keyup').pipe(\n filter(event => event.keyCode === ESCAPE),\n );\n\n const startX = mousedownEvent.screenX;\n\n const initialSize = this._getOriginWidth();\n let overlayOffset = 0;\n let originOffset = this._getOriginOffset();\n let size = initialSize;\n let overshot = 0;\n\n this.updateResizeActive(true);\n\n mouseup.pipe(takeUntil(merge(escape, this.destroyed))).subscribe(({screenX}) => {\n this.styleScheduler.scheduleEnd(() => {\n this._notifyResizeEnded(size, screenX !== startX);\n });\n });\n\n escape.pipe(takeUntil(merge(mouseup, this.destroyed))).subscribe(() => {\n this._notifyResizeEnded(initialSize);\n });\n\n mousemove\n .pipe(\n map(({screenX}) => screenX),\n startWith(startX),\n distinctUntilChanged(),\n pairwise(),\n takeUntil(merge(mouseup, escape, this.destroyed)),\n )\n .subscribe(([prevX, currX]) => {\n let deltaX = currX - prevX;\n\n // If the mouse moved further than the resize was able to match, limit the\n // movement of the overlay to match the actual size and position of the origin.\n if (overshot !== 0) {\n if ((overshot < 0 && deltaX < 0) || (overshot > 0 && deltaX > 0)) {\n overshot += deltaX;\n return;\n } else {\n const remainingOvershot = overshot + deltaX;\n overshot =\n overshot > 0 ? Math.max(remainingOvershot, 0) : Math.min(remainingOvershot, 0);\n deltaX = remainingOvershot - overshot;\n\n if (deltaX === 0) {\n return;\n }\n }\n }\n\n let computedNewSize: number = size + (this._isLtr() ? deltaX : -deltaX);\n computedNewSize = Math.min(\n Math.max(computedNewSize, this.resizeRef.minWidthPx, 0),\n this.resizeRef.maxWidthPx,\n );\n\n this.resizeNotifier.triggerResize.next({\n columnId: this.columnDef.name,\n size: computedNewSize,\n previousSize: size,\n isStickyColumn: this.columnDef.sticky || this.columnDef.stickyEnd,\n });\n\n this.styleScheduler.scheduleEnd(() => {\n const originNewSize = this._getOriginWidth();\n const originNewOffset = this._getOriginOffset();\n const originOffsetDeltaX = originNewOffset - originOffset;\n const originSizeDeltaX = originNewSize - size;\n size = originNewSize;\n originOffset = originNewOffset;\n\n overshot += deltaX + (this._isLtr() ? -originSizeDeltaX : originSizeDeltaX);\n overlayOffset += originOffsetDeltaX + (this._isLtr() ? originSizeDeltaX : 0);\n\n this._updateOverlayOffset(overlayOffset);\n });\n });\n }\n\n protected updateResizeActive(active: boolean): void {\n this.eventDispatcher.overlayHandleActiveForCell.next(\n active ? this.resizeRef.origin.nativeElement! : null,\n );\n }\n\n private _getOriginWidth(): number {\n return this.resizeRef.origin.nativeElement!.offsetWidth;\n }\n\n private _getOriginOffset(): number {\n return this.resizeRef.origin.nativeElement!.offsetLeft;\n }\n\n private _updateOverlayOffset(offset: number): void {\n this.resizeRef.overlayRef.overlayElement.style.transform = `translateX(${coerceCssPixelValue(\n offset,\n )})`;\n }\n\n private _isLtr(): boolean {\n return this.directionality.value === 'ltr';\n }\n\n private _notifyResizeEnded(size: number, completedSuccessfully = false): void {\n this.updateResizeActive(false);\n\n this.ngZone.run(() => {\n const sizeMessage = {columnId: this.columnDef.name, size};\n if (completedSuccessfully) {\n this.resizeNotifier.resizeCompleted.next(sizeMessage);\n } else {\n this.resizeNotifier.resizeCanceled.next(sizeMessage);\n }\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './column-resize';\nexport * from './column-resize-directives/column-resize';\nexport * from './column-resize-directives/column-resize-flex';\nexport * from './column-resize-directives/default-enabled-column-resize';\nexport * from './column-resize-directives/default-enabled-column-resize-flex';\nexport * from './column-resize-module';\nexport * from './column-resize-notifier';\nexport * from './column-size-store';\nexport * from './event-dispatcher';\nexport * from './resizable';\nexport * from './resize-ref';\nexport * from './resize-strategy';\nexport * from './overlay-handle';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","i1.ColumnResize","i1.ColumnResizeNotifier","i2.HeaderRowEventDispatcher","i1.ColumnResizeNotifierSource"],"mappings":";;;;;;;;;;;;AAAA;;;;;;AAMG;AAEH;AACA;AAEO,MAAM,oBAAoB,GAAG,oCAAoC,CAAC;AAElE,MAAM,mBAAmB,GAAG,kCAAkC,CAAC;AAE/D,MAAM,uBAAuB,GAAG,kCAAkC;;ACfzE;;;;;;AAMG;AAYH,MAAM,qBAAqB,GAAG,mCAAmC,CAAC;AAClE,MAAM,yBAAyB,GAAG,uCAAuC,CAAC;AAE1E,IAAI,MAAM,GAAG,CAAC,CAAC;AAEf;;;AAGG;MAEmB,YAAY,CAAA;AADlC,IAAA,WAAA,GAAA;AAEqB,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,OAAO,EAAQ,CAAC;;AAahC,QAAA,IAAA,CAAA,UAAU,GAAG,CAAA,EAAG,EAAE,MAAM,EAAE,CAAC;AA4E/C,KAAA;IAvEC,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,UAAU,CAAC,aAAc,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAEvE,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAChC,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAChC,IAAI,CAAC,uBAAuB,EAAE,CAAC;KAChC;IAED,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;AACtB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;KAC3B;;IAGD,iBAAiB,GAAA;AACf,QAAA,OAAO,CAAqB,kBAAA,EAAA,IAAI,CAAC,UAAU,EAAE,CAAC;KAC/C;;IAGD,UAAU,GAAA;QACR,IAAI,CAAC,UAAU,CAAC,aAAc,CAAC,SAAS,CAAC,GAAG,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