@nativescript-community/ui-collectionview 5.3.0 → 5.3.1

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.
@@ -9,6 +9,11 @@ const _c0 = ["loader"];
9
9
  registerElement('CollectionView', () => CollectionView);
10
10
  const NG_VIEW = '_ngViewRef';
11
11
  class ItemContext {
12
+ $implicit;
13
+ item;
14
+ index;
15
+ even;
16
+ odd;
12
17
  constructor($implicit, item, index, even, odd) {
13
18
  this.$implicit = $implicit;
14
19
  this.item = item;
@@ -18,38 +23,20 @@ class ItemContext {
18
23
  }
19
24
  }
20
25
  class CollectionViewComponent {
21
- constructor(_elementRef, _iterableDiffers, _renderer, _ngZone) {
22
- this._elementRef = _elementRef;
23
- this._iterableDiffers = _iterableDiffers;
24
- this._renderer = _renderer;
25
- this._ngZone = _ngZone;
26
- this.setupItemView = new EventEmitter();
27
- this.autoReuseViews = false;
28
- this.itemViewLoader = (viewType) => this._ngZone.run(() => {
29
- switch (viewType) {
30
- case ListViewViewTypes.ItemView:
31
- if (this._itemTemplate && this.loader) {
32
- const typedView = this.getOrCreate(this._itemTemplate);
33
- return typedView;
34
- }
35
- break;
36
- }
37
- return null;
38
- });
39
- this.viewPool = new Map();
40
- this.viewToTemplate = new WeakMap();
41
- this.viewToLoader = new WeakMap();
42
- this._collectionView = _elementRef.nativeElement;
43
- this._collectionView.on(CollectionView.itemLoadingEvent, this.onItemLoading, this);
44
- this._collectionView.itemViewLoader = this.itemViewLoader;
45
- this._loaders = [];
46
- }
26
+ _elementRef;
27
+ _iterableDiffers;
28
+ _renderer;
29
+ _ngZone;
47
30
  get nativeElement() {
48
31
  return this._collectionView;
49
32
  }
50
33
  get listView() {
51
34
  return this._collectionView;
52
35
  }
36
+ loader;
37
+ setupItemView = new EventEmitter();
38
+ itemTemplateQuery;
39
+ autoReuseViews = false;
53
40
  detachedLoaderFactory() {
54
41
  const ref = this.loader.createComponent(DetachedLoader, {
55
42
  index: 0
@@ -79,6 +66,33 @@ class CollectionViewComponent {
79
66
  }
80
67
  this._collectionView.items = this._items;
81
68
  }
69
+ _collectionView;
70
+ _items;
71
+ _differ;
72
+ _itemTemplate;
73
+ _templateMap;
74
+ _loaders;
75
+ constructor(_elementRef, _iterableDiffers, _renderer, _ngZone) {
76
+ this._elementRef = _elementRef;
77
+ this._iterableDiffers = _iterableDiffers;
78
+ this._renderer = _renderer;
79
+ this._ngZone = _ngZone;
80
+ this._collectionView = _elementRef.nativeElement;
81
+ this._collectionView.on(CollectionView.itemLoadingEvent, this.onItemLoading, this);
82
+ this._collectionView.itemViewLoader = this.itemViewLoader;
83
+ this._loaders = [];
84
+ }
85
+ itemViewLoader = (viewType) => this._ngZone.run(() => {
86
+ switch (viewType) {
87
+ case ListViewViewTypes.ItemView:
88
+ if (this._itemTemplate && this.loader) {
89
+ const typedView = this.getOrCreate(this._itemTemplate);
90
+ return typedView;
91
+ }
92
+ break;
93
+ }
94
+ return null;
95
+ });
82
96
  ngAfterContentInit() {
83
97
  if (Trace.isEnabled()) {
84
98
  CLog(CLogTypes.info, 'CollectionView.ngAfterContentInit()');
@@ -218,6 +232,7 @@ class CollectionViewComponent {
218
232
  return resultView;
219
233
  };
220
234
  }
235
+ viewPool = new Map();
221
236
  storeViewRef(viewRef) {
222
237
  const templateRef = this.viewToTemplate.get(viewRef);
223
238
  if (templateRef) {
@@ -233,6 +248,8 @@ class CollectionViewComponent {
233
248
  }
234
249
  }
235
250
  }
251
+ viewToTemplate = new WeakMap();
252
+ viewToLoader = new WeakMap();
236
253
  getOrCreate(templateRef) {
237
254
  return this._ngZone.run(() => {
238
255
  let viewRef = this.getView(templateRef);
@@ -301,25 +318,25 @@ class CollectionViewComponent {
301
318
  this._collectionView.refresh();
302
319
  }
303
320
  }
321
+ static ɵfac = function CollectionViewComponent_Factory(t) { return new (t || CollectionViewComponent)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(IterableDiffers), i0.ɵɵdirectiveInject(NativeScriptRendererFactory), i0.ɵɵdirectiveInject(NgZone)); };
322
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CollectionViewComponent, selectors: [["CollectionView"]], contentQueries: function CollectionViewComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
323
+ i0.ɵɵcontentQuery(dirIndex, TemplateRef, 7, TemplateRef);
324
+ } if (rf & 2) {
325
+ let _t;
326
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.itemTemplateQuery = _t.first);
327
+ } }, viewQuery: function CollectionViewComponent_Query(rf, ctx) { if (rf & 1) {
328
+ i0.ɵɵviewQuery(_c0, 7, ViewContainerRef);
329
+ } if (rf & 2) {
330
+ let _t;
331
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.loader = _t.first);
332
+ } }, hostBindings: function CollectionViewComponent_HostBindings(rf, ctx) { if (rf & 1) {
333
+ i0.ɵɵlistener("itemLoading", function CollectionViewComponent_itemLoading_HostBindingHandler($event) { return ctx.onItemLoading($event); })("itemRecycling", function CollectionViewComponent_itemRecycling_HostBindingHandler($event) { return ctx.onItemRecyclingInternal($event); })("itemDisposing", function CollectionViewComponent_itemDisposing_HostBindingHandler($event) { return ctx.onItemDisposingInternal($event); });
334
+ } }, inputs: { autoReuseViews: "autoReuseViews", itemTemplate: "itemTemplate", items: "items" }, outputs: { setupItemView: "setupItemView" }, decls: 3, vars: 0, consts: [["loader", ""]], template: function CollectionViewComponent_Template(rf, ctx) { if (rf & 1) {
335
+ i0.ɵɵelementStart(0, "DetachedContainer");
336
+ i0.ɵɵelement(1, "Placeholder", null, 0);
337
+ i0.ɵɵelementEnd();
338
+ } }, encapsulation: 2, changeDetection: 0 });
304
339
  }
