@fylib/adapter-angular 0.1.0

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 (75) hide show
  1. package/dist/base/base-component.d.ts +18 -0
  2. package/dist/base/base-component.js +36 -0
  3. package/dist/base/interaction.utils.d.ts +7 -0
  4. package/dist/base/interaction.utils.js +34 -0
  5. package/dist/base/interaction.utils.test.d.ts +1 -0
  6. package/dist/base/interaction.utils.test.js +25 -0
  7. package/dist/components/accordion.component.d.ts +32 -0
  8. package/dist/components/accordion.component.js +337 -0
  9. package/dist/components/badge.component.d.ts +10 -0
  10. package/dist/components/badge.component.js +112 -0
  11. package/dist/components/button.component.d.ts +33 -0
  12. package/dist/components/button.component.js +272 -0
  13. package/dist/components/card.component.d.ts +29 -0
  14. package/dist/components/card.component.js +236 -0
  15. package/dist/components/chart.component.d.ts +39 -0
  16. package/dist/components/chart.component.js +307 -0
  17. package/dist/components/icon.component.d.ts +18 -0
  18. package/dist/components/icon.component.js +144 -0
  19. package/dist/components/input.component.d.ts +50 -0
  20. package/dist/components/input.component.js +383 -0
  21. package/dist/components/modal.component.d.ts +46 -0
  22. package/dist/components/modal.component.js +404 -0
  23. package/dist/components/nav-link.component.d.ts +11 -0
  24. package/dist/components/nav-link.component.js +121 -0
  25. package/dist/components/notification-menu.component.d.ts +68 -0
  26. package/dist/components/notification-menu.component.js +695 -0
  27. package/dist/components/select.component.d.ts +52 -0
  28. package/dist/components/select.component.js +395 -0
  29. package/dist/components/table.component.d.ts +55 -0
  30. package/dist/components/table.component.js +643 -0
  31. package/dist/components/text.component.d.ts +8 -0
  32. package/dist/components/text.component.js +58 -0
  33. package/dist/components/toast.component.d.ts +27 -0
  34. package/dist/components/toast.component.js +260 -0
  35. package/dist/directives/animation.directive.d.ts +5 -0
  36. package/dist/directives/animation.directive.js +34 -0
  37. package/dist/directives/theme-vars.directive.d.ts +7 -0
  38. package/dist/directives/theme-vars.directive.js +70 -0
  39. package/dist/directives/wallpaper.directive.d.ts +28 -0
  40. package/dist/directives/wallpaper.directive.js +195 -0
  41. package/dist/effects/confetti.plugin.d.ts +1 -0
  42. package/dist/effects/confetti.plugin.js +151 -0
  43. package/dist/effects/extra-effects.plugin.d.ts +3 -0
  44. package/dist/effects/extra-effects.plugin.js +288 -0
  45. package/dist/effects/hearts.plugin.d.ts +1 -0
  46. package/dist/effects/hearts.plugin.js +172 -0
  47. package/dist/effects/register-all.d.ts +1 -0
  48. package/dist/effects/register-all.js +16 -0
  49. package/dist/effects/ui-effects.plugin.d.ts +1 -0
  50. package/dist/effects/ui-effects.plugin.js +134 -0
  51. package/dist/icons/providers/fontawesome.provider.d.ts +3 -0
  52. package/dist/icons/providers/fontawesome.provider.js +25 -0
  53. package/dist/icons/providers/mdi.provider.d.ts +3 -0
  54. package/dist/icons/providers/mdi.provider.js +13 -0
  55. package/dist/icons/providers/phosphor.provider.d.ts +3 -0
  56. package/dist/icons/providers/phosphor.provider.js +17 -0
  57. package/dist/icons/registry.d.ts +22 -0
  58. package/dist/icons/registry.js +12 -0
  59. package/dist/index.d.ts +29 -0
  60. package/dist/index.js +29 -0
  61. package/dist/layouts/layout.component.d.ts +24 -0
  62. package/dist/layouts/layout.component.js +255 -0
  63. package/dist/layouts/slot.component.d.ts +61 -0
  64. package/dist/layouts/slot.component.js +937 -0
  65. package/dist/providers.d.ts +12 -0
  66. package/dist/providers.js +18 -0
  67. package/dist/services/fylib.service.d.ts +31 -0
  68. package/dist/services/fylib.service.js +214 -0
  69. package/dist/services/notification.service.d.ts +27 -0
  70. package/dist/services/notification.service.js +118 -0
  71. package/dist/services/sse.service.d.ts +16 -0
  72. package/dist/services/sse.service.js +109 -0
  73. package/dist/services/webclient.service.d.ts +38 -0
  74. package/dist/services/webclient.service.js +144 -0
  75. package/package.json +43 -0
