@nativescript-community/ui-collectionview 4.0.44 → 4.0.48

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 (55) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +188 -95
  3. package/angular/bundles/nativescript-community-ui-collectionview-angular.umd.js +44 -24
  4. package/angular/bundles/nativescript-community-ui-collectionview-angular.umd.js.map +1 -1
  5. package/angular/collectionview-comp.d.ts +4 -4
  6. package/angular/esm2015/collectionview-comp.js +2 -2
  7. package/angular/esm2015/index.js +2 -2
  8. package/angular/fesm2015/nativescript-community-ui-collectionview-angular.js +22 -21
  9. package/angular/fesm2015/nativescript-community-ui-collectionview-angular.js.map +1 -1
  10. package/angular/index.d.ts +3 -3
  11. package/angular/package.json +2 -2
  12. package/{collectionview-common.d.ts → index-common.d.ts} +1 -1
  13. package/{collectionview-common.js → index-common.js} +1 -1
  14. package/index-common.js.map +1 -0
  15. package/{collectionview.android.d.ts → index.android.d.ts} +2 -2
  16. package/{collectionview.android.js → index.android.js} +11 -8
  17. package/index.android.js.map +1 -0
  18. package/{collectionview.d.ts → index.d.ts} +2 -2
  19. package/{collectionview.ios.d.ts → index.ios.d.ts} +2 -3
  20. package/{collectionview.ios.js → index.ios.js} +4 -11
  21. package/index.ios.js.map +1 -0
  22. package/package.json +7 -6
  23. package/platforms/android/AndroidManifest.xml +0 -0
  24. package/platforms/android/include.gradle +1 -1
  25. package/platforms/android/java/com/nativescript/collectionview/Adapter.java +0 -0
  26. package/platforms/android/java/com/nativescript/collectionview/AdapterInterface.java +0 -0
  27. package/platforms/android/java/com/nativescript/collectionview/CollectionViewCellHolder.java +0 -0
  28. package/platforms/android/java/com/nativescript/collectionview/GridLayoutManager.java +0 -0
  29. package/platforms/android/java/com/nativescript/collectionview/OnScrollListener.java +0 -0
  30. package/platforms/android/java/com/nativescript/collectionview/PreCachingGridLayoutManager.java +0 -0
  31. package/platforms/android/java/com/nativescript/collectionview/RecyclerView.java +0 -0
  32. package/platforms/android/java/com/nativescript/collectionview/SizeChangedListener.java +0 -0
  33. package/platforms/android/java/com/nativescript/collectionview/SpanSizeLookup.java +0 -0
  34. package/platforms/android/native-api-usage.json +25 -0
  35. package/platforms/android/res/layout/collectionview.xml +0 -0
  36. package/react/index.d.ts +8 -8
  37. package/react/index.js +1 -1
  38. package/react/index.js.map +1 -1
  39. package/references.d.ts +0 -0
  40. package/svelte/index.d.ts +1 -1
  41. package/svelte/index.js +6 -3
  42. package/svelte/index.js.map +1 -1
  43. package/typings/arv.d.ts +0 -0
  44. package/vue/component.d.ts +0 -0
  45. package/vue/component.js +1 -7
  46. package/vue/component.js.map +1 -1
  47. package/vue/index.d.ts +0 -0
  48. package/vue/index.js +1 -1
  49. package/vue/index.js.map +1 -1
  50. package/LICENSE +0 -201
  51. package/angular/bundles/nativescript-community-ui-collectionview-angular.umd.min.js +0 -2
  52. package/angular/bundles/nativescript-community-ui-collectionview-angular.umd.min.js.map +0 -1
  53. package/collectionview-common.js.map +0 -1
  54. package/collectionview.android.js.map +0 -1
  55. package/collectionview.ios.js.map +0 -1
@@ -1,8 +1,28 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@nativescript/core'), require('@nativescript-community/ui-collectionview'), require('@nativescript/angular')) :
3
3
  typeof define === 'function' && define.amd ? define('@nativescript-community/ui-collectionview-angular', ['exports', '@angular/core', '@nativescript/core', '@nativescript-community/ui-collectionview', '@nativescript/angular'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['nativescript-community'] = global['nativescript-community'] || {}, global['nativescript-community']['ui-collectionview-angular'] = {}), global.ng.core, global['ns-core'], global['ns-ui-collectionview'], global['ns-angular']));
