@rubeusteam/rb-angular-components 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 ADDED
@@ -0,0 +1,184 @@
1
+ # RbAngularComponents
2
+
3
+ **PT-BR**
4
+ O `rb-angular-components` é uma biblioteca de componentes Angular reutilizáveis criada para acelerar o desenvolvimento de aplicações com base no Angular Material.
5
+
6
+ **EN**
7
+ `rb-angular-components` is a reusable Angular component library designed to speed up application development using Angular Material.
8
+
9
+ ---
10
+
11
+ ## Instalação | Installation
12
+
13
+ **PT-BR**
14
+ Para instalar a biblioteca em seu projeto Angular, execute:
15
+
16
+ ```bash
17
+ npm install rb-angular-components
18
+ ```
19
+
20
+ **EN**
21
+ To install the library in your Angular project, run:
22
+
23
+ ```bash
24
+ npm install rb-angular-components
25
+ ```
26
+
27
+ ---
28
+
29
+ ## Uso Básico | Basic Usage
30
+
31
+ **PT-BR**
32
+ Importe os módulos desejados no seu `AppModule` ou no módulo onde deseja usar os componentes:
33
+
34
+ ```ts
35
+ import { RbCrudModule } from 'rb-angular-components';
36
+ ```
37
+
38
+ **EN**
39
+ Import the desired modules into your `AppModule` or the module where you want to use the components:
40
+
41
+ ```ts
42
+ import { RbCrudModule } from 'rb-angular-components';
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Componentes Disponíveis | Available Components
48
+
49
+ **PT-BR**
50
+ - `RbCrudComponent`: Componente de CRUD genérico com filtros, tabela e paginação.
51
+ - `RbFilterComponent`: Barra de pesquisa/filtros integrável ao CRUD.
52
+ - `RbContentCardComponent`: Quadro de conteúdo estilizado.
53
+ - E mais...
54
+
55
+ **EN**
56
+ - `RbCrudComponent`: Generic CRUD component with filters, table, and pagination.
57
+ - `RbFilterComponent`: Search/filter bar that integrates with the CRUD.
58
+ - `RbContentCardComponent`: Styled content card.
59
+ - And more...
60
+
61
+ Para detalhes específicos de uso, veja os READMEs individuais:
62
+ **To learn more about each, see the individual READMEs:**
63
+
64
+ - [`docs/components/rb-crud`](./projects/rb-angular-components/src/lib/rb-crud/README.md)
65
+ - [`docs/components/rb-filter`](./projects/rb-angular-components/src/lib/rb-filter/README.md)
66
+
67
+ ---
68
+
69
+ ## Gerando Componentes | Code Scaffolding
70
+
71
+ **PT-BR**
72
+ Use o Angular CLI para gerar novos componentes, diretivas ou pipes:
73
+
74
+ ```bash
75
+ ng generate component component-name
76
+ ```
77
+
78
+ **EN**
79
+ Use Angular CLI to generate new components, directives, or pipes:
80
+
81
+ ```bash
82
+ ng generate component component-name
83
+ ```
84
+
85
+ Para ver todos os esquemas disponíveis:
86
+ **To list all available schematics:**
87
+
88
+ ```bash
89
+ ng generate --help
90
+ ```
91
+
92
+ ---
93
+
94
+ ## Build da Biblioteca | Building the Library
95
+
96
+ **PT-BR**
97
+ Para construir a biblioteca, execute:
98
+
99
+ ```bash
100
+ ng build rb-angular-components
101
+ ```
102
+
103
+ **EN**
104
+ To build the library, run:
105
+
106
+ ```bash
107
+ ng build rb-angular-components
108
+ ```
109
+
110
+ Os arquivos compilados serão gerados em `dist/`.
111
+ **The compiled files will be placed in `dist/`.**
112
+
113
+ ---
114
+
115
+ ### Publicação no NPM | Publishing to NPM
116
+
117
+ **PT-BR**
118
+ 1. Navegue até a pasta da biblioteca:
119
+ ```bash
120
+ cd dist/rb-angular-components
121
+ ```
122
+ 2. Publique com:
123
+ ```bash
124
+ npm publish
125
+ ```
126
+
127
+ **EN**
128
+ 1. Navigate to the library folder:
129
+ ```bash
130
+ cd dist/rb-angular-components
131
+ ```
132
+ 2. Publish using:
133
+ ```bash
134
+ npm publish
135
+ ```
136
+
137
+ ---
138
+
139
+ ## Testes Unitários | Running Unit Tests
140
+
141
+ **PT-BR**
142
+ Para rodar os testes unitários com o Karma:
143
+
144
+ ```bash
145
+ ng test
146
+ ```
147
+
148
+ **EN**
149
+ To run unit tests with Karma:
150
+
151
+ ```bash
152
+ ng test
153
+ ```
154
+
155
+ ---
156
+
157
+ ## Testes de Integração (e2e) | Running End-to-End Tests
158
+
159
+ **PT-BR**
160
+ Para rodar testes end-to-end:
161
+
162
+ ```bash
163
+ ng e2e
164
+ ```
165
+
166
+ **EN**
167
+ To run end-to-end tests:
168
+
169
+ ```bash
170
+ ng e2e
171
+ ```
172
+
173
+ ---
174
+
175
+ ## Recursos Adicionais | Additional Resources
176
+
177
+ **PT-BR**
178
+ Para mais informações sobre o Angular CLI, acesse:
179
+ [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli)
180
+
181
+ **EN**
182
+ For more information on Angular CLI, visit:
183
+ [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli)
184
+
@@ -0,0 +1,385 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Pipe, Directive, Input, Injectable, signal, EventEmitter, effect, Component, Output, ViewChild } from '@angular/core';
3
+ import * as i2 from '@angular/material/table';
4
+ import { MatTableDataSource, MatTableModule } from '@angular/material/table';
5
+ import * as i3$1 from '@angular/material/input';
6
+ import { MatInputModule } from '@angular/material/input';
7
+ import * as i4 from '@angular/material/paginator';
8
+ import { MatPaginatorIntl, MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
9
+ import * as i5 from '@angular/material/sort';
10
+ import { MatSort, MatSortModule } from '@angular/material/sort';
11
+ import { CommonModule } from '@angular/common';
12
+ import * as i3 from '@angular/material/menu';
13
+ import { MatMenuModule } from '@angular/material/menu';
14
+ import * as i6 from '@angular/material/icon';
15
+ import { MatIconModule } from '@angular/material/icon';
16
+ import * as i7 from '@angular/material/button';
17
+ import { MatButtonModule } from '@angular/material/button';
18
+ import * as i2$1 from '@angular/material/form-field';
19
+ import { MatFormFieldModule } from '@angular/material/form-field';
20
+
21
+ class RbCustomPipe {
22
+ transform(value, type) {
23
+ switch (type) {
24
+ case 'date':
25
+ return this.dateTransform(value);
26
+ case 'currency':
27
+ return this.currencyTransform(value);
28
+ case 'cpf':
29
+ return this.cpfTransform(value);
30
+ case 'cnpj':
31
+ return this.cnpjTransform(value);
32
+ case 'phone':
33
+ return this.phoneTransform(value);
34
+ case 'cep':
35
+ return this.cepTransform(value);
36
+ case 'mask':
37
+ return this.maskTransform(value);
38
+ case 'relativeTime':
39
+ return this.relativeTimeTransform(value);
40
+ case 'lastModifiedBy':
41
+ return this.lastModifiedTransform(value);
42
+ default:
43
+ return value;
44
+ }
45
+ }
46
+ dateTransform(value) {
47
+ if (!value)
48
+ return '';
49
+ return new Intl.DateTimeFormat('pt-BR').format(new Date(value));
50
+ }
51
+ currencyTransform(value) {
52
+ if (!value)
53
+ return '';
54
+ return new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(value);
55
+ }
56
+ cpfTransform(value) {
57
+ if (!value)
58
+ return '';
59
+ return value.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/, "$1.$2.$3-$4");
60
+ }
61
+ cnpjTransform(value) {
62
+ if (!value)
63
+ return '';
64
+ return value.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/, "$1.$2.$3/$4-$5");
65
+ }
66
+ phoneTransform(value) {
67
+ if (!value)
68
+ return '';
69
+ return value.replace(/(\d{2})(\d{5})(\d{4})/, "($1) $2-$3");
70
+ }
71
+ cepTransform(value) {
72
+ if (!value)
73
+ return '';
74
+ return value.replace(/(\d{5})(\d{3})/, "$1-$2");
75
+ }
76
+ maskTransform(value) {
77
+ if (!value)
78
+ return '';
79
+ return '*'.repeat(value.toString().length);
80
+ }
81
+ relativeTimeTransform(value) {
82
+ if (!value)
83
+ return '';
84
+ const date = new Date(value);
85
+ const now = new Date();
86
+ const diff = Math.floor((now.getTime() - date.getTime()) / 1000);
87
+ switch (true) {
88
+ case diff < 60:
89
+ return `${diff} segundos atrás`;
90
+ case diff < 3600:
91
+ return `${Math.floor(diff / 60)} minutos atrás`;
92
+ case diff < 86400:
93
+ return `${Math.floor(diff / 3600)} horas atrás`;
94
+ case diff < 2592000:
95
+ return `${Math.floor(diff / 86400)} dias atrás`;
96
+ case diff < 31536000:
97
+ return `${Math.floor(diff / 2592000)} meses atrás`;
98
+ default:
99
+ return `${Math.floor(diff / 31536000)} anos atrás`;
100
+ }
101
+ }
102
+ lastModifiedTransform(value) {
103
+ if (!value || !value.date)
104
+ return '';
105
+ const formattedDate = new Intl.DateTimeFormat('pt-BR', {
106
+ dateStyle: 'short',
107
+ // timeStyle: 'short',
108
+ }).format(new Date(value.date));
109
+ if (!value.author) {
110
+ return `${formattedDate}`;
111
+ }
112
+ return `${formattedDate} por ${value.author}`;
113
+ }
114
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RbCustomPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
115
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: RbCustomPipe, isStandalone: true, name: "rbCustomPipe" });
116
+ }
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RbCustomPipe, decorators: [{
118
+ type: Pipe,
119
+ args: [{
120
+ name: 'rbCustomPipe',
121
+ standalone: true
122
+ }]
123
+ }] });
124
+
125
+ class RbDynamicButtonDirective {
126
+ el;
127
+ renderer;
128
+ set buttonType(value) {
129
+ const validTypes = ['float', 'confirm', 'cancel', 'menuTrigger'];
130
+ this._buttonType = validTypes.includes(value) ? value : null;
131
+ }
132
+ _buttonType = null;
133
+ buttonTypes = {
134
+ float: {
135
+ directive: 'mat-raised-button',
136
+ classes: ['mdc-button--raised', 'mat-mdc-raised-button']
137
+ },
138
+ confirm: {
139
+ directive: 'mat-flat-button',
140
+ classes: ['mdc-button--unelevated', 'mat-mdc-unelevated-button']
141
+ },
142
+ cancel: {
143
+ directive: 'mat-stroked-button',
144
+ classes: ['mdc-button--outlined', 'mat-mdc-outlined-button']
145
+ },
146
+ menuTrigger: {
147
+ directive: 'mat-icon-button',
148
+ classes: ['mdc-icon-button', 'mat-mdc-icon-button']
149
+ }
150
+ };
151
+ constructor(el, renderer) {
152
+ this.el = el;
153
+ this.renderer = renderer;
154
+ }
155
+ ngOnChanges(changes) {
156
+ if (changes['buttonType']?.currentValue) {
157
+ this.renderButtons(this._buttonType || '');
158
+ }
159
+ }
160
+ renderButtons(key) {
161
+ if (key?.trim() && typeof this.buttonTypes[key] === 'object') {
162
+ this.renderer.setAttribute(this.el.nativeElement, this.buttonTypes[key].directive, '');
163
+ this.buttonTypes[key].classes.forEach(cls => this.renderer.addClass(this.el.nativeElement, cls));
164
+ }
165
+ }
166
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RbDynamicButtonDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
167
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.7", type: RbDynamicButtonDirective, isStandalone: true, selector: "[rbDynamicButton]", inputs: { buttonType: ["rbDynamicButton", "buttonType"] }, usesOnChanges: true, ngImport: i0 });
168
+ }
169
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RbDynamicButtonDirective, decorators: [{
170
+ type: Directive,
171
+ args: [{
172
+ selector: '[rbDynamicButton]'
173
+ }]
174
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { buttonType: [{
175
+ type: Input,
176
+ args: ['rbDynamicButton']
177
+ }] } });
178
+
179
+ class PaginatorPtbrIntlService extends MatPaginatorIntl {
180
+ itemsPerPageLabel = 'Itens por página:';
181
+ nextPageLabel = 'Próxima';
182
+ previousPageLabel = 'Anterior';
183
+ firstPageLabel = 'Primeira página';
184
+ lastPageLabel = 'Última página';
185
+ getRangeLabel = (page, pageSize, length) => {
186
+ if (length === 0) {
187
+ return `Página 0 de ${length}`;
188
+ }
189
+ const start = page * pageSize + 1;
190
+ const totalPages = ((length / pageSize) + (length % pageSize > 0 ? 1 : 0)).toFixed(0);
191
+ return `Página ${start} de ${totalPages}`;
192
+ };
193
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: PaginatorPtbrIntlService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
194
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: PaginatorPtbrIntlService, providedIn: 'root' });
195
+ }
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: PaginatorPtbrIntlService, decorators: [{
197
+ type: Injectable,
198
+ args: [{
199
+ providedIn: 'root'
200
+ }]
201
+ }] });
202
+
203
+ class ClientFilterService {
204
+ searchText = signal('');
205
+ setSearchText(text) {
206
+ this.searchText.set(text.trim().toLowerCase());
207
+ }
208
+ getSearchText() {
209
+ return this.searchText;
210
+ }
211
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ClientFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
212
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ClientFilterService, providedIn: 'root' });
213
+ }
214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ClientFilterService, decorators: [{
215
+ type: Injectable,
216
+ args: [{
217
+ providedIn: 'root'
218
+ }]
219
+ }] });
220
+
221
+ class RbCrudComponent {
222
+ clientFilterService;
223
+ columns = [];
224
+ data = [];
225
+ actionsMenu = [];
226
+ pagination = true;
227
+ pageSize = 10;
228
+ infiniteScroll = false;
229
+ textLineBreakable = false;
230
+ filters = [];
231
+ actionClick = new EventEmitter();
232
+ // @Output() filterChange = new EventEmitter<any>();
233
+ pageChange = new EventEmitter();
234
+ paginator;
235
+ sort;
236
+ displayedColumns = [];
237
+ dataSource = new MatTableDataSource(this.data);
238
+ filterText;
239
+ constructor(clientFilterService) {
240
+ this.clientFilterService = clientFilterService;
241
+ this.filterText = this.clientFilterService.getSearchText();
242
+ effect(() => {
243
+ this.applyFilter();
244
+ });
245
+ }
246
+ ngAfterViewInit() {
247
+ this.dataSource.paginator = this.paginator;
248
+ this.dataSource.sort = this.sort;
249
+ this.defineSortRule();
250
+ }
251
+ ngOnChanges() {
252
+ this.dataSource.data = this.data;
253
+ this.displayedColumns = this.columns.map(col => col.key);
254
+ if (this.actionsMenu.length) {
255
+ this.displayedColumns.push('actions');
256
+ }
257
+ }
258
+ defineSortRule() {
259
+ this.dataSource.sortingDataAccessor = (item, property) => {
260
+ if (item[property]?.date) {
261
+ return new Date(item[property]?.date || 0).getTime();
262
+ }
263
+ return item[property];
264
+ };
265
+ }
266
+ onActionClick(action, row) {
267
+ this.actionClick.emit({ action: action.action, row });
268
+ }
269
+ onClickCell(action, row) {
270
+ this.actionClick.emit({ action: action, row });
271
+ }
272
+ applyFilter() {
273
+ this.dataSource.filter = this.filterText().trim().toLowerCase();
274
+ }
275
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RbCrudComponent, deps: [{ token: ClientFilterService }], target: i0.ɵɵFactoryTarget.Component });
276
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: RbCrudComponent, isStandalone: true, selector: "rb-crud", inputs: { columns: "columns", data: "data", actionsMenu: "actionsMenu", pagination: "pagination", pageSize: "pageSize", infiniteScroll: "infiniteScroll", textLineBreakable: "textLineBreakable", filters: "filters" }, outputs: { actionClick: "actionClick", pageChange: "pageChange" }, providers: [
277
+ { provide: MatPaginatorIntl, useClass: PaginatorPtbrIntlService }
278
+ ], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"rb-crud-container\">\n <div class=\"rb-table-container\">\n <table mat-table [dataSource]=\"dataSource\" matSort class=\"rb-table\">\n <!-- Colunas Din\u00E2micas -->\n @for (column of columns; track column.key) {\n <ng-container [matColumnDef]=\"column.key\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.label }}\n </th>\n <td mat-cell *matCellDef=\"let row\"\n [class.rb-clickable-cell]=\"column.action\"\n [class.rb-break-line-cell]=\"textLineBreakable\"\n (click)=\"column.action ? onClickCell(column.action, row) : null\"\n title=\"{{ column.pipe ? (row[column.key] | rbCustomPipe:column.pipe) : row[column.key] }}\">\n @if (column.pipe) {\n {{ row[column.key] | rbCustomPipe:column.pipe }}\n } @else {\n {{ row[column.key] }}\n }\n </td>\n </ng-container>\n }\n\n <!-- Coluna de A\u00E7\u00F5es -->\n @if (actionsMenu.length) {\n <ng-container matColumnDef=\"actions\" stickyEnd>\n <th mat-header-cell *matHeaderCellDef> A\u00E7\u00F5es </th>\n <td mat-cell *matCellDef=\"let row\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon>{{ 'more_vert' }}</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n @for (action of actionsMenu; track action.label) {\n <button mat-menu-item (click)=\"onActionClick(action, row)\">\n @if (action.icon) {\n <mat-icon>{{ action.icon }}</mat-icon>\n }\n {{ action.label }}\n </button>\n }\n </mat-menu>\n </td>\n </ng-container>\n }\n\n <!-- Cabe\u00E7alho e Corpo da Tabela -->\n <thead>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n </thead>\n <tbody>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </tbody>\n </table>\n </div>\n\n @if (dataSource.data.length === 0) {\n <div class=\"empty-message\">\n Nenhum dado dispon\u00EDvel no momento.\n </div>\n }\n</div>\n\n<!-- Pagina\u00E7\u00E3o -->\n@if (pagination) {\n <mat-paginator #paginator\n class=\"rb-paginator\"\n [pageSize]=\"pageSize\"\n (page)=\"pageChange.emit($event.pageIndex)\"\n [showFirstLastButtons]=\"true\"\n [pageSizeOptions]=\"[10,25,50,100]\"\n aria-label=\"Selecione a p\u00E1gina\">\n </mat-paginator>\n}\n", styles: ["@charset \"UTF-8\";.rb-crud-container{display:flex;flex-direction:column;max-width:100%;overflow:auto;max-height:inherit;margin-top:32px;--mat-table-header-container-height: 48px;--mat-table-row-item-height: 48px;--mat-table-row-item-container-height: 48px}.rb-crud-container th{padding:0 8px;border-bottom:1px solid transparent}.rb-crud-container td{padding:0 8px;border-bottom:1px solid rgb(225,227,226)}.rb-crud-container tr{transition:background-color .3s ease-in-out}.rb-crud-container tr:hover{background-color:color-mix(in srgb,var(--mat-sys-primary) 5%,transparent)}.rb-crud-container td:not(.rb-break-line-cell){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:300px}.rb-crud-container .mat-row{height:36px}.rb-crud-container .rb-table-container{display:flex;flex-direction:column;max-height:100%}.rb-crud-container tbody.mdc-data-table__content{flex:1;overflow-y:auto}.rb-crud-container .mat-mdc-header-cell{vertical-align:top}.mat-mdc-table.rb-table{background-color:#fff}mat-paginator.mat-mdc-paginator.rb-paginator{background-color:#fff}.mat-mdc-table-sticky-border-elem-left{border-right:1px solid #e0e0e0}.rb-paginator{padding-top:16px}td.rb-clickable-cell{cursor:pointer}td.rb-clickable-cell:hover{text-decoration:underline}::ng-deep .rb-table-container thead{position:sticky;top:0;z-index:2}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i4.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i5.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i5.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "pipe", type: RbCustomPipe, name: "rbCustomPipe" }] });
279
+ }
280
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RbCrudComponent, decorators: [{
281
+ type: Component,
282
+ args: [{ selector: 'rb-crud', standalone: true, imports: [
283
+ CommonModule,
284
+ MatTableModule,
285
+ MatMenuModule,
286
+ MatInputModule,
287
+ MatPaginatorModule,
288
+ MatSortModule,
289
+ MatIconModule,
290
+ MatButtonModule,
291
+ RbCustomPipe,
292
+ ], providers: [
293
+ { provide: MatPaginatorIntl, useClass: PaginatorPtbrIntlService }
294
+ ], template: "<div class=\"rb-crud-container\">\n <div class=\"rb-table-container\">\n <table mat-table [dataSource]=\"dataSource\" matSort class=\"rb-table\">\n <!-- Colunas Din\u00E2micas -->\n @for (column of columns; track column.key) {\n <ng-container [matColumnDef]=\"column.key\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.label }}\n </th>\n <td mat-cell *matCellDef=\"let row\"\n [class.rb-clickable-cell]=\"column.action\"\n [class.rb-break-line-cell]=\"textLineBreakable\"\n (click)=\"column.action ? onClickCell(column.action, row) : null\"\n title=\"{{ column.pipe ? (row[column.key] | rbCustomPipe:column.pipe) : row[column.key] }}\">\n @if (column.pipe) {\n {{ row[column.key] | rbCustomPipe:column.pipe }}\n } @else {\n {{ row[column.key] }}\n }\n </td>\n </ng-container>\n }\n\n <!-- Coluna de A\u00E7\u00F5es -->\n @if (actionsMenu.length) {\n <ng-container matColumnDef=\"actions\" stickyEnd>\n <th mat-header-cell *matHeaderCellDef> A\u00E7\u00F5es </th>\n <td mat-cell *matCellDef=\"let row\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon>{{ 'more_vert' }}</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n @for (action of actionsMenu; track action.label) {\n <button mat-menu-item (click)=\"onActionClick(action, row)\">\n @if (action.icon) {\n <mat-icon>{{ action.icon }}</mat-icon>\n }\n {{ action.label }}\n </button>\n }\n </mat-menu>\n </td>\n </ng-container>\n }\n\n <!-- Cabe\u00E7alho e Corpo da Tabela -->\n <thead>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n </thead>\n <tbody>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </tbody>\n </table>\n </div>\n\n @if (dataSource.data.length === 0) {\n <div class=\"empty-message\">\n Nenhum dado dispon\u00EDvel no momento.\n </div>\n }\n</div>\n\n<!-- Pagina\u00E7\u00E3o -->\n@if (pagination) {\n <mat-paginator #paginator\n class=\"rb-paginator\"\n [pageSize]=\"pageSize\"\n (page)=\"pageChange.emit($event.pageIndex)\"\n [showFirstLastButtons]=\"true\"\n [pageSizeOptions]=\"[10,25,50,100]\"\n aria-label=\"Selecione a p\u00E1gina\">\n </mat-paginator>\n}\n", styles: ["@charset \"UTF-8\";.rb-crud-container{display:flex;flex-direction:column;max-width:100%;overflow:auto;max-height:inherit;margin-top:32px;--mat-table-header-container-height: 48px;--mat-table-row-item-height: 48px;--mat-table-row-item-container-height: 48px}.rb-crud-container th{padding:0 8px;border-bottom:1px solid transparent}.rb-crud-container td{padding:0 8px;border-bottom:1px solid rgb(225,227,226)}.rb-crud-container tr{transition:background-color .3s ease-in-out}.rb-crud-container tr:hover{background-color:color-mix(in srgb,var(--mat-sys-primary) 5%,transparent)}.rb-crud-container td:not(.rb-break-line-cell){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:300px}.rb-crud-container .mat-row{height:36px}.rb-crud-container .rb-table-container{display:flex;flex-direction:column;max-height:100%}.rb-crud-container tbody.mdc-data-table__content{flex:1;overflow-y:auto}.rb-crud-container .mat-mdc-header-cell{vertical-align:top}.mat-mdc-table.rb-table{background-color:#fff}mat-paginator.mat-mdc-paginator.rb-paginator{background-color:#fff}.mat-mdc-table-sticky-border-elem-left{border-right:1px solid #e0e0e0}.rb-paginator{padding-top:16px}td.rb-clickable-cell{cursor:pointer}td.rb-clickable-cell:hover{text-decoration:underline}::ng-deep .rb-table-container thead{position:sticky;top:0;z-index:2}\n"] }]
295
+ }], ctorParameters: () => [{ type: ClientFilterService }], propDecorators: { columns: [{
296
+ type: Input
297
+ }], data: [{
298
+ type: Input
299
+ }], actionsMenu: [{
300
+ type: Input
301
+ }], pagination: [{
302
+ type: Input
303
+ }], pageSize: [{
304
+ type: Input
305
+ }], infiniteScroll: [{
306
+ type: Input
307
+ }], textLineBreakable: [{
308
+ type: Input
309
+ }], filters: [{
310
+ type: Input
311
+ }], actionClick: [{
312
+ type: Output
313
+ }], pageChange: [{
314
+ type: Output
315
+ }], paginator: [{
316
+ type: ViewChild,
317
+ args: [MatPaginator]
318
+ }], sort: [{
319
+ type: ViewChild,
320
+ args: [MatSort]
321
+ }] } });
322
+
323
+ class RbFilterComponent {
324
+ clientFilterService;
325
+ searchPlaceholder = 'Digite para pesquisar...';
326
+ buttonSettings = [];
327
+ iconButton = 'add';
328
+ titleButton = 'Adicionar';
329
+ buttonClick = new EventEmitter();
330
+ searchText = signal('');
331
+ constructor(clientFilterService) {
332
+ this.clientFilterService = clientFilterService;
333
+ }
334
+ onSearchChange(event) {
335
+ const value = event.target.value;
336
+ this.searchText.set(value);
337
+ this.clientFilterService.setSearchText(value);
338
+ }
339
+ onClickButton(action) {
340
+ this.buttonClick.emit(action);
341
+ }
342
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RbFilterComponent, deps: [{ token: ClientFilterService }], target: i0.ɵɵFactoryTarget.Component });
343
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: RbFilterComponent, isStandalone: true, selector: "rb-filter", inputs: { searchPlaceholder: "searchPlaceholder", buttonSettings: "buttonSettings", iconButton: "iconButton", titleButton: "titleButton" }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "<div class=\"rb-filter-container\">\n <div class=\"rb-flex-line-space-between\">\n <div class=\"rb-flex-align-items-center\">\n @for (btn of buttonSettings; track btn.label) {\n <button mat-button [rbDynamicButton]=\"btn.directive || null\" (click)=\"onClickButton(btn)\">\n @if (btn.icon) {\n <mat-icon>{{ btn.icon }}</mat-icon>\n }\n {{ btn.label }}\n </button>\n }\n </div>\n\n <div class=\"rb-search-box rb-flex-align-items-center\">\n <mat-form-field class=\"rb-search-field\">\n <mat-label>Pesquisar</mat-label>\n <input\n matInput\n [value]=\"searchText()\"\n (input)=\"onSearchChange($event)\"\n placeholder={{searchPlaceholder}}\n />\n <mat-icon matPrefix>search</mat-icon>\n </mat-form-field>\n </div>\n </div>\n</div>\n\n", styles: [".rb-search-box{display:flex;align-items:center;justify-content:flex-end}.rb-flex-line-space-between{display:flex;justify-content:space-between;flex-wrap:wrap}.rb-flex-align-items-center{display:flex;align-items:center;flex-wrap:wrap;gap:8px}::ng-deep .rb-search-field .mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:transparent}::ng-deep .rb-search-field .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: RbDynamicButtonDirective, selector: "[rbDynamicButton]", inputs: ["rbDynamicButton"] }] });
344
+ }
345
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RbFilterComponent, decorators: [{
346
+ type: Component,
347
+ args: [{ selector: 'rb-filter', standalone: true, imports: [
348
+ CommonModule,
349
+ MatFormFieldModule,
350
+ MatInputModule,
351
+ MatIconModule,
352
+ MatButtonModule,
353
+ RbDynamicButtonDirective,
354
+ ], template: "<div class=\"rb-filter-container\">\n <div class=\"rb-flex-line-space-between\">\n <div class=\"rb-flex-align-items-center\">\n @for (btn of buttonSettings; track btn.label) {\n <button mat-button [rbDynamicButton]=\"btn.directive || null\" (click)=\"onClickButton(btn)\">\n @if (btn.icon) {\n <mat-icon>{{ btn.icon }}</mat-icon>\n }\n {{ btn.label }}\n </button>\n }\n </div>\n\n <div class=\"rb-search-box rb-flex-align-items-center\">\n <mat-form-field class=\"rb-search-field\">\n <mat-label>Pesquisar</mat-label>\n <input\n matInput\n [value]=\"searchText()\"\n (input)=\"onSearchChange($event)\"\n placeholder={{searchPlaceholder}}\n />\n <mat-icon matPrefix>search</mat-icon>\n </mat-form-field>\n </div>\n </div>\n</div>\n\n", styles: [".rb-search-box{display:flex;align-items:center;justify-content:flex-end}.rb-flex-line-space-between{display:flex;justify-content:space-between;flex-wrap:wrap}.rb-flex-align-items-center{display:flex;align-items:center;flex-wrap:wrap;gap:8px}::ng-deep .rb-search-field .mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:transparent}::ng-deep .rb-search-field .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:0}\n"] }]
355
+ }], ctorParameters: () => [{ type: ClientFilterService }], propDecorators: { searchPlaceholder: [{
356
+ type: Input
357
+ }], buttonSettings: [{
358
+ type: Input
359
+ }], iconButton: [{
360
+ type: Input
361
+ }], titleButton: [{
362
+ type: Input
363
+ }], buttonClick: [{
364
+ type: Output
365
+ }] } });
366
+
367
+ class RbContentBoxComponent {
368
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RbContentBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
369
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: RbContentBoxComponent, isStandalone: true, selector: "rb-content-box", ngImport: i0, template: "<div class=\"rb-content-box\">\n <ng-content></ng-content>\n</div>\n", styles: [".rb-content-box{border-radius:8px;justify-content:space-between;padding:32px;background:var(--Palettes-Neutral-100, rgb(255, 255, 255));box-shadow:0 3px 3px -2px #0003,0 3px 4px #00000024,0 1px 8px #0000001f}\n"] });
370
+ }
371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RbContentBoxComponent, decorators: [{
372
+ type: Component,
373
+ args: [{ selector: 'rb-content-box', imports: [], template: "<div class=\"rb-content-box\">\n <ng-content></ng-content>\n</div>\n", styles: [".rb-content-box{border-radius:8px;justify-content:space-between;padding:32px;background:var(--Palettes-Neutral-100, rgb(255, 255, 255));box-shadow:0 3px 3px -2px #0003,0 3px 4px #00000024,0 1px 8px #0000001f}\n"] }]
374
+ }] });
375
+
376
+ /*
377
+ * Public API Surface of rb-angular-components
378
+ */
379
+
380
+ /**
381
+ * Generated bundle index. Do not edit.
382
+ */
383
+
384
+ export { RbContentBoxComponent, RbCrudComponent, RbCustomPipe, RbDynamicButtonDirective, RbFilterComponent };
385
+ //# sourceMappingURL=rubeusteam-rb-angular-components.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rubeusteam-rb-angular-components.mjs","sources":["../../../projects/rb-angular-components/src/lib/pipes/rb-custom.pipe.ts","../../../projects/rb-angular-components/src/lib/directives/rb-dynamic-button.directive.ts","../../../projects/rb-angular-components/src/lib/services/translates/paginator-ptbr-intl.service.ts","../../../projects/rb-angular-components/src/lib/services/filter/client-filter.service.ts","../../../projects/rb-angular-components/src/lib/components/rb-crud/rb-crud.component.ts","../../../projects/rb-angular-components/src/lib/components/rb-crud/rb-crud.component.html","../../../projects/rb-angular-components/src/lib/components/rb-filter/rb-filter.component.ts","../../../projects/rb-angular-components/src/lib/components/rb-filter/rb-filter.component.html","../../../projects/rb-angular-components/src/lib/components/rb-content-box/rb-content-box.component.ts","../../../projects/rb-angular-components/src/lib/components/rb-content-box/rb-content-box.component.html","../../../projects/rb-angular-components/src/public-api.ts","../../../projects/rb-angular-components/src/rubeusteam-rb-angular-components.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'rbCustomPipe',\n standalone: true\n})\nexport class RbCustomPipe implements PipeTransform {\n\n transform(value: any, type: string): any {\n switch (type) {\n case 'date':\n return this.dateTransform(value);\n case 'currency':\n return this.currencyTransform(value);\n case 'cpf':\n return this.cpfTransform(value);\n case 'cnpj':\n return this.cnpjTransform(value);\n case 'phone':\n return this.phoneTransform(value);\n case 'cep':\n return this.cepTransform(value);\n case 'mask':\n return this.maskTransform(value);\n case 'relativeTime':\n return this.relativeTimeTransform(value);\n case 'lastModifiedBy':\n return this.lastModifiedTransform(value);\n default:\n return value;\n }\n }\n\n dateTransform(value: any): any {\n if (!value) return '';\n return new Intl.DateTimeFormat('pt-BR').format(new Date(value));\n }\n\n currencyTransform(value: any): any {\n if (!value) return '';\n return new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(value);\n }\n\n cpfTransform(value: any): any {\n if (!value) return '';\n return value.replace(/(\\d{3})(\\d{3})(\\d{3})(\\d{2})/, \"$1.$2.$3-$4\");\n }\n\n cnpjTransform(value: any): any {\n if (!value) return '';\n return value.replace(/(\\d{2})(\\d{3})(\\d{3})(\\d{4})(\\d{2})/, \"$1.$2.$3/$4-$5\");\n }\n\n phoneTransform(value: any): any {\n if (!value) return '';\n return value.replace(/(\\d{2})(\\d{5})(\\d{4})/, \"($1) $2-$3\");\n }\n\n cepTransform(value: any): any {\n if (!value) return '';\n return value.replace(/(\\d{5})(\\d{3})/, \"$1-$2\");\n }\n\n maskTransform(value: any): any {\n if (!value) return '';\n return '*'.repeat(value.toString().length);\n }\n\n relativeTimeTransform(value: any): any {\n if (!value) return '';\n const date = new Date(value);\n const now = new Date();\n const diff = Math.floor((now.getTime() - date.getTime()) / 1000);\n\n switch (true) {\n case diff < 60:\n return `${diff} segundos atrás`;\n case diff < 3600:\n return `${Math.floor(diff / 60)} minutos atrás`;\n case diff < 86400:\n return `${Math.floor(diff / 3600)} horas atrás`;\n case diff < 2592000:\n return `${Math.floor(diff / 86400)} dias atrás`;\n case diff < 31536000:\n return `${Math.floor(diff / 2592000)} meses atrás`;\n default:\n return `${Math.floor(diff / 31536000)} anos atrás`;\n }\n }\n\n lastModifiedTransform(value: { date: string; author: string }): string {\n if (!value || !value.date) return '';\n const formattedDate = new Intl.DateTimeFormat('pt-BR', {\n dateStyle: 'short',\n // timeStyle: 'short',\n }).format(new Date(value.date));\n if(!value.author) {\n return `${formattedDate}`;\n }\n return `${formattedDate} por ${value.author}`;\n }\n\n}\n","import { Directive, Input, ElementRef, Renderer2, OnChanges, SimpleChanges } from '@angular/core';\n\n@Directive({\n selector: '[rbDynamicButton]'\n})\nexport class RbDynamicButtonDirective implements OnChanges {\n @Input('rbDynamicButton') set buttonType(value: string | null) {\n const validTypes = ['float', 'confirm', 'cancel', 'menuTrigger'] as const;\n this._buttonType = validTypes.includes(value as any) ? (value as any) : null;\n }\n private _buttonType: 'float' | 'confirm' | 'cancel' | 'menuTrigger' | null = null;\n\n buttonTypes: Record<string, { directive: string; classes: string[] }> = {\n float: {\n directive: 'mat-raised-button',\n classes: ['mdc-button--raised', 'mat-mdc-raised-button']\n },\n confirm: {\n directive: 'mat-flat-button',\n classes: ['mdc-button--unelevated', 'mat-mdc-unelevated-button']\n },\n cancel: {\n directive: 'mat-stroked-button',\n classes: ['mdc-button--outlined', 'mat-mdc-outlined-button']\n },\n menuTrigger: {\n directive: 'mat-icon-button',\n classes: ['mdc-icon-button', 'mat-mdc-icon-button']\n }\n };\n\n constructor(private el: ElementRef, private renderer: Renderer2) {\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['buttonType']?.currentValue) {\n this.renderButtons(this._buttonType || '');\n }\n }\n\n private renderButtons(key: string) {\n if (key?.trim() && typeof this.buttonTypes[key] === 'object') {\n this.renderer.setAttribute(this.el.nativeElement, this.buttonTypes[key].directive, '');\n this.buttonTypes[key].classes.forEach(cls => this.renderer.addClass(this.el.nativeElement, cls));\n }\n }\n\n}\n\n","import { Injectable } from '@angular/core';\nimport { MatPaginatorIntl } from '@angular/material/paginator';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PaginatorPtbrIntlService extends MatPaginatorIntl{\n override itemsPerPageLabel = 'Itens por página:';\n override nextPageLabel = 'Próxima';\n override previousPageLabel = 'Anterior';\n override firstPageLabel = 'Primeira página';\n override lastPageLabel = 'Última página';\n\n override getRangeLabel = (page: number, pageSize: number, length: number) => {\n\n if (length === 0) {\n return `Página 0 de ${length}`;\n }\n const start = page * pageSize + 1;\n const totalPages = ((length / pageSize) + (length % pageSize > 0 ? 1 : 0)).toFixed(0);\n return `Página ${start} de ${totalPages}`;\n };\n}\n","import { Injectable, signal, Signal } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ClientFilterService {\n\n private searchText = signal<string>('');\n\n setSearchText(text: string): void {\n this.searchText.set(text.trim().toLowerCase());\n }\n\n getSearchText(): Signal<string> {\n return this.searchText;\n }\n}\n","import { Component, Input, Output, EventEmitter, AfterViewInit, OnChanges, ViewChild, effect, Signal } from '@angular/core';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatPaginatorModule, MatPaginator } from '@angular/material/paginator';\nimport { MatSortModule, MatSort } from '@angular/material/sort';\nimport { CommonModule } from '@angular/common';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { RbCustomPipe } from '../../pipes/rb-custom.pipe';\nimport { MatPaginatorIntl } from '@angular/material/paginator';\nimport { PaginatorPtbrIntlService } from '../../services/translates/paginator-ptbr-intl.service';\nimport { ClientFilterService } from '../../services/filter/client-filter.service';\n\nexport interface CrudColumn {\n key: string;\n label: string;\n sortable?: boolean;\n pipe?: 'date' | 'currency' | 'cpf' | 'cnpj' | 'phone' | 'cep' | 'mask' | 'relativeTime' | 'lastModifiedBy';\n action?: string;\n // actions?: Array<CrudAction>;\n}\n\nexport interface CrudAction {\n label: string;\n icon?: string;\n action: string;\n}\n\nexport interface CrudActionEvent {\n action: string;\n row: any;\n}\n\nexport interface CrudFilter {\n key: string;\n label: string;\n type: 'text' | 'select' | 'date';\n options?: any[]; // Para selects\n}\n\n@Component({\n selector: 'rb-crud',\n templateUrl: './rb-crud.component.html',\n styleUrl: './rb-crud.component.scss',\n standalone: true,\n imports: [\n CommonModule,\n MatTableModule,\n MatMenuModule,\n MatInputModule,\n MatPaginatorModule,\n MatSortModule,\n MatIconModule,\n MatButtonModule,\n RbCustomPipe,\n ],\n providers: [\n { provide: MatPaginatorIntl, useClass: PaginatorPtbrIntlService }\n ]\n})\nexport class RbCrudComponent implements AfterViewInit, OnChanges {\n @Input() columns: CrudColumn[] = [];\n @Input() data: any[] = [];\n @Input() actionsMenu: CrudAction[] = [];\n @Input() pagination: boolean = true;\n @Input() pageSize: number = 10;\n @Input() infiniteScroll: boolean = false;\n @Input() textLineBreakable: boolean = false;\n @Input() filters: CrudFilter[] = [];\n\n @Output() actionClick = new EventEmitter<CrudActionEvent>();\n // @Output() filterChange = new EventEmitter<any>();\n @Output() pageChange = new EventEmitter<number>();\n\n @ViewChild(MatPaginator) paginator!: MatPaginator;\n @ViewChild(MatSort) sort!: MatSort;\n\n displayedColumns: string[] = [];\n dataSource = new MatTableDataSource<any>(this.data);\n filterText: Signal<string>;\n\n constructor(private clientFilterService: ClientFilterService) {\n this.filterText = this.clientFilterService.getSearchText();\n effect(() => {\n this.applyFilter();\n });\n }\n\n ngAfterViewInit() {\n this.dataSource.paginator = this.paginator;\n this.dataSource.sort = this.sort;\n this.defineSortRule();\n }\n\n ngOnChanges(): void {\n this.dataSource.data = this.data;\n this.displayedColumns = this.columns.map(col => col.key);\n if (this.actionsMenu.length) {\n this.displayedColumns.push('actions');\n }\n }\n\n defineSortRule() {\n this.dataSource.sortingDataAccessor = (item, property) => {\n if (item[property]?.date) {\n return new Date(item[property]?.date || 0).getTime();\n }\n return item[property];\n };\n }\n\n onActionClick(action: CrudAction, row: any): void {\n this.actionClick.emit({ action: action.action, row });\n }\n\n onClickCell(action: string, row: any): void {\n this.actionClick.emit({ action: action, row });\n }\n\n applyFilter() {\n this.dataSource.filter = this.filterText().trim().toLowerCase();\n }\n}\n","<div class=\"rb-crud-container\">\n <div class=\"rb-table-container\">\n <table mat-table [dataSource]=\"dataSource\" matSort class=\"rb-table\">\n <!-- Colunas Dinâmicas -->\n @for (column of columns; track column.key) {\n <ng-container [matColumnDef]=\"column.key\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.label }}\n </th>\n <td mat-cell *matCellDef=\"let row\"\n [class.rb-clickable-cell]=\"column.action\"\n [class.rb-break-line-cell]=\"textLineBreakable\"\n (click)=\"column.action ? onClickCell(column.action, row) : null\"\n title=\"{{ column.pipe ? (row[column.key] | rbCustomPipe:column.pipe) : row[column.key] }}\">\n @if (column.pipe) {\n {{ row[column.key] | rbCustomPipe:column.pipe }}\n } @else {\n {{ row[column.key] }}\n }\n </td>\n </ng-container>\n }\n\n <!-- Coluna de Ações -->\n @if (actionsMenu.length) {\n <ng-container matColumnDef=\"actions\" stickyEnd>\n <th mat-header-cell *matHeaderCellDef> Ações </th>\n <td mat-cell *matCellDef=\"let row\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon>{{ 'more_vert' }}</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n @for (action of actionsMenu; track action.label) {\n <button mat-menu-item (click)=\"onActionClick(action, row)\">\n @if (action.icon) {\n <mat-icon>{{ action.icon }}</mat-icon>\n }\n {{ action.label }}\n </button>\n }\n </mat-menu>\n </td>\n </ng-container>\n }\n\n <!-- Cabeçalho e Corpo da Tabela -->\n <thead>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n </thead>\n <tbody>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </tbody>\n </table>\n </div>\n\n @if (dataSource.data.length === 0) {\n <div class=\"empty-message\">\n Nenhum dado disponível no momento.\n </div>\n }\n</div>\n\n<!-- Paginação -->\n@if (pagination) {\n <mat-paginator #paginator\n class=\"rb-paginator\"\n [pageSize]=\"pageSize\"\n (page)=\"pageChange.emit($event.pageIndex)\"\n [showFirstLastButtons]=\"true\"\n [pageSizeOptions]=\"[10,25,50,100]\"\n aria-label=\"Selecione a página\">\n </mat-paginator>\n}\n","import { Component, Input, Output, signal, EventEmitter } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { ClientFilterService } from '../../services/filter/client-filter.service';\nimport { RbDynamicButtonDirective } from '../../directives/rb-dynamic-button.directive';\n\nexport interface ButtonSettings {\n label: string;\n icon?: string;\n action: string;\n directive?: string;\n}\nexport interface ButtonActionEvent {\n action: string;\n}\n@Component({\n selector: 'rb-filter',\n standalone: true,\n imports: [\n CommonModule,\n MatFormFieldModule,\n MatInputModule,\n MatIconModule,\n MatButtonModule,\n RbDynamicButtonDirective,\n ],\n templateUrl: './rb-filter.component.html',\n styleUrl: './rb-filter.component.scss'\n})\nexport class RbFilterComponent {\n @Input() searchPlaceholder: string = 'Digite para pesquisar...';\n @Input() buttonSettings: ButtonSettings[] = [];\n @Input() iconButton: string = 'add';\n @Input() titleButton: string = 'Adicionar';\n @Output() buttonClick = new EventEmitter<ButtonActionEvent>();\n\n searchText = signal<string>('');\n\n constructor(private clientFilterService: ClientFilterService) {\n }\n\n onSearchChange(event: Event) {\n const value = (event.target as HTMLInputElement).value;\n this.searchText.set(value);\n this.clientFilterService.setSearchText(value);\n }\n\n onClickButton(action: ButtonSettings) {\n this.buttonClick.emit(action);\n }\n}\n","<div class=\"rb-filter-container\">\n <div class=\"rb-flex-line-space-between\">\n <div class=\"rb-flex-align-items-center\">\n @for (btn of buttonSettings; track btn.label) {\n <button mat-button [rbDynamicButton]=\"btn.directive || null\" (click)=\"onClickButton(btn)\">\n @if (btn.icon) {\n <mat-icon>{{ btn.icon }}</mat-icon>\n }\n {{ btn.label }}\n </button>\n }\n </div>\n\n <div class=\"rb-search-box rb-flex-align-items-center\">\n <mat-form-field class=\"rb-search-field\">\n <mat-label>Pesquisar</mat-label>\n <input\n matInput\n [value]=\"searchText()\"\n (input)=\"onSearchChange($event)\"\n placeholder={{searchPlaceholder}}\n />\n <mat-icon matPrefix>search</mat-icon>\n </mat-form-field>\n </div>\n </div>\n</div>\n\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'rb-content-box',\n imports: [],\n templateUrl: './rb-content-box.component.html',\n styleUrl: './rb-content-box.component.scss'\n})\nexport class RbContentBoxComponent {\n\n}\n","<div class=\"rb-content-box\">\n <ng-content></ng-content>\n</div>\n","/*\n * Public API Surface of rb-angular-components\n */\n\nexport * from './lib/pipes/rb-custom.pipe';\nexport * from './lib/directives/rb-dynamic-button.directive';\nexport * from './lib/components/rb-crud/rb-crud.component';\nexport * from './lib/components/rb-filter/rb-filter.component';\nexport * from './lib/components/rb-content-box/rb-content-box.component';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.ClientFilterService","i2","i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;MAMa,YAAY,CAAA;IAEvB,SAAS,CAAC,KAAU,EAAE,IAAY,EAAA;QAChC,QAAQ,IAAI;AACV,YAAA,KAAK,MAAM;AACT,gBAAA,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;AAClC,YAAA,KAAK,UAAU;AACb,gBAAA,OAAO,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC;AACtC,YAAA,KAAK,KAAK;AACR,gBAAA,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;AACjC,YAAA,KAAK,MAAM;AACT,gBAAA,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;AAClC,YAAA,KAAK,OAAO;AACV,gBAAA,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC;AACnC,YAAA,KAAK,KAAK;AACR,gBAAA,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;AACjC,YAAA,KAAK,MAAM;AACT,gBAAA,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;AAClC,YAAA,KAAK,cAAc;AACjB,gBAAA,OAAO,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC;AAC1C,YAAA,KAAK,gBAAgB;AACnB,gBAAA,OAAO,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC;AAC1C,YAAA;AACE,gBAAA,OAAO,KAAK;;;AAIlB,IAAA,aAAa,CAAC,KAAU,EAAA;AACtB,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAO,EAAE;AACrB,QAAA,O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qB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,0ECRlC,uEAGA,EAAA,MAAA,EAAA,CAAA,oNAAA,CAAA,EAAA,CAAA;;2FDKa,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,WACjB,EAAE,EAAA,QAAA,EAAA,uEAAA,EAAA,MAAA,EAAA,CAAA,oNAAA,CAAA,EAAA;;;AEJb;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@rubeusteam/rb-angular-components" />
5
+ export * from './public-api';
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class RbContentBoxComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<RbContentBoxComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<RbContentBoxComponent, "rb-content-box", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,55 @@
1
+ import { EventEmitter, AfterViewInit, OnChanges, Signal } from '@angular/core';
2
+ import { MatTableDataSource } from '@angular/material/table';
3
+ import { MatPaginator } from '@angular/material/paginator';
4
+ import { MatSort } from '@angular/material/sort';
5
+ import { ClientFilterService } from '../../services/filter/client-filter.service';
6
+ import * as i0 from "@angular/core";
7
+ export interface CrudColumn {
8
+ key: string;
9
+ label: string;
10
+ sortable?: boolean;
11
+ pipe?: 'date' | 'currency' | 'cpf' | 'cnpj' | 'phone' | 'cep' | 'mask' | 'relativeTime' | 'lastModifiedBy';
12
+ action?: string;
13
+ }
14
+ export interface CrudAction {
15
+ label: string;
16
+ icon?: string;
17
+ action: string;
18
+ }
19
+ export interface CrudActionEvent {
20
+ action: string;
21
+ row: any;
22
+ }
23
+ export interface CrudFilter {
24
+ key: string;
25
+ label: string;
26
+ type: 'text' | 'select' | 'date';
27
+ options?: any[];
28
+ }
29
+ export declare class RbCrudComponent implements AfterViewInit, OnChanges {
30
+ private clientFilterService;
31
+ columns: CrudColumn[];
32
+ data: any[];
33
+ actionsMenu: CrudAction[];
34
+ pagination: boolean;
35
+ pageSize: number;
36
+ infiniteScroll: boolean;
37
+ textLineBreakable: boolean;
38
+ filters: CrudFilter[];
39
+ actionClick: EventEmitter<CrudActionEvent>;
40
+ pageChange: EventEmitter<number>;
41
+ paginator: MatPaginator;
42
+ sort: MatSort;
43
+ displayedColumns: string[];
44
+ dataSource: MatTableDataSource<any, MatPaginator>;
45
+ filterText: Signal<string>;
46
+ constructor(clientFilterService: ClientFilterService);
47
+ ngAfterViewInit(): void;
48
+ ngOnChanges(): void;
49
+ defineSortRule(): void;
50
+ onActionClick(action: CrudAction, row: any): void;
51
+ onClickCell(action: string, row: any): void;
52
+ applyFilter(): void;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<RbCrudComponent, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<RbCrudComponent, "rb-crud", never, { "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; "actionsMenu": { "alias": "actionsMenu"; "required": false; }; "pagination": { "alias": "pagination"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "infiniteScroll": { "alias": "infiniteScroll"; "required": false; }; "textLineBreakable": { "alias": "textLineBreakable"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; }, { "actionClick": "actionClick"; "pageChange": "pageChange"; }, never, never, true, never>;
55
+ }
@@ -0,0 +1,26 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { ClientFilterService } from '../../services/filter/client-filter.service';
3
+ import * as i0 from "@angular/core";
4
+ export interface ButtonSettings {
5
+ label: string;
6
+ icon?: string;
7
+ action: string;
8
+ directive?: string;
9
+ }
10
+ export interface ButtonActionEvent {
11
+ action: string;
12
+ }
13
+ export declare class RbFilterComponent {
14
+ private clientFilterService;
15
+ searchPlaceholder: string;
16
+ buttonSettings: ButtonSettings[];
17
+ iconButton: string;
18
+ titleButton: string;
19
+ buttonClick: EventEmitter<ButtonActionEvent>;
20
+ searchText: import("@angular/core").WritableSignal<string>;
21
+ constructor(clientFilterService: ClientFilterService);
22
+ onSearchChange(event: Event): void;
23
+ onClickButton(action: ButtonSettings): void;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<RbFilterComponent, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<RbFilterComponent, "rb-filter", never, { "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; }; "buttonSettings": { "alias": "buttonSettings"; "required": false; }; "iconButton": { "alias": "iconButton"; "required": false; }; "titleButton": { "alias": "titleButton"; "required": false; }; }, { "buttonClick": "buttonClick"; }, never, never, true, never>;
26
+ }
@@ -0,0 +1,17 @@
1
+ import { ElementRef, Renderer2, OnChanges, SimpleChanges } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RbDynamicButtonDirective implements OnChanges {
4
+ private el;
5
+ private renderer;
6
+ set buttonType(value: string | null);
7
+ private _buttonType;
8
+ buttonTypes: Record<string, {
9
+ directive: string;
10
+ classes: string[];
11
+ }>;
12
+ constructor(el: ElementRef, renderer: Renderer2);
13
+ ngOnChanges(changes: SimpleChanges): void;
14
+ private renderButtons;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<RbDynamicButtonDirective, never>;
16
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RbDynamicButtonDirective, "[rbDynamicButton]", never, { "buttonType": { "alias": "rbDynamicButton"; "required": false; }; }, {}, never, never, true, never>;
17
+ }
@@ -0,0 +1,19 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RbCustomPipe implements PipeTransform {
4
+ transform(value: any, type: string): any;
5
+ dateTransform(value: any): any;
6
+ currencyTransform(value: any): any;
7
+ cpfTransform(value: any): any;
8
+ cnpjTransform(value: any): any;
9
+ phoneTransform(value: any): any;
10
+ cepTransform(value: any): any;
11
+ maskTransform(value: any): any;
12
+ relativeTimeTransform(value: any): any;
13
+ lastModifiedTransform(value: {
14
+ date: string;
15
+ author: string;
16
+ }): string;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<RbCustomPipe, never>;
18
+ static ɵpipe: i0.ɵɵPipeDeclaration<RbCustomPipe, "rbCustomPipe", true>;
19
+ }
@@ -0,0 +1,9 @@
1
+ import { Signal } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ClientFilterService {
4
+ private searchText;
5
+ setSearchText(text: string): void;
6
+ getSearchText(): Signal<string>;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClientFilterService, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<ClientFilterService>;
9
+ }
@@ -0,0 +1,12 @@
1
+ import { MatPaginatorIntl } from '@angular/material/paginator';
2
+ import * as i0 from "@angular/core";
3
+ export declare class PaginatorPtbrIntlService extends MatPaginatorIntl {
4
+ itemsPerPageLabel: string;
5
+ nextPageLabel: string;
6
+ previousPageLabel: string;
7
+ firstPageLabel: string;
8
+ lastPageLabel: string;
9
+ getRangeLabel: (page: number, pageSize: number, length: number) => string;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<PaginatorPtbrIntlService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<PaginatorPtbrIntlService>;
12
+ }
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@rubeusteam/rb-angular-components",
3
+ "version": "0.0.1",
4
+ "description": "Componentes Angular reutilizáveis da Rubeus",
5
+ "license": "MIT",
6
+ "keywords": [
7
+ "angular",
8
+ "componentes",
9
+ "rubeus",
10
+ "material"
11
+ ],
12
+ "peerDependencies": {
13
+ "@angular/common": "^19.1.0",
14
+ "@angular/core": "^19.1.0"
15
+ },
16
+ "dependencies": {
17
+ "tslib": "^2.3.0"
18
+ },
19
+ "sideEffects": false,
20
+ "module": "fesm2022/rubeusteam-rb-angular-components.mjs",
21
+ "typings": "index.d.ts",
22
+ "exports": {
23
+ "./package.json": {
24
+ "default": "./package.json"
25
+ },
26
+ ".": {
27
+ "types": "./index.d.ts",
28
+ "default": "./fesm2022/rubeusteam-rb-angular-components.mjs"
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,5 @@
1
+ export * from './lib/pipes/rb-custom.pipe';
2
+ export * from './lib/directives/rb-dynamic-button.directive';
3
+ export * from './lib/components/rb-crud/rb-crud.component';
4
+ export * from './lib/components/rb-filter/rb-filter.component';
5
+ export * from './lib/components/rb-content-box/rb-content-box.component';