@nstudio/ui-collectionview 5.1.9-alpha.5 → 5.1.10
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/angular/collectionview.component.d.ts +7 -34
- package/angular/fesm2022/nstudio-ui-collectionview-angular.mjs +54 -175
- package/angular/fesm2022/nstudio-ui-collectionview-angular.mjs.map +1 -1
- package/angular/index.d.ts +2 -2
- package/angular/package.json +0 -2
- package/common.d.ts +24 -62
- package/common.js +116 -158
- package/common.js.map +1 -1
- package/index.android.d.ts +31 -12
- package/index.android.js +458 -168
- package/index.android.js.map +1 -1
- package/index.d.ts +37 -4
- package/index.ios.d.ts +83 -31
- package/index.ios.js +582 -409
- package/index.ios.js.map +1 -1
- package/package.json +7 -3
- package/react/index.d.ts +1 -1
- package/svelte/index.js +11 -7
- package/svelte/index.js.map +1 -1
- package/vue3/component.d.ts +36 -0
- package/vue3/component.js +98 -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/angular/esm2022/collectionview.component.mjs +0 -525
- package/angular/esm2022/index.mjs +0 -19
- package/angular/esm2022/nstudio-ui-collectionview-angular.mjs +0 -5
- package/vue/component.d.ts +0 -38
- package/vue/component.js +0 -104
- package/vue/component.js.map +0 -1
- package/vue/index.d.ts +0 -4
- package/vue/index.js +0 -12
- package/vue/index.js.map +0 -1
package/common.d.ts
CHANGED
@@ -1,19 +1,6 @@
|
|
1
|
-
import { ChangedData, CoreTypes,
|
2
|
-
import { CollectionView as CollectionViewDefinition } from '.';
|
1
|
+
import { ChangedData, CoreTypes, ItemsSource, KeyedTemplate, Label, Property, Template, View } from '@nativescript/core';
|
2
|
+
import { CollectionView as CollectionViewDefinition, Orientation } from '.';
|
3
3
|
export declare const CollectionViewTraceCategory = "NativescriptCollectionView";
|
4
|
-
export interface CollectionViewItemEventData extends EventData {
|
5
|
-
eventName: string;
|
6
|
-
object: CollectionViewBase;
|
7
|
-
index: number;
|
8
|
-
view: View;
|
9
|
-
item: any;
|
10
|
-
bindingContext?: any;
|
11
|
-
}
|
12
|
-
export interface CollectionViewItemDisplayEventData extends EventData {
|
13
|
-
eventName: string;
|
14
|
-
object: CollectionViewBase;
|
15
|
-
index: number;
|
16
|
-
}
|
17
4
|
export declare enum ContentInsetAdjustmentBehavior {
|
18
5
|
Always = 0,
|
19
6
|
Automatic = 1,
|
@@ -27,22 +14,8 @@ export declare enum CLogTypes {
|
|
27
14
|
error = 3
|
28
15
|
}
|
29
16
|
export declare const CLog: (type: CLogTypes, ...args: any[]) => void;
|
30
|
-
|
31
|
-
|
32
|
-
*/
|
33
|
-
export declare enum ViewTemplateType {
|
34
|
-
/**
|
35
|
-
* Identifies a view created using the {@link headerItemTemplate} value.
|
36
|
-
*/
|
37
|
-
Header = "ns_default_header",
|
38
|
-
/**
|
39
|
-
* Identifies a view created using the {@link footerItemTemplate} value.
|
40
|
-
*/
|
41
|
-
Footer = "ns_default_footer",
|
42
|
-
/**
|
43
|
-
* Identifies a view created using the {@link itemTemplate} value.
|
44
|
-
*/
|
45
|
-
Item = "ns_default_item"
|
17
|
+
export declare enum ListViewViewTypes {
|
18
|
+
ItemView = 0
|
46
19
|
}
|
47
20
|
export declare namespace knownTemplates {
|
48
21
|
const itemTemplate = "itemTemplate";
|
@@ -52,8 +25,8 @@ export declare namespace knownMultiTemplates {
|
|
52
25
|
}
|
53
26
|
export interface Plugin {
|
54
27
|
onLayout?: Function;
|
28
|
+
onMeasure?: Function;
|
55
29
|
}
|
56
|
-
export declare function getUUID(): any;
|
57
30
|
export declare abstract class CollectionViewBase extends View implements CollectionViewDefinition {
|
58
31
|
static itemLoadingEvent: string;
|
59
32
|
static itemRecyclingEvent: string;
|
@@ -67,6 +40,7 @@ export declare abstract class CollectionViewBase extends View implements Collect
|
|
67
40
|
static itemHighlightEndEvent: string;
|
68
41
|
static displayItemEvent: string;
|
69
42
|
static itemReorderedEvent: string;
|
43
|
+
static itemReorderCheckEvent: string;
|
70
44
|
static itemReorderStartingEvent: string;
|
71
45
|
static itemReorderStartedEvent: string;
|
72
46
|
static loadMoreItemsEvent: string;
|
@@ -74,23 +48,17 @@ export declare abstract class CollectionViewBase extends View implements Collect
|
|
74
48
|
static knownFunctions: string[];
|
75
49
|
isBounceEnabled: boolean;
|
76
50
|
isScrollEnabled: boolean;
|
77
|
-
isAnimationEnabled: boolean;
|
78
51
|
reverseLayout: boolean;
|
79
|
-
|
80
|
-
orientation: CoreTypes.OrientationType;
|
52
|
+
orientation: Orientation;
|
81
53
|
itemTemplate: string | Template;
|
82
54
|
itemTemplates: string | KeyedTemplate[];
|
83
|
-
headerKey: string;
|
84
|
-
headerItemTemplate: string | Template;
|
85
|
-
headerPinned: boolean;
|
86
|
-
footerKey: string;
|
87
|
-
footerItemTemplate: string | Template;
|
88
|
-
sectionTemplate: string;
|
89
55
|
isItemsSourceIn: boolean;
|
90
56
|
rowHeight: CoreTypes.PercentLengthType;
|
91
57
|
colWidth: CoreTypes.PercentLengthType;
|
92
58
|
verticalSpacing: CoreTypes.LengthType;
|
93
59
|
horizontalSpacing: CoreTypes.LengthType;
|
60
|
+
spanSize: (item: any, index: number) => number;
|
61
|
+
itemOverlap: (item: any, index: number) => [number, number, number, number];
|
94
62
|
_innerWidth: number;
|
95
63
|
_innerHeight: number;
|
96
64
|
_effectiveRowHeight: number;
|
@@ -105,10 +73,6 @@ export declare abstract class CollectionViewBase extends View implements Collect
|
|
105
73
|
reorderLongPressEnabled: boolean;
|
106
74
|
protected _dataUpdatesSuspended: boolean;
|
107
75
|
scrollBarIndicatorVisible: boolean;
|
108
|
-
sections: Array<{
|
109
|
-
identifier: string;
|
110
|
-
key: string;
|
111
|
-
}>;
|
112
76
|
layoutStyle: string;
|
113
77
|
plugins: string[];
|
114
78
|
static plugins: {
|
@@ -117,26 +81,29 @@ export declare abstract class CollectionViewBase extends View implements Collect
|
|
117
81
|
static registerPlugin(key: string, plugin: Plugin): void;
|
118
82
|
static layoutStyles: {
|
119
83
|
[k: string]: {
|
120
|
-
createLayout:
|
121
|
-
createDelegate?:
|
84
|
+
createLayout: Function;
|
85
|
+
createDelegate?: Function;
|
122
86
|
};
|
123
87
|
};
|
124
88
|
static registerLayoutStyle(style: string, generator: {
|
125
|
-
createLayout:
|
126
|
-
createDelegate?:
|
89
|
+
createLayout: Function;
|
90
|
+
createDelegate?: Function;
|
127
91
|
}): void;
|
128
92
|
protected _itemTemplatesInternal: Map<string, KeyedTemplate>;
|
129
93
|
protected _defaultTemplate: KeyedTemplate;
|
130
94
|
constructor();
|
131
95
|
notifyForItemAtIndex(eventName: string, view: View, index: number, bindingContext?: any, native?: any): void;
|
132
96
|
abstract refresh(): any;
|
97
|
+
abstract eachChildAsync(callback: any): any;
|
133
98
|
abstract refreshVisibleItems(): any;
|
134
99
|
abstract isItemAtIndexVisible(index: number): any;
|
100
|
+
abstract findFirstVisibleItemIndex(): number;
|
101
|
+
abstract findLastVisibleItemIndex(): number;
|
135
102
|
abstract scrollToIndex(index: number, animated: boolean): any;
|
136
103
|
abstract scrollToOffset(value: number, animated?: boolean): any;
|
137
|
-
protected updateInnerSize():
|
104
|
+
protected updateInnerSize(): boolean;
|
138
105
|
onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
|
139
|
-
items: any[] |
|
106
|
+
items: any[] | ItemsSource;
|
140
107
|
_prepareItem(view: View, index: number): any;
|
141
108
|
notifyLoading(args: any): void;
|
142
109
|
getItemAtIndex(index: number): any;
|
@@ -161,7 +128,7 @@ export declare abstract class CollectionViewBase extends View implements Collect
|
|
161
128
|
resolveTemplateView(template: any): View;
|
162
129
|
_getDefaultItemContent(): Label;
|
163
130
|
getTemplateFromSelector(templateKey: any): KeyedTemplate;
|
164
|
-
|
131
|
+
getViewForViewType(viewType: ListViewViewTypes, templateKey: string): any;
|
165
132
|
private _itemTemplateSelectorBindable;
|
166
133
|
_itemTemplateSelector: Function;
|
167
134
|
onItemTemplateSelectorChanged(oldValue: any, newValue: any): void;
|
@@ -174,14 +141,11 @@ export declare abstract class CollectionViewBase extends View implements Collect
|
|
174
141
|
removeTemplate(key: any): void;
|
175
142
|
onItemTemplatesChanged(oldValue: any, newValue: any): void;
|
176
143
|
onItemTemplateChanged(oldValue: any, newValue: any): void;
|
177
|
-
onHeaderItemTemplateChanged(oldValue: string | Template, newValue: string | Template): void;
|
178
|
-
onFooterItemTemplateChanged(oldValue: string | Template, newValue: string | Template): void;
|
179
|
-
onSupplementaryTemplateChanged(template: Template): void;
|
180
144
|
getItemSourceAtIndex(index: number): any;
|
181
145
|
getItemArrayAtIndex(index: number): any;
|
182
146
|
onItemsChanged(oldValue: any, newValue: any): void;
|
183
|
-
|
184
|
-
|
147
|
+
onSpanSizeChanged: (oldValue: any, newValue: any) => void;
|
148
|
+
onItemOverlapChanged: (oldValue: any, newValue: any) => void;
|
185
149
|
_isDataDirty: boolean;
|
186
150
|
onLoaded(): void;
|
187
151
|
onSourceCollectionChanged(event: ChangedData<any>): void;
|
@@ -193,27 +157,25 @@ export declare abstract class CollectionViewBase extends View implements Collect
|
|
193
157
|
abstract startDragging(index: number): any;
|
194
158
|
draggingView: View;
|
195
159
|
_callItemReorderedEvent(oldPosition: any, newPosition: any, item: any): void;
|
160
|
+
_canReorderToPosition(oldPosition: any, newPosition: any, item: any): boolean;
|
196
161
|
_reorderItemInSource(oldPosition: number, newPosition: number, callEvents?: boolean): void;
|
197
162
|
shouldMoveItemAtIndex(index: number): boolean;
|
198
163
|
}
|
199
164
|
export declare const rowHeightProperty: Property<CollectionViewBase, CoreTypes.PercentLengthType>;
|
200
165
|
export declare const colWidthProperty: Property<CollectionViewBase, CoreTypes.PercentLengthType>;
|
201
|
-
export declare const orientationProperty: Property<CollectionViewBase,
|
166
|
+
export declare const orientationProperty: Property<CollectionViewBase, Orientation>;
|
202
167
|
export declare const itemTemplateProperty: Property<CollectionViewBase, string | Template>;
|
203
168
|
export declare const itemTemplatesProperty: Property<CollectionViewBase, KeyedTemplate[]>;
|
204
|
-
export declare const headerItemTemplateProperty: Property<CollectionViewBase, string | Template>;
|
205
|
-
export declare const footerItemTemplateProperty: Property<CollectionViewBase, string | Template>;
|
206
|
-
export declare const sectionTemplateProperty: Property<CollectionViewBase, string | Template>;
|
207
169
|
export declare const itemTemplateSelectorProperty: Property<CollectionViewBase, Function>;
|
208
170
|
export declare const itemIdGeneratorProperty: Property<CollectionViewBase, Function>;
|
209
171
|
export declare const itemsProperty: Property<CollectionViewBase, Function>;
|
210
172
|
export declare const spanSizeProperty: Property<CollectionViewBase, Function>;
|
211
173
|
export declare const isScrollEnabledProperty: Property<CollectionViewBase, boolean>;
|
212
174
|
export declare const isBounceEnabledProperty: Property<CollectionViewBase, boolean>;
|
213
|
-
export declare const isAnimationEnabledProperty: Property<CollectionViewBase, boolean>;
|
214
175
|
export declare const reverseLayoutProperty: Property<CollectionViewBase, boolean>;
|
215
176
|
export declare const loadMoreThresholdProperty: Property<CollectionViewBase, number>;
|
216
177
|
export declare const reorderingEnabledProperty: Property<CollectionViewBase, boolean>;
|
217
178
|
export declare const reorderLongPressEnabledProperty: Property<CollectionViewBase, boolean>;
|
218
179
|
export declare const scrollBarIndicatorVisibleProperty: Property<CollectionViewBase, boolean>;
|
219
180
|
export declare const autoReloadItemOnLayoutProperty: Property<CollectionViewBase, boolean>;
|
181
|
+
export declare const itemOverlapProperty: Property<CollectionViewBase, Function>;
|