5
- }(this, (function (exports, i0, core, uiCollectionview, angular) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["nativescript-community"] = global["nativescript-community"] || {}, global["nativescript-community"]["ui-collectionview-angular"] = {}), global.ng.core, global["ns-core"], global["ns-ui-collectionview"], global["ns-angular"]));
5
+ })(this, (function (exports, i0, core, uiCollectionview, angular) { 'use strict';
6
+
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
6
26
 
7
27
  var _c0 = ["loader"];
8
28
  angular.registerElement('CollectionView', function () { return uiCollectionview.CollectionView; });
@@ -74,7 +94,7 @@
74
94
  if (value instanceof core.ObservableArray) {
75
95
  needDiffer = false;
76
96
  }
77
- if (needDiffer && !this._differ && i0.ɵisListLikeIterable(value)) {
97
+ if (needDiffer && !this._differ && i0["ɵisListLikeIterable"](value)) {
78
98
  this._differ = this._iterableDiffers.find(this._items).create(function (_index, item) { return item; });
79
99
  }
80
100
  this._collectionView.items = this._items;
@@ -211,32 +231,32 @@
211
231
  };
212
232
  return CollectionViewComponent;
213
233
  }());
214
- CollectionViewComponent.ɵfac = function CollectionViewComponent_Factory(t) { return new (t || CollectionViewComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.IterableDiffers)); };
215
- CollectionViewComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CollectionViewComponent, selectors: [["CollectionView"]], contentQueries: function CollectionViewComponent_ContentQueries(rf, ctx, dirIndex) {
234
+ CollectionViewComponent.ɵfac = function CollectionViewComponent_Factory(t) { return new (t || CollectionViewComponent)(i0__namespace.ɵɵdirectiveInject(i0.ElementRef), i0__namespace.ɵɵdirectiveInject(i0.IterableDiffers)); };
235
+ CollectionViewComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CollectionViewComponent, selectors: [["CollectionView"]], contentQueries: function CollectionViewComponent_ContentQueries(rf, ctx, dirIndex) {
216
236
  if (rf & 1) {
217
- i0.ɵɵcontentQuery(dirIndex, i0.TemplateRef, 3, i0.TemplateRef);
237
+ i0__namespace.ɵɵcontentQuery(dirIndex, i0.TemplateRef, 7, i0.TemplateRef);
218
238
  }
219
239
  if (rf & 2) {
220
240
  var _t = void 0;
221
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.itemTemplateQuery = _t.first);
241
+ i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.itemTemplateQuery = _t.first);
222
242
  }
223
243
  }, viewQuery: function CollectionViewComponent_Query(rf, ctx) {
224
244
  if (rf & 1) {
225
- i0.ɵɵviewQuery(_c0, 3, i0.ViewContainerRef);
245
+ i0__namespace.ɵɵviewQuery(_c0, 7, i0.ViewContainerRef);
226
246
  }
227
247
  if (rf & 2) {
228
248
  var _t = void 0;
229
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.loader = _t.first);
249
+ i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.loader = _t.first);
230
250
  }
231
251
  }, inputs: { itemTemplate: "itemTemplate", items: "items" }, outputs: { setupItemView: "setupItemView" }, decls: 3, vars: 0, consts: [["loader", ""]], template: function CollectionViewComponent_Template(rf, ctx) {
232
252
  if (rf & 1) {
233
- i0.ɵɵelementStart(0, "DetachedContainer");
234
- i0.ɵɵelement(1, "Placeholder", null, 0);
235
- i0.ɵɵelementEnd();
253
+ i0__namespace.ɵɵelementStart(0, "DetachedContainer");
254
+ i0__namespace.ɵɵelement(1, "Placeholder", null, 0);
255
+ i0__namespace.ɵɵelementEnd();
236
256
  }
237
257
  }, encapsulation: 2, changeDetection: 0 });
