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,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* calculateDirection
|
|
3
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/components/ng-scroll-view/utils/calculate-direction.ts
|
|
4
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
5
|
+
* @email djonnyx@gmail.com
|
|
6
|
+
*/
|
|
1
7
|
export const calculateDirection = (buffer) => {
|
|
2
8
|
for (let i = buffer.length - 1, l = 0; i >= l; i--) {
|
|
3
9
|
const v = buffer[i];
|
|
@@ -8,4 +14,4 @@ export const calculateDirection = (buffer) => {
|
|
|
8
14
|
}
|
|
9
15
|
return 1;
|
|
10
16
|
};
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsY3VsYXRlLWRpcmVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25nLXZpcnR1YWwtbGlzdC9zcmMvbGliL2NvbXBvbmVudHMvbmctc2Nyb2xsLXZp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yOiBBcnJheTxbbnVtYmVyLCBudW1iZXJdPikgPT4ge1xyXG4gICAgZm9yIChsZXQgaSA9IGJ1ZmZlci5sZW5ndGggLSAxLCBsID0gMDsgaSA+PSBsOyBpLS0pIHtcclxuICAgICAgICBjb25zdCB2ID0gYnVmZmVyW2ldO1xyXG4gICAgICAgIGlmICh2WzBdID09PSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnRpbnVlO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gTWF0aC5zaWduKHZbMF0pO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIDE7XHJcbn07XHJcbiJdfQ==
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { INSTANT_VELOCITY_SCALE } from "../const";
|
|
2
|
+
/**
|
|
3
|
+
* calculateVelocity
|
|
4
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/components/ng-scroll-view/utils/calculate-velocity.ts
|
|
5
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
6
|
+
* @email djonnyx@gmail.com
|
|
7
|
+
*/
|
|
8
|
+
export const calculateVelocity = (startPosition, currentPosition, timestamp) => {
|
|
9
|
+
const s = currentPosition - startPosition, t = timestamp;
|
|
10
|
+
return t !== 0 ? (s / t) * INSTANT_VELOCITY_SCALE : 0;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsY3VsYXRlLXZlbG9jaXR5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmctdmlydHVhbC1saXN0L3NyYy9saWIvY29tcG9uZW50cy9uZy1zY3JvbGwtdmlldy91dGlscy9jYWxjdWxhdGUtdmVsb2NpdHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHNCQUFzQixFQUFF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0YW1wO1xyXG4gICAgcmV0dXJuIHQgIT09IDAgPyAocyAvIHQpICogSU5TVEFOVF9WRUxPQ0lUWV9TQ0FMRSA6IDA7XHJcbn0iXX0=
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* getDir
|
|
3
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/components/ng-scroll-view/utils/get-dir.ts
|
|
4
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
5
|
+
* @email djonnyx@gmail.com
|
|
6
|
+
*/
|
|
7
|
+
export const getDir = (p, c) => {
|
|
8
|
+
return p < c ? 1 : p > c ? -1 : 0;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LWRpci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25nLXZpcnR1YWwtbGlzdC9zcmMvbGliL2NvbXBvbmVudHMvbmctc2Nyb2xsLXZpZXcvdXRpbHMvZ2V0LWRpci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7R0FLRztBQUNILE1BQU0sQ0FBQyxNQUFNLE1BQU0sR0FBRyxDQUFDLENBQVMsRUFBRSxDQUFTLEVBQUUsRUFBRTtJQUMzQyxPQUFPLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUN0QyxDQUFDLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcclxuICogZ2V0RGlyXHJcbiAqIEBsaW5rIGh0dHBzOi8vZ2l0aHViLmNvbS9Eam9ubnlYL25nLXZpcnR1YWwtbGlzdC9ibG9iLzE4LngvcHJvamVjdHMvbmctdmlydHVhbC1saXN0L3NyYy9saWIvY29tcG9uZW50cy9uZy1zY3JvbGwtdmlldy91dGlscy9nZXQtZGlyLnRzXHJcbiAqIEBhdXRob3IgRXZnZW5paSBBbGV4YW5kcm92aWNoIEdyZWJlbm5pa292XHJcbiAqIEBlbWFpbCBkam9ubnl4QGdtYWlsLmNvbVxyXG4gKi9cclxuZXhwb3J0IGNvbnN0IGdldERpciA9IChwOiBudW1iZXIsIGM6IG51bWJlcikgPT4ge1xyXG4gICAgcmV0dXJuIHAgPCBjID8gMSA6IHAgPiBjID8gLTEgOiAwO1xyXG59Il19
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { calculateDirection } from "./calculate-direction";
|
|
2
2
|
import { ScrollBox } from "./scroll-box";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { matrix3d } from "./matrix-3d";
|
|
4
|
+
import { getDir } from "./get-dir";
|
|
5
|
+
export { calculateDirection, getDir, matrix3d, ScrollBox, };
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZy12aXJ0dWFsLWxpc3Qvc3JjL2xpYi9jb21wb25lbnRzL25nLXNjcm9sbC12aWV3L3V0aWxzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQzNELE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFDekMsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUN2QyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBRW5DLE9BQU8sRUFDSCxrQkFBa0IsRUFDbEIsTUFBTSxFQUNOLFFBQVEsRUFDUixTQUFTLEdBQ1osQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNhbGN1bGF0ZURpcmVjdGlvbiB9IGZyb20gXCIuL2NhbGN1bGF0ZS1kaXJlY3Rpb25cIjtcclxuaW1wb3J0IHsgU2Nyb2xsQm94IH0gZnJvbSBcIi4vc2Nyb2xsLWJveFwiO1xyXG5pbXBvcnQgeyBtYXRyaXgzZCB9IGZyb20gXCIuL21hdHJpeC0zZFwiO1xyXG5pbXBvcnQgeyBnZXREaXIgfSBmcm9tIFwiLi9nZXQtZGlyXCI7XHJcblxyXG5leHBvcnQge1xyXG4gICAgY2FsY3VsYXRlRGlyZWN0aW9uLFxyXG4gICAgZ2V0RGlyLFxyXG4gICAgbWF0cml4M2QsXHJcbiAgICBTY3JvbGxCb3gsXHJcbn1cclxuIl19
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* matrix3d
|
|
3
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/components/ng-scroll-view/utils/matrix-3d.ts
|
|
4
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
5
|
+
* @email djonnyx@gmail.com
|
|
6
|
+
*/
|
|
7
|
+
export const matrix3d = (x, y) => {
|
|
8
|
+
return `matrix3d(
|
|
9
|
+
1, 0, 0, 0,
|
|
10
|
+
0, 1, 0, 0,
|
|
11
|
+
0, 0, 1, 0,
|
|
12
|
+
${x}, ${y}, 0, 1
|
|
13
|
+
)`;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF0cml4LTNkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmctdmlydHVhbC1saXN0L3NyYy9saWIvY29tcG9uZW50cy9uZy1zY3JvbGwtdmlldy91dGlscy9tYXRyaXgtM2QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7O0dBS0c7QUFDSCxNQUFNLENBQUMsTUFBTSxRQUFRLEdBQUcsQ0FBQyxDQUFTLEVBQUUsQ0FBUyxFQUFFLEVBQUU7SUFDL0MsT0FBTzs7OztZQUlHLENBQUMsT0FBTyxDQUFDO1VBQ1gsQ0FBQztBQUNYLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxyXG4gKiBtYXRyaXgzZFxyXG4gKiBAbGluayBodHRwczovL2dpdGh1Yi5jb20vRGpvbm55WC9uZy12aXJ0dWFsLWxpc3QvYmxvYi8xOC54L3Byb2plY3RzL25nLXZpcnR1YWwtbGlzdC9zcmMvbGliL2NvbXBvbmVudHMvbmctc2Nyb2xsLXZpZXcvdXRpbHMvbWF0cml4LTNkLnRzXHJcbiAqIEBhdXRob3IgRXZnZW5paSBBbGV4YW5kcm92aWNoIEdyZWJlbm5pa292XHJcbiAqIEBlbWFpbCBkam9ubnl4QGdtYWlsLmNvbVxyXG4gKi9cclxuZXhwb3J0IGNvbnN0IG1hdHJpeDNkID0gKHg6IG51bWJlciwgeTogbnVtYmVyKSA9PiB7XHJcbiAgcmV0dXJuIGBtYXRyaXgzZChcclxuICAgICAgICAgIDEsICAgICAgMCwgICAgICAwLCAgICAgIDAsXHJcbiAgICAgICAgICAwLCAgICAgIDEsICAgICAgMCwgICAgICAwLFxyXG4gICAgICAgICAgMCwgICAgICAwLCAgICAgIDEsICAgICAgMCxcclxuICAgICAgICAgICR7eH0sICAgJHt5fSwgICAwLCAgICAgIDFcclxuICAgICAgICApYDtcclxufTtcclxuIl19
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Nyb2xsZXItZGlyZWN0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25nLXZpcnR1YWwtbGlzdC9zcmMvbGliL2NvbXBvbmVudHMvbmctc2Nyb2xsZXIvZW51bXMvc2Nyb2xsZXItZGlyZWN0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRGlyZWN0aW9ucyB9IGZyb20gXCIuLi8uLi8uLi9lbnVtc1wiO1xyXG5pbXBvcnQgeyBTY3JvbGxlckRpcmVjdGlvbiB9IGZyb20gXCIuL3Njcm9sbGVyLWRpcmVjdGlvblwiO1xyXG5cclxuZXhwb3J0IHR5cGUgU2Nyb2xsZXJEaXJlY3Rpb25zID0gU2Nyb2xsZXJEaXJlY3Rpb24gfCBEaXJlY3Rpb25zIHwgJ2hvcml6b250YWwnIHwgJ3ZlcnRpY2FsJztcclxuIl19
|