@nativescript-community/ui-collectionview 4.0.46 → 4.0.49

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +188 -95
  3. package/angular/collectionview-comp.d.ts +5 -5
  4. package/angular/esm2020/collectionview-comp.mjs +263 -0
  5. package/angular/{esm2015/index.js → esm2020/index.mjs} +3 -3
  6. package/angular/{esm2015/nativescript-community-ui-collectionview-angular.js → esm2020/nativescript-community-ui-collectionview-angular.mjs} +0 -0
  7. package/angular/fesm2015/nativescript-community-ui-collectionview-angular.mjs +299 -0
  8. package/angular/fesm2015/nativescript-community-ui-collectionview-angular.mjs.map +1 -0
  9. package/angular/{fesm2015/nativescript-community-ui-collectionview-angular.js → fesm2020/nativescript-community-ui-collectionview-angular.mjs} +32 -35
  10. package/angular/fesm2020/nativescript-community-ui-collectionview-angular.mjs.map +1 -0
  11. package/angular/index.d.ts +3 -3
  12. package/angular/package.json +21 -7
  13. package/{collectionview-common.d.ts → index-common.d.ts} +3 -2
  14. package/{collectionview-common.js → index-common.js} +11 -5
  15. package/index-common.js.map +1 -0
  16. package/{collectionview.android.d.ts → index.android.d.ts} +8 -11
  17. package/{collectionview.android.js → index.android.js} +57 -42
  18. package/index.android.js.map +1 -0
  19. package/{collectionview.d.ts → index.d.ts} +2 -2
  20. package/{collectionview.ios.d.ts → index.ios.d.ts} +2 -3
  21. package/{collectionview.ios.js → index.ios.js} +6 -12
  22. package/{collectionview.ios.js.map → index.ios.js.map} +1 -1
  23. package/package.json +7 -7
  24. package/platforms/android/AndroidManifest.xml +0 -0
  25. package/platforms/android/include.gradle +0 -0
  26. package/platforms/android/java/com/nativescript/collectionview/Adapter.java +0 -0
  27. package/platforms/android/java/com/nativescript/collectionview/AdapterInterface.java +0 -0
  28. package/platforms/android/java/com/nativescript/collectionview/CollectionViewCellHolder.java +0 -0
  29. package/platforms/android/java/com/nativescript/collectionview/GridLayoutManager.java +0 -0
  30. package/platforms/android/java/com/nativescript/collectionview/OnScrollListener.java +0 -0
  31. package/platforms/android/java/com/nativescript/collectionview/PreCachingGridLayoutManager.java +0 -0
  32. package/platforms/android/java/com/nativescript/collectionview/RecyclerView.java +10 -7
  33. package/platforms/android/java/com/nativescript/collectionview/SizeChangedListener.java +1 -0
  34. package/platforms/android/java/com/nativescript/collectionview/SpanSizeLookup.java +0 -0
  35. package/platforms/android/res/layout/collectionview.xml +0 -0
  36. package/react/index.d.ts +8 -8
  37. package/react/index.js +4 -2
  38. package/react/index.js.map +1 -1
  39. package/references.d.ts +1 -0
  40. package/svelte/index.d.ts +1 -1
  41. package/svelte/index.js +4 -3
  42. package/svelte/index.js.map +1 -1
  43. package/typings/android.d.ts +66 -0
  44. package/typings/arv.d.ts +1 -65
  45. package/vue/component.d.ts +0 -0
  46. package/vue/component.js +2 -7
  47. package/vue/component.js.map +1 -1
  48. package/vue/index.d.ts +0 -0
  49. package/vue/index.js +1 -1
  50. package/vue/index.js.map +1 -1
  51. package/LICENSE +0 -201
  52. package/angular/bundles/nativescript-community-ui-collectionview-angular.umd.js +0 -334
  53. package/angular/bundles/nativescript-community-ui-collectionview-angular.umd.js.map +0 -1
  54. package/angular/bundles/nativescript-community-ui-collectionview-angular.umd.min.js +0 -2
  55. package/angular/bundles/nativescript-community-ui-collectionview-angular.umd.min.js.map +0 -1
  56. package/angular/esm2015/collectionview-comp.js +0 -267
  57. package/angular/fesm2015/nativescript-community-ui-collectionview-angular.js.map +0 -1
  58. package/collectionview-common.js.map +0 -1
  59. package/collectionview.android.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativescript-community-ui-collectionview-angular.mjs","sources":["../../../../src/collectionview/angular/collectionview-comp.ts","../../../../src/collectionview/angular/index.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n Directive,\n DoCheck,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Host,\n Inject,\n Input,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n Output,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n ɵisListLikeIterable as isListLikeIterable\n} from '@angular/core';\nimport { CLog, CLogTypes, CollectionView, CollectionViewItemEventData, ListViewViewTypes } from '@nativescript-community/ui-collectionview';\nimport { extractSingleViewRecursive, registerElement } from '@nativescript/angular';\nimport { KeyedTemplate, LayoutBase, ObservableArray, Trace, View } from '@nativescript/core';\n\nregisterElement('CollectionView', () => CollectionView);\n\nconst NG_VIEW = '_ngViewRef';\n\nexport class ItemContext {\n constructor(public $implicit?: any, public item?: any, public index?: number, public even?: boolean, public odd?: boolean) {}\n}\n\nexport interface SetupItemViewArgs {\n view: EmbeddedViewRef<any>;\n data: any;\n index: number;\n context: ItemContext;\n}\n\n@Component({\n selector: 'CollectionView',\n template: `\n <DetachedContainer>\n <Placeholder #loader></Placeholder>\n </DetachedContainer>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CollectionViewComponent implements DoCheck, OnDestroy, AfterContentInit {\n public get nativeElement(): any {\n return this._collectionView;\n }\n public get listView(): any {\n return this._collectionView;\n }\n\n @ViewChild('loader', { read: ViewContainerRef, static: true }) public loader: ViewContainerRef;\n @Output() public setupItemView = new EventEmitter<SetupItemViewArgs>();\n @ContentChild(TemplateRef, { read: TemplateRef, static: true }) public itemTemplateQuery: TemplateRef<ItemContext>;\n\n @Input()\n public get itemTemplate() {\n return this._itemTemplate;\n }\n public set itemTemplate(value: any) {\n this._itemTemplate = value;\n this._collectionView.refresh();\n }\n @Input()\n public get items() {\n return this._items;\n }\n public set items(value: any) {\n this._items = value;\n let needDiffer = true;\n if (value instanceof ObservableArray) {\n needDiffer = false;\n }\n if (needDiffer && !this._differ && isListLikeIterable(value)) {\n this._differ = this._iterableDiffers.find(this._items).create((_index, item) => item);\n }\n\n this._collectionView.items = this._items;\n }\n\n private _collectionView: CollectionView;\n private _items: any;\n private _differ: IterableDiffer<KeyedTemplate>;\n private _itemTemplate: TemplateRef<ItemContext>;\n private _templateMap: Map<string, KeyedTemplate>;\n\n constructor(@Inject(ElementRef) _elementRef: ElementRef, @Inject(IterableDiffers) private _iterableDiffers: IterableDiffers) {\n this._collectionView = _elementRef.nativeElement;\n\n this._collectionView.on(CollectionView.itemLoadingEvent, this.onItemLoading, this);\n this._collectionView.itemViewLoader = this.itemViewLoader;\n }\n\n private itemViewLoader = (viewType) => {\n switch (viewType) {\n case ListViewViewTypes.ItemView:\n if (this._itemTemplate && this.loader) {\n const nativeItem = this.loader.createEmbeddedView(this._itemTemplate, new ItemContext(), 0);\n const typedView = getItemViewRoot(nativeItem);\n typedView[NG_VIEW] = nativeItem;\n return typedView;\n }\n break;\n }\n return null;\n };\n\n public ngAfterContentInit() {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'CollectionView.ngAfterContentInit()');\n }\n this.setItemTemplates();\n }\n\n public ngOnDestroy() {\n this._collectionView.off(CollectionView.itemLoadingEvent, this.onItemLoading, this);\n }\n\n public ngDoCheck() {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'ngDoCheck() - execute differ? ' + this._differ);\n }\n if (this._differ) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'ngDoCheck() - execute differ');\n }\n const changes = this._differ.diff(this._items);\n if (changes) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'ngDoCheck() - refresh');\n }\n this.refresh();\n }\n }\n }\n\n public registerTemplate(key: string, template: TemplateRef<ItemContext>) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'registerTemplate for key: ' + key);\n }\n if (!this._templateMap) {\n this._templateMap = new Map<string, KeyedTemplate>();\n }\n\n const keyedTemplate = {\n key,\n createView: this.getItemTemplateViewFactory(template)\n };\n\n this._templateMap.set(key, keyedTemplate);\n }\n\n // @HostListener('itemLoadingInternal', ['$event'])\n public onItemLoading(args: CollectionViewItemEventData) {\n if (!args.view && !this.itemTemplate) {\n return;\n }\n if (!this.items) return;\n const index = args.index;\n const items = (args.object as any).items;\n const currentItem = typeof items.getItem === 'function' ? items.getItem(index) : items[index];\n let viewRef: EmbeddedViewRef<ItemContext>;\n\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, `onItemLoading: ${index} - Reusing existing view`);\n }\n\n viewRef = args.view[NG_VIEW];\n // Getting angular view from original element (in cases when ProxyViewContainer\n // is used NativeScript internally wraps it in a StackLayout)\n if (!viewRef && args.view instanceof LayoutBase && args.view.getChildrenCount() > 0) {\n viewRef = args.view.getChildAt(0)[NG_VIEW];\n }\n\n if (!viewRef && Trace.isEnabled()) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, `ViewReference not found for item ${index}. View recycling is not working`);\n }\n }\n\n if (!viewRef) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, `onItemLoading: ${index} - Creating view from template`);\n }\n\n viewRef = this.loader.createEmbeddedView(this.itemTemplate, new ItemContext(), 0);\n args.view = getItemViewRoot(viewRef);\n args.view[NG_VIEW] = viewRef;\n }\n\n this.setupViewRef(viewRef, currentItem, index);\n\n this.detectChangesOnChild(viewRef, index);\n }\n\n public setupViewRef(view: EmbeddedViewRef<ItemContext>, data: any, index: number): void {\n const context = view.context;\n context.$implicit = data;\n context.item = data;\n context.index = index;\n context.even = index % 2 === 0;\n context.odd = !context.even;\n\n this.setupItemView.next({\n context,\n data,\n index,\n view\n });\n }\n\n protected getItemTemplateViewFactory(template: TemplateRef<ItemContext>): () => View {\n return () => {\n const viewRef = this.loader.createEmbeddedView(template, new ItemContext(), 0);\n const resultView = getItemViewRoot(viewRef);\n resultView[NG_VIEW] = viewRef;\n\n return resultView;\n };\n }\n\n private setItemTemplates() {\n // The itemTemplateQuery may be changed after list items are added that contain <template> inside,\n // so cache and use only the original template to avoid errors.\n this.itemTemplate = this.itemTemplateQuery;\n\n if (this._templateMap) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'Setting templates');\n }\n\n const templates: KeyedTemplate[] = [];\n this._templateMap.forEach((value) => {\n templates.push(value);\n });\n this._collectionView.itemTemplates = templates;\n } else {\n // If the map was not initialized this means that there are no named templates, so we register the default one.\n this._collectionView.itemTemplate = this.getItemTemplateViewFactory(this.itemTemplate);\n }\n }\n\n private detectChangesOnChild(viewRef: EmbeddedViewRef<ItemContext>, index: number) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'Manually detect changes in child: ' + index);\n }\n viewRef.markForCheck();\n viewRef.detectChanges();\n }\n\n private refresh() {\n if (this._collectionView) {\n this._collectionView.refresh();\n }\n }\n}\n\nexport interface ComponentView {\n rootNodes: any[];\n destroy(): void;\n}\n\nexport type RootLocator = (nodes: any[], nestLevel: number) => View;\n\nexport function getItemViewRoot(viewRef: ComponentView, rootLocator: RootLocator = extractSingleViewRecursive): View {\n const rootView = rootLocator(viewRef.rootNodes, 0);\n return rootView;\n}\n\n@Directive({ selector: '[cvTemplateKey]' })\nexport class TemplateKeyDirective {\n constructor(private templateRef: TemplateRef<any>, @Host() private collectionView: CollectionViewComponent) {}\n\n @Input()\n set cvTemplateKey(value: any) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'cvTemplateKey: ' + value);\n }\n if (this.collectionView && this.templateRef) {\n this.collectionView.registerTemplate(value.toLowerCase(), this.templateRef);\n }\n }\n}\n","// External\nimport { NO_ERRORS_SCHEMA, NgModule } from '@angular/core';\n\nimport { CollectionViewComponent, TemplateKeyDirective } from './collectionview-comp';\nexport { CollectionViewComponent, TemplateKeyDirective } from './collectionview-comp';\n\n@NgModule({\n declarations: [CollectionViewComponent, TemplateKeyDirective],\n exports: [CollectionViewComponent, TemplateKeyDirective],\n schemas: [NO_ERRORS_SCHEMA]\n})\nexport class CollectionViewModule {}\n"],"names":["isListLikeIterable"],"mappings":";;;;;;;AA0BA,eAAe,CAAC,gBAAgB,EAAE,MAAM,cAAc,CAAC,CAAC;AAExD,MAAM,OAAO,GAAG,YAAY,CAAC;MAEhB,WAAW,CAA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iB,EAAE,CAAA;;kDAE6C,uBAAuB,EAAA,UAAA,EAAA,CAAA;8BAAtD,IAAI;;SAGpD,aAAa,EAAA,CAAA;sBADhB,KAAK;;;;MC7QG,oBAAoB,CAAA;;wFAApB,oBAAoB,GAAA,CAAA,EAAA,CAAA;wDAApB,oBAAoB,EAAA,CAAA,CAAA;;;4EAApB,oBAAoB,EAAA,CAAA;kBALhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,uBAAuB,EAAE,oBAAoB,CAAC;AAC7D,oBAAA,OAAO,EAAE,CAAC,uBAAuB,EAAE,oBAAoB,CAAC;oBACxD,OAAO,EAAE,CAAC,gBAAgB,CAAC;iBAC9B,CAAA;;;AACY,CAAA,cAAA,CAAA,OAAA,SAAA,KAAA,WAAA,IAAA,SAAA,KAAA,EAAA,CAAA,kBAAA,CAAA,oBAAoB,mBAJd,uBAAuB,EAAE,oBAAoB,CAClD,EAAA,OAAA,EAAA,CAAA,uBAAuB,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;;;"}
@@ -1,7 +1,8 @@
1
- import { EventEmitter, ɵisListLikeIterable, ɵɵdirectiveInject, ElementRef, IterableDiffers, ɵɵdefineComponent, ɵɵcontentQuery, TemplateRef, ɵɵqueryRefresh, ɵɵloadQuery, ɵɵviewQuery, ViewContainerRef, ɵɵelementStart, ɵɵelement, ɵɵelementEnd, ɵsetClassMetadata, Component, ChangeDetectionStrategy, Inject, ViewChild, Output, ContentChild, Input, ɵɵdefineDirective, Directive, Host, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2
- import { ObservableArray, Trace, LayoutBase } from '@nativescript/core';
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, ɵisListLikeIterable, ElementRef, IterableDiffers, TemplateRef, ViewContainerRef, Component, ChangeDetectionStrategy, Inject, ViewChild, Output, ContentChild, Input, Directive, Host, NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
3
3
  import { CollectionView, ListViewViewTypes, CLog, CLogTypes } from '@nativescript-community/ui-collectionview';
4
- import { registerElement, getSingleViewRecursive } from '@nativescript/angular';
4
+ import { registerElement, extractSingleViewRecursive } from '@nativescript/angular';
5
+ import { ObservableArray, Trace, LayoutBase } from '@nativescript/core';
5
6
 
6
7
  const _c0 = ["loader"];
7
8
  registerElement('CollectionView', () => CollectionView);
@@ -98,7 +99,7 @@ class CollectionViewComponent {
98
99
  }
99
100
  const keyedTemplate = {
100
101
  key,
101
- createView: this.getItemTemplateViewFactory(template),
102
+ createView: this.getItemTemplateViewFactory(template)
102
103
  };
103
104
  this._templateMap.set(key, keyedTemplate);
104
105
  }
@@ -110,17 +111,13 @@ class CollectionViewComponent {
110
111
  return;
111
112
  const index = args.index;
112
113
  const items = args.object.items;
113
- const currentItem = typeof items.getItem === 'function'
114
- ? items.getItem(index)
115
- : items[index];
114
+ const currentItem = typeof items.getItem === 'function' ? items.getItem(index) : items[index];
116
115
  let viewRef;
117
116
  if (Trace.isEnabled()) {
118
117
  CLog(CLogTypes.info, `onItemLoading: ${index} - Reusing existing view`);
119
118
  }
120
119
  viewRef = args.view[NG_VIEW];
121
- if (!viewRef &&
122
- args.view instanceof LayoutBase &&
123
- args.view.getChildrenCount() > 0) {
120
+ if (!viewRef && args.view instanceof LayoutBase && args.view.getChildrenCount() > 0) {
124
121
  viewRef = args.view.getChildAt(0)[NG_VIEW];
125
122
  }
126
123
  if (!viewRef && Trace.isEnabled()) {
@@ -150,7 +147,7 @@ class CollectionViewComponent {
150
147
  context,
151
148
  data,
152
149
  index,
153
- view,
150
+ view
154
151
  });
155
152
  }
156
153
  getItemTemplateViewFactory(template) {
@@ -190,23 +187,23 @@ class CollectionViewComponent {
190
187
  }
191
188
  }
192
189
  }
193
- CollectionViewComponent.ɵfac = function CollectionViewComponent_Factory(t) { return new (t || CollectionViewComponent)(ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(IterableDiffers)); };
194
- CollectionViewComponent.ɵcmp = ɵɵdefineComponent({ type: CollectionViewComponent, selectors: [["CollectionView"]], contentQueries: function CollectionViewComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
195
- ɵɵcontentQuery(dirIndex, TemplateRef, 3, TemplateRef);
190
+ CollectionViewComponent.ɵfac = function CollectionViewComponent_Factory(t) { return new (t || CollectionViewComponent)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(IterableDiffers)); };
191
+ CollectionViewComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CollectionViewComponent, selectors: [["CollectionView"]], contentQueries: function CollectionViewComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
192
+ i0.ɵɵcontentQuery(dirIndex, TemplateRef, 7, TemplateRef);
196
193
  } if (rf & 2) {
197
194
  let _t;
198
- ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.itemTemplateQuery = _t.first);
195
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.itemTemplateQuery = _t.first);
199
196
  } }, viewQuery: function CollectionViewComponent_Query(rf, ctx) { if (rf & 1) {
200
- ɵɵviewQuery(_c0, 3, ViewContainerRef);
197
+ i0.ɵɵviewQuery(_c0, 7, ViewContainerRef);
201
198
  } if (rf & 2) {
202
199
  let _t;
203
- ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.loader = _t.first);
200
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.loader = _t.first);
204
201
  } }, inputs: { itemTemplate: "itemTemplate", items: "items" }, outputs: { setupItemView: "setupItemView" }, decls: 3, vars: 0, consts: [["loader", ""]], template: function CollectionViewComponent_Template(rf, ctx) { if (rf & 1) {
205
- ɵɵelementStart(0, "DetachedContainer");
206
- ɵɵelement(1, "Placeholder", null, 0);
207
- ɵɵelementEnd();
202
+ i0.ɵɵelementStart(0, "DetachedContainer");
203
+ i0.ɵɵelement(1, "Placeholder", null, 0);
204
+ i0.ɵɵelementEnd();
208
205
  } }, encapsulation: 2, changeDetection: 0 });
209
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(CollectionViewComponent, [{
206
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionViewComponent, [{
210
207
  type: Component,
211
208
  args: [{
212
209
  selector: 'CollectionView',
@@ -215,12 +212,12 @@ CollectionViewComponent.ɵcmp = ɵɵdefineComponent({ type: CollectionViewCompon
215
212
  <Placeholder #loader></Placeholder>
216
213
  </DetachedContainer>
217
214
  `,
218
- changeDetection: ChangeDetectionStrategy.OnPush,
215
+ changeDetection: ChangeDetectionStrategy.OnPush
219
216
  }]
