ng-virtual-list 16.7.2 → 16.7.3
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 +4 -0
- package/esm2022/lib/components/ng-virtual-list-item.component.mjs +83 -17
- package/esm2022/lib/const/index.mjs +6 -5
- package/esm2022/lib/models/render-item-config.model.mjs +1 -1
- package/esm2022/lib/ng-virtual-list.component.mjs +8 -4
- package/esm2022/lib/ng-virtual-list.service.mjs +3 -2
- package/esm2022/lib/utils/trackBox.mjs +8 -2
- package/fesm2022/ng-virtual-list.mjs +102 -25
- package/fesm2022/ng-virtual-list.mjs.map +1 -1
- package/lib/components/ng-virtual-list-item.component.d.ts +11 -4
- package/lib/const/index.d.ts +5 -4
- package/lib/models/render-item-config.model.d.ts +4 -0
- package/lib/ng-virtual-list.component.d.ts +2 -0
- package/lib/ng-virtual-list.service.d.ts +2 -1
- package/package.json +1 -1
|
@@ -3,10 +3,14 @@ import { IRenderVirtualListItem } from '../models/render-item.model';
|
|
|
3
3
|
import { Id, IRect, ISize } from '../types';
|
|
4
4
|
import { BaseVirtualListItemComponent } from '../models/base-virtual-list-item-component';
|
|
5
5
|
import { NgVirtualListService } from '../ng-virtual-list.service';
|
|
6
|
-
import { BehaviorSubject
|
|
6
|
+
import { BehaviorSubject } from 'rxjs';
|
|
7
7
|
import { IRenderVirtualListItemConfig } from '../models/render-item-config.model';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
interface IItemConfig extends IRenderVirtualListItemConfig {
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
focus: boolean;
|
|
10
14
|
/**
|
|
11
15
|
* Determines whether the element is selected or not.
|
|
12
16
|
*/
|
|
@@ -27,19 +31,21 @@ export declare class NgVirtualListItemComponent extends BaseVirtualListItemCompo
|
|
|
27
31
|
private _cdr;
|
|
28
32
|
private _elementRef;
|
|
29
33
|
private _service;
|
|
30
|
-
protected _$unsubscribe: Subject<void>;
|
|
31
34
|
private _id;
|
|
32
35
|
get id(): number;
|
|
33
36
|
private _part;
|
|
34
37
|
get part(): string;
|
|
35
38
|
private _isSelected;
|
|
36
|
-
config
|
|
39
|
+
private _$config;
|
|
40
|
+
$config: import("rxjs").Observable<IItemConfig>;
|
|
37
41
|
measures: BehaviorSubject<(IRect & {
|
|
38
42
|
/**
|
|
39
43
|
* Delta is calculated for Snapping Method.ADVANCED
|
|
40
44
|
*/
|
|
41
45
|
delta: number;
|
|
42
46
|
}) | undefined>;
|
|
47
|
+
private _$focus;
|
|
48
|
+
$focus: import("rxjs").Observable<boolean>;
|
|
43
49
|
regular: boolean;
|
|
44
50
|
data: IRenderVirtualListItem | undefined;
|
|
45
51
|
private _$data;
|
|
@@ -54,6 +60,8 @@ export declare class NgVirtualListItemComponent extends BaseVirtualListItemCompo
|
|
|
54
60
|
get element(): HTMLElement;
|
|
55
61
|
private _selectHandler;
|
|
56
62
|
constructor(_cdr: ChangeDetectorRef, _elementRef: ElementRef<HTMLElement>, _service: NgVirtualListService);
|
|
63
|
+
private focusNext;
|
|
64
|
+
private focusPrev;
|
|
57
65
|
private updateMeasures;
|
|
58
66
|
private updateConfig;
|
|
59
67
|
private update;
|
|
@@ -62,7 +70,6 @@ export declare class NgVirtualListItemComponent extends BaseVirtualListItemCompo
|
|
|
62
70
|
show(): void;
|
|
63
71
|
hide(): void;
|
|
64
72
|
onClickHandler(): void;
|
|
65
|
-
ngOnDestroy(): void;
|
|
66
73
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgVirtualListItemComponent, never>;
|
|
67
74
|
static ɵcmp: i0.ɵɵComponentDeclaration<NgVirtualListItemComponent, "ng-virtual-list-item", never, {}, {}, never, never, false, never>;
|
|
68
75
|
}
|
package/lib/const/index.d.ts
CHANGED
|
@@ -43,7 +43,8 @@ export declare const SCROLL_END = "scrollend";
|
|
|
43
43
|
export declare const CLASS_LIST_VERTICAL = "vertical";
|
|
44
44
|
export declare const CLASS_LIST_HORIZONTAL = "horizontal";
|
|
45
45
|
export declare const PART_DEFAULT_ITEM = "item";
|
|
46
|
-
export declare const PART_ITEM_ODD = " odd";
|
|
47
|
-
export declare const PART_ITEM_EVEN = " even";
|
|
48
|
-
export declare const PART_ITEM_SNAPPED = " snapped";
|
|
49
|
-
export declare const PART_ITEM_SELECTED = " selected";
|
|
46
|
+
export declare const PART_ITEM_ODD = " item-odd";
|
|
47
|
+
export declare const PART_ITEM_EVEN = " item-even";
|
|
48
|
+
export declare const PART_ITEM_SNAPPED = " item-snapped";
|
|
49
|
+
export declare const PART_ITEM_SELECTED = " item-selected";
|
|
50
|
+
export declare const PART_ITEM_FOCUSED = " item-focused";
|
|
@@ -205,6 +205,8 @@ export declare class NgVirtualListComponent implements AfterViewInit, OnInit, On
|
|
|
205
205
|
private _onScrollHandler;
|
|
206
206
|
private _$initialized;
|
|
207
207
|
readonly $initialized: Observable<boolean>;
|
|
208
|
+
private _$viewInitialized;
|
|
209
|
+
readonly $viewInitialized: Observable<boolean>;
|
|
208
210
|
/**
|
|
209
211
|
* Base class of the element component
|
|
210
212
|
*/
|
|
@@ -12,8 +12,9 @@ export declare class NgVirtualListService {
|
|
|
12
12
|
private _$methodOfSelecting;
|
|
13
13
|
$methodOfSelecting: import("rxjs").Observable<MethodsForSelectingTypes>;
|
|
14
14
|
set methodOfSelecting(v: MethodsForSelectingTypes);
|
|
15
|
-
selectByClick: boolean;
|
|
16
15
|
private _trackBox;
|
|
16
|
+
selectByClick: boolean;
|
|
17
|
+
listElement: HTMLDivElement | null;
|
|
17
18
|
constructor();
|
|
18
19
|
setSelectedIds(ids: Array<Id> | Id | undefined): void;
|
|
19
20
|
itemClick(data: IRenderVirtualListItem | undefined): void;
|