238
258
  (function () {
239
- (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionViewComponent, [{
259
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CollectionViewComponent, [{
240
260
  type: i0.Component,
241
261
  args: [{
242
262
  selector: 'CollectionView',
@@ -244,10 +264,10 @@
244
264
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
245
265
  }]
246
266
  }], function () {
247
- return [{ type: i0.ElementRef, decorators: [{
267
+ return [{ type: i0__namespace.ElementRef, decorators: [{
248
268
  type: i0.Inject,
249
269
  args: [i0.ElementRef]
250
- }] }, { type: i0.IterableDiffers, decorators: [{
270
+ }] }, { type: i0__namespace.IterableDiffers, decorators: [{
251
271
  type: i0.Inject,
252
272
  args: [i0.IterableDiffers]
253
273
  }] }];
@@ -289,14 +309,14 @@
289
309
  });
290
310
  return TemplateKeyDirective;
291
311
  }());
292
- TemplateKeyDirective.ɵfac = function TemplateKeyDirective_Factory(t) { return new (t || TemplateKeyDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(CollectionViewComponent, 1)); };
293
- TemplateKeyDirective.ɵdir = i0.ɵɵdefineDirective({ type: TemplateKeyDirective, selectors: [["", "cvTemplateKey", ""]], inputs: { cvTemplateKey: "cvTemplateKey" } });
312
+ TemplateKeyDirective.ɵfac = function TemplateKeyDirective_Factory(t) { return new (t || TemplateKeyDirective)(i0__namespace.ɵɵdirectiveInject(i0__namespace.TemplateRef), i0__namespace.ɵɵdirectiveInject(CollectionViewComponent, 1)); };
313
+ TemplateKeyDirective.ɵdir = i0__namespace.ɵɵdefineDirective({ type: TemplateKeyDirective, selectors: [["", "cvTemplateKey", ""]], inputs: { cvTemplateKey: "cvTemplateKey" } });
294
314
  (function () {
295
- (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TemplateKeyDirective, [{
315
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(TemplateKeyDirective, [{
296
316
  type: i0.Directive,
297
317
  args: [{ selector: '[cvTemplateKey]' }]
298
318
  }], function () {
299
- return [{ type: i0.TemplateRef }, { type: CollectionViewComponent, decorators: [{
319
+ return [{ type: i0__namespace.TemplateRef }, { type: CollectionViewComponent, decorators: [{
300
320
  type: i0.Host
301
321
  }] }];
302
322
  }, { cvTemplateKey: [{
@@ -310,11 +330,10 @@
310
330
  return CollectionViewModule;
311
331
  }());
312
332
  CollectionViewModule.ɵfac = function CollectionViewModule_Factory(t) { return new (t || CollectionViewModule)(); };
313
- CollectionViewModule.ɵmod = i0.ɵɵdefineNgModule({ type: CollectionViewModule });
314
- CollectionViewModule.ɵinj = i0.ɵɵdefineInjector({});
315
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CollectionViewModule, { declarations: [CollectionViewComponent, TemplateKeyDirective], exports: [CollectionViewComponent, TemplateKeyDirective] }); })();
333
+ CollectionViewModule.ɵmod = i0__namespace.ɵɵdefineNgModule({ type: CollectionViewModule });
334
+ CollectionViewModule.ɵinj = i0__namespace.ɵɵdefineInjector({});
316
335
  (function () {
317
- (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionViewModule, [{
336
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CollectionViewModule, [{
318
337
  type: i0.NgModule,
319
338
  args: [{
320
339
  declarations: [CollectionViewComponent, TemplateKeyDirective],
@@ -323,6 +342,7 @@
323
342
  }]
324
343
  }], null, null);
325
344
  })();
345
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(CollectionViewModule, { declarations: [CollectionViewComponent, TemplateKeyDirective], exports: [CollectionViewComponent, TemplateKeyDirective] }); })();
326
346
 
327
347
  exports.CollectionViewComponent = CollectionViewComponent;
328
348
  exports.CollectionViewModule = CollectionViewModule;
@@ -330,5 +350,5 @@
330
350
 
331
351
  Object.defineProperty(exports, '__esModule', { value: true });
332
352
 
333
- })));
353
+ }));
334
354
  //# sourceMappingURL=nativescript-community-ui-collectionview-angular.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nativescript-community-ui-collectionview-angular.umd.js","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 { KeyedTemplate, LayoutBase, ObservableArray, Trace, View } from '@nativescript/core';\nimport { CLog, CLogTypes, CollectionView, CollectionViewItemEventData, ListViewViewTypes } from '@nativescript-community/ui-collectionview';\n\nimport { getSingleViewRecursive, isKnownView, registerElement } from '@nativescript/angular';\n\nregisterElement('CollectionView', () => CollectionView);\n\nconst NG_VIEW = '_ngViewRef';\n\nexport class ItemContext {\n constructor(\n public $implicit?: any,\n public item?: any,\n public index?: number,\n public even?: boolean,\n public odd?: boolean\n ) {}\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 =\n typeof items.getItem === 'function'\n ? items.getItem(index)\n : 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 (\n !viewRef &&\n args.view instanceof LayoutBase &&\n args.view.getChildrenCount() > 0\n ) {\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(\n this.itemTemplate,\n new ItemContext(),\n 0\n );\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(\n template: TemplateRef<ItemContext>\n ): () => View {\n return () => {\n const viewRef = this.loader.createEmbeddedView(\n template,\n new ItemContext(),\n 0\n );\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 = getSingleViewRecursive): 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":["registerElement","CollectionView","EventEmitter","ListViewViewTypes","ObservableArray","isListLikeIterable","Trace","CLog","CLogTypes","LayoutBase","ElementRef","IterableDiffers","TemplateRef","ViewContainerRef","i0.ɵɵelementStart","i0.ɵɵelement","i0.ɵɵelementEnd","Component","ChangeDetectionStrategy","Inject","ViewChild","Output","ContentChild","Input","Directive","Host","NgModule","NO_ERRORS_SCHEMA"],"mappings":";;;;;;;AA2BAA,2BAAe,CAAC,gBAAgB,EAAE,cAAM,OAAAC,+BAAc,GAAA,CAAC,CAAC;IAExD,IAAM,OAAO,GAAG,YAAY,CAAC;IAE7B;QACI,qBACW,SAAe,EACf,IAAU,EACV,KAAc,EACd,IAAc,EACd,GAAa;YAJb,cAAS,GAAT,SAAS,CAAM;YACf,SAAI,GAAJ,IAAI,CAAM;YACV,UAAK,GAAL,KAAK,CAAS;YACd,SAAI,GAAJ,IAAI,CAAU;YACd,QAAG,GAAH,GAAG,CAAU;SACpB;0BACP;KAAA,IAAA;;QA6DG,iCAAgC,WAAuB,EAAmC,gBAAiC;YAA3H,iBAKC;YALyF,qBAAgB,GAAhB,gBAAgB,CAAiB;YAlC1G,kBAAa,GAAG,IAAIC,eAAY,EAAqB,CAAC;YAyC/D,mBAAc,GAAG,UAAC,QAAQ;gBAC9B,QAAQ,QAAQ;oBACZ,KAAKC,kCAAiB,CAAC,QAAQ;wBAC3B,IAAI,KAAI,CAAC,aAAa,IAAI,KAAI,CAAC,MAAM,EAAE;4BACnC,IAAM,UAAU,GAAG,KAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,KAAI,CAAC,aAAa,EAAE,IAAI,WAAW,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I,CAAC,cAAc,IAAI,IAAI,CAAC,WAAW,EAAE;oBACzC,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;iBAC/E;aACJ;;;WAAA;;;4FAXQ,oBAAoB,6DACsD,uBAAuB;6DADjG,oBAAoB;;gFAApB,oBAAoB;sBADhCgB,YAAS;uBAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE;;sDAE6C,uBAAuB;kCAAtDC,OAAI;;aAGpD,aAAa;0BADhBF,QAAK;;;;;QCrSV;;;;4FAAa,oBAAoB;4DAApB,oBAAoB;;4FAApB,oBAAoB,mBAJd,uBAAuB,EAAE,oBAAoB,aAClD,uBAAuB,EAAE,oBAAoB;;gFAG9C,oBAAoB;sBALhCG,WAAQ;uBAAC;wBACN,YAAY,EAAE,CAAC,uBAAuB,EAAE,oBAAoB,CAAC;wBAC7D,OAAO,EAAE,CAAC,uBAAuB,EAAE,oBAAoB,CAAC;wBACxD,OAAO,EAAE,CAACC,mBAAgB,CAAC;qBAC9B;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"nativescript-community-ui-collectionview-angular.umd.js","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 { KeyedTemplate, LayoutBase, ObservableArray, Trace, View } from '@nativescript/core';\nimport { CLog, CLogTypes, CollectionView, CollectionViewItemEventData, ListViewViewTypes } from '@nativescript-community/ui-collectionview';\n\nimport { getSingleViewRecursive, isKnownView, registerElement } from '@nativescript/angular';\n\nregisterElement('CollectionView', () => CollectionView);\n\nconst NG_VIEW = '_ngViewRef';\n\nexport class ItemContext {\n constructor(\n public $implicit?: any,\n public item?: any,\n public index?: number,\n public even?: boolean,\n public odd?: boolean\n ) {}\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 =\n typeof items.getItem === 'function'\n ? items.getItem(index)\n : 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 (\n !viewRef &&\n args.view instanceof LayoutBase &&\n args.view.getChildrenCount() > 0\n ) {\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(\n this.itemTemplate,\n new ItemContext(),\n 0\n );\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(\n template: TemplateRef<ItemContext>\n ): () => View {\n return () => {\n const viewRef = this.loader.createEmbeddedView(\n template,\n new ItemContext(),\n 0\n );\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 = getSingleViewRecursive): 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":["registerElement","CollectionView","EventEmitter","ListViewViewTypes","ObservableArray","isListLikeIterable","Trace","CLog","CLogTypes","LayoutBase","ElementRef","IterableDiffers","TemplateRef","ViewContainerRef","i0","Component","ChangeDetectionStrategy","Inject","ViewChild","Output","ContentChild","Input","Directive","Host","NgModule","NO_ERRORS_SCHEMA"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BAA,2BAAe,CAAC,gBAAgB,EAAE,cAAM,OAAAC,+BAAc,GAAA,CAAC,CAAC;IAExD,IAAM,OAAO,GAAG,YAAY,CAAC;IAE7B;QACI,qBACW,SAAe,EACf,IAAU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B,EAAE,oBAAoB,aAClD,uBAAuB,EAAE,oBAAoB;;;;;;;;;;;;"}
@@ -44,8 +44,8 @@ export declare class CollectionViewComponent implements DoCheck, OnDestroy, Afte
44
44
  private setItemTemplates;
45
45
  private detectChangesOnChild;
46
46
  private refresh;
47
- static ɵfac: i0.ɵɵFactoryDef<CollectionViewComponent, never>;
48
- static ɵcmp: i0.ɵɵComponentDefWithMeta<CollectionViewComponent, "CollectionView", never, { "itemTemplate": "itemTemplate"; "items": "items"; }, { "setupItemView": "setupItemView"; }, ["itemTemplateQuery"], never>;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<CollectionViewComponent, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<CollectionViewComponent, "CollectionView", never, { "itemTemplate": "itemTemplate"; "items": "items"; }, { "setupItemView": "setupItemView"; }, ["itemTemplateQuery"], never>;
49
49
  }
50
50
  export interface ComponentView {
51
51
  rootNodes: any[];
@@ -58,6 +58,6 @@ export declare class TemplateKeyDirective {
58
58
  private collectionView;
59
59
  constructor(templateRef: TemplateRef<any>, collectionView: CollectionViewComponent);
60
60
  set cvTemplateKey(value: any);
61
- static ɵfac: i0.ɵɵFactoryDef<TemplateKeyDirective, [null, { host: true; }]>;
62
- static ɵdir: i0.ɵɵDirectiveDefWithMeta<TemplateKeyDirective, "[cvTemplateKey]", never, { "cvTemplateKey": "cvTemplateKey"; }, {}, never>;
61
+ static ɵfac: i0.ɵɵFactoryDeclaration<TemplateKeyDirective, [null, { host: true; }]>;
62
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TemplateKeyDirective, "[cvTemplateKey]", never, { "cvTemplateKey": "cvTemplateKey"; }, {}, never>;
63
63
  }
@@ -192,12 +192,12 @@ export class CollectionViewComponent {
192
192
  }
193
193
  CollectionViewComponent.ɵfac = function CollectionViewComponent_Factory(t) { return new (t || CollectionViewComponent)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(IterableDiffers)); };
194
194
  CollectionViewComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CollectionViewComponent, selectors: [["CollectionView"]], contentQueries: function CollectionViewComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
195
- i0.ɵɵcontentQuery(dirIndex, TemplateRef, 3, TemplateRef);
195
+ i0.ɵɵcontentQuery(dirIndex, TemplateRef, 7, TemplateRef);
196
196
  } if (rf & 2) {
197
197
  let _t;
198
198
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.itemTemplateQuery = _t.first);
199
199
  } }, viewQuery: function CollectionViewComponent_Query(rf, ctx) { if (rf & 1) {
200
- i0.ɵɵviewQuery(_c0, 3, ViewContainerRef);
200
+ i0.ɵɵviewQuery(_c0, 7, ViewContainerRef);
201
201
  } if (rf & 2) {
202
202
  let _t;
203
203
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.loader = _t.first);
@@ -7,7 +7,6 @@ export class CollectionViewModule {
7
7
  CollectionViewModule.ɵfac = function CollectionViewModule_Factory(t) { return new (t || CollectionViewModule)(); };
8
8
  CollectionViewModule.ɵmod = i0.ɵɵdefineNgModule({ type: CollectionViewModule });
9
9
  CollectionViewModule.ɵinj = i0.ɵɵdefineInjector({});
10
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CollectionViewModule, { declarations: [CollectionViewComponent, TemplateKeyDirective], exports: [CollectionViewComponent, TemplateKeyDirective] }); })();
11
10
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionViewModule, [{
12
11
  type: NgModule,
13
12
  args: [{
@@ -16,4 +15,5 @@ CollectionViewModule.ɵinj = i0.ɵɵdefineInjector({});
16
15
  schemas: [NO_ERRORS_SCHEMA],
17
16
  }]
18
17
  }], null, null); })();
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6W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XG5ATmdNb2R1bGUoe1xuICAgIGRlY2xhcmF0aW9uczogW0NvbGxlY3Rpb25WaWV3Q29tcG9uZW50LCBUZW1wbGF0ZUtleURpcmVjdGl2ZV0sXG4gICAgZXhwb3J0czogW0NvbGxlY3Rpb25WaWV3Q29tcG9uZW50LCBUZW1wbGF0ZUtleURpcmVjdGl2ZV0sXG4gICAgc2NoZW1hczogW05PX0VSUk9SU19TQ0hFTUFdLFxufSlcbmV4cG9ydCBjbGFzcyBDb2xsZWN0aW9uVmlld01vZHVsZSB7fVxuIl19
18
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CollectionViewModule, { declarations: [CollectionViewComponent, TemplateKeyDirective], exports: [CollectionViewComponent, TemplateKeyDirective] }); })();
19
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29sbGVjdGlvbnZpZXcvYW5ndWxhci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTNELE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxvQkFBb0IsRUFBRSxNQUFNLHVCQUF1QixDQUFDOztBQUN0RixPQUFPLEVBQUUsdUJBQXVCLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQU90RixNQUFNLE9BQU8sb0JBQW9COzt3RkFBcEIsb0JBQW9CO3dEQUFwQixvQkFBb0I7O3VGQUFwQixvQkFBb0I7Y0FMaEMsUUFBUTtlQUFDO2dCQUNOLFlBQVksRUFBRSxDQUFDLHVCQUF1QixFQUFFLG9CQUFvQixDQUFDO2dCQUM3RCxPQUFPLEVBQUUsQ0FBQyx1QkFBdUIsRUFBRSxvQkFBb0IsQ0FBQztnQkFDeEQsT0FBTyxFQUFFLENBQUMsZ0JBQWdCLENBQUM7YUFDOUI7O3dGQUNZLG9CQUFvQixtQkFKZCx1QkFBdUIsRUFBRSxvQkFBb0IsYUFDbEQsdUJBQXVCLEVBQUUsb0JBQW9CIiwic291cmNlc0NvbnRlbnQiOlsiLy8gRXh0ZXJuYWxcbmltcG9ydCB7IE5PX0VSUk9SU19TQ0hFTUEsIE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmltcG9ydCB7IENvbGxlY3Rpb25WaWV3Q29tcG9uZW50LCBUZW1wbGF0ZUtleURpcmVjdGl2ZSB9IGZyb20gJy4vY29sbGVjdGlvbnZpZXctY29tcCc7XG5leHBvcnQgeyBDb2xsZWN0aW9uVmlld0NvbXBvbmVudCwgVGVtcGxhdGVLZXlEaXJlY3RpdmUgfSBmcm9tICcuL2NvbGxlY3Rpb252aWV3LWNvbXAnO1xuXG5ATmdNb2R1bGUoe1xuICAgIGRlY2xhcmF0aW9uczogW0NvbGxlY3Rpb25WaWV3Q29tcG9uZW50LCBUZW1wbGF0ZUtleURpcmVjdGl2ZV0sXG4gICAgZXhwb3J0czogW0NvbGxlY3Rpb25WaWV3Q29tcG9uZW50LCBUZW1wbGF0ZUtleURpcmVjdGl2ZV0sXG4gICAgc2NoZW1hczogW05PX0VSUk9SU19TQ0hFTUFdLFxufSlcbmV4cG9ydCBjbGFzcyBDb2xsZWN0aW9uVmlld01vZHVsZSB7fVxuIl19
@@ -1,4 +1,5 @@
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';
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';
2
3
  import { ObservableArray, Trace, LayoutBase } from '@nativescript/core';
