-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from lVlyke/0.1.0
0.1.0
- Loading branch information
Showing
15 changed files
with
933 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"name": "@lithiumjs/ngx-virtual-scroll", | ||
"description": "A fast virtual scrolling solution for Angular that natively supports items with unequal heights. Built with @lithiumjs/angular.", | ||
"description": "A fast and lightweight virtual scrolling solution for Angular that supports single column lists, grid lists and view caching.", | ||
"repository": "https://github.com/lVlyke/lithium-ngx-virtual-scroll", | ||
"version": "0.0.6", | ||
"version": "0.1.0", | ||
"main": "index.js", | ||
"author": "Mychal Thompson <[email protected]>", | ||
"license": "MIT", | ||
|
3 changes: 3 additions & 0 deletions
3
src/components/virtual-scroll/scroll-state/virtual-scroll-state.token.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { InjectionToken } from "@angular/core"; | ||
|
||
export const LI_VIRTUAL_SCROLL_STATE = new InjectionToken("LI_VIRTUAL_SCROLL_STATE"); |
23 changes: 23 additions & 0 deletions
23
src/components/virtual-scroll/scroll-state/virtual-scroll-state.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { EmbeddedViewRef, TemplateRef, ViewContainerRef } from "@angular/core"; | ||
import { VirtualItem } from "../../../directives/virtual-item.directive"; | ||
import { VirtualPlaceholder } from "../../../directives/virtual-placeholder.directive"; | ||
|
||
export interface VirtualScrollState<T> { | ||
|
||
readonly items: T[]; | ||
readonly renderedItems: T[]; | ||
readonly viewCache: number | boolean; | ||
readonly minIndex: number; | ||
readonly maxIndex: number; | ||
|
||
readonly virtualItem: VirtualItem<T>; | ||
readonly viewContainerRef: ViewContainerRef; | ||
readonly placeholderTemplate: TemplateRef<VirtualPlaceholder.ViewContext<T>> | ||
readonly cachedViews: VirtualScrollState.ViewRecord<T>; | ||
readonly renderedViews: VirtualScrollState.ViewRecord<T>; | ||
} | ||
|
||
export namespace VirtualScrollState { | ||
|
||
export type ViewRecord<T> = Record<number, EmbeddedViewRef<VirtualItem.ViewContext<T>>>; | ||
} |
Oops, something went wrong.