@nativescript-community/ui-collectionview 5.3.8 → 5.3.9
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/CHANGELOG.md +4 -0
- package/angular/collectionview-comp.d.ts +82 -0
- package/angular/index.d.ts +8 -0
- package/index-common.d.ts +173 -0
- package/index-common.js +687 -0
- package/index-common.js.map +1 -0
- package/index.android.d.ts +133 -0
- package/index.android.js +1247 -0
- package/index.android.js.map +1 -0
- package/index.d.ts +50 -0
- package/index.ios.d.ts +112 -0
- package/index.ios.js +1231 -0
- package/index.ios.js.map +1 -0
- package/package.json +2 -2
- package/react/index.d.ts +119 -0
- package/react/index.js +153 -0
- package/react/index.js.map +1 -0
- package/references.d.ts +3 -0
- package/svelte/index.d.ts +20 -0
- package/svelte/index.js +138 -0
- package/svelte/index.js.map +1 -0
- package/typings/android.d.ts +90 -0
- package/typings/android.wasabeef.d.ts +843 -0
- package/typings/arv.d.ts +3706 -0
- package/typings/ios.d.ts +3 -0
- package/vue/component.d.ts +38 -0
- package/vue/component.js +105 -0
- package/vue/component.js.map +1 -0
- package/vue/index.d.ts +4 -0
- package/vue/index.js +12 -0
- package/vue/index.js.map +1 -0
- package/vue3/component.d.ts +36 -0
- package/vue3/component.js +105 -0
- package/vue3/component.js.map +1 -0
- package/vue3/index.d.ts +11 -0
- package/vue3/index.js +14 -0
- package/vue3/index.js.map +1 -0
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [5.3.9](https://github.com/nativescript-community/ui-collectionview/compare/v5.3.8...v5.3.9) (2023-11-30)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @nativescript-community/ui-collectionview
|
9
|
+
|
6
10
|
## [5.3.8](https://github.com/nativescript-community/ui-collectionview/compare/v5.3.7...v5.3.8) (2023-11-27)
|
7
11
|
|
8
12
|
**Note:** Version bump only for package @nativescript-community/ui-collectionview
|
@@ -0,0 +1,82 @@
|
|
1
|
+
import { AfterContentInit, ComponentRef, DoCheck, ElementRef, EmbeddedViewRef, EventEmitter, IterableDiffers, NgZone, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';
|
2
|
+
import { CollectionViewItemEventData } from '@nativescript-community/ui-collectionview';
|
3
|
+
import { DetachedLoader, NativeScriptRendererFactory } from '@nativescript/angular';
|
4
|
+
import { View } from '@nativescript/core';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
export declare class ItemContext {
|
7
|
+
$implicit?: any;
|
8
|
+
item?: any;
|
9
|
+
index?: number;
|
10
|
+
even?: boolean;
|
11
|
+
odd?: boolean;
|
12
|
+
constructor($implicit?: any, item?: any, index?: number, even?: boolean, odd?: boolean);
|
13
|
+
}
|
14
|
+
export interface SetupItemViewArgs {
|
15
|
+
view: EmbeddedViewRef<any>;
|
16
|
+
data: any;
|
17
|
+
index: number;
|
18
|
+
context: ItemContext;
|
19
|
+
}
|
20
|
+
export declare class CollectionViewComponent implements DoCheck, OnDestroy, AfterContentInit {
|
21
|
+
private _elementRef;
|
22
|
+
private _iterableDiffers;
|
23
|
+
private _renderer;
|
24
|
+
private _ngZone;
|
25
|
+
get nativeElement(): any;
|
26
|
+
get listView(): any;
|
27
|
+
loader: ViewContainerRef;
|
28
|
+
setupItemView: EventEmitter<SetupItemViewArgs>;
|
29
|
+
itemTemplateQuery: TemplateRef<ItemContext>;
|
30
|
+
autoReuseViews: boolean;
|
31
|
+
detachedLoaderFactory(): ComponentRef<DetachedLoader>;
|
32
|
+
get itemTemplate(): any;
|
33
|
+
set itemTemplate(value: any);
|
34
|
+
get items(): any;
|
35
|
+
set items(value: any);
|
36
|
+
private _collectionView;
|
37
|
+
private _items;
|
38
|
+
private _differ;
|
39
|
+
private _itemTemplate;
|
40
|
+
private _templateMap;
|
41
|
+
private _loaders;
|
42
|
+
constructor(_elementRef: ElementRef, _iterableDiffers: IterableDiffers, _renderer: NativeScriptRendererFactory, _ngZone: NgZone);
|
43
|
+
private itemViewLoader;
|
44
|
+
ngAfterContentInit(): void;
|
45
|
+
ngOnDestroy(): void;
|
46
|
+
ngDoCheck(): void;
|
47
|
+
registerTemplate(key: string, template: TemplateRef<ItemContext>): void;
|
48
|
+
onItemLoading(args: CollectionViewItemEventData): void;
|
49
|
+
onItemRecyclingInternal(args: any): void;
|
50
|
+
onItemDisposingInternal(args: any): void;
|
51
|
+
setupViewRef(view: EmbeddedViewRef<ItemContext>, data: any, index: number): void;
|
52
|
+
protected getItemTemplateViewFactory(template: TemplateRef<ItemContext>): () => View;
|
53
|
+
viewPool: Map<TemplateRef<ItemContext>, {
|
54
|
+
scrapSize: number;
|
55
|
+
scrapHead: Set<EmbeddedViewRef<ItemContext>>;
|
56
|
+
}>;
|
57
|
+
private storeViewRef;
|
58
|
+
viewToTemplate: WeakMap<EmbeddedViewRef<any>, TemplateRef<any>>;
|
59
|
+
viewToLoader: WeakMap<EmbeddedViewRef<any>, ComponentRef<DetachedLoader>>;
|
60
|
+
private getOrCreate;
|
61
|
+
private getView;
|
62
|
+
private getViewPool;
|
63
|
+
private setItemTemplates;
|
64
|
+
private detectChangesOnChild;
|
65
|
+
private refresh;
|
66
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CollectionViewComponent, never>;
|
67
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CollectionViewComponent, "CollectionView", never, { "autoReuseViews": { "alias": "autoReuseViews"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, { "setupItemView": "setupItemView"; }, ["itemTemplateQuery"], never, false, never>;
|
68
|
+
}
|
69
|
+
export interface ComponentView {
|
70
|
+
rootNodes: any[];
|
71
|
+
destroy(): void;
|
72
|
+
}
|
73
|
+
export type RootLocator = (nodes: any[], nestLevel: number) => View;
|
74
|
+
export declare function getItemViewRoot(viewRef: ComponentView, rootLocator?: RootLocator): View;
|
75
|
+
export declare class TemplateKeyDirective {
|
76
|
+
private templateRef;
|
77
|
+
private collectionView;
|
78
|
+
constructor(templateRef: TemplateRef<any>, collectionView: CollectionViewComponent);
|
79
|
+
set cvTemplateKey(value: any);
|
80
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TemplateKeyDirective, [null, { host: true; }]>;
|
81
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TemplateKeyDirective, "[cvTemplateKey]", never, { "cvTemplateKey": { "alias": "cvTemplateKey"; "required": false; }; }, {}, never, never, false, never>;
|
82
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./collectionview-comp";
|
3
|
+
export { CollectionViewComponent, TemplateKeyDirective } from './collectionview-comp';
|
4
|
+
export declare class CollectionViewModule {
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CollectionViewModule, never>;
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CollectionViewModule, [typeof i1.CollectionViewComponent, typeof i1.TemplateKeyDirective], never, [typeof i1.CollectionViewComponent, typeof i1.TemplateKeyDirective]>;
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CollectionViewModule>;
|
8
|
+
}
|
@@ -0,0 +1,173 @@
|
|
1
|
+
import { ChangedData, CoreTypes, ItemsSource, KeyedTemplate, Label, Property, Template, View } from '@nativescript/core';
|
2
|
+
import { CollectionView as CollectionViewDefinition, Orientation } from '.';
|
3
|
+
export declare const CollectionViewTraceCategory = "NativescriptCollectionView";
|
4
|
+
export declare enum ContentInsetAdjustmentBehavior {
|
5
|
+
Always = 0,
|
6
|
+
Automatic = 1,
|
7
|
+
Never = 2,
|
8
|
+
ScrollableAxes = 3
|
9
|
+
}
|
10
|
+
export declare enum CLogTypes {
|
11
|
+
log,
|
12
|
+
info,
|
13
|
+
warning,
|
14
|
+
error
|
15
|
+
}
|
16
|
+
export declare const CLog: (type: CLogTypes, ...args: any[]) => void;
|
17
|
+
export declare enum ListViewViewTypes {
|
18
|
+
ItemView = 0
|
19
|
+
}
|
20
|
+
export declare namespace knownTemplates {
|
21
|
+
const itemTemplate = "itemTemplate";
|
22
|
+
}
|
23
|
+
export declare namespace knownMultiTemplates {
|
24
|
+
const itemTemplates = "itemTemplates";
|
25
|
+
}
|
26
|
+
export interface Plugin {
|
27
|
+
onLayout?: Function;
|
28
|
+
onMeasure?: Function;
|
29
|
+
}
|
30
|
+
export declare abstract class CollectionViewBase extends View implements CollectionViewDefinition {
|
31
|
+
static itemLoadingEvent: string;
|
32
|
+
static itemRecyclingEvent: string;
|
33
|
+
static itemDisposingEvent: string;
|
34
|
+
static bindedEvent: string;
|
35
|
+
static scrollEvent: string;
|
36
|
+
static scrollStartEvent: string;
|
37
|
+
static scrollEndEvent: string;
|
38
|
+
static itemTapEvent: string;
|
39
|
+
static displayItemEvent: string;
|
40
|
+
static itemReorderedEvent: string;
|
41
|
+
static itemReorderStartingEvent: string;
|
42
|
+
static itemReorderStartedEvent: string;
|
43
|
+
static loadMoreItemsEvent: string;
|
44
|
+
static dataPopulatedEvent: string;
|
45
|
+
static knownFunctions: string[];
|
46
|
+
isBounceEnabled: boolean;
|
47
|
+
isScrollEnabled: boolean;
|
48
|
+
reverseLayout: boolean;
|
49
|
+
orientation: Orientation;
|
50
|
+
itemTemplate: string | Template;
|
51
|
+
itemTemplates: string | KeyedTemplate[];
|
52
|
+
isItemsSourceIn: boolean;
|
53
|
+
rowHeight: CoreTypes.PercentLengthType;
|
54
|
+
colWidth: CoreTypes.PercentLengthType;
|
55
|
+
verticalSpacing: CoreTypes.LengthType;
|
56
|
+
horizontalSpacing: CoreTypes.LengthType;
|
57
|
+
_innerWidth: number;
|
58
|
+
_innerHeight: number;
|
59
|
+
_effectiveRowHeight: number;
|
60
|
+
_effectiveColWidth: number;
|
61
|
+
loadMoreThreshold: number;
|
62
|
+
scrollOffset: number;
|
63
|
+
reorderEnabled: boolean;
|
64
|
+
/** Used on iOS to auto update cells size if the cell request a layout change (like image itemLoading).
|
65
|
+
* Experimental and true by default
|
66
|
+
*/
|
67
|
+
autoReloadItemOnLayout: boolean;
|
68
|
+
reorderLongPressEnabled: boolean;
|
69
|
+
protected _dataUpdatesSuspended: boolean;
|
70
|
+
scrollBarIndicatorVisible: boolean;
|
71
|
+
layoutStyle: string;
|
72
|
+
plugins: string[];
|
73
|
+
static plugins: {
|
74
|
+
[k: string]: Plugin;
|
75
|
+
};
|
76
|
+
static registerPlugin(key: string, plugin: Plugin): void;
|
77
|
+
static layoutStyles: {
|
78
|
+
[k: string]: {
|
79
|
+
createLayout: Function;
|
80
|
+
createDelegate?: Function;
|
81
|
+
};
|
82
|
+
};
|
83
|
+
static registerLayoutStyle(style: string, generator: {
|
84
|
+
createLayout: Function;
|
85
|
+
createDelegate?: Function;
|
86
|
+
}): void;
|
87
|
+
protected _itemTemplatesInternal: Map<string, KeyedTemplate>;
|
88
|
+
protected _defaultTemplate: KeyedTemplate;
|
89
|
+
constructor();
|
90
|
+
notifyForItemAtIndex(eventName: string, view: View, index: number, bindingContext?: any, native?: any): void;
|
91
|
+
abstract refresh(): any;
|
92
|
+
abstract eachChildAsync(callback: any): any;
|
93
|
+
abstract refreshVisibleItems(): any;
|
94
|
+
abstract isItemAtIndexVisible(index: number): any;
|
95
|
+
abstract scrollToIndex(index: number, animated: boolean): any;
|
96
|
+
abstract scrollToOffset(value: number, animated?: boolean): any;
|
97
|
+
protected updateInnerSize(): boolean;
|
98
|
+
onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
|
99
|
+
items: any[] | ItemsSource;
|
100
|
+
_prepareItem(view: View, index: number): any;
|
101
|
+
notifyLoading(args: any): void;
|
102
|
+
getItemAtIndex(index: number): any;
|
103
|
+
isHorizontal(): boolean;
|
104
|
+
computeSpanCount(): number;
|
105
|
+
_onRowHeightPropertyChanged(oldValue: CoreTypes.PercentLengthType, newValue: CoreTypes.PercentLengthType): void;
|
106
|
+
_onColWidthPropertyChanged(oldValue: CoreTypes.PercentLengthType, newValue: CoreTypes.PercentLengthType): void;
|
107
|
+
onItemViewLoaderChanged(): void;
|
108
|
+
_itemViewLoader: any;
|
109
|
+
get itemViewLoader(): any;
|
110
|
+
set itemViewLoader(value: any);
|
111
|
+
get padding(): string | CoreTypes.LengthType;
|
112
|
+
set padding(value: string | CoreTypes.LengthType);
|
113
|
+
get paddingTop(): CoreTypes.LengthType;
|
114
|
+
set paddingTop(value: CoreTypes.LengthType);
|
115
|
+
get paddingRight(): CoreTypes.LengthType;
|
116
|
+
set paddingRight(value: CoreTypes.LengthType);
|
117
|
+
get paddingBottom(): CoreTypes.LengthType;
|
118
|
+
set paddingBottom(value: CoreTypes.LengthType);
|
119
|
+
get paddingLeft(): CoreTypes.LengthType;
|
120
|
+
set paddingLeft(value: CoreTypes.LengthType);
|
121
|
+
resolveTemplateView(template: any): View;
|
122
|
+
_getDefaultItemContent(): Label;
|
123
|
+
getTemplateFromSelector(templateKey: any): KeyedTemplate;
|
124
|
+
getViewForViewType(viewType: ListViewViewTypes, templateKey: string): any;
|
125
|
+
private _itemTemplateSelectorBindable;
|
126
|
+
_itemTemplateSelector: Function;
|
127
|
+
onItemTemplateSelectorChanged(oldValue: any, newValue: any): void;
|
128
|
+
private _itemIdGeneratorBindable;
|
129
|
+
_itemIdGenerator: (item: any, index: number, items: any) => number;
|
130
|
+
onItemIdGeneratorChanged(oldValue: any, newValue: any): void;
|
131
|
+
onTemplateAdded(t: any): void;
|
132
|
+
onTemplateRemoved(key: any): void;
|
133
|
+
addTemplate(key: any, t: any): void;
|
134
|
+
removeTemplate(key: any): void;
|
135
|
+
onItemTemplatesChanged(oldValue: any, newValue: any): void;
|
136
|
+
onItemTemplateChanged(oldValue: any, newValue: any): void;
|
137
|
+
getItemSourceAtIndex(index: number): any;
|
138
|
+
getItemArrayAtIndex(index: number): any;
|
139
|
+
onItemsChanged(oldValue: any, newValue: any): void;
|
140
|
+
spanSize: (item: any, index: number) => number;
|
141
|
+
onSpanSizeChanged: (oldValue: any, newValue: any) => void;
|
142
|
+
_isDataDirty: boolean;
|
143
|
+
onLoaded(): void;
|
144
|
+
onSourceCollectionChanged(event: ChangedData<any>): void;
|
145
|
+
onSourceCollectionChangedInternal(event: ChangedData<any>): void;
|
146
|
+
suspendUpdates(): void;
|
147
|
+
updatesSuspended(): boolean;
|
148
|
+
resumeUpdates(refresh: boolean): void;
|
149
|
+
abstract getViewForItemAtIndex(index: number): View;
|
150
|
+
abstract startDragging(index: number): any;
|
151
|
+
draggingView: View;
|
152
|
+
_callItemReorderedEvent(oldPosition: any, newPosition: any, item: any): void;
|
153
|
+
_reorderItemInSource(oldPosition: number, newPosition: number, callEvents?: boolean): void;
|
154
|
+
shouldMoveItemAtIndex(index: number): boolean;
|
155
|
+
}
|
156
|
+
export declare const rowHeightProperty: Property<CollectionViewBase, CoreTypes.PercentLengthType>;
|
157
|
+
export declare const colWidthProperty: Property<CollectionViewBase, CoreTypes.PercentLengthType>;
|
158
|
+
export declare const orientationProperty: Property<CollectionViewBase, Orientation>;
|
159
|
+
export declare const itemTemplateProperty: Property<CollectionViewBase, string | Template>;
|
160
|
+
export declare const itemTemplatesProperty: Property<CollectionViewBase, KeyedTemplate[]>;
|
161
|
+
export declare const itemTemplateSelectorProperty: Property<CollectionViewBase, Function>;
|
162
|
+
export declare const itemIdGeneratorProperty: Property<CollectionViewBase, Function>;
|
163
|
+
export declare const itemsProperty: Property<CollectionViewBase, Function>;
|
164
|
+
export declare const spanSizeProperty: Property<CollectionViewBase, Function>;
|
165
|
+
export declare const isScrollEnabledProperty: Property<CollectionViewBase, boolean>;
|
166
|
+
export declare const isBounceEnabledProperty: Property<CollectionViewBase, boolean>;
|
167
|
+
export declare const reverseLayoutProperty: Property<CollectionViewBase, boolean>;
|
168
|
+
export declare const loadMoreThresholdProperty: Property<CollectionViewBase, number>;
|
169
|
+
export declare const reorderingEnabledProperty: Property<CollectionViewBase, boolean>;
|
170
|
+
export declare const reorderLongPressEnabledProperty: Property<CollectionViewBase, boolean>;
|
171
|
+
export declare const scrollBarIndicatorVisibleProperty: Property<CollectionViewBase, boolean>;
|
172
|
+
export declare const autoReloadItemOnLayoutProperty: Property<CollectionViewBase, boolean>;
|
173
|
+
export declare const itemOverlapProperty: Property<CollectionViewBase, CoreTypes.LengthType[]>;
|