ngm-table 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/esm2020/lib/ngm-table.component.mjs +20 -0
- package/esm2020/lib/ngm-table.module.mjs +24 -0
- package/esm2020/lib/ngm-table.service.mjs +14 -0
- package/esm2020/ngm-table.mjs +5 -0
- package/esm2020/public-api.mjs +7 -0
- package/fesm2015/ngm-table.mjs +64 -0
- package/fesm2015/ngm-table.mjs.map +1 -0
- package/fesm2020/ngm-table.mjs +64 -0
- package/fesm2020/ngm-table.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/ngm-table.component.d.ts +11 -0
- package/lib/ngm-table.module.d.ts +8 -0
- package/lib/ngm-table.service.d.ts +6 -0
- package/package.json +31 -0
- package/public-api.d.ts +3 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# NgmTable
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project ngm-table` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ngm-table`.
|
|
8
|
+
> Note: Don't forget to add `--project ngm-table` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
+
|
|
10
|
+
## Build
|
|
11
|
+
|
|
12
|
+
Run `ng build ngm-table` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
+
|
|
14
|
+
## Publishing
|
|
15
|
+
|
|
16
|
+
After building your library with `ng build ngm-table`, go to the dist folder `cd dist/ngm-table` and run `npm publish`.
|
|
17
|
+
|
|
18
|
+
## Running unit tests
|
|
19
|
+
|
|
20
|
+
Run `ng test ngm-table` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
+
|
|
22
|
+
## Further help
|
|
23
|
+
|
|
24
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common";
|
|
4
|
+
export class NgmTableComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.items = [];
|
|
7
|
+
this.cols = [];
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
NgmTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
+
NgmTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NgmTableComponent, selector: "ngm-table", inputs: { items: "items", cols: "cols" }, ngImport: i0, template: "<table>\n <tr>\n <th *ngFor=\"let col of cols\">{{col.title}}</th>\n </tr>\n <tr *ngFor=\"let item of items\">\n <td *ngFor=\"let col of cols\">{{item[col.key]}}</td>\n </tr>\n</table>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableComponent, decorators: [{
|
|
13
|
+
type: Component,
|
|
14
|
+
args: [{ selector: 'ngm-table', template: "<table>\n <tr>\n <th *ngFor=\"let col of cols\">{{col.title}}</th>\n </tr>\n <tr *ngFor=\"let item of items\">\n <td *ngFor=\"let col of cols\">{{item[col.key]}}</td>\n </tr>\n</table>" }]
|
|
15
|
+
}], propDecorators: { items: [{
|
|
16
|
+
type: Input
|
|
17
|
+
}], cols: [{
|
|
18
|
+
type: Input
|
|
19
|
+
}] } });
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaW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gpXG4gIGNvbHM6IE5nbUNvbHVtbkRlZltdID0gW107XG5cbn1cbiIsIjx0YWJsZT5cbiAgPHRyPlxuICAgIDx0aCAqbmdGb3I9XCJsZXQgY29sIG9mIGNvbHNcIj57e2NvbC50aXRsZX19PC90aD5cbiAgPC90cj5cbiAgPHRyICpuZ0Zvcj1cImxldCBpdGVtIG9mIGl0ZW1zXCI+XG4gICAgPHRkICpuZ0Zvcj1cImxldCBjb2wgb2YgY29sc1wiPnt7aXRlbVtjb2wua2V5XX19PC90ZD5cbiAgPC90cj5cbjwvdGFibGU+Il19
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { NgmTableComponent } from './ngm-table.component';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class NgmTableModule {
|
|
6
|
+
}
|
|
7
|
+
NgmTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8
|
+
NgmTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: NgmTableModule, declarations: [NgmTableComponent], imports: [CommonModule], exports: [NgmTableComponent] });
|
|
9
|
+
NgmTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableModule, imports: [CommonModule] });
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableModule, decorators: [{
|
|
11
|
+
type: NgModule,
|
|
12
|
+
args: [{
|
|
13
|
+
declarations: [
|
|
14
|
+
NgmTableComponent
|
|
15
|
+
],
|
|
16
|
+
imports: [
|
|
17
|
+
CommonModule
|
|
18
|
+
],
|
|
19
|
+
exports: [
|
|
20
|
+
NgmTableComponent
|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sZUNvbXBvbmVudFxuICBdLFxuICBpbXBvcnRzOiBbXG4gICAgQ29tbW9uTW9kdWxlXG4gIF0sXG4gIGV4cG9ydHM6IFtcbiAgICBOZ21UYWJsZUNvbXBvbmVudFxuICBdXG59KVxuZXhwb3J0IGNsYXNzIE5nbVRhYmxlTW9kdWxlIHsgfVxuIl19
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class NgmTableService {
|
|
4
|
+
constructor() { }
|
|
5
|
+
}
|
|
6
|
+
NgmTableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7
|
+
NgmTableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableService, providedIn: 'root' });
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableService, decorators: [{
|
|
9
|
+
type: Injectable,
|
|
10
|
+
args: [{
|
|
11
|
+
providedIn: 'root'
|
|
12
|
+
}]
|
|
13
|
+
}], ctorParameters: function () { return []; } });
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmdtLXRhYmxlLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ20tdGFibGUvc3JjL2xpYi9uZ20tdGFibGUuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUszQyxNQUFNLE9BQU8sZUFBZTtJQUUxQixnQkFBZ0IsQ0FBQzs7NkdBRk4sZUFBZTtpSEFBZixlQUFlLGNBRmQsTUFBTTs0RkFFUCxlQUFlO2tCQUgzQixVQUFVO21CQUFDO29CQUNWLFVBQVUsRUFBRSxNQUFNO2lCQUNuQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuQEluamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCdcbn0pXG5leHBvcnQgY2xhc3MgTmdtVGFibGVTZXJ2aWNlIHtcblxuICBjb25zdHJ1Y3RvcigpIHsgfVxufVxuIl19
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmdtLXRhYmxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcHJvamVjdHMvbmdtLXRhYmxlL3NyYy9uZ20tdGFibGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of ngm-table
|
|
3
|
+
*/
|
|
4
|
+
export * from './lib/ngm-table.service';
|
|
5
|
+
export * from './lib/ngm-table.component';
|
|
6
|
+
export * from './lib/ngm-table.module';
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25nbS10YWJsZS9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMseUJBQXlCLENBQUM7QUFDeEMsY0FBYywyQkFBMkIsQ0FBQztBQUMxQyxjQUFjLHdCQUF3QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBuZ20tdGFibGVcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ20tdGFibGUuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ20tdGFibGUuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL25nbS10YWJsZS5tb2R1bGUnO1xuIl19
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Component, Input, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
|
|
6
|
+
class NgmTableService {
|
|
7
|
+
constructor() { }
|
|
8
|
+
}
|
|
9
|
+
NgmTableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10
|
+
NgmTableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableService, providedIn: 'root' });
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableService, decorators: [{
|
|
12
|
+
type: Injectable,
|
|
13
|
+
args: [{
|
|
14
|
+
providedIn: 'root'
|
|
15
|
+
}]
|
|
16
|
+
}], ctorParameters: function () { return []; } });
|
|
17
|
+
|
|
18
|
+
class NgmTableComponent {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.items = [];
|
|
21
|
+
this.cols = [];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
NgmTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
NgmTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NgmTableComponent, selector: "ngm-table", inputs: { items: "items", cols: "cols" }, ngImport: i0, template: "<table>\n <tr>\n <th *ngFor=\"let col of cols\">{{col.title}}</th>\n </tr>\n <tr *ngFor=\"let item of items\">\n <td *ngFor=\"let col of cols\">{{item[col.key]}}</td>\n </tr>\n</table>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableComponent, decorators: [{
|
|
27
|
+
type: Component,
|
|
28
|
+
args: [{ selector: 'ngm-table', template: "<table>\n <tr>\n <th *ngFor=\"let col of cols\">{{col.title}}</th>\n </tr>\n <tr *ngFor=\"let item of items\">\n <td *ngFor=\"let col of cols\">{{item[col.key]}}</td>\n </tr>\n</table>" }]
|
|
29
|
+
}], propDecorators: { items: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}], cols: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}] } });
|
|
34
|
+
|
|
35
|
+
class NgmTableModule {
|
|
36
|
+
}
|
|
37
|
+
NgmTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
38
|
+
NgmTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: NgmTableModule, declarations: [NgmTableComponent], imports: [CommonModule], exports: [NgmTableComponent] });
|
|
39
|
+
NgmTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableModule, imports: [CommonModule] });
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableModule, decorators: [{
|
|
41
|
+
type: NgModule,
|
|
42
|
+
args: [{
|
|
43
|
+
declarations: [
|
|
44
|
+
NgmTableComponent
|
|
45
|
+
],
|
|
46
|
+
imports: [
|
|
47
|
+
CommonModule
|
|
48
|
+
],
|
|
49
|
+
exports: [
|
|
50
|
+
NgmTableComponent
|
|
51
|
+
]
|
|
52
|
+
}]
|
|
53
|
+
}] });
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
* Public API Surface of ngm-table
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Generated bundle index. Do not edit.
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
export { NgmTableComponent, NgmTableModule, NgmTableService };
|
|
64
|
+
//# sourceMappingURL=ngm-table.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngm-table.mjs","sources":["../../../projects/ngm-table/src/lib/ngm-table.service.ts","../../../projects/ngm-table/src/lib/ngm-table.component.ts","../../../projects/ngm-table/src/lib/ngm-table.component.html","../../../projects/ngm-table/src/lib/ngm-table.module.ts","../../../projects/ngm-table/src/public-api.ts","../../../projects/ngm-table/src/ngm-table.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgmTableService {\n\n constructor() { }\n}\n","import { Component, Input } from '@angular/core';\n\nexport type NgmColumnDef = {\n title: string;\n key: string;\n}\n\n@Component({\n selector: 'ngm-table',\n templateUrl: './ngm-table.component.html',\n styles: [\n ]\n})\nexport class NgmTableComponent {\n\n @Input()\n items: any[] = [];\n\n @Input()\n cols: NgmColumnDef[] = [];\n\n}\n","<table>\n <tr>\n <th *ngFor=\"let col of cols\">{{col.title}}</th>\n </tr>\n <tr *ngFor=\"let item of items\">\n <td *ngFor=\"let col of cols\">{{item[col.key]}}</td>\n </tr>\n</table>","import { NgModule } from '@angular/core';\nimport { NgmTableComponent } from './ngm-table.component';\nimport { CommonModule } from '@angular/common';\n\n\n\n@NgModule({\n declarations: [\n NgmTableComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [\n NgmTableComponent\n ]\n})\nexport class NgmTableModule { }\n","/*\n * Public API Surface of ngm-table\n */\n\nexport * from './lib/ngm-table.service';\nexport * from './lib/ngm-table.component';\nexport * from './lib/ngm-table.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAKa,eAAe,CAAA;AAE1B,IAAA,WAAA,GAAA,GAAiB;;6GAFN,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cAFd,MAAM,EAAA,CAAA,CAAA;4FAEP,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;MCSY,iBAAiB,CAAA;AAN9B,IAAA,WAAA,GAAA;AASE,QAAA,IAAK,CAAA,KAAA,GAAU,EAAE,CAAC;AAGlB,QAAA,IAAI,CAAA,IAAA,GAAmB,EAAE,CAAC;KAE3B;;+GARY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA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AE;wBACZ,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,iBAAiB;AAClB,qBAAA;iBACF,CAAA;;;AChBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Component, Input, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
|
|
6
|
+
class NgmTableService {
|
|
7
|
+
constructor() { }
|
|
8
|
+
}
|
|
9
|
+
NgmTableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10
|
+
NgmTableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableService, providedIn: 'root' });
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableService, decorators: [{
|
|
12
|
+
type: Injectable,
|
|
13
|
+
args: [{
|
|
14
|
+
providedIn: 'root'
|
|
15
|
+
}]
|
|
16
|
+
}], ctorParameters: function () { return []; } });
|
|
17
|
+
|
|
18
|
+
class NgmTableComponent {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.items = [];
|
|
21
|
+
this.cols = [];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
NgmTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
NgmTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NgmTableComponent, selector: "ngm-table", inputs: { items: "items", cols: "cols" }, ngImport: i0, template: "<table>\n <tr>\n <th *ngFor=\"let col of cols\">{{col.title}}</th>\n </tr>\n <tr *ngFor=\"let item of items\">\n <td *ngFor=\"let col of cols\">{{item[col.key]}}</td>\n </tr>\n</table>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableComponent, decorators: [{
|
|
27
|
+
type: Component,
|
|
28
|
+
args: [{ selector: 'ngm-table', template: "<table>\n <tr>\n <th *ngFor=\"let col of cols\">{{col.title}}</th>\n </tr>\n <tr *ngFor=\"let item of items\">\n <td *ngFor=\"let col of cols\">{{item[col.key]}}</td>\n </tr>\n</table>" }]
|
|
29
|
+
}], propDecorators: { items: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}], cols: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}] } });
|
|
34
|
+
|
|
35
|
+
class NgmTableModule {
|
|
36
|
+
}
|
|
37
|
+
NgmTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
38
|
+
NgmTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: NgmTableModule, declarations: [NgmTableComponent], imports: [CommonModule], exports: [NgmTableComponent] });
|
|
39
|
+
NgmTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableModule, imports: [CommonModule] });
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NgmTableModule, decorators: [{
|
|
41
|
+
type: NgModule,
|
|
42
|
+
args: [{
|
|
43
|
+
declarations: [
|
|
44
|
+
NgmTableComponent
|
|
45
|
+
],
|
|
46
|
+
imports: [
|
|
47
|
+
CommonModule
|
|
48
|
+
],
|
|
49
|
+
exports: [
|
|
50
|
+
NgmTableComponent
|
|
51
|
+
]
|
|
52
|
+
}]
|
|
53
|
+
}] });
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
* Public API Surface of ngm-table
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Generated bundle index. Do not edit.
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
export { NgmTableComponent, NgmTableModule, NgmTableService };
|
|
64
|
+
//# sourceMappingURL=ngm-table.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngm-table.mjs","sources":["../../../projects/ngm-table/src/lib/ngm-table.service.ts","../../../projects/ngm-table/src/lib/ngm-table.component.ts","../../../projects/ngm-table/src/lib/ngm-table.component.html","../../../projects/ngm-table/src/lib/ngm-table.module.ts","../../../projects/ngm-table/src/public-api.ts","../../../projects/ngm-table/src/ngm-table.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgmTableService {\n\n constructor() { }\n}\n","import { Component, Input } from '@angular/core';\n\nexport type NgmColumnDef = {\n title: string;\n key: string;\n}\n\n@Component({\n selector: 'ngm-table',\n templateUrl: './ngm-table.component.html',\n styles: [\n ]\n})\nexport class NgmTableComponent {\n\n @Input()\n items: any[] = [];\n\n @Input()\n cols: NgmColumnDef[] = [];\n\n}\n","<table>\n <tr>\n <th *ngFor=\"let col of cols\">{{col.title}}</th>\n </tr>\n <tr *ngFor=\"let item of items\">\n <td *ngFor=\"let col of cols\">{{item[col.key]}}</td>\n </tr>\n</table>","import { NgModule } from '@angular/core';\nimport { NgmTableComponent } from './ngm-table.component';\nimport { CommonModule } from '@angular/common';\n\n\n\n@NgModule({\n declarations: [\n NgmTableComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [\n NgmTableComponent\n ]\n})\nexport class NgmTableModule { }\n","/*\n * Public API Surface of ngm-table\n */\n\nexport * from './lib/ngm-table.service';\nexport * from './lib/ngm-table.component';\nexport * from './lib/ngm-table.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAKa,eAAe,CAAA;AAE1B,IAAA,WAAA,GAAA,GAAiB;;6GAFN,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cAFd,MAAM,EAAA,CAAA,CAAA;4FAEP,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;MCSY,iBAAiB,CAAA;AAN9B,IAAA,WAAA,GAAA;QASE,IAAK,CAAA,KAAA,GAAU,EAAE,CAAC;QAGlB,IAAI,CAAA,IAAA,GAAmB,EAAE,CAAC;AAE3B,KAAA;;+GARY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,iBAAiB,2FCb9B,oMAOQ,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,cAAA,EAAA,eAAA,C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|
|
6
|
+
export declare class NgmTableComponent {
|
|
7
|
+
items: any[];
|
|
8
|
+
cols: NgmColumnDef[];
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgmTableComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgmTableComponent, "ngm-table", never, { "items": "items"; "cols": "cols"; }, {}, never, never, false, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./ngm-table.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class NgmTableModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgmTableModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgmTableModule, [typeof i1.NgmTableComponent], [typeof i2.CommonModule], [typeof i1.NgmTableComponent]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgmTableModule>;
|
|
8
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ngm-table",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^15.2.0",
|
|
6
|
+
"@angular/core": "^15.2.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"module": "fesm2015/ngm-table.mjs",
|
|
13
|
+
"es2020": "fesm2020/ngm-table.mjs",
|
|
14
|
+
"esm2020": "esm2020/ngm-table.mjs",
|
|
15
|
+
"fesm2020": "fesm2020/ngm-table.mjs",
|
|
16
|
+
"fesm2015": "fesm2015/ngm-table.mjs",
|
|
17
|
+
"typings": "index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
"./package.json": {
|
|
20
|
+
"default": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./index.d.ts",
|
|
24
|
+
"esm2020": "./esm2020/ngm-table.mjs",
|
|
25
|
+
"es2020": "./fesm2020/ngm-table.mjs",
|
|
26
|
+
"es2015": "./fesm2015/ngm-table.mjs",
|
|
27
|
+
"node": "./fesm2015/ngm-table.mjs",
|
|
28
|
+
"default": "./fesm2020/ngm-table.mjs"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
package/public-api.d.ts
ADDED