ngx-repeat 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  > Angular directive for repeating HTML element by count
16
16
 
17
- > ✓ _Angular 13, Ivy and SSR compatible_
17
+ > ✓ _Angular 15, Ivy and SSR compatible_
18
18
 
19
19
  Here's the [demo](http://celtian.github.io/ngx-repeat/) or [stackblitz live preview](https://stackblitz.com/edit/ngx-repeat) or [codesandbox live preview](https://codesandbox.io/s/ngx-repeat-bew8f)
20
20
 
@@ -40,9 +40,9 @@ export class NgxRepeatDirective {
40
40
  }
41
41
  }
42
42
  }
43
- NgxRepeatDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
44
- NgxRepeatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: NgxRepeatDirective, selector: "[ngxRepeat]", inputs: { ngxRepeat: "ngxRepeat" }, ngImport: i0 });
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatDirective, decorators: [{
43
+ NgxRepeatDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
44
+ NgxRepeatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: NgxRepeatDirective, selector: "[ngxRepeat]", inputs: { ngxRepeat: "ngxRepeat" }, ngImport: i0 });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatDirective, decorators: [{
46
46
  type: Directive,
47
47
  args: [{
48
48
  selector: '[ngxRepeat]'
@@ -3,10 +3,10 @@ import { NgxRepeatDirective } from './ngx-repeat.directive';
3
3
  import * as i0 from "@angular/core";
4
4
  export class NgxRepeatModule {
5
5
  }
6
- NgxRepeatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
7
- NgxRepeatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatModule, declarations: [NgxRepeatDirective], exports: [NgxRepeatDirective] });
8
- NgxRepeatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatModule });
9
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatModule, decorators: [{
6
+ NgxRepeatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
7
+ NgxRepeatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatModule, declarations: [NgxRepeatDirective], exports: [NgxRepeatDirective] });
8
+ NgxRepeatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatModule });
9
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatModule, decorators: [{
10
10
  type: NgModule,
11
11
  args: [{
12
12
  declarations: [NgxRepeatDirective],
@@ -41,9 +41,9 @@ class NgxRepeatDirective {
41
41
  }
42
42
  }
43
43
  }
44
- NgxRepeatDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
45
- NgxRepeatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: NgxRepeatDirective, selector: "[ngxRepeat]", inputs: { ngxRepeat: "ngxRepeat" }, ngImport: i0 });
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatDirective, decorators: [{
44
+ NgxRepeatDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
45
+ NgxRepeatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: NgxRepeatDirective, selector: "[ngxRepeat]", inputs: { ngxRepeat: "ngxRepeat" }, ngImport: i0 });
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatDirective, decorators: [{
47
47
  type: Directive,
48
48
  args: [{
49
49
  selector: '[ngxRepeat]'
@@ -54,10 +54,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
54
54
 
55
55
  class NgxRepeatModule {
56
56
  }
57
- NgxRepeatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
58
- NgxRepeatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatModule, declarations: [NgxRepeatDirective], exports: [NgxRepeatDirective] });
59
- NgxRepeatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatModule });
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatModule, decorators: [{
57
+ NgxRepeatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
58
+ NgxRepeatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatModule, declarations: [NgxRepeatDirective], exports: [NgxRepeatDirective] });
59
+ NgxRepeatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatModule });
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatModule, decorators: [{
61
61
  type: NgModule,
62
62
  args: [{
63
63
  declarations: [NgxRepeatDirective],
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-repeat.mjs","sources":["../../../projects/ngx-repeat/src/lib/ngx-repeat.directive.ts","../../../projects/ngx-repeat/src/lib/ngx-repeat.module.ts","../../../projects/ngx-repeat/src/public-api.ts","../../../projects/ngx-repeat/src/ngx-repeat.ts"],"sourcesContent":["import { Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef } from '@angular/core';\n\n/**\n * @publicApi\n */\nexport class RepeatDirectiveContext {\n constructor(public $implicit: number, public count: number) {}\n\n public get index(): number {\n return this.$implicit;\n }\n\n public get first(): boolean {\n return this.$implicit === 0;\n }\n\n public get last(): boolean {\n return this.index === this.count - 1;\n }\n\n public get even(): boolean {\n return this.$implicit % 2 === 0;\n }\n\n public get odd(): boolean {\n return this.$implicit % 2 === 1;\n }\n}\n\n@Directive({\n selector: '[ngxRepeat]'\n})\nexport class NgxRepeatDirective {\n @Input() public set ngxRepeat(count: number) {\n for (let i = this.viewContainer.length; i > count; i--) this.viewContainer.remove(i - 1);\n\n for (let i = this.viewContainer.length; i < count; i++)\n this.viewContainer.createEmbeddedView(this.templateRef, new RepeatDirectiveContext(i, count));\n\n for (let i = 0; i < this.viewContainer.length; i++) {\n const viewRef = <EmbeddedViewRef<RepeatDirectiveContext>>this.viewContainer.get(i);\n viewRef.context.count = count;\n }\n }\n\n constructor(private templateRef: TemplateRef<RepeatDirectiveContext>, private viewContainer: ViewContainerRef) {}\n}\n","import { NgModule } from '@angular/core';\nimport { NgxRepeatDirective } from './ngx-repeat.directive';\n\n@NgModule({\n declarations: [NgxRepeatDirective],\n exports: [NgxRepeatDirective]\n})\nexport class NgxRepeatModule {}\n","/*\n * Public API Surface of ngx-repeat\n */\n\nexport * from './lib/ngx-repeat.directive';\nexport * from './lib/ngx-repeat.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAEA;;;MAGa,sBAAsB;IACjC,YAAmB,SAAiB,EAAS,KAAa;QAAvC,cAAS,GAAT,SAAS,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAQ;KAAI;IAE9D,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,SAAS,KAAK,CAAC,CAAC;KAC7B;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;KACtC;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,SAAS,GAAG,CAAC,KAAK,CAAC,CAAC;KACjC;IAED,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,SAAS,GAAG,CAAC,KAAK,CAAC,CAAC;KACjC;CACF;MAKY,kBAAkB;IAa7B,YAAoB,WAAgD,EAAU,aAA+B;QAAzF,gBAAW,GAAX,WAAW,CAAqC;QAAU,kBAAa,GAAb,aAAa,CAAkB;KAAI;IAZjH,IAAoB,SAAS,CAAC,KAAa;QACzC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE;YAAE,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAEzF,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE;YACpD,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,sBAAsB,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;QAEhG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAClD,MAAM,OAAO,GAA4C,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACnF,OAAO,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;SAC/B;KACF;;+GAXU,kBAAkB;mGAAlB,kBAAkB;2FAAlB,kBAAkB;kBAH9B,SAAS;mBAAC;oBACT,QAAQ,EAAE,aAAa;iBACxB;iIAEqB,SAAS;sBAA5B,KAAK;;;MC1BK,eAAe;;4GAAf,eAAe;6GAAf,eAAe,iBAHX,kBAAkB,aACvB,kBAAkB;6GAEjB,eAAe;2FAAf,eAAe;kBAJ3B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;iBAC9B;;;ACND;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"ngx-repeat.mjs","sources":["../../../projects/ngx-repeat/src/lib/ngx-repeat.directive.ts","../../../projects/ngx-repeat/src/lib/ngx-repeat.module.ts","../../../projects/ngx-repeat/src/public-api.ts","../../../projects/ngx-repeat/src/ngx-repeat.ts"],"sourcesContent":["import { Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef } from '@angular/core';\n\n/**\n * @publicApi\n */\nexport class RepeatDirectiveContext {\n constructor(public $implicit: number, public count: number) {}\n\n public get index(): number {\n return this.$implicit;\n }\n\n public get first(): boolean {\n return this.$implicit === 0;\n }\n\n public get last(): boolean {\n return this.index === this.count - 1;\n }\n\n public get even(): boolean {\n return this.$implicit % 2 === 0;\n }\n\n public get odd(): boolean {\n return this.$implicit % 2 === 1;\n }\n}\n\n@Directive({\n selector: '[ngxRepeat]'\n})\nexport class NgxRepeatDirective {\n @Input() public set ngxRepeat(count: number) {\n for (let i = this.viewContainer.length; i > count; i--) this.viewContainer.remove(i - 1);\n\n for (let i = this.viewContainer.length; i < count; i++)\n this.viewContainer.createEmbeddedView(this.templateRef, new RepeatDirectiveContext(i, count));\n\n for (let i = 0; i < this.viewContainer.length; i++) {\n const viewRef = <EmbeddedViewRef<RepeatDirectiveContext>>this.viewContainer.get(i);\n viewRef.context.count = count;\n }\n }\n\n constructor(private templateRef: TemplateRef<RepeatDirectiveContext>, private viewContainer: ViewContainerRef) {}\n}\n","import { NgModule } from '@angular/core';\nimport { NgxRepeatDirective } from './ngx-repeat.directive';\n\n@NgModule({\n declarations: [NgxRepeatDirective],\n exports: [NgxRepeatDirective]\n})\nexport class NgxRepeatModule {}\n","/*\n * Public API Surface of ngx-repeat\n */\n\nexport * from './lib/ngx-repeat.directive';\nexport * from './lib/ngx-repeat.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAEA;;AAEG;MACU,sBAAsB,CAAA;IACjC,WAAmB,CAAA,SAAiB,EAAS,KAAa,EAAA;AAAvC,QAAA,IAAS,CAAA,SAAA,GAAT,SAAS,CAAQ;AAAS,QAAA,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;KAAI;AAE9D,IAAA,IAAW,KAAK,GAAA;QACd,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;AAED,IAAA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Ref }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
45
- NgxRepeatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: NgxRepeatDirective, selector: "[ngxRepeat]", inputs: { ngxRepeat: "ngxRepeat" }, ngImport: i0 });
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatDirective, decorators: [{
44
+ NgxRepeatDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
45
+ NgxRepeatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: NgxRepeatDirective, selector: "[ngxRepeat]", inputs: { ngxRepeat: "ngxRepeat" }, ngImport: i0 });
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatDirective, decorators: [{
47
47
  type: Directive,
48
48
  args: [{
49
49
  selector: '[ngxRepeat]'
@@ -54,10 +54,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
54
54
 
55
55
  class NgxRepeatModule {
56
56
  }
57
- NgxRepeatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
58
- NgxRepeatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatModule, declarations: [NgxRepeatDirective], exports: [NgxRepeatDirective] });
59
- NgxRepeatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatModule });
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxRepeatModule, decorators: [{
57
+ NgxRepeatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
58
+ NgxRepeatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatModule, declarations: [NgxRepeatDirective], exports: [NgxRepeatDirective] });
59
+ NgxRepeatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatModule });
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: NgxRepeatModule, decorators: [{
61
61
  type: NgModule,
62
62
  args: [{
63
63
  declarations: [NgxRepeatDirective],
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-repeat.mjs","sources":["../../../projects/ngx-repeat/src/lib/ngx-repeat.directive.ts","../../../projects/ngx-repeat/src/lib/ngx-repeat.module.ts","../../../projects/ngx-repeat/src/public-api.ts","../../../projects/ngx-repeat/src/ngx-repeat.ts"],"sourcesContent":["import { Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef } from '@angular/core';\n\n/**\n * @publicApi\n */\nexport class RepeatDirectiveContext {\n constructor(public $implicit: number, public count: number) {}\n\n public get index(): number {\n return this.$implicit;\n }\n\n public get first(): boolean {\n return this.$implicit === 0;\n }\n\n public get last(): boolean {\n return this.index === this.count - 1;\n }\n\n public get even(): boolean {\n return this.$implicit % 2 === 0;\n }\n\n public get odd(): boolean {\n return this.$implicit % 2 === 1;\n }\n}\n\n@Directive({\n selector: '[ngxRepeat]'\n})\nexport class NgxRepeatDirective {\n @Input() public set ngxRepeat(count: number) {\n for (let i = this.viewContainer.length; i > count; i--) this.viewContainer.remove(i - 1);\n\n for (let i = this.viewContainer.length; i < count; i++)\n this.viewContainer.createEmbeddedView(this.templateRef, new RepeatDirectiveContext(i, count));\n\n for (let i = 0; i < this.viewContainer.length; i++) {\n const viewRef = <EmbeddedViewRef<RepeatDirectiveContext>>this.viewContainer.get(i);\n viewRef.context.count = count;\n }\n }\n\n constructor(private templateRef: TemplateRef<RepeatDirectiveContext>, private viewContainer: ViewContainerRef) {}\n}\n","import { NgModule } from '@angular/core';\nimport { NgxRepeatDirective } from './ngx-repeat.directive';\n\n@NgModule({\n declarations: [NgxRepeatDirective],\n exports: [NgxRepeatDirective]\n})\nexport class NgxRepeatModule {}\n","/*\n * Public API Surface of ngx-repeat\n */\n\nexport * from './lib/ngx-repeat.directive';\nexport * from './lib/ngx-repeat.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAEA;;;MAGa,sBAAsB;IACjC,YAAmB,SAAiB,EAAS,KAAa;QAAvC,cAAS,GAAT,SAAS,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAQ;KAAI;IAE9D,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,SAAS,KAAK,CAAC,CAAC;KAC7B;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;KACtC;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,SAAS,GAAG,CAAC,KAAK,CAAC,CAAC;KACjC;IAED,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,SAAS,GAAG,CAAC,KAAK,CAAC,CAAC;KACjC;CACF;MAKY,kBAAkB;IAa7B,YAAoB,WAAgD,EAAU,aAA+B;QAAzF,gBAAW,GAAX,WAAW,CAAqC;QAAU,kBAAa,GAAb,aAAa,CAAkB;KAAI;IAZjH,IAAoB,SAAS,CAAC,KAAa;QACzC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE;YAAE,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAEzF,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE;YACpD,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,sBAAsB,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;QAEhG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAClD,MAAM,OAAO,GAA4C,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACnF,OAAO,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;SAC/B;KACF;;+GAXU,kBAAkB;mGAAlB,kBAAkB;2FAAlB,kBAAkB;kBAH9B,SAAS;mBAAC;oBACT,QAAQ,EAAE,aAAa;iBACxB;iIAEqB,SAAS;sBAA5B,KAAK;;;MC1BK,eAAe;;4GAAf,eAAe;6GAAf,eAAe,iBAHX,kBAAkB,aACvB,kBAAkB;6GAEjB,eAAe;2FAAf,eAAe;kBAJ3B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;iBAC9B;;;ACND;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"ngx-repeat.mjs","sources":["../../../projects/ngx-repeat/src/lib/ngx-repeat.directive.ts","../../../projects/ngx-repeat/src/lib/ngx-repeat.module.ts","../../../projects/ngx-repeat/src/public-api.ts","../../../projects/ngx-repeat/src/ngx-repeat.ts"],"sourcesContent":["import { Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef } from '@angular/core';\n\n/**\n * @publicApi\n */\nexport class RepeatDirectiveContext {\n constructor(public $implicit: number, public count: number) {}\n\n public get index(): number {\n return this.$implicit;\n }\n\n public get first(): boolean {\n return this.$implicit === 0;\n }\n\n public get last(): boolean {\n return this.index === this.count - 1;\n }\n\n public get even(): boolean {\n return this.$implicit % 2 === 0;\n }\n\n public get odd(): boolean {\n return this.$implicit % 2 === 1;\n }\n}\n\n@Directive({\n selector: '[ngxRepeat]'\n})\nexport class NgxRepeatDirective {\n @Input() public set ngxRepeat(count: number) {\n for (let i = this.viewContainer.length; i > count; i--) this.viewContainer.remove(i - 1);\n\n for (let i = this.viewContainer.length; i < count; i++)\n this.viewContainer.createEmbeddedView(this.templateRef, new RepeatDirectiveContext(i, count));\n\n for (let i = 0; i < this.viewContainer.length; i++) {\n const viewRef = <EmbeddedViewRef<RepeatDirectiveContext>>this.viewContainer.get(i);\n viewRef.context.count = count;\n }\n }\n\n constructor(private templateRef: TemplateRef<RepeatDirectiveContext>, private viewContainer: ViewContainerRef) {}\n}\n","import { NgModule } from '@angular/core';\nimport { NgxRepeatDirective } from './ngx-repeat.directive';\n\n@NgModule({\n declarations: [NgxRepeatDirective],\n exports: [NgxRepeatDirective]\n})\nexport class NgxRepeatModule {}\n","/*\n * Public API Surface of ngx-repeat\n */\n\nexport * from './lib/ngx-repeat.directive';\nexport * from './lib/ngx-repeat.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAEA;;AAEG;MACU,sBAAsB,CAAA;IACjC,WAAmB,CAAA,SAAiB,EAAS,KAAa,EAAA;QAAvC,IAAS,CAAA,SAAA,GAAT,SAAS,CAAQ;QAAS,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;KAAI;AAE9D,IAAA,IAAW,KAAK,GAAA;QACd,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;AAED,IAAA,IAAW,KAAK,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,SAAS,KAAK,CAAC,CAAC;KAC7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AAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAlB,kBAAkB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACxB,iBAAA,CAAA;iIAEqB,SAAS,EAAA,CAAA;sBAA5B,KAAK;;;MC1BK,eAAe,CAAA;;4GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;6GAAf,eAAe,EAAA,YAAA,EAAA,CAHX,kBAAkB,CAAA,EAAA,OAAA,EAAA,CACvB,kBAAkB,CAAA,EAAA,CAAA,CAAA;6GAEjB,eAAe,EAAA,CAAA,CAAA;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC9B,iBAAA,CAAA;;;ACND;;AAEG;;ACFH;;AAEG;;;;"}
File without changes
@@ -19,5 +19,5 @@ export declare class NgxRepeatDirective {
19
19
  set ngxRepeat(count: number);
20
20
  constructor(templateRef: TemplateRef<RepeatDirectiveContext>, viewContainer: ViewContainerRef);
21
21
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxRepeatDirective, never>;
22
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgxRepeatDirective, "[ngxRepeat]", never, { "ngxRepeat": "ngxRepeat"; }, {}, never>;
22
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxRepeatDirective, "[ngxRepeat]", never, { "ngxRepeat": "ngxRepeat"; }, {}, never, never, false, never>;
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-repeat",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "author": {
5
5
  "name": "Dominik Hladík",
6
6
  "email": "dominik.hladik@seznam.cz",
@@ -10,7 +10,7 @@
10
10
  "license": "MIT",
11
11
  "description": "Angular directive for repeating HTML element by count",
12
12
  "dependencies": {
13
- "tslib": "^2.4.0"
13
+ "tslib": "^2.4.1"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "@angular/common": ">=12",
@@ -41,13 +41,13 @@
41
41
  "esm2020": "esm2020/ngx-repeat.mjs",
42
42
  "fesm2020": "fesm2020/ngx-repeat.mjs",
43
43
  "fesm2015": "fesm2015/ngx-repeat.mjs",
44
- "typings": "ngx-repeat.d.ts",
44
+ "typings": "index.d.ts",
45
45
  "exports": {
46
46
  "./package.json": {
47
47
  "default": "./package.json"
48
48
  },
49
49
  ".": {
50
- "types": "./ngx-repeat.d.ts",
50
+ "types": "./index.d.ts",
51
51
  "esm2020": "./esm2020/ngx-repeat.mjs",
52
52
  "es2020": "./fesm2020/ngx-repeat.mjs",
53
53
  "es2015": "./fesm2015/ngx-repeat.mjs",