otimus-library 0.0.2 → 0.0.4
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/esm2022/lib/components/oc-badge/oc-badge.component.mjs +30 -0
- package/esm2022/lib/components/oc-filter/oc-filter.component.mjs +26 -0
- package/esm2022/lib/components/oc-table/oc-table.component.mjs +29 -0
- package/esm2022/public-api.mjs +6 -3
- package/fesm2022/otimus-library.mjs +78 -4
- package/fesm2022/otimus-library.mjs.map +1 -1
- package/lib/components/oc-badge/oc-badge.component.d.ts +11 -0
- package/lib/components/oc-filter/oc-filter.component.d.ts +9 -0
- package/lib/components/oc-table/oc-table.component.d.ts +10 -0
- package/package.json +3 -2
- package/public-api.d.ts +3 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, Input } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
export class OcBadgeComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.size = 'small';
|
|
8
|
+
this.color = 'notification';
|
|
9
|
+
this.waved = false;
|
|
10
|
+
this.classList = [];
|
|
11
|
+
}
|
|
12
|
+
ngOnInit() {
|
|
13
|
+
this.classList.push(this.size, this.color);
|
|
14
|
+
if (this.waved)
|
|
15
|
+
this.classList.push('waved');
|
|
16
|
+
}
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: OcBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.5", type: OcBadgeComponent, isStandalone: true, selector: "oc-badge", inputs: { size: "size", color: "color", waved: "waved" }, ngImport: i0, template: "<div>\n <div class=\"oc-badge\" [ngClass]=\"classList\">\n <ng-content>\n \n </ng-content>\n </div>\n</div>\n", styles: [".oc-badge{border-radius:50%;display:flex;justify-content:center;align-items:center;color:#f8f9ff}.oc-badge>*{color:#f8f9ff;font-weight:600}.notification{background-color:#ed3a3a}.brand-g{background-color:#00dda3}.brand-p{background-color:#5505a2}.success{background-color:#4ab858}.warning{background-color:#ebbc2e}.small{width:22px;height:22px;font-size:1rem}.medium{width:28px;height:28px;font-size:1.25rem}.large{width:34px;height:34px;font-size:1.5rem}.waved{position:relative;z-index:2}.waved:before,.waved:after{z-index:-1;content:\"\";position:absolute;top:0;border-radius:50%;width:100%;height:100%;animation:wave infinite 2s}.waved:after{animation-delay:.6s}.waved.notification:before,.waved.notification:after{background-color:#ed3a3a}.waved.brand-g:before,.waved.brand-g:after{background-color:#00dda3}.waved.brand-p:before,.waved.brand-p:after{background-color:#5505a2}.waved.success:before,.waved.success:after{background-color:#4ab858}.waved.warning:before,.waved.warning:after{background-color:#ebbc2e}@keyframes wave{0%{transform:scale(0)}to{opacity:0;transform:scale(2)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
19
|
+
}
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: OcBadgeComponent, decorators: [{
|
|
21
|
+
type: Component,
|
|
22
|
+
args: [{ selector: 'oc-badge', standalone: true, imports: [CommonModule], template: "<div>\n <div class=\"oc-badge\" [ngClass]=\"classList\">\n <ng-content>\n \n </ng-content>\n </div>\n</div>\n", styles: [".oc-badge{border-radius:50%;display:flex;justify-content:center;align-items:center;color:#f8f9ff}.oc-badge>*{color:#f8f9ff;font-weight:600}.notification{background-color:#ed3a3a}.brand-g{background-color:#00dda3}.brand-p{background-color:#5505a2}.success{background-color:#4ab858}.warning{background-color:#ebbc2e}.small{width:22px;height:22px;font-size:1rem}.medium{width:28px;height:28px;font-size:1.25rem}.large{width:34px;height:34px;font-size:1.5rem}.waved{position:relative;z-index:2}.waved:before,.waved:after{z-index:-1;content:\"\";position:absolute;top:0;border-radius:50%;width:100%;height:100%;animation:wave infinite 2s}.waved:after{animation-delay:.6s}.waved.notification:before,.waved.notification:after{background-color:#ed3a3a}.waved.brand-g:before,.waved.brand-g:after{background-color:#00dda3}.waved.brand-p:before,.waved.brand-p:after{background-color:#5505a2}.waved.success:before,.waved.success:after{background-color:#4ab858}.waved.warning:before,.waved.warning:after{background-color:#ebbc2e}@keyframes wave{0%{transform:scale(0)}to{opacity:0;transform:scale(2)}}\n"] }]
|
|
23
|
+
}], propDecorators: { size: [{
|
|
24
|
+
type: Input
|
|
25
|
+
}], color: [{
|
|
26
|
+
type: Input
|
|
27
|
+
}], waved: [{
|
|
28
|
+
type: Input
|
|
29
|
+
}] } });
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2MtYmFkZ2UuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvb3RpbXVzLWxpYnJhcnkvc3JjL2xpYi9jb21wb25lbnRzL29jLWJhZGdlL29jLWJhZGdlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL290aW11cy1saWJyYXJ5L3NyYy9saWIvY29tcG9uZW50cy9vYy1iYWRnZS9vYy1iYWRnZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQVUsTUFBTSxlQUFlLENBQUM7OztBQVN6RCxNQUFNLE9BQU8sZ0JBQWdCO0lBUDdCO1FBUVcsU0FBSSxHQUFpQyxPQUFPLENBQUE7UUFDNUMsVUFBSyxHQUFtRSxjQUFjLENBQU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pIHNpemU6ICdzbWFsbCcgfCAnbWVkaXVtJyB8ICdsYXJnZScgPSAnc21hbGwnXG4gIEBJbnB1dCgpIGNvbG9yOiAnbm90aWZpY2F0aW9uJyB8ICdicmFuZC1nJyB8ICdicmFuZC1wJyB8ICdzdWNjZXNzJyB8ICd3YXJuaW5nJyA9ICdub3RpZmljYXRpb24nXG4gIEBJbnB1dCgpIHdhdmVkOiBib29sZWFuID0gZmFsc2VcblxuICBjbGFzc0xpc3Q6IHN0cmluZ1tdID0gW11cblxuICBuZ09uSW5pdCgpOiB2b2lkIHtcbiAgICB0aGlzLmNsYXNzTGlzdC5wdXNoKHRoaXMuc2l6ZSwgdGhpcy5jb2xvcilcbiAgICBpZih0aGlzLndhdmVkKSB0aGlzLmNsYXNzTGlzdC5wdXNoKCd3YXZlZCcpXG4gIH1cbn1cbiIsIjxkaXY+XG4gIDxkaXYgY2xhc3M9XCJvYy1iYWRnZVwiIFtuZ0NsYXNzXT1cImNsYXNzTGlzdFwiPlxuICAgIDxuZy1jb250ZW50PlxuICBcbiAgICA8L25nLWNvbnRlbnQ+XG4gIDwvZGl2PlxuPC9kaXY+XG4iXX0=
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, Input } from '@angular/core';
|
|
3
|
+
import { OcBadgeComponent } from '../oc-badge/oc-badge.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/common";
|
|
6
|
+
export class OcFilterComponent {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.isOpen = false;
|
|
9
|
+
this.text = 'Filtros';
|
|
10
|
+
this.active = 0;
|
|
11
|
+
}
|
|
12
|
+
toggleOpen() {
|
|
13
|
+
this.isOpen = !this.isOpen;
|
|
14
|
+
}
|
|
15
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: OcFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
16
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.5", type: OcFilterComponent, isStandalone: true, selector: "oc-filter", inputs: { text: "text", active: "active" }, ngImport: i0, template: "<button class=\"oc-filter-btn\" (click)=\"toggleOpen()\">\n <img src=\"https://icon-library.com/images/filter-png-icon/filter-png-icon-0.jpg\">\n {{text}}\n <div class=\"badge\">\n <oc-badge *ngIf=\"active > 0\" size=\"small\" color=\"success\" [waved]=\"true\">{{active}}</oc-badge>\n </div>\n</button>\n<div *ngIf=\"isOpen\" class=\"oc-filter-content\">\n <ng-content>\n </ng-content>\n</div>", styles: [".oc-filter-btn{background-color:#5505a2;color:#f8f9ff;border:none;border-radius:.5rem;padding:.5rem .8rem;font-weight:600;display:flex;align-items:center;gap:.3rem;transition:.2s ease;position:relative;cursor:pointer}.oc-filter-btn:hover{filter:brightness(.9)}.oc-filter-btn img{width:15px;filter:brightness(0) invert(1)}.oc-filter-btn .badge{position:absolute;top:-8px;right:-12px}.oc-filter-content{width:100%;animation:showing-up .15s ease;overflow:hidden;margin-top:1rem}@keyframes showing-up{0%{height:0px;opacity:0}to{height:100%;opacity:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: OcBadgeComponent, selector: "oc-badge", inputs: ["size", "color", "waved"] }] }); }
|
|
17
|
+
}
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: OcFilterComponent, decorators: [{
|
|
19
|
+
type: Component,
|
|
20
|
+
args: [{ selector: 'oc-filter', standalone: true, imports: [CommonModule, OcBadgeComponent], template: "<button class=\"oc-filter-btn\" (click)=\"toggleOpen()\">\n <img src=\"https://icon-library.com/images/filter-png-icon/filter-png-icon-0.jpg\">\n {{text}}\n <div class=\"badge\">\n <oc-badge *ngIf=\"active > 0\" size=\"small\" color=\"success\" [waved]=\"true\">{{active}}</oc-badge>\n </div>\n</button>\n<div *ngIf=\"isOpen\" class=\"oc-filter-content\">\n <ng-content>\n </ng-content>\n</div>", styles: [".oc-filter-btn{background-color:#5505a2;color:#f8f9ff;border:none;border-radius:.5rem;padding:.5rem .8rem;font-weight:600;display:flex;align-items:center;gap:.3rem;transition:.2s ease;position:relative;cursor:pointer}.oc-filter-btn:hover{filter:brightness(.9)}.oc-filter-btn img{width:15px;filter:brightness(0) invert(1)}.oc-filter-btn .badge{position:absolute;top:-8px;right:-12px}.oc-filter-content{width:100%;animation:showing-up .15s ease;overflow:hidden;margin-top:1rem}@keyframes showing-up{0%{height:0px;opacity:0}to{height:100%;opacity:1}}\n"] }]
|
|
21
|
+
}], propDecorators: { text: [{
|
|
22
|
+
type: Input
|
|
23
|
+
}], active: [{
|
|
24
|
+
type: Input
|
|
25
|
+
}] } });
|
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2MtZmlsdGVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL290aW11cy1saWJyYXJ5L3NyYy9saWIvY29tcG9uZW50cy9vYy1maWx0ZXIvb2MtZmlsdGVyLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL290aW11cy1saWJyYXJ5L3NyYy9saWIvY29tcG9uZW50cy9vYy1maWx0ZXIvb2MtZmlsdGVyLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNqRCxPQUFPLEVBQUUsZ0JBQ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Xhwb3J0IGNsYXNzIE9jRmlsdGVyQ29tcG9uZW50IHtcbiAgaXNPcGVuOiBib29sZWFuID0gZmFsc2VcbiAgQElucHV0KCkgdGV4dDogc3RyaW5nID0gJ0ZpbHRyb3MnXG4gIEBJbnB1dCgpIGFjdGl2ZTogbnVtYmVyID0gMFxuXG4gIHRvZ2dsZU9wZW4oKSB7XG4gICAgdGhpcy5pc09wZW4gPSAhdGhpcy5pc09wZW5cbiAgfVxufVxuIiwiPGJ1dHRvbiBjbGFzcz1cIm9jLWZpbHRlci1idG5cIiAoY2xpY2spPVwidG9nZ2xlT3BlbigpXCI+XG4gIDxpbWcgc3JjPVwiaHR0cHM6Ly9pY29uLWxpYnJhcnkuY29tL2ltYWdlcy9maWx0ZXItcG5nLWljb24vZmlsdGVyLXBuZy1pY29uLTAuanBnXCI+XG4gIHt7dGV4dH19XG4gIDxkaXYgY2xhc3M9XCJiYWRnZVwiPlxuICAgIDxvYy1iYWRnZSAqbmdJZj1cImFjdGl2ZSA+IDBcIiBzaXplPVwic21hbGxcIiBjb2xvcj1cInN1Y2Nlc3NcIiBbd2F2ZWRdPVwidHJ1ZVwiPnt7YWN0aXZlfX08L29jLWJhZGdlPlxuICA8L2Rpdj5cbjwvYnV0dG9uPlxuPGRpdiAqbmdJZj1cImlzT3BlblwiIGNsYXNzPVwib2MtZmlsdGVyLWNvbnRlbnRcIj5cbiAgPG5nLWNvbnRlbnQ+XG4gIDwvbmctY29udGVudD5cbjwvZGl2PiJdfQ==
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { CdkTableModule } from '@angular/cdk/table';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/common";
|
|
6
|
+
import * as i2 from "@angular/cdk/table";
|
|
7
|
+
export class OcTableComponent {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.columns = [];
|
|
10
|
+
this.dataSource = [];
|
|
11
|
+
this.keys = [];
|
|
12
|
+
}
|
|
13
|
+
ngOnInit() {
|
|
14
|
+
if (!this.dataSource.length)
|
|
15
|
+
return;
|
|
16
|
+
this.keys = Object.keys(this.dataSource[0]);
|
|
17
|
+
}
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: OcTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.5", type: OcTableComponent, isStandalone: true, selector: "oc-table", inputs: { columns: "columns", dataSource: "dataSource" }, ngImport: i0, template: "<table cdk-table [dataSource]=\"dataSource\">\n\n <ng-container *ngFor=\"let column of columns; let i = index\" [cdkColumnDef]=\"column\">\n <th cdk-header-cell *cdkHeaderCellDef> {{column}} </th>\n <td cdk-cell *cdkCellDef=\"let row\"> {{row[keys[i]]}} </td>\n </ng-container>\n\n <tr cdk-header-row *cdkHeaderRowDef=\"columns\"></tr>\n <tr cdk-row *cdkRowDef=\"let row; columns: columns\"></tr>\n</table>\n", styles: ["table{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: CdkTableModule }, { kind: "component", type: i2.CdkTable, selector: "cdk-table, table[cdk-table]", inputs: ["trackBy", "dataSource", "multiTemplateDataRows", "fixedLayout"], outputs: ["contentChanged"], exportAs: ["cdkTable"] }, { kind: "directive", type: i2.CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "directive", type: i2.CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: i2.CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "directive", type: i2.CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["sticky", "cdkColumnDef", "stickyEnd"] }, { kind: "directive", type: i2.CdkCell, selector: "cdk-cell, td[cdk-cell]" }, { kind: "component", type: i2.CdkRow, selector: "cdk-row, tr[cdk-row]" }, { kind: "directive", type: i2.CdkHeaderCell, selector: "cdk-header-cell, th[cdk-header-cell]" }, { kind: "component", type: i2.CdkHeaderRow, selector: "cdk-header-row, tr[cdk-header-row]" }, { kind: "directive", type: i2.CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }] }); }
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: OcTableComponent, decorators: [{
|
|
22
|
+
type: Component,
|
|
23
|
+
args: [{ selector: 'oc-table', standalone: true, imports: [CommonModule, CdkTableModule], template: "<table cdk-table [dataSource]=\"dataSource\">\n\n <ng-container *ngFor=\"let column of columns; let i = index\" [cdkColumnDef]=\"column\">\n <th cdk-header-cell *cdkHeaderCellDef> {{column}} </th>\n <td cdk-cell *cdkCellDef=\"let row\"> {{row[keys[i]]}} </td>\n </ng-container>\n\n <tr cdk-header-row *cdkHeaderRowDef=\"columns\"></tr>\n <tr cdk-row *cdkRowDef=\"let row; columns: columns\"></tr>\n</table>\n", styles: ["table{width:100%}\n"] }]
|
|
24
|
+
}], propDecorators: { columns: [{
|
|
25
|
+
type: Input
|
|
26
|
+
}], dataSource: [{
|
|
27
|
+
type: Input
|
|
28
|
+
}] } });
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2MtdGFibGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvb3RpbXVzLWxpYnJhcnkvc3JjL2xpYi9jb21wb25lbnRzL29jLXRhYmxlL29jLXRhYmxlLmNvbXBvbmVudC50cyIs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b3dba2V5c1tpXV19fSA8L3RkPlxuICA8L25nLWNvbnRhaW5lcj5cblxuICA8dHIgY2RrLWhlYWRlci1yb3cgKmNka0hlYWRlclJvd0RlZj1cImNvbHVtbnNcIj48L3RyPlxuICA8dHIgY2RrLXJvdyAqY2RrUm93RGVmPVwibGV0IHJvdzsgY29sdW1uczogY29sdW1uc1wiPjwvdHI+XG48L3RhYmxlPlxuIl19
|
package/esm2022/public-api.mjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
* Public API Surface of otimus-library
|
|
3
|
+
*/
|
|
4
4
|
export * from './lib/otimus-library.service';
|
|
5
5
|
export * from './lib/otimus-library.component';
|
|
6
|
-
|
|
6
|
+
export * from './lib/components/oc-table/oc-table.component';
|
|
7
|
+
export * from './lib/components/oc-badge/oc-badge.component';
|
|
8
|
+
export * from './lib/components/oc-filter/oc-filter.component';
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL290aW11cy1saWJyYXJ5L3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBOztFQUVFO0FBRUYsY0FBYyw4QkFBOEIsQ0FBQTtBQUM1QyxjQUFjLGdDQUFnQyxDQUFBO0FBQzlDLGNBQWMsOENBQThDLENBQUE7QUFDNUQsY0FBYyw4Q0FBOEMsQ0FBQTtBQUM1RCxjQUFjLGdEQUFnRCxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiXG4vKlxuKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygb3RpbXVzLWxpYnJhcnlcbiovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL290aW11cy1saWJyYXJ5LnNlcnZpY2UnXG5leHBvcnQgKiBmcm9tICcuL2xpYi9vdGltdXMtbGlicmFyeS5jb21wb25lbnQnXG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb21wb25lbnRzL29jLXRhYmxlL29jLXRhYmxlLmNvbXBvbmVudCdcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbXBvbmVudHMvb2MtYmFkZ2Uvb2MtYmFkZ2UuY29tcG9uZW50J1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9vYy1maWx0ZXIvb2MtZmlsdGVyLmNvbXBvbmVudCciXX0=
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component } from '@angular/core';
|
|
2
|
+
import { Injectable, Component, Input } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i2 from '@angular/cdk/table';
|
|
6
|
+
import { CdkTableModule } from '@angular/cdk/table';
|
|
3
7
|
|
|
4
8
|
class OtimusLibraryService {
|
|
5
9
|
constructor() { }
|
|
@@ -30,13 +34,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImpor
|
|
|
30
34
|
` }]
|
|
31
35
|
}] });
|
|
32
36
|
|
|
37
|
+
class OcTableComponent {
|
|
38
|
+
constructor() {
|
|
39
|
+
this.columns = [];
|
|
40
|
+
this.dataSource = [];
|
|
41
|
+
this.keys = [];
|
|
42
|
+
}
|
|
43
|
+
ngOnInit() {
|
|
44
|
+
if (!this.dataSource.length)
|
|
45
|
+
return;
|
|
46
|
+
this.keys = Object.keys(this.dataSource[0]);
|
|
47
|
+
}
|
|
48
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: OcTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
49
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.5", type: OcTableComponent, isStandalone: true, selector: "oc-table", inputs: { columns: "columns", dataSource: "dataSource" }, ngImport: i0, template: "<table cdk-table [dataSource]=\"dataSource\">\n\n <ng-container *ngFor=\"let column of columns; let i = index\" [cdkColumnDef]=\"column\">\n <th cdk-header-cell *cdkHeaderCellDef> {{column}} </th>\n <td cdk-cell *cdkCellDef=\"let row\"> {{row[keys[i]]}} </td>\n </ng-container>\n\n <tr cdk-header-row *cdkHeaderRowDef=\"columns\"></tr>\n <tr cdk-row *cdkRowDef=\"let row; columns: columns\"></tr>\n</table>\n", styles: ["table{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: CdkTableModule }, { kind: "component", type: i2.CdkTable, selector: "cdk-table, table[cdk-table]", inputs: ["trackBy", "dataSource", "multiTemplateDataRows", "fixedLayout"], outputs: ["contentChanged"], exportAs: ["cdkTable"] }, { kind: "directive", type: i2.CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "directive", type: i2.CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: i2.CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "directive", type: i2.CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["sticky", "cdkColumnDef", "stickyEnd"] }, { kind: "directive", type: i2.CdkCell, selector: "cdk-cell, td[cdk-cell]" }, { kind: "component", type: i2.CdkRow, selector: "cdk-row, tr[cdk-row]" }, { kind: "directive", type: i2.CdkHeaderCell, selector: "cdk-header-cell, th[cdk-header-cell]" }, { kind: "component", type: i2.CdkHeaderRow, selector: "cdk-header-row, tr[cdk-header-row]" }, { kind: "directive", type: i2.CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }] }); }
|
|
50
|
+
}
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: OcTableComponent, decorators: [{
|
|
52
|
+
type: Component,
|
|
53
|
+
args: [{ selector: 'oc-table', standalone: true, imports: [CommonModule, CdkTableModule], template: "<table cdk-table [dataSource]=\"dataSource\">\n\n <ng-container *ngFor=\"let column of columns; let i = index\" [cdkColumnDef]=\"column\">\n <th cdk-header-cell *cdkHeaderCellDef> {{column}} </th>\n <td cdk-cell *cdkCellDef=\"let row\"> {{row[keys[i]]}} </td>\n </ng-container>\n\n <tr cdk-header-row *cdkHeaderRowDef=\"columns\"></tr>\n <tr cdk-row *cdkRowDef=\"let row; columns: columns\"></tr>\n</table>\n", styles: ["table{width:100%}\n"] }]
|
|
54
|
+
}], propDecorators: { columns: [{
|
|
55
|
+
type: Input
|
|
56
|
+
}], dataSource: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}] } });
|
|
59
|
+
|
|
60
|
+
class OcBadgeComponent {
|
|
61
|
+
constructor() {
|
|
62
|
+
this.size = 'small';
|
|
63
|
+
this.color = 'notification';
|
|
64
|
+
this.waved = false;
|
|
65
|
+
this.classList = [];
|
|
66
|
+
}
|
|
67
|
+
ngOnInit() {
|
|
68
|
+
this.classList.push(this.size, this.color);
|
|
69
|
+
if (this.waved)
|
|
70
|
+
this.classList.push('waved');
|
|
71
|
+
}
|
|
72
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: OcBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
73
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.5", type: OcBadgeComponent, isStandalone: true, selector: "oc-badge", inputs: { size: "size", color: "color", waved: "waved" }, ngImport: i0, template: "<div>\n <div class=\"oc-badge\" [ngClass]=\"classList\">\n <ng-content>\n \n </ng-content>\n </div>\n</div>\n", styles: [".oc-badge{border-radius:50%;display:flex;justify-content:center;align-items:center;color:#f8f9ff}.oc-badge>*{color:#f8f9ff;font-weight:600}.notification{background-color:#ed3a3a}.brand-g{background-color:#00dda3}.brand-p{background-color:#5505a2}.success{background-color:#4ab858}.warning{background-color:#ebbc2e}.small{width:22px;height:22px;font-size:1rem}.medium{width:28px;height:28px;font-size:1.25rem}.large{width:34px;height:34px;font-size:1.5rem}.waved{position:relative;z-index:2}.waved:before,.waved:after{z-index:-1;content:\"\";position:absolute;top:0;border-radius:50%;width:100%;height:100%;animation:wave infinite 2s}.waved:after{animation-delay:.6s}.waved.notification:before,.waved.notification:after{background-color:#ed3a3a}.waved.brand-g:before,.waved.brand-g:after{background-color:#00dda3}.waved.brand-p:before,.waved.brand-p:after{background-color:#5505a2}.waved.success:before,.waved.success:after{background-color:#4ab858}.waved.warning:before,.waved.warning:after{background-color:#ebbc2e}@keyframes wave{0%{transform:scale(0)}to{opacity:0;transform:scale(2)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
74
|
+
}
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: OcBadgeComponent, decorators: [{
|
|
76
|
+
type: Component,
|
|
77
|
+
args: [{ selector: 'oc-badge', standalone: true, imports: [CommonModule], template: "<div>\n <div class=\"oc-badge\" [ngClass]=\"classList\">\n <ng-content>\n \n </ng-content>\n </div>\n</div>\n", styles: [".oc-badge{border-radius:50%;display:flex;justify-content:center;align-items:center;color:#f8f9ff}.oc-badge>*{color:#f8f9ff;font-weight:600}.notification{background-color:#ed3a3a}.brand-g{background-color:#00dda3}.brand-p{background-color:#5505a2}.success{background-color:#4ab858}.warning{background-color:#ebbc2e}.small{width:22px;height:22px;font-size:1rem}.medium{width:28px;height:28px;font-size:1.25rem}.large{width:34px;height:34px;font-size:1.5rem}.waved{position:relative;z-index:2}.waved:before,.waved:after{z-index:-1;content:\"\";position:absolute;top:0;border-radius:50%;width:100%;height:100%;animation:wave infinite 2s}.waved:after{animation-delay:.6s}.waved.notification:before,.waved.notification:after{background-color:#ed3a3a}.waved.brand-g:before,.waved.brand-g:after{background-color:#00dda3}.waved.brand-p:before,.waved.brand-p:after{background-color:#5505a2}.waved.success:before,.waved.success:after{background-color:#4ab858}.waved.warning:before,.waved.warning:after{background-color:#ebbc2e}@keyframes wave{0%{transform:scale(0)}to{opacity:0;transform:scale(2)}}\n"] }]
|
|
78
|
+
}], propDecorators: { size: [{
|
|
79
|
+
type: Input
|
|
80
|
+
}], color: [{
|
|
81
|
+
type: Input
|
|
82
|
+
}], waved: [{
|
|
83
|
+
type: Input
|
|
84
|
+
}] } });
|
|
85
|
+
|
|
86
|
+
class OcFilterComponent {
|
|
87
|
+
constructor() {
|
|
88
|
+
this.isOpen = false;
|
|
89
|
+
this.text = 'Filtros';
|
|
90
|
+
this.active = 0;
|
|
91
|
+
}
|
|
92
|
+
toggleOpen() {
|
|
93
|
+
this.isOpen = !this.isOpen;
|
|
94
|
+
}
|
|
95
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: OcFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
96
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.5", type: OcFilterComponent, isStandalone: true, selector: "oc-filter", inputs: { text: "text", active: "active" }, ngImport: i0, template: "<button class=\"oc-filter-btn\" (click)=\"toggleOpen()\">\n <img src=\"https://icon-library.com/images/filter-png-icon/filter-png-icon-0.jpg\">\n {{text}}\n <div class=\"badge\">\n <oc-badge *ngIf=\"active > 0\" size=\"small\" color=\"success\" [waved]=\"true\">{{active}}</oc-badge>\n </div>\n</button>\n<div *ngIf=\"isOpen\" class=\"oc-filter-content\">\n <ng-content>\n </ng-content>\n</div>", styles: [".oc-filter-btn{background-color:#5505a2;color:#f8f9ff;border:none;border-radius:.5rem;padding:.5rem .8rem;font-weight:600;display:flex;align-items:center;gap:.3rem;transition:.2s ease;position:relative;cursor:pointer}.oc-filter-btn:hover{filter:brightness(.9)}.oc-filter-btn img{width:15px;filter:brightness(0) invert(1)}.oc-filter-btn .badge{position:absolute;top:-8px;right:-12px}.oc-filter-content{width:100%;animation:showing-up .15s ease;overflow:hidden;margin-top:1rem}@keyframes showing-up{0%{height:0px;opacity:0}to{height:100%;opacity:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: OcBadgeComponent, selector: "oc-badge", inputs: ["size", "color", "waved"] }] }); }
|
|
97
|
+
}
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: OcFilterComponent, decorators: [{
|
|
99
|
+
type: Component,
|
|
100
|
+
args: [{ selector: 'oc-filter', standalone: true, imports: [CommonModule, OcBadgeComponent], template: "<button class=\"oc-filter-btn\" (click)=\"toggleOpen()\">\n <img src=\"https://icon-library.com/images/filter-png-icon/filter-png-icon-0.jpg\">\n {{text}}\n <div class=\"badge\">\n <oc-badge *ngIf=\"active > 0\" size=\"small\" color=\"success\" [waved]=\"true\">{{active}}</oc-badge>\n </div>\n</button>\n<div *ngIf=\"isOpen\" class=\"oc-filter-content\">\n <ng-content>\n </ng-content>\n</div>", styles: [".oc-filter-btn{background-color:#5505a2;color:#f8f9ff;border:none;border-radius:.5rem;padding:.5rem .8rem;font-weight:600;display:flex;align-items:center;gap:.3rem;transition:.2s ease;position:relative;cursor:pointer}.oc-filter-btn:hover{filter:brightness(.9)}.oc-filter-btn img{width:15px;filter:brightness(0) invert(1)}.oc-filter-btn .badge{position:absolute;top:-8px;right:-12px}.oc-filter-content{width:100%;animation:showing-up .15s ease;overflow:hidden;margin-top:1rem}@keyframes showing-up{0%{height:0px;opacity:0}to{height:100%;opacity:1}}\n"] }]
|
|
101
|
+
}], propDecorators: { text: [{
|
|
102
|
+
type: Input
|
|
103
|
+
}], active: [{
|
|
104
|
+
type: Input
|
|
105
|
+
}] } });
|
|
106
|
+
|
|
33
107
|
/*
|
|
34
|
-
|
|
35
|
-
|
|
108
|
+
* Public API Surface of otimus-library
|
|
109
|
+
*/
|
|
36
110
|
|
|
37
111
|
/**
|
|
38
112
|
* Generated bundle index. Do not edit.
|
|
39
113
|
*/
|
|
40
114
|
|
|
41
|
-
export { OtimusLibraryComponent, OtimusLibraryService };
|
|
115
|
+
export { OcBadgeComponent, OcFilterComponent, OcTableComponent, OtimusLibraryComponent, OtimusLibraryService };
|
|
42
116
|
//# sourceMappingURL=otimus-library.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otimus-library.mjs","sources":["../../../projects/otimus-library/src/lib/otimus-library.service.ts","../../../projects/otimus-library/src/lib/otimus-library.component.ts","../../../projects/otimus-library/src/public-api.ts","../../../projects/otimus-library/src/otimus-library.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OtimusLibraryService {\n\n constructor() { }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-otimus-library',\n standalone: true,\n imports: [],\n template: `\n <p>\n otimus-library works!\n </p>\n `,\n styles: ``\n})\nexport class OtimusLibraryComponent {\n\n}\n","
|
|
1
|
+
{"version":3,"file":"otimus-library.mjs","sources":["../../../projects/otimus-library/src/lib/otimus-library.service.ts","../../../projects/otimus-library/src/lib/otimus-library.component.ts","../../../projects/otimus-library/src/lib/components/oc-table/oc-table.component.ts","../../../projects/otimus-library/src/lib/components/oc-table/oc-table.component.html","../../../projects/otimus-library/src/lib/components/oc-badge/oc-badge.component.ts","../../../projects/otimus-library/src/lib/components/oc-badge/oc-badge.component.html","../../../projects/otimus-library/src/lib/components/oc-filter/oc-filter.component.ts","../../../projects/otimus-library/src/lib/components/oc-filter/oc-filter.component.html","../../../projects/otimus-library/src/public-api.ts","../../../projects/otimus-library/src/otimus-library.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OtimusLibraryService {\n\n constructor() { }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-otimus-library',\n standalone: true,\n imports: [],\n template: `\n <p>\n otimus-library works!\n </p>\n `,\n styles: ``\n})\nexport class OtimusLibraryComponent {\n\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {CdkTableModule} from '@angular/cdk/table'\n\n@Component({\n selector: 'oc-table',\n standalone: true,\n imports: [CommonModule, CdkTableModule],\n templateUrl: './oc-table.component.html',\n styleUrls: ['./oc-table.component.scss']\n})\nexport class OcTableComponent implements OnInit {\n\n @Input() columns: string[] = []\n @Input() dataSource: any[] = []\n keys: string[] = []\n\n ngOnInit(): void {\n if(!this.dataSource.length) return\n\n this.keys = Object.keys(this.dataSource[0])\n }\n}\n","<table cdk-table [dataSource]=\"dataSource\">\n\n <ng-container *ngFor=\"let column of columns; let i = index\" [cdkColumnDef]=\"column\">\n <th cdk-header-cell *cdkHeaderCellDef> {{column}} </th>\n <td cdk-cell *cdkCellDef=\"let row\"> {{row[keys[i]]}} </td>\n </ng-container>\n\n <tr cdk-header-row *cdkHeaderRowDef=\"columns\"></tr>\n <tr cdk-row *cdkRowDef=\"let row; columns: columns\"></tr>\n</table>\n","import { CommonModule } from '@angular/common';\nimport { Component, Input, OnInit } from '@angular/core';\n\n@Component({\n selector: 'oc-badge',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './oc-badge.component.html',\n styleUrl: './oc-badge.component.scss'\n})\nexport class OcBadgeComponent implements OnInit {\n @Input() size: 'small' | 'medium' | 'large' = 'small'\n @Input() color: 'notification' | 'brand-g' | 'brand-p' | 'success' | 'warning' = 'notification'\n @Input() waved: boolean = false\n\n classList: string[] = []\n\n ngOnInit(): void {\n this.classList.push(this.size, this.color)\n if(this.waved) this.classList.push('waved')\n }\n}\n","<div>\n <div class=\"oc-badge\" [ngClass]=\"classList\">\n <ng-content>\n \n </ng-content>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { OcBadgeComponent } from '../oc-badge/oc-badge.component';\n\n@Component({\n selector: 'oc-filter',\n standalone: true,\n imports: [CommonModule, OcBadgeComponent],\n templateUrl: './oc-filter.component.html',\n styleUrl: './oc-filter.component.scss'\n})\nexport class OcFilterComponent {\n isOpen: boolean = false\n @Input() text: string = 'Filtros'\n @Input() active: number = 0\n\n toggleOpen() {\n this.isOpen = !this.isOpen\n }\n}\n","<button class=\"oc-filter-btn\" (click)=\"toggleOpen()\">\n <img src=\"https://icon-library.com/images/filter-png-icon/filter-png-icon-0.jpg\">\n {{text}}\n <div class=\"badge\">\n <oc-badge *ngIf=\"active > 0\" size=\"small\" color=\"success\" [waved]=\"true\">{{active}}</oc-badge>\n </div>\n</button>\n<div *ngIf=\"isOpen\" class=\"oc-filter-content\">\n <ng-content>\n </ng-content>\n</div>","\n/*\n* Public API Surface of otimus-library\n*/\n\nexport * from './lib/otimus-library.service'\nexport * from './lib/otimus-library.component'\nexport * from './lib/components/oc-table/oc-table.component'\nexport * from './lib/components/oc-badge/oc-badge.component'\nexport * from './lib/components/oc-filter/oc-filter.component'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAKa,oBAAoB,CAAA;AAE/B,IAAA,WAAA,GAAA,GAAiB;8GAFN,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAApB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA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BAAd,KAAK;;;AEbR;;AAEE;;ACHF;;AAEG;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class OcBadgeComponent implements OnInit {
|
|
4
|
+
size: 'small' | 'medium' | 'large';
|
|
5
|
+
color: 'notification' | 'brand-g' | 'brand-p' | 'success' | 'warning';
|
|
6
|
+
waved: boolean;
|
|
7
|
+
classList: string[];
|
|
8
|
+
ngOnInit(): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OcBadgeComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OcBadgeComponent, "oc-badge", never, { "size": { "alias": "size"; "required": false; }; "color": { "alias": "color"; "required": false; }; "waved": { "alias": "waved"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class OcFilterComponent {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
text: string;
|
|
5
|
+
active: number;
|
|
6
|
+
toggleOpen(): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OcFilterComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OcFilterComponent, "oc-filter", never, { "text": { "alias": "text"; "required": false; }; "active": { "alias": "active"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class OcTableComponent implements OnInit {
|
|
4
|
+
columns: string[];
|
|
5
|
+
dataSource: any[];
|
|
6
|
+
keys: string[];
|
|
7
|
+
ngOnInit(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OcTableComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OcTableComponent, "oc-table", never, { "columns": { "alias": "columns"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; }, {}, never, never, true, never>;
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "otimus-library",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^17.0.0",
|
|
6
|
-
"@angular/core": "^17.0.0"
|
|
6
|
+
"@angular/core": "^17.0.0",
|
|
7
|
+
"@angular/cdk": "^17.0.2"
|
|
7
8
|
},
|
|
8
9
|
"dependencies": {
|
|
9
10
|
"tslib": "^2.3.0"
|
package/public-api.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export * from './lib/otimus-library.service';
|
|
2
2
|
export * from './lib/otimus-library.component';
|
|
3
|
+
export * from './lib/components/oc-table/oc-table.component';
|
|
4
|
+
export * from './lib/components/oc-badge/oc-badge.component';
|
|
5
|
+
export * from './lib/components/oc-filter/oc-filter.component';
|