3
4
  import { CollectionView, ListViewViewTypes, CLog, CLogTypes } from '@nativescript-community/ui-collectionview';
4
5
  import { registerElement, getSingleViewRecursive } from '@nativescript/angular';
@@ -190,23 +191,23 @@ class CollectionViewComponent {
190
191
  }
191
192
  }
192
193
  }
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);
194
+ CollectionViewComponent.ɵfac = function CollectionViewComponent_Factory(t) { return new (t || CollectionViewComponent)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(IterableDiffers)); };
195
+ CollectionViewComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CollectionViewComponent, selectors: [["CollectionView"]], contentQueries: function CollectionViewComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
196
+ i0.ɵɵcontentQuery(dirIndex, TemplateRef, 7, TemplateRef);
196
197
  } if (rf & 2) {
197
198
  let _t;
198
- ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.itemTemplateQuery = _t.first);
199
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.itemTemplateQuery = _t.first);
199
200
  } }, viewQuery: function CollectionViewComponent_Query(rf, ctx) { if (rf & 1) {
200
- ɵɵviewQuery(_c0, 3, ViewContainerRef);
201
+ i0.ɵɵviewQuery(_c0, 7, ViewContainerRef);
201
202
  } if (rf & 2) {
202
203
  let _t;
203
- ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.loader = _t.first);
204
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.loader = _t.first);
204
205
  } }, 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();
