@fylib/adapter-angular 0.2.8 → 0.3.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.
- package/dist/components/button.component.d.ts +3 -1
- package/dist/components/button.component.js +92 -45
- package/dist/components/modal.component.js +1 -1
- package/dist/components/notification-menu.component.js +1 -1
- package/dist/components/table.component.js +1 -1
- package/dist/components/text.component.js +5 -7
- package/dist/components/toast.component.js +2 -0
- package/dist/layouts/layout.component.d.ts +1 -0
- package/dist/layouts/layout.component.js +9 -3
- package/dist/schematics/ng-add/index.js +129 -17
- package/dist/schematics/ng-add/index.js.map +1 -1
- package/dist/services/sse.service.js +3 -0
- package/package.json +8 -8
|
@@ -14,6 +14,8 @@ export declare class FyButtonComponent extends BaseFyComponent<'fy-button'> impl
|
|
|
14
14
|
icon?: string;
|
|
15
15
|
iconName?: string;
|
|
16
16
|
iconSet?: 'ph' | 'fa' | 'mdi';
|
|
17
|
+
link?: string;
|
|
18
|
+
target?: string;
|
|
17
19
|
activeAnimations: boolean | null;
|
|
18
20
|
activeEffects: boolean | null;
|
|
19
21
|
customStyles: Record<string, string> | null;
|
|
@@ -32,5 +34,5 @@ export declare class FyButtonComponent extends BaseFyComponent<'fy-button'> impl
|
|
|
32
34
|
handleClick(event: MouseEvent): void;
|
|
33
35
|
handleHover(): void;
|
|
34
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<FyButtonComponent, never>;
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FyButtonComponent, "fy-button", never, { "label": { "alias": "label"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; }; "iconSet": { "alias": "iconSet"; "required": false; }; "activeAnimations": { "alias": "activeAnimations"; "required": false; }; "activeEffects": { "alias": "activeEffects"; "required": false; }; "customStyles": { "alias": "customStyles"; "required": false; }; "hoverAnimation": { "alias": "hoverAnimation"; "required": false; }; "clickAnimation": { "alias": "clickAnimation"; "required": false; }; "successAnimation": { "alias": "successAnimation"; "required": false; }; "errorAnimation": { "alias": "errorAnimation"; "required": false; }; "hoverEffect": { "alias": "hoverEffect"; "required": false; }; "clickEffect": { "alias": "clickEffect"; "required": false; }; "successEffect": { "alias": "successEffect"; "required": false; }; "errorEffect": { "alias": "errorEffect"; "required": false; }; }, { "fyClick": "fyClick"; }, never, never, true, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FyButtonComponent, "fy-button", never, { "label": { "alias": "label"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; }; "iconSet": { "alias": "iconSet"; "required": false; }; "link": { "alias": "link"; "required": false; }; "target": { "alias": "target"; "required": false; }; "activeAnimations": { "alias": "activeAnimations"; "required": false; }; "activeEffects": { "alias": "activeEffects"; "required": false; }; "customStyles": { "alias": "customStyles"; "required": false; }; "hoverAnimation": { "alias": "hoverAnimation"; "required": false; }; "clickAnimation": { "alias": "clickAnimation"; "required": false; }; "successAnimation": { "alias": "successAnimation"; "required": false; }; "errorAnimation": { "alias": "errorAnimation"; "required": false; }; "hoverEffect": { "alias": "hoverEffect"; "required": false; }; "clickEffect": { "alias": "clickEffect"; "required": false; }; "successEffect": { "alias": "successEffect"; "required": false; }; "errorEffect": { "alias": "errorEffect"; "required": false; }; }, { "fyClick": "fyClick"; }, never, never, true, never>;
|
|
36
38
|
}
|
|
@@ -15,6 +15,7 @@ export class FyButtonComponent extends BaseFyComponent {
|
|
|
15
15
|
this.disabled = ButtonDefinition.defaultProps.disabled;
|
|
16
16
|
this.loading = ButtonDefinition.defaultProps.loading;
|
|
17
17
|
this.icon = ButtonDefinition.defaultProps.icon;
|
|
18
|
+
this.target = '_self';
|
|
18
19
|
this.activeAnimations = null;
|
|
19
20
|
this.activeEffects = null;
|
|
20
21
|
this.customStyles = null;
|
|
@@ -58,55 +59,97 @@ export class FyButtonComponent extends BaseFyComponent {
|
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
FyButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FyButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
61
|
-
FyButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: FyButtonComponent, isStandalone: true, selector: "fy-button", inputs: { label: "label", variant: "variant", size: "size", disabled: "disabled", loading: "loading", icon: "icon", iconName: "iconName", iconSet: "iconSet", activeAnimations: "activeAnimations", activeEffects: "activeEffects", customStyles: "customStyles", hoverAnimation: "hoverAnimation", clickAnimation: "clickAnimation", successAnimation: "successAnimation", errorAnimation: "errorAnimation", hoverEffect: "hoverEffect", clickEffect: "clickEffect", successEffect: "successEffect", errorEffect: "errorEffect" }, outputs: { fyClick: "fyClick" }, host: { properties: { "class.fy-animations-disabled": "this.animationsDisabled", "style": "this.hostStyles" } }, usesInheritance: true, ngImport: i0, template: `
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
62
|
+
FyButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: FyButtonComponent, isStandalone: true, selector: "fy-button", inputs: { label: "label", variant: "variant", size: "size", disabled: "disabled", loading: "loading", icon: "icon", iconName: "iconName", iconSet: "iconSet", link: "link", target: "target", activeAnimations: "activeAnimations", activeEffects: "activeEffects", customStyles: "customStyles", hoverAnimation: "hoverAnimation", clickAnimation: "clickAnimation", successAnimation: "successAnimation", errorAnimation: "errorAnimation", hoverEffect: "hoverEffect", clickEffect: "clickEffect", successEffect: "successEffect", errorEffect: "errorEffect" }, outputs: { fyClick: "fyClick" }, host: { properties: { "class.fy-animations-disabled": "this.animationsDisabled", "style": "this.hostStyles" } }, usesInheritance: true, ngImport: i0, template: `
|
|
63
|
+
@if (link) {
|
|
64
|
+
<a
|
|
65
|
+
[href]="link"
|
|
66
|
+
[target]="target"
|
|
67
|
+
[class]="'fy-button fy-button--' + variant + ' fy-button--' + size + animationClassSuffix"
|
|
68
|
+
[style]="hostStyles"
|
|
69
|
+
(click)="handleClick($event)"
|
|
70
|
+
(mouseenter)="handleHover()"
|
|
71
|
+
[attr.aria-label]="label || iconName || icon"
|
|
72
|
+
>
|
|
73
|
+
@if(iconName) {
|
|
74
|
+
<fy-icon [name]="iconName" [set]="iconSet" class="fy-button__icon"></fy-icon>
|
|
75
|
+
} @else if(icon) {
|
|
76
|
+
<span [class]="'fy-button__icon ' + icon"></span>
|
|
77
|
+
}
|
|
78
|
+
@if (label) {
|
|
79
|
+
<span class="fy-button__label">{{ label }}</span>
|
|
80
|
+
}
|
|
81
|
+
</a>
|
|
82
|
+
} @else {
|
|
83
|
+
<button
|
|
84
|
+
[class]="'fy-button fy-button--' + variant + ' fy-button--' + size + animationClassSuffix"
|
|
85
|
+
[disabled]="disabled || loading"
|
|
86
|
+
(click)="handleClick($event)"
|
|
87
|
+
(mouseenter)="handleHover()"
|
|
88
|
+
[style]="hostStyles"
|
|
89
|
+
[attr.aria-busy]="loading"
|
|
90
|
+
[attr.aria-live]="loading ? 'polite' : null"
|
|
91
|
+
[attr.aria-label]="label || iconName || icon"
|
|
92
|
+
>
|
|
93
|
+
@if(loading) {
|
|
94
|
+
<span class="fy-button__loader"></span>
|
|
95
|
+
}
|
|
96
|
+
@if(iconName && !loading) {
|
|
97
|
+
<fy-icon [name]="iconName" [set]="iconSet" class="fy-button__icon"></fy-icon>
|
|
98
|
+
} @else if(icon && !loading) {
|
|
99
|
+
<span [class]="'fy-button__icon ' + icon"></span>
|
|
100
|
+
}
|
|
101
|
+
@if (label) {
|
|
102
|
+
<span class="fy-button__label">{{ label }}</span>
|
|
103
|
+
}
|
|
104
|
+
</button>
|
|
105
|
+
}
|
|
84
106
|
`, isInline: true, styles: ["\n .fy-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: var(--fy-spacing-sm) var(--fy-spacing-md);\n border-radius: var(--fy-borderRadius-md);\n font-family: inherit;\n font-size: var(--fy-typography-fontSize-md);\n font-weight: var(--fy-typography-fontWeight-bold);\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n border: 1px solid var(--fy-effects-button-borderColor, transparent);\n background: var(--fy-effects-button-background, var(--fy-colors-primary));\n color: var(--fy-effects-button-textColor, var(--fy-colors-white));\n outline: none;\n user-select: none;\n position: relative;\n overflow: hidden;\n gap: 8px;\n }\n\n .fy-animations-disabled, .fy-animations-disabled * {\n transition: none !important;\n animation: none !important;\n }\n\n .fy-button--secondary {\n background: none !important;\n background-color: var(--fy-colors-secondary) !important;\n color: var(--fy-effects-button-textColor, var(--fy-colors-white)) !important;\n }\n\n .fy-button--ghost {\n background: none !important;\n background-color: transparent !important;\n color: var(--fy-colors-primary) !important;\n border-color: var(--fy-colors-primary) !important;\n }\n\n .fy-button--ghost:hover:not(:disabled) {\n background-color: rgba(var(--fy-colors-primary-rgb, 59, 130, 246), 0.1);\n }\n\n .fy-button--danger {\n background: none !important;\n background-color: var(--fy-colors-danger) !important;\n color: var(--fy-effects-button-textColor, var(--fy-colors-white)) !important;\n }\n\n .fy-button--sm { \n padding: var(--fy-spacing-xs) var(--fy-spacing-sm); \n font-size: var(--fy-typography-fontSize-sm); \n }\n \n .fy-button--lg { \n padding: var(--fy-spacing-md) var(--fy-spacing-lg); \n font-size: var(--fy-typography-fontSize-lg); \n }\n\n .fy-button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n .fy-button__loader {\n width: 16px;\n height: 16px;\n border: 2px solid currentColor;\n border-bottom-color: transparent;\n border-radius: 50%;\n display: inline-block;\n animation: fy-spin 0.8s linear infinite;\n flex-shrink: 0;\n }\n\n @keyframes fy-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n "], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: FyIconComponent, selector: "fy-icon", inputs: ["name", "size", "color", "strokeWidth", "variant", "set"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
85
107
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FyButtonComponent, decorators: [{
|
|
86
108
|
type: Component,
|
|
87
109
|
args: [{ selector: 'fy-button', standalone: true, imports: [CommonModule, FyIconComponent], template: `
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
@if (link) {
|
|
111
|
+
<a
|
|
112
|
+
[href]="link"
|
|
113
|
+
[target]="target"
|
|
114
|
+
[class]="'fy-button fy-button--' + variant + ' fy-button--' + size + animationClassSuffix"
|
|
115
|
+
[style]="hostStyles"
|
|
116
|
+
(click)="handleClick($event)"
|
|
117
|
+
(mouseenter)="handleHover()"
|
|
118
|
+
[attr.aria-label]="label || iconName || icon"
|
|
119
|
+
>
|
|
120
|
+
@if(iconName) {
|
|
121
|
+
<fy-icon [name]="iconName" [set]="iconSet" class="fy-button__icon"></fy-icon>
|
|
122
|
+
} @else if(icon) {
|
|
123
|
+
<span [class]="'fy-button__icon ' + icon"></span>
|
|
124
|
+
}
|
|
125
|
+
@if (label) {
|
|
126
|
+
<span class="fy-button__label">{{ label }}</span>
|
|
127
|
+
}
|
|
128
|
+
</a>
|
|
129
|
+
} @else {
|
|
130
|
+
<button
|
|
131
|
+
[class]="'fy-button fy-button--' + variant + ' fy-button--' + size + animationClassSuffix"
|
|
132
|
+
[disabled]="disabled || loading"
|
|
133
|
+
(click)="handleClick($event)"
|
|
134
|
+
(mouseenter)="handleHover()"
|
|
135
|
+
[style]="hostStyles"
|
|
136
|
+
[attr.aria-busy]="loading"
|
|
137
|
+
[attr.aria-live]="loading ? 'polite' : null"
|
|
138
|
+
[attr.aria-label]="label || iconName || icon"
|
|
139
|
+
>
|
|
140
|
+
@if(loading) {
|
|
141
|
+
<span class="fy-button__loader"></span>
|
|
142
|
+
}
|
|
143
|
+
@if(iconName && !loading) {
|
|
144
|
+
<fy-icon [name]="iconName" [set]="iconSet" class="fy-button__icon"></fy-icon>
|
|
145
|
+
} @else if(icon && !loading) {
|
|
146
|
+
<span [class]="'fy-button__icon ' + icon"></span>
|
|
147
|
+
}
|
|
148
|
+
@if (label) {
|
|
149
|
+
<span class="fy-button__label">{{ label }}</span>
|
|
150
|
+
}
|
|
151
|
+
</button>
|
|
152
|
+
}
|
|
110
153
|
`, encapsulation: ViewEncapsulation.None, styles: ["\n .fy-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: var(--fy-spacing-sm) var(--fy-spacing-md);\n border-radius: var(--fy-borderRadius-md);\n font-family: inherit;\n font-size: var(--fy-typography-fontSize-md);\n font-weight: var(--fy-typography-fontWeight-bold);\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n border: 1px solid var(--fy-effects-button-borderColor, transparent);\n background: var(--fy-effects-button-background, var(--fy-colors-primary));\n color: var(--fy-effects-button-textColor, var(--fy-colors-white));\n outline: none;\n user-select: none;\n position: relative;\n overflow: hidden;\n gap: 8px;\n }\n\n .fy-animations-disabled, .fy-animations-disabled * {\n transition: none !important;\n animation: none !important;\n }\n\n .fy-button--secondary {\n background: none !important;\n background-color: var(--fy-colors-secondary) !important;\n color: var(--fy-effects-button-textColor, var(--fy-colors-white)) !important;\n }\n\n .fy-button--ghost {\n background: none !important;\n background-color: transparent !important;\n color: var(--fy-colors-primary) !important;\n border-color: var(--fy-colors-primary) !important;\n }\n\n .fy-button--ghost:hover:not(:disabled) {\n background-color: rgba(var(--fy-colors-primary-rgb, 59, 130, 246), 0.1);\n }\n\n .fy-button--danger {\n background: none !important;\n background-color: var(--fy-colors-danger) !important;\n color: var(--fy-effects-button-textColor, var(--fy-colors-white)) !important;\n }\n\n .fy-button--sm { \n padding: var(--fy-spacing-xs) var(--fy-spacing-sm); \n font-size: var(--fy-typography-fontSize-sm); \n }\n \n .fy-button--lg { \n padding: var(--fy-spacing-md) var(--fy-spacing-lg); \n font-size: var(--fy-typography-fontSize-lg); \n }\n\n .fy-button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n .fy-button__loader {\n width: 16px;\n height: 16px;\n border: 2px solid currentColor;\n border-bottom-color: transparent;\n border-radius: 50%;\n display: inline-block;\n animation: fy-spin 0.8s linear infinite;\n flex-shrink: 0;\n }\n\n @keyframes fy-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n "] }]
|
|
111
154
|
}], ctorParameters: () => [], propDecorators: { label: [{
|
|
112
155
|
type: Input
|
|
@@ -124,6 +167,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
|
|
|
124
167
|
type: Input
|
|
125
168
|
}], iconSet: [{
|
|
126
169
|
type: Input
|
|
170
|
+
}], link: [{
|
|
171
|
+
type: Input
|
|
172
|
+
}], target: [{
|
|
173
|
+
type: Input
|
|
127
174
|
}], activeAnimations: [{
|
|
128
175
|
type: Input
|
|
129
176
|
}], activeEffects: [{
|
|
@@ -158,7 +158,7 @@ FyModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", versi
|
|
|
158
158
|
}
|
|
159
159
|
</div>
|
|
160
160
|
}
|
|
161
|
-
`, isInline: true, styles: ["\n .fy-modal-overlay {\n position: fixed;\n inset: 0;\n background: var(--fy-effects-modal-overlayColor, rgba(0,0,0,0.45));\n z-index: 2000;\n }\n .fy-modal {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: var(--fy-effects-modal-background, var(--fy-colors-surface, #fff));\n border: var(--fy-effects-modal-borderWidth, 1px) solid var(--fy-effects-modal-borderColor, rgba(0,0,0,0.12));\n border-radius: var(--fy-effects-modal-borderRadius, var(--fy-borderRadius-md));\n box-shadow: var(--fy-effects-modal-shadow, 0 20px 60px rgba(0,0,0,0.2));\n color: var(--fy-colors-text);\n width: 90vw;\n max-width: 640px;\n max-height: 85vh;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n z-index: 2001;\n } \n .fy-modal--sm { max-width: 400px; }\n .fy-modal--md { max-width: 640px; }\n .fy-modal--lg { max-width: 840px; }\n .fy-modal--xl { max-width: 1040px; }\n .fy-modal--full { width: 96vw; height: 90vh; max-width: none; }\n\n .fy-modal__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 12px 16px;\n border-bottom: 1px solid var(--fy-effects-modal-dividerColor, rgba(0,0,0,0.08));\n }\n .fy-modal__title {\n margin: 0;\n font-size: var(--fy-typography-fontSize-lg, 18px);\n font-weight: var(--fy-typography-fontWeight-bold, 700);\n }\n .fy-modal__subtitle {\n margin: 0;\n opacity: .8;\n font-size: var(--fy-typography-fontSize-sm, 12px);\n }\n .fy-modal__close {\n border: 0;\n background: transparent;\n cursor: pointer;\n font-size: 20px;\n line-height: 1;\n }\n .fy-modal__body {\n padding: 16px;\n flex: 1; \n overflow: auto;\n }\n .fy-modal__footer {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n padding: 12px 16px;\n border-top: 1px solid var(--fy-effects-modal-dividerColor, rgba(0,0,0,0.08));\n }\n\n .fy-modal--status-success {\n border-color: var(--fy-colors-success, #22c55e);\n 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));\n }\n .fy-modal--status-error {\n border-color: var(--fy-colors-danger, #ef4444);\n 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));\n }\n\n .fy-animations-disabled, .fy-animations-disabled * {\n transition: none !important;\n animation: none !important;\n }\n "], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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 });
|
|
161
|
+
`, isInline: true, styles: ["\n .fy-modal-overlay {\n position: fixed;\n inset: 0;\n background: var(--fy-effects-modal-overlayColor, rgba(0,0,0,0.45));\n z-index: 2000;\n }\n .fy-modal {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: var(--fy-effects-modal-background, var(--fy-colors-surface, #fff));\n border: var(--fy-effects-modal-borderWidth, 1px) solid var(--fy-effects-modal-borderColor, rgba(0,0,0,0.12));\n border-radius: var(--fy-effects-modal-borderRadius, var(--fy-borderRadius-md));\n box-shadow: var(--fy-effects-modal-shadow, 0 20px 60px rgba(0,0,0,0.2));\n color: var(--fy-colors-text);\n width: 90vw;\n max-width: 640px;\n max-height: 85vh;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n z-index: 2001;\n } \n .fy-modal--sm { max-width: 400px; }\n .fy-modal--md { max-width: 640px; }\n .fy-modal--lg { max-width: 840px; }\n .fy-modal--xl { max-width: 1040px; }\n .fy-modal--full { width: 96vw; height: 90vh; max-width: none; }\n\n .fy-modal__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 12px 16px;\n border-bottom: 1px solid var(--fy-effects-modal-dividerColor, rgba(0,0,0,0.08));\n }\n .fy-modal__title {\n margin: 0;\n font-size: var(--fy-typography-fontSize-lg, 18px);\n font-weight: var(--fy-typography-fontWeight-bold, 700);\n }\n .fy-modal__subtitle {\n margin: 0;\n opacity: .8;\n font-size: var(--fy-typography-fontSize-sm, 12px);\n }\n .fy-modal__close {\n border: 0;\n background: transparent;\n cursor: pointer;\n font-size: 20px;\n line-height: 1;\n }\n .fy-modal__body {\n padding: 16px;\n flex: 1; \n overflow: auto;\n }\n .fy-modal__footer {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n padding: 12px 16px;\n border-top: 1px solid var(--fy-effects-modal-dividerColor, rgba(0,0,0,0.08));\n }\n\n .fy-modal--status-success {\n border-color: var(--fy-colors-success, #22c55e);\n 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));\n }\n .fy-modal--status-error {\n border-color: var(--fy-colors-danger, #ef4444);\n 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));\n }\n\n .fy-animations-disabled, .fy-animations-disabled * {\n transition: none !important;\n animation: none !important;\n }\n "], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: FyButtonComponent, selector: "fy-button", inputs: ["label", "variant", "size", "disabled", "loading", "icon", "iconName", "iconSet", "link", "target", "activeAnimations", "activeEffects", "customStyles", "hoverAnimation", "clickAnimation", "successAnimation", "errorAnimation", "hoverEffect", "clickEffect", "successEffect", "errorEffect"], outputs: ["fyClick"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
162
162
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FyModalComponent, decorators: [{
|
|
163
163
|
type: Component,
|
|
164
164
|
args: [{ selector: 'fy-modal', standalone: true, imports: [CommonModule, FyButtonComponent], template: `
|
|
@@ -74,7 +74,7 @@ export class FyNotificationMenuComponent extends BaseFyComponent {
|
|
|
74
74
|
this._notifications.set(current);
|
|
75
75
|
const limit = this.resolvedConfig().limit;
|
|
76
76
|
this.visibleLimit.set(Math.max(limit ?? 10, 10));
|
|
77
|
-
});
|
|
77
|
+
}, { allowSignalWrites: true });
|
|
78
78
|
}
|
|
79
79
|
initialLimit() {
|
|
80
80
|
const limit = this.resolvedConfig().limit;
|
|
@@ -306,7 +306,7 @@ FyTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", versi
|
|
|
306
306
|
</footer>
|
|
307
307
|
}
|
|
308
308
|
</div>
|
|
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 });
|
|
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", "link", "target", "activeAnimations", "activeEffects", "customStyles", "hoverAnimation", "clickAnimation", "successAnimation", "errorAnimation", "hoverEffect", "clickEffect", "successEffect", "errorEffect"], outputs: ["fyClick"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
310
310
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FyTableComponent, decorators: [{
|
|
311
311
|
type: Component,
|
|
312
312
|
args: [{ selector: 'fy-table', standalone: true, imports: [
|
|
@@ -12,19 +12,17 @@ export class FyTextComponent {
|
|
|
12
12
|
effect(async () => {
|
|
13
13
|
const raw = this._raw();
|
|
14
14
|
const cfg = this.fylib.config().crypto;
|
|
15
|
+
let finalValue = raw;
|
|
15
16
|
if (this.cryptoEnabled && cfg?.enabled) {
|
|
16
17
|
try {
|
|
17
|
-
|
|
18
|
-
this.value.set(dec);
|
|
18
|
+
finalValue = await cryptoEngine.decrypt(raw, cfg);
|
|
19
19
|
}
|
|
20
20
|
catch {
|
|
21
|
-
|
|
21
|
+
finalValue = raw;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
});
|
|
24
|
+
this.value.set(finalValue);
|
|
25
|
+
}, { allowSignalWrites: true });
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
FyTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FyTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -17,6 +17,8 @@ export class FyToastComponent extends BaseFyComponent {
|
|
|
17
17
|
this.customStyles = null;
|
|
18
18
|
this.fyClose = new EventEmitter();
|
|
19
19
|
this.isClosing = signal(false, ...(ngDevMode ? [{ debugName: "isClosing" }] : /* istanbul ignore next */ []));
|
|
20
|
+
// Garantir que efeitos reativos sejam permitidos se necessário no futuro
|
|
21
|
+
// (Por enquanto o Toast usa ngOnInit para disparar eventos)
|
|
20
22
|
}
|
|
21
23
|
ngOnInit() {
|
|
22
24
|
if (this.duration > 0) {
|
|
@@ -5,6 +5,7 @@ export declare class FyLayoutComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
5
5
|
private fylib;
|
|
6
6
|
private platformId;
|
|
7
7
|
private layoutEffectId;
|
|
8
|
+
protected currentTheme: import("@angular/core").WritableSignal<string>;
|
|
8
9
|
name: string;
|
|
9
10
|
activeAnimations: boolean | null;
|
|
10
11
|
activeEffects: boolean | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Input, ViewEncapsulation, HostBinding, inject, effect, PLATFORM_ID } from '@angular/core';
|
|
1
|
+
import { Component, Input, ViewEncapsulation, HostBinding, inject, effect, PLATFORM_ID, signal } from '@angular/core';
|
|
2
2
|
import { CommonModule, isPlatformBrowser } from '@angular/common';
|
|
3
3
|
import { FyLibService } from '../services/fylib.service';
|
|
4
4
|
import { AppLayoutDefinition } from '@fylib/catalog';
|
|
@@ -13,6 +13,7 @@ export class FyLayoutComponent {
|
|
|
13
13
|
this.fylib = inject(FyLibService);
|
|
14
14
|
this.platformId = inject(PLATFORM_ID);
|
|
15
15
|
this.layoutEffectId = `layout-bg-effect-${Math.random().toString(36).substr(2, 9)}`;
|
|
16
|
+
this.currentTheme = signal('default', ...(ngDevMode ? [{ debugName: "currentTheme" }] : /* istanbul ignore next */ []));
|
|
16
17
|
this.name = AppLayoutDefinition.name;
|
|
17
18
|
this.activeAnimations = null;
|
|
18
19
|
this.activeEffects = null;
|
|
@@ -22,9 +23,14 @@ export class FyLayoutComponent {
|
|
|
22
23
|
this.bgEffectLoop = null;
|
|
23
24
|
// Reage a mudanças na configuração global de efeitos de tema (themeEffectsEnabled)
|
|
24
25
|
effect(() => {
|
|
25
|
-
this.fylib.config();
|
|
26
|
+
const config = this.fylib.config();
|
|
27
|
+
// Sincronizar o sinal currentTheme de forma segura
|
|
28
|
+
const theme = config.theme?.theme;
|
|
29
|
+
if (theme) {
|
|
30
|
+
this.currentTheme.set(theme);
|
|
31
|
+
}
|
|
26
32
|
this.applyBgEffect();
|
|
27
|
-
});
|
|
33
|
+
}, { allowSignalWrites: true });
|
|
28
34
|
}
|
|
29
35
|
ngOnInit() {
|
|
30
36
|
if (!isPlatformBrowser(this.platformId))
|
|
@@ -4,6 +4,16 @@ exports.ngAdd = ngAdd;
|
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
5
|
const core_1 = require("@angular-devkit/core");
|
|
6
6
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
7
|
+
const THEMES = [
|
|
8
|
+
{ id: 'default', name: 'Padrão', color: '#3b82f6', icon: 'star' },
|
|
9
|
+
{ id: 'finey-workbench-1', name: 'Workbench', color: '#007aff', icon: 'briefcase' },
|
|
10
|
+
{ id: 'finey-puffy-1', name: 'Puffy', color: '#ff85a2', icon: 'heart' },
|
|
11
|
+
{ id: 'windows-xp', name: 'Legacy XP', color: '#3a6ea5', icon: 'monitor' },
|
|
12
|
+
{ id: 'windows-7', name: 'Legacy 7', color: '#2979ff', icon: 'desktop' },
|
|
13
|
+
{ id: 'christmas', name: 'Natal', color: '#af111c', icon: 'gift' },
|
|
14
|
+
{ id: 'finey-nexus-1', name: 'Nexus', color: '#6366f1', icon: 'cpu' },
|
|
15
|
+
{ id: 'finey-hub-1', name: 'Hub', color: '#22c55e', icon: 'layout' }
|
|
16
|
+
];
|
|
7
17
|
function ngAdd(options) {
|
|
8
18
|
return (tree, context) => {
|
|
9
19
|
return (0, schematics_1.chain)([
|
|
@@ -95,7 +105,7 @@ function updateAppComponent() {
|
|
|
95
105
|
content = content.replace(/@Component\({/, `@Component({\n standalone: true,\n imports: [\n FyThemeVarsDirective, FyLayoutComponent, FyCardComponent, FyButtonComponent, FyIconComponent, FyTextComponent\n ],`);
|
|
96
106
|
}
|
|
97
107
|
// 4. Update Class Definition
|
|
98
|
-
content = content.replace(/export class (\w+) \{/, `export class $1 implements OnInit {\n private fylib = inject(FyLibService);\n private sse = inject(FySSEService);\n protected readonly mode = signal<'light' | 'dark'>('light');\n\n ngOnInit() {\n this.fylib.setTheme(themeConfig.theme);\n this.fylib.setMode(this.mode());\n }\n`);
|
|
108
|
+
content = content.replace(/export class (\w+) \{/, `export class $1 implements OnInit {\n private fylib = inject(FyLibService);\n private sse = inject(FySSEService);\n protected readonly mode = signal<'light' | 'dark'>('light');\n protected readonly themes = ${JSON.stringify(THEMES, null, 2)};\n\n ngOnInit() {\n this.fylib.setTheme(themeConfig.theme);\n this.fylib.setMode(this.mode());\n }\n\n changeTheme(theme: string) {\n this.fylib.setTheme(theme as any);\n }\n`);
|
|
99
109
|
tree.overwrite(targetPath, content);
|
|
100
110
|
return tree;
|
|
101
111
|
};
|
|
@@ -145,12 +155,8 @@ function getWelcomeHTML() {
|
|
|
145
155
|
</p>
|
|
146
156
|
|
|
147
157
|
<div class="welcome-actions">
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
</a>
|
|
151
|
-
<a href="https://www.linkedin.com/in/victor-barberino-373797231/" target="_blank">
|
|
152
|
-
<fy-button variant="secondary" label="LinkedIn do Autor" iconName="user"></fy-button>
|
|
153
|
-
</a>
|
|
158
|
+
<fy-button variant="primary" label="GitHub do Projeto" iconName="search" link="https://github.com/dfiney/fylib/" target="_blank"></fy-button>
|
|
159
|
+
<fy-button variant="secondary" label="LinkedIn do Autor" iconName="user" link="https://www.linkedin.com/in/victor-barberino-373797231/" target="_blank"></fy-button>
|
|
154
160
|
</div>
|
|
155
161
|
</div>
|
|
156
162
|
|
|
@@ -158,6 +164,27 @@ function getWelcomeHTML() {
|
|
|
158
164
|
<fy-text text="© Finey 2026 · Built with Passion"></fy-text>
|
|
159
165
|
</div>
|
|
160
166
|
</fy-card>
|
|
167
|
+
|
|
168
|
+
<div class="theme-catalog">
|
|
169
|
+
<h3 class="catalog-title">Explore nossos Temas</h3>
|
|
170
|
+
<div class="theme-grid">
|
|
171
|
+
@for (theme of themes; track theme.id) {
|
|
172
|
+
<fy-card (click)="changeTheme(theme.id)" class="theme-card">
|
|
173
|
+
<div class="theme-card-content">
|
|
174
|
+
<div class="theme-icon-box" [style.background]="theme.color">
|
|
175
|
+
<fy-icon [name]="theme.icon" size="md"></fy-icon>
|
|
176
|
+
</div>
|
|
177
|
+
<span class="theme-name">{{ theme.name }}</span>
|
|
178
|
+
<div class="theme-palette">
|
|
179
|
+
<div class="color-dot" [style.background]="theme.color"></div>
|
|
180
|
+
<div class="color-dot" style="background: #64748b"></div>
|
|
181
|
+
<div class="color-dot" style="background: #f1f5f9"></div>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
</fy-card>
|
|
185
|
+
}
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
161
188
|
</div>
|
|
162
189
|
</fy-layout>
|
|
163
190
|
</div>
|
|
@@ -170,15 +197,19 @@ function getWelcomeHTML() {
|
|
|
170
197
|
}
|
|
171
198
|
.welcome-container {
|
|
172
199
|
display: flex;
|
|
200
|
+
flex-direction: column;
|
|
173
201
|
align-items: center;
|
|
174
|
-
justify-content:
|
|
202
|
+
justify-content: flex-start;
|
|
175
203
|
height: 100%;
|
|
176
|
-
padding: 20px;
|
|
204
|
+
padding: 60px 20px;
|
|
205
|
+
overflow-y: auto;
|
|
206
|
+
gap: 40px;
|
|
177
207
|
}
|
|
178
208
|
.welcome-card {
|
|
179
|
-
max-width:
|
|
209
|
+
max-width: 600px;
|
|
180
210
|
width: 100%;
|
|
181
211
|
animation: fadeInScale 0.6s ease-out;
|
|
212
|
+
flex-shrink: 0;
|
|
182
213
|
}
|
|
183
214
|
.welcome-header {
|
|
184
215
|
display: flex;
|
|
@@ -213,9 +244,6 @@ function getWelcomeHTML() {
|
|
|
213
244
|
flex-direction: column;
|
|
214
245
|
gap: 12px;
|
|
215
246
|
}
|
|
216
|
-
.welcome-actions a {
|
|
217
|
-
width: 100%;
|
|
218
|
-
}
|
|
219
247
|
.welcome-actions fy-button {
|
|
220
248
|
width: 100%;
|
|
221
249
|
}
|
|
@@ -225,10 +253,68 @@ function getWelcomeHTML() {
|
|
|
225
253
|
justify-content: center;
|
|
226
254
|
}
|
|
227
255
|
|
|
256
|
+
.theme-catalog {
|
|
257
|
+
width: 100%;
|
|
258
|
+
max-width: 1000px;
|
|
259
|
+
animation: fadeInUp 0.8s ease-out;
|
|
260
|
+
}
|
|
261
|
+
.catalog-title {
|
|
262
|
+
font-size: 20px;
|
|
263
|
+
font-weight: 700;
|
|
264
|
+
margin-bottom: 24px;
|
|
265
|
+
text-align: center;
|
|
266
|
+
color: var(--fy-colors-text);
|
|
267
|
+
}
|
|
268
|
+
.theme-grid {
|
|
269
|
+
display: grid;
|
|
270
|
+
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
271
|
+
gap: 20px;
|
|
272
|
+
}
|
|
273
|
+
.theme-card {
|
|
274
|
+
cursor: pointer;
|
|
275
|
+
transition: transform 0.2s;
|
|
276
|
+
}
|
|
277
|
+
.theme-card:hover {
|
|
278
|
+
transform: translateY(-5px);
|
|
279
|
+
}
|
|
280
|
+
.theme-card-content {
|
|
281
|
+
display: flex;
|
|
282
|
+
flex-direction: column;
|
|
283
|
+
align-items: center;
|
|
284
|
+
gap: 12px;
|
|
285
|
+
padding: 20px;
|
|
286
|
+
}
|
|
287
|
+
.theme-icon-box {
|
|
288
|
+
width: 48px;
|
|
289
|
+
height: 48px;
|
|
290
|
+
border-radius: 12px;
|
|
291
|
+
display: flex;
|
|
292
|
+
align-items: center;
|
|
293
|
+
justify-content: center;
|
|
294
|
+
color: white;
|
|
295
|
+
}
|
|
296
|
+
.theme-name {
|
|
297
|
+
font-weight: 600;
|
|
298
|
+
font-size: 14px;
|
|
299
|
+
}
|
|
300
|
+
.theme-palette {
|
|
301
|
+
display: flex;
|
|
302
|
+
gap: 4px;
|
|
303
|
+
}
|
|
304
|
+
.color-dot {
|
|
305
|
+
width: 12px;
|
|
306
|
+
height: 12px;
|
|
307
|
+
border-radius: 50%;
|
|
308
|
+
}
|
|
309
|
+
|
|
228
310
|
@keyframes fadeInScale {
|
|
229
311
|
from { opacity: 0; transform: scale(0.95) translateY(10px); }
|
|
230
312
|
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
231
313
|
}
|
|
314
|
+
@keyframes fadeInUp {
|
|
315
|
+
from { opacity: 0; transform: translateY(20px); }
|
|
316
|
+
to { opacity: 1; transform: translateY(0); }
|
|
317
|
+
}
|
|
232
318
|
</style>
|
|
233
319
|
`;
|
|
234
320
|
}
|
|
@@ -254,23 +340,49 @@ import {
|
|
|
254
340
|
styles: [\`
|
|
255
341
|
:host { display: block; height: 100vh; }
|
|
256
342
|
.fy-app-container { height: 100vh; width: 100%; overflow: hidden; }
|
|
257
|
-
.welcome-container { display: flex; align-items: center; justify-content:
|
|
258
|
-
.welcome-card { max-width:
|
|
343
|
+
.welcome-container { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; height: 100%; padding: 60px 20px; overflow-y: auto; gap: 40px; }
|
|
344
|
+
.welcome-card { max-width: 600px; width: 100%; animation: fadeInScale 0.6s ease-out; flex-shrink: 0; }
|
|
259
345
|
.welcome-header { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 32px 0 16px; }
|
|
260
346
|
.logo-box { background: var(--fy-colors-primary); color: white; padding: 16px; border-radius: 16px; box-shadow: 0 8px 16px rgba(var(--fy-colors-primary-rgb), 0.3); }
|
|
261
347
|
.welcome-title { font-size: 28px; font-weight: 800; color: var(--fy-colors-text); }
|
|
262
348
|
.welcome-content { text-align: center; padding: 0 24px 24px; }
|
|
263
349
|
.welcome-desc { color: var(--fy-colors-secondary); line-height: 1.6; margin-bottom: 32px; }
|
|
264
350
|
.welcome-actions { display: flex; flex-direction: column; gap: 12px; }
|
|
265
|
-
.welcome-actions a { width: 100%; }
|
|
266
351
|
.welcome-footer { opacity: 0.6; font-size: 12px; justify-content: center; }
|
|
352
|
+
|
|
353
|
+
.theme-catalog { width: 100%; max-width: 1000px; animation: fadeInUp 0.8s ease-out; }
|
|
354
|
+
.catalog-title { font-size: 20px; font-weight: 700; margin-bottom: 24px; text-align: center; color: var(--fy-colors-text); }
|
|
355
|
+
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
|
|
356
|
+
.theme-card { cursor: pointer; transition: transform 0.2s; }
|
|
357
|
+
.theme-card:hover { transform: translateY(-5px); }
|
|
358
|
+
.theme-card-content { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px; }
|
|
359
|
+
.theme-icon-box { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; }
|
|
360
|
+
.theme-name { font-weight: 600; font-size: 14px; }
|
|
361
|
+
.theme-palette { display: flex; gap: 4px; }
|
|
362
|
+
.color-dot { width: 12px; height: 12px; border-radius: 50%; }
|
|
363
|
+
|
|
267
364
|
@keyframes fadeInScale {
|
|
268
365
|
from { opacity: 0; transform: scale(0.95) translateY(10px); }
|
|
269
366
|
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
270
367
|
}
|
|
368
|
+
@keyframes fadeInUp {
|
|
369
|
+
from { opacity: 0; transform: translateY(20px); }
|
|
370
|
+
to { opacity: 1; transform: translateY(0); }
|
|
371
|
+
}
|
|
271
372
|
\`]
|
|
272
373
|
})
|
|
273
|
-
export class FylibWelcomeComponent {
|
|
374
|
+
export class FylibWelcomeComponent implements OnInit {
|
|
375
|
+
private fylib = inject(FyLibService);
|
|
376
|
+
protected readonly themes = ${JSON.stringify(THEMES, null, 2)};
|
|
377
|
+
|
|
378
|
+
ngOnInit() {
|
|
379
|
+
this.fylib.setTheme('default');
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
changeTheme(theme: string) {
|
|
383
|
+
this.fylib.setTheme(theme as any);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
274
386
|
`;
|
|
275
387
|
const htmlContent = getWelcomeHTML();
|
|
276
388
|
tree.create(`${componentDir}/fylib-welcome.component.ts`, tsContent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;AA2BA,sBAUC;AArCD,2DAYoC;AACpC,+CAAqD;AACrD,4DAA0E;AAE1E,MAAM,MAAM,GAAG;IACb,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;IACjE,EAAE,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE;IACnF,EAAE,EAAE,EAAE,eAAe,EAA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,CAAC,GAAG,YAAY,+BAA+B,EAAE,WAAW,CAAC,CAAC;QAEzE,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,YAAY;IACnB,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,MAAM,UAAU,GAAG,uBAAuB,CAAC;QAC3C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;YAAE,OAAO,IAAI,CAAC;QAE1C,IAAI,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAC7D,IAAI,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC;YAAE,OAAO,IAAI,CAAC;QAEnD,aAAa;QACb,OAAO,GAAG,oFAAoF,GAAG,OAAO,CAAC;QAEzG,gCAAgC;QAChC,OAAO,GAAG,OAAO,CAAC,OAAO,CACvB,kCAAkC,EAClC,iGAAiG,CAClG,CAAC;QAEF,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB;IAC1B,OAAO,CAAC,KAAW,EAAE,OAAyB,EAAE,EAAE;QAChD,OAAO,CAAC,OAAO,CACb,IAAI,8BAAsB,CAAC;YACzB,WAAW,EAAE;gBACX,aAAa;gBACb,eAAe;gBACf,cAAc;gBACd,kBAAkB;gBAClB,gBAAgB;gBAChB,eAAe;gBACf,eAAe;gBACf,wBAAwB;aACzB,CAAC,IAAI,CAAC,GAAG,CAAC;SACZ,CAAC,CACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -28,6 +28,9 @@ export class FySSEService {
|
|
|
28
28
|
return;
|
|
29
29
|
this.disconnect();
|
|
30
30
|
try {
|
|
31
|
+
if (!this.config.endpoint) {
|
|
32
|
+
throw new Error('[fyLib/SSE] endpoint is required when SSE is enabled');
|
|
33
|
+
}
|
|
31
34
|
this.eventSource = new EventSource(this.config.endpoint, {
|
|
32
35
|
withCredentials: this.config.withCredentials ?? false
|
|
33
36
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fylib/adapter-angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"ng2-charts": "^10.0.0",
|
|
25
25
|
"rxjs": "~7.8.0",
|
|
26
26
|
"tslib": "^2.3.0",
|
|
27
|
-
"@fylib/core": "0.2.
|
|
28
|
-
"@fylib/theme": "0.2.
|
|
29
|
-
"@fylib/animation": "0.2.
|
|
30
|
-
"@fylib/
|
|
31
|
-
"@fylib/
|
|
32
|
-
"@fylib/
|
|
33
|
-
"@fylib/logger": "0.2.
|
|
27
|
+
"@fylib/core": "0.2.2",
|
|
28
|
+
"@fylib/theme": "0.2.2",
|
|
29
|
+
"@fylib/animation": "0.2.2",
|
|
30
|
+
"@fylib/catalog": "0.3.0",
|
|
31
|
+
"@fylib/config": "0.2.3",
|
|
32
|
+
"@fylib/crypto": "0.2.2",
|
|
33
|
+
"@fylib/logger": "0.2.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"typescript": "^5.9.3",
|