forty-cdk 0.2.0 → 0.3.0
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.
- package/accordion/README.md +122 -0
- package/aspect-ratio/README.md +76 -0
- package/avatar/README.md +100 -0
- package/breadcrumbs/README.md +49 -0
- package/breakpoints/README.md +81 -0
- package/button/README.md +49 -0
- package/calendar/README.md +458 -0
- package/carousel/README.md +358 -0
- package/checkbox/README.md +146 -0
- package/combobox/README.md +535 -0
- package/context-menu/README.md +139 -0
- package/date-field/README.md +184 -0
- package/date-picker/README.md +338 -0
- package/dialog/README.md +388 -0
- package/disclosure/README.md +114 -0
- package/drag-drop/README.md +359 -0
- package/drawer/README.md +560 -0
- package/dropdown-menu/README.md +176 -0
- package/fesm2022/forty-cdk-accordion.mjs +348 -0
- package/fesm2022/forty-cdk-accordion.mjs.map +1 -0
- package/fesm2022/forty-cdk-aspect-ratio.mjs +74 -0
- package/fesm2022/forty-cdk-aspect-ratio.mjs.map +1 -0
- package/fesm2022/forty-cdk-avatar.mjs +308 -0
- package/fesm2022/forty-cdk-avatar.mjs.map +1 -0
- package/fesm2022/forty-cdk-breadcrumbs.mjs +125 -0
- package/fesm2022/forty-cdk-breadcrumbs.mjs.map +1 -0
- package/fesm2022/forty-cdk-breakpoints.mjs +117 -0
- package/fesm2022/forty-cdk-breakpoints.mjs.map +1 -0
- package/fesm2022/forty-cdk-button.mjs +134 -0
- package/fesm2022/forty-cdk-button.mjs.map +1 -0
- package/fesm2022/forty-cdk-calendar.mjs +2034 -0
- package/fesm2022/forty-cdk-calendar.mjs.map +1 -0
- package/fesm2022/forty-cdk-carousel.mjs +968 -0
- package/fesm2022/forty-cdk-carousel.mjs.map +1 -0
- package/fesm2022/forty-cdk-checkbox.mjs +226 -0
- package/fesm2022/forty-cdk-checkbox.mjs.map +1 -0
- package/fesm2022/forty-cdk-combobox.mjs +2596 -0
- package/fesm2022/forty-cdk-combobox.mjs.map +1 -0
- package/fesm2022/forty-cdk-context-menu.mjs +413 -0
- package/fesm2022/forty-cdk-context-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-core.mjs +9022 -0
- package/fesm2022/forty-cdk-core.mjs.map +1 -0
- package/fesm2022/forty-cdk-date-field.mjs +744 -0
- package/fesm2022/forty-cdk-date-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-date-picker.mjs +1011 -0
- package/fesm2022/forty-cdk-date-picker.mjs.map +1 -0
- package/fesm2022/forty-cdk-dialog.mjs +707 -0
- package/fesm2022/forty-cdk-dialog.mjs.map +1 -0
- package/fesm2022/forty-cdk-disclosure.mjs +190 -0
- package/fesm2022/forty-cdk-disclosure.mjs.map +1 -0
- package/fesm2022/forty-cdk-drag-drop.mjs +1180 -0
- package/fesm2022/forty-cdk-drag-drop.mjs.map +1 -0
- package/fesm2022/forty-cdk-drawer.mjs +1641 -0
- package/fesm2022/forty-cdk-drawer.mjs.map +1 -0
- package/fesm2022/forty-cdk-dropdown-menu.mjs +350 -0
- package/fesm2022/forty-cdk-dropdown-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-field.mjs +425 -0
- package/fesm2022/forty-cdk-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-fieldset.mjs +164 -0
- package/fesm2022/forty-cdk-fieldset.mjs.map +1 -0
- package/fesm2022/forty-cdk-file-upload.mjs +221 -0
- package/fesm2022/forty-cdk-file-upload.mjs.map +1 -0
- package/fesm2022/forty-cdk-hover-card.mjs +496 -0
- package/fesm2022/forty-cdk-hover-card.mjs.map +1 -0
- package/fesm2022/forty-cdk-input.mjs +274 -0
- package/fesm2022/forty-cdk-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-internationalized-date.mjs +1 -1
- package/fesm2022/forty-cdk-internationalized-date.mjs.map +1 -1
- package/fesm2022/forty-cdk-listbox.mjs +1279 -0
- package/fesm2022/forty-cdk-listbox.mjs.map +1 -0
- package/fesm2022/forty-cdk-menu.mjs +1439 -0
- package/fesm2022/forty-cdk-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-menubar.mjs +787 -0
- package/fesm2022/forty-cdk-menubar.mjs.map +1 -0
- package/fesm2022/forty-cdk-meter.mjs +211 -0
- package/fesm2022/forty-cdk-meter.mjs.map +1 -0
- package/fesm2022/forty-cdk-navigation-menu.mjs +1145 -0
- package/fesm2022/forty-cdk-navigation-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-number-input.mjs +559 -0
- package/fesm2022/forty-cdk-number-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-otp-input.mjs +527 -0
- package/fesm2022/forty-cdk-otp-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-pagination.mjs +323 -0
- package/fesm2022/forty-cdk-pagination.mjs.map +1 -0
- package/fesm2022/forty-cdk-pane-resizer.mjs +297 -0
- package/fesm2022/forty-cdk-pane-resizer.mjs.map +1 -0
- package/fesm2022/forty-cdk-popover.mjs +698 -0
- package/fesm2022/forty-cdk-popover.mjs.map +1 -0
- package/fesm2022/forty-cdk-progress.mjs +226 -0
- package/fesm2022/forty-cdk-progress.mjs.map +1 -0
- package/fesm2022/forty-cdk-radio-group.mjs +378 -0
- package/fesm2022/forty-cdk-radio-group.mjs.map +1 -0
- package/fesm2022/forty-cdk-scroll-area.mjs +640 -0
- package/fesm2022/forty-cdk-scroll-area.mjs.map +1 -0
- package/fesm2022/forty-cdk-search.mjs +205 -0
- package/fesm2022/forty-cdk-search.mjs.map +1 -0
- package/fesm2022/forty-cdk-select.mjs +1661 -0
- package/fesm2022/forty-cdk-select.mjs.map +1 -0
- package/fesm2022/forty-cdk-separator.mjs +82 -0
- package/fesm2022/forty-cdk-separator.mjs.map +1 -0
- package/fesm2022/forty-cdk-signal-forms.mjs +97 -0
- package/fesm2022/forty-cdk-signal-forms.mjs.map +1 -0
- package/fesm2022/forty-cdk-slider.mjs +803 -0
- package/fesm2022/forty-cdk-slider.mjs.map +1 -0
- package/fesm2022/forty-cdk-stepper.mjs +886 -0
- package/fesm2022/forty-cdk-stepper.mjs.map +1 -0
- package/fesm2022/forty-cdk-switch.mjs +137 -0
- package/fesm2022/forty-cdk-switch.mjs.map +1 -0
- package/fesm2022/forty-cdk-table.mjs +1518 -0
- package/fesm2022/forty-cdk-table.mjs.map +1 -0
- package/fesm2022/forty-cdk-tabs.mjs +400 -0
- package/fesm2022/forty-cdk-tabs.mjs.map +1 -0
- package/fesm2022/forty-cdk-time-field.mjs +593 -0
- package/fesm2022/forty-cdk-time-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-time-picker.mjs +1013 -0
- package/fesm2022/forty-cdk-time-picker.mjs.map +1 -0
- package/fesm2022/forty-cdk-toast.mjs +1153 -0
- package/fesm2022/forty-cdk-toast.mjs.map +1 -0
- package/fesm2022/forty-cdk-toggle.mjs +516 -0
- package/fesm2022/forty-cdk-toggle.mjs.map +1 -0
- package/fesm2022/forty-cdk-toolbar.mjs +374 -0
- package/fesm2022/forty-cdk-toolbar.mjs.map +1 -0
- package/fesm2022/forty-cdk-tooltip.mjs +672 -0
- package/fesm2022/forty-cdk-tooltip.mjs.map +1 -0
- package/fesm2022/forty-cdk-tree.mjs +2007 -0
- package/fesm2022/forty-cdk-tree.mjs.map +1 -0
- package/fesm2022/forty-cdk-virtualization.mjs +1 -1
- package/fesm2022/forty-cdk-virtualization.mjs.map +1 -1
- package/fesm2022/forty-cdk.mjs +0 -43310
- package/fesm2022/forty-cdk.mjs.map +1 -1
- package/field/README.md +97 -0
- package/fieldset/README.md +86 -0
- package/file-upload/README.md +73 -0
- package/hover-card/README.md +171 -0
- package/input/README.md +156 -0
- package/listbox/README.md +424 -0
- package/menu/README.md +181 -0
- package/menubar/README.md +140 -0
- package/meter/README.md +128 -0
- package/navigation-menu/README.md +253 -0
- package/number-input/README.md +171 -0
- package/otp-input/README.md +198 -0
- package/package.json +213 -1
- package/pagination/README.md +61 -0
- package/pane-resizer/README.md +136 -0
- package/popover/README.md +262 -0
- package/progress/README.md +115 -0
- package/radio-group/README.md +129 -0
- package/scroll-area/README.md +184 -0
- package/search/README.md +42 -0
- package/select/README.md +488 -0
- package/separator/README.md +84 -0
- package/signal-forms/README.md +72 -0
- package/slider/README.md +152 -0
- package/stepper/README.md +292 -0
- package/switch/README.md +116 -0
- package/table/README.md +769 -0
- package/tabs/README.md +130 -0
- package/time-field/README.md +157 -0
- package/time-picker/README.md +172 -0
- package/toast/README.md +398 -0
- package/toggle/README.md +224 -0
- package/toolbar/README.md +109 -0
- package/tooltip/README.md +274 -0
- package/tree/README.md +708 -0
- package/types/forty-cdk-accordion.d.ts +242 -0
- package/types/forty-cdk-aspect-ratio.d.ts +59 -0
- package/types/forty-cdk-avatar.d.ts +133 -0
- package/types/forty-cdk-breadcrumbs.d.ts +92 -0
- package/types/forty-cdk-breakpoints.d.ts +141 -0
- package/types/forty-cdk-button.d.ts +80 -0
- package/types/forty-cdk-calendar.d.ts +914 -0
- package/types/forty-cdk-carousel.d.ts +530 -0
- package/types/forty-cdk-checkbox.d.ts +141 -0
- package/types/forty-cdk-combobox.d.ts +1259 -0
- package/types/forty-cdk-context-menu.d.ts +313 -0
- package/types/forty-cdk-core.d.ts +5774 -0
- package/types/forty-cdk-date-field.d.ts +307 -0
- package/types/forty-cdk-date-picker.d.ts +622 -0
- package/types/forty-cdk-dialog.d.ts +546 -0
- package/types/forty-cdk-disclosure.d.ts +127 -0
- package/types/forty-cdk-drag-drop.d.ts +456 -0
- package/types/forty-cdk-drawer.d.ts +871 -0
- package/types/forty-cdk-dropdown-menu.d.ts +242 -0
- package/types/forty-cdk-field.d.ts +236 -0
- package/types/forty-cdk-fieldset.d.ts +119 -0
- package/types/forty-cdk-file-upload.d.ts +124 -0
- package/types/forty-cdk-hover-card.d.ts +320 -0
- package/types/forty-cdk-input.d.ts +169 -0
- package/types/forty-cdk-internationalized-date.d.ts +1 -1
- package/types/forty-cdk-listbox.d.ts +513 -0
- package/types/forty-cdk-menu.d.ts +629 -0
- package/types/forty-cdk-menubar.d.ts +451 -0
- package/types/forty-cdk-meter.d.ts +122 -0
- package/types/forty-cdk-navigation-menu.d.ts +514 -0
- package/types/forty-cdk-number-input.d.ts +319 -0
- package/types/forty-cdk-otp-input.d.ts +248 -0
- package/types/forty-cdk-pagination.d.ts +214 -0
- package/types/forty-cdk-pane-resizer.d.ts +145 -0
- package/types/forty-cdk-popover.d.ts +509 -0
- package/types/forty-cdk-progress.d.ts +143 -0
- package/types/forty-cdk-radio-group.d.ts +222 -0
- package/types/forty-cdk-scroll-area.d.ts +258 -0
- package/types/forty-cdk-search.d.ts +142 -0
- package/types/forty-cdk-select.d.ts +899 -0
- package/types/forty-cdk-separator.d.ts +59 -0
- package/types/forty-cdk-signal-forms.d.ts +58 -0
- package/types/forty-cdk-slider.d.ts +379 -0
- package/types/forty-cdk-stepper.d.ts +650 -0
- package/types/forty-cdk-switch.d.ts +87 -0
- package/types/forty-cdk-table.d.ts +723 -0
- package/types/forty-cdk-tabs.d.ts +235 -0
- package/types/forty-cdk-time-field.d.ts +307 -0
- package/types/forty-cdk-time-picker.d.ts +578 -0
- package/types/forty-cdk-toast.d.ts +598 -0
- package/types/forty-cdk-toggle.d.ts +310 -0
- package/types/forty-cdk-toolbar.d.ts +217 -0
- package/types/forty-cdk-tooltip.d.ts +436 -0
- package/types/forty-cdk-tree.d.ts +688 -0
- package/types/forty-cdk.d.ts +1 -19743
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forty-cdk-virtualization.mjs","sources":["../../../projects/forty-cdk/virtualization/src/after-next-render-cancellable.ts","../../../projects/forty-cdk/virtualization/src/virtualizer.ts","../../../projects/forty-cdk/virtualization/src/infinite-scroll.ts","../../../projects/forty-cdk/virtualization/src/virtual-viewport-context.ts","../../../projects/forty-cdk/virtualization/src/virtual-viewport.ts","../../../projects/forty-cdk/virtualization/src/virtual-for.ts","../../../projects/forty-cdk/virtualization/src/table-virtualized-navigator.ts","../../../projects/forty-cdk/virtualization/src/table-virtualized.ts","../../../projects/forty-cdk/virtualization/src/public-api.ts","../../../projects/forty-cdk/virtualization/src/forty-cdk-virtualization.ts"],"sourcesContent":["import { afterNextRender, DestroyRef, inject } from '@angular/core';\n\n/**\n * `afterNextRender` whose queued callback is cancelled on destroy, guarding the\n * destroy-before-first-render hazard (a directive torn down between construction\n * and the next render would otherwise still run the queued callback). It both\n * `.destroy()`s the render ref from the destroy hook and re-checks a `destroyed`\n * flag before invoking `fn`, covering the async and synchronous teardown orders.\n *\n * A standalone twin of the main entry point's\n * `_internal/after-next-render-cancellable`: a secondary entry point cannot reach\n * the main entry's internals across the package boundary, so the helper is\n * mirrored here. Keep the two in sync; see that file for the full rationale.\n *\n * Must be called from an injection context. SSR-safe: `afterNextRender` never\n * runs on the server, so the callback simply never fires.\n */\nexport function afterNextRenderCancellable(fn: () => void): void {\n const destroyRef = inject(DestroyRef);\n\n let destroyed = false;\n\n const ref = afterNextRender(() => {\n if (destroyed) return;\n fn();\n });\n\n destroyRef.onDestroy(() => {\n destroyed = true;\n ref.destroy();\n });\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n DestroyRef,\n type Signal,\n computed,\n effect,\n inject,\n PLATFORM_ID,\n signal,\n} from '@angular/core';\nimport {\n Virtualizer,\n elementScroll,\n observeElementOffset,\n observeElementRect,\n} from '@tanstack/virtual-core';\nimport type {\n VirtualItem as CoreVirtualItem,\n VirtualizerOptions as CoreVirtualizerOptions,\n} from '@tanstack/virtual-core';\n\nimport { afterNextRenderCancellable } from './after-next-render-cancellable';\n\n/** Default number of items rendered beyond the visible window on each side. */\nconst DEFAULT_OVERSCAN = 5;\n\n/**\n * Configuration for {@link injectVirtualizer}. The consumer owns the data and\n * the DOM; the virtualizer only computes which slice of the data is visible.\n */\nexport interface VirtualizerOptions {\n /** Reactive total number of items in the list. */\n readonly count: Signal<number>;\n /**\n * Estimated size, in CSS pixels, of the item at `index` along the scroll\n * axis (height when vertical, width when horizontal). Used until an item is\n * measured. Should be a stable function reference.\n */\n readonly estimateSize: (index: number) => number;\n /** Reactive reference to the scroll container element (e.g. a `viewChild`). */\n readonly scrollElement: Signal<HTMLElement | null>;\n /** Scroll axis. Defaults to `'vertical'`. */\n readonly orientation?: 'vertical' | 'horizontal';\n /**\n * Number of items to render beyond the visible window on each side, to\n * reduce blank flashes while scrolling. Defaults to `5`.\n */\n readonly overscan?: number;\n /** Stable key for the item at `index`. Defaults to the index itself. */\n readonly getItemKey?: (index: number) => string | number;\n}\n\n/** A single item in the currently rendered window. */\nexport interface VirtualItem {\n /** Index of the item in the full list. */\n readonly index: number;\n /** Stable key (from `getItemKey`, or the index). */\n readonly key: string | number;\n /** Offset of the item from the start of the scroll container, in pixels. */\n readonly start: number;\n /** Size of the item along the scroll axis, in pixels. */\n readonly size: number;\n}\n\n/** Reactive handle returned by {@link injectVirtualizer}. */\nexport interface ForVirtualizer {\n /** The items in the currently visible window plus overscan. */\n readonly virtualItems: Signal<readonly VirtualItem[]>;\n /** Total scroll size of all items, in pixels (drives the spacer element). */\n readonly totalSize: Signal<number>;\n /**\n * The inclusive-exclusive `[firstIndex, lastIndex + 1)` index window currently\n * rendered (visible window plus overscan), or `[0, 0]` when nothing is rendered.\n * Plugs straight into a list primitive's `[visibleRange]`-style input (e.g.\n * `[forCombobox][visibleRange]`) so windowing composes without the consumer\n * re-deriving the range from {@link ForVirtualizer.virtualItems}.\n */\n readonly range: Signal<readonly [number, number]>;\n /** Scroll the container so the item at `index` is in view. */\n scrollToIndex(index: number, options?: { align?: 'start' | 'center' | 'end' | 'auto' }): void;\n /** Scroll the container to an absolute pixel offset. */\n scrollToOffset(offset: number): void;\n /** Record the measured size of a rendered item element (dynamic sizes). */\n measureElement(element: HTMLElement): void;\n}\n\n/**\n * Sum of the estimated size of every item: `count` × the estimate when it's\n * uniform, else the per-index estimator summed. Used as the SSR / pre-mount\n * total before the core has measured any item, and shared with the ergonomic\n * viewport layer so the estimate-total math lives in one place.\n */\nexport function estimateTotal(count: number, estimateSize: (index: number) => number): number {\n let total = 0;\n for (let index = 0; index < count; index++) {\n total += estimateSize(index);\n }\n return total;\n}\n\nfunction toVirtualItem(item: CoreVirtualItem): VirtualItem {\n return {\n index: item.index,\n key: item.key as string | number,\n start: item.start,\n size: item.size,\n };\n}\n\n/**\n * Headless windowing core: given a reactive item count, a size estimator and a\n * scroll container, returns the slice of items currently visible (plus\n * overscan), the total scroll size, and imperative scroll/measure helpers. The\n * consumer renders the items with their own `@for` and applies the position\n * transform — this primitive owns no DOM.\n *\n * Backed by `@tanstack/virtual-core`. SSR-safe: off-browser it returns an empty\n * window and the estimate-based total without touching `document`/`window`; the\n * first real window is produced after the first browser render.\n *\n * Must be called from an injection context (a component/directive constructor\n * or field initializer).\n *\n * @param options Reactive count, size estimator, scroll element and tuning.\n * @returns A {@link ForVirtualizer} handle of signals + imperative methods.\n */\nexport function injectVirtualizer(options: VirtualizerOptions): ForVirtualizer {\n if (!isPlatformBrowser(inject(PLATFORM_ID))) {\n return {\n virtualItems: signal<readonly VirtualItem[]>([]).asReadonly(),\n totalSize: computed(() => estimateTotal(options.count(), options.estimateSize)),\n range: computed<readonly [number, number]>(() => [0, 0]),\n scrollToIndex: () => undefined,\n scrollToOffset: () => undefined,\n measureElement: () => undefined,\n };\n }\n\n const horizontal = (options.orientation ?? 'vertical') === 'horizontal';\n const overscan = options.overscan ?? DEFAULT_OVERSCAN;\n const notify = signal(0, { equal: () => false });\n const mounted = signal(false);\n\n const buildCoreOptions = (\n count: number,\n scrollElement: HTMLElement | null,\n ): CoreVirtualizerOptions<HTMLElement, HTMLElement> => ({\n count,\n getScrollElement: () => scrollElement,\n estimateSize: options.estimateSize,\n getItemKey: options.getItemKey,\n overscan,\n horizontal,\n scrollToFn: elementScroll,\n observeElementRect,\n observeElementOffset,\n onChange: () => notify.set(0),\n });\n\n const virtualizer = new Virtualizer<HTMLElement, HTMLElement>(\n buildCoreOptions(options.count(), options.scrollElement()),\n );\n\n effect(() => {\n virtualizer.setOptions(buildCoreOptions(options.count(), options.scrollElement()));\n virtualizer._willUpdate();\n notify.set(0);\n });\n\n let cleanup: (() => void) | undefined;\n afterNextRenderCancellable(() => {\n cleanup = virtualizer._didMount();\n mounted.set(true);\n });\n inject(DestroyRef).onDestroy(() => cleanup?.());\n\n const virtualItems = computed<readonly VirtualItem[]>(() => {\n notify();\n if (!mounted()) return [];\n return virtualizer.getVirtualItems().map(toVirtualItem);\n });\n\n const totalSize = computed<number>(() => {\n notify();\n if (!mounted()) return estimateTotal(options.count(), options.estimateSize);\n return virtualizer.getTotalSize();\n });\n\n const range = computed<readonly [number, number]>(() => {\n const items = virtualItems();\n if (items.length === 0) return [0, 0];\n return [items[0]!.index, items[items.length - 1]!.index + 1];\n });\n\n return {\n virtualItems,\n totalSize,\n range,\n scrollToIndex: (index, scrollOptions) => virtualizer.scrollToIndex(index, scrollOptions),\n scrollToOffset: (offset) => virtualizer.scrollToOffset(offset),\n measureElement: (element) => virtualizer.measureElement(element),\n };\n}\n","import { type Signal, computed, effect, linkedSignal, signal, untracked } from '@angular/core';\n\nconst DEFAULT_THRESHOLD = 5;\n\n/**\n * Configuration for {@link injectInfiniteScroll}. The consumer owns the data and\n * the fetch; this core only decides *when* to ask for more.\n */\nexport interface InfiniteScrollOptions {\n /**\n * The rendered window, `[firstIndex, lastIndex + 1)` — e.g.\n * `injectVirtualizer(...).range`. An empty `[0, 0]` window never fires.\n */\n readonly range: Signal<readonly [number, number]>;\n /** Reactive total number of currently-loaded items. */\n readonly count: Signal<number>;\n /**\n * Fire when the window's last index comes within this many items of `count`.\n * Defaults to `5` (mirrors the windowing core's default overscan).\n */\n readonly threshold?: number;\n /** When this resolves to `true` the detector never fires. */\n readonly disabled?: Signal<boolean>;\n /**\n * Called once per threshold crossing. If it returns a promise, the next fire\n * is suppressed until that promise settles (`pending` reflects the in-flight\n * state); the detector re-arms when `count` grows.\n */\n readonly onLoadMore: () => void | Promise<unknown>;\n}\n\n/** Reactive handle returned by {@link injectInfiniteScroll}. */\nexport interface ForInfiniteScroll {\n /** True while an `onLoadMore` promise is in flight. */\n readonly pending: Signal<boolean>;\n}\n\n/**\n * Headless infinite-scroll detector: composes on top of any windowed list's\n * `range` + `count` signals and fires `onLoadMore` once per threshold crossing,\n * suppressing re-fire while a returned promise is pending and re-arming when\n * `count` grows (a page was appended). It owns no DOM, adds no scroll listener —\n * the trigger rides the existing reactive recompute — and is SSR-safe by\n * construction: off-browser the window is `[0, 0]`, so it never fires.\n *\n * Must be called from an injection context (a component/directive constructor\n * or field initializer).\n *\n * @param options Reactive `range` + `count`, an optional `threshold`/`disabled`,\n * and the `onLoadMore` callback.\n * @returns A {@link ForInfiniteScroll} handle exposing the `pending` signal.\n */\nexport function injectInfiniteScroll(options: InfiniteScrollOptions): ForInfiniteScroll {\n const threshold = options.threshold ?? DEFAULT_THRESHOLD;\n const pending = signal(false);\n\n const nearEnd = computed(() => {\n if (options.disabled?.()) return false;\n const [start, end] = options.range();\n if (end <= start) return false;\n const total = options.count();\n return total > 0 && end >= total - threshold;\n });\n\n const armed = linkedSignal<number, boolean>({\n source: () => options.count(),\n computation: () => true,\n });\n\n effect(() => {\n options.count();\n if (!nearEnd() || !untracked(armed)) return;\n if (untracked(pending)) return;\n armed.set(false);\n const result = options.onLoadMore();\n if (result instanceof Promise) {\n pending.set(true);\n void result.finally(() => pending.set(false));\n }\n });\n\n return { pending: pending.asReadonly() };\n}\n","import { InjectionToken, inject, type Signal } from '@angular/core';\n\nimport { type VirtualItem } from './virtualizer';\n\n/**\n * Coordination surface a {@link ForVirtualViewport} exposes to the\n * `*forVirtualFor` structural directive nested inside it.\n */\nexport interface ForVirtualViewportContext {\n /** The items in the currently visible window plus overscan. */\n readonly virtualItems: Signal<readonly VirtualItem[]>;\n /** The total number of items in the full (non-windowed) list. */\n readonly count: Signal<number>;\n /** Scroll axis, resolved once when the viewport initializes. */\n readonly orientation: Signal<'vertical' | 'horizontal'>;\n}\n\n/** DI token carrying the {@link ForVirtualViewportContext}. */\nexport const FOR_VIRTUAL_VIEWPORT_CONTEXT = new InjectionToken<ForVirtualViewportContext>(\n 'FOR_VIRTUAL_VIEWPORT_CONTEXT',\n);\n\n/**\n * Resolve the enclosing viewport context, throwing a primitive-prefixed error\n * when the piece is used outside a `[forVirtualViewport]`. Internal — never\n * re-exported from the primitive barrel.\n */\nexport function injectVirtualViewportContext(consumer: string): ForVirtualViewportContext {\n const context = inject(FOR_VIRTUAL_VIEWPORT_CONTEXT, { optional: true });\n if (!context) {\n throw new Error(\n `[forty-cdk/virtualization] ${consumer} must be used inside a [forVirtualViewport].`,\n );\n }\n return context;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n type OnInit,\n type Signal,\n computed,\n inject,\n input,\n output,\n runInInjectionContext,\n signal,\n} from '@angular/core';\n\nimport {\n FOR_VIRTUAL_VIEWPORT_CONTEXT,\n type ForVirtualViewportContext,\n} from './virtual-viewport-context';\nimport { injectInfiniteScroll } from './infinite-scroll';\nimport {\n type ForVirtualizer,\n type VirtualItem,\n estimateTotal,\n injectVirtualizer,\n} from './virtualizer';\n\n/** Default estimated item size, in CSS pixels, when none is provided. */\nconst DEFAULT_ESTIMATE_SIZE = 50;\n\n/** Default number of items rendered beyond the visible window on each side. */\nconst DEFAULT_OVERSCAN = 5;\n\n/**\n * Scroll viewport for the ergonomic virtualization layer. Decorate a fixed-size\n * scroll container with `[forVirtualViewport]`, give it `[virtualCount]` and an\n * `[estimateSize]`, and nest a single `*forVirtualFor` inside it — the viewport\n * owns the scroll container, the total-size sizer, and the windowing core, so\n * the consumer writes no manual spacer or position transform.\n *\n * Built on the headless {@link injectVirtualizer} core; for full manual control\n * (custom DOM, dynamic measurement, window/document scroller) use that directly.\n *\n * The viewport forces `overflow: auto` on its host and renders a relatively\n * positioned sizer whose main-axis size tracks `totalSize()`; `*forVirtualFor`\n * projects its rows into that sizer and positions each one absolutely.\n *\n * `orientation` and `overscan` are read once when the viewport initializes;\n * change them before first render, not at runtime.\n */\n@Component({\n selector: 'for-virtual-viewport, [forVirtualViewport]',\n exportAs: 'forVirtualViewport',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: FOR_VIRTUAL_VIEWPORT_CONTEXT, useExisting: ForVirtualViewport }],\n host: {\n '[style.overflow]': '\"auto\"',\n },\n template: `\n <div style=\"position: relative\" [style.width]=\"sizerWidth()\" [style.height]=\"sizerHeight()\">\n <ng-content />\n </div>\n `,\n})\nexport class ForVirtualViewport implements ForVirtualViewportContext, OnInit {\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly #injector = inject(Injector);\n readonly #scrollElement = signal<HTMLElement | null>(this.#host.nativeElement);\n readonly #virtualizer = signal<ForVirtualizer | null>(null);\n\n /** Total number of items in the full list. */\n readonly virtualCount = input.required<number>();\n\n /** Estimated item size in px along the scroll axis: a number or a per-index estimator. */\n readonly estimateSize = input<number | ((index: number) => number)>(DEFAULT_ESTIMATE_SIZE);\n\n /** Scroll axis. Resolved once on init; runtime changes are not tracked by the core. */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Items rendered beyond the visible window on each side. Resolved once on init. */\n readonly overscan = input<number>(DEFAULT_OVERSCAN);\n\n /** Stable key for the item at `index`. Defaults to the index. */\n readonly getItemKey = input<((index: number) => string | number) | undefined>(undefined);\n\n /**\n * Emits when the rendered window comes within ~`overscan` items of the end of\n * the list, signalling the consumer to load the next page. Built on\n * {@link injectInfiniteScroll}; fires once per threshold crossing and re-arms\n * when the bound count grows. The consumer owns the fetch (e.g. via `resource()`).\n */\n readonly endReached = output<void>();\n\n /**\n * The total number of items in the full (non-windowed) list — the\n * {@link ForVirtualViewportContext.count} the nested `*forVirtualFor` reads.\n * Aliases the `virtualCount` input signal directly (no wrapper node).\n */\n readonly count = this.virtualCount;\n\n readonly #estimator = computed<(index: number) => number>(() => {\n const estimate = this.estimateSize();\n return typeof estimate === 'function' ? estimate : () => estimate;\n });\n\n readonly #estimateTotal = computed(() => estimateTotal(this.count(), this.#estimator()));\n\n /** The items in the currently visible window plus overscan. */\n readonly virtualItems: Signal<readonly VirtualItem[]> = computed(\n () => this.#virtualizer()?.virtualItems() ?? [],\n );\n\n /** Total scroll size of all items, in pixels (drives the sizer). */\n readonly totalSize = computed(() => this.#virtualizer()?.totalSize() ?? this.#estimateTotal());\n\n readonly #range = computed<readonly [number, number]>(\n () => this.#virtualizer()?.range() ?? [0, 0],\n );\n\n protected readonly sizerWidth = computed(() =>\n this.orientation() === 'horizontal' ? `${this.totalSize()}px` : '100%',\n );\n\n protected readonly sizerHeight = computed(() =>\n this.orientation() === 'horizontal' ? '100%' : `${this.totalSize()}px`,\n );\n\n ngOnInit(): void {\n runInInjectionContext(this.#injector, () => {\n this.#virtualizer.set(\n injectVirtualizer({\n count: this.count,\n estimateSize: (index) => this.#estimator()(index),\n scrollElement: this.#scrollElement,\n orientation: this.orientation(),\n overscan: this.overscan(),\n getItemKey: this.getItemKey(),\n }),\n );\n injectInfiniteScroll({\n range: this.#range,\n count: this.count,\n onLoadMore: () => this.endReached.emit(),\n });\n });\n }\n\n /** Scroll the container so the item at `index` is in view. No-op until initialized. */\n scrollToIndex(index: number, options?: { align?: 'start' | 'center' | 'end' | 'auto' }): void {\n this.#virtualizer()?.scrollToIndex(index, options);\n }\n\n /** Scroll the container to an absolute pixel offset. No-op until initialized. */\n scrollToOffset(offset: number): void {\n this.#virtualizer()?.scrollToOffset(offset);\n }\n\n /** Record the measured size of a rendered item element. No-op until initialized. */\n measureElement(element: HTMLElement): void {\n this.#virtualizer()?.measureElement(element);\n }\n}\n","import {\n Directive,\n type EmbeddedViewRef,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject,\n input,\n} from '@angular/core';\n\nimport { injectVirtualViewportContext } from './virtual-viewport-context';\nimport { type VirtualItem } from './virtualizer';\n\n/** Template context exposed to each row rendered by `*forVirtualFor`. */\nexport interface ForVirtualForContext<T> {\n /** The row data at this index (`let row`). */\n $implicit: T;\n /** The virtual item metadata: index, key, start offset, size (`let item = virtualItem`). */\n virtualItem: VirtualItem;\n /** The item's index in the full list (`let i = index`). */\n index: number;\n /** The total number of items in the full list (`let n = count`). */\n count: number;\n}\n\n/**\n * Structural directive that renders only the visible window of a list inside a\n * `[forVirtualViewport]`. Pass the full data array; the directive iterates the\n * viewport's `virtualItems()`, exposes each row plus its `virtualItem` to the\n * template, positions it absolutely (so the consumer writes no transform), and\n * binds `aria-setsize` (true total) / `aria-posinset` (`index + 1`) so screen\n * readers announce the real list size.\n *\n * ```html\n * <div forVirtualViewport [virtualCount]=\"rows().length\" [estimateSize]=\"44\">\n * <div *forVirtualFor=\"let row of rows(); let item = virtualItem\">{{ row.label }}</div>\n * </div>\n * ```\n */\n@Directive({\n selector: '[forVirtualFor][forVirtualForOf]',\n})\nexport class ForVirtualFor<T> {\n readonly #template = inject<TemplateRef<ForVirtualForContext<T>>>(TemplateRef);\n readonly #viewContainer = inject(ViewContainerRef);\n readonly #viewport = injectVirtualViewportContext('ForVirtualFor');\n readonly #views = new Map<string | number, EmbeddedViewRef<ForVirtualForContext<T>>>();\n\n /** The full list of items to virtualize. */\n readonly forVirtualForOf = input.required<readonly T[]>({ alias: 'forVirtualForOf' });\n\n constructor() {\n effect(() => this.#render());\n }\n\n /** Narrows the template context type for `let row of …` strict template checking. */\n static ngTemplateContextGuard<T>(\n _directive: ForVirtualFor<T>,\n _context: unknown,\n ): _context is ForVirtualForContext<T> {\n return true;\n }\n\n #render(): void {\n const items = this.#viewport.virtualItems();\n const data = this.forVirtualForOf();\n const count = this.#viewport.count();\n const horizontal = this.#viewport.orientation() === 'horizontal';\n\n const seen = new Set<string | number>();\n items.forEach((item, position) => {\n seen.add(item.key);\n let view = this.#views.get(item.key);\n if (!view) {\n view = this.#viewContainer.createEmbeddedView(\n this.#template,\n { $implicit: data[item.index], virtualItem: item, index: item.index, count },\n position,\n );\n this.#views.set(item.key, view);\n } else {\n if (this.#viewContainer.indexOf(view) !== position) {\n this.#viewContainer.move(view, position);\n }\n view.context.$implicit = data[item.index];\n view.context.virtualItem = item;\n view.context.index = item.index;\n view.context.count = count;\n view.markForCheck();\n }\n this.#applyLayout(view, item, count, horizontal);\n });\n\n for (const [key, view] of this.#views) {\n if (seen.has(key)) {\n continue;\n }\n const index = this.#viewContainer.indexOf(view);\n if (index >= 0) {\n this.#viewContainer.remove(index);\n }\n this.#views.delete(key);\n }\n }\n\n #applyLayout(\n view: EmbeddedViewRef<ForVirtualForContext<T>>,\n item: VirtualItem,\n count: number,\n horizontal: boolean,\n ): void {\n const node = view.rootNodes[0] as unknown;\n if (!(node instanceof HTMLElement)) {\n return;\n }\n node.style.position = 'absolute';\n node.style.top = '0';\n node.style.left = '0';\n if (horizontal) {\n node.style.height = '100%';\n node.style.transform = `translateX(${item.start}px)`;\n } else {\n node.style.width = '100%';\n node.style.transform = `translateY(${item.start}px)`;\n }\n node.setAttribute('data-index', String(item.index));\n node.setAttribute('aria-setsize', String(count));\n node.setAttribute('aria-posinset', String(item.index + 1));\n }\n}\n","import { signal, type Signal } from '@angular/core';\n\nimport type { ForTableRowHandle } from 'forty-cdk';\n\n/** An absolute (rowIndex, 0-based column) target awaiting the row to mount. */\ninterface PendingTarget {\n readonly row: number;\n readonly col: number;\n}\n\n/**\n * Dependencies for `TableVirtualizedNavigator`. Wires the bridge to the table's\n * live row registry and the companion's scroll method.\n */\nexport interface TableVirtualizedNavigatorDeps {\n /** Live registered data rows, so the bridge can resolve a pending target once it mounts. */\n readonly rows: Signal<readonly ForTableRowHandle[]>;\n /** Scroll the virtualizer so the row at the absolute index mounts. */\n readonly scrollToRow: (index: number) => void;\n}\n\n/**\n * Cross-window keyboard-navigation bridge for a virtualized `[forTable]` grid,\n * owned by `[forTableVirtualized]`. The grid keeps roving-tabindex and renders\n * only a window of rows, so a navigation target can land on a row that is not\n * currently mounted. This bridge resolves that:\n *\n * - **Move** — `navigateTo(row, col)` focuses the cell at the absolute\n * `(row, col)` when its row is already rendered; otherwise it stashes the\n * target and calls `scrollToRow(row)` to mount it.\n * - **Resolve** — once the freshly-mounted row registers, the companion's bridge\n * effect calls `tryResolvePending`, which moves roving focus onto the target\n * cell (its `(focus)` handler promotes it to the active roving cell) and clears\n * the pending target.\n *\n * Mirrors the 1D `ListboxVirtualizedNavigator` precedent, adapted to the table's\n * roving + focused-row-retention model. Internal — not re-exported from\n * `table/index.ts` or `public-api.ts`.\n */\nexport class TableVirtualizedNavigator {\n readonly #deps: TableVirtualizedNavigatorDeps;\n\n readonly #pending = signal<PendingTarget | null>(null);\n\n constructor(deps: TableVirtualizedNavigatorDeps) {\n this.#deps = deps;\n }\n\n /**\n * Move roving focus to the data cell at the absolute `(row, col)`. When the\n * target row is already rendered, focuses immediately. Otherwise stashes the\n * target and scrolls it into the window; the bridge effect resolves it once\n * the row mounts.\n */\n navigateTo(row: number, col: number): void {\n if (this.#focusCell(row, col)) {\n this.#pending.set(null);\n return;\n }\n this.#pending.set({ row, col });\n this.#deps.scrollToRow(row);\n }\n\n /** Scroll the virtualizer so the row at the absolute `index` is in the window. */\n scrollToRow(index: number): void {\n this.#deps.scrollToRow(index);\n }\n\n /**\n * Resolve a pending cross-window navigation: once the row carrying the pending\n * absolute index mounts, focus its cell and clear the pending target. Returns\n * `true` when a pending request was resolved, `false` otherwise. Called from\n * the companion's bridge effect whenever the rendered rows change.\n */\n tryResolvePending(): boolean {\n const pending = this.#pending();\n if (pending === null) {\n return false;\n }\n if (this.#focusCell(pending.row, pending.col)) {\n this.#pending.set(null);\n return true;\n }\n return false;\n }\n\n #focusCell(row: number, col: number): boolean {\n const handle = this.#deps.rows().find((r) => r.virtualIndex() === row);\n if (!handle) {\n return false;\n }\n const cells = handle.cells();\n const cell = cells[col] ?? cells[cells.length - 1];\n if (!cell) {\n return false;\n }\n cell.host.focus();\n return true;\n }\n}\n","import {\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n numberAttribute,\n} from '@angular/core';\n\nimport { FOR_TABLE_CONTEXT, type ForTableContext } from 'forty-cdk';\n\nimport { injectVirtualizer, type VirtualItem } from './virtualizer';\nimport { TableVirtualizedNavigator } from './table-virtualized-navigator';\n\nfunction injectTableContext(): ForTableContext {\n const ctx = inject(FOR_TABLE_CONTEXT, { optional: true });\n if (!ctx) {\n throw new Error(\n '[forty-cdk/table] ForTableVirtualized must be used inside a [forTable] element.',\n );\n }\n return ctx;\n}\n\n/**\n * Opt-in row-virtualization companion for `[forTable]` in `<div role>` grid mode. Place it on the\n * same element as `[forTable]`; it builds the windowing core from the table's `[rowCount]` and\n * exposes the visible window for the consumer to render with their own `@for` + position transform.\n *\n * Tree-shakeable: `ForTable` never imports the virtualization core — only consumers that import\n * `ForTableVirtualized` bundle `@tanstack/virtual-core`.\n *\n * The focused row is kept mounted even when scrolled out of the window so the roving-focused\n * `gridcell` is never unmounted. SSR-safe: off-browser the window is empty and\n * `totalSize` is the estimate-based total.\n *\n * Also drives cross-window keyboard navigation: when an Arrow / Page / Ctrl+Home / Ctrl+End grid\n * action resolves a row outside the rendered window, it scrolls that row into view and moves roving\n * focus onto the target cell once it mounts (preserving the current column). `ForTable` stays\n * unaware of virtualization — it delegates the row-crossing move through the table context.\n */\n@Directive({\n selector: '[forTableVirtualized]',\n exportAs: 'forTableVirtualized',\n})\nexport class ForTableVirtualized {\n readonly #ctx = injectTableContext();\n readonly #rootEl = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** Estimated row size in px along the scroll axis (the fixed-size fast path). Read for the size estimate. */\n readonly estimateRowSize = input(44, { transform: numberAttribute });\n\n /**\n * Scroll container. Defaults to the table root element (the scroll container in `<div>` grid\n * mode). Bind it explicitly when the scroll container is an **ancestor** of the table — e.g. an\n * app-shell viewport that scrolls projected content — since the table cannot inject an ancestor\n * it does not own. A design-system wrapper can re-expose or rename this input through\n * `hostDirectives` input aliasing (`inputs: ['scrollElement: scrollContainer']`) with no bridging\n * effect required.\n */\n readonly scrollElement = input<HTMLElement | null>(null);\n\n readonly #scrollElement = computed(() => this.scrollElement() ?? this.#rootEl);\n\n readonly #virtualizer = injectVirtualizer({\n count: computed(() => this.#ctx.rowCount() ?? 0),\n estimateSize: () => this.estimateRowSize(),\n scrollElement: this.#scrollElement,\n });\n\n readonly #navigator = new TableVirtualizedNavigator({\n rows: this.#ctx.rows,\n scrollToRow: (index) => this.scrollToRow(index),\n });\n\n constructor() {\n this.#ctx.registerVirtualNavigation(this.#navigator);\n inject(DestroyRef).onDestroy(() => this.#ctx.registerVirtualNavigation(null));\n effect(() => {\n this.#ctx.rows();\n this.#navigator.tryResolvePending();\n });\n }\n\n /**\n * The rows in the visible window plus overscan, augmented to always include the focused row and\n * the row being reordered even when they are scrolled out of view (so the roving-focused cell\n * stays mounted, and a pointer reorder drag never unmounts the lifted row). Render these with\n * `@for (vrow of v.virtualRows(); track vrow.index)` and position each row absolutely with\n * `transform: translateY(vrow.start + 'px')`. Bind each row's `[virtualIndex]=\"vrow.index\"`.\n */\n readonly virtualRows = computed<readonly VirtualItem[]>(() => {\n const items = this.#virtualizer.virtualItems();\n const retain = new Set<number>();\n const focused = this.#ctx.focusedRowIndex();\n if (focused !== null) {\n retain.add(focused);\n }\n const reordering = this.#ctx.reorderingRowIndex();\n if (reordering !== null) {\n retain.add(reordering);\n }\n for (const it of items) {\n retain.delete(it.index);\n }\n if (retain.size === 0) {\n return items;\n }\n const size = this.estimateRowSize();\n const retained: VirtualItem[] = [...retain].map((index) => ({\n index,\n key: index,\n start: index * size,\n size,\n }));\n return [...items, ...retained].sort((a, b) => a.index - b.index);\n });\n\n /** Total scroll size of all rows in px. Bind to the body container's height to size the scroll range. */\n readonly totalSize = this.#virtualizer.totalSize;\n\n /**\n * The rendered window as the inclusive-exclusive `[firstIndex, lastIndex + 1)` index range,\n * sourced from the underlying virtualizer (the true window) — not from {@link virtualRows},\n * which is augmented with the focused / reordering rows. So a row retained out of the window\n * never widens this range. Plugs straight into `injectInfiniteScroll({ range, count, onLoadMore })`.\n */\n readonly range = this.#virtualizer.range;\n\n /**\n * Scroll the container so the row at `index` is in view. Cross-window keyboard\n * navigation calls this internally; consumers may also call it to scroll\n * programmatically.\n */\n scrollToRow(index: number, options?: { align?: 'start' | 'center' | 'end' | 'auto' }): void {\n this.#virtualizer.scrollToIndex(index, options);\n }\n\n /** Record the measured size of a rendered row element (dynamic / measured row heights). */\n measureRow(element: HTMLElement): void {\n this.#virtualizer.measureElement(element);\n }\n}\n","/*\n * Public API surface of forty-cdk/virtualization.\n *\n * Virtualization (the windowing core, the Shape A viewport directives,\n * infinite-scroll, and the `[forTableVirtualized]` companion) ships from this\n * secondary entry point so that `@tanstack/virtual-core` is isolated to its own\n * bundle chunk: only consumers importing from `forty-cdk/virtualization` pull\n * it in, even when another lazy route in the same app virtualizes.\n */\n\nexport {\n injectVirtualizer,\n type ForVirtualizer,\n type VirtualItem,\n type VirtualizerOptions,\n} from './virtualizer';\nexport {\n injectInfiniteScroll,\n type ForInfiniteScroll,\n type InfiniteScrollOptions,\n} from './infinite-scroll';\nexport {\n FOR_VIRTUAL_VIEWPORT_CONTEXT,\n type ForVirtualViewportContext,\n} from './virtual-viewport-context';\nexport { ForVirtualViewport } from './virtual-viewport';\nexport { ForVirtualFor, type ForVirtualForContext } from './virtual-for';\nexport { ForTableVirtualized } from './table-virtualized';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["DEFAULT_OVERSCAN"],"mappings":";;;;;;AAEA;;;;;;;;;;;;;;AAcG;AACG,SAAU,0BAA0B,CAAC,EAAc,EAAA;AACvD,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAErC,IAAI,SAAS,GAAG,KAAK;AAErB,IAAA,MAAM,GAAG,GAAG,eAAe,CAAC,MAAK;AAC/B,QAAA,IAAI,SAAS;YAAE;AACf,QAAA,EAAE,EAAE;AACN,IAAA,CAAC,CAAC;AAEF,IAAA,UAAU,CAAC,SAAS,CAAC,MAAK;QACxB,SAAS,GAAG,IAAI;QAChB,GAAG,CAAC,OAAO,EAAE;AACf,IAAA,CAAC,CAAC;AACJ;;ACRA;AACA,MAAMA,k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CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,QAAQ,EAAE,qBAAqB;AAChC,iBAAA;;;AC9CD;;;;;;;;AAQG;;ACRH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"forty-cdk-virtualization.mjs","sources":["../../../projects/forty-cdk/virtualization/src/after-next-render-cancellable.ts","../../../projects/forty-cdk/virtualization/src/virtualizer.ts","../../../projects/forty-cdk/virtualization/src/infinite-scroll.ts","../../../projects/forty-cdk/virtualization/src/virtual-viewport-context.ts","../../../projects/forty-cdk/virtualization/src/virtual-viewport.ts","../../../projects/forty-cdk/virtualization/src/virtual-for.ts","../../../projects/forty-cdk/virtualization/src/table-virtualized-navigator.ts","../../../projects/forty-cdk/virtualization/src/table-virtualized.ts","../../../projects/forty-cdk/virtualization/src/public-api.ts","../../../projects/forty-cdk/virtualization/src/forty-cdk-virtualization.ts"],"sourcesContent":["import { afterNextRender, DestroyRef, inject } from '@angular/core';\n\n/**\n * `afterNextRender` whose queued callback is cancelled on destroy, guarding the\n * destroy-before-first-render hazard (a directive torn down between construction\n * and the next render would otherwise still run the queued callback). It both\n * `.destroy()`s the render ref from the destroy hook and re-checks a `destroyed`\n * flag before invoking `fn`, covering the async and synchronous teardown orders.\n *\n * A standalone twin of the main entry point's\n * `_internal/after-next-render-cancellable`: a secondary entry point cannot reach\n * the main entry's internals across the package boundary, so the helper is\n * mirrored here. Keep the two in sync; see that file for the full rationale.\n *\n * Must be called from an injection context. SSR-safe: `afterNextRender` never\n * runs on the server, so the callback simply never fires.\n */\nexport function afterNextRenderCancellable(fn: () => void): void {\n const destroyRef = inject(DestroyRef);\n\n let destroyed = false;\n\n const ref = afterNextRender(() => {\n if (destroyed) return;\n fn();\n });\n\n destroyRef.onDestroy(() => {\n destroyed = true;\n ref.destroy();\n });\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n DestroyRef,\n type Signal,\n computed,\n effect,\n inject,\n PLATFORM_ID,\n signal,\n} from '@angular/core';\nimport {\n Virtualizer,\n elementScroll,\n observeElementOffset,\n observeElementRect,\n} from '@tanstack/virtual-core';\nimport type {\n VirtualItem as CoreVirtualItem,\n VirtualizerOptions as CoreVirtualizerOptions,\n} from '@tanstack/virtual-core';\n\nimport { afterNextRenderCancellable } from './after-next-render-cancellable';\n\n/** Default number of items rendered beyond the visible window on each side. */\nconst DEFAULT_OVERSCAN = 5;\n\n/**\n * Configuration for {@link injectVirtualizer}. The consumer owns the data and\n * the DOM; the virtualizer only computes which slice of the data is visible.\n */\nexport interface VirtualizerOptions {\n /** Reactive total number of items in the list. */\n readonly count: Signal<number>;\n /**\n * Estimated size, in CSS pixels, of the item at `index` along the scroll\n * axis (height when vertical, width when horizontal). Used until an item is\n * measured. Should be a stable function reference.\n */\n readonly estimateSize: (index: number) => number;\n /** Reactive reference to the scroll container element (e.g. a `viewChild`). */\n readonly scrollElement: Signal<HTMLElement | null>;\n /** Scroll axis. Defaults to `'vertical'`. */\n readonly orientation?: 'vertical' | 'horizontal';\n /**\n * Number of items to render beyond the visible window on each side, to\n * reduce blank flashes while scrolling. Defaults to `5`.\n */\n readonly overscan?: number;\n /** Stable key for the item at `index`. Defaults to the index itself. */\n readonly getItemKey?: (index: number) => string | number;\n}\n\n/** A single item in the currently rendered window. */\nexport interface VirtualItem {\n /** Index of the item in the full list. */\n readonly index: number;\n /** Stable key (from `getItemKey`, or the index). */\n readonly key: string | number;\n /** Offset of the item from the start of the scroll container, in pixels. */\n readonly start: number;\n /** Size of the item along the scroll axis, in pixels. */\n readonly size: number;\n}\n\n/** Reactive handle returned by {@link injectVirtualizer}. */\nexport interface ForVirtualizer {\n /** The items in the currently visible window plus overscan. */\n readonly virtualItems: Signal<readonly VirtualItem[]>;\n /** Total scroll size of all items, in pixels (drives the spacer element). */\n readonly totalSize: Signal<number>;\n /**\n * The inclusive-exclusive `[firstIndex, lastIndex + 1)` index window currently\n * rendered (visible window plus overscan), or `[0, 0]` when nothing is rendered.\n * Plugs straight into a list primitive's `[visibleRange]`-style input (e.g.\n * `[forCombobox][visibleRange]`) so windowing composes without the consumer\n * re-deriving the range from {@link ForVirtualizer.virtualItems}.\n */\n readonly range: Signal<readonly [number, number]>;\n /** Scroll the container so the item at `index` is in view. */\n scrollToIndex(index: number, options?: { align?: 'start' | 'center' | 'end' | 'auto' }): void;\n /** Scroll the container to an absolute pixel offset. */\n scrollToOffset(offset: number): void;\n /** Record the measured size of a rendered item element (dynamic sizes). */\n measureElement(element: HTMLElement): void;\n}\n\n/**\n * Sum of the estimated size of every item: `count` × the estimate when it's\n * uniform, else the per-index estimator summed. Used as the SSR / pre-mount\n * total before the core has measured any item, and shared with the ergonomic\n * viewport layer so the estimate-total math lives in one place.\n */\nexport function estimateTotal(count: number, estimateSize: (index: number) => number): number {\n let total = 0;\n for (let index = 0; index < count; index++) {\n total += estimateSize(index);\n }\n return total;\n}\n\nfunction toVirtualItem(item: CoreVirtualItem): VirtualItem {\n return {\n index: item.index,\n key: item.key as string | number,\n start: item.start,\n size: item.size,\n };\n}\n\n/**\n * Headless windowing core: given a reactive item count, a size estimator and a\n * scroll container, returns the slice of items currently visible (plus\n * overscan), the total scroll size, and imperative scroll/measure helpers. The\n * consumer renders the items with their own `@for` and applies the position\n * transform — this primitive owns no DOM.\n *\n * Backed by `@tanstack/virtual-core`. SSR-safe: off-browser it returns an empty\n * window and the estimate-based total without touching `document`/`window`; the\n * first real window is produced after the first browser render.\n *\n * Must be called from an injection context (a component/directive constructor\n * or field initializer).\n *\n * @param options Reactive count, size estimator, scroll element and tuning.\n * @returns A {@link ForVirtualizer} handle of signals + imperative methods.\n */\nexport function injectVirtualizer(options: VirtualizerOptions): ForVirtualizer {\n if (!isPlatformBrowser(inject(PLATFORM_ID))) {\n return {\n virtualItems: signal<readonly VirtualItem[]>([]).asReadonly(),\n totalSize: computed(() => estimateTotal(options.count(), options.estimateSize)),\n range: computed<readonly [number, number]>(() => [0, 0]),\n scrollToIndex: () => undefined,\n scrollToOffset: () => undefined,\n measureElement: () => undefined,\n };\n }\n\n const horizontal = (options.orientation ?? 'vertical') === 'horizontal';\n const overscan = options.overscan ?? DEFAULT_OVERSCAN;\n const notify = signal(0, { equal: () => false });\n const mounted = signal(false);\n\n const buildCoreOptions = (\n count: number,\n scrollElement: HTMLElement | null,\n ): CoreVirtualizerOptions<HTMLElement, HTMLElement> => ({\n count,\n getScrollElement: () => scrollElement,\n estimateSize: options.estimateSize,\n getItemKey: options.getItemKey,\n overscan,\n horizontal,\n scrollToFn: elementScroll,\n observeElementRect,\n observeElementOffset,\n onChange: () => notify.set(0),\n });\n\n const virtualizer = new Virtualizer<HTMLElement, HTMLElement>(\n buildCoreOptions(options.count(), options.scrollElement()),\n );\n\n effect(() => {\n virtualizer.setOptions(buildCoreOptions(options.count(), options.scrollElement()));\n virtualizer._willUpdate();\n notify.set(0);\n });\n\n let cleanup: (() => void) | undefined;\n afterNextRenderCancellable(() => {\n cleanup = virtualizer._didMount();\n mounted.set(true);\n });\n inject(DestroyRef).onDestroy(() => cleanup?.());\n\n const virtualItems = computed<readonly VirtualItem[]>(() => {\n notify();\n if (!mounted()) return [];\n return virtualizer.getVirtualItems().map(toVirtualItem);\n });\n\n const totalSize = computed<number>(() => {\n notify();\n if (!mounted()) return estimateTotal(options.count(), options.estimateSize);\n return virtualizer.getTotalSize();\n });\n\n const range = computed<readonly [number, number]>(() => {\n const items = virtualItems();\n if (items.length === 0) return [0, 0];\n return [items[0]!.index, items[items.length - 1]!.index + 1];\n });\n\n return {\n virtualItems,\n totalSize,\n range,\n scrollToIndex: (index, scrollOptions) => virtualizer.scrollToIndex(index, scrollOptions),\n scrollToOffset: (offset) => virtualizer.scrollToOffset(offset),\n measureElement: (element) => virtualizer.measureElement(element),\n };\n}\n","import { type Signal, computed, effect, linkedSignal, signal, untracked } from '@angular/core';\n\nconst DEFAULT_THRESHOLD = 5;\n\n/**\n * Configuration for {@link injectInfiniteScroll}. The consumer owns the data and\n * the fetch; this core only decides *when* to ask for more.\n */\nexport interface InfiniteScrollOptions {\n /**\n * The rendered window, `[firstIndex, lastIndex + 1)` — e.g.\n * `injectVirtualizer(...).range`. An empty `[0, 0]` window never fires.\n */\n readonly range: Signal<readonly [number, number]>;\n /** Reactive total number of currently-loaded items. */\n readonly count: Signal<number>;\n /**\n * Fire when the window's last index comes within this many items of `count`.\n * Defaults to `5` (mirrors the windowing core's default overscan).\n */\n readonly threshold?: number;\n /** When this resolves to `true` the detector never fires. */\n readonly disabled?: Signal<boolean>;\n /**\n * Called once per threshold crossing. If it returns a promise, the next fire\n * is suppressed until that promise settles (`pending` reflects the in-flight\n * state); the detector re-arms when `count` grows.\n */\n readonly onLoadMore: () => void | Promise<unknown>;\n}\n\n/** Reactive handle returned by {@link injectInfiniteScroll}. */\nexport interface ForInfiniteScroll {\n /** True while an `onLoadMore` promise is in flight. */\n readonly pending: Signal<boolean>;\n}\n\n/**\n * Headless infinite-scroll detector: composes on top of any windowed list's\n * `range` + `count` signals and fires `onLoadMore` once per threshold crossing,\n * suppressing re-fire while a returned promise is pending and re-arming when\n * `count` grows (a page was appended). It owns no DOM, adds no scroll listener —\n * the trigger rides the existing reactive recompute — and is SSR-safe by\n * construction: off-browser the window is `[0, 0]`, so it never fires.\n *\n * Must be called from an injection context (a component/directive constructor\n * or field initializer).\n *\n * @param options Reactive `range` + `count`, an optional `threshold`/`disabled`,\n * and the `onLoadMore` callback.\n * @returns A {@link ForInfiniteScroll} handle exposing the `pending` signal.\n */\nexport function injectInfiniteScroll(options: InfiniteScrollOptions): ForInfiniteScroll {\n const threshold = options.threshold ?? DEFAULT_THRESHOLD;\n const pending = signal(false);\n\n const nearEnd = computed(() => {\n if (options.disabled?.()) return false;\n const [start, end] = options.range();\n if (end <= start) return false;\n const total = options.count();\n return total > 0 && end >= total - threshold;\n });\n\n const armed = linkedSignal<number, boolean>({\n source: () => options.count(),\n computation: () => true,\n });\n\n effect(() => {\n options.count();\n if (!nearEnd() || !untracked(armed)) return;\n if (untracked(pending)) return;\n armed.set(false);\n const result = options.onLoadMore();\n if (result instanceof Promise) {\n pending.set(true);\n void result.finally(() => pending.set(false));\n }\n });\n\n return { pending: pending.asReadonly() };\n}\n","import { InjectionToken, inject, type Signal } from '@angular/core';\n\nimport { type VirtualItem } from './virtualizer';\n\n/**\n * Coordination surface a {@link ForVirtualViewport} exposes to the\n * `*forVirtualFor` structural directive nested inside it.\n */\nexport interface ForVirtualViewportContext {\n /** The items in the currently visible window plus overscan. */\n readonly virtualItems: Signal<readonly VirtualItem[]>;\n /** The total number of items in the full (non-windowed) list. */\n readonly count: Signal<number>;\n /** Scroll axis, resolved once when the viewport initializes. */\n readonly orientation: Signal<'vertical' | 'horizontal'>;\n}\n\n/** DI token carrying the {@link ForVirtualViewportContext}. */\nexport const FOR_VIRTUAL_VIEWPORT_CONTEXT = new InjectionToken<ForVirtualViewportContext>(\n 'FOR_VIRTUAL_VIEWPORT_CONTEXT',\n);\n\n/**\n * Resolve the enclosing viewport context, throwing a primitive-prefixed error\n * when the piece is used outside a `[forVirtualViewport]`. Internal — never\n * re-exported from the primitive barrel.\n */\nexport function injectVirtualViewportContext(consumer: string): ForVirtualViewportContext {\n const context = inject(FOR_VIRTUAL_VIEWPORT_CONTEXT, { optional: true });\n if (!context) {\n throw new Error(\n `[forty-cdk/virtualization] ${consumer} must be used inside a [forVirtualViewport].`,\n );\n }\n return context;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n type OnInit,\n type Signal,\n computed,\n inject,\n input,\n output,\n runInInjectionContext,\n signal,\n} from '@angular/core';\n\nimport {\n FOR_VIRTUAL_VIEWPORT_CONTEXT,\n type ForVirtualViewportContext,\n} from './virtual-viewport-context';\nimport { injectInfiniteScroll } from './infinite-scroll';\nimport {\n type ForVirtualizer,\n type VirtualItem,\n estimateTotal,\n injectVirtualizer,\n} from './virtualizer';\n\n/** Default estimated item size, in CSS pixels, when none is provided. */\nconst DEFAULT_ESTIMATE_SIZE = 50;\n\n/** Default number of items rendered beyond the visible window on each side. */\nconst DEFAULT_OVERSCAN = 5;\n\n/**\n * Scroll viewport for the ergonomic virtualization layer. Decorate a fixed-size\n * scroll container with `[forVirtualViewport]`, give it `[virtualCount]` and an\n * `[estimateSize]`, and nest a single `*forVirtualFor` inside it — the viewport\n * owns the scroll container, the total-size sizer, and the windowing core, so\n * the consumer writes no manual spacer or position transform.\n *\n * Built on the headless {@link injectVirtualizer} core; for full manual control\n * (custom DOM, dynamic measurement, window/document scroller) use that directly.\n *\n * The viewport forces `overflow: auto` on its host and renders a relatively\n * positioned sizer whose main-axis size tracks `totalSize()`; `*forVirtualFor`\n * projects its rows into that sizer and positions each one absolutely.\n *\n * `orientation` and `overscan` are read once when the viewport initializes;\n * change them before first render, not at runtime.\n */\n@Component({\n selector: 'for-virtual-viewport, [forVirtualViewport]',\n exportAs: 'forVirtualViewport',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: FOR_VIRTUAL_VIEWPORT_CONTEXT, useExisting: ForVirtualViewport }],\n host: {\n '[style.overflow]': '\"auto\"',\n },\n template: `\n <div style=\"position: relative\" [style.width]=\"sizerWidth()\" [style.height]=\"sizerHeight()\">\n <ng-content />\n </div>\n `,\n})\nexport class ForVirtualViewport implements ForVirtualViewportContext, OnInit {\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly #injector = inject(Injector);\n readonly #scrollElement = signal<HTMLElement | null>(this.#host.nativeElement);\n readonly #virtualizer = signal<ForVirtualizer | null>(null);\n\n /** Total number of items in the full list. */\n readonly virtualCount = input.required<number>();\n\n /** Estimated item size in px along the scroll axis: a number or a per-index estimator. */\n readonly estimateSize = input<number | ((index: number) => number)>(DEFAULT_ESTIMATE_SIZE);\n\n /** Scroll axis. Resolved once on init; runtime changes are not tracked by the core. */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Items rendered beyond the visible window on each side. Resolved once on init. */\n readonly overscan = input<number>(DEFAULT_OVERSCAN);\n\n /** Stable key for the item at `index`. Defaults to the index. */\n readonly getItemKey = input<((index: number) => string | number) | undefined>(undefined);\n\n /**\n * Emits when the rendered window comes within ~`overscan` items of the end of\n * the list, signalling the consumer to load the next page. Built on\n * {@link injectInfiniteScroll}; fires once per threshold crossing and re-arms\n * when the bound count grows. The consumer owns the fetch (e.g. via `resource()`).\n */\n readonly endReached = output<void>();\n\n /**\n * The total number of items in the full (non-windowed) list — the\n * {@link ForVirtualViewportContext.count} the nested `*forVirtualFor` reads.\n * Aliases the `virtualCount` input signal directly (no wrapper node).\n */\n readonly count = this.virtualCount;\n\n readonly #estimator = computed<(index: number) => number>(() => {\n const estimate = this.estimateSize();\n return typeof estimate === 'function' ? estimate : () => estimate;\n });\n\n readonly #estimateTotal = computed(() => estimateTotal(this.count(), this.#estimator()));\n\n /** The items in the currently visible window plus overscan. */\n readonly virtualItems: Signal<readonly VirtualItem[]> = computed(\n () => this.#virtualizer()?.virtualItems() ?? [],\n );\n\n /** Total scroll size of all items, in pixels (drives the sizer). */\n readonly totalSize = computed(() => this.#virtualizer()?.totalSize() ?? this.#estimateTotal());\n\n readonly #range = computed<readonly [number, number]>(\n () => this.#virtualizer()?.range() ?? [0, 0],\n );\n\n protected readonly sizerWidth = computed(() =>\n this.orientation() === 'horizontal' ? `${this.totalSize()}px` : '100%',\n );\n\n protected readonly sizerHeight = computed(() =>\n this.orientation() === 'horizontal' ? '100%' : `${this.totalSize()}px`,\n );\n\n ngOnInit(): void {\n runInInjectionContext(this.#injector, () => {\n this.#virtualizer.set(\n injectVirtualizer({\n count: this.count,\n estimateSize: (index) => this.#estimator()(index),\n scrollElement: this.#scrollElement,\n orientation: this.orientation(),\n overscan: this.overscan(),\n getItemKey: this.getItemKey(),\n }),\n );\n injectInfiniteScroll({\n range: this.#range,\n count: this.count,\n onLoadMore: () => this.endReached.emit(),\n });\n });\n }\n\n /** Scroll the container so the item at `index` is in view. No-op until initialized. */\n scrollToIndex(index: number, options?: { align?: 'start' | 'center' | 'end' | 'auto' }): void {\n this.#virtualizer()?.scrollToIndex(index, options);\n }\n\n /** Scroll the container to an absolute pixel offset. No-op until initialized. */\n scrollToOffset(offset: number): void {\n this.#virtualizer()?.scrollToOffset(offset);\n }\n\n /** Record the measured size of a rendered item element. No-op until initialized. */\n measureElement(element: HTMLElement): void {\n this.#virtualizer()?.measureElement(element);\n }\n}\n","import {\n Directive,\n type EmbeddedViewRef,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject,\n input,\n} from '@angular/core';\n\nimport { injectVirtualViewportContext } from './virtual-viewport-context';\nimport { type VirtualItem } from './virtualizer';\n\n/** Template context exposed to each row rendered by `*forVirtualFor`. */\nexport interface ForVirtualForContext<T> {\n /** The row data at this index (`let row`). */\n $implicit: T;\n /** The virtual item metadata: index, key, start offset, size (`let item = virtualItem`). */\n virtualItem: VirtualItem;\n /** The item's index in the full list (`let i = index`). */\n index: number;\n /** The total number of items in the full list (`let n = count`). */\n count: number;\n}\n\n/**\n * Structural directive that renders only the visible window of a list inside a\n * `[forVirtualViewport]`. Pass the full data array; the directive iterates the\n * viewport's `virtualItems()`, exposes each row plus its `virtualItem` to the\n * template, positions it absolutely (so the consumer writes no transform), and\n * binds `aria-setsize` (true total) / `aria-posinset` (`index + 1`) so screen\n * readers announce the real list size.\n *\n * ```html\n * <div forVirtualViewport [virtualCount]=\"rows().length\" [estimateSize]=\"44\">\n * <div *forVirtualFor=\"let row of rows(); let item = virtualItem\">{{ row.label }}</div>\n * </div>\n * ```\n */\n@Directive({\n selector: '[forVirtualFor][forVirtualForOf]',\n})\nexport class ForVirtualFor<T> {\n readonly #template = inject<TemplateRef<ForVirtualForContext<T>>>(TemplateRef);\n readonly #viewContainer = inject(ViewContainerRef);\n readonly #viewport = injectVirtualViewportContext('ForVirtualFor');\n readonly #views = new Map<string | number, EmbeddedViewRef<ForVirtualForContext<T>>>();\n\n /** The full list of items to virtualize. */\n readonly forVirtualForOf = input.required<readonly T[]>({ alias: 'forVirtualForOf' });\n\n constructor() {\n effect(() => this.#render());\n }\n\n /** Narrows the template context type for `let row of …` strict template checking. */\n static ngTemplateContextGuard<T>(\n _directive: ForVirtualFor<T>,\n _context: unknown,\n ): _context is ForVirtualForContext<T> {\n return true;\n }\n\n #render(): void {\n const items = this.#viewport.virtualItems();\n const data = this.forVirtualForOf();\n const count = this.#viewport.count();\n const horizontal = this.#viewport.orientation() === 'horizontal';\n\n const seen = new Set<string | number>();\n items.forEach((item, position) => {\n seen.add(item.key);\n let view = this.#views.get(item.key);\n if (!view) {\n view = this.#viewContainer.createEmbeddedView(\n this.#template,\n { $implicit: data[item.index], virtualItem: item, index: item.index, count },\n position,\n );\n this.#views.set(item.key, view);\n } else {\n if (this.#viewContainer.indexOf(view) !== position) {\n this.#viewContainer.move(view, position);\n }\n view.context.$implicit = data[item.index];\n view.context.virtualItem = item;\n view.context.index = item.index;\n view.context.count = count;\n view.markForCheck();\n }\n this.#applyLayout(view, item, count, horizontal);\n });\n\n for (const [key, view] of this.#views) {\n if (seen.has(key)) {\n continue;\n }\n const index = this.#viewContainer.indexOf(view);\n if (index >= 0) {\n this.#viewContainer.remove(index);\n }\n this.#views.delete(key);\n }\n }\n\n #applyLayout(\n view: EmbeddedViewRef<ForVirtualForContext<T>>,\n item: VirtualItem,\n count: number,\n horizontal: boolean,\n ): void {\n const node = view.rootNodes[0] as unknown;\n if (!(node instanceof HTMLElement)) {\n return;\n }\n node.style.position = 'absolute';\n node.style.top = '0';\n node.style.left = '0';\n if (horizontal) {\n node.style.height = '100%';\n node.style.transform = `translateX(${item.start}px)`;\n } else {\n node.style.width = '100%';\n node.style.transform = `translateY(${item.start}px)`;\n }\n node.setAttribute('data-index', String(item.index));\n node.setAttribute('aria-setsize', String(count));\n node.setAttribute('aria-posinset', String(item.index + 1));\n }\n}\n","import { signal, type Signal } from '@angular/core';\n\nimport { type ForTableRowHandle } from 'forty-cdk/table';\n\n/** An absolute (rowIndex, 0-based column) target awaiting the row to mount. */\ninterface PendingTarget {\n readonly row: number;\n readonly col: number;\n}\n\n/**\n * Dependencies for `TableVirtualizedNavigator`. Wires the bridge to the table's\n * live row registry and the companion's scroll method.\n */\nexport interface TableVirtualizedNavigatorDeps {\n /** Live registered data rows, so the bridge can resolve a pending target once it mounts. */\n readonly rows: Signal<readonly ForTableRowHandle[]>;\n /** Scroll the virtualizer so the row at the absolute index mounts. */\n readonly scrollToRow: (index: number) => void;\n}\n\n/**\n * Cross-window keyboard-navigation bridge for a virtualized `[forTable]` grid,\n * owned by `[forTableVirtualized]`. The grid keeps roving-tabindex and renders\n * only a window of rows, so a navigation target can land on a row that is not\n * currently mounted. This bridge resolves that:\n *\n * - **Move** — `navigateTo(row, col)` focuses the cell at the absolute\n * `(row, col)` when its row is already rendered; otherwise it stashes the\n * target and calls `scrollToRow(row)` to mount it.\n * - **Resolve** — once the freshly-mounted row registers, the companion's bridge\n * effect calls `tryResolvePending`, which moves roving focus onto the target\n * cell (its `(focus)` handler promotes it to the active roving cell) and clears\n * the pending target.\n *\n * Mirrors the 1D `ListboxVirtualizedNavigator` precedent, adapted to the table's\n * roving + focused-row-retention model. Internal — not re-exported from\n * `table/index.ts` or `public-api.ts`.\n */\nexport class TableVirtualizedNavigator {\n readonly #deps: TableVirtualizedNavigatorDeps;\n\n readonly #pending = signal<PendingTarget | null>(null);\n\n constructor(deps: TableVirtualizedNavigatorDeps) {\n this.#deps = deps;\n }\n\n /**\n * Move roving focus to the data cell at the absolute `(row, col)`. When the\n * target row is already rendered, focuses immediately. Otherwise stashes the\n * target and scrolls it into the window; the bridge effect resolves it once\n * the row mounts.\n */\n navigateTo(row: number, col: number): void {\n if (this.#focusCell(row, col)) {\n this.#pending.set(null);\n return;\n }\n this.#pending.set({ row, col });\n this.#deps.scrollToRow(row);\n }\n\n /** Scroll the virtualizer so the row at the absolute `index` is in the window. */\n scrollToRow(index: number): void {\n this.#deps.scrollToRow(index);\n }\n\n /**\n * Resolve a pending cross-window navigation: once the row carrying the pending\n * absolute index mounts, focus its cell and clear the pending target. Returns\n * `true` when a pending request was resolved, `false` otherwise. Called from\n * the companion's bridge effect whenever the rendered rows change.\n */\n tryResolvePending(): boolean {\n const pending = this.#pending();\n if (pending === null) {\n return false;\n }\n if (this.#focusCell(pending.row, pending.col)) {\n this.#pending.set(null);\n return true;\n }\n return false;\n }\n\n #focusCell(row: number, col: number): boolean {\n const handle = this.#deps.rows().find((r) => r.virtualIndex() === row);\n if (!handle) {\n return false;\n }\n const cells = handle.cells();\n const cell = cells[col] ?? cells[cells.length - 1];\n if (!cell) {\n return false;\n }\n cell.host.focus();\n return true;\n }\n}\n","import {\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n numberAttribute,\n} from '@angular/core';\n\nimport { FOR_TABLE_CONTEXT, type ForTableContext } from 'forty-cdk/table';\n\nimport { injectVirtualizer, type VirtualItem } from './virtualizer';\nimport { TableVirtualizedNavigator } from './table-virtualized-navigator';\n\nfunction injectTableContext(): ForTableContext {\n const ctx = inject(FOR_TABLE_CONTEXT, { optional: true });\n if (!ctx) {\n throw new Error(\n '[forty-cdk/table] ForTableVirtualized must be used inside a [forTable] element.',\n );\n }\n return ctx;\n}\n\n/**\n * Opt-in row-virtualization companion for `[forTable]` in `<div role>` grid mode. Place it on the\n * same element as `[forTable]`; it builds the windowing core from the table's `[rowCount]` and\n * exposes the visible window for the consumer to render with their own `@for` + position transform.\n *\n * Tree-shakeable: `ForTable` never imports the virtualization core — only consumers that import\n * `ForTableVirtualized` bundle `@tanstack/virtual-core`.\n *\n * The focused row is kept mounted even when scrolled out of the window so the roving-focused\n * `gridcell` is never unmounted. SSR-safe: off-browser the window is empty and\n * `totalSize` is the estimate-based total.\n *\n * Also drives cross-window keyboard navigation: when an Arrow / Page / Ctrl+Home / Ctrl+End grid\n * action resolves a row outside the rendered window, it scrolls that row into view and moves roving\n * focus onto the target cell once it mounts (preserving the current column). `ForTable` stays\n * unaware of virtualization — it delegates the row-crossing move through the table context.\n */\n@Directive({\n selector: '[forTableVirtualized]',\n exportAs: 'forTableVirtualized',\n})\nexport class ForTableVirtualized {\n readonly #ctx = injectTableContext();\n readonly #rootEl = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** Estimated row size in px along the scroll axis (the fixed-size fast path). Read for the size estimate. */\n readonly estimateRowSize = input(44, { transform: numberAttribute });\n\n /**\n * Scroll container. Defaults to the table root element (the scroll container in `<div>` grid\n * mode). Bind it explicitly when the scroll container is an **ancestor** of the table — e.g. an\n * app-shell viewport that scrolls projected content — since the table cannot inject an ancestor\n * it does not own. A design-system wrapper can re-expose or rename this input through\n * `hostDirectives` input aliasing (`inputs: ['scrollElement: scrollContainer']`) with no bridging\n * effect required.\n */\n readonly scrollElement = input<HTMLElement | null>(null);\n\n readonly #scrollElement = computed(() => this.scrollElement() ?? this.#rootEl);\n\n readonly #virtualizer = injectVirtualizer({\n count: computed(() => this.#ctx.rowCount() ?? 0),\n estimateSize: () => this.estimateRowSize(),\n scrollElement: this.#scrollElement,\n });\n\n readonly #navigator = new TableVirtualizedNavigator({\n rows: this.#ctx.rows,\n scrollToRow: (index) => this.scrollToRow(index),\n });\n\n constructor() {\n this.#ctx.registerVirtualNavigation(this.#navigator);\n inject(DestroyRef).onDestroy(() => this.#ctx.registerVirtualNavigation(null));\n effect(() => {\n this.#ctx.rows();\n this.#navigator.tryResolvePending();\n });\n }\n\n /**\n * The rows in the visible window plus overscan, augmented to always include the focused row and\n * the row being reordered even when they are scrolled out of view (so the roving-focused cell\n * stays mounted, and a pointer reorder drag never unmounts the lifted row). Render these with\n * `@for (vrow of v.virtualRows(); track vrow.index)` and position each row absolutely with\n * `transform: translateY(vrow.start + 'px')`. Bind each row's `[virtualIndex]=\"vrow.index\"`.\n */\n readonly virtualRows = computed<readonly VirtualItem[]>(() => {\n const items = this.#virtualizer.virtualItems();\n const retain = new Set<number>();\n const focused = this.#ctx.focusedRowIndex();\n if (focused !== null) {\n retain.add(focused);\n }\n const reordering = this.#ctx.reorderingRowIndex();\n if (reordering !== null) {\n retain.add(reordering);\n }\n for (const it of items) {\n retain.delete(it.index);\n }\n if (retain.size === 0) {\n return items;\n }\n const size = this.estimateRowSize();\n const retained: VirtualItem[] = [...retain].map((index) => ({\n index,\n key: index,\n start: index * size,\n size,\n }));\n return [...items, ...retained].sort((a, b) => a.index - b.index);\n });\n\n /** Total scroll size of all rows in px. Bind to the body container's height to size the scroll range. */\n readonly totalSize = this.#virtualizer.totalSize;\n\n /**\n * The rendered window as the inclusive-exclusive `[firstIndex, lastIndex + 1)` index range,\n * sourced from the underlying virtualizer (the true window) — not from {@link virtualRows},\n * which is augmented with the focused / reordering rows. So a row retained out of the window\n * never widens this range. Plugs straight into `injectInfiniteScroll({ range, count, onLoadMore })`.\n */\n readonly range = this.#virtualizer.range;\n\n /**\n * Scroll the container so the row at `index` is in view. Cross-window keyboard\n * navigation calls this internally; consumers may also call it to scroll\n * programmatically.\n */\n scrollToRow(index: number, options?: { align?: 'start' | 'center' | 'end' | 'auto' }): void {\n this.#virtualizer.scrollToIndex(index, options);\n }\n\n /** Record the measured size of a rendered row element (dynamic / measured row heights). */\n measureRow(element: HTMLElement): void {\n this.#virtualizer.measureElement(element);\n }\n}\n","/*\n * Public API surface of forty-cdk/virtualization.\n *\n * Virtualization (the windowing core, the Shape A viewport directives,\n * infinite-scroll, and the `[forTableVirtualized]` companion) ships from this\n * secondary entry point so that `@tanstack/virtual-core` is isolated to its own\n * bundle chunk: only consumers importing from `forty-cdk/virtualization` pull\n * it in, even when another lazy route in the same app virtualizes.\n */\n\nexport {\n injectVirtualizer,\n type ForVirtualizer,\n type VirtualItem,\n type VirtualizerOptions,\n} from './virtualizer';\nexport {\n injectInfiniteScroll,\n type ForInfiniteScroll,\n type InfiniteScrollOptions,\n} from './infinite-scroll';\nexport {\n FOR_VIRTUAL_VIEWPORT_CONTEXT,\n type ForVirtualViewportContext,\n} from './virtual-viewport-context';\nexport { ForVirtualViewport } from './virtual-viewport';\nexport { ForVirtualFor, type ForVirtualForContext } from './virtual-for';\nexport { ForTableVirtualized } from './table-virtualized';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["DEFAULT_OVERSCAN"],"mappings":";;;;;;AAEA;;;;;;;;;;;;;;AAcG;AACG,SAAU,0BAA0B,CAAC,EAAc,EAAA;AACvD,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAErC,IAAI,SAAS,GAAG,KAAK;AAErB,IAAA,MAAM,GAAG,GAAG,eAAe,CAAC,MAAK;AAC/B,QAAA,IAAI,SAAS;YAAE;AACf,QAAA,EAAE,EAAE;AACN,IAAA,CAAC,CAAC;AAEF,IAAA,UAAU,CAAC,SAAS,CAAC,MAAK;QACxB,SAAS,GAAG,IAAI;QAChB,GAAG,CAAC,OAAO,EAAE;AACf,IAAA,CAAC,CAAC;AACJ;;ACRA;AACA,MAAMA,kBAAgB,GAAG,CAAC;AA8D1B;;;;;AAKG;AACG,SAAU,aAAa,CAAC,KAAa,EAAE,YAAuC,EAAA;IAClF,IAAI,KAAK,GAAG,CAAC;AACb,IAAA,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE;AAC1C,QAAA,KAAK,IAAI,YAAY,CAAC,KAAK,CAAC;IAC9B;AACA,IAAA,OAAO,KAAK;AACd;AAEA,SAAS,aAAa,CAAC,IAAqB,EAAA;IAC1C,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,GAAG,EAAE,IAAI,CAAC,GAAsB;QAChC,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB;AACH;AAEA;;;;;;;;;;;;;;;;AAgBG;AACG,SAAU,iBAAiB,CAAC,OAA2B,EAAA;IAC3D,IAAI,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