ng-virtual-list 18.11.2 → 18.12.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/README.md +115 -111
- package/esm2022/lib/components/ng-list-item/base/base-virtual-list-item-component.mjs +170 -61
- package/esm2022/lib/components/ng-list-item/const/index.mjs +41 -2
- package/esm2022/lib/components/ng-list-item/interfaces/template-context.mjs +1 -1
- package/esm2022/lib/components/ng-list-item/ng-virtual-list-item.component.mjs +55 -51
- package/esm2022/lib/components/ng-list-item/ng-virtual-list-item.module.mjs +5 -5
- package/esm2022/lib/components/ng-list-item/utils/create-display-id.mjs +7 -1
- package/esm2022/lib/components/ng-list-item/utils/get-element-by-index.mjs +17 -3
- package/esm2022/lib/components/ng-list-item/utils/index.mjs +3 -2
- package/esm2022/lib/components/ng-list-item/utils/matrix-3d.mjs +18 -0
- package/esm2022/lib/components/ng-prerender-container/components/ng-prerender-list/ng-prerender-list.component.mjs +172 -47
- package/esm2022/lib/components/ng-prerender-container/components/ng-prerender-list-item/ng-prerender-list-item.component.mjs +32 -16
- package/esm2022/lib/components/ng-prerender-container/components/ng-prerender-list-item/ng-prerender-list-item.module.mjs +5 -5
- package/esm2022/lib/components/ng-prerender-container/components/ng-prerender-scroller/ng-prerender-scroller.component.mjs +58 -34
- package/esm2022/lib/components/ng-prerender-container/core/prerender-track-box.mjs +37 -7
- package/esm2022/lib/components/ng-prerender-container/interfaces/refresh-params.mjs +1 -1
- package/esm2022/lib/components/ng-prerender-container/ng-prerender-container.component.mjs +58 -28
- package/esm2022/lib/components/ng-scroll-bar/const/index.mjs +8 -1
- package/esm2022/lib/components/ng-scroll-bar/interfaces/scroll-bar-template-context.mjs +1 -1
- package/esm2022/lib/components/ng-scroll-bar/ng-scroll-bar.component.mjs +236 -88
- package/esm2022/lib/components/ng-scroll-view/base/base-scroll-view.component.mjs +170 -44
- package/esm2022/lib/components/ng-scroll-view/const/index.mjs +4 -2
- package/esm2022/lib/components/ng-scroll-view/interfaces/scroll-to-params.mjs +1 -1
- package/esm2022/lib/components/ng-scroll-view/ng-scroll-view.component.mjs +610 -99
- package/esm2022/lib/components/ng-scroll-view/utils/calculate-direction.mjs +7 -1
- package/esm2022/lib/components/ng-scroll-view/utils/calculate-velocity.mjs +12 -0
- package/esm2022/lib/components/ng-scroll-view/utils/get-dir.mjs +10 -0
- package/esm2022/lib/components/ng-scroll-view/utils/index.mjs +4 -2
- package/esm2022/lib/components/ng-scroll-view/utils/matrix-3d.mjs +15 -0
- package/esm2022/lib/components/ng-scroller/enums/scroller-directions.mjs +1 -1
- package/esm2022/lib/components/ng-scroller/ng-scroller.component.mjs +342 -160
- package/esm2022/lib/const/index.mjs +50 -10
- package/esm2022/lib/core/cache-map.mjs +1 -54
- package/esm2022/lib/core/const/index.mjs +3 -0
- package/esm2022/lib/core/enums/index.mjs +3 -0
- package/esm2022/lib/core/enums/item-display-methods.mjs +14 -0
- package/esm2022/lib/core/events/index.mjs +3 -0
- package/esm2022/lib/core/events/track-box-events.mjs +12 -0
- package/esm2022/lib/core/interfaces/get-item-position-options.mjs +2 -0
- package/esm2022/lib/core/interfaces/get-metrics-returns.mjs +2 -0
- package/esm2022/lib/core/interfaces/index.mjs +2 -0
- package/esm2022/lib/core/interfaces/item.mjs +2 -0
- package/esm2022/lib/core/interfaces/metrics.mjs +2 -0
- package/esm2022/lib/core/interfaces/recalculate-metrics-options.mjs +2 -0
- package/esm2022/lib/core/interfaces/update-collection-options.mjs +2 -0
- package/esm2022/lib/core/interfaces/update-collection-returns.mjs +2 -0
- package/esm2022/lib/core/track-box.mjs +601 -191
- package/esm2022/lib/core/tracker.mjs +14 -8
- package/esm2022/lib/core/types/cache-map-events.mjs +2 -0
- package/esm2022/lib/core/types/cache-map-listeners.mjs +2 -0
- package/esm2022/lib/core/types/cache.mjs +2 -0
- package/esm2022/lib/core/types/index.mjs +2 -0
- package/esm2022/lib/core/types/on-change-event-listener.mjs +2 -0
- package/esm2022/lib/core/types/on-tick-event-listener.mjs +2 -0
- package/esm2022/lib/core/utils/get-service-id-prop.mjs +10 -0
- package/esm2022/lib/core/utils/index.mjs +3 -0
- package/esm2022/lib/directives/index.mjs +3 -3
- package/esm2022/lib/directives/locale-sensitive/locale-sensitive.directive.mjs +34 -13
- package/esm2022/lib/directives/virtual-click/virtual-click.directive.mjs +67 -0
- package/esm2022/lib/directives/virtual-click/virtual-click.module.mjs +19 -0
- package/esm2022/lib/enums/alignments.mjs +12 -0
- package/esm2022/lib/enums/collapsing-modes.mjs +22 -0
- package/esm2022/lib/enums/index.mjs +8 -4
- package/esm2022/lib/enums/selecting-modes-types.mjs +22 -0
- package/esm2022/lib/enums/selecting-modes.mjs +22 -0
- package/esm2022/lib/enums/snap-to-item-aligns.mjs +22 -0
- package/esm2022/lib/enums/spreading-modes.mjs +18 -0
- package/esm2022/lib/interfaces/animation-params.mjs +1 -1
- package/esm2022/lib/interfaces/base-virtual-list-item-component.mjs +2 -9
- package/esm2022/lib/interfaces/index.mjs +1 -1
- package/esm2022/lib/interfaces/item-transformation.mjs +2 -0
- package/esm2022/lib/interfaces/point.mjs +2 -0
- package/esm2022/lib/interfaces/scroll-options.mjs +1 -1
- package/esm2022/lib/interfaces/scroll-params.mjs +1 -1
- package/esm2022/lib/models/item-config-map.model.mjs +1 -1
- package/esm2022/lib/models/item.model.mjs +1 -1
- package/esm2022/lib/models/render-item-config.model.mjs +1 -1
- package/esm2022/lib/models/render-item-measures.model.mjs +1 -1
- package/esm2022/lib/ng-virtual-list-public.service.mjs +6 -7
- package/esm2022/lib/ng-virtual-list.component.mjs +2033 -903
- package/esm2022/lib/ng-virtual-list.service.mjs +91 -30
- package/esm2022/lib/transformations/deck-of-cards-3d.mjs +57 -0
- package/esm2022/lib/transformations/deck-of-cards.mjs +54 -0
- package/esm2022/lib/transformations/event-horizon.mjs +47 -0
- package/esm2022/lib/transformations/index.mjs +13 -0
- package/esm2022/lib/transformations/linear.mjs +47 -0
- package/esm2022/lib/transformations/swipe-3d.mjs +51 -0
- package/esm2022/lib/types/alignment.mjs +2 -0
- package/esm2022/lib/types/arithmetic-expression.mjs +2 -0
- package/esm2022/lib/types/collapsing-mode.mjs +2 -0
- package/esm2022/lib/types/collection-mode.mjs +2 -0
- package/esm2022/lib/types/color.mjs +2 -0
- package/esm2022/lib/types/direction.mjs +2 -0
- package/esm2022/lib/types/float-or-persentage-value.mjs +2 -0
- package/esm2022/lib/types/focus-item-params.mjs +1 -1
- package/esm2022/lib/types/gradient-color-position.mjs +1 -1
- package/esm2022/lib/types/index.mjs +1 -1
- package/esm2022/lib/types/item-transform.mjs +2 -0
- package/esm2022/lib/types/scroll-direction.mjs +1 -1
- package/esm2022/lib/types/selecting-mode.mjs +2 -0
- package/esm2022/lib/types/snap-to-item-align.mjs +2 -0
- package/esm2022/lib/types/snapping-distance.mjs +2 -0
- package/esm2022/lib/types/snapping-method.mjs +2 -0
- package/esm2022/lib/types/spreading-mode.mjs +2 -0
- package/esm2022/lib/types/text-direction.mjs +2 -0
- package/esm2022/lib/utils/animator/animator.mjs +28 -8
- package/esm2022/lib/utils/animator/const/index.mjs +2 -0
- package/esm2022/lib/utils/animator/index.mjs +3 -2
- package/esm2022/lib/utils/animator/interfaces/animator-params.mjs +2 -0
- package/esm2022/lib/utils/animator/interfaces/animator-update-data.mjs +2 -0
- package/esm2022/lib/utils/animator/interfaces/index.mjs +2 -0
- package/esm2022/lib/utils/animator/types/easing.mjs +1 -1
- package/esm2022/lib/utils/disposable-component.mjs +27 -0
- package/esm2022/lib/utils/event-emitter/event-emitter.mjs +1 -1
- package/esm2022/lib/utils/get-scroll-state-version.mjs +12 -0
- package/esm2022/lib/utils/is-collapse-mode.mjs +18 -0
- package/esm2022/lib/utils/is-collection-mode.mjs +1 -1
- package/esm2022/lib/utils/is-direction.mjs +1 -1
- package/esm2022/lib/utils/is-persentage-value.mjs +14 -0
- package/esm2022/lib/utils/is-select-mode.mjs +18 -0
- package/esm2022/lib/utils/is-spreading-mode.mjs +15 -0
- package/esm2022/lib/utils/list-validators.mjs +1 -1
- package/esm2022/lib/utils/normalize-collection.mjs +42 -0
- package/esm2022/lib/utils/object.mjs +1 -1
- package/esm2022/lib/utils/parse-arithmetic-expression.mjs +53 -0
- package/esm2022/lib/utils/parse-float-or-persentage-value.mjs +17 -0
- package/esm2022/lib/utils/scrolling-direction.mjs +29 -0
- package/esm2022/lib/utils/snapping-method.mjs +1 -1
- package/esm2022/public-api.mjs +4 -1
- package/fesm2022/ng-virtual-list.mjs +7545 -3904
- package/fesm2022/ng-virtual-list.mjs.map +1 -1
- package/lib/components/ng-list-item/base/base-virtual-list-item-component.d.ts +40 -16
- package/lib/components/ng-list-item/const/index.d.ts +3 -1
- package/lib/components/ng-list-item/interfaces/template-context.d.ts +1 -1
- package/lib/components/ng-list-item/ng-virtual-list-item.component.d.ts +5 -2
- package/lib/components/ng-list-item/ng-virtual-list-item.module.d.ts +2 -2
- package/lib/components/ng-list-item/utils/create-display-id.d.ts +6 -0
- package/lib/components/ng-list-item/utils/get-element-by-index.d.ts +15 -1
- package/lib/components/ng-list-item/utils/index.d.ts +2 -1
- package/lib/components/ng-list-item/utils/matrix-3d.d.ts +7 -0
- package/lib/components/ng-prerender-container/components/ng-prerender-list/ng-prerender-list.component.d.ts +69 -26
- package/lib/components/ng-prerender-container/components/ng-prerender-list-item/ng-prerender-list-item.component.d.ts +2 -2
- package/lib/components/ng-prerender-container/components/ng-prerender-list-item/ng-prerender-list-item.module.d.ts +2 -2
- package/lib/components/ng-prerender-container/components/ng-prerender-scroller/ng-prerender-scroller.component.d.ts +33 -12
- package/lib/components/ng-prerender-container/interfaces/refresh-params.d.ts +1 -0
- package/lib/components/ng-prerender-container/ng-prerender-container.component.d.ts +20 -17
- package/lib/components/ng-scroll-bar/const/index.d.ts +2 -0
- package/lib/components/ng-scroll-bar/interfaces/scroll-bar-template-context.d.ts +2 -2
- package/lib/components/ng-scroll-bar/ng-scroll-bar.component.d.ts +75 -24
- package/lib/components/ng-scroll-view/base/base-scroll-view.component.d.ts +49 -16
- package/lib/components/ng-scroll-view/const/index.d.ts +3 -1
- package/lib/components/ng-scroll-view/interfaces/scroll-to-params.d.ts +4 -1
- package/lib/components/ng-scroll-view/ng-scroll-view.component.d.ts +79 -11
- package/lib/components/ng-scroll-view/utils/calculate-direction.d.ts +6 -0
- package/lib/components/ng-scroll-view/utils/calculate-velocity.d.ts +7 -0
- package/lib/components/ng-scroll-view/utils/get-dir.d.ts +7 -0
- package/lib/components/ng-scroll-view/utils/index.d.ts +3 -1
- package/lib/components/ng-scroll-view/utils/matrix-3d.d.ts +7 -0
- package/lib/components/ng-scroller/enums/scroller-directions.d.ts +2 -1
- package/lib/components/ng-scroller/ng-scroller.component.d.ts +111 -47
- package/lib/const/index.d.ts +46 -5
- package/lib/core/cache-map.d.ts +0 -10
- package/lib/core/const/index.d.ts +1 -0
- package/lib/core/enums/index.d.ts +2 -0
- package/lib/core/enums/item-display-methods.d.ts +12 -0
- package/lib/core/events/index.d.ts +2 -0
- package/lib/core/events/track-box-events.d.ts +10 -0
- package/lib/core/interfaces/get-item-position-options.d.ts +10 -0
- package/lib/core/interfaces/get-metrics-returns.d.ts +11 -0
- package/lib/core/interfaces/index.d.ts +8 -0
- package/lib/core/interfaces/item.d.ts +9 -0
- package/lib/core/interfaces/metrics.d.ts +51 -0
- package/lib/core/interfaces/recalculate-metrics-options.d.ts +32 -0
- package/lib/core/interfaces/update-collection-options.d.ts +10 -0
- package/lib/core/interfaces/update-collection-returns.d.ts +14 -0
- package/lib/core/track-box.d.ts +25 -95
- package/lib/core/tracker.d.ts +1 -1
- package/lib/core/types/cache-map-events.d.ts +8 -0
- package/lib/core/types/cache-map-listeners.d.ts +9 -0
- package/lib/core/types/cache.d.ts +12 -0
- package/lib/core/types/index.d.ts +6 -0
- package/lib/core/types/on-change-event-listener.d.ts +7 -0
- package/lib/core/types/on-tick-event-listener.d.ts +7 -0
- package/lib/core/utils/get-service-id-prop.d.ts +7 -0
- package/lib/core/utils/index.d.ts +2 -0
- package/lib/directives/index.d.ts +2 -2
- package/lib/directives/locale-sensitive/locale-sensitive.directive.d.ts +16 -6
- package/lib/directives/virtual-click/virtual-click.directive.d.ts +22 -0
- package/lib/directives/virtual-click/virtual-click.module.d.ts +8 -0
- package/lib/enums/alignments.d.ts +10 -0
- package/lib/enums/collapsing-modes.d.ts +20 -0
- package/lib/enums/index.d.ts +7 -9
- package/lib/enums/{method-for-selecting-types.d.ts → selecting-modes-types.d.ts} +3 -3
- package/lib/enums/{methods-for-selecting.d.ts → selecting-modes.d.ts} +3 -3
- package/lib/enums/snap-to-item-aligns.d.ts +20 -0
- package/lib/enums/spreading-modes.d.ts +16 -0
- package/lib/interfaces/animation-params.d.ts +1 -0
- package/lib/interfaces/base-virtual-list-item-component.d.ts +13 -13
- package/lib/interfaces/index.d.ts +3 -2
- package/lib/interfaces/item-transformation.d.ts +22 -0
- package/lib/interfaces/point.d.ts +16 -0
- package/lib/interfaces/scroll-options.d.ts +4 -0
- package/lib/interfaces/scroll-params.d.ts +3 -2
- package/lib/models/item-config-map.model.d.ts +5 -0
- package/lib/models/item.model.d.ts +7 -0
- package/lib/models/render-item-config.model.d.ts +50 -0
- package/lib/models/render-item-measures.model.d.ts +71 -0
- package/lib/ng-virtual-list-public.service.d.ts +4 -5
- package/lib/ng-virtual-list.component.d.ts +462 -135
- package/lib/ng-virtual-list.service.d.ts +33 -12
- package/lib/transformations/deck-of-cards-3d.d.ts +54 -0
- package/lib/transformations/deck-of-cards.d.ts +50 -0
- package/lib/transformations/event-horizon.d.ts +26 -0
- package/lib/transformations/index.d.ts +7 -0
- package/lib/transformations/linear.d.ts +26 -0
- package/lib/transformations/swipe-3d.d.ts +38 -0
- package/lib/types/alignment.d.ts +8 -0
- package/lib/types/arithmetic-expression.d.ts +10 -0
- package/lib/types/collapsing-mode.d.ts +8 -0
- package/lib/{enums → types}/collection-mode.d.ts +1 -1
- package/lib/types/color.d.ts +4 -0
- package/lib/{enums → types}/direction.d.ts +1 -1
- package/lib/types/float-or-persentage-value.d.ts +7 -0
- package/lib/types/focus-item-params.d.ts +6 -0
- package/lib/types/gradient-color-position.d.ts +1 -1
- package/lib/types/index.d.ts +15 -1
- package/lib/types/item-transform.d.ts +9 -0
- package/lib/types/scroll-direction.d.ts +2 -0
- package/lib/types/selecting-mode.d.ts +8 -0
- package/lib/types/snap-to-item-align.d.ts +8 -0
- package/lib/types/snapping-distance.d.ts +8 -0
- package/lib/{enums → types}/snapping-method.d.ts +1 -1
- package/lib/types/spreading-mode.d.ts +8 -0
- package/lib/{enums → types}/text-direction.d.ts +1 -1
- package/lib/utils/animator/animator.d.ts +10 -17
- package/lib/utils/animator/const/index.d.ts +1 -0
- package/lib/utils/animator/index.d.ts +2 -1
- package/lib/utils/animator/interfaces/animator-params.d.ts +18 -0
- package/lib/utils/animator/interfaces/animator-update-data.d.ts +13 -0
- package/lib/utils/animator/interfaces/index.d.ts +3 -0
- package/lib/utils/animator/types/easing.d.ts +6 -0
- package/lib/utils/disposable-component.d.ts +15 -0
- package/lib/utils/get-scroll-state-version.d.ts +1 -0
- package/lib/utils/is-collapse-mode.d.ts +8 -0
- package/lib/utils/is-collection-mode.d.ts +1 -1
- package/lib/utils/is-direction.d.ts +1 -1
- package/lib/utils/is-persentage-value.d.ts +7 -0
- package/lib/utils/is-select-mode.d.ts +8 -0
- package/lib/utils/is-spreading-mode.d.ts +8 -0
- package/lib/utils/list-validators.d.ts +1 -1
- package/lib/utils/normalize-collection.d.ts +8 -0
- package/lib/utils/object.d.ts +1 -1
- package/lib/utils/parse-arithmetic-expression.d.ts +8 -0
- package/lib/utils/parse-float-or-persentage-value.d.ts +7 -0
- package/lib/utils/scrolling-direction.d.ts +17 -0
- package/lib/utils/snapping-method.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
- package/esm2022/lib/components/ng-scroller/const/index.mjs +0 -2
- package/esm2022/lib/directives/item-click/item-click.directive.mjs +0 -59
- package/esm2022/lib/directives/item-click/item-click.module.mjs +0 -19
- package/esm2022/lib/enums/collection-mode.mjs +0 -2
- package/esm2022/lib/enums/direction.mjs +0 -2
- package/esm2022/lib/enums/method-for-selecting-types.mjs +0 -22
- package/esm2022/lib/enums/method-for-selecting.mjs +0 -2
- package/esm2022/lib/enums/methods-for-selecting.mjs +0 -22
- package/esm2022/lib/enums/snapping-method.mjs +0 -2
- package/esm2022/lib/enums/text-direction.mjs +0 -2
- package/esm2022/lib/utils/is-method-for-selecting.mjs +0 -18
- package/lib/components/ng-scroller/const/index.d.ts +0 -1
- package/lib/directives/item-click/item-click.directive.d.ts +0 -19
- package/lib/directives/item-click/item-click.module.d.ts +0 -8
- package/lib/enums/method-for-selecting.d.ts +0 -8
- package/lib/utils/is-method-for-selecting.d.ts +0 -8
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
1
2
|
import { TrackBox } from './core/track-box';
|
|
2
|
-
import { IRenderVirtualListItem, IVirtualListItem } from './models';
|
|
3
|
-
import { IAnimationParams, IScrollOptions, ISize } from './interfaces';
|
|
3
|
+
import { IRenderVirtualListItem, IVirtualListCollection, IVirtualListItem, IVirtualListItemConfigMap } from './models';
|
|
4
|
+
import { IAnimationParams, IRect, IScrollOptions, ISize } from './interfaces';
|
|
4
5
|
import { IRenderVirtualListCollection } from './models/render-collection.model';
|
|
5
|
-
import { TextDirection } from './
|
|
6
|
-
import {
|
|
6
|
+
import { TextDirection } from './types';
|
|
7
|
+
import { SelectingModesTypes } from './enums/selecting-modes-types';
|
|
7
8
|
import { FocusAlignment, Id } from './types';
|
|
8
9
|
import { FocusItemParams } from './types/focus-item-params';
|
|
9
10
|
import { IScrollToParams } from './interfaces/scroll-to-params';
|
|
@@ -17,20 +18,22 @@ import * as i0 from "@angular/core";
|
|
|
17
18
|
* @email djonnyx@gmail.com
|
|
18
19
|
*/
|
|
19
20
|
export declare class NgVirtualListService {
|
|
21
|
+
protected _$unsubscribe: Subject<void>;
|
|
20
22
|
private _id;
|
|
21
23
|
get id(): number;
|
|
22
24
|
private _nextComponentId;
|
|
23
|
-
private _$
|
|
24
|
-
$
|
|
25
|
+
private _$virtualClick;
|
|
26
|
+
$virtualClick: import("rxjs").Observable<IRenderVirtualListItem<any> | null>;
|
|
25
27
|
private _$selectedIds;
|
|
26
28
|
$selectedIds: import("rxjs").Observable<Id | Id[] | null>;
|
|
27
29
|
private _$collapsedIds;
|
|
28
30
|
$collapsedIds: import("rxjs").Observable<Id[]>;
|
|
29
|
-
private _$
|
|
30
|
-
$
|
|
31
|
-
set
|
|
31
|
+
private _$selectingMode;
|
|
32
|
+
$selectingMode: import("rxjs").Observable<SelectingModesTypes>;
|
|
33
|
+
set selectingMode(v: SelectingModesTypes);
|
|
32
34
|
private _$focusedId;
|
|
33
35
|
$focusedId: import("rxjs").Observable<Id | null>;
|
|
36
|
+
set focusedId(v: Id | null);
|
|
34
37
|
get focusedId(): Id | null;
|
|
35
38
|
private _$focusItem;
|
|
36
39
|
readonly $focusItem: import("rxjs").Observable<FocusItemParams>;
|
|
@@ -48,16 +51,25 @@ export declare class NgVirtualListService {
|
|
|
48
51
|
lastFocusedItemId: number;
|
|
49
52
|
scrollStartOffset: number;
|
|
50
53
|
scrollEndOffset: number;
|
|
54
|
+
zIndexWhenSelecting: string | null;
|
|
51
55
|
selectByClick: boolean;
|
|
52
56
|
collapseByClick: boolean;
|
|
53
57
|
defaultItemValue: IVirtualListItem | null;
|
|
58
|
+
snapToItem: boolean;
|
|
59
|
+
isInfinity: boolean;
|
|
54
60
|
isVertical: boolean;
|
|
55
61
|
dynamic: boolean;
|
|
62
|
+
itemSize: number;
|
|
56
63
|
snapScrollToStart: boolean;
|
|
57
64
|
snapScrollToEnd: boolean;
|
|
58
65
|
animationParams: IAnimationParams;
|
|
66
|
+
isNoneCollapse: boolean;
|
|
67
|
+
isMultipleCollapse: boolean;
|
|
68
|
+
isAccordionCollapse: boolean;
|
|
59
69
|
private _trackBox;
|
|
60
70
|
listElement: HTMLDivElement | null;
|
|
71
|
+
items: IVirtualListCollection;
|
|
72
|
+
itemConfigMap: IVirtualListItemConfigMap;
|
|
61
73
|
private _$displayItems;
|
|
62
74
|
readonly $displayItems: import("rxjs").Observable<IRenderVirtualListCollection>;
|
|
63
75
|
get displayItems(): IRenderVirtualListCollection;
|
|
@@ -74,6 +86,8 @@ export declare class NgVirtualListService {
|
|
|
74
86
|
set scrollBarSize(v: number);
|
|
75
87
|
private _$scrollBarSize;
|
|
76
88
|
readonly $scrollBarSize: import("rxjs").Observable<number>;
|
|
89
|
+
private _$intersectionElementBySnapToItemAlign;
|
|
90
|
+
readonly $intersectionElementBySnapToItemAlign: import("rxjs").Observable<Id | null>;
|
|
77
91
|
private _$clickDistance;
|
|
78
92
|
readonly $clickDistance: import("rxjs").Observable<number>;
|
|
79
93
|
get clickDistance(): number;
|
|
@@ -86,8 +100,8 @@ export declare class NgVirtualListService {
|
|
|
86
100
|
set collapsedIds(ids: Array<Id>);
|
|
87
101
|
get collapsedIds(): Array<Id>;
|
|
88
102
|
constructor();
|
|
89
|
-
|
|
90
|
-
update(immediately?: boolean
|
|
103
|
+
virtualClick(data: IRenderVirtualListItem | null): void;
|
|
104
|
+
update(immediately?: boolean): void;
|
|
91
105
|
private getItemConfig;
|
|
92
106
|
/**
|
|
93
107
|
* Selects a list item
|
|
@@ -111,10 +125,16 @@ export declare class NgVirtualListService {
|
|
|
111
125
|
*/
|
|
112
126
|
focusById(id: Id, align?: FocusAlignment, scrollBehavior?: ScrollBehavior): void;
|
|
113
127
|
focus(element: HTMLElement, align?: FocusAlignment, behavior?: ScrollBehavior): boolean;
|
|
128
|
+
focusList(): void;
|
|
114
129
|
focusFirstElement(): void;
|
|
115
|
-
areaFocus(id: Id | null): void;
|
|
116
130
|
initialize(id: number, trackBox: TrackBox): void;
|
|
117
131
|
generateComponentId(): number;
|
|
132
|
+
getComponentBoundsByIntersectionPosition(position: number, maxPosition?: number | null): (IRect & {
|
|
133
|
+
id: Id | null;
|
|
134
|
+
isFirst: boolean;
|
|
135
|
+
isLast: boolean;
|
|
136
|
+
}) | null;
|
|
137
|
+
setIntersectionElementBySnapToItemAlign(id: Id | null): void;
|
|
118
138
|
/**
|
|
119
139
|
* The method scrolls the list to the element with the given `id` and returns the value of the scrolled area.
|
|
120
140
|
*/
|
|
@@ -127,6 +147,7 @@ export declare class NgVirtualListService {
|
|
|
127
147
|
* Scrolls the list to the end of the content size.
|
|
128
148
|
*/
|
|
129
149
|
scrollToEnd(options?: IScrollOptions): void;
|
|
150
|
+
dispose(): void;
|
|
130
151
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgVirtualListService, never>;
|
|
131
152
|
static ɵprov: i0.ɵɵInjectableDeclaration<NgVirtualListService>;
|
|
132
153
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Color, ItemTransform } from '../types';
|
|
2
|
+
export interface IDeckOfCards3DOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Depth Of Field. Default value is `null`.
|
|
5
|
+
*/
|
|
6
|
+
dof?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Fog color. Default value is `null`.
|
|
9
|
+
*/
|
|
10
|
+
fogColor?: Color;
|
|
11
|
+
/**
|
|
12
|
+
* Fog weight. Default value is `null`.
|
|
13
|
+
*/
|
|
14
|
+
fogWeight?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Spacing between items. Default value is `0.5`.
|
|
17
|
+
*/
|
|
18
|
+
spacingBetweenItems?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Angle of inclination. Default value is `1`.
|
|
21
|
+
*/
|
|
22
|
+
angle?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Depth. Default value is `0.15`.
|
|
25
|
+
*/
|
|
26
|
+
depth?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Scale. Default value is `0.15`.
|
|
29
|
+
*/
|
|
30
|
+
scale?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Scale X. Default value is `null`.
|
|
33
|
+
*/
|
|
34
|
+
scaleX?: number | null;
|
|
35
|
+
/**
|
|
36
|
+
* Scale Y. Default value is `null`.
|
|
37
|
+
*/
|
|
38
|
+
scaleY?: number | null;
|
|
39
|
+
/**
|
|
40
|
+
* Depth exponent. Default value is `4`.
|
|
41
|
+
*/
|
|
42
|
+
depthPow?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Sinusoidal distribution. Default value is `false`.
|
|
45
|
+
*/
|
|
46
|
+
sineWave?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* deckOfCards3D
|
|
50
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/transformations/deck-of-cards-3d.ts
|
|
51
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
52
|
+
* @email djonnyx@gmail.com
|
|
53
|
+
*/
|
|
54
|
+
export declare const deckOfCards3D: (options?: IDeckOfCards3DOptions) => ItemTransform;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Color, ItemTransform } from '../types';
|
|
2
|
+
export interface IDeckOfCardsOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Depth Of Field. Default value is `null`.
|
|
5
|
+
*/
|
|
6
|
+
dof?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Fog color. Default value is `null`.
|
|
9
|
+
*/
|
|
10
|
+
fogColor?: Color;
|
|
11
|
+
/**
|
|
12
|
+
* Fog weight. Default value is `null`.
|
|
13
|
+
*/
|
|
14
|
+
fogWeight?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Spacing between items. Default value is `0.5`.
|
|
17
|
+
*/
|
|
18
|
+
spacingBetweenItems?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Depth. Default value is `0.15`.
|
|
21
|
+
*/
|
|
22
|
+
depth?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Scale. Default value is `0.15`.
|
|
25
|
+
*/
|
|
26
|
+
scale?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Scale X. Default value is `null`.
|
|
29
|
+
*/
|
|
30
|
+
scaleX?: number | null;
|
|
31
|
+
/**
|
|
32
|
+
* Scale Y. Default value is `null`.
|
|
33
|
+
*/
|
|
34
|
+
scaleY?: number | null;
|
|
35
|
+
/**
|
|
36
|
+
* Depth exponent. Default value is `4`.
|
|
37
|
+
*/
|
|
38
|
+
depthPow?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Sinusoidal distribution. Default value is `false`.
|
|
41
|
+
*/
|
|
42
|
+
sineWave?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* deckOfCards
|
|
46
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/transformations/deck-of-cards.ts
|
|
47
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
48
|
+
* @email djonnyx@gmail.com
|
|
49
|
+
*/
|
|
50
|
+
export declare const deckOfCards: (options?: IDeckOfCardsOptions) => ItemTransform;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Color, ItemTransform } from '../types';
|
|
2
|
+
export interface IEventHorizonOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Depth Of Field. Default value is `null`.
|
|
5
|
+
*/
|
|
6
|
+
dof?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Fog color. Default value is `null`.
|
|
9
|
+
*/
|
|
10
|
+
fogColor?: Color;
|
|
11
|
+
/**
|
|
12
|
+
* Fog weight. Default value is `null`.
|
|
13
|
+
*/
|
|
14
|
+
fogWeight?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Spacing between items. Default value is `0.5`.
|
|
17
|
+
*/
|
|
18
|
+
spacingBetweenItems?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* eventHorizon
|
|
22
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/transformations/event-horizon.ts
|
|
23
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
24
|
+
* @email djonnyx@gmail.com
|
|
25
|
+
*/
|
|
26
|
+
export declare const eventHorizon: (options?: IEventHorizonOptions) => ItemTransform;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const ItemTransformations: {
|
|
2
|
+
EVENT_HORIZON: (options?: import("./event-horizon").IEventHorizonOptions) => import("ng-virtual-list").ItemTransform;
|
|
3
|
+
LINEAR: (options?: import("./linear").ILintearOptions) => import("ng-virtual-list").ItemTransform;
|
|
4
|
+
DECK_OF_CARDS: (options?: import("./deck-of-cards").IDeckOfCardsOptions) => import("ng-virtual-list").ItemTransform;
|
|
5
|
+
DECK_OF_CARDS_3D: (options?: import("./deck-of-cards-3d").IDeckOfCards3DOptions) => import("ng-virtual-list").ItemTransform;
|
|
6
|
+
SWIPE_3D: (options?: import("./swipe-3d").ISwipe3DOptions) => import("ng-virtual-list").ItemTransform;
|
|
7
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Color, ItemTransform } from '../types';
|
|
2
|
+
export interface ILintearOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Depth Of Field. Default value is `null`.
|
|
5
|
+
*/
|
|
6
|
+
dof?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Fog color. Default value is `null`.
|
|
9
|
+
*/
|
|
10
|
+
fogColor?: Color;
|
|
11
|
+
/**
|
|
12
|
+
* Fog weight. Default value is `null`.
|
|
13
|
+
*/
|
|
14
|
+
fogWeight?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Spacing between items. Default value is `0.5`.
|
|
17
|
+
*/
|
|
18
|
+
spacingBetweenItems?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* linear
|
|
22
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/transformations/linear.ts
|
|
23
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
24
|
+
* @email djonnyx@gmail.com
|
|
25
|
+
*/
|
|
26
|
+
export declare const linear: (options?: ILintearOptions) => ItemTransform;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Color, ItemTransform } from '../types';
|
|
2
|
+
export interface ISwipe3DOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Depth Of Field. Default value is `null`.
|
|
5
|
+
*/
|
|
6
|
+
dof?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Fog color. Default value is `null`.
|
|
9
|
+
*/
|
|
10
|
+
fogColor?: Color;
|
|
11
|
+
/**
|
|
12
|
+
* Fog weight. Default value is `null`.
|
|
13
|
+
*/
|
|
14
|
+
fogWeight?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Spacing between items. Default value is `0.5`.
|
|
17
|
+
*/
|
|
18
|
+
spacingBetweenItems?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Angle of inclination. Default value is `1`.
|
|
21
|
+
*/
|
|
22
|
+
angle?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Depth. Default value is `1.5`.
|
|
25
|
+
*/
|
|
26
|
+
depth?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Depth exponent. Default value is `4`.
|
|
29
|
+
*/
|
|
30
|
+
depthPow?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* swipe3D
|
|
34
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/transformations/swipe-3d.ts
|
|
35
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
36
|
+
* @email djonnyx@gmail.com
|
|
37
|
+
*/
|
|
38
|
+
export declare const swipe3D: (options?: ISwipe3DOptions) => ItemTransform;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Alignments } from "../enums/alignments";
|
|
2
|
+
/**
|
|
3
|
+
* Alignment
|
|
4
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/enums/alignment.ts
|
|
5
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
6
|
+
* @email djonnyx@gmail.com
|
|
7
|
+
*/
|
|
8
|
+
export type Alignment = Alignments | 'none' | 'center';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FloatOrPersentageValue } from "./float-or-persentage-value";
|
|
2
|
+
type Operator = '+' | '-';
|
|
3
|
+
/**
|
|
4
|
+
* ArithmeticExpression
|
|
5
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/types/arithmetic-expression.ts
|
|
6
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
7
|
+
* @email djonnyx@gmail.com
|
|
8
|
+
*/
|
|
9
|
+
export type ArithmeticExpression = FloatOrPersentageValue | `${FloatOrPersentageValue}${Operator}${FloatOrPersentageValue}` | `${FloatOrPersentageValue} ${Operator} ${FloatOrPersentageValue}`;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CollapsingModes } from "../enums/collapsing-modes";
|
|
2
|
+
/**
|
|
3
|
+
* Modes for collapsing list items.
|
|
4
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/enums/collapsing-mode.ts
|
|
5
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
6
|
+
* @email djonnyx@gmail.com
|
|
7
|
+
*/
|
|
8
|
+
export type CollapsingMode = CollapsingModes | 'none' | 'multi-collapse' | 'accordion';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CollectionModes } from "
|
|
1
|
+
import { CollectionModes } from "../enums/collection-modes";
|
|
2
2
|
/**
|
|
3
3
|
* Action modes for collection elements.
|
|
4
4
|
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/enums/collection-mode.ts
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2026 Evgenii Alexandrovich Grebennikov (djonnyx@gmail.com tg: http://t.me/djonnyx).
|
|
3
|
+
*/
|
|
4
|
+
export type Color = `#${string}` | `rgb(${number},${number},${number})` | `rgba(${number},${number},${number},${number})` | `rgba(#${string},${number})`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FloatOrPersentageValue
|
|
3
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/types/float-or-persentage-value.ts
|
|
4
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
5
|
+
* @email djonnyx@gmail.com
|
|
6
|
+
*/
|
|
7
|
+
export type FloatOrPersentageValue = number | `${number}%`;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { FocusAlignment } from "./focus-alignment";
|
|
2
|
+
/**
|
|
3
|
+
* FocusItemParams
|
|
4
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/types/focus-item-params.ts
|
|
5
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
6
|
+
* @email djonnyx@gmail.com
|
|
7
|
+
*/
|
|
2
8
|
export type FocusItemParams = {
|
|
3
9
|
element: HTMLElement;
|
|
4
10
|
position: number;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
|
+
import { Alignment } from './alignment';
|
|
2
|
+
import { ArithmeticExpression } from './arithmetic-expression';
|
|
1
3
|
import { Id } from './id';
|
|
4
|
+
import { Color } from './color';
|
|
5
|
+
import { FloatOrPersentageValue } from './float-or-persentage-value';
|
|
6
|
+
import { ItemTransform } from './item-transform';
|
|
2
7
|
import { FocusAlignment } from './focus-alignment';
|
|
3
8
|
import { ScrollDirection } from './scroll-direction';
|
|
9
|
+
import { SnappingDistance } from './snapping-distance';
|
|
4
10
|
import { GradientColorPosition } from './gradient-color-position';
|
|
5
11
|
import { GradientColorPositions } from './gradient-color-positions';
|
|
6
|
-
|
|
12
|
+
import { CollectionMode } from "../types/collection-mode";
|
|
13
|
+
import { Direction } from "../types/direction";
|
|
14
|
+
import { CollapsingMode } from "./collapsing-mode";
|
|
15
|
+
import { SelectingMode } from "./selecting-mode";
|
|
16
|
+
import { SnapToItemAlign } from '../types/snap-to-item-align';
|
|
17
|
+
import { SnappingMethod } from "../types/snapping-method";
|
|
18
|
+
import { SpreadingMode } from "../types/spreading-mode";
|
|
19
|
+
import { TextDirection } from "../types/text-direction";
|
|
20
|
+
export type { Alignment, ArithmeticExpression, CollapsingMode, CollectionMode, Color, Direction, GradientColorPosition, GradientColorPositions, FloatOrPersentageValue, FocusAlignment, Id, ItemTransform, ScrollDirection, SnappingDistance, SelectingMode, SnappingMethod, SnapToItemAlign, SpreadingMode, TextDirection, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IItemTransformation } from "../interfaces";
|
|
2
|
+
import { IRenderVirtualListItemConfig, IRenderVirtualListItemMeasures } from "../models";
|
|
3
|
+
/**
|
|
4
|
+
* ItemTransform
|
|
5
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/types/item-transform.ts
|
|
6
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
7
|
+
* @email djonnyx@gmail.com
|
|
8
|
+
*/
|
|
9
|
+
export type ItemTransform = (index: number, measures: IRenderVirtualListItemMeasures, config: IRenderVirtualListItemConfig) => IItemTransformation;
|
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
* A value of -1 indicates the direction is up or left (if the list direction is horizontal).
|
|
3
3
|
* A value of 1 indicates the direction is down or right (if the list direction is horizontal).
|
|
4
4
|
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/types/scroll-direction.ts
|
|
5
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
6
|
+
* @email djonnyx@gmail.com
|
|
5
7
|
*/
|
|
6
8
|
export type ScrollDirection = -1 | 1 | 0;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SelectingModes } from "../enums/selecting-modes";
|
|
2
|
+
/**
|
|
3
|
+
* Modes for selecting list items.
|
|
4
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/enums/selecting-mode.ts
|
|
5
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
6
|
+
* @email djonnyx@gmail.com
|
|
7
|
+
*/
|
|
8
|
+
export type SelectingMode = SelectingModes | 'none' | 'select' | 'multi-select';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SnapToItemAligns } from "../enums/snap-to-item-aligns";
|
|
2
|
+
/**
|
|
3
|
+
* SnapToItemAlign.
|
|
4
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/enums/snap-to-item-align.ts
|
|
5
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
6
|
+
* @email djonnyx@gmail.com
|
|
7
|
+
*/
|
|
8
|
+
export type SnapToItemAlign = SnapToItemAligns | 'start' | 'center' | 'end';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SnappingDistance
|
|
3
|
+
* Snapping activation distance. Can be specified as a percentage of the element size or in absolute values.
|
|
4
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/types/snapping-distance.ts
|
|
5
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
6
|
+
* @email djonnyx@gmail.com
|
|
7
|
+
*/
|
|
8
|
+
export type SnappingDistance = `${number}%` | number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SpreadingModes } from "../enums";
|
|
2
|
+
/**
|
|
3
|
+
* SpreadingMode
|
|
4
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/enums/spreading-mode.ts
|
|
5
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
6
|
+
* @email djonnyx@gmail.com
|
|
7
|
+
*/
|
|
8
|
+
export type SpreadingMode = SpreadingModes | 'normal' | 'infinity';
|
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
onUpdate?: (data: IAnimatorUpdateData) => void;
|
|
9
|
-
onComplete?: (data: IAnimatorUpdateData) => void;
|
|
10
|
-
}
|
|
11
|
-
interface IAnimatorUpdateData {
|
|
12
|
-
timestamp: number;
|
|
13
|
-
delta: number;
|
|
14
|
-
value: number;
|
|
15
|
-
}
|
|
16
|
-
export declare const DEFAULT_ANIMATION_DURATION = 500, ANIMATOR_MIN_TIMESTAMP: number, MIN_ANIMATED_VALUE = 10;
|
|
1
|
+
import { IAnimatorParams } from './interfaces';
|
|
2
|
+
/**
|
|
3
|
+
* Animator
|
|
4
|
+
* @link https://github.com/DjonnyX/data-channel-router/blob/main/library/src/utils/animator/animator.ts
|
|
5
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
6
|
+
* @email djonnyx@gmail.com
|
|
7
|
+
*/
|
|
17
8
|
export declare class Animator {
|
|
9
|
+
private static _nextId;
|
|
18
10
|
private _animationId;
|
|
11
|
+
private _currentId;
|
|
12
|
+
private generateId;
|
|
19
13
|
animate(params: IAnimatorParams): void;
|
|
20
14
|
stop(): void;
|
|
21
15
|
dispose(): void;
|
|
22
16
|
}
|
|
23
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_WITH_DELTA = false, DEFAULT_ANIMATION_DURATION = 500, ANIMATOR_MIN_TIMESTAMP: number, MIN_ANIMATED_VALUE = 10;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Animator
|
|
1
|
+
import { Animator } from "./animator";
|
|
2
|
+
import { ANIMATOR_MIN_TIMESTAMP } from './const';
|
|
2
3
|
import { easeLinear, easeOutQuad } from './ease';
|
|
3
4
|
import { Easing } from './types';
|
|
4
5
|
export { Animator, easeLinear, easeOutQuad, ANIMATOR_MIN_TIMESTAMP, };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Easing } from "../types";
|
|
2
|
+
import { IAnimatorUpdateData } from "./animator-update-data";
|
|
3
|
+
/**
|
|
4
|
+
* IAnimatorParams
|
|
5
|
+
* @link https://github.com/DjonnyX/data-channel-router/blob/main/library/src/utils/animator/interfaces/animator-params.ts
|
|
6
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
7
|
+
* @email djonnyx@gmail.com
|
|
8
|
+
*/
|
|
9
|
+
export interface IAnimatorParams {
|
|
10
|
+
startValue: number;
|
|
11
|
+
endValue: number;
|
|
12
|
+
duration?: number;
|
|
13
|
+
withDelta?: boolean;
|
|
14
|
+
getPropValue?: () => number;
|
|
15
|
+
easingFunction?: Easing;
|
|
16
|
+
onUpdate?: (data: IAnimatorUpdateData) => void;
|
|
17
|
+
onComplete?: (data: IAnimatorUpdateData) => void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IAnimatorUpdateData
|
|
3
|
+
* @link https://github.com/DjonnyX/data-channel-router/blob/main/library/src/utils/animator/interfaces/animator-update-data.ts
|
|
4
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
5
|
+
* @email djonnyx@gmail.com
|
|
6
|
+
*/
|
|
7
|
+
export interface IAnimatorUpdateData {
|
|
8
|
+
id: number;
|
|
9
|
+
timestamp: number;
|
|
10
|
+
elapsed: number;
|
|
11
|
+
delta: number;
|
|
12
|
+
value: number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Base disposable component
|
|
6
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/utils/disposable-component.ts
|
|
7
|
+
* @author Evgenii Grebennikov
|
|
8
|
+
* @email djonnyx@gmail.com
|
|
9
|
+
*/
|
|
10
|
+
export declare class DisposableComponent implements OnDestroy {
|
|
11
|
+
protected _$unsubscribe: Subject<void>;
|
|
12
|
+
ngOnDestroy(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DisposableComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DisposableComponent, "ng-component", never, {}, {}, never, never, false, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getScrollStateVersion: (totalSize: number, scrollSize: number) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CollapsingMode } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Defines the mode for collapsing list items.
|
|
4
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/utils/is-collapse-mode.ts
|
|
5
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
6
|
+
* @email djonnyx@gmail.com
|
|
7
|
+
*/
|
|
8
|
+
export declare const isCollapseMode: (src: CollapsingMode, expected: CollapsingMode) => boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* isPercentageValue
|
|
3
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/utils/is-persentage-value.ts
|
|
4
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
5
|
+
* @email djonnyx@gmail.com
|
|
6
|
+
*/
|
|
7
|
+
export declare const isPercentageValue: (value: number | `${number}%` | string) => boolean;
|