@fylib/adapter-angular 0.2.5 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/components/accordion.component.d.ts +3 -0
  2. package/dist/components/accordion.component.js +105 -194
  3. package/dist/components/badge.component.d.ts +3 -0
  4. package/dist/components/badge.component.js +30 -81
  5. package/dist/components/button.component.d.ts +3 -0
  6. package/dist/components/button.component.js +79 -194
  7. package/dist/components/card.component.d.ts +3 -0
  8. package/dist/components/card.component.js +76 -147
  9. package/dist/components/chart.component.d.ts +3 -0
  10. package/dist/components/chart.component.js +81 -141
  11. package/dist/components/icon.component.d.ts +3 -0
  12. package/dist/components/icon.component.js +39 -62
  13. package/dist/components/input.component.d.ts +3 -0
  14. package/dist/components/input.component.js +120 -221
  15. package/dist/components/modal.component.d.ts +3 -0
  16. package/dist/components/modal.component.js +121 -247
  17. package/dist/components/nav-link.component.d.ts +3 -0
  18. package/dist/components/nav-link.component.js +43 -92
  19. package/dist/components/notification-menu.component.d.ts +3 -0
  20. package/dist/components/notification-menu.component.js +205 -367
  21. package/dist/components/select.component.d.ts +3 -0
  22. package/dist/components/select.component.js +116 -188
  23. package/dist/components/table.component.d.ts +3 -0
  24. package/dist/components/table.component.js +235 -332
  25. package/dist/components/text.component.d.ts +3 -0
  26. package/dist/components/text.component.js +22 -32
  27. package/dist/components/toast.component.d.ts +3 -0
  28. package/dist/components/toast.component.js +58 -163
  29. package/dist/directives/animation.directive.d.ts +3 -0
  30. package/dist/directives/animation.directive.js +15 -22
  31. package/dist/directives/theme-vars.directive.d.ts +3 -0
  32. package/dist/directives/theme-vars.directive.js +12 -19
  33. package/dist/directives/wallpaper.directive.d.ts +3 -0
  34. package/dist/directives/wallpaper.directive.js +19 -31
  35. package/dist/layouts/layout.component.d.ts +3 -0
  36. package/dist/layouts/layout.component.js +36 -130
  37. package/dist/layouts/slot.component.d.ts +3 -0
  38. package/dist/layouts/slot.component.js +240 -596
  39. package/dist/services/fylib.service.d.ts +3 -0
  40. package/dist/services/fylib.service.js +19 -26
  41. package/dist/services/notification.service.d.ts +3 -0
  42. package/dist/services/notification.service.js +13 -16
  43. package/dist/services/sse.service.d.ts +3 -0
  44. package/dist/services/sse.service.js +11 -18
  45. package/dist/services/webclient.service.d.ts +3 -0
  46. package/dist/services/webclient.service.js +9 -12
  47. package/package.json +7 -6
@@ -1,12 +1,3 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
1
  import { Component, Input, Output, EventEmitter, ViewEncapsulation, inject, ContentChild, TemplateRef } from '@angular/core';
11
2
  import { CommonModule } from '@angular/common';
12
3
  import { TableDefinition } from '@fylib/catalog';
@@ -15,7 +6,9 @@ import { BaseFyComponent } from '../base/base-component';
15
6
  import { FyIconComponent } from './icon.component';
16
7
  import { FyInputComponent } from './input.component';
17
8
  import { FyButtonComponent } from './button.component';