305
- CollectionViewComponent.ɵfac = function CollectionViewComponent_Factory(t) { return new (t || CollectionViewComponent)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(IterableDiffers), i0.ɵɵdirectiveInject(NativeScriptRendererFactory), i0.ɵɵdirectiveInject(NgZone)); };
306
- CollectionViewComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CollectionViewComponent, selectors: [["CollectionView"]], contentQueries: function CollectionViewComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
307
- i0.ɵɵcontentQuery(dirIndex, TemplateRef, 7, TemplateRef);
308
- } if (rf & 2) {
309
- let _t;
310
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.itemTemplateQuery = _t.first);
311
- } }, viewQuery: function CollectionViewComponent_Query(rf, ctx) { if (rf & 1) {
312
- i0.ɵɵviewQuery(_c0, 7, ViewContainerRef);
313
- } if (rf & 2) {
314
- let _t;
315
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.loader = _t.first);
316
- } }, hostBindings: function CollectionViewComponent_HostBindings(rf, ctx) { if (rf & 1) {
317
- i0.ɵɵlistener("itemLoading", function CollectionViewComponent_itemLoading_HostBindingHandler($event) { return ctx.onItemLoading($event); })("itemRecycling", function CollectionViewComponent_itemRecycling_HostBindingHandler($event) { return ctx.onItemRecyclingInternal($event); })("itemDisposing", function CollectionViewComponent_itemDisposing_HostBindingHandler($event) { return ctx.onItemDisposingInternal($event); });
318
- } }, inputs: { autoReuseViews: "autoReuseViews", itemTemplate: "itemTemplate", items: "items" }, outputs: { setupItemView: "setupItemView" }, decls: 3, vars: 0, consts: [["loader", ""]], template: function CollectionViewComponent_Template(rf, ctx) { if (rf & 1) {
319
- i0.ɵɵelementStart(0, "DetachedContainer");
320
- i0.ɵɵelement(1, "Placeholder", null, 0);
321
- i0.ɵɵelementEnd();
322
- } }, encapsulation: 2, changeDetection: 0 });
323
340
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionViewComponent, [{
324
341
  type: Component,
325
342
  args: [{
@@ -372,6 +389,8 @@ function getItemViewRoot(viewRef, rootLocator = extractSingleViewRecursive) {
372
389
  return rootView;
373
390
  }
374
391
  class TemplateKeyDirective {
392
+ templateRef;
393
+ collectionView;
375
394
  constructor(templateRef, collectionView) {
376
395
  this.templateRef = templateRef;
377
396
  this.collectionView = collectionView;
@@ -384,9 +403,9 @@ class TemplateKeyDirective {
384
403
  this.collectionView.registerTemplate(value.toLowerCase(), this.templateRef);
385
404
  }
386
405
  }
406
+ static ɵfac = function TemplateKeyDirective_Factory(t) { return new (t || TemplateKeyDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(CollectionViewComponent, 1)); };
407
+ static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TemplateKeyDirective, selectors: [["", "cvTemplateKey", ""]], inputs: { cvTemplateKey: "cvTemplateKey" } });
387
408
  }
388
- TemplateKeyDirective.ɵfac = function TemplateKeyDirective_Factory(t) { return new (t || TemplateKeyDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(CollectionViewComponent, 1)); };
389
- TemplateKeyDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TemplateKeyDirective, selectors: [["", "cvTemplateKey", ""]], inputs: { cvTemplateKey: "cvTemplateKey" } });
390
409
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TemplateKeyDirective, [{
391
410
  type: Directive,
392
411
  args: [{ selector: '[cvTemplateKey]' }]
@@ -398,10 +417,10 @@ TemplateKeyDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: Templa
398
417
 
399
418
  // External
400
419
  class CollectionViewModule {
420
+ static ɵfac = function CollectionViewModule_Factory(t) { return new (t || CollectionViewModule)(); };
421
+ static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CollectionViewModule });
422
+ static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({});
401
423
  }