@@ -0,0 +1,404 @@
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
+ import { Component, Input, Output, EventEmitter, ViewEncapsulation, HostBinding, HostListener, inject } from '@angular/core';
11
+ import { CommonModule } from '@angular/common';
12
+ import { ModalDefinition } from '@fylib/catalog';
13
+ import { FyButtonComponent } from './button.component';
14
+ import { BaseFyComponent } from '../base/base-component';
15
+ let FyModalComponent = class FyModalComponent extends BaseFyComponent {
16
+ get animationsDisabled() {
17
+ return !this.isAnimationsActive(this.activeAnimations);
18
+ }
19
+ get hostStyles() {
20
+ return this.getHostStyles(this.customStyles);
21
+ }
22
+ constructor() {
23
+ super(inject(require('../services/fylib.service').FyLibService), 'fy-modal');
24
+ this.visible = ModalDefinition.defaultProps.visible;
25
+ this.size = ModalDefinition.defaultProps.size;
26
+ this.position = ModalDefinition.defaultProps.position;
27
+ this.status = ModalDefinition.defaultProps.status;
28
+ this.closable = ModalDefinition.defaultProps.closable;
29
+ this.closeOnEscape = ModalDefinition.defaultProps.closeOnEscape;
30
+ this.closeOnBackdrop = ModalDefinition.defaultProps.closeOnBackdrop;
31
+ this.showHeader = ModalDefinition.defaultProps.showHeader;
32
+ this.showFooter = ModalDefinition.defaultProps.showFooter;
33
+ this.showConfirmButton = ModalDefinition.defaultProps.showConfirmButton;
34
+ this.showCancelButton = ModalDefinition.defaultProps.showCancelButton;
35
+ this.confirmText = ModalDefinition.defaultProps.confirmText;
36
+ this.cancelText = ModalDefinition.defaultProps.cancelText;
37
+ this.loading = ModalDefinition.defaultProps.loading;
38
+ this.centered = ModalDefinition.defaultProps.centered;
39
+ this.blockScroll = ModalDefinition.defaultProps.blockScroll;
40
+ this.draggable = ModalDefinition.defaultProps.draggable;
41
+ this.resizable = ModalDefinition.defaultProps.resizable;
42
+ this.activeAnimations = null;
43
+ this.activeEffects = null;
44
+ this.customStyles = null;
45
+ this.fyOpen = new EventEmitter();
46
+ this.fyClose = new EventEmitter();
47
+ this.fyConfirm = new EventEmitter();
48
+ this.fyCancel = new EventEmitter();
49
+ this.modalAnimClass = '';
50
+ }
51
+ ngOnChanges(changes) {
52
+ if (changes['visible']) {
53
+ if (this.visible) {
54
+ if (this.blockScroll && typeof document !== 'undefined') {
55
+ document.body.style.overflow = 'hidden';
56
+ }
57
+ if (this.isAnimationsActive(this.activeAnimations)) {
58
+ const name = this.resolveAnim('open', undefined, ModalDefinition.features?.animations?.open);
59
+ if (name) {
60
+ this.fylib.playAnimation(name);
61
+ this.modalAnimClass = `fy-anim-${name}`;
62
+ setTimeout(() => { this.modalAnimClass = ''; }, 280);
63
+ }
64
+ }
65
+ if (this.onOpen)
66
+ this.onOpen();
67
+ this.fyOpen.emit();
68
+ }
69
+ else {
70
+ if (this.blockScroll && typeof document !== 'undefined') {
71
+ document.body.style.overflow = '';
72
+ }
73
+ if (this.isAnimationsActive(this.activeAnimations)) {
74
+ const name = this.resolveAnim('close', undefined, ModalDefinition.features?.animations?.close);
75
+ if (name) {
76
+ this.fylib.playAnimation(name);
77
+ this.modalAnimClass = `fy-anim-${name}`;
78
+ setTimeout(() => { this.modalAnimClass = ''; }, 220);
79
+ }
80
+ }
81
+ if (this.onClose)
82
+ this.onClose();
83
+ this.fyClose.emit();
84
+ }
85
+ }
86
+ }
87
+ handleConfirm() {
88
+ if (this.onConfirm)
89
+ this.onConfirm();
90
+ this.fyConfirm.emit();
91
+ }
92
+ handleCancel() {
93
+ if (!this.closable)
94
+ return;
95
+ if (this.onCancel)
96
+ this.onCancel();
97
+ this.fyCancel.emit();
98
+ if (this.isAnimationsActive(this.activeAnimations)) {
99
+ const name = this.resolveAnim('close', undefined, ModalDefinition.features?.animations?.close);
100
+ if (name) {
101
+ this.fylib.playAnimation(name);
102
+ this.modalAnimClass = `fy-anim-${name}`;
103
+ setTimeout(() => {
104
+ this.modalAnimClass = '';
105
+ this.visible = false;
106
+ this.ngOnChanges({ visible: { currentValue: false, previousValue: true, firstChange: false, isFirstChange: () => false } });
107
+ }, 220);
108
+ return;
109
+ }
110
+ }
111
+ this.visible = false;
112
+ this.ngOnChanges({ visible: { currentValue: false, previousValue: true, firstChange: false, isFirstChange: () => false } });
113
+ }
114
+ onBackdropClick() {
115
+ if (!this.closeOnBackdrop)
116
+ return;
117
+ this.handleCancel();
118
+ }
119
+ onKeydown(event) {
120
+ if (!this.visible)
121
+ return;
122
+ if (event.key === 'Escape' && this.closeOnEscape) {
123
+ this.handleCancel();
124
+ }
125
+ }
126
+ };
127
+ __decorate([
128
+ Input(),
129
+ __metadata("design:type", Boolean)
130
+ ], FyModalComponent.prototype, "visible", void 0);
131
+ __decorate([
132
+ Input(),
133
+ __metadata("design:type", String)
134
+ ], FyModalComponent.prototype, "title", void 0);
135
+ __decorate([
136
+ Input(),
137
+ __metadata("design:type", String)
138
+ ], FyModalComponent.prototype, "subtitle", void 0);
139
+ __decorate([
140
+ Input(),
141
+ __metadata("design:type", String)
142
+ ], FyModalComponent.prototype, "content", void 0);
143
+ __decorate([
144
+ Input(),
145
+ __metadata("design:type", Object)
146
+ ], FyModalComponent.prototype, "size", void 0);
147
+ __decorate([
148
+ Input(),
149
+ __metadata("design:type", Object)
150
+ ], FyModalComponent.prototype, "position", void 0);
151
+ __decorate([
152
+ Input(),
153
+ __metadata("design:type", Object)
154
+ ], FyModalComponent.prototype, "status", void 0);
155
+ __decorate([
156
+ Input(),
157
+ __metadata("design:type", Boolean)
158
+ ], FyModalComponent.prototype, "closable", void 0);
159
+ __decorate([
160
+ Input(),
161
+ __metadata("design:type", Boolean)
162
+ ], FyModalComponent.prototype, "closeOnEscape", void 0);
163
+ __decorate([
164
+ Input(),
165
+ __metadata("design:type", Boolean)
166
+ ], FyModalComponent.prototype, "closeOnBackdrop", void 0);
167
+ __decorate([
168
+ Input(),
169
+ __metadata("design:type", Boolean)
170
+ ], FyModalComponent.prototype, "showHeader", void 0);
171
+ __decorate([
172
+ Input(),
173
+ __metadata("design:type", Boolean)
174
+ ], FyModalComponent.prototype, "showFooter", void 0);
175
+ __decorate([
176
+ Input(),
177
+ __metadata("design:type", Boolean)
178
+ ], FyModalComponent.prototype, "showConfirmButton", void 0);
179
+ __decorate([
180
+ Input(),
181
+ __metadata("design:type", Boolean)
182
+ ], FyModalComponent.prototype, "showCancelButton", void 0);
183
+ __decorate([
184
+ Input(),
185
+ __metadata("design:type", String)
186
+ ], FyModalComponent.prototype, "confirmText", void 0);
187
+ __decorate([
188
+ Input(),
189
+ __metadata("design:type", String)
190
+ ], FyModalComponent.prototype, "cancelText", void 0);
191
+ __decorate([
192
+ Input(),
193
+ __metadata("design:type", Boolean)
194
+ ], FyModalComponent.prototype, "loading", void 0);
195
+ __decorate([
196
+ Input(),
197
+ __metadata("design:type", Boolean)
198
+ ], FyModalComponent.prototype, "centered", void 0);
199
+ __decorate([
200
+ Input(),
201
+ __metadata("design:type", Boolean)
202
+ ], FyModalComponent.prototype, "blockScroll", void 0);
203
+ __decorate([
204
+ Input(),
205
+ __metadata("design:type", Boolean)
206
+ ], FyModalComponent.prototype, "draggable", void 0);
207
+ __decorate([
208
+ Input(),
209
+ __metadata("design:type", Boolean)
210
+ ], FyModalComponent.prototype, "resizable", void 0);
211
+ __decorate([
212
+ Input(),
213
+ __metadata("design:type", Object)
214
+ ], FyModalComponent.prototype, "activeAnimations", void 0);
215
+ __decorate([
216
+ Input(),
217
+ __metadata("design:type", Object)
218
+ ], FyModalComponent.prototype, "activeEffects", void 0);
219
+ __decorate([
220
+ Input(),
221
+ __metadata("design:type", Object)
222
+ ], FyModalComponent.prototype, "customStyles", void 0);
223
+ __decorate([
224
+ Input(),
225
+ __metadata("design:type", Function)
226
+ ], FyModalComponent.prototype, "onOpen", void 0);
227
+ __decorate([
228
+ Input(),
229
+ __metadata("design:type", Function)
230
+ ], FyModalComponent.prototype, "onClose", void 0);
231
+ __decorate([
232
+ Input(),
233
+ __metadata("design:type", Function)
234
+ ], FyModalComponent.prototype, "onConfirm", void 0);
235
+ __decorate([
236
+ Input(),
237
+ __metadata("design:type", Function)
238
+ ], FyModalComponent.prototype, "onCancel", void 0);
239
+ __decorate([
240
+ Output(),
241
+ __metadata("design:type", Object)
242
+ ], FyModalComponent.prototype, "fyOpen", void 0);
243
+ __decorate([
244
+ Output(),
245
+ __metadata("design:type", Object)
246
+ ], FyModalComponent.prototype, "fyClose", void 0);
247
+ __decorate([
248
+ Output(),
249
+ __metadata("design:type", Object)
250
+ ], FyModalComponent.prototype, "fyConfirm", void 0);
251
+ __decorate([
252
+ Output(),
253
+ __metadata("design:type", Object)
254
+ ], FyModalComponent.prototype, "fyCancel", void 0);
255
+ __decorate([
256
+ HostBinding('class.fy-animations-disabled'),
257
+ __metadata("design:type", Boolean),
258
+ __metadata("design:paramtypes", [])
259
+ ], FyModalComponent.prototype, "animationsDisabled", null);
260
+ __decorate([
261
+ HostBinding('style'),
262
+ __metadata("design:type", String),
263
+ __metadata("design:paramtypes", [])
264
+ ], FyModalComponent.prototype, "hostStyles", null);
265
+ __decorate([
266
+ HostListener('document:keydown', ['$event']),
267
+ __metadata("design:type", Function),
268
+ __metadata("design:paramtypes", [KeyboardEvent]),
269
+ __metadata("design:returntype", void 0)
270
+ ], FyModalComponent.prototype, "onKeydown", null);
271
+ FyModalComponent = __decorate([
272
+ Component({
273
+ selector: 'fy-modal',
274
+ standalone: true,
275
+ imports: [CommonModule, FyButtonComponent],
276
+ template: `
277
+ @if (visible) {
278
+ <div class="fy-modal-overlay" (click)="onBackdropClick()"></div>
279
+ <div class="fy-modal" [ngClass]="['fy-modal--' + size, 'fy-modal--status-' + status, modalAnimClass]">
280
+ @if (showHeader) {
281
+ <header class="fy-modal__header">
282
+ @if (title) { <h3 class="fy-modal__title">{{ title }}</h3> }
283
+ @if (subtitle) { <p class="fy-modal__subtitle">{{ subtitle }}</p> }
284
+ @if (closable) {
285
+ <button type="button" class="fy-modal__close" (click)="handleCancel()">&times;</button>
286
+ }
287
+ </header>
288
+ }
289
+
290
+ <section class="fy-modal__body">
291
+ <ng-content></ng-content>
292
+ @if (content) { <div class="fy-modal__content">{{ content }}</div> }
293
+ </section>
294
+
295
+ @if (showFooter) {
296
+ <footer class="fy-modal__footer">
297
+ @if (showCancelButton) {
298
+ <fy-button
299
+ variant="ghost"
300
+ size="md"
301
+ [label]="cancelText || 'Cancelar'"
302
+ (fyClick)="handleCancel()"
303
+ ></fy-button>
304
+ }
305
+ @if (showConfirmButton) {
306
+ <fy-button
307
+ size="md"
308
+ [label]="confirmText || 'Confirmar'"
309
+ (fyClick)="handleConfirm()"
310
+ ></fy-button>
311
+ }
312
+ </footer>
313
+ }
314
+ </div>
315
+ }
316
+ `,
317
+ styles: [`
318
+ .fy-modal-overlay {
319
+ position: fixed;
320
+ inset: 0;
321
+ background: var(--fy-effects-modal-overlayColor, rgba(0,0,0,0.45));
322
+ z-index: 2000;
323
+ }
324
+ .fy-modal {
325
+ position: fixed;
326
+ top: 50%;
327
+ left: 50%;
328
+ transform: translate(-50%, -50%);
329
+ background: var(--fy-effects-modal-background, var(--fy-colors-surface, #fff));
330
+ border: var(--fy-effects-modal-borderWidth, 1px) solid var(--fy-effects-modal-borderColor, rgba(0,0,0,0.12));
331
+ border-radius: var(--fy-effects-modal-borderRadius, var(--fy-borderRadius-md));
332
+ box-shadow: var(--fy-effects-modal-shadow, 0 20px 60px rgba(0,0,0,0.2));
333
+ color: var(--fy-colors-text);
334
+ width: 90vw;
335
+ max-width: 640px;
336
+ max-height: 85vh;
337
+ display: flex;
338
+ flex-direction: column;
339
+ overflow: hidden;
340
+ z-index: 2001;
341
+ }
342
+ .fy-modal--sm { max-width: 400px; }
343
+ .fy-modal--md { max-width: 640px; }
344
+ .fy-modal--lg { max-width: 840px; }
345
+ .fy-modal--xl { max-width: 1040px; }
346
+ .fy-modal--full { width: 96vw; height: 90vh; max-width: none; }
347
+
348
+ .fy-modal__header {
349
+ display: flex;
350
+ align-items: center;
351
+ justify-content: space-between;
352
+ gap: 12px;
353
+ padding: 12px 16px;
354
+ border-bottom: 1px solid var(--fy-effects-modal-dividerColor, rgba(0,0,0,0.08));
355
+ }
356
+ .fy-modal__title {
357
+ margin: 0;
358
+ font-size: var(--fy-typography-fontSize-lg, 18px);
359
+ font-weight: var(--fy-typography-fontWeight-bold, 700);
360
+ }
361
+ .fy-modal__subtitle {
362
+ margin: 0;
363
+ opacity: .8;
364
+ font-size: var(--fy-typography-fontSize-sm, 12px);
365
+ }
366
+ .fy-modal__close {
367
+ border: 0;
368
+ background: transparent;
369
+ cursor: pointer;
370
+ font-size: 20px;
371
+ line-height: 1;
372
+ }
373
+ .fy-modal__body {
374
+ padding: 16px;
375
+ flex: 1;
376
+ overflow: auto;
377
+ }
378
+ .fy-modal__footer {
379
+ display: flex;
380
+ justify-content: flex-end;
381
+ gap: 8px;
382
+ padding: 12px 16px;
383
+ border-top: 1px solid var(--fy-effects-modal-dividerColor, rgba(0,0,0,0.08));
384
+ }
385
+
386
+ .fy-modal--status-success {
387
+ border-color: var(--fy-colors-success, #22c55e);
388
+ box-shadow: 0 0 0 3px rgba(34,197,94,0.15), var(--fy-effects-modal-shadow, 0 20px 60px rgba(0,0,0,0.2));
389
+ }
390
+ .fy-modal--status-error {
391
+ border-color: var(--fy-colors-danger, #ef4444);
392
+ box-shadow: 0 0 0 3px rgba(239,68,68,0.15), var(--fy-effects-modal-shadow, 0 20px 60px rgba(0,0,0,0.2));
393
+ }
394
+
395
+ .fy-animations-disabled, .fy-animations-disabled * {
396
+ transition: none !important;
397
+ animation: none !important;
398
+ }
399
+ `],
400
+ encapsulation: ViewEncapsulation.None
401
+ }),
402
+ __metadata("design:paramtypes", [])
403
+ ], FyModalComponent);
404
+ export { FyModalComponent };
@@ -0,0 +1,11 @@
1
+ export declare class FyNavLinkComponent {
2
+ label: string;
3
+ to?: string;
4
+ href?: string;
5
+ target?: '_blank' | '_self' | '_parent' | '_top';
6
+ active?: boolean;
7
+ hoverEnabled: boolean;
8
+ iconName?: string;
9
+ iconSet?: 'ph' | 'fa' | 'mdi';
10
+ get hasProjectedContent(): boolean;
11
+ }
@@ -0,0 +1,121 @@
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
+ import { Component, Input, ViewEncapsulation } from '@angular/core';
11
+ import { CommonModule } from '@angular/common';
12
+ import { FyIconComponent } from './icon.component';
13
+ let FyNavLinkComponent = class FyNavLinkComponent {
14
+ constructor() {
15
+ this.label = '';
16
+ this.hoverEnabled = true;
17
+ }
18
+ get hasProjectedContent() {
19
+ // Em Angular, checar projeção é não trivial sem ViewChild/ContentChild; simplificado:
20
+ return !!this.label && this.label.trim().length > 0 ? false : true;
21
+ }
22
+ };
23
+ __decorate([
24
+ Input(),
25
+ __metadata("design:type", String)
26
+ ], FyNavLinkComponent.prototype, "label", void 0);
27
+ __decorate([
28
+ Input(),
29
+ __metadata("design:type", String)
30
+ ], FyNavLinkComponent.prototype, "to", void 0);
31
+ __decorate([
32
+ Input(),
33
+ __metadata("design:type", String)
34
+ ], FyNavLinkComponent.prototype, "href", void 0);
35
+ __decorate([
36
+ Input(),
37
+ __metadata("design:type", String)
38
+ ], FyNavLinkComponent.prototype, "target", void 0);
39
+ __decorate([
40
+ Input(),
41
+ __metadata("design:type", Boolean)
42
+ ], FyNavLinkComponent.prototype, "active", void 0);
43
+ __decorate([
44
+ Input(),
45
+ __metadata("design:type", Boolean)
46
+ ], FyNavLinkComponent.prototype, "hoverEnabled", void 0);
47
+ __decorate([
48
+ Input(),
49
+ __metadata("design:type", String)
50
+ ], FyNavLinkComponent.prototype, "iconName", void 0);
51
+ __decorate([
52
+ Input(),
53
+ __metadata("design:type", String)
54
+ ], FyNavLinkComponent.prototype, "iconSet", void 0);
55
+ FyNavLinkComponent = __decorate([
56
+ Component({
57
+ selector: 'fy-nav-link',
58
+ standalone: true,
59
+ imports: [CommonModule, FyIconComponent],
60
+ template: `
61
+ <a
62
+ [attr.href]="href || to || null"
63
+ [attr.target]="target || null"
64
+ rel="noopener noreferrer"
65
+ class="fy-nav-link"
66
+ [class.active]="active"
67
+ [class.fy-nav-link--hover-disabled]="!hoverEnabled"
68
+
69
+ >
70
+ @if (iconName) {
71
+ <fy-icon [name]="iconName" [set]="iconSet" class="fy-nav-link__icon"></fy-icon>
72
+ }
73
+ <ng-content></ng-content>
74
+ @if (!hasProjectedContent) {
75
+ <span>{{ label }}</span>
76
+ }
77
+ </a>
78
+ `,
79
+ styles: [`
80
+ .fy-nav-link {
81
+ display: inline-flex;
82
+ align-items: center;
83
+ gap: var(--fy-spacing-sm, 8px);
84
+ padding: var(--fy-spacing-sm) var(--fy-spacing-md);
85
+ border-radius: var(--fy-borderRadius-sm);
86
+ color: var(--fy-colors-text);
87
+ text-decoration: none;
88
+ transition: background-color 0.15s ease, color 0.15s ease;
89
+ }
90
+ .fy-nav-link__icon {
91
+ flex: 0 0 auto;
92
+ opacity: .95;
93
+ }
94
+ .fy-nav-link:hover:not(.fy-nav-link--hover-disabled) {
95
+ background-color: rgba(var(--fy-colors-primary-rgb, 59,130,246), 0.08);
96
+ color: var(--fy-colors-primary);
97
+ }
98
+ .fy-nav-link.active {
99
+ background-color: rgba(var(--fy-colors-primary-rgb, 59,130,246), 0.12);
100
+ color: var(--fy-colors-primary);
101
+ font-weight: var(--fy-typography-fontWeight-bold);
102
+ }
103
+
104
+ /* Dentro do header, os links devem se comportar como itens de navegação horizontal */
105
+ .fy-slot--header .fy-nav-link {
106
+ display: inline-flex;
107
+ align-items: center;
108
+ justify-content: center;
109
+ }
110
+
111
+ @media (max-width: 768px) {
112
+ .fy-slot--header .fy-nav-link {
113
+ display: inline-flex;
114
+ justify-content: flex-start;
115
+ }
116
+ }
117
+ `],
118
+ encapsulation: ViewEncapsulation.None
119
+ })
120
+ ], FyNavLinkComponent);
121
+ export { FyNavLinkComponent };
@@ -0,0 +1,68 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { NotificationMenuProps, NotificationItem } from '@fylib/catalog';
3
+ import { BaseFyComponent } from '../base/base-component';
4
+ export declare class FyNotificationMenuComponent extends BaseFyComponent<'fy-notification-menu'> implements NotificationMenuProps {
5
+ private notify;
6
+ _notifications: import("@angular/core").WritableSignal<NotificationItem[]>;
7
+ set notifications(value: NotificationItem[]);
8
+ get notifications(): NotificationItem[];
9
+ unreadCount: number;
10
+ showAllNotifications?: boolean;
11
+ maxNotifications?: number;
12
+ enableClearAll?: boolean;
13
+ enableAccordion?: boolean;
14
+ showViewAll?: boolean;
15
+ viewAllPosition?: any;
16
+ markAllAsReadOnOpen?: boolean;
17
+ markAsReadOnClick?: boolean;
18
+ readApiEndpoint?: string;
19
+ readApiMethod?: 'POST' | 'PUT' | 'PATCH';
20
+ readApiHeaders?: Record<string, string>;
21
+ onRead?: (notification: NotificationItem) => void;
22
+ onReadAll?: (notifications: NotificationItem[]) => void;
23
+ activeAnimations: boolean | null;
24
+ activeEffects: boolean | null;
25
+ customStyles: Record<string, string> | null;
26
+ fyOpen: EventEmitter<void>;
27
+ fyClearAll: EventEmitter<void>;
28
+ fyViewAll: EventEmitter<void>;
29
+ fyNotificationClick: EventEmitter<NotificationItem>;
30
+ isOpen: import("@angular/core").WritableSignal<boolean>;
31
+ isClosing: import("@angular/core").WritableSignal<boolean>;
32
+ private webClient;
33
+ constructor();
34
+ themeTokens: import("@angular/core").Signal<import("@fylib/core").NotificationMenuTokens | undefined>;
35
+ resolvedConfig: import("@angular/core").Signal<{
36
+ showAll: boolean;
37
+ limit: number;
38
+ allowClear: boolean;
39
+ accordionMode: boolean;
40
+ showViewAll: boolean;
41
+ viewAllPosition: any;
42
+ markAllAsReadOnOpen: boolean;
43
+ markAsReadOnClick: boolean;
44
+ readApiEndpoint: string | undefined;
45
+ readApiMethod: "POST" | "PUT" | "PATCH";
46
+ readApiHeaders: Record<string, string> | undefined;
47
+ }>;
48
+ private visibleLimit;
49
+ displayNotifications: import("@angular/core").Signal<NotificationItem[]>;
50
+ shouldScroll: import("@angular/core").Signal<boolean>;
51
+ scrollHeight: import("@angular/core").Signal<string>;
52
+ private initialLimit;
53
+ loadMore(): void;
54
+ accordionItems: import("@angular/core").Signal<any[]>;
55
+ get unreadCountDisplay(): number;
56
+ toggleMenu(): void;
57
+ openMenu(): void;
58
+ closeMenu(): void;
59
+ clearAll(): void;
60
+ viewAll(): void;
61
+ onItemClick(item: NotificationItem): void;
62
+ onItemExpand(item: NotificationItem): void;
63
+ onMarkAsRead(event: Event, item: NotificationItem): void;
64
+ private markAsRead;
65
+ private markAllAsRead;
66
+ private sendReadToBackend;
67
+ get animationClassSuffix(): string;
68
+ }