@rededor/site-front-end-lib 20.0.0-alpha.6 → 20.0.0-alpha.7
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/components/cta-wrapper/index.d.ts +3 -1
- package/components/footer/index.d.ts +6 -1
- package/components/section-navigation/index.d.ts +2 -0
- package/components/sidebar-navigation/index.d.ts +6 -1
- package/components/sticky-navigation/index.d.ts +6 -3
- package/core/index.d.ts +2 -0
- package/fesm2022/rededor-site-front-end-lib-components-banner.mjs +2 -2
- package/fesm2022/rededor-site-front-end-lib-components-banner.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-cta-wrapper.mjs +7 -3
- package/fesm2022/rededor-site-front-end-lib-components-cta-wrapper.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-error.mjs +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-error.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-filter-letter-and-terms.mjs +2 -2
- package/fesm2022/rededor-site-front-end-lib-components-filter-letter-and-terms.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-footer.mjs +3 -2
- package/fesm2022/rededor-site-front-end-lib-components-footer.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-section-navigation.mjs +7 -2
- package/fesm2022/rededor-site-front-end-lib-components-section-navigation.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-sidebar-navigation.mjs +17 -7
- package/fesm2022/rededor-site-front-end-lib-components-sidebar-navigation.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-sticky-navigation.mjs +17 -9
- package/fesm2022/rededor-site-front-end-lib-components-sticky-navigation.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-core.mjs +32 -6
- package/fesm2022/rededor-site-front-end-lib-core.mjs.map +1 -1
- package/package.json +9 -9
|
@@ -13,6 +13,7 @@ declare class CtaWrapperComponent implements OnInit {
|
|
|
13
13
|
border: string;
|
|
14
14
|
icon: string;
|
|
15
15
|
}>;
|
|
16
|
+
readonly ctaWrapperItemClick: _angular_core.OutputEmitterRef<Event>;
|
|
16
17
|
carouselCtasConfig: NguCarouselConfig;
|
|
17
18
|
bannerControl: boolean;
|
|
18
19
|
seeMoreControl: boolean;
|
|
@@ -24,8 +25,9 @@ declare class CtaWrapperComponent implements OnInit {
|
|
|
24
25
|
class: string[];
|
|
25
26
|
ngOnInit(): void;
|
|
26
27
|
moreOptions(): void;
|
|
28
|
+
ctaWrapperItemClicked(event: Event): void;
|
|
27
29
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CtaWrapperComponent, never>;
|
|
28
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CtaWrapperComponent, "rdsite-cta-wrapper", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "showTitleAndText": { "alias": "showTitleAndText"; "required": false; "isSignal": true; }; "colors": { "alias": "colors"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
30
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CtaWrapperComponent, "rdsite-cta-wrapper", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "showTitleAndText": { "alias": "showTitleAndText"; "required": false; "isSignal": true; }; "colors": { "alias": "colors"; "required": false; "isSignal": true; }; }, { "ctaWrapperItemClick": "ctaWrapperItemClick"; }, never, never, true, never>;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export { CtaWrapperComponent };
|
|
@@ -13,6 +13,11 @@ declare class FooterComponent implements AfterViewInit {
|
|
|
13
13
|
logo: _angular_core.InputSignal<any>;
|
|
14
14
|
partnerLogo: _angular_core.InputSignal<any>;
|
|
15
15
|
phone: _angular_core.InputSignal<string>;
|
|
16
|
+
dora: _angular_core.InputSignal<{
|
|
17
|
+
number: string;
|
|
18
|
+
link: string;
|
|
19
|
+
imgUrl: string;
|
|
20
|
+
}>;
|
|
16
21
|
socialMenu: _angular_core.InputSignal<MenuSocialMedia[]>;
|
|
17
22
|
logoWidth: _angular_core.InputSignal<number>;
|
|
18
23
|
footerMenu: _angular_core.InputSignal<MenuItem[]>;
|
|
@@ -32,7 +37,7 @@ declare class FooterComponent implements AfterViewInit {
|
|
|
32
37
|
footerPrivacyClicked(event: Event): void;
|
|
33
38
|
footerCookieClicked(event: Event): void;
|
|
34
39
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FooterComponent, never>;
|
|
35
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FooterComponent, "footer[sl-ftr]", never, { "project": { "alias": "project"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "disclaimer": { "alias": "disclaimer"; "required": false; "isSignal": true; }; "linkPrivacyFooter": { "alias": "linkPrivacyFooter"; "required": false; "isSignal": true; }; "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "partnerLogo": { "alias": "partnerLogo"; "required": false; "isSignal": true; }; "phone": { "alias": "phone"; "required": false; "isSignal": true; }; "socialMenu": { "alias": "socialMenu"; "required": false; "isSignal": true; }; "logoWidth": { "alias": "logoWidth"; "required": false; "isSignal": true; }; "footerMenu": { "alias": "footerMenu"; "required": false; "isSignal": true; }; }, { "footerPrivacyClick": "footerPrivacyClick"; "footerCookieClick": "footerCookieClick"; "footerSocialMediaClick": "footerSocialMediaClick"; "footerMenuItemClick": "footerMenuItemClick"; }, never, never, true, never>;
|
|
40
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FooterComponent, "footer[sl-ftr]", never, { "project": { "alias": "project"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "disclaimer": { "alias": "disclaimer"; "required": false; "isSignal": true; }; "linkPrivacyFooter": { "alias": "linkPrivacyFooter"; "required": false; "isSignal": true; }; "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "partnerLogo": { "alias": "partnerLogo"; "required": false; "isSignal": true; }; "phone": { "alias": "phone"; "required": false; "isSignal": true; }; "dora": { "alias": "dora"; "required": false; "isSignal": true; }; "socialMenu": { "alias": "socialMenu"; "required": false; "isSignal": true; }; "logoWidth": { "alias": "logoWidth"; "required": false; "isSignal": true; }; "footerMenu": { "alias": "footerMenu"; "required": false; "isSignal": true; }; }, { "footerPrivacyClick": "footerPrivacyClick"; "footerCookieClick": "footerCookieClick"; "footerSocialMediaClick": "footerSocialMediaClick"; "footerMenuItemClick": "footerMenuItemClick"; }, never, never, true, never>;
|
|
36
41
|
}
|
|
37
42
|
|
|
38
43
|
export { FooterComponent };
|
|
@@ -5,6 +5,7 @@ import { Subscription, BehaviorSubject } from 'rxjs';
|
|
|
5
5
|
|
|
6
6
|
declare class SectionNavigationComponent implements OnInit, OnDestroy {
|
|
7
7
|
private curaApiService;
|
|
8
|
+
private router;
|
|
8
9
|
readonly sections: _angular_core.WritableSignal<SectionNavigationData[]>;
|
|
9
10
|
readonly config: _angular_core.WritableSignal<SectionNavigationConfig | undefined>;
|
|
10
11
|
readonly activeSection: _angular_core.WritableSignal<string>;
|
|
@@ -33,6 +34,7 @@ declare class SectionNavigationComponent implements OnInit, OnDestroy {
|
|
|
33
34
|
ngOnInit(): void;
|
|
34
35
|
private windowScroll;
|
|
35
36
|
scrollToMenuAnchor(anchorId: string): void;
|
|
37
|
+
getPath(sectionId: string): string;
|
|
36
38
|
ngOnDestroy(): void;
|
|
37
39
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SectionNavigationComponent, never>;
|
|
38
40
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SectionNavigationComponent, "nav[rdsite-section-navigation]", never, { "navigationSections": { "alias": "navigationSections"; "required": true; }; "navigationConfig": { "alias": "navigationConfig"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "anchorAdjustment": { "alias": "anchorAdjustment"; "required": false; "isSignal": true; }; }, { "sectionChange": "sectionChange"; }, never, never, true, never>;
|
|
@@ -4,12 +4,15 @@ import { SectionNavigationData, SectionNavigationConfig } from '@rededor/site-fr
|
|
|
4
4
|
|
|
5
5
|
declare class SidebarNavigationComponent {
|
|
6
6
|
private readonly curaApiService;
|
|
7
|
+
private router;
|
|
7
8
|
readonly sections: _angular_core.WritableSignal<SectionNavigationData[]>;
|
|
8
9
|
readonly config: _angular_core.WritableSignal<SectionNavigationConfig | undefined>;
|
|
9
10
|
readonly activeSection: _angular_core.WritableSignal<string>;
|
|
11
|
+
selectedIndex: _angular_core.WritableSignal<number>;
|
|
10
12
|
readonly anchorAdjustment: _angular_core.InputSignal<number>;
|
|
11
13
|
readonly title: _angular_core.InputSignal<string>;
|
|
12
14
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
15
|
+
readonly padding: _angular_core.InputSignal<number>;
|
|
13
16
|
set navigationSections(value: SectionNavigationData[]);
|
|
14
17
|
set navigationConfig(value: SectionNavigationConfig);
|
|
15
18
|
readonly anchorsEl: _angular_core.Signal<readonly ElementRef<HTMLAnchorElement>[]>;
|
|
@@ -19,8 +22,10 @@ declare class SidebarNavigationComponent {
|
|
|
19
22
|
'--font-family': string;
|
|
20
23
|
};
|
|
21
24
|
private windowScroll;
|
|
25
|
+
getPath(sectionId: string): string;
|
|
26
|
+
onSectionClick(event: SectionNavigationData): void;
|
|
22
27
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidebarNavigationComponent, never>;
|
|
23
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarNavigationComponent, "nav[rdsite-sidebar-navigation]", never, { "anchorAdjustment": { "alias": "anchorAdjustment"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "navigationSections": { "alias": "navigationSections"; "required": true; }; "navigationConfig": { "alias": "navigationConfig"; "required": false; }; }, { "sectionChange": "sectionChange"; }, never, never, true, never>;
|
|
28
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarNavigationComponent, "nav[rdsite-sidebar-navigation]", never, { "anchorAdjustment": { "alias": "anchorAdjustment"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "padding": { "alias": "padding"; "required": false; "isSignal": true; }; "navigationSections": { "alias": "navigationSections"; "required": true; }; "navigationConfig": { "alias": "navigationConfig"; "required": false; }; }, { "sectionChange": "sectionChange"; }, never, never, true, never>;
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
export { SidebarNavigationComponent };
|
|
@@ -4,11 +4,12 @@ import { SectionNavigationData, SectionNavigationConfig } from '@rededor/site-fr
|
|
|
4
4
|
|
|
5
5
|
declare class StickyNavigationComponent {
|
|
6
6
|
private curaApiService;
|
|
7
|
+
private router;
|
|
7
8
|
readonly sections: _angular_core.WritableSignal<SectionNavigationData[]>;
|
|
8
9
|
readonly config: _angular_core.WritableSignal<SectionNavigationConfig | undefined>;
|
|
9
10
|
readonly activeSection: _angular_core.WritableSignal<string>;
|
|
10
|
-
isOpen: boolean
|
|
11
|
-
selectedIndex: number
|
|
11
|
+
readonly isOpen: _angular_core.WritableSignal<boolean>;
|
|
12
|
+
selectedIndex: _angular_core.WritableSignal<number>;
|
|
12
13
|
readonly anchorAdjustment: _angular_core.InputSignal<number>;
|
|
13
14
|
readonly title: _angular_core.InputSignal<string>;
|
|
14
15
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
@@ -23,7 +24,9 @@ declare class StickyNavigationComponent {
|
|
|
23
24
|
'--font-family': string;
|
|
24
25
|
};
|
|
25
26
|
private windowScroll;
|
|
26
|
-
|
|
27
|
+
getPath(sectionId: string): string;
|
|
28
|
+
onSectionClick(event: SectionNavigationData): void;
|
|
29
|
+
toggleOpen(): void;
|
|
27
30
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StickyNavigationComponent, never>;
|
|
28
31
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StickyNavigationComponent, "nav[rdsite-sticky-navigation]", never, { "anchorAdjustment": { "alias": "anchorAdjustment"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "padding": { "alias": "padding"; "required": false; "isSignal": true; }; "navigationSections": { "alias": "navigationSections"; "required": true; }; "navigationConfig": { "alias": "navigationConfig"; "required": false; }; }, { "sectionChange": "sectionChange"; }, never, never, true, never>;
|
|
29
32
|
}
|
package/core/index.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ declare class RdsiteLinkDirective {
|
|
|
70
70
|
private siteUrlList;
|
|
71
71
|
private allowedTags;
|
|
72
72
|
onClick(event: Event): void;
|
|
73
|
+
private verifyUtm;
|
|
73
74
|
private isPhone;
|
|
74
75
|
private isMail;
|
|
75
76
|
private phoneClicked;
|
|
@@ -77,6 +78,7 @@ declare class RdsiteLinkDirective {
|
|
|
77
78
|
private isExternalUrl;
|
|
78
79
|
private isSiteUrl;
|
|
79
80
|
private isAnchor;
|
|
81
|
+
private getAnchor;
|
|
80
82
|
private scrollToAnchor;
|
|
81
83
|
private navigateTo;
|
|
82
84
|
static ɵfac: i0.ɵɵFactoryDeclaration<RdsiteLinkDirective, never>;
|
|
@@ -26,11 +26,11 @@ class ContentBannerComponent {
|
|
|
26
26
|
this.ctaClick.emit({ text, link });
|
|
27
27
|
}
|
|
28
28
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: ContentBannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
29
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: ContentBannerComponent, isStandalone: true, selector: "rdsite-content-banner", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ctaClick: "ctaClick" }, host: { properties: { "style": "this.styleBinding" } }, ngImport: i0, template: "@if (content()?.title) {\
|
|
29
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: ContentBannerComponent, isStandalone: true, selector: "rdsite-content-banner", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ctaClick: "ctaClick" }, host: { properties: { "style": "this.styleBinding" } }, ngImport: i0, template: "@if (content()?.title) {\n <cura-heading [level]=\"4\" weight=\"bold\" color=\"neutral-purewhite\" marginBlock=\"0\">\n {{ content()?.title }}\n </cura-heading>\n}\n\n@if (content()?.text) {\n <cura-paragraph color=\"neutral-purewhite\" marginBlock=\"0\">\n {{ content()?.text }}\n </cura-paragraph>\n}\n\n@if (content()?.info?.length) {\n <div class=\"info\" data-testid=\"_content-banner-info\">\n @for (item of content()?.info || []; track $index) {\n @if (item.text) {\n <a [ngClass]=\"{ disabled: !item.link }\" rdsitelink [href]=\"item.link || ''\">\n @if (item.icon) {\n <cura-icon [name]=\"item.icon\" size=\"16\" color=\"neutral-purewhite\"></cura-icon>\n }\n {{ item.text }}\n </a>\n }\n }\n </div>\n}\n\n@if (content()?.cta?.text && content()?.cta?.link) {\n <cura-button\n rdsitelink\n (click)=\"onCtaClick(content()?.cta?.text || '', content()?.cta?.link || '')\"\n size=\"large\"\n type=\"button\"\n color=\"accent\"\n [iconName]=\"content()?.cta?.icon || ''\"\n [href]=\"content()!.cta.link\"\n target=\"_self\"\n >\n {{ content()?.cta?.text }}\n </cura-button>\n}\n\n@if (content()?.image) {\n <rdsite-image\n [imageDefaultSrc]=\"content()?.image.url\"\n [imageWebpSrc]=\"content()?.image?.webp_url\"\n [title]=\"content()?.image.title\"\n [alt]=\"content()?.image.alt\"\n >\n </rdsite-image>\n}\n", styles: [":host{position:relative;z-index:0;display:block;width:100%;height:auto;padding:32px 56px 96px;margin-bottom:30px;border-radius:4px;background:linear-gradient(90deg,#004186 7.78%,#1163a1 40.08%,#2791c6 76.03%,#36b1df 95.14%)}:host cura-heading{position:relative;z-index:2;margin-bottom:8px}:host cura-paragraph{position:relative;z-index:2;margin-bottom:20px}:host .info{position:relative;z-index:2;display:flex;flex-direction:column;align-items:stretch;gap:10px;margin-top:20px}:host .info>a{display:flex;justify-content:flex-start;align-items:center;gap:8px;width:fit-content;min-height:34px;color:var(--neutral-purewhite);font-size:12px;font-weight:500;line-height:13px;letter-spacing:.72px;padding:4px 20px;border-radius:20px;background:var(--color-one-lighter);text-decoration:none}:host .info>a.disabled{pointer-events:none}:host .info>a cura-icon{display:flex;justify-content:center;align-items:center;width:20px;height:20px;border:1.5px solid var(--neutral-purewhite);border-radius:50%}:host cura-button{position:relative;z-index:2;margin-top:30px}:host rdsite-image{position:absolute;z-index:1;bottom:0;right:40px;height:90%}:host rdsite-image ::ng-deep .rdsite-image{height:100%}:host rdsite-image ::ng-deep .rdsite-image img{height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RdsiteLinkDirective, selector: "[rdsitelink]", inputs: ["anchorAdjustment", "anchorExtraAdjustment", "phonemodal"] }, { kind: "component", type: ImageComponent, selector: "rdsite-image", inputs: ["imageWebpSrc", "imageDefaultSrc", "imageSizes", "mimeType", "alt", "title", "loading"], outputs: ["imageDefaultSrcChange", "mimeTypeChange"] }, { kind: "component", type: CuraHeadingComponent, selector: "cura-heading", inputs: ["level", "size", "weight", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: CuraParagraphComponent, selector: "cura-paragraph", inputs: ["size", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: CuraButtonComponent, selector: "cura-button", inputs: ["type", "size", "disabled", "isLoading", "iconName", "iconset", "iconPosition", "iconOnly", "href", "target", "color", "background", "fontColor", "textAlign", "justify", "ariaLabel"], outputs: ["buttonClick"] }, { kind: "component", type: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }] }); }
|
|
30
30
|
}
|
|
31
31
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: ContentBannerComponent, decorators: [{
|
|
32
32
|
type: Component,
|
|
33
|
-
args: [{ selector: 'rdsite-content-banner', imports: [CommonModule, RdsiteLinkDirective, ImageComponent, CuraHeadingComponent, CuraParagraphComponent, CuraButtonComponent, CuraIconComponent], template: "@if (content()?.title) {\
|
|
33
|
+
args: [{ selector: 'rdsite-content-banner', imports: [CommonModule, RdsiteLinkDirective, ImageComponent, CuraHeadingComponent, CuraParagraphComponent, CuraButtonComponent, CuraIconComponent], template: "@if (content()?.title) {\n <cura-heading [level]=\"4\" weight=\"bold\" color=\"neutral-purewhite\" marginBlock=\"0\">\n {{ content()?.title }}\n </cura-heading>\n}\n\n@if (content()?.text) {\n <cura-paragraph color=\"neutral-purewhite\" marginBlock=\"0\">\n {{ content()?.text }}\n </cura-paragraph>\n}\n\n@if (content()?.info?.length) {\n <div class=\"info\" data-testid=\"_content-banner-info\">\n @for (item of content()?.info || []; track $index) {\n @if (item.text) {\n <a [ngClass]=\"{ disabled: !item.link }\" rdsitelink [href]=\"item.link || ''\">\n @if (item.icon) {\n <cura-icon [name]=\"item.icon\" size=\"16\" color=\"neutral-purewhite\"></cura-icon>\n }\n {{ item.text }}\n </a>\n }\n }\n </div>\n}\n\n@if (content()?.cta?.text && content()?.cta?.link) {\n <cura-button\n rdsitelink\n (click)=\"onCtaClick(content()?.cta?.text || '', content()?.cta?.link || '')\"\n size=\"large\"\n type=\"button\"\n color=\"accent\"\n [iconName]=\"content()?.cta?.icon || ''\"\n [href]=\"content()!.cta.link\"\n target=\"_self\"\n >\n {{ content()?.cta?.text }}\n </cura-button>\n}\n\n@if (content()?.image) {\n <rdsite-image\n [imageDefaultSrc]=\"content()?.image.url\"\n [imageWebpSrc]=\"content()?.image?.webp_url\"\n [title]=\"content()?.image.title\"\n [alt]=\"content()?.image.alt\"\n >\n </rdsite-image>\n}\n", styles: [":host{position:relative;z-index:0;display:block;width:100%;height:auto;padding:32px 56px 96px;margin-bottom:30px;border-radius:4px;background:linear-gradient(90deg,#004186 7.78%,#1163a1 40.08%,#2791c6 76.03%,#36b1df 95.14%)}:host cura-heading{position:relative;z-index:2;margin-bottom:8px}:host cura-paragraph{position:relative;z-index:2;margin-bottom:20px}:host .info{position:relative;z-index:2;display:flex;flex-direction:column;align-items:stretch;gap:10px;margin-top:20px}:host .info>a{display:flex;justify-content:flex-start;align-items:center;gap:8px;width:fit-content;min-height:34px;color:var(--neutral-purewhite);font-size:12px;font-weight:500;line-height:13px;letter-spacing:.72px;padding:4px 20px;border-radius:20px;background:var(--color-one-lighter);text-decoration:none}:host .info>a.disabled{pointer-events:none}:host .info>a cura-icon{display:flex;justify-content:center;align-items:center;width:20px;height:20px;border:1.5px solid var(--neutral-purewhite);border-radius:50%}:host cura-button{position:relative;z-index:2;margin-top:30px}:host rdsite-image{position:absolute;z-index:1;bottom:0;right:40px;height:90%}:host rdsite-image ::ng-deep .rdsite-image{height:100%}:host rdsite-image ::ng-deep .rdsite-image img{height:100%}\n"] }]
|
|
34
34
|
}], propDecorators: { styleBinding: [{
|
|
35
35
|
type: HostBinding,
|
|
36
36
|
args: ['style']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-components-banner.mjs","sources":["../../../projects/site-front-end-lib/components/banner/content-banner/content-banner.component.ts","../../../projects/site-front-end-lib/components/banner/content-banner/content-banner.component.html","../../../projects/site-front-end-lib/components/banner/rededor-site-front-end-lib-components-banner.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { Component, HostBinding, input, output, inject } from '@angular/core';\r\nimport { ContentBanner, RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { ImageComponent } from '@rededor/site-front-end-lib/components/image';\r\nimport { CuraHeadingComponent } from '@rededor/site-front-end-lib/cura/texts/cura-heading';\r\nimport { CuraParagraphComponent } from '@rededor/site-front-end-lib/cura/texts/cura-paragraph';\r\nimport { CuraButtonComponent } from '@rededor/site-front-end-lib/cura/buttons/cura-button';\r\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\r\n\r\n@Component({\r\n selector: 'rdsite-content-banner',\r\n imports: [CommonModule, RdsiteLinkDirective, ImageComponent, CuraHeadingComponent, CuraParagraphComponent, CuraButtonComponent, CuraIconComponent],\r\n templateUrl: './content-banner.component.html',\r\n styleUrls: ['./content-banner.component.scss'],\r\n})\r\nexport class ContentBannerComponent {\r\n private curaApiService = inject(CuraApiService);\r\n\r\n readonly content = input<ContentBanner | null>(null);\r\n readonly ctaClick = output<{\r\n text: string;\r\n link: string;\r\n }>();\r\n\r\n @HostBinding('style') get styleBinding() {\r\n return {\r\n '--neutral-purewhite': this.curaApiService.theme.colors.getColor('neutral-purewhite'),\r\n '--color-one-lighter': this.curaApiService.theme.colors.getColor('primary-lighter', 0.5),\r\n };\r\n }\r\n\r\n onCtaClick(text: string, link: string) {\r\n this.ctaClick.emit({ text, link });\r\n }\r\n}\r\n","@if (content()?.title) {\
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-components-banner.mjs","sources":["../../../projects/site-front-end-lib/components/banner/content-banner/content-banner.component.ts","../../../projects/site-front-end-lib/components/banner/content-banner/content-banner.component.html","../../../projects/site-front-end-lib/components/banner/rededor-site-front-end-lib-components-banner.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { Component, HostBinding, input, output, inject } from '@angular/core';\r\nimport { ContentBanner, RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { ImageComponent } from '@rededor/site-front-end-lib/components/image';\r\nimport { CuraHeadingComponent } from '@rededor/site-front-end-lib/cura/texts/cura-heading';\r\nimport { CuraParagraphComponent } from '@rededor/site-front-end-lib/cura/texts/cura-paragraph';\r\nimport { CuraButtonComponent } from '@rededor/site-front-end-lib/cura/buttons/cura-button';\r\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\r\n\r\n@Component({\r\n selector: 'rdsite-content-banner',\r\n imports: [CommonModule, RdsiteLinkDirective, ImageComponent, CuraHeadingComponent, CuraParagraphComponent, CuraButtonComponent, CuraIconComponent],\r\n templateUrl: './content-banner.component.html',\r\n styleUrls: ['./content-banner.component.scss'],\r\n})\r\nexport class ContentBannerComponent {\r\n private curaApiService = inject(CuraApiService);\r\n\r\n readonly content = input<ContentBanner | null>(null);\r\n readonly ctaClick = output<{\r\n text: string;\r\n link: string;\r\n }>();\r\n\r\n @HostBinding('style') get styleBinding() {\r\n return {\r\n '--neutral-purewhite': this.curaApiService.theme.colors.getColor('neutral-purewhite'),\r\n '--color-one-lighter': this.curaApiService.theme.colors.getColor('primary-lighter', 0.5),\r\n };\r\n }\r\n\r\n onCtaClick(text: string, link: string) {\r\n this.ctaClick.emit({ text, link });\r\n }\r\n}\r\n","@if (content()?.title) {\n <cura-heading [level]=\"4\" weight=\"bold\" color=\"neutral-purewhite\" marginBlock=\"0\">\n {{ content()?.title }}\n </cura-heading>\n}\n\n@if (content()?.text) {\n <cura-paragraph color=\"neutral-purewhite\" marginBlock=\"0\">\n {{ content()?.text }}\n </cura-paragraph>\n}\n\n@if (content()?.info?.length) {\n <div class=\"info\" data-testid=\"_content-banner-info\">\n @for (item of content()?.info || []; track $index) {\n @if (item.text) {\n <a [ngClass]=\"{ disabled: !item.link }\" rdsitelink [href]=\"item.link || ''\">\n @if (item.icon) {\n <cura-icon [name]=\"item.icon\" size=\"16\" color=\"neutral-purewhite\"></cura-icon>\n }\n {{ item.text }}\n </a>\n }\n }\n </div>\n}\n\n@if (content()?.cta?.text && content()?.cta?.link) {\n <cura-button\n rdsitelink\n (click)=\"onCtaClick(content()?.cta?.text || '', content()?.cta?.link || '')\"\n size=\"large\"\n type=\"button\"\n color=\"accent\"\n [iconName]=\"content()?.cta?.icon || ''\"\n [href]=\"content()!.cta.link\"\n target=\"_self\"\n >\n {{ content()?.cta?.text }}\n </cura-button>\n}\n\n@if (content()?.image) {\n <rdsite-image\n [imageDefaultSrc]=\"content()?.image.url\"\n [imageWebpSrc]=\"content()?.image?.webp_url\"\n [title]=\"content()?.image.title\"\n [alt]=\"content()?.image.alt\"\n >\n </rdsite-image>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAgBa,sBAAsB,CAAA;AANnC,IAAA,WAAA,GAAA;AAOU,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAEtC,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAuB,IAAI,mDAAC;QAC3C,IAAA,CAAA,QAAQ,GAAG,MAAM,EAGtB;AAYL,IAAA;AAVC,IAAA,IAA0B,YAAY,GAAA;QACpC,OAAO;AACL,YAAA,qBAAqB,EAAE,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC;AACrF,YAAA,qBAAqB,EAAE,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,CAAC;SACzF;IACH;IAEA,UAAU,CAAC,IAAY,EAAE,IAAY,EAAA;QACnC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACpC;8GAlBW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAA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,mBAAmB,mRAAE,iBAAiB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAItI,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,EAAA,OAAA,EACxB,CAAC,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,iBAAiB,CAAC,EAAA,QAAA,EAAA,g6CAAA,EAAA,MAAA,EAAA,CAAA,kuCAAA,CAAA,EAAA;8BAaxH,YAAY,EAAA,CAAA;sBAArC,WAAW;uBAAC,OAAO;;;AEzBtB;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isPlatformBrowser } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, PLATFORM_ID, input, viewChild, HostBinding, HostListener, Component } from '@angular/core';
|
|
3
|
+
import { inject, PLATFORM_ID, input, output, viewChild, HostBinding, HostListener, Component } from '@angular/core';
|
|
4
4
|
import { NguCarousel, NguItemComponent, NguCarouselDefDirective } from '@ngu/carousel';
|
|
5
5
|
import { RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';
|
|
6
6
|
import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
|
|
@@ -16,6 +16,7 @@ class CtaWrapperComponent {
|
|
|
16
16
|
this.content = input(null, ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
17
17
|
this.showTitleAndText = input(true, ...(ngDevMode ? [{ debugName: "showTitleAndText" }] : []));
|
|
18
18
|
this.colors = input({ border: 'primary-base', icon: 'primary-dark' }, ...(ngDevMode ? [{ debugName: "colors" }] : []));
|
|
19
|
+
this.ctaWrapperItemClick = output();
|
|
19
20
|
this.bannerControl = false;
|
|
20
21
|
this.seeMoreControl = false;
|
|
21
22
|
this.nguCarouselCtas = viewChild.required('nguCarouselCtas');
|
|
@@ -49,12 +50,15 @@ class CtaWrapperComponent {
|
|
|
49
50
|
moreOptions() {
|
|
50
51
|
this.seeMoreControl = !this.seeMoreControl;
|
|
51
52
|
}
|
|
53
|
+
ctaWrapperItemClicked(event) {
|
|
54
|
+
this.ctaWrapperItemClick.emit(event);
|
|
55
|
+
}
|
|
52
56
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: CtaWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
53
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: CtaWrapperComponent, isStandalone: true, selector: "rdsite-cta-wrapper", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, showTitleAndText: { classPropertyName: "showTitleAndText", publicName: "showTitleAndText", isSignal: true, isRequired: false, transformFunction: null }, colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:resize": "onWindowResize()" }, properties: { "style": "this.style", "class": "this.class" } }, viewQueries: [{ propertyName: "nguCarouselCtas", first: true, predicate: ["nguCarouselCtas"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (content()?.ctas?.length) {\
|
|
57
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: CtaWrapperComponent, isStandalone: true, selector: "rdsite-cta-wrapper", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, showTitleAndText: { classPropertyName: "showTitleAndText", publicName: "showTitleAndText", isSignal: true, isRequired: false, transformFunction: null }, colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ctaWrapperItemClick: "ctaWrapperItemClick" }, host: { listeners: { "window:resize": "onWindowResize()" }, properties: { "style": "this.style", "class": "this.class" } }, viewQueries: [{ propertyName: "nguCarouselCtas", first: true, predicate: ["nguCarouselCtas"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (content()?.ctas?.length) {\n @if (content()?.title && showTitleAndText()) {\n <h3 class=\"ctas-title\">{{ content()?.title }}</h3>\n }\n\n @if (content()?.text && showTitleAndText()) {\n <p class=\"ctas-text\" [innerHTML]=\"content()?.text\"></p>\n }\n\n @if (!seeMoreControl) {\n <nav class=\"ctas-wrapper\" data-testid=\"_rdsite-ctas-wrapper\">\n @if (!bannerControl) {\n <ngu-carousel #nguCarouselCtas [inputs]=\"carouselCtasConfig\" [dataSource]=\"content()?.ctas\">\n <ngu-item *nguCarouselDef=\"let cta; let i = index\">\n <a rdsitelink class=\"cta\" [href]=\"cta?.link\" (click)=\"ctaWrapperItemClicked($event)\">\n @if (cta?.icon) {\n <cura-icon [name]=\"cta.icon\" size=\"24\" [color]=\"colors().icon\"></cura-icon>\n }\n <p>{{ cta?.label }}</p>\n </a>\n </ngu-item>\n </ngu-carousel>\n\n <div class=\"show-more\" data-testid=\"_rdsite-ctas-wrapper-show-more\">\n <button type=\"button\" (click)=\"moreOptions()\">Mais op\u00E7\u00F5es</button>\n </div>\n } @else {\n @for (cta of content()?.ctas; track $index) {\n @if (cta?.label) {\n <a rdsitelink class=\"cta\" [href]=\"cta?.link\" (click)=\"ctaWrapperItemClicked($event)\">\n @if (cta?.icon) {\n <cura-icon [name]=\"cta.icon\" size=\"24\" [color]=\"colors().icon\"></cura-icon>\n }\n <p>{{ cta?.label }}</p>\n </a>\n }\n }\n }\n </nav>\n } @else {\n <nav class=\"more-options\" data-testid=\"_rdsite-ctas-wrapper-more-options\">\n @for (cta of content()?.ctas; track $index) {\n @if (cta?.label) {\n <a rdsitelink class=\"cta\" [href]=\"cta?.link\" (click)=\"ctaWrapperItemClicked($event)\">\n @if (cta?.icon) {\n <cura-icon [name]=\"cta.icon\" size=\"24\" [color]=\"colors().icon\"></cura-icon>\n }\n <p>{{ cta?.label }}</p>\n </a>\n }\n }\n </nav>\n }\n}\n", styles: [":host{display:block}:host .ctas-title,:host .ctas-text{font-family:var(--font-family);padding:0;margin:0}:host .ctas-title:not(:last-child),:host .ctas-text:not(:last-child){padding-bottom:0}:host .ctas-title{color:var(--icon-color);font-size:29px;font-weight:500;line-height:38px;letter-spacing:-.58px;padding:0 24px;margin-bottom:24px}@media only screen and (min-width: 1024px){:host .ctas-title{font-size:33px;line-height:43px;letter-spacing:-.66px;padding:0}}:host .ctas-text{color:var(--icon-color);font-size:17px;font-weight:400;line-height:25px;padding:0 24px}@media only screen and (min-width: 1024px){:host .ctas-text{font-size:19px;line-height:28px;padding:0}}:host .ctas-wrapper{display:flex;flex-wrap:wrap;gap:16px;margin-top:50px}:host .ctas-wrapper ngu-carousel{max-width:100vw;margin-left:-6%}:host .ctas-wrapper ngu-carousel::ng-deep .ngucarousel{padding-left:6%}:host .ctas-wrapper ngu-item a{margin-right:16px}:host .ctas-wrapper .show-more{display:flex;justify-content:flex-end;width:100%;height:auto}:host .ctas-wrapper .show-more button{font-family:var(--font-family);color:var(--icon-color);background-color:transparent;font-size:16px;font-weight:500;line-height:145%;letter-spacing:.32px;text-decoration-line:underline;text-align:center}:host .more-options{display:flex;flex-wrap:wrap;gap:16px;margin-top:60px}:host .cta{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px;min-width:150px;height:100%;min-height:150px;padding:24px 16px;border-radius:4px;border:1px solid var(--border-color);text-decoration:none}:host .cta p{font-family:var(--font-family);color:var(--icon-color);font-size:16px;font-weight:700;line-height:145%;letter-spacing:.32px;padding:0;margin:0;text-align:center}\n"], dependencies: [{ kind: "component", type: NguCarousel, selector: "ngu-carousel", inputs: ["inputs", "dataSource", "trackBy"], outputs: ["carouselLoad", "onMove"] }, { kind: "component", type: NguItemComponent, selector: "ngu-item" }, { kind: "directive", type: NguCarouselDefDirective, selector: "[nguCarouselDef]" }, { kind: "directive", type: RdsiteLinkDirective, selector: "[rdsitelink]", inputs: ["anchorAdjustment", "anchorExtraAdjustment", "phonemodal"] }, { kind: "component", type: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }] }); }
|
|
54
58
|
}
|
|
55
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: CtaWrapperComponent, decorators: [{
|
|
56
60
|
type: Component,
|
|
57
|
-
args: [{ selector: 'rdsite-cta-wrapper', imports: [NguCarousel, NguItemComponent, NguCarouselDefDirective, RdsiteLinkDirective, CuraIconComponent], template: "@if (content()?.ctas?.length) {\
|
|
61
|
+
args: [{ selector: 'rdsite-cta-wrapper', imports: [NguCarousel, NguItemComponent, NguCarouselDefDirective, RdsiteLinkDirective, CuraIconComponent], template: "@if (content()?.ctas?.length) {\n @if (content()?.title && showTitleAndText()) {\n <h3 class=\"ctas-title\">{{ content()?.title }}</h3>\n }\n\n @if (content()?.text && showTitleAndText()) {\n <p class=\"ctas-text\" [innerHTML]=\"content()?.text\"></p>\n }\n\n @if (!seeMoreControl) {\n <nav class=\"ctas-wrapper\" data-testid=\"_rdsite-ctas-wrapper\">\n @if (!bannerControl) {\n <ngu-carousel #nguCarouselCtas [inputs]=\"carouselCtasConfig\" [dataSource]=\"content()?.ctas\">\n <ngu-item *nguCarouselDef=\"let cta; let i = index\">\n <a rdsitelink class=\"cta\" [href]=\"cta?.link\" (click)=\"ctaWrapperItemClicked($event)\">\n @if (cta?.icon) {\n <cura-icon [name]=\"cta.icon\" size=\"24\" [color]=\"colors().icon\"></cura-icon>\n }\n <p>{{ cta?.label }}</p>\n </a>\n </ngu-item>\n </ngu-carousel>\n\n <div class=\"show-more\" data-testid=\"_rdsite-ctas-wrapper-show-more\">\n <button type=\"button\" (click)=\"moreOptions()\">Mais op\u00E7\u00F5es</button>\n </div>\n } @else {\n @for (cta of content()?.ctas; track $index) {\n @if (cta?.label) {\n <a rdsitelink class=\"cta\" [href]=\"cta?.link\" (click)=\"ctaWrapperItemClicked($event)\">\n @if (cta?.icon) {\n <cura-icon [name]=\"cta.icon\" size=\"24\" [color]=\"colors().icon\"></cura-icon>\n }\n <p>{{ cta?.label }}</p>\n </a>\n }\n }\n }\n </nav>\n } @else {\n <nav class=\"more-options\" data-testid=\"_rdsite-ctas-wrapper-more-options\">\n @for (cta of content()?.ctas; track $index) {\n @if (cta?.label) {\n <a rdsitelink class=\"cta\" [href]=\"cta?.link\" (click)=\"ctaWrapperItemClicked($event)\">\n @if (cta?.icon) {\n <cura-icon [name]=\"cta.icon\" size=\"24\" [color]=\"colors().icon\"></cura-icon>\n }\n <p>{{ cta?.label }}</p>\n </a>\n }\n }\n </nav>\n }\n}\n", styles: [":host{display:block}:host .ctas-title,:host .ctas-text{font-family:var(--font-family);padding:0;margin:0}:host .ctas-title:not(:last-child),:host .ctas-text:not(:last-child){padding-bottom:0}:host .ctas-title{color:var(--icon-color);font-size:29px;font-weight:500;line-height:38px;letter-spacing:-.58px;padding:0 24px;margin-bottom:24px}@media only screen and (min-width: 1024px){:host .ctas-title{font-size:33px;line-height:43px;letter-spacing:-.66px;padding:0}}:host .ctas-text{color:var(--icon-color);font-size:17px;font-weight:400;line-height:25px;padding:0 24px}@media only screen and (min-width: 1024px){:host .ctas-text{font-size:19px;line-height:28px;padding:0}}:host .ctas-wrapper{display:flex;flex-wrap:wrap;gap:16px;margin-top:50px}:host .ctas-wrapper ngu-carousel{max-width:100vw;margin-left:-6%}:host .ctas-wrapper ngu-carousel::ng-deep .ngucarousel{padding-left:6%}:host .ctas-wrapper ngu-item a{margin-right:16px}:host .ctas-wrapper .show-more{display:flex;justify-content:flex-end;width:100%;height:auto}:host .ctas-wrapper .show-more button{font-family:var(--font-family);color:var(--icon-color);background-color:transparent;font-size:16px;font-weight:500;line-height:145%;letter-spacing:.32px;text-decoration-line:underline;text-align:center}:host .more-options{display:flex;flex-wrap:wrap;gap:16px;margin-top:60px}:host .cta{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px;min-width:150px;height:100%;min-height:150px;padding:24px 16px;border-radius:4px;border:1px solid var(--border-color);text-decoration:none}:host .cta p{font-family:var(--font-family);color:var(--icon-color);font-size:16px;font-weight:700;line-height:145%;letter-spacing:.32px;padding:0;margin:0;text-align:center}\n"] }]
|
|
58
62
|
}], propDecorators: { onWindowResize: [{
|
|
59
63
|
type: HostListener,
|
|
60
64
|
args: ['window:resize']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-components-cta-wrapper.mjs","sources":["../../../projects/site-front-end-lib/components/cta-wrapper/cta-wrapper.component.ts","../../../projects/site-front-end-lib/components/cta-wrapper/cta-wrapper.component.html","../../../projects/site-front-end-lib/components/cta-wrapper/rededor-site-front-end-lib-components-cta-wrapper.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-components-cta-wrapper.mjs","sources":["../../../projects/site-front-end-lib/components/cta-wrapper/cta-wrapper.component.ts","../../../projects/site-front-end-lib/components/cta-wrapper/cta-wrapper.component.html","../../../projects/site-front-end-lib/components/cta-wrapper/rededor-site-front-end-lib-components-cta-wrapper.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { Component, HostBinding, HostListener, OnInit, PLATFORM_ID, input, viewChild, inject, output } from '@angular/core';\nimport { NguCarousel, NguCarouselConfig, NguCarouselDefDirective, NguItemComponent } from '@ngu/carousel';\nimport { CtaWrapper, RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\nimport { NguCarouselService } from '@rededor/site-front-end-lib/services/ngu-carousel';\nimport { MediaQueries } from '@rededor/site-front-end-lib/shared';\n\n@Component({\n selector: 'rdsite-cta-wrapper',\n imports: [NguCarousel, NguItemComponent, NguCarouselDefDirective, RdsiteLinkDirective, CuraIconComponent],\n templateUrl: './cta-wrapper.component.html',\n styleUrl: './cta-wrapper.component.scss',\n})\nexport class CtaWrapperComponent implements OnInit {\n private readonly curaApiService = inject(CuraApiService);\n private nguService = inject(NguCarouselService);\n private readonly platformId = inject(PLATFORM_ID);\n\n readonly content = input<CtaWrapper | null>(null);\n readonly showTitleAndText = input(true);\n readonly colors = input<{\n border: string;\n icon: string;\n }>({ border: 'primary-base', icon: 'primary-dark' });\n\n readonly ctaWrapperItemClick = output<Event>();\n\n carouselCtasConfig!: NguCarouselConfig;\n\n bannerControl = false;\n seeMoreControl = false;\n\n readonly nguCarouselCtas = viewChild.required<NguCarousel<any, any>>('nguCarouselCtas');\n\n @HostListener('window:resize')\n onWindowResize() {\n if (isPlatformBrowser(this.platformId)) {\n this.bannerControl = window.innerWidth > MediaQueries.smallBreakpoint;\n }\n }\n\n @HostBinding('style')\n get style(): { [key: string]: string } {\n return {\n '--font-family': this.curaApiService.theme.fonts.getFamily('') ?? '',\n '--border-color': this.curaApiService.theme.colors.getColor(this.colors().border) ?? '',\n '--icon-color': this.curaApiService.theme.colors.getColor(this.colors().icon) ?? '',\n };\n }\n\n @HostBinding('class') class = ['rdsite-container'];\n\n ngOnInit(): void {\n if (isPlatformBrowser(this.platformId)) {\n this.bannerControl = window.innerWidth > MediaQueries.smallBreakpoint;\n }\n\n this.carouselCtasConfig = this.nguService.customCarouselConfig({\n grid: { xs: 2.1, sm: 2.1, md: 2.1, lg: 2.1, all: 0 },\n loop: true,\n interval: {\n timing: 600000,\n initialDelay: 600000,\n },\n });\n }\n\n moreOptions(): void {\n this.seeMoreControl = !this.seeMoreControl;\n }\n\n ctaWrapperItemClicked(event: Event) {\n this.ctaWrapperItemClick.emit(event);\n }\n}\n","@if (content()?.ctas?.length) {\n @if (content()?.title && showTitleAndText()) {\n <h3 class=\"ctas-title\">{{ content()?.title }}</h3>\n }\n\n @if (content()?.text && showTitleAndText()) {\n <p class=\"ctas-text\" [innerHTML]=\"content()?.text\"></p>\n }\n\n @if (!seeMoreControl) {\n <nav class=\"ctas-wrapper\" data-testid=\"_rdsite-ctas-wrapper\">\n @if (!bannerControl) {\n <ngu-carousel #nguCarouselCtas [inputs]=\"carouselCtasConfig\" [dataSource]=\"content()?.ctas\">\n <ngu-item *nguCarouselDef=\"let cta; let i = index\">\n <a rdsitelink class=\"cta\" [href]=\"cta?.link\" (click)=\"ctaWrapperItemClicked($event)\">\n @if (cta?.icon) {\n <cura-icon [name]=\"cta.icon\" size=\"24\" [color]=\"colors().icon\"></cura-icon>\n }\n <p>{{ cta?.label }}</p>\n </a>\n </ngu-item>\n </ngu-carousel>\n\n <div class=\"show-more\" data-testid=\"_rdsite-ctas-wrapper-show-more\">\n <button type=\"button\" (click)=\"moreOptions()\">Mais opções</button>\n </div>\n } @else {\n @for (cta of content()?.ctas; track $index) {\n @if (cta?.label) {\n <a rdsitelink class=\"cta\" [href]=\"cta?.link\" (click)=\"ctaWrapperItemClicked($event)\">\n @if (cta?.icon) {\n <cura-icon [name]=\"cta.icon\" size=\"24\" [color]=\"colors().icon\"></cura-icon>\n }\n <p>{{ cta?.label }}</p>\n </a>\n }\n }\n }\n </nav>\n } @else {\n <nav class=\"more-options\" data-testid=\"_rdsite-ctas-wrapper-more-options\">\n @for (cta of content()?.ctas; track $index) {\n @if (cta?.label) {\n <a rdsitelink class=\"cta\" [href]=\"cta?.link\" (click)=\"ctaWrapperItemClicked($event)\">\n @if (cta?.icon) {\n <cura-icon [name]=\"cta.icon\" size=\"24\" [color]=\"colors().icon\"></cura-icon>\n }\n <p>{{ cta?.label }}</p>\n </a>\n }\n }\n </nav>\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAea,mBAAmB,CAAA;AANhC,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAChD,QAAA,IAAA,CAA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AA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAI7F,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,SAAS;+BACE,oBAAoB,EAAA,OAAA,EACrB,CAAC,WAAW,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,iBAAiB,CAAC,EAAA,QAAA,EAAA,gjEAAA,EAAA,MAAA,EAAA,CAAA,0tDAAA,CAAA,EAAA;8BA0BzG,cAAc,EAAA,CAAA;sBADb,YAAY;uBAAC,eAAe;gBAQzB,KAAK,EAAA,CAAA;sBADR,WAAW;uBAAC,OAAO;gBASE,KAAK,EAAA,CAAA;sBAA1B,WAAW;uBAAC,OAAO;;;AEpDtB;;AAEG;;;;"}
|
|
@@ -146,7 +146,7 @@ class ErrorComponent {
|
|
|
146
146
|
this.ctasSubscription?.unsubscribe();
|
|
147
147
|
}
|
|
148
148
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: ErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
149
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: ErrorComponent, isStandalone: true, selector: "rdsite-error", inputs: { theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, returnRoute: { classPropertyName: "returnRoute", publicName: "returnRoute", isSignal: true, isRequired: false, transformFunction: null }, returnLabel: { classPropertyName: "returnLabel", publicName: "returnLabel", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, component: { classPropertyName: "component", publicName: "component", isSignal: true, isRequired: false, transformFunction: null }, breadcrumbsItems: { classPropertyName: "breadcrumbsItems", publicName: "breadcrumbsItems", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "this.style" } }, ngImport: i0, template: "<div class=\"rdsite-error\">\r\n @if (ctasIconColor && breadcrumbsItems().length) {\r\n <rdsite-breadcrumbs [breadcrumbs]=\"breadcrumbsItems()\" [labelIconColor]=\"ctasIconColor\" [fontWeight]=\"breadcrumbFontWeight\"></rdsite-breadcrumbs>\r\n }\r\n <div class=\"rdsite-error-container\">\r\n @if (labelTextColor) {\r\n <cura-label [color]=\"labelTextColor\">\r\n {{ type() === 'server-response' ? '500' : '404' }}\r\n </cura-label>\r\n }\r\n\r\n <cura-heading color=\"neutral-black\" size=\"medium\" weight=\"bold\"> Algo deu errado :( </cura-heading>\r\n\r\n @if (responseText) {\r\n <cura-paragraph color=\"neutral-black\" size=\"large\">\r\n {{ responseText }}\r\n </cura-paragraph>\r\n }\r\n\r\n @if (type() === error.NOT_FOUND && returnRoute() && returnLabel()) {\r\n <cura-button\r\n rdsitelink\r\n [href]=\"returnRoute()\"\r\n size=\"medium\"\r\n type=\"button\"\r\n [color]=\"curaButtonColor\"\r\n fontColor=\"light\"\r\n iconName=\"arrowLeft\"\r\n target=\"_self\"\r\n >\r\n Voltar para {{ returnLabel() }}\r\n </cura-button>\r\n }\r\n\r\n @if (type() === error.SERVER_RESPONSE) {\r\n @if (curaButtonColor) {\r\n <cura-button size=\"medium\" type=\"button\" (click)=\"reloadPage()\" [color]=\"curaButtonColor\" fontColor=\"light\" iconName=\"reload\" target=\"_self\">\r\n Atualizar p\u00E1gina novamente\r\n </cura-button>\r\n }\r\n\r\n @if (returnLabel() && returnRoute()) {\r\n <cura-paragraph color=\"neutral-black\" size=\"large\">ou</cura-paragraph>\r\n @if (curaButtonOutlineColor) {\r\n <cura-button-outline\r\n rdsitelink\r\n [href]=\"returnRoute()\"\r\n size=\"medium\"\r\n type=\"button\"\r\n [color]=\"curaButtonOutlineColor\"\r\n iconName=\"arrowLeft\"\r\n target=\"_self\"\r\n >\r\n Voltar para {{ returnLabel() }}\r\n </cura-button-outline>\r\n }\r\n }\r\n }\r\n @if (ctasContent.ctas!.length > 0 && ctasBorderColor && ctasIconColor) {\r\n <cura-paragraph class=\"wrapper-text\" color=\"neutral-black\" size=\"large\"> Voc\u00EA pode tamb\u00E9m: </cura-paragraph>\r\n\r\n <rdsite-cta-wrapper [content]=\"ctasContent\" [showTitleAndText]=\"false\" [colors]=\"{ border: ctasBorderColor, icon: ctasIconColor }\"></rdsite-cta-wrapper>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".rdsite-error{width:100%;background-color:var(--backgroundColor)}.rdsite-error rdsite-breadcrumbs{display:block;padding-block:16px;box-sizing:border-box;width:90%;position:relative;max-width:1366px;margin-left:auto;margin-right:auto}.rdsite-error rdsite-breadcrumbs.full-container{width:100%;max-width:100%}.rdsite-error-container{box-sizing:border-box;width:90%;position:relative;max-width:1366px;margin-left:auto;margin-right:auto;padding:20px 0 40px}.rdsite-error-container.full-container{width:100%;max-width:100%}.rdsite-error-container cura-label{width:fit-content;padding:var(--sizes-space-tiny, 4px);border-radius:var(--sizes-cornerRadius-nano, 2px);background:var(--labelColor)}.rdsite-error-container cura-heading{--margin-block: 40px}\n"], dependencies: [{ kind: "component", type: CtaWrapperComponent, selector: "rdsite-cta-wrapper", inputs: ["content", "showTitleAndText", "colors"] }, { kind: "directive", type: RdsiteLinkDirective, selector: "[rdsitelink]", inputs: ["anchorAdjustment", "anchorExtraAdjustment", "phonemodal"] }, { kind: "component", type: BreadcrumbsComponent, selector: "rdsite-breadcrumbs", inputs: ["labelIconColor", "fontWeight", "breadcrumbs"] }, { kind: "component", type: CuraLabelComponent, selector: "cura-label", inputs: ["size", "weight", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: CuraHeadingComponent, selector: "cura-heading", inputs: ["level", "size", "weight", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: CuraParagraphComponent, selector: "cura-paragraph", inputs: ["size", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: CuraButtonComponent, selector: "cura-button", inputs: ["type", "size", "disabled", "isLoading", "iconName", "iconset", "iconPosition", "iconOnly", "href", "target", "color", "background", "fontColor", "textAlign", "justify", "ariaLabel"], outputs: ["buttonClick"] }, { kind: "component", type: CuraButtonOutlineComponent, selector: "cura-button-outline", inputs: ["type", "size", "disabled", "isLoading", "iconName", "iconset", "iconPosition", "iconOnly", "href", "target", "color", "background", "fontColor", "textAlign", "justify", "ariaLabel"], outputs: ["buttonClick"] }] }); }
|
|
149
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: ErrorComponent, isStandalone: true, selector: "rdsite-error", inputs: { theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, returnRoute: { classPropertyName: "returnRoute", publicName: "returnRoute", isSignal: true, isRequired: false, transformFunction: null }, returnLabel: { classPropertyName: "returnLabel", publicName: "returnLabel", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, component: { classPropertyName: "component", publicName: "component", isSignal: true, isRequired: false, transformFunction: null }, breadcrumbsItems: { classPropertyName: "breadcrumbsItems", publicName: "breadcrumbsItems", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "this.style" } }, ngImport: i0, template: "<div class=\"rdsite-error\">\r\n @if (ctasIconColor && breadcrumbsItems().length) {\r\n <rdsite-breadcrumbs [breadcrumbs]=\"breadcrumbsItems()\" [labelIconColor]=\"ctasIconColor\" [fontWeight]=\"breadcrumbFontWeight\"></rdsite-breadcrumbs>\r\n }\r\n <div class=\"rdsite-error-container\">\r\n @if (labelTextColor) {\r\n <cura-label [color]=\"labelTextColor\">\r\n {{ type() === 'server-response' ? '500' : '404' }}\r\n </cura-label>\r\n }\r\n\r\n <cura-heading color=\"neutral-black\" size=\"medium\" weight=\"bold\"> Algo deu errado :( </cura-heading>\r\n\r\n @if (responseText) {\r\n <cura-paragraph color=\"neutral-black\" size=\"large\">\r\n {{ responseText }}\r\n </cura-paragraph>\r\n }\r\n\r\n @if (type() === error.NOT_FOUND && returnRoute() && returnLabel()) {\r\n <cura-button\r\n rdsitelink\r\n [href]=\"returnRoute()\"\r\n size=\"medium\"\r\n type=\"button\"\r\n [color]=\"curaButtonColor\"\r\n fontColor=\"light\"\r\n iconName=\"arrowLeft\"\r\n target=\"_self\"\r\n >\r\n Voltar para {{ returnLabel() }}\r\n </cura-button>\r\n }\r\n\r\n @if (type() === error.SERVER_RESPONSE) {\r\n @if (curaButtonColor) {\r\n <cura-button size=\"medium\" type=\"button\" (click)=\"reloadPage()\" [color]=\"curaButtonColor\" fontColor=\"light\" iconName=\"reload\" target=\"_self\">\r\n Atualizar p\u00E1gina novamente\r\n </cura-button>\r\n }\r\n\r\n @if (returnLabel() && returnRoute()) {\r\n <cura-paragraph color=\"neutral-black\" size=\"large\">ou</cura-paragraph>\r\n @if (curaButtonOutlineColor) {\r\n <cura-button-outline\r\n rdsitelink\r\n [href]=\"returnRoute()\"\r\n size=\"medium\"\r\n type=\"button\"\r\n [color]=\"curaButtonOutlineColor\"\r\n iconName=\"arrowLeft\"\r\n target=\"_self\"\r\n >\r\n Voltar para {{ returnLabel() }}\r\n </cura-button-outline>\r\n }\r\n }\r\n }\r\n @if (ctasContent.ctas!.length > 0 && ctasBorderColor && ctasIconColor) {\r\n <cura-paragraph class=\"wrapper-text\" color=\"neutral-black\" size=\"large\"> Voc\u00EA pode tamb\u00E9m: </cura-paragraph>\r\n\r\n <rdsite-cta-wrapper [content]=\"ctasContent\" [showTitleAndText]=\"false\" [colors]=\"{ border: ctasBorderColor, icon: ctasIconColor }\"></rdsite-cta-wrapper>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".rdsite-error{width:100%;background-color:var(--backgroundColor)}.rdsite-error rdsite-breadcrumbs{display:block;padding-block:16px;box-sizing:border-box;width:90%;position:relative;max-width:1366px;margin-left:auto;margin-right:auto}.rdsite-error rdsite-breadcrumbs.full-container{width:100%;max-width:100%}.rdsite-error-container{box-sizing:border-box;width:90%;position:relative;max-width:1366px;margin-left:auto;margin-right:auto;padding:20px 0 40px}.rdsite-error-container.full-container{width:100%;max-width:100%}.rdsite-error-container cura-label{width:fit-content;padding:var(--sizes-space-tiny, 4px);border-radius:var(--sizes-cornerRadius-nano, 2px);background:var(--labelColor)}.rdsite-error-container cura-heading{--margin-block: 40px}\n"], dependencies: [{ kind: "component", type: CtaWrapperComponent, selector: "rdsite-cta-wrapper", inputs: ["content", "showTitleAndText", "colors"], outputs: ["ctaWrapperItemClick"] }, { kind: "directive", type: RdsiteLinkDirective, selector: "[rdsitelink]", inputs: ["anchorAdjustment", "anchorExtraAdjustment", "phonemodal"] }, { kind: "component", type: BreadcrumbsComponent, selector: "rdsite-breadcrumbs", inputs: ["labelIconColor", "fontWeight", "breadcrumbs"] }, { kind: "component", type: CuraLabelComponent, selector: "cura-label", inputs: ["size", "weight", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: CuraHeadingComponent, selector: "cura-heading", inputs: ["level", "size", "weight", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: CuraParagraphComponent, selector: "cura-paragraph", inputs: ["size", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: CuraButtonComponent, selector: "cura-button", inputs: ["type", "size", "disabled", "isLoading", "iconName", "iconset", "iconPosition", "iconOnly", "href", "target", "color", "background", "fontColor", "textAlign", "justify", "ariaLabel"], outputs: ["buttonClick"] }, { kind: "component", type: CuraButtonOutlineComponent, selector: "cura-button-outline", inputs: ["type", "size", "disabled", "isLoading", "iconName", "iconset", "iconPosition", "iconOnly", "href", "target", "color", "background", "fontColor", "textAlign", "justify", "ariaLabel"], outputs: ["buttonClick"] }] }); }
|
|
150
150
|
}
|
|
151
151
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: ErrorComponent, decorators: [{
|
|
152
152
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-components-error.mjs","sources":["../../../projects/site-front-end-lib/components/error/error.component.ts","../../../projects/site-front-end-lib/components/error/error.component.html","../../../projects/site-front-end-lib/components/error/rededor-site-front-end-lib-components-error.ts"],"sourcesContent":["import { Component, HostBinding, OnDestroy, OnInit, PLATFORM_ID, input, inject } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { isPlatformServer } from '@angular/common';\r\nimport {\r\n LogService,\r\n SeoService,\r\n ServerResponseService,\r\n RdsiteLinkDirective,\r\n BreadcrumbsItems,\r\n CtaWrapper,\r\n ErrorService,\r\n} from '@rededor/site-front-end-lib/core';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { CtaWrapperComponent } from '@rededor/site-front-end-lib/components/cta-wrapper';\r\nimport { BreadcrumbsComponent } from '@rededor/site-front-end-lib/components/breadcrumbs';\r\nimport { Errors, Themes } from '@rededor/site-front-end-lib/enums';\r\nimport { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';\r\nimport { CuraHeadingComponent } from '@rededor/site-front-end-lib/cura/texts/cura-heading';\r\nimport { CuraParagraphComponent } from '@rededor/site-front-end-lib/cura/texts/cura-paragraph';\r\nimport { CuraButtonComponent } from '@rededor/site-front-end-lib/cura/buttons/cura-button';\r\nimport { CuraButtonOutlineComponent } from '@rededor/site-front-end-lib/cura/buttons/cura-button-outline';\r\n\r\n@Component({\r\n selector: 'rdsite-error',\r\n imports: [\r\n CtaWrapperComponent,\r\n RdsiteLinkDirective,\r\n BreadcrumbsComponent,\r\n CuraLabelComponent,\r\n CuraHeadingComponent,\r\n CuraParagraphComponent,\r\n CuraButtonComponent,\r\n CuraButtonOutlineComponent,\r\n ],\r\n templateUrl: './error.component.html',\r\n styleUrl: './error.component.scss',\r\n})\r\nexport class ErrorComponent implements OnInit, OnDestroy {\r\n private errorService = inject(ErrorService);\r\n private curaApiService = inject(CuraApiService);\r\n private logService = inject(LogService);\r\n private seoService = inject(SeoService);\r\n private serverResponse = inject(ServerResponseService);\r\n private readonly platformId = inject(PLATFORM_ID);\r\n\r\n readonly theme = input<Themes>(Themes.REDE);\r\n readonly type = input.required<Errors>();\r\n readonly returnRoute = input<string>('');\r\n readonly returnLabel = input<string>('');\r\n readonly pageTitle = input('Default component');\r\n readonly component = input('DefaultComponent');\r\n readonly breadcrumbsItems = input<BreadcrumbsItems[]>([]);\r\n\r\n ctasSubscription!: Subscription;\r\n ctasContent!: CtaWrapper;\r\n responseText = '';\r\n\r\n backgroundColor: string = '';\r\n backgroundColorBadge: string = '';\r\n breadcrumbFontWeight: string = '';\r\n labelColor: string = '';\r\n labelTextColor: string = '';\r\n curaButtonColor: string = '';\r\n curaButtonOutlineColor: string = '';\r\n ctasBorderColor: string = '';\r\n ctasIconColor: string = '';\r\n public error = Errors;\r\n\r\n @HostBinding('style') get style() {\r\n switch (this.theme()) {\r\n case Themes.REDE:\r\n return {\r\n '--backgroundColor': this.curaApiService.theme.colors.getColor('neutral-white'),\r\n '--labelColor': this.curaApiService.theme.colors.getColor('primary-lighter'),\r\n };\r\n case Themes.ONCO:\r\n return {\r\n '--backgroundColor': this.curaApiService.theme.colors.getColor('neutral-pale'),\r\n '--labelColor': this.curaApiService.theme.colors.getColor('success-lighter'),\r\n };\r\n case Themes.MATERNIDADE:\r\n return {\r\n '--backgroundColor': this.curaApiService.theme.colors.getColor('accent-lighter'),\r\n '--labelColor': this.curaApiService.theme.colors.getColor('primary-light'),\r\n };\r\n case Themes.RICHET:\r\n return {\r\n '--backgroundColor': this.curaApiService.theme.colors.getColor('neutral-white'),\r\n '--labelColor': this.curaApiService.theme.colors.getColor('primary-lighter'),\r\n };\r\n case Themes.STAR:\r\n return {\r\n '--backgroundColor': this.curaApiService.theme.colors.getColor('secondary-lighter'),\r\n '--labelColor': this.curaApiService.theme.colors.getColor('secondary-light'),\r\n };\r\n default:\r\n return {\r\n '--backgroundColor': this.curaApiService.theme.colors.getColor('neutral-white'),\r\n '--labelColor': this.curaApiService.theme.colors.getColor('primary-lighter'),\r\n };\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n const type = this.type();\r\n if (type === Errors.NOT_FOUND) {\r\n this.responseText = 'A página que você acessou não existe mais ou foi movida para outra URL';\r\n if (isPlatformServer(this.platformId)) {\r\n this.serverResponse.setNotFound();\r\n }\r\n this.logService.log404(this.component());\r\n this.seoService.set404Title(this.pageTitle());\r\n } else if (type === Errors.SERVER_RESPONSE) {\r\n this.responseText = 'Recomendamos atualizar a página ou tentar novamente mais tarde.';\r\n if (isPlatformServer(this.platformId)) {\r\n this.serverResponse.setError();\r\n }\r\n this.logService.log500(this.component());\r\n this.seoService.set500Title(this.pageTitle());\r\n }\r\n this.ctasSubscription = this.errorService.ctas.subscribe((ctas) => {\r\n this.ctasContent = ctas;\r\n });\r\n this.setTheme(this.theme());\r\n }\r\n\r\n setTheme(theme: Themes) {\r\n switch (theme) {\r\n case Themes.REDE:\r\n this.labelTextColor = 'primary-dark';\r\n this.curaButtonColor = 'primary';\r\n this.curaButtonOutlineColor = 'primary';\r\n this.ctasBorderColor = 'primary-darker';\r\n this.ctasIconColor = 'primary-darker';\r\n break;\r\n case Themes.ONCO:\r\n this.labelTextColor = 'primary-dark';\r\n this.backgroundColorBadge = 'success-lighter';\r\n this.curaButtonColor = 'accent';\r\n this.curaButtonOutlineColor = 'accent';\r\n this.ctasBorderColor = 'accent-base';\r\n this.ctasIconColor = 'primary-dark';\r\n this.breadcrumbFontWeight = '700';\r\n break;\r\n case Themes.MATERNIDADE:\r\n this.labelTextColor = 'accent-base';\r\n this.curaButtonColor = 'accent';\r\n this.curaButtonOutlineColor = 'accent';\r\n this.ctasBorderColor = 'accent-base';\r\n this.ctasIconColor = 'accent-base';\r\n break;\r\n case Themes.RICHET:\r\n this.labelTextColor = 'primary-dark';\r\n this.curaButtonColor = 'primary';\r\n this.curaButtonOutlineColor = 'primary';\r\n this.ctasBorderColor = 'primary-darker';\r\n this.ctasIconColor = 'primary-darker';\r\n break;\r\n case Themes.STAR:\r\n this.labelTextColor = 'secondary-dark';\r\n this.curaButtonColor = 'secondary';\r\n this.curaButtonOutlineColor = 'secondary';\r\n this.ctasBorderColor = 'secondary-base';\r\n this.ctasIconColor = 'secondary-darker';\r\n break;\r\n }\r\n }\r\n\r\n reloadPage() {\r\n if (window !== undefined) {\r\n window.location.reload();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.ctasSubscription?.unsubscribe();\r\n }\r\n}\r\n","<div class=\"rdsite-error\">\r\n @if (ctasIconColor && breadcrumbsItems().length) {\r\n <rdsite-breadcrumbs [breadcrumbs]=\"breadcrumbsItems()\" [labelIconColor]=\"ctasIconColor\" [fontWeight]=\"breadcrumbFontWeight\"></rdsite-breadcrumbs>\r\n }\r\n <div class=\"rdsite-error-container\">\r\n @if (labelTextColor) {\r\n <cura-label [color]=\"labelTextColor\">\r\n {{ type() === 'server-response' ? '500' : '404' }}\r\n </cura-label>\r\n }\r\n\r\n <cura-heading color=\"neutral-black\" size=\"medium\" weight=\"bold\"> Algo deu errado :( </cura-heading>\r\n\r\n @if (responseText) {\r\n <cura-paragraph color=\"neutral-black\" size=\"large\">\r\n {{ responseText }}\r\n </cura-paragraph>\r\n }\r\n\r\n @if (type() === error.NOT_FOUND && returnRoute() && returnLabel()) {\r\n <cura-button\r\n rdsitelink\r\n [href]=\"returnRoute()\"\r\n size=\"medium\"\r\n type=\"button\"\r\n [color]=\"curaButtonColor\"\r\n fontColor=\"light\"\r\n iconName=\"arrowLeft\"\r\n target=\"_self\"\r\n >\r\n Voltar para {{ returnLabel() }}\r\n </cura-button>\r\n }\r\n\r\n @if (type() === error.SERVER_RESPONSE) {\r\n @if (curaButtonColor) {\r\n <cura-button size=\"medium\" type=\"button\" (click)=\"reloadPage()\" [color]=\"curaButtonColor\" fontColor=\"light\" iconName=\"reload\" target=\"_self\">\r\n Atualizar página novamente\r\n </cura-button>\r\n }\r\n\r\n @if (returnLabel() && returnRoute()) {\r\n <cura-paragraph color=\"neutral-black\" size=\"large\">ou</cura-paragraph>\r\n @if (curaButtonOutlineColor) {\r\n <cura-button-outline\r\n rdsitelink\r\n [href]=\"returnRoute()\"\r\n size=\"medium\"\r\n type=\"button\"\r\n [color]=\"curaButtonOutlineColor\"\r\n iconName=\"arrowLeft\"\r\n target=\"_self\"\r\n >\r\n Voltar para {{ returnLabel() }}\r\n </cura-button-outline>\r\n }\r\n }\r\n }\r\n @if (ctasContent.ctas!.length > 0 && ctasBorderColor && ctasIconColor) {\r\n <cura-paragraph class=\"wrapper-text\" color=\"neutral-black\" size=\"large\"> Você pode também: </cura-paragraph>\r\n\r\n <rdsite-cta-wrapper [content]=\"ctasContent\" [showTitleAndText]=\"false\" [colors]=\"{ border: ctasBorderColor, icon: ctasIconColor }\"></rdsite-cta-wrapper>\r\n }\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAqCa,cAAc,CAAA;AAf3B,IAAA,WAAA,GAAA;AAgBU,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;AACnC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACvC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACrC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAExC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,MAAM,CAAC,IAAI,iDAAC;A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MAAA,EAAA,CAAA,MAAA,EAAA,WAAA,EAAA,OAAA,EAAA,aAAA,EAAA,YAAA,EAAA,cAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACtB,mBAAmB,mRACnB,0BAA0B,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,UAAA,EAAA,WAAA,EAAA,UAAA,EAAA,SAAA,EAAA,cAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,OAAA,EAAA,YAAA,EAAA,WAAA,EAAA,WAAA,EAAA,SAAA,EAAA,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAKjB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAf1B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAAA,OAAA,EACf;wBACP,mBAAmB;wBACnB,mBAAmB;wBACnB,oBAAoB;wBACpB,kBAAkB;wBAClB,oBAAoB;wBACpB,sBAAsB;wBACtB,mBAAmB;wBACnB,0BAA0B;AAC3B,qBAAA,EAAA,QAAA,EAAA,k+EAAA,EAAA,MAAA,EAAA,CAAA,6uBAAA,CAAA,EAAA;8BAmCyB,KAAK,EAAA,CAAA;sBAA9B,WAAW;uBAAC,OAAO;;;AEpEtB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-components-error.mjs","sources":["../../../projects/site-front-end-lib/components/error/error.component.ts","../../../projects/site-front-end-lib/components/error/error.component.html","../../../projects/site-front-end-lib/components/error/rededor-site-front-end-lib-components-error.ts"],"sourcesContent":["import { Component, HostBinding, OnDestroy, OnInit, PLATFORM_ID, input, inject } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { isPlatformServer } from '@angular/common';\r\nimport {\r\n LogService,\r\n SeoService,\r\n ServerResponseService,\r\n RdsiteLinkDirective,\r\n BreadcrumbsItems,\r\n CtaWrapper,\r\n ErrorService,\r\n} from '@rededor/site-front-end-lib/core';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { CtaWrapperComponent } from '@rededor/site-front-end-lib/components/cta-wrapper';\r\nimport { BreadcrumbsComponent } from '@rededor/site-front-end-lib/components/breadcrumbs';\r\nimport { Errors, Themes } from '@rededor/site-front-end-lib/enums';\r\nimport { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';\r\nimport { CuraHeadingComponent } from '@rededor/site-front-end-lib/cura/texts/cura-heading';\r\nimport { CuraParagraphComponent } from '@rededor/site-front-end-lib/cura/texts/cura-paragraph';\r\nimport { CuraButtonComponent } from '@rededor/site-front-end-lib/cura/buttons/cura-button';\r\nimport { CuraButtonOutlineComponent } from '@rededor/site-front-end-lib/cura/buttons/cura-button-outline';\r\n\r\n@Component({\r\n selector: 'rdsite-error',\r\n imports: [\r\n CtaWrapperComponent,\r\n RdsiteLinkDirective,\r\n BreadcrumbsComponent,\r\n CuraLabelComponent,\r\n CuraHeadingComponent,\r\n CuraParagraphComponent,\r\n CuraButtonComponent,\r\n CuraButtonOutlineComponent,\r\n ],\r\n templateUrl: './error.component.html',\r\n styleUrl: './error.component.scss',\r\n})\r\nexport class ErrorComponent implements OnInit, OnDestroy {\r\n private errorService = inject(ErrorService);\r\n private curaApiService = inject(CuraApiService);\r\n private logService = inject(LogService);\r\n private seoService = inject(SeoService);\r\n private serverResponse = inject(ServerResponseService);\r\n private readonly platformId = inject(PLATFORM_ID);\r\n\r\n readonly theme = input<Themes>(Themes.REDE);\r\n readonly type = input.required<Errors>();\r\n readonly returnRoute = input<string>('');\r\n readonly returnLabel = input<string>('');\r\n readonly pageTitle = input('Default component');\r\n readonly component = input('DefaultComponent');\r\n readonly breadcrumbsItems = input<BreadcrumbsItems[]>([]);\r\n\r\n ctasSubscription!: Subscription;\r\n ctasContent!: CtaWrapper;\r\n responseText = '';\r\n\r\n backgroundColor: string = '';\r\n backgroundColorBadge: string = '';\r\n breadcrumbFontWeight: string = '';\r\n labelColor: string = '';\r\n labelTextColor: string = '';\r\n curaButtonColor: string = '';\r\n curaButtonOutlineColor: string = '';\r\n ctasBorderColor: string = '';\r\n ctasIconColor: string = '';\r\n public error = Errors;\r\n\r\n @HostBinding('style') get style() {\r\n switch (this.theme()) {\r\n case Themes.REDE:\r\n return {\r\n '--backgroundColor': this.curaApiService.theme.colors.getColor('neutral-white'),\r\n '--labelColor': this.curaApiService.theme.colors.getColor('primary-lighter'),\r\n };\r\n case Themes.ONCO:\r\n return {\r\n '--backgroundColor': this.curaApiService.theme.colors.getColor('neutral-pale'),\r\n '--labelColor': this.curaApiService.theme.colors.getColor('success-lighter'),\r\n };\r\n case Themes.MATERNIDADE:\r\n return {\r\n '--backgroundColor': this.curaApiService.theme.colors.getColor('accent-lighter'),\r\n '--labelColor': this.curaApiService.theme.colors.getColor('primary-light'),\r\n };\r\n case Themes.RICHET:\r\n return {\r\n '--backgroundColor': this.curaApiService.theme.colors.getColor('neutral-white'),\r\n '--labelColor': this.curaApiService.theme.colors.getColor('primary-lighter'),\r\n };\r\n case Themes.STAR:\r\n return {\r\n '--backgroundColor': this.curaApiService.theme.colors.getColor('secondary-lighter'),\r\n '--labelColor': this.curaApiService.theme.colors.getColor('secondary-light'),\r\n };\r\n default:\r\n return {\r\n '--backgroundColor': this.curaApiService.theme.colors.getColor('neutral-white'),\r\n '--labelColor': this.curaApiService.theme.colors.getColor('primary-lighter'),\r\n };\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n const type = this.type();\r\n if (type === Errors.NOT_FOUND) {\r\n this.responseText = 'A página que você acessou não existe mais ou foi movida para outra URL';\r\n if (isPlatformServer(this.platformId)) {\r\n this.serverResponse.setNotFound();\r\n }\r\n this.logService.log404(this.component());\r\n this.seoService.set404Title(this.pageTitle());\r\n } else if (type === Errors.SERVER_RESPONSE) {\r\n this.responseText = 'Recomendamos atualizar a página ou tentar novamente mais tarde.';\r\n if (isPlatformServer(this.platformId)) {\r\n this.serverResponse.setError();\r\n }\r\n this.logService.log500(this.component());\r\n this.seoService.set500Title(this.pageTitle());\r\n }\r\n this.ctasSubscription = this.errorService.ctas.subscribe((ctas) => {\r\n this.ctasContent = ctas;\r\n });\r\n this.setTheme(this.theme());\r\n }\r\n\r\n setTheme(theme: Themes) {\r\n switch (theme) {\r\n case Themes.REDE:\r\n this.labelTextColor = 'primary-dark';\r\n this.curaButtonColor = 'primary';\r\n this.curaButtonOutlineColor = 'primary';\r\n this.ctasBorderColor = 'primary-darker';\r\n this.ctasIconColor = 'primary-darker';\r\n break;\r\n case Themes.ONCO:\r\n this.labelTextColor = 'primary-dark';\r\n this.backgroundColorBadge = 'success-lighter';\r\n this.curaButtonColor = 'accent';\r\n this.curaButtonOutlineColor = 'accent';\r\n this.ctasBorderColor = 'accent-base';\r\n this.ctasIconColor = 'primary-dark';\r\n this.breadcrumbFontWeight = '700';\r\n break;\r\n case Themes.MATERNIDADE:\r\n this.labelTextColor = 'accent-base';\r\n this.curaButtonColor = 'accent';\r\n this.curaButtonOutlineColor = 'accent';\r\n this.ctasBorderColor = 'accent-base';\r\n this.ctasIconColor = 'accent-base';\r\n break;\r\n case Themes.RICHET:\r\n this.labelTextColor = 'primary-dark';\r\n this.curaButtonColor = 'primary';\r\n this.curaButtonOutlineColor = 'primary';\r\n this.ctasBorderColor = 'primary-darker';\r\n this.ctasIconColor = 'primary-darker';\r\n break;\r\n case Themes.STAR:\r\n this.labelTextColor = 'secondary-dark';\r\n this.curaButtonColor = 'secondary';\r\n this.curaButtonOutlineColor = 'secondary';\r\n this.ctasBorderColor = 'secondary-base';\r\n this.ctasIconColor = 'secondary-darker';\r\n break;\r\n }\r\n }\r\n\r\n reloadPage() {\r\n if (window !== undefined) {\r\n window.location.reload();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.ctasSubscription?.unsubscribe();\r\n }\r\n}\r\n","<div class=\"rdsite-error\">\r\n @if (ctasIconColor && breadcrumbsItems().length) {\r\n <rdsite-breadcrumbs [breadcrumbs]=\"breadcrumbsItems()\" [labelIconColor]=\"ctasIconColor\" [fontWeight]=\"breadcrumbFontWeight\"></rdsite-breadcrumbs>\r\n }\r\n <div class=\"rdsite-error-container\">\r\n @if (labelTextColor) {\r\n <cura-label [color]=\"labelTextColor\">\r\n {{ type() === 'server-response' ? '500' : '404' }}\r\n </cura-label>\r\n }\r\n\r\n <cura-heading color=\"neutral-black\" size=\"medium\" weight=\"bold\"> Algo deu errado :( </cura-heading>\r\n\r\n @if (responseText) {\r\n <cura-paragraph color=\"neutral-black\" size=\"large\">\r\n {{ responseText }}\r\n </cura-paragraph>\r\n }\r\n\r\n @if (type() === error.NOT_FOUND && returnRoute() && returnLabel()) {\r\n <cura-button\r\n rdsitelink\r\n [href]=\"returnRoute()\"\r\n size=\"medium\"\r\n type=\"button\"\r\n [color]=\"curaButtonColor\"\r\n fontColor=\"light\"\r\n iconName=\"arrowLeft\"\r\n target=\"_self\"\r\n >\r\n Voltar para {{ returnLabel() }}\r\n </cura-button>\r\n }\r\n\r\n @if (type() === error.SERVER_RESPONSE) {\r\n @if (curaButtonColor) {\r\n <cura-button size=\"medium\" type=\"button\" (click)=\"reloadPage()\" [color]=\"curaButtonColor\" fontColor=\"light\" iconName=\"reload\" target=\"_self\">\r\n Atualizar página novamente\r\n </cura-button>\r\n }\r\n\r\n @if (returnLabel() && returnRoute()) {\r\n <cura-paragraph color=\"neutral-black\" size=\"large\">ou</cura-paragraph>\r\n @if (curaButtonOutlineColor) {\r\n <cura-button-outline\r\n rdsitelink\r\n [href]=\"returnRoute()\"\r\n size=\"medium\"\r\n type=\"button\"\r\n [color]=\"curaButtonOutlineColor\"\r\n iconName=\"arrowLeft\"\r\n target=\"_self\"\r\n >\r\n Voltar para {{ returnLabel() }}\r\n </cura-button-outline>\r\n }\r\n }\r\n }\r\n @if (ctasContent.ctas!.length > 0 && ctasBorderColor && ctasIconColor) {\r\n <cura-paragraph class=\"wrapper-text\" color=\"neutral-black\" size=\"large\"> Você pode também: </cura-paragraph>\r\n\r\n <rdsite-cta-wrapper [content]=\"ctasContent\" [showTitleAndText]=\"false\" [colors]=\"{ border: ctasBorderColor, icon: ctasIconColor }\"></rdsite-cta-wrapper>\r\n }\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAqCa,cAAc,CAAA;AAf3B,IAAA,WAAA,GAAA;AAgBU,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;AACnC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACvC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACrC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAExC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,MAAM,CAAC,IAAI,iDAAC;AAClC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,+CAAU;AAC/B,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,EAAE,uDAAC;AAC/B,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,EAAE,uDAAC;AAC/B,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,mBAAmB,qDAAC;AACtC,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,kBAAkB,qDAAC;AACrC,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAqB,EAAE,4DAAC;QAIzD,IAAA,CAAA,YAAY,GAAG,EAAE;QAEjB,IAAA,CAAA,eAAe,GAAW,EAAE;QAC5B,I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A,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAKjB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAf1B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAAA,OAAA,EACf;wBACP,mBAAmB;wBACnB,mBAAmB;wBACnB,oBAAoB;wBACpB,kBAAkB;wBAClB,oBAAoB;wBACpB,sBAAsB;wBACtB,mBAAmB;wBACnB,0BAA0B;AAC3B,qBAAA,EAAA,QAAA,EAAA,k+EAAA,EAAA,MAAA,EAAA,CAAA,6uBAAA,CAAA,EAAA;8BAmCyB,KAAK,EAAA,CAAA;sBAA9B,WAAW;uBAAC,OAAO;;;AEpEtB;;AAEG;;;;"}
|
|
@@ -71,11 +71,11 @@ class FilterLetterAndTermsComponent {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: FilterLetterAndTermsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
74
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: FilterLetterAndTermsComponent, isStandalone: true, selector: "rdsite-filter-letter-and-terms", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, baseUrl: { classPropertyName: "baseUrl", publicName: "baseUrl", isSignal: true, isRequired: false, transformFunction: null }, baseUrlAll: { classPropertyName: "baseUrlAll", publicName: "baseUrlAll", isSignal: true, isRequired: false, transformFunction: null }, enableScroll: { classPropertyName: "enableScroll", publicName: "enableScroll", isSignal: true, isRequired: false, transformFunction: null }, selectedOption: { classPropertyName: "selectedOption", publicName: "selectedOption", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { optionSelected: "optionSelected" }, host: { properties: { "style": "this.style" } }, ngImport: i0, template: "<div class=\"filter-letter-and-terms\">\
|
|
74
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: FilterLetterAndTermsComponent, isStandalone: true, selector: "rdsite-filter-letter-and-terms", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, baseUrl: { classPropertyName: "baseUrl", publicName: "baseUrl", isSignal: true, isRequired: false, transformFunction: null }, baseUrlAll: { classPropertyName: "baseUrlAll", publicName: "baseUrlAll", isSignal: true, isRequired: false, transformFunction: null }, enableScroll: { classPropertyName: "enableScroll", publicName: "enableScroll", isSignal: true, isRequired: false, transformFunction: null }, selectedOption: { classPropertyName: "selectedOption", publicName: "selectedOption", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { optionSelected: "optionSelected" }, host: { properties: { "style": "this.style" } }, ngImport: i0, template: "<div class=\"filter-letter-and-terms\">\n <a\n id=\"todas\"\n rdsitelink\n class=\"filter-option\"\n [class.selected]=\"selectedOption === ''\"\n [href]=\"baseUrlAll() ? baseUrlAll() : baseUrl() ? baseUrl() : '#'\"\n (click)=\"selectOption('', $event)\"\n >\n TODAS\n </a>\n\n @if (options.length > 1) {\n @for (option of options(); track option) {\n <a\n [id]=\"option\"\n rdsitelink\n class=\"filter-option\"\n [class.selected]=\"selectedOption === option\"\n [href]=\"baseUrl() ? baseUrl() + option.toLowerCase() : '#'\"\n (click)=\"selectOption(option, $event)\"\n >\n {{ option }}\n </a>\n }\n }\n</div>\n", styles: [".filter-letter-and-terms{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:12px;width:100vw;margin-inline:-5vw;padding-inline:5vw;padding-block:12px;overflow-x:scroll}@media (hover: none) and (pointer: coarse){.filter-letter-and-terms .filter-option:hover:not(.selected){background-color:var(--neutral-pale)}.filter-letter-and-terms .filter-option.selected{background-color:var(--color-one-base)}.filter-letter-and-terms .filter-option:active:not(.selected){background-color:var(--neutral-pale)}}@media only screen and (min-width: 992px){.filter-letter-and-terms{flex-wrap:wrap;width:100%;padding:12px 0;margin:0;overflow-x:auto}}.filter-letter-and-terms .filter-option{flex:0 0 28px;display:flex;justify-content:center;align-items:center;padding:6px;color:var(--neutral-dark);font-family:var(--font-family);font-size:12px;border-radius:4px;background-color:var(--neutral-pale);border:1px solid var(--neutral-light)}.filter-letter-and-terms .filter-option:hover{color:var(--neutral-purewhite);background-color:var(--color-one-dark)}.filter-letter-and-terms .filter-option.selected{color:var(--neutral-purewhite);background-color:var(--color-one-base)}.filter-letter-and-terms .filter-option.selected:not(.selected){background-color:var(--neutral-pale);border-color:var(--neutral-light)}.filter-letter-and-terms .filter-option.selected:focus{outline:2px solid var(--color-one-light)}\n"] }); }
|
|
75
75
|
}
|
|
76
76
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: FilterLetterAndTermsComponent, decorators: [{
|
|
77
77
|
type: Component,
|
|
78
|
-
args: [{ selector: 'rdsite-filter-letter-and-terms', imports: [], template: "<div class=\"filter-letter-and-terms\">\
|
|
78
|
+
args: [{ selector: 'rdsite-filter-letter-and-terms', imports: [], template: "<div class=\"filter-letter-and-terms\">\n <a\n id=\"todas\"\n rdsitelink\n class=\"filter-option\"\n [class.selected]=\"selectedOption === ''\"\n [href]=\"baseUrlAll() ? baseUrlAll() : baseUrl() ? baseUrl() : '#'\"\n (click)=\"selectOption('', $event)\"\n >\n TODAS\n </a>\n\n @if (options.length > 1) {\n @for (option of options(); track option) {\n <a\n [id]=\"option\"\n rdsitelink\n class=\"filter-option\"\n [class.selected]=\"selectedOption === option\"\n [href]=\"baseUrl() ? baseUrl() + option.toLowerCase() : '#'\"\n (click)=\"selectOption(option, $event)\"\n >\n {{ option }}\n </a>\n }\n }\n</div>\n", styles: [".filter-letter-and-terms{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:12px;width:100vw;margin-inline:-5vw;padding-inline:5vw;padding-block:12px;overflow-x:scroll}@media (hover: none) and (pointer: coarse){.filter-letter-and-terms .filter-option:hover:not(.selected){background-color:var(--neutral-pale)}.filter-letter-and-terms .filter-option.selected{background-color:var(--color-one-base)}.filter-letter-and-terms .filter-option:active:not(.selected){background-color:var(--neutral-pale)}}@media only screen and (min-width: 992px){.filter-letter-and-terms{flex-wrap:wrap;width:100%;padding:12px 0;margin:0;overflow-x:auto}}.filter-letter-and-terms .filter-option{flex:0 0 28px;display:flex;justify-content:center;align-items:center;padding:6px;color:var(--neutral-dark);font-family:var(--font-family);font-size:12px;border-radius:4px;background-color:var(--neutral-pale);border:1px solid var(--neutral-light)}.filter-letter-and-terms .filter-option:hover{color:var(--neutral-purewhite);background-color:var(--color-one-dark)}.filter-letter-and-terms .filter-option.selected{color:var(--neutral-purewhite);background-color:var(--color-one-base)}.filter-letter-and-terms .filter-option.selected:not(.selected){background-color:var(--neutral-pale);border-color:var(--neutral-light)}.filter-letter-and-terms .filter-option.selected:focus{outline:2px solid var(--color-one-light)}\n"] }]
|
|
79
79
|
}], propDecorators: { selectedOption: [{
|
|
80
80
|
type: Input
|
|
81
81
|
}], style: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-components-filter-letter-and-terms.mjs","sources":["../../../projects/site-front-end-lib/components/filter-letter-and-terms/filter-letter-and-terms.component.ts","../../../projects/site-front-end-lib/components/filter-letter-and-terms/filter-letter-and-terms.component.html","../../../projects/site-front-end-lib/components/filter-letter-and-terms/rededor-site-front-end-lib-components-filter-letter-and-terms.ts"],"sourcesContent":["import { AfterViewInit, Component, HostBinding, Input, PLATFORM_ID, DOCUMENT, input, output, inject } from '@angular/core';\r\nimport { isPlatformBrowser } from '@angular/common';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\n\r\n@Component({\r\n selector: 'rdsite-filter-letter-and-terms',\r\n imports: [],\r\n templateUrl: './filter-letter-and-terms.component.html',\r\n styleUrl: './filter-letter-and-terms.component.scss',\r\n})\r\nexport class FilterLetterAndTermsComponent implements AfterViewInit {\r\n private readonly curaApiService = inject(CuraApiService);\r\n private document = inject<Document>(DOCUMENT);\r\n private readonly platformId = inject(PLATFORM_ID);\r\n\r\n readonly options = input<string[]>([]);\r\n readonly baseUrl = input<string>('');\r\n readonly baseUrlAll = input<string>('');\r\n readonly enableScroll = input(false);\r\n private isFirstScroll = true;\r\n private _selectedOption: string = '';\r\n\r\n @Input()\r\n set selectedOption(value: string) {\r\n if (this._selectedOption === value) return;\r\n this._selectedOption = value;\r\n if (this.enableScroll() && !this.isFirstScroll) {\r\n this.scrollToSelectedOption(value);\r\n }\r\n }\r\n\r\n get selectedOption(): string {\r\n return this._selectedOption;\r\n }\r\n\r\n readonly optionSelected = output<string>();\r\n\r\n @HostBinding('style') get style() {\r\n return {\r\n '--font-family': this.curaApiService.theme.fonts.getFamily(''),\r\n '--neutral-purewhite': this.curaApiService.theme.colors.getColor('neutral-purewhite'),\r\n '--neutral-pale': this.curaApiService.theme.colors.getColor('neutral-pale'),\r\n '--neutral-light': this.curaApiService.theme.colors.getColor('neutral-light'),\r\n '--neutral-dark': this.curaApiService.theme.colors.getColor('neutral-dark'),\r\n '--neutral-black': this.curaApiService.theme.colors.getColor('neutral-black'),\r\n '--color-one-light': this.curaApiService.theme.colors.getColor('primary-light'),\r\n '--color-one-base': this.curaApiService.theme.colors.getColor('primary-base'),\r\n '--color-one-dark': this.curaApiService.theme.colors.getColor('primary-dark'),\r\n '--color-one-darker': this.curaApiService.theme.colors.getColor('primary-darker'),\r\n };\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (this.selectedOption) {\r\n setTimeout(() => {\r\n this.scrollToSelectedOption(this.selectedOption);\r\n this.isFirstScroll = false;\r\n }, 100);\r\n }\r\n }\r\n\r\n selectOption(option: string, event: Event): void {\r\n event.preventDefault();\r\n if (this._selectedOption !== option) {\r\n this._selectedOption = option;\r\n this.optionSelected.emit(option);\r\n this.scrollToSelectedOption(option);\r\n }\r\n }\r\n\r\n scrollToSelectedOption(value: string) {\r\n if (isPlatformBrowser(this.platformId)) {\r\n const elementId = value || 'todas';\r\n const selectedElement = elementId === 'todas' ? this.document.getElementById('todas') : this.document.getElementById(value);\r\n if (selectedElement) {\r\n selectedElement.scrollIntoView({\r\n behavior: 'smooth',\r\n inline: 'center',\r\n block: 'nearest',\r\n });\r\n }\r\n }\r\n }\r\n}\r\n","<div class=\"filter-letter-and-terms\">\
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-components-filter-letter-and-terms.mjs","sources":["../../../projects/site-front-end-lib/components/filter-letter-and-terms/filter-letter-and-terms.component.ts","../../../projects/site-front-end-lib/components/filter-letter-and-terms/filter-letter-and-terms.component.html","../../../projects/site-front-end-lib/components/filter-letter-and-terms/rededor-site-front-end-lib-components-filter-letter-and-terms.ts"],"sourcesContent":["import { AfterViewInit, Component, HostBinding, Input, PLATFORM_ID, DOCUMENT, input, output, inject } from '@angular/core';\r\nimport { isPlatformBrowser } from '@angular/common';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\n\r\n@Component({\r\n selector: 'rdsite-filter-letter-and-terms',\r\n imports: [],\r\n templateUrl: './filter-letter-and-terms.component.html',\r\n styleUrl: './filter-letter-and-terms.component.scss',\r\n})\r\nexport class FilterLetterAndTermsComponent implements AfterViewInit {\r\n private readonly curaApiService = inject(CuraApiService);\r\n private document = inject<Document>(DOCUMENT);\r\n private readonly platformId = inject(PLATFORM_ID);\r\n\r\n readonly options = input<string[]>([]);\r\n readonly baseUrl = input<string>('');\r\n readonly baseUrlAll = input<string>('');\r\n readonly enableScroll = input(false);\r\n private isFirstScroll = true;\r\n private _selectedOption: string = '';\r\n\r\n @Input()\r\n set selectedOption(value: string) {\r\n if (this._selectedOption === value) return;\r\n this._selectedOption = value;\r\n if (this.enableScroll() && !this.isFirstScroll) {\r\n this.scrollToSelectedOption(value);\r\n }\r\n }\r\n\r\n get selectedOption(): string {\r\n return this._selectedOption;\r\n }\r\n\r\n readonly optionSelected = output<string>();\r\n\r\n @HostBinding('style') get style() {\r\n return {\r\n '--font-family': this.curaApiService.theme.fonts.getFamily(''),\r\n '--neutral-purewhite': this.curaApiService.theme.colors.getColor('neutral-purewhite'),\r\n '--neutral-pale': this.curaApiService.theme.colors.getColor('neutral-pale'),\r\n '--neutral-light': this.curaApiService.theme.colors.getColor('neutral-light'),\r\n '--neutral-dark': this.curaApiService.theme.colors.getColor('neutral-dark'),\r\n '--neutral-black': this.curaApiService.theme.colors.getColor('neutral-black'),\r\n '--color-one-light': this.curaApiService.theme.colors.getColor('primary-light'),\r\n '--color-one-base': this.curaApiService.theme.colors.getColor('primary-base'),\r\n '--color-one-dark': this.curaApiService.theme.colors.getColor('primary-dark'),\r\n '--color-one-darker': this.curaApiService.theme.colors.getColor('primary-darker'),\r\n };\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (this.selectedOption) {\r\n setTimeout(() => {\r\n this.scrollToSelectedOption(this.selectedOption);\r\n this.isFirstScroll = false;\r\n }, 100);\r\n }\r\n }\r\n\r\n selectOption(option: string, event: Event): void {\r\n event.preventDefault();\r\n if (this._selectedOption !== option) {\r\n this._selectedOption = option;\r\n this.optionSelected.emit(option);\r\n this.scrollToSelectedOption(option);\r\n }\r\n }\r\n\r\n scrollToSelectedOption(value: string) {\r\n if (isPlatformBrowser(this.platformId)) {\r\n const elementId = value || 'todas';\r\n const selectedElement = elementId === 'todas' ? this.document.getElementById('todas') : this.document.getElementById(value);\r\n if (selectedElement) {\r\n selectedElement.scrollIntoView({\r\n behavior: 'smooth',\r\n inline: 'center',\r\n block: 'nearest',\r\n });\r\n }\r\n }\r\n }\r\n}\r\n","<div class=\"filter-letter-and-terms\">\n <a\n id=\"todas\"\n rdsitelink\n class=\"filter-option\"\n [class.selected]=\"selectedOption === ''\"\n [href]=\"baseUrlAll() ? baseUrlAll() : baseUrl() ? baseUrl() : '#'\"\n (click)=\"selectOption('', $event)\"\n >\n TODAS\n </a>\n\n @if (options.length > 1) {\n @for (option of options(); track option) {\n <a\n [id]=\"option\"\n rdsitelink\n class=\"filter-option\"\n [class.selected]=\"selectedOption === option\"\n [href]=\"baseUrl() ? baseUrl() + option.toLowerCase() : '#'\"\n (click)=\"selectOption(option, $event)\"\n >\n {{ option }}\n </a>\n }\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAUa,6BAA6B,CAAA;AAN1C,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAChD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAW,QAAQ,CAAC;AAC5B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAExC,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAW,EAAE,mDAAC;AAC7B,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAS,EAAE,mDAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,EAAE,sDAAC;AAC9B,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAC,KAAK,wDAAC;QAC5B,IAAA,CAAA,aAAa,GAAG,IAAI;QACpB,IAAA,CAAA,eAAe,GAAW,EAAE;QAe3B,IAAA,CAAA,cAAc,GAAG,MAAM,EAAU;AAgD3C,IAAA;IA7DC,IACI,cAAc,CAAC,KAAa,EAAA;AAC9B,QAAA,IAAI,IAAI,CAAC,eAAe,KAAK,KAAK;YAAE;AACpC,QAAA,IAAI,CAAC,eAAe,GAAG,KAAK;QAC5B,IAAI,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;AAC9C,YAAA,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC;QACpC;IACF;AAEA,IAAA,IAAI,cAAc,GAAA;QAChB,OAAO,IAAI,CAAC,eAAe;IAC7B;AAIA,IAAA,IAA0B,KAAK,GAAA;QAC7B,OAAO;AACL,YAAA,eAAe,EAAE,IAAI,CAAC,cAAc,CAA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