402
- CollectionViewModule.ɵfac = function CollectionViewModule_Factory(t) { return new (t || CollectionViewModule)(); };
403
- CollectionViewModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CollectionViewModule });
404
- CollectionViewModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({});
405
424
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionViewModule, [{
406
425
  type: NgModule,
407
426
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"nativescript-community-ui-collectionview-angular.mjs","sources":["../../../../src/collectionview/angular/collectionview-comp.ts","../../../../src/collectionview/angular/index.ts","../../../../src/collectionview/angular/nativescript-community-ui-collectionview-angular.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n ContentChild,\n Directive,\n DoCheck,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Host,\n HostListener,\n Inject,\n Input,\n IterableDiffer,\n IterableDiffers,\n NgZone,\n OnDestroy,\n Output,\n TemplateRef,\n ViewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { CLog, CLogTypes, CollectionView, CollectionViewItemEventData, ListViewViewTypes } from '@nativescript-community/ui-collectionview';\nimport { DetachedLoader, NativeScriptRendererFactory, extractSingleViewRecursive, isListLikeIterable, 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() autoReuseViews = false;\n\n detachedLoaderFactory() {\n const ref = this.loader.createComponent(DetachedLoader, {\n index: 0\n });\n this.loader.detach(0);\n this._loaders.push(ref);\n return ref;\n }\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 private _loaders: ComponentRef<DetachedLoader>[];\n\n constructor(\n @Inject(ElementRef) private _elementRef: ElementRef,\n @Inject(IterableDiffers) private _iterableDiffers: IterableDiffers,\n @Inject(NativeScriptRendererFactory) private _renderer: NativeScriptRendererFactory,\n @Inject(NgZone) private _ngZone: NgZone\n ) {\n this._collectionView = _elementRef.nativeElement;\n\n this._collectionView.on(CollectionView.itemLoadingEvent, this.onItemLoading, this);\n this._collectionView.itemViewLoader = this.itemViewLoader;\n this._loaders = [];\n }\n\n private itemViewLoader = (viewType) =>\n this._ngZone.run(() => {\n switch (viewType) {\n case ListViewViewTypes.ItemView:\n if (this._itemTemplate && this.loader) {\n const typedView = this.getOrCreate(this._itemTemplate);\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 this._collectionView = null;\n this._loaders.forEach((l) => l.destroy());\n this._loaders = null;\n this.viewToLoader = null;\n this.viewToTemplate = null;\n this.viewPool = null;\n\n this._items = null;\n this._differ = null;\n this._itemTemplate = null;\n if (this._templateMap) {\n this._templateMap.clear();\n }\n this._templateMap = null;\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('itemLoading', ['$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 @HostListener('itemRecycling', ['$event'])\n public onItemRecyclingInternal(args: any) {\n if (!args.view) {\n return;\n }\n let ngView: EmbeddedViewRef<any> = args.view[NG_VIEW];\n\n // Getting angular view from original element (in cases when ProxyViewContainer\n // is used NativeScript internally wraps it in a StackLayout)\n if (!ngView && args.view instanceof LayoutBase && args.view.getChildrenCount() > 0) {\n ngView = args.view.getChildAt(0)[NG_VIEW];\n }\n // console.log('recycling', args.view);\n\n if (ngView) {\n ngView.detach();\n }\n }\n\n @HostListener('itemDisposing', ['$event'])\n public onItemDisposingInternal(args: any) {\n if (!args.view) {\n return;\n }\n let ngView: EmbeddedViewRef<any> = args.view[NG_VIEW];\n\n // Getting angular view from original element (in cases when ProxyViewContainer\n // is used NativeScript internally wraps it in a StackLayout)\n if (!ngView && args.view instanceof LayoutBase && args.view.getChildrenCount() > 0) {\n ngView = args.view.getChildAt(0)[NG_VIEW];\n }\n\n if (ngView) {\n ngView.detach();\n this.storeViewRef(ngView);\n }\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 viewPool = new Map<\n TemplateRef<ItemContext>,\n {\n scrapSize: number;\n scrapHead: Set<EmbeddedViewRef<ItemContext>>;\n }\n >();\n private storeViewRef(viewRef: EmbeddedViewRef<any>) {\n const templateRef = this.viewToTemplate.get(viewRef);\n if (templateRef) {\n const scrap = this.viewPool.get(templateRef);\n if (scrap) {\n if (scrap.scrapHead.size >= scrap.scrapSize) {\n viewRef.destroy();\n this.viewToLoader.get(viewRef)?.destroy();\n } else {\n scrap.scrapHead.add(viewRef);\n }\n }\n }\n }\n viewToTemplate = new WeakMap<EmbeddedViewRef<any>, TemplateRef<any>>();\n viewToLoader = new WeakMap<EmbeddedViewRef<any>, ComponentRef<DetachedLoader>>();\n\n private getOrCreate(templateRef: TemplateRef<ItemContext>) {\n return this._ngZone.run(() => {\n let viewRef = this.getView(templateRef);\n if (!viewRef) {\n const loader = this.detachedLoaderFactory();\n // viewRef = this.loader.createEmbeddedView(templateRef, new ItemContext(), 0);\n viewRef = loader.instance.vc.createEmbeddedView(templateRef, new ItemContext(), 0);\n this.viewToLoader.set(viewRef, loader);\n this.viewToTemplate.set(viewRef, templateRef);\n }\n viewRef.detach();\n const resultView = getItemViewRoot(viewRef);\n resultView[NG_VIEW] = viewRef;\n resultView.reusable = this.autoReuseViews;\n return resultView;\n });\n }\n private getView(templateRef: TemplateRef<ItemContext>) {\n const pool = this.getViewPool(templateRef);\n while (pool.scrapHead.size > 0) {\n const viewRef: EmbeddedViewRef<ItemContext> = pool.scrapHead.values().next().value;\n pool.scrapHead.delete(viewRef);\n if (!viewRef.destroyed) {\n return viewRef;\n }\n }\n return null;\n }\n\n private getViewPool(templateRef: TemplateRef<ItemContext>) {\n if (!this.viewPool.has(templateRef)) {\n this.viewPool.set(templateRef, {\n scrapSize: this.autoReuseViews ? Infinity : 0,\n scrapHead: new Set<EmbeddedViewRef<ItemContext>>()\n });\n }\n return this.viewPool.get(templateRef);\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA4BA,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;AAuDhC,IAAA,WAAA,CACgC,WAAuB,EAClB,gBAAiC,EACrB,SAAsC,EAC3D,OAAe,EAAA;QAHX,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;QAClB,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAiB;QACrB,IAAS,CAAA,SAAA,GAAT,SAAS,CAA6B;QAC3D,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;AAlD1B,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAqB,CAAC;QAG9D,IAAc,CAAA,cAAA,GAAG,KAAK,CAAC;AAwDxB,QAAA,IAAA,CAAA,cAAc,GAAG,CAAC,QAAQ,KAC9B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAK;AAClB,YAAA,QAAQ,QAAQ;gBACZ,KAAK,iBAAiB,CAAC,QAAQ;AAC3B,oBAAA,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,MAAM,EAAE;wBACnC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CA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AAuB,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACR3D;;AAEG;;;;"}
1
+ {"version":3,"file":"nativescript-community-ui-collectionview-angular.mjs","sources":["../../../../src/collectionview/angular/collectionview-comp.ts","../../../../src/collectionview/angular/index.ts","../../../../src/collectionview/angular/nativescript-community-ui-collectionview-angular.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n ContentChild,\n Directive,\n DoCheck,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Host,\n HostListener,\n Inject,\n Input,\n IterableDiffer,\n IterableDiffers,\n NgZone,\n OnDestroy,\n Output,\n TemplateRef,\n ViewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { CLog, CLogTypes, CollectionView, CollectionViewItemEventData, ListViewViewTypes } from '@nativescript-community/ui-collectionview';\nimport { DetachedLoader, NativeScriptRendererFactory, extractSingleViewRecursive, isListLikeIterable, 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() autoReuseViews = false;\n\n detachedLoaderFactory() {\n const ref = this.loader.createComponent(DetachedLoader, {\n index: 0\n });\n this.loader.detach(0);\n this._loaders.push(ref);\n return ref;\n }\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 private _loaders: ComponentRef<DetachedLoader>[];\n\n constructor(\n @Inject(ElementRef) private _elementRef: ElementRef,\n @Inject(IterableDiffers) private _iterableDiffers: IterableDiffers,\n @Inject(NativeScriptRendererFactory) private _renderer: NativeScriptRendererFactory,\n @Inject(NgZone) private _ngZone: NgZone\n ) {\n this._collectionView = _elementRef.nativeElement;\n\n this._collectionView.on(CollectionView.itemLoadingEvent, this.onItemLoading, this);\n this._collectionView.itemViewLoader = this.itemViewLoader;\n this._loaders = [];\n }\n\n private itemViewLoader = (viewType) =>\n this._ngZone.run(() => {\n switch (viewType) {\n case ListViewViewTypes.ItemView:\n if (this._itemTemplate && this.loader) {\n const typedView = this.getOrCreate(this._itemTemplate);\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 this._collectionView = null;\n this._loaders.forEach((l) => l.destroy());\n this._loaders = null;\n this.viewToLoader = null;\n this.viewToTemplate = null;\n this.viewPool = null;\n\n this._items = null;\n this._differ = null;\n this._itemTemplate = null;\n if (this._templateMap) {\n this._templateMap.clear();\n }\n this._templateMap = null;\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('itemLoading', ['$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 @HostListener('itemRecycling', ['$event'])\n public onItemRecyclingInternal(args: any) {\n if (!args.view) {\n return;\n }\n let ngView: EmbeddedViewRef<any> = args.view[NG_VIEW];\n\n // Getting angular view from original element (in cases when ProxyViewContainer\n // is used NativeScript internally wraps it in a StackLayout)\n if (!ngView && args.view instanceof LayoutBase && args.view.getChildrenCount() > 0) {\n ngView = args.view.getChildAt(0)[NG_VIEW];\n }\n // console.log('recycling', args.view);\n\n if (ngView) {\n ngView.detach();\n }\n }\n\n @HostListener('itemDisposing', ['$event'])\n public onItemDisposingInternal(args: any) {\n if (!args.view) {\n return;\n }\n let ngView: EmbeddedViewRef<any> = args.view[NG_VIEW];\n\n // Getting angular view from original element (in cases when ProxyViewContainer\n // is used NativeScript internally wraps it in a StackLayout)\n if (!ngView && args.view instanceof LayoutBase && args.view.getChildrenCount() > 0) {\n ngView = args.view.getChildAt(0)[NG_VIEW];\n }\n\n if (ngView) {\n ngView.detach();\n this.storeViewRef(ngView);\n }\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 viewPool = new Map<\n TemplateRef<ItemContext>,\n {\n scrapSize: number;\n scrapHead: Set<EmbeddedViewRef<ItemContext>>;\n }\n >();\n private storeViewRef(viewRef: EmbeddedViewRef<any>) {\n const templateRef = this.viewToTemplate.get(viewRef);\n if (templateRef) {\n const scrap = this.viewPool.get(templateRef);\n if (scrap) {\n if (scrap.scrapHead.size >= scrap.scrapSize) {\n viewRef.destroy();\n this.viewToLoader.get(viewRef)?.destroy();\n } else {\n scrap.scrapHead.add(viewRef);\n }\n }\n }\n }\n viewToTemplate = new WeakMap<EmbeddedViewRef<any>, TemplateRef<any>>();\n viewToLoader = new WeakMap<EmbeddedViewRef<any>, ComponentRef<DetachedLoader>>();\n\n private getOrCreate(templateRef: TemplateRef<ItemContext>) {\n return this._ngZone.run(() => {\n let viewRef = this.getView(templateRef);\n if (!viewRef) {\n const loader = this.detachedLoaderFactory();\n // viewRef = this.loader.createEmbeddedView(templateRef, new ItemContext(), 0);\n viewRef = loader.instance.vc.createEmbeddedView(templateRef, new ItemContext(), 0);\n this.viewToLoader.set(viewRef, loader);\n this.viewToTemplate.set(viewRef, templateRef);\n }\n viewRef.detach();\n const resultView = getItemViewRoot(viewRef);\n resultView[NG_VIEW] = viewRef;\n resultView.reusable = this.autoReuseViews;\n return resultView;\n });\n }\n private getView(templateRef: TemplateRef<ItemContext>) {\n const pool = this.getViewPool(templateRef);\n while (pool.scrapHead.size > 0) {\n const viewRef: EmbeddedViewRef<ItemContext> = pool.scrapHead.values().next().value;\n pool.scrapHead.delete(viewRef);\n if (!viewRef.destroyed) {\n return viewRef;\n }\n }\n return null;\n }\n\n private getViewPool(templateRef: TemplateRef<ItemContext>) {\n if (!this.viewPool.has(templateRef)) {\n this.viewPool.set(templateRef, {\n scrapSize: this.autoReuseViews ? Infinity : 0,\n scrapHead: new Set<EmbeddedViewRef<ItemContext>>()\n });\n }\n return this.viewPool.get(templateRef);\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA4BA,e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BAAoB,CAAC;gBACxD,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC9B,aAAA,CAAA;;AACY,CAAA,YAAA,EAAA,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;;ACR3D;;AAEG;;;;"}
@@ -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
+ }
@@ -1,11 +1,7 @@
1
1
  {
2
2
  "name": "@nativescript-community/ui-collectionview-angular",
3
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",
4
+ "module": "fesm2022/nativescript-community-ui-collectionview-angular.mjs",
9
5
  "typings": "index.d.ts",
10
6
  "exports": {
11
7
  "./package.json": {
@@ -13,11 +9,9 @@
13
9
  },
14
10
  ".": {
15
11
  "types": "./index.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"
12
+ "esm2022": "./esm2022/nativescript-community-ui-collectionview-angular.mjs",
13
+ "esm": "./esm2022/nativescript-community-ui-collectionview-angular.mjs",
14
+ "default": "./fesm2022/nativescript-community-ui-collectionview-angular.mjs"
21
15
  }
22
16
  },
23
17
  "sideEffects": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript-community/ui-collectionview",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "description": "Allows you to easily add a collection view (grid list view) to your projects. Supports vertical and horizontal modes, templating, and more.",
5
5
  "main": "./index",
6
6
  "sideEffects": false,
@@ -56,5 +56,5 @@
56
56
  },
57
57
  "license": "Apache-2.0",
58
58
  "readmeFilename": "README.md",
59
- "gitHead": "3eb64b60bab938d79853920e290ee8f26afbf178"
59
+ "gitHead": "e308ddafddd6c951a44043dd53edcf2cd149f614"
60
60
  }