206
+ i0.ɵɵelementStart(0, "DetachedContainer");
207
+ i0.ɵɵelement(1, "Placeholder", null, 0);
208
+ i0.ɵɵelementEnd();
208
209
  } }, encapsulation: 2, changeDetection: 0 });
209
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(CollectionViewComponent, [{
210
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionViewComponent, [{
210
211
  type: Component,
211
212
  args: [{
212
213
  selector: 'CollectionView',
@@ -217,10 +218,10 @@ CollectionViewComponent.ɵcmp = ɵɵdefineComponent({ type: CollectionViewCompon
217
218
  `,
218
219
  changeDetection: ChangeDetectionStrategy.OnPush,
219
220
  }]
220
- }], function () { return [{ type: ElementRef, decorators: [{
221
+ }], function () { return [{ type: i0.ElementRef, decorators: [{
221
222
  type: Inject,
222
223
  args: [ElementRef]
223
- }] }, { type: IterableDiffers, decorators: [{
224
+ }] }, { type: i0.IterableDiffers, decorators: [{
224
225
  type: Inject,
225
226
  args: [IterableDiffers]
226
227
  }] }]; }, { loader: [{
@@ -254,12 +255,12 @@ class TemplateKeyDirective {
254
255
  }
255
256
  }
256
257
  }
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, [{
258
+ TemplateKeyDirective.ɵfac = function TemplateKeyDirective_Factory(t) { return new (t || TemplateKeyDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(CollectionViewComponent, 1)); };
259
+ TemplateKeyDirective.ɵdir = i0.ɵɵdefineDirective({ type: TemplateKeyDirective, selectors: [["", "cvTemplateKey", ""]], inputs: { cvTemplateKey: "cvTemplateKey" } });
260
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TemplateKeyDirective, [{
260
261
  type: Directive,
261
262
  args: [{ selector: '[cvTemplateKey]' }]
262
- }], function () { return [{ type: TemplateRef }, { type: CollectionViewComponent, decorators: [{
263
+ }], function () { return [{ type: i0.TemplateRef }, { type: CollectionViewComponent, decorators: [{
263
264
  type: Host
264
265
  }] }]; }, { cvTemplateKey: [{
265
266
  type: Input
@@ -268,10 +269,9 @@ TemplateKeyDirective.ɵdir = ɵɵdefineDirective({ type: TemplateKeyDirective, s
268
269
  class CollectionViewModule {
269
270
  }
270
271
  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, [{
272
+ CollectionViewModule.ɵmod = i0.ɵɵdefineNgModule({ type: CollectionViewModule });
273
+ CollectionViewModule.ɵinj = i0.ɵɵdefineInjector({});
274
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionViewModule, [{
275
275
  type: NgModule,
276
276
  args: [{
277
277
  declarations: [CollectionViewComponent, TemplateKeyDirective],
@@ -279,6 +279,7 @@ CollectionViewModule.ɵinj = ɵɵdefineInjector({});
279
279
  schemas: [NO_ERRORS_SCHEMA],
280
280
  }]
281
281
  }], null, null); })();
282
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CollectionViewModule, { declarations: [CollectionViewComponent, TemplateKeyDirective], exports: [CollectionViewComponent, TemplateKeyDirective] }); })();
282
283
 
283
284
  export { CollectionViewComponent, CollectionViewModule, TemplateKeyDirective };
284
285
  //# sourceMappingURL=nativescript-community-ui-collectionview-angular.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nativescript-community-ui-collectionview-angular.js","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 { KeyedTemplate, LayoutBase, ObservableArray, Trace, View } from '@nativescript/core';\nimport { CLog, CLogTypes, CollectionView, CollectionViewItemEventData, ListViewViewTypes } from '@nativescript-community/ui-collectionview';\n\nimport { getSingleViewRecursive, isKnownView, registerElement } from '@nativescript/angular';\n\nregisterElement('CollectionView', () => CollectionView);\n\nconst NG_VIEW = '_ngViewRef';\n\nexport class ItemContext {\n constructor(\n public $implicit?: any,\n public item?: any,\n public index?: number,\n public even?: boolean,\n public odd?: boolean\n ) {}\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 =\n typeof items.getItem === 'function'\n ? items.getItem(index)\n : 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 (\n !viewRef &&\n args.view instanceof LayoutBase &&\n args.view.getChildrenCount() > 0\n ) {\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(\n this.itemTemplate,\n new ItemContext(),\n 0\n );\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(\n template: TemplateRef<ItemContext>\n ): () => View {\n return () => {\n const viewRef = this.loader.createEmbeddedView(\n template,\n new ItemContext(),\n 0\n );\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 = getSingleViewRecursive): 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","i0.ɵɵelementStart","i0.ɵɵelement","i0.ɵɵelementEnd"],"mappings":";;;;;;AA2BA,eAAe,CAAC,gBAAgB,EAAE,MAAM,cAAc,CAAC,CAAC;AAExD,MAAM,OAAO,GAAG,YAAY,CAAC;MAEhB,WAAW;IACpB,YACW,SAAe,EACf,IAAU,EACV,KAAc,EACd,IAAc,EACd,GAAa;QAJb,cAAS,GAAT,SAAS,CAAM;QACf,SAAI,GAAJ,IAAI,CAAM;QACV,UAAK,GAAL,KAAK,CAAS;QACd,SAAI,GAAJ,IAAI,CAAU;QACd,QAAG,GAAH,GAAG,CAAU;KACpB;CACP;MAkBY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I,CAAC,cAAc,IAAI,IAAI,CAAC,WAAW,EAAE;YACzC,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;SAC/E;KACJ;;wFAXQ,oBAAoB,oDACsD,uBAAuB;sDADjG,oBAAoB;oFAApB,oBAAoB;cADhC,SAAS;eAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE;6DAE6C,uBAAuB;sBAAtD,IAAI;wBAGpD,aAAa;kBADhB,KAAK;;;MCrSG,oBAAoB;;wFAApB,oBAAoB;qDAApB,oBAAoB;;qFAApB,oBAAoB,mBAJd,uBAAuB,EAAE,oBAAoB,aAClD,uBAAuB,EAAE,oBAAoB;oFAG9C,oBAAoB;cALhC,QAAQ;eAAC;gBACN,YAAY,EAAE,CAAC,uBAAuB,EAAE,oBAAoB,CAAC;gBAC7D,OAAO,EAAE,CAAC,uBAAuB,EAAE,oBAAoB,CAAC;gBACxD,OAAO,EAAE,CAAC,gBAAgB,CAAC;aAC9B;;;;;"}
1
+ {"version":3,"file":"nativescript-community-ui-collectionview-angular.js","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 { KeyedTemplate, LayoutBase, ObservableArray, Trace, View } from '@nativescript/core';\nimport { CLog, CLogTypes, CollectionView, CollectionViewItemEventData, ListViewViewTypes } from '@nativescript-community/ui-collectionview';\n\nimport { getSingleViewRecursive, isKnownView, registerElement } from '@nativescript/angular';\n\nregisterElement('CollectionView', () => CollectionView);\n\nconst NG_VIEW = '_ngViewRef';\n\nexport class ItemContext {\n constructor(\n public $implicit?: any,\n public item?: any,\n public index?: number,\n public even?: boolean,\n public odd?: boolean\n ) {}\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 =\n typeof items.getItem === 'function'\n ? items.getItem(index)\n : 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 (\n !viewRef &&\n args.view instanceof LayoutBase &&\n args.view.getChildrenCount() > 0\n ) {\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(\n this.itemTemplate,\n new ItemContext(),\n 0\n );\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(\n template: TemplateRef<ItemContext>\n ): () => View {\n return () => {\n const viewRef = this.loader.createEmbeddedView(\n template,\n new ItemContext(),\n 0\n );\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 = getSingleViewRecursive): 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":";;;;;;;AA2BA,eAAe,CAAC,gBAAgB,EAAE,MAAM,cAAc,CAAC,CAAC;AAExD,MAAM,OAAO,GAAG,YAAY,CAAC;MAEhB,WAAW;IACpB,YACW,SAAe,EACf,IAAU,EACV,KAAc,EACd,IAAc,EACd,GAAa;QAJb,cAAS,GAAT,SAAS,CAAM;QACf,SAAI,GAAJ,IAAI,CAAM;QACV,UAAK,GAAL,KAAK,CAAS;QACd,SAAI,GAAJ,IAAI,CAAU;QACd,QAAG,GAAH,GAAG,CAAU;KACpB;CACP;MAkBY,uBAAuB;IA2ChC,YAAgC,WAAuB,EAAmC,gBAAiC;QAAjC,qBAAgB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Ac,CAAC,gBAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;SAC/E;KACJ;;wFAXQ,oBAAoB,6DACsD,uBAAuB;yDADjG,oBAAoB;uFAApB,oBAAoB;cADhC,SAAS;eAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE;gEAE6C,uBAAuB;sBAAtD,IAAI;wBAGpD,aAAa;kBADhB,KAAK;;;MCrSG,oBAAoB;;wFAApB,oBAAoB;wDAApB,oBAAoB;;uFAApB,oBAAoB;cALhC,QAAQ;eAAC;gBACN,YAAY,EAAE,CAAC,uBAAuB,EAAE,oBAAoB,CAAC;gBAC7D,OAAO,EAAE,CAAC,uBAAuB,EAAE,oBAAoB,CAAC;gBACxD,OAAO,EAAE,CAAC,gBAAgB,CAAC;aAC9B;;wFACY,oBAAoB,mBAJd,uBAAuB,EAAE,oBAAoB,aAClD,uBAAuB,EAAE,oBAAoB;;;;"}
@@ -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
  }
@@ -8,9 +8,9 @@
8
8
  "typings": "nativescript-community-ui-collectionview-angular.d.ts",
9
9
  "sideEffects": false,
10
10
  "dependencies": {
11
- "tslib": "^2.0.0"
11
+ "tslib": "^2.2.0"
12
12
  },
13
13
  "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"
14
+ "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
15
  }
16
16
  }
@@ -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,
@@ -556,4 +556,4 @@ export const scrollBarIndicatorVisibleProperty = new Property({
556
556
  valueConverter: booleanConverter
557
557
  });
558
558
  scrollBarIndicatorVisibleProperty.register(CollectionViewBase);
559
- //# sourceMappingURL=collectionview-common.js.map
559
+ //# 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,EAKP,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;AAG5B,MAAM,CAAC,MAAM,2BAA2B,GAAG,4BAA4B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IACtB,YAAY,EAAE,KAAK;IACnB,cAAc,EAAE,gBAAgB;CACnC,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,6 +1,6 @@
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
5
  interface View {
6
6
  handleGestureTouch(event: android.view.MotionEvent): any;