18
- let FyTableComponent = class FyTableComponent extends BaseFyComponent {
9
+ import * as i0 from "@angular/core";
10
+ import * as i1 from "@angular/common";
11
+ export class FyTableComponent extends BaseFyComponent {
19
12
  constructor() {
20
13
  super(inject(FyLibService), 'fy-table');
21
14
  this.data = TableDefinition.defaultProps.data;
@@ -140,130 +133,9 @@ let FyTableComponent = class FyTableComponent extends BaseFyComponent {
140
133
  event.stopPropagation();
141
134
  action.onClick?.(row);
142
135
  }
143
- };
144
- __decorate([
145
- Input(),
146
- __metadata("design:type", Array)
147
- ], FyTableComponent.prototype, "data", void 0);
148
- __decorate([
149
- Input(),
150
- __metadata("design:type", Array)
151
- ], FyTableComponent.prototype, "columns", void 0);
152
- __decorate([
153
- Input(),
154
- __metadata("design:type", String)
155
- ], FyTableComponent.prototype, "title", void 0);
156
- __decorate([
157
- Input(),
158
- __metadata("design:type", String)
159
- ], FyTableComponent.prototype, "subtitle", void 0);
160
- __decorate([
161
- Input(),
162
- __metadata("design:type", String)
163
- ], FyTableComponent.prototype, "footer", void 0);
164
- __decorate([
165
- Input(),
166
- __metadata("design:type", Boolean)
167
- ], FyTableComponent.prototype, "loading", void 0);
168
- __decorate([
169
- Input(),
170
- __metadata("design:type", Boolean)
171
- ], FyTableComponent.prototype, "showHeader", void 0);
172
- __decorate([
173
- Input(),
174
- __metadata("design:type", Boolean)
175
- ], FyTableComponent.prototype, "showFooter", void 0);
176
- __decorate([
177
- Input(),
178
- __metadata("design:type", Boolean)
179
- ], FyTableComponent.prototype, "showPagination", void 0);
180
- __decorate([
181
- Input(),
182
- __metadata("design:type", Boolean)
183
- ], FyTableComponent.prototype, "showSearch", void 0);
184
- __decorate([
185
- Input(),
186
- __metadata("design:type", Number)
187
- ], FyTableComponent.prototype, "currentPage", void 0);
188
- __decorate([
189
- Input(),
190
- __metadata("design:type", Number)
191
- ], FyTableComponent.prototype, "pageSize", void 0);
192
- __decorate([
193
- Input(),
194
- __metadata("design:type", Number)
195
- ], FyTableComponent.prototype, "totalItems", void 0);
196
- __decorate([
197
- Input(),
198
- __metadata("design:type", Array)
199
- ], FyTableComponent.prototype, "searchTargets", void 0);
200
- __decorate([
201
- Input(),
202
- __metadata("design:type", Array)
203
- ], FyTableComponent.prototype, "actions", void 0);
204
- __decorate([
205
- Input(),
206
- __metadata("design:type", Boolean)
207
- ], FyTableComponent.prototype, "rowClickable", void 0);
208
- __decorate([
209
- Input(),
210
- __metadata("design:type", Object)
211
- ], FyTableComponent.prototype, "variant", void 0);
212
- __decorate([
213
- Input(),
214
- __metadata("design:type", Boolean)
215
- ], FyTableComponent.prototype, "stickyHeader", void 0);
216
- __decorate([
217
- Input(),
218
- __metadata("design:type", Boolean)
219
- ], FyTableComponent.prototype, "scrollable", void 0);
220
- __decorate([
221
- Input(),
222
- __metadata("design:type", String)
223
- ], FyTableComponent.prototype, "maxHeight", void 0);
224
- __decorate([
225
- Input(),
226
- __metadata("design:type", Object)
227
- ], FyTableComponent.prototype, "activeAnimations", void 0);
228
- __decorate([
229
- Input(),
230
- __metadata("design:type", Object)
231
- ], FyTableComponent.prototype, "activeEffects", void 0);
232
- __decorate([
233
- Input(),
234
- __metadata("design:type", Object)
235
- ], FyTableComponent.prototype, "customStyles", void 0);
236
- __decorate([
237
- Output(),
238
- __metadata("design:type", Object)
239
- ], FyTableComponent.prototype, "fySearch", void 0);
240
- __decorate([
241
- Output(),
242
- __metadata("design:type", Object)
243
- ], FyTableComponent.prototype, "fySort", void 0);
244
- __decorate([
245
- Output(),
246
- __metadata("design:type", Object)
247
- ], FyTableComponent.prototype, "fyPageChange", void 0);
248
- __decorate([
249
- Output(),
250
- __metadata("design:type", Object)
251
- ], FyTableComponent.prototype, "fyRowClick", void 0);
252
- __decorate([
253
- ContentChild('cellTemplate'),
254
- __metadata("design:type", TemplateRef)
255
- ], FyTableComponent.prototype, "cellTemplate", void 0);
256
- FyTableComponent = __decorate([
257
- Component({
258
- selector: 'fy-table',
259
- standalone: true,
260
- imports: [
261
- CommonModule,
262
- FyIconComponent,
263
- FyInputComponent,
264
- FyButtonComponent
265
- ],
266
- template: `
136
+ }
137
+ FyTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FyTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
138
+ FyTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: FyTableComponent, isStandalone: true, selector: "fy-table", inputs: { data: "data", columns: "columns", title: "title", subtitle: "subtitle", footer: "footer", loading: "loading", showHeader: "showHeader", showFooter: "showFooter", showPagination: "showPagination", showSearch: "showSearch", currentPage: "currentPage", pageSize: "pageSize", totalItems: "totalItems", searchTargets: "searchTargets", actions: "actions", rowClickable: "rowClickable", variant: "variant", stickyHeader: "stickyHeader", scrollable: "scrollable", maxHeight: "maxHeight", activeAnimations: "activeAnimations", activeEffects: "activeEffects", customStyles: "customStyles" }, outputs: { fySearch: "fySearch", fySort: "fySort", fyPageChange: "fyPageChange", fyRowClick: "fyRowClick" }, queries: [{ propertyName: "cellTemplate", first: true, predicate: ["cellTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
267
139
  <div
268
140
  class="fy-table-container"
269
141
  [class.fy-table--scrollable]="scrollable"
@@ -434,210 +306,241 @@ FyTableComponent = __decorate([
434
306
  </footer>
435
307
  }
436
308
  </div>
437
- `,
438
- styles: [`
439
- .fy-table-container {
440
- display: flex;
441
- flex-direction: column;
442
- width: 100%;
443
- background: var(--fy-effects-table-background, #fff);
444
- border: 1px solid var(--fy-effects-table-borderColor, rgba(0,0,0,0.08));
445
- border-radius: var(--fy-borderRadius-lg, 12px);
446
- overflow: hidden;
447
- }
448
-
449
- .fy-table__header {
450
- padding: var(--fy-spacing-md);
451
- display: flex;
452
- justify-content: space-between;
453
- align-items: center;
454
- border-bottom: 1px solid var(--fy-effects-table-borderColor);
455
- gap: 16px;
456
- flex-wrap: wrap;
457
- }
458
-
459
- .fy-table__header-tools {
460
- display: flex;
461
- gap: 12px;
462
- align-items: center;
463
- flex: 1;
464
- justify-content: flex-end;
465
- }
466
-
467
- .fy-table__header-tools ::ng-deep [fy-table-tools] {
468
- display: flex;
469
- gap: 8px;
470
- }
471
-
472
- .fy-table__actions-group {
473
- display: flex;
474
- gap: 6px;
475
- }
476
-
477
- @media (max-width: 640px) {
478
- .fy-table__header-tools {
479
- justify-content: flex-start;
480
- }
309
+ `, isInline: true, styles: ["\n .fy-table-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n background: var(--fy-effects-table-background, #fff);\n border: 1px solid var(--fy-effects-table-borderColor, rgba(0,0,0,0.08));\n border-radius: var(--fy-borderRadius-lg, 12px);\n overflow: hidden;\n }\n\n .fy-table__header {\n padding: var(--fy-spacing-md);\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--fy-effects-table-borderColor);\n gap: 16px;\n flex-wrap: wrap;\n }\n\n .fy-table__header-tools {\n display: flex;\n gap: 12px;\n align-items: center;\n flex: 1;\n justify-content: flex-end;\n }\n\n .fy-table__header-tools ::ng-deep [fy-table-tools] {\n display: flex;\n gap: 8px;\n }\n\n .fy-table__actions-group {\n display: flex;\n gap: 6px;\n }\n\n @media (max-width: 640px) {\n .fy-table__header-tools {\n justify-content: flex-start;\n }\n \n .fy-table__header-tools ::ng-deep [fy-table-tools] {\n width: 100%;\n overflow-x: auto;\n padding-bottom: 4px;\n }\n\n .fy-table__header-tools ::ng-deep [fy-table-tools] fy-button .fy-button__label {\n display: none;\n }\n\n .fy-table__header-tools ::ng-deep [fy-table-tools] fy-button .fy-button {\n padding: var(--fy-spacing-sm);\n }\n }\n\n .fy-table__title {\n margin: 0;\n font-size: var(--fy-typography-fontSize-lg);\n font-weight: var(--fy-typography-fontWeight-bold);\n }\n\n .fy-table__subtitle {\n margin: 4px 0 0;\n font-size: var(--fy-typography-fontSize-sm);\n color: var(--fy-colors-secondary);\n }\n\n .fy-table__header-tools {\n display: flex;\n gap: 12px;\n align-items: center;\n flex: 1;\n justify-content: flex-end;\n }\n\n .fy-table__search {\n max-width: 300px;\n width: 100%;\n }\n\n .fy-table__content {\n width: 100%;\n overflow-x: auto;\n }\n\n .fy-table {\n width: 100%;\n border-collapse: collapse;\n text-align: left;\n font-size: var(--fy-typography-fontSize-md);\n }\n\n .fy-table th {\n padding: var(--fy-spacing-md);\n background: var(--fy-effects-table-headerBackground, rgba(0,0,0,0.02));\n color: var(--fy-colors-text);\n font-weight: var(--fy-typography-fontWeight-bold);\n border-bottom: 1px solid var(--fy-effects-table-borderColor);\n white-space: nowrap;\n }\n\n .fy-table td {\n padding: var(--fy-spacing-md);\n border-bottom: 1px solid var(--fy-effects-table-borderColor);\n color: var(--fy-colors-text);\n }\n\n .fy-table__row:last-child td {\n border-bottom: none;\n }\n\n .fy-table__row:hover {\n background: var(--fy-effects-table-rowHoverBackground, rgba(0,0,0,0.01));\n }\n\n .fy-table__row--clickable {\n cursor: pointer;\n }\n\n .fy-table--striped tbody tr:nth-child(even) {\n background: var(--fy-effects-table-stripedBackground, rgba(0,0,0,0.005));\n }\n\n .fy-table--bordered td, \n .fy-table--bordered th {\n border: 1px solid var(--fy-effects-table-borderColor);\n }\n\n .fy-table--compact td,\n .fy-table--compact th {\n padding: var(--fy-spacing-sm);\n }\n\n .fy-table__th-content {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .fy-table__th--sortable {\n cursor: pointer;\n user-select: none;\n }\n\n .fy-table__th--sortable:hover {\n background: rgba(0,0,0,0.04);\n }\n\n .fy-table__footer {\n padding: var(--fy-spacing-md);\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-top: 1px solid var(--fy-effects-table-borderColor);\n background: var(--fy-effects-table-headerBackground);\n }\n\n .fy-table__pagination {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n\n .fy-table__page-info {\n font-size: var(--fy-typography-fontSize-sm);\n font-weight: var(--fy-typography-fontWeight-bold);\n }\n\n .fy-table__loader {\n width: 24px;\n height: 24px;\n border: 3px solid var(--fy-colors-primary);\n border-bottom-color: transparent;\n border-radius: 50%;\n margin: 24px auto;\n animation: fy-spin 0.8s linear infinite;\n }\n\n @keyframes fy-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n\n @media (max-width: 640px) {\n .fy-table__header {\n flex-direction: column;\n align-items: stretch;\n }\n .fy-table__search {\n max-width: 100%;\n }\n .fy-table__footer {\n flex-direction: column;\n gap: 16px;\n }\n }\n "], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FyIconComponent, selector: "fy-icon", inputs: ["name", "size", "color", "strokeWidth", "variant", "set"] }, { kind: "component", type: FyInputComponent, selector: "fy-input", inputs: ["value", "placeholder", "type", "disabled", "readonly", "mask", "showPasswordToggle", "iconLeft", "iconRight", "iconLeftName", "iconRightName", "size", "status", "activeAnimations", "activeEffects", "customStyles", "focusAnimation", "successAnimation", "errorAnimation", "focusEffect", "successEffect", "errorEffect", "onInput", "onChange", "onFocus", "onBlur"], outputs: ["fyInput", "fyChange", "fyFocus", "fyBlur"] }, { kind: "component", type: FyButtonComponent, selector: "fy-button", inputs: ["label", "variant", "size", "disabled", "loading", "icon", "iconName", "iconSet", "activeAnimations", "activeEffects", "customStyles", "hoverAnimation", "clickAnimation", "successAnimation", "errorAnimation", "hoverEffect", "clickEffect", "successEffect", "errorEffect"], outputs: ["fyClick"] }], encapsulation: i0.ViewEncapsulation.None });
310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FyTableComponent, decorators: [{
311
+ type: Component,
312
+ args: [{ selector: 'fy-table', standalone: true, imports: [
313
+ CommonModule,
314
+ FyIconComponent,
315
+ FyInputComponent,
316
+ FyButtonComponent
317
+ ], template: `
318
+ <div
319
+ class="fy-table-container"
320
+ [class.fy-table--scrollable]="scrollable"
321
+ [class.fy-table--sticky]="stickyHeader"
322
+ [class]="composeAnimClasses(animationClassSuffix)"
323
+ [style]="getHostStyles(customStyles)"
481
324
 
482
- .fy-table__header-tools ::ng-deep [fy-table-tools] {
483
- width: 100%;
484
- overflow-x: auto;
485
- padding-bottom: 4px;
486
- }
487
-
488
- .fy-table__header-tools ::ng-deep [fy-table-tools] fy-button .fy-button__label {
489
- display: none;
490
- }
325
+ >
326
+ <!-- Header / Search / Title -->
327
+ @if (showHeader || title || showSearch) {
328
+ <header class="fy-table__header">
329
+ @if (title || subtitle) {
330
+ <div class="fy-table__header-main">
331
+ @if (title) { <h3 class="fy-table__title">{{ title }}</h3> }
332
+ @if (subtitle) { <p class="fy-table__subtitle">{{ subtitle }}</p> }
333
+ </div>
334
+ }
491
335
 
492
- .fy-table__header-tools ::ng-deep [fy-table-tools] fy-button .fy-button {
493
- padding: var(--fy-spacing-sm);
336
+ <div class="fy-table__header-tools">
337
+ @if (showSearch) {
338
+ <div class="fy-table__search">
339
+ <fy-input
340
+ placeholder="Pesquisar..."
341
+ iconLeftName="search"
342
+ size="sm"
343
+ (fyInput)="onSearch($event)"
344
+ ></fy-input>
345
+ </div>
346
+ }
347
+ <ng-content select="[fy-table-tools]"></ng-content>
348
+ </div>
349
+ </header>
494
350
  }
495
- }
496
-
497
- .fy-table__title {
498
- margin: 0;
499
- font-size: var(--fy-typography-fontSize-lg);
500
- font-weight: var(--fy-typography-fontWeight-bold);
501
- }
502
-
503
- .fy-table__subtitle {
504
- margin: 4px 0 0;
505
- font-size: var(--fy-typography-fontSize-sm);
506
- color: var(--fy-colors-secondary);
507
- }
508
-
509
- .fy-table__header-tools {
510
- display: flex;
511
- gap: 12px;
512
- align-items: center;
513
- flex: 1;
514
- justify-content: flex-end;
515
- }
516
-
517
- .fy-table__search {
518
- max-width: 300px;
519
- width: 100%;
520
- }
521
-
522
- .fy-table__content {
523
- width: 100%;
524
- overflow-x: auto;
525
- }
526
351
 
527
- .fy-table {
528
- width: 100%;
529
- border-collapse: collapse;
530
- text-align: left;
531
- font-size: var(--fy-typography-fontSize-md);
532
- }
533
-
534
- .fy-table th {
535
- padding: var(--fy-spacing-md);
536
- background: var(--fy-effects-table-headerBackground, rgba(0,0,0,0.02));
537
- color: var(--fy-colors-text);
538
- font-weight: var(--fy-typography-fontWeight-bold);
539
- border-bottom: 1px solid var(--fy-effects-table-borderColor);
540
- white-space: nowrap;
541
- }
542
-
543
- .fy-table td {
544
- padding: var(--fy-spacing-md);
545
- border-bottom: 1px solid var(--fy-effects-table-borderColor);
546
- color: var(--fy-colors-text);
547
- }
548
-
549
- .fy-table__row:last-child td {
550
- border-bottom: none;
551
- }
552
-
553
- .fy-table__row:hover {
554
- background: var(--fy-effects-table-rowHoverBackground, rgba(0,0,0,0.01));
555
- }
556
-
557
- .fy-table__row--clickable {
558
- cursor: pointer;
559
- }
560
-
561
- .fy-table--striped tbody tr:nth-child(even) {
562
- background: var(--fy-effects-table-stripedBackground, rgba(0,0,0,0.005));
563
- }
564
-
565
- .fy-table--bordered td,
566
- .fy-table--bordered th {
567
- border: 1px solid var(--fy-effects-table-borderColor);
568
- }
569
-
570
- .fy-table--compact td,
571
- .fy-table--compact th {
572
- padding: var(--fy-spacing-sm);
573
- }
574
-
575
- .fy-table__th-content {
576
- display: flex;
577
- align-items: center;
578
- gap: 8px;
579
- }
580
-
581
- .fy-table__th--sortable {
582
- cursor: pointer;
583
- user-select: none;
584
- }
585
-
586
- .fy-table__th--sortable:hover {
587
- background: rgba(0,0,0,0.04);
588
- }
589
-
590
- .fy-table__footer {
591
- padding: var(--fy-spacing-md);
592
- display: flex;
593
- justify-content: space-between;
594
- align-items: center;
595
- border-top: 1px solid var(--fy-effects-table-borderColor);
596
- background: var(--fy-effects-table-headerBackground);
597
- }
598
-
599
- .fy-table__pagination {
600
- display: flex;
601
- align-items: center;
602
- gap: 12px;
603
- }
352
+ <!-- Table Content -->
353
+ <div class="fy-table__content" [style.maxHeight]="maxHeight">
354
+ <table class="fy-table" [class]="'fy-table--' + variant">
355
+ <thead>
356
+ <tr>
357
+ @for (col of visibleColumns; track col.key) {
358
+ <th
359
+ [style.width]="col.width"
360
+ [class.fy-table__th--sortable]="col.sortable"
361
+ [style.textAlign]="col.align || 'left'"
362
+ (click)="onSort(col)"
363
+ >
364
+ <div class="fy-table__th-content">
365
+ @if (col.iconName) {
366
+ <fy-icon
367
+ [name]="col.iconName"
368
+ [set]="col.iconSet"
369
+ class="fy-table__th-icon"
370
+ ></fy-icon>
371
+ }
372
+ <span>{{ col.label }}</span>
373
+ @if (col.sortable) {
374
+ <fy-icon
375
+ [name]="getSortIcon(col)"
376
+ class="fy-table__sort-icon"
377
+ ></fy-icon>
378
+ }
379
+ </div>
380
+ </th>
381
+ }
382
+ @if (actions && actions.length > 0) {
383
+ <th class="fy-table__th--actions">
384
+ Ações
385
+ </th>
386
+ }
387
+ </tr>
388
+ </thead>
389
+ <tbody>
390
+ @if (loading) {
391
+ <tr class="fy-table__row--loading">
392
+ <td [attr.colspan]="totalColumns" class="fy-table__td--loading">
393
+ <div class="fy-table__loader"></div>
394
+ </td>
395
+ </tr>
396
+ }
397
+
398
+ @if (!loading && (!data || data.length === 0)) {
399
+ <tr class="fy-table__row--empty">
400
+ <td [attr.colspan]="totalColumns" class="fy-table__td--empty">
401
+ Nenhum registro encontrado.
402
+ </td>
403
+ </tr>
404
+ }
604
405
 
605
- .fy-table__page-info {
606
- font-size: var(--fy-typography-fontSize-sm);
607
- font-weight: var(--fy-typography-fontWeight-bold);
608
- }
406
+ @if (!loading) {
407
+ @for (row of paginatedData; track $index) {
408
+ <tr
409
+ class="fy-table__row"
410
+ [class.fy-table__row--clickable]="rowClickable"
411
+ (click)="onRowClick(row)"
412
+ >
413
+ @for (col of visibleColumns; track col.key) {
414
+ <td
415
+ [style.textAlign]="col.align || 'left'"
416
+ >
417
+ <!-- Custom Cell Template -->
418
+ @if (cellTemplate) {
419
+ <ng-container *ngTemplateOutlet="cellTemplate; context: { $implicit: row, column: col }"></ng-container>
420
+ } @else {
421
+ {{ row[col.key] }}
422
+ }
423
+ </td>
424
+ }
425
+
426
+ @if (actions && actions.length > 0) {
427
+ <td class="fy-table__td--actions">
428
+ <div class="fy-table__actions-group">
429
+ @for (action of actions; track action.label) {
430
+ <fy-button
431
+ [iconName]="action.iconName"
432
+ [label]="action.label"
433
+ [variant]="action.variant || 'ghost'"
434
+ size="sm"
435
+ (fyClick)="onActionClick($event, action, row)"
436
+ ></fy-button>
437
+ }
438
+ </div>
439
+ </td>
440
+ }
441
+ </tr>
442
+ }
443
+ }
444
+ </tbody>
445
+ </table>
446
+ </div>
609
447
 
610
- .fy-table__loader {
611
- width: 24px;
612
- height: 24px;
613
- border: 3px solid var(--fy-colors-primary);
614
- border-bottom-color: transparent;
615
- border-radius: 50%;
616
- margin: 24px auto;
617
- animation: fy-spin 0.8s linear infinite;
618
- }
448
+ <!-- Footer / Pagination -->
449
+ @if (showFooter || showPagination || footer) {
450
+ <footer class="fy-table__footer">
451
+ @if (footer || showPagination) {
452
+ <div class="fy-table__footer-info">
453
+ @if (footer) { <span>{{ footer }}</span> }
454
+ @if (showPagination) {
455
+ <span class="fy-table__pagination-summary">
456
+ Mostrando {{ startItem }} - {{ endItem }} de {{ displayTotal }}
457
+ </span>
458
+ }
459
+ </div>
460
+ }
619
461
 
620
- @keyframes fy-spin {
621
- from { transform: rotate(0deg); }
622
- to { transform: rotate(360deg); }
623
- }
462
+ @if (showPagination) {
463
+ <div class="fy-table__pagination">
464
+ <fy-button
465
+ variant="ghost"
466
+ size="sm"
467
+ iconName="caret-left"
468
+ [disabled]="currentPage === 1"
469
+ (fyClick)="onPageChange(currentPage - 1)"
470
+ ></fy-button>
471
+
472
+ <div class="fy-table__pages">
473
+ <span class="fy-table__page-info">{{ currentPage }} / {{ totalPages }}</span>
474
+ </div>
624
475
 
625
- @media (max-width: 640px) {
626
- .fy-table__header {
627
- flex-direction: column;
628
- align-items: stretch;
629
- }
630
- .fy-table__search {
631
- max-width: 100%;
632
- }
633
- .fy-table__footer {
634
- flex-direction: column;
635
- gap: 16px;
476
+ <fy-button
477
+ variant="ghost"
478
+ size="sm"
479
+ iconName="caret-right"
480
+ [disabled]="currentPage === totalPages"
481
+ (fyClick)="onPageChange(currentPage + 1)"
482
+ ></fy-button>
483
+ </div>
484
+ }
485
+ </footer>
636
486
  }
637
- }
638
- `],
639
- encapsulation: ViewEncapsulation.None
640
- }),
641
- __metadata("design:paramtypes", [])
642
- ], FyTableComponent);
643
- export { FyTableComponent };
487
+ </div>
488
+ `, encapsulation: ViewEncapsulation.None, styles: ["\n .fy-table-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n background: var(--fy-effects-table-background, #fff);\n border: 1px solid var(--fy-effects-table-borderColor, rgba(0,0,0,0.08));\n border-radius: var(--fy-borderRadius-lg, 12px);\n overflow: hidden;\n }\n\n .fy-table__header {\n padding: var(--fy-spacing-md);\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--fy-effects-table-borderColor);\n gap: 16px;\n flex-wrap: wrap;\n }\n\n .fy-table__header-tools {\n display: flex;\n gap: 12px;\n align-items: center;\n flex: 1;\n justify-content: flex-end;\n }\n\n .fy-table__header-tools ::ng-deep [fy-table-tools] {\n display: flex;\n gap: 8px;\n }\n\n .fy-table__actions-group {\n display: flex;\n gap: 6px;\n }\n\n @media (max-width: 640px) {\n .fy-table__header-tools {\n justify-content: flex-start;\n }\n \n .fy-table__header-tools ::ng-deep [fy-table-tools] {\n width: 100%;\n overflow-x: auto;\n padding-bottom: 4px;\n }\n\n .fy-table__header-tools ::ng-deep [fy-table-tools] fy-button .fy-button__label {\n display: none;\n }\n\n .fy-table__header-tools ::ng-deep [fy-table-tools] fy-button .fy-button {\n padding: var(--fy-spacing-sm);\n }\n }\n\n .fy-table__title {\n margin: 0;\n font-size: var(--fy-typography-fontSize-lg);\n font-weight: var(--fy-typography-fontWeight-bold);\n }\n\n .fy-table__subtitle {\n margin: 4px 0 0;\n font-size: var(--fy-typography-fontSize-sm);\n color: var(--fy-colors-secondary);\n }\n\n .fy-table__header-tools {\n display: flex;\n gap: 12px;\n align-items: center;\n flex: 1;\n justify-content: flex-end;\n }\n\n .fy-table__search {\n max-width: 300px;\n width: 100%;\n }\n\n .fy-table__content {\n width: 100%;\n overflow-x: auto;\n }\n\n .fy-table {\n width: 100%;\n border-collapse: collapse;\n text-align: left;\n font-size: var(--fy-typography-fontSize-md);\n }\n\n .fy-table th {\n padding: var(--fy-spacing-md);\n background: var(--fy-effects-table-headerBackground, rgba(0,0,0,0.02));\n color: var(--fy-colors-text);\n font-weight: var(--fy-typography-fontWeight-bold);\n border-bottom: 1px solid var(--fy-effects-table-borderColor);\n white-space: nowrap;\n }\n\n .fy-table td {\n padding: var(--fy-spacing-md);\n border-bottom: 1px solid var(--fy-effects-table-borderColor);\n color: var(--fy-colors-text);\n }\n\n .fy-table__row:last-child td {\n border-bottom: none;\n }\n\n .fy-table__row:hover {\n background: var(--fy-effects-table-rowHoverBackground, rgba(0,0,0,0.01));\n }\n\n .fy-table__row--clickable {\n cursor: pointer;\n }\n\n .fy-table--striped tbody tr:nth-child(even) {\n background: var(--fy-effects-table-stripedBackground, rgba(0,0,0,0.005));\n }\n\n .fy-table--bordered td, \n .fy-table--bordered th {\n border: 1px solid var(--fy-effects-table-borderColor);\n }\n\n .fy-table--compact td,\n .fy-table--compact th {\n padding: var(--fy-spacing-sm);\n }\n\n .fy-table__th-content {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .fy-table__th--sortable {\n cursor: pointer;\n user-select: none;\n }\n\n .fy-table__th--sortable:hover {\n background: rgba(0,0,0,0.04);\n }\n\n .fy-table__footer {\n padding: var(--fy-spacing-md);\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-top: 1px solid var(--fy-effects-table-borderColor);\n background: var(--fy-effects-table-headerBackground);\n }\n\n .fy-table__pagination {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n\n .fy-table__page-info {\n font-size: var(--fy-typography-fontSize-sm);\n font-weight: var(--fy-typography-fontWeight-bold);\n }\n\n .fy-table__loader {\n width: 24px;\n height: 24px;\n border: 3px solid var(--fy-colors-primary);\n border-bottom-color: transparent;\n border-radius: 50%;\n margin: 24px auto;\n animation: fy-spin 0.8s linear infinite;\n }\n\n @keyframes fy-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n\n @media (max-width: 640px) {\n .fy-table__header {\n flex-direction: column;\n align-items: stretch;\n }\n .fy-table__search {\n max-width: 100%;\n }\n .fy-table__footer {\n flex-direction: column;\n gap: 16px;\n }\n }\n "] }]
489
+ }], ctorParameters: () => [], propDecorators: { data: [{
490
+ type: Input
491
+ }], columns: [{
492
+ type: Input
493
+ }], title: [{
494
+ type: Input
495
+ }], subtitle: [{
496
+ type: Input
497
+ }], footer: [{
498
+ type: Input
499
+ }], loading: [{
500
+ type: Input
501
+ }], showHeader: [{
502
+ type: Input
503
+ }], showFooter: [{
504
+ type: Input
505
+ }], showPagination: [{
506
+ type: Input
507
+ }], showSearch: [{
508
+ type: Input
509
+ }], currentPage: [{
510
+ type: Input
511
+ }], pageSize: [{
512
+ type: Input
513
+ }], totalItems: [{
514
+ type: Input
515
+ }], searchTargets: [{
516
+ type: Input
517
+ }], actions: [{
518
+ type: Input
519
+ }], rowClickable: [{
520
+ type: Input
521
+ }], variant: [{
522
+ type: Input
523
+ }], stickyHeader: [{
524
+ type: Input
525
+ }], scrollable: [{
526
+ type: Input
527
+ }], maxHeight: [{
528
+ type: Input
529
+ }], activeAnimations: [{
530
+ type: Input
531
+ }], activeEffects: [{
532
+ type: Input
533
+ }], customStyles: [{
534
+ type: Input
535
+ }], fySearch: [{
536
+ type: Output
537
+ }], fySort: [{
538
+ type: Output
539
+ }], fyPageChange: [{
540
+ type: Output
541
+ }], fyRowClick: [{
542
+ type: Output
543
+ }], cellTemplate: [{
544
+ type: ContentChild,
545
+ args: ['cellTemplate']
546
+ }] } });
@@ -1,3 +1,4 @@
1
+ import * as i0 from "@angular/core";
1
2
  export declare class FyTextComponent {
2
3
  private fylib;
3
4
  private _raw;
@@ -5,4 +6,6 @@ export declare class FyTextComponent {
5
6
  cryptoEnabled: boolean;
6
7
  value: import("@angular/core").WritableSignal<string>;
7
8
  constructor();
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<FyTextComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<FyTextComponent, "fy-text", never, { "text": { "alias": "text"; "required": false; }; "cryptoEnabled": { "alias": "cryptoEnabled"; "required": false; }; }, {}, never, never, true, never>;
8
11
  }