220
- }], function () { return [{ type: ElementRef, decorators: [{
217
+ }], function () { return [{ type: i0.ElementRef, decorators: [{
221
218
  type: Inject,
222
219
  args: [ElementRef]
223
- }] }, { type: IterableDiffers, decorators: [{
220
+ }] }, { type: i0.IterableDiffers, decorators: [{
224
221
  type: Inject,
225
222
  args: [IterableDiffers]
226
223
  }] }]; }, { loader: [{
@@ -236,7 +233,7 @@ CollectionViewComponent.ɵcmp = ɵɵdefineComponent({ type: CollectionViewCompon
236
233
  }], items: [{
237
234
  type: Input
238
235
  }] }); })();
239
- function getItemViewRoot(viewRef, rootLocator = getSingleViewRecursive) {
236
+ function getItemViewRoot(viewRef, rootLocator = extractSingleViewRecursive) {
240
237
  const rootView = rootLocator(viewRef.rootNodes, 0);
241
238
  return rootView;
242
239
  }
@@ -254,12 +251,12 @@ class TemplateKeyDirective {
254
251
  }
255
252
  }
256
253
  }
257
- TemplateKeyDirective.ɵfac = function TemplateKeyDirective_Factory(t) { return new (t || TemplateKeyDirective)(ɵɵdirectiveInject(TemplateRef), ɵɵdirectiveInject(CollectionViewComponent, 1)); };
258
- TemplateKeyDirective.ɵdir = ɵɵdefineDirective({ type: TemplateKeyDirective, selectors: [["", "cvTemplateKey", ""]], inputs: { cvTemplateKey: "cvTemplateKey" } });
259
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(TemplateKeyDirective, [{
254
+ TemplateKeyDirective.ɵfac = function TemplateKeyDirective_Factory(t) { return new (t || TemplateKeyDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(CollectionViewComponent, 1)); };
255
+ TemplateKeyDirective.ɵdir = i0.ɵɵdefineDirective({ type: TemplateKeyDirective, selectors: [["", "cvTemplateKey", ""]], inputs: { cvTemplateKey: "cvTemplateKey" } });
256
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TemplateKeyDirective, [{
260
257
  type: Directive,
261
258
  args: [{ selector: '[cvTemplateKey]' }]
262
- }], function () { return [{ type: TemplateRef }, { type: CollectionViewComponent, decorators: [{
259
+ }], function () { return [{ type: i0.TemplateRef }, { type: CollectionViewComponent, decorators: [{
263
260
  type: Host
264
261
  }] }]; }, { cvTemplateKey: [{
265
262
  type: Input
@@ -268,17 +265,17 @@ TemplateKeyDirective.ɵdir = ɵɵdefineDirective({ type: TemplateKeyDirective, s
268
265
  class CollectionViewModule {
269
266
  }
270
267
  CollectionViewModule.ɵfac = function CollectionViewModule_Factory(t) { return new (t || CollectionViewModule)(); };
271
- CollectionViewModule.ɵmod = ɵɵdefineNgModule({ type: CollectionViewModule });
272
- CollectionViewModule.ɵinj = ɵɵdefineInjector({});
273
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(CollectionViewModule, { declarations: [CollectionViewComponent, TemplateKeyDirective], exports: [CollectionViewComponent, TemplateKeyDirective] }); })();
274
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(CollectionViewModule, [{
268
+ CollectionViewModule.ɵmod = i0.ɵɵdefineNgModule({ type: CollectionViewModule });
269
+ CollectionViewModule.ɵinj = i0.ɵɵdefineInjector({});
270
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionViewModule, [{
275
271
  type: NgModule,
276
272
  args: [{
277
273
  declarations: [CollectionViewComponent, TemplateKeyDirective],
278
274
  exports: [CollectionViewComponent, TemplateKeyDirective],
279
- schemas: [NO_ERRORS_SCHEMA],
275
+ schemas: [NO_ERRORS_SCHEMA]
280
276
  }]
281
277
  }], null, null); })();
278
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CollectionViewModule, { declarations: [CollectionViewComponent, TemplateKeyDirective], exports: [CollectionViewComponent, TemplateKeyDirective] }); })();
282
279
 
283
280
  export { CollectionViewComponent, CollectionViewModule, TemplateKeyDirective };
284
- //# sourceMappingURL=nativescript-community-ui-collectionview-angular.js.map
281
+ //# sourceMappingURL=nativescript-community-ui-collectionview-angular.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativescript-community-ui-collectionview-angular.mjs","sources":["../../../../src/collectionview/angular/collectionview-comp.ts","../../../../src/collectionview/angular/index.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n Directive,\n DoCheck,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Host,\n Inject,\n Input,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n Output,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n ɵisListLikeIterable as isListLikeIterable\n} from '@angular/core';\nimport { CLog, CLogTypes, CollectionView, CollectionViewItemEventData, ListViewViewTypes } from '@nativescript-community/ui-collectionview';\nimport { extractSingleViewRecursive, registerElement } from '@nativescript/angular';\nimport { KeyedTemplate, LayoutBase, ObservableArray, Trace, View } from '@nativescript/core';\n\nregisterElement('CollectionView', () => CollectionView);\n\nconst NG_VIEW = '_ngViewRef';\n\nexport class ItemContext {\n constructor(public $implicit?: any, public item?: any, public index?: number, public even?: boolean, public odd?: boolean) {}\n}\n\nexport interface SetupItemViewArgs {\n view: EmbeddedViewRef<any>;\n data: any;\n index: number;\n context: ItemContext;\n}\n\n@Component({\n selector: 'CollectionView',\n template: `\n <DetachedContainer>\n <Placeholder #loader></Placeholder>\n </DetachedContainer>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CollectionViewComponent implements DoCheck, OnDestroy, AfterContentInit {\n public get nativeElement(): any {\n return this._collectionView;\n }\n public get listView(): any {\n return this._collectionView;\n }\n\n @ViewChild('loader', { read: ViewContainerRef, static: true }) public loader: ViewContainerRef;\n @Output() public setupItemView = new EventEmitter<SetupItemViewArgs>();\n @ContentChild(TemplateRef, { read: TemplateRef, static: true }) public itemTemplateQuery: TemplateRef<ItemContext>;\n\n @Input()\n public get itemTemplate() {\n return this._itemTemplate;\n }\n public set itemTemplate(value: any) {\n this._itemTemplate = value;\n this._collectionView.refresh();\n }\n @Input()\n public get items() {\n return this._items;\n }\n public set items(value: any) {\n this._items = value;\n let needDiffer = true;\n if (value instanceof ObservableArray) {\n needDiffer = false;\n }\n if (needDiffer && !this._differ && isListLikeIterable(value)) {\n this._differ = this._iterableDiffers.find(this._items).create((_index, item) => item);\n }\n\n this._collectionView.items = this._items;\n }\n\n private _collectionView: CollectionView;\n private _items: any;\n private _differ: IterableDiffer<KeyedTemplate>;\n private _itemTemplate: TemplateRef<ItemContext>;\n private _templateMap: Map<string, KeyedTemplate>;\n\n constructor(@Inject(ElementRef) _elementRef: ElementRef, @Inject(IterableDiffers) private _iterableDiffers: IterableDiffers) {\n this._collectionView = _elementRef.nativeElement;\n\n this._collectionView.on(CollectionView.itemLoadingEvent, this.onItemLoading, this);\n this._collectionView.itemViewLoader = this.itemViewLoader;\n }\n\n private itemViewLoader = (viewType) => {\n switch (viewType) {\n case ListViewViewTypes.ItemView:\n if (this._itemTemplate && this.loader) {\n const nativeItem = this.loader.createEmbeddedView(this._itemTemplate, new ItemContext(), 0);\n const typedView = getItemViewRoot(nativeItem);\n typedView[NG_VIEW] = nativeItem;\n return typedView;\n }\n break;\n }\n return null;\n };\n\n public ngAfterContentInit() {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'CollectionView.ngAfterContentInit()');\n }\n this.setItemTemplates();\n }\n\n public ngOnDestroy() {\n this._collectionView.off(CollectionView.itemLoadingEvent, this.onItemLoading, this);\n }\n\n public ngDoCheck() {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'ngDoCheck() - execute differ? ' + this._differ);\n }\n if (this._differ) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'ngDoCheck() - execute differ');\n }\n const changes = this._differ.diff(this._items);\n if (changes) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'ngDoCheck() - refresh');\n }\n this.refresh();\n }\n }\n }\n\n public registerTemplate(key: string, template: TemplateRef<ItemContext>) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'registerTemplate for key: ' + key);\n }\n if (!this._templateMap) {\n this._templateMap = new Map<string, KeyedTemplate>();\n }\n\n const keyedTemplate = {\n key,\n createView: this.getItemTemplateViewFactory(template)\n };\n\n this._templateMap.set(key, keyedTemplate);\n }\n\n // @HostListener('itemLoadingInternal', ['$event'])\n public onItemLoading(args: CollectionViewItemEventData) {\n if (!args.view && !this.itemTemplate) {\n return;\n }\n if (!this.items) return;\n const index = args.index;\n const items = (args.object as any).items;\n const currentItem = typeof items.getItem === 'function' ? items.getItem(index) : items[index];\n let viewRef: EmbeddedViewRef<ItemContext>;\n\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, `onItemLoading: ${index} - Reusing existing view`);\n }\n\n viewRef = args.view[NG_VIEW];\n // Getting angular view from original element (in cases when ProxyViewContainer\n // is used NativeScript internally wraps it in a StackLayout)\n if (!viewRef && args.view instanceof LayoutBase && args.view.getChildrenCount() > 0) {\n viewRef = args.view.getChildAt(0)[NG_VIEW];\n }\n\n if (!viewRef && Trace.isEnabled()) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, `ViewReference not found for item ${index}. View recycling is not working`);\n }\n }\n\n if (!viewRef) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, `onItemLoading: ${index} - Creating view from template`);\n }\n\n viewRef = this.loader.createEmbeddedView(this.itemTemplate, new ItemContext(), 0);\n args.view = getItemViewRoot(viewRef);\n args.view[NG_VIEW] = viewRef;\n }\n\n this.setupViewRef(viewRef, currentItem, index);\n\n this.detectChangesOnChild(viewRef, index);\n }\n\n public setupViewRef(view: EmbeddedViewRef<ItemContext>, data: any, index: number): void {\n const context = view.context;\n context.$implicit = data;\n context.item = data;\n context.index = index;\n context.even = index % 2 === 0;\n context.odd = !context.even;\n\n this.setupItemView.next({\n context,\n data,\n index,\n view\n });\n }\n\n protected getItemTemplateViewFactory(template: TemplateRef<ItemContext>): () => View {\n return () => {\n const viewRef = this.loader.createEmbeddedView(template, new ItemContext(), 0);\n const resultView = getItemViewRoot(viewRef);\n resultView[NG_VIEW] = viewRef;\n\n return resultView;\n };\n }\n\n private setItemTemplates() {\n // The itemTemplateQuery may be changed after list items are added that contain <template> inside,\n // so cache and use only the original template to avoid errors.\n this.itemTemplate = this.itemTemplateQuery;\n\n if (this._templateMap) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'Setting templates');\n }\n\n const templates: KeyedTemplate[] = [];\n this._templateMap.forEach((value) => {\n templates.push(value);\n });\n this._collectionView.itemTemplates = templates;\n } else {\n // If the map was not initialized this means that there are no named templates, so we register the default one.\n this._collectionView.itemTemplate = this.getItemTemplateViewFactory(this.itemTemplate);\n }\n }\n\n private detectChangesOnChild(viewRef: EmbeddedViewRef<ItemContext>, index: number) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'Manually detect changes in child: ' + index);\n }\n viewRef.markForCheck();\n viewRef.detectChanges();\n }\n\n private refresh() {\n if (this._collectionView) {\n this._collectionView.refresh();\n }\n }\n}\n\nexport interface ComponentView {\n rootNodes: any[];\n destroy(): void;\n}\n\nexport type RootLocator = (nodes: any[], nestLevel: number) => View;\n\nexport function getItemViewRoot(viewRef: ComponentView, rootLocator: RootLocator = extractSingleViewRecursive): View {\n const rootView = rootLocator(viewRef.rootNodes, 0);\n return rootView;\n}\n\n@Directive({ selector: '[cvTemplateKey]' })\nexport class TemplateKeyDirective {\n constructor(private templateRef: TemplateRef<any>, @Host() private collectionView: CollectionViewComponent) {}\n\n @Input()\n set cvTemplateKey(value: any) {\n if (Trace.isEnabled()) {\n CLog(CLogTypes.info, 'cvTemplateKey: ' + value);\n }\n if (this.collectionView && this.templateRef) {\n this.collectionView.registerTemplate(value.toLowerCase(), this.templateRef);\n }\n }\n}\n","// External\nimport { NO_ERRORS_SCHEMA, NgModule } from '@angular/core';\n\nimport { CollectionViewComponent, TemplateKeyDirective } from './collectionview-comp';\nexport { CollectionViewComponent, TemplateKeyDirective } from './collectionview-comp';\n\n@NgModule({\n declarations: [CollectionViewComponent, TemplateKeyDirective],\n exports: [CollectionViewComponent, TemplateKeyDirective],\n schemas: [NO_ERRORS_SCHEMA]\n})\nexport class CollectionViewModule {}\n"],"names":["isListLikeIterable"],"mappings":";;;;;;;AA0BA,eAAe,CAAC,gBAAgB,EAAE,MAAM,cAAc,CAAC,CAAC;AAExD,MAAM,OAAO,GAAG,YAAY,CAAC;MAEhB,WAAW,CAAA;IACpB,WAAmB,CAAA,SAAe,EAAS,IAAU,EAAS,KAAc,EAAS,IAAc,EAAS,GAAa,EAAA;QAAtG,IAAS,CAAA,SAAA,GAAT,SAAS,CAAM;QAAS,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAM;QAAS,IAAK,CAAA,KAAA,GAAL,KAAK,CAAS;QAAS,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAU;QAAS,IAAG,CAAA,GAAA,GAAH,GAAG,CAAU;KAAI;AAChI,CAAA;MAkBY,uBAAuB,CAAA;IA2ChC,WAAgC,CAAA,WAAuB,EAAmC,gBAAiC,EAAA;QAAjC,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAiB;AAlC1G,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EA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AA,oBAAoB,mBAJd,uBAAuB,EAAE,oBAAoB,CAClD,EAAA,OAAA,EAAA,CAAA,uBAAuB,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;;;"}
@@ -2,7 +2,7 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "./collectionview-comp";
3
3
  export { CollectionViewComponent, TemplateKeyDirective } from './collectionview-comp';
4
4
  export declare class CollectionViewModule {
5
- static ɵfac: i0.ɵɵFactoryDef<CollectionViewModule, never>;
6
- static ɵmod: i0.ɵɵNgModuleDefWithMeta<CollectionViewModule, [typeof i1.CollectionViewComponent, typeof i1.TemplateKeyDirective], never, [typeof i1.CollectionViewComponent, typeof i1.TemplateKeyDirective]>;
7
- static ɵinj: i0.ɵɵInjectorDef<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
8
  }
@@ -1,16 +1,30 @@
1
1
  {
2
2
  "name": "@nativescript-community/ui-collectionview-angular",
3
- "main": "bundles/nativescript-community-ui-collectionview-angular.umd.js",
4
- "module": "fesm2015/nativescript-community-ui-collectionview-angular.js",
5
- "es2015": "fesm2015/nativescript-community-ui-collectionview-angular.js",
6
- "esm2015": "esm2015/nativescript-community-ui-collectionview-angular.js",
7
- "fesm2015": "fesm2015/nativescript-community-ui-collectionview-angular.js",
3
+ "main": "index.js",
4
+ "module": "fesm2015/nativescript-community-ui-collectionview-angular.mjs",
5
+ "es2020": "fesm2020/nativescript-community-ui-collectionview-angular.mjs",
6
+ "esm2020": "esm2020/nativescript-community-ui-collectionview-angular.mjs",
7
+ "fesm2020": "fesm2020/nativescript-community-ui-collectionview-angular.mjs",
8
+ "fesm2015": "fesm2015/nativescript-community-ui-collectionview-angular.mjs",
8
9
  "typings": "nativescript-community-ui-collectionview-angular.d.ts",
10
+ "exports": {
11
+ "./package.json": {
12
+ "default": "./package.json"
13
+ },
14
+ ".": {
15
+ "types": "./nativescript-community-ui-collectionview-angular.d.ts",
16
+ "esm2020": "./esm2020/nativescript-community-ui-collectionview-angular.mjs",
17
+ "es2020": "./fesm2020/nativescript-community-ui-collectionview-angular.mjs",
18
+ "es2015": "./fesm2015/nativescript-community-ui-collectionview-angular.mjs",
19
+ "node": "./fesm2015/nativescript-community-ui-collectionview-angular.mjs",
20
+ "default": "./fesm2020/nativescript-community-ui-collectionview-angular.mjs"
21
+ }
22
+ },
9
23
  "sideEffects": false,
10
24
  "dependencies": {
11
- "tslib": "^2.0.0"
25
+ "tslib": "^2.3.0"
12
26
  },
13
27
  "scripts": {
14
- "prepublishOnly": "node --eval \"console.error('ERROR: Trying to publish a package that has been compiled by Ivy. This is not allowed.\\nPlease delete and rebuild the package, without compiling with Ivy, before attempting to publish.\\n')\" && exit 1"
28
+ "prepublishOnly": "node --eval \"console.error('ERROR: Trying to publish a package that has been compiled by Ivy in full compilation mode. This is not allowed.\\nPlease delete and rebuild the package with Ivy partial compilation mode, before attempting to publish.\\n')\" && exit 1"
15
29
  }
16
30
  }
@@ -1,5 +1,5 @@
1
1
  import { ChangedData, CoreTypes, ItemsSource, KeyedTemplate, Label, Property, Template, View } from '@nativescript/core';
2
- import { CollectionView as CollectionViewDefinition, Orientation } from './collectionview';
2
+ import { CollectionView as CollectionViewDefinition, Orientation } from '.';
3
3
  export declare const CollectionViewTraceCategory = "NativescriptCollectionView";
4
4
  export declare enum ContentInsetAdjustmentBehavior {
5
5
  Always = 0,
@@ -28,6 +28,7 @@ export interface Plugin {
28
28
  }
29
29
  export declare abstract class CollectionViewBase extends View implements CollectionViewDefinition {
30
30
  static itemLoadingEvent: string;
31
+ static bindedEvent: string;
31
32
  static scrollEvent: string;
32
33
  static scrollStartEvent: string;
33
34
  static scrollEndEvent: string;
@@ -84,7 +85,7 @@ export declare abstract class CollectionViewBase extends View implements Collect
84
85
  abstract isItemAtIndexVisible(index: number): any;
85
86
  abstract scrollToIndex(index: number, animated: boolean): any;
86
87
  protected updateInnerSize(): void;
87
- onLayout(left: number, top: number, right: number, bottom: number): void;
88
+ onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
88
89
  items: any[] | ItemsSource;
89
90
  _prepareItem(item: View, index: number): any;
90
91
  notifyLoading(args: any): void;
@@ -1,5 +1,6 @@
1
1
  var CollectionViewBase_1;
2
- import { Builder, CSSType, Label, Observable, ObservableArray, PercentLength, Property, ProxyViewContainer, Trace, Utils, View, addWeakEventListener, booleanConverter, heightProperty, makeParser, makeValidator, profile, removeWeakEventListener, widthProperty } from '@nativescript/core';
2
+ import { Builder, CSSType, CoreTypes, Label, Observable, ObservableArray, PercentLength, Property, ProxyViewContainer, Trace, Utils, View, addWeakEventListener, booleanConverter, heightProperty, makeParser, makeValidator, profile, removeWeakEventListener, widthProperty } from '@nativescript/core';
3
+ import { CollectionView as CollectionViewDefinition } from '.';
3
4
  export const CollectionViewTraceCategory = 'NativescriptCollectionView';
4
5
  export var ContentInsetAdjustmentBehavior;
5
6
  (function (ContentInsetAdjustmentBehavior) {
@@ -120,8 +121,8 @@ let CollectionViewBase = CollectionViewBase_1 = class CollectionViewBase extends
120
121
  }
121
122
  }
122
123
  }
123
- onLayout(left, top, right, bottom) {
124
- super.onLayout(left, top, right, bottom);
124
+ onMeasure(widthMeasureSpec, heightMeasureSpec) {
125
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
125
126
  this.updateInnerSize();
126
127
  }
127
128
  _prepareItem(item, index) {
@@ -214,7 +215,11 @@ let CollectionViewBase = CollectionViewBase_1 = class CollectionViewBase extends
214
215
  return lbl;
215
216
  }
216
217
  getTemplateFromSelector(templateKey) {
217
- return this._itemTemplatesInternal.get(templateKey.toLowerCase()) || this._itemTemplatesInternal.get('default');
218
+ const key = templateKey.toLowerCase();
219
+ if (this._itemTemplatesInternal.has(key)) {
220
+ return this._itemTemplatesInternal.get(key);
221
+ }
222
+ return this._itemTemplatesInternal.get('default');
218
223
  }
219
224
  getViewForViewType(viewType, templateKey) {
220
225
  let newView;
@@ -402,6 +407,7 @@ let CollectionViewBase = CollectionViewBase_1 = class CollectionViewBase extends
402
407
  }
403
408
  };
404
409
  CollectionViewBase.itemLoadingEvent = 'itemLoading';
410
+ CollectionViewBase.bindedEvent = 'binded';
405
411
  CollectionViewBase.scrollEvent = 'scroll';
406
412
  CollectionViewBase.scrollStartEvent = 'scrollStart';
407
413
  CollectionViewBase.scrollEndEvent = 'scrollEnd';
@@ -556,4 +562,4 @@ export const scrollBarIndicatorVisibleProperty = new Property({
556
562
  valueConverter: booleanConverter
557
563
  });
558
564
  scrollBarIndicatorVisibleProperty.register(CollectionViewBase);
559
- //# sourceMappingURL=collectionview-common.js.map
565
+ //# sourceMappingURL=index-common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-common.js","sourceRoot":"../src/","sources":["index-common.ts"],"names":[],"mappings":";AAAA,OAAO,EACH,OAAO,EACP,OAAO,EAEP,SAAS,EAGT,KAAK,EACL,UAAU,EACV,eAAe,EACf,aAAa,EACb,QAAQ,EACR,kBAAkB,EAElB,KAAK,EACL,KAAK,EACL,IAAI,EACJ,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,aAAa,EACb,OAAO,EACP,uBAAuB,EACvB,aAAa,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,IAAI,wBAAwB,EAA4C,MAAM,GAAG,CAAC;AAEzG,MAAM,CAAC,MAAM,2BAA2B,GAAG,4BAA4B,CAAC;AAGxE,MAAM,CAAN,IAAY,8BAKX;AALD,WAAY,8BAA8B;IACtC,uFAAM,CAAA;IACN,6FAAS,CAAA;IACT,qFAAK,CAAA;IACL,uGAAc,CAAA;AAClB,CAAC,EALW,8BAA8B,KAA9B,8B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ACnC,CAAC,CAAC;AACH,yBAAyB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,+BAA+B,GAAG,IAAI,QAAQ,CAA8B;IACrF,IAAI,EAAE,yBAAyB;IAC/B,YAAY,EAAE,KAAK;IACnB,cAAc,EAAE,gBAAgB;CACnC,CAAC,CAAC;AACH,+BAA+B,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;AAE7D,MAAM,CAAC,MAAM,iCAAiC,GAAG,IAAI,QAAQ,CAA8B;IACvF,IAAI,EAAE,2BAA2B;IACjC,YAAY,EAAE,IAAI;IAClB,cAAc,EAAE,gBAAgB;CACnC,CAAC,CAAC;AACH,iCAAiC,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC"}
@@ -1,16 +1,12 @@
1
1
  import { ChangedData, CoreTypes, View, ViewBase } from '@nativescript/core';
2
- import { CollectionViewBase } from './collectionview-common';
3
- export * from './collectionview-common';
2
+ import { CollectionViewBase } from './index-common';
3
+ export * from './index-common';
4
4
  declare module '@nativescript/core/ui/core/view' {
5
- interface View {
6
- handleGestureTouch(event: android.view.MotionEvent): any;
7
- }
8
- }
9
- declare module '@nativescript/core/ui/core/view' {
10
- interface View {
5
+ interface ViewCommon {
11
6
  layoutChangeListenerIsSet: boolean;
12
7
  layoutChangeListener: android.view.View.OnLayoutChangeListener;
13
8
  _raiseLayoutChangedEvent(): any;
9
+ handleGestureTouch(event: android.view.MotionEvent): any;
14
10
  }
15
11
  }
16
12
  export declare class CollectionView extends CollectionViewBase {
@@ -42,19 +38,19 @@ export declare class CollectionView extends CollectionViewBase {
42
38
  extraLayoutSpace: number;
43
39
  createNativeView(): any;
44
40
  initNativeView(): void;
41
+ disposeNativeView(): void;
42
+ onLoaded(): void;
45
43
  _getSpanSize: (item: any, index: any) => number;
46
44
  getViewForItemAtIndex(index: number): View;
47
45
  set spanSize(inter: (item: any, index: any) => number);
48
46
  get spanSize(): (item: any, index: any) => number;
49
- onLoaded(): void;
50
47
  private attachScrollListener;
51
- private dettachScrollListener;
48
+ private detachScrollListener;
52
49
  private computeScrollEventData;
53
50
  onScrolled(view: androidx.recyclerview.widget.RecyclerView, dx: number, dy: number): void;
54
51
  onScrollStateChanged(view: androidx.recyclerview.widget.RecyclerView, newState: number): void;
55
52
  addEventListener(arg: string, callback: any, thisArg?: any): void;
56
53
  removeEventListener(arg: string, callback: any, thisArg?: any): void;
57
- disposeNativeView(): void;
58
54
  get android(): androidx.recyclerview.widget.RecyclerView;
59
55
  get layoutManager(): androidsupportv7widgetRecyclerView.LayoutManager;
60
56
  _getViewLayoutParams(): androidviewViewGroup.LayoutParams;
@@ -72,6 +68,7 @@ export declare class CollectionView extends CollectionViewBase {
72
68
  onItemTemplatesChanged(oldValue: any, newValue: any): void;
73
69
  private setOnLayoutChangeListener;
74
70
  _updateSpanCount(): void;
71
+ updateInnerSize(): void;
75
72
  _onColWidthPropertyChanged(oldValue: CoreTypes.PercentLengthType, newValue: CoreTypes.PercentLengthType): void;
76
73
  _onRowHeightPropertyChanged(oldValue: CoreTypes.PercentLengthType, newValue: CoreTypes.PercentLengthType): void;
77
74
  onLayout(left: number, top: number, right: number, bottom: number): void;