@rededor/site-front-end-lib 1.3.1 → 1.3.3
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/esm2022/lib/components/algolia-dropdown/algolia-dropdown.component.mjs +123 -0
- package/esm2022/lib/components/banner/content-banner/content-banner.component.mjs +10 -4
- package/esm2022/lib/components/index.mjs +2 -2
- package/fesm2022/rededor-site-front-end-lib.mjs +49 -73
- package/fesm2022/rededor-site-front-end-lib.mjs.map +1 -1
- package/lib/components/algolia-dropdown/algolia-dropdown.component.d.ts +37 -0
- package/lib/components/banner/content-banner/content-banner.component.d.ts +7 -1
- package/lib/components/index.d.ts +1 -1
- package/package.json +1 -1
- package/esm2022/lib/components/algolia/algolia.component.mjs +0 -154
- package/esm2022/lib/models/algolia.model.mjs +0 -2
- package/lib/components/algolia/algolia.component.d.ts +0 -46
- package/lib/models/algolia.model.d.ts +0 -12
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { Component, CUSTOM_ELEMENTS_SCHEMA, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "../../services";
|
|
4
|
+
export class AlgoliaDropdownComponent {
|
|
5
|
+
get algoliaConfig() {
|
|
6
|
+
return this.compAlgoliaConfig;
|
|
7
|
+
}
|
|
8
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
9
|
+
set algoliaConfig(config) {
|
|
10
|
+
this.ready = false;
|
|
11
|
+
if (this.setupAlgolia(config)) {
|
|
12
|
+
this.compAlgoliaConfig = config;
|
|
13
|
+
this.ready = true;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
constructor(algoliaSearchApiService) {
|
|
17
|
+
this.algoliaSearchApiService = algoliaSearchApiService;
|
|
18
|
+
this.compAlgoliaConfig = { id: '', key: '' };
|
|
19
|
+
this.disabled = false;
|
|
20
|
+
this.required = false;
|
|
21
|
+
this.searchminchars = 2;
|
|
22
|
+
this.searchParams = {};
|
|
23
|
+
this.searchTerm = '';
|
|
24
|
+
// Algolia
|
|
25
|
+
this.isMultiple = false;
|
|
26
|
+
// State
|
|
27
|
+
this.ready = false;
|
|
28
|
+
this.algoliaResults = new EventEmitter();
|
|
29
|
+
this.resetResults = new EventEmitter();
|
|
30
|
+
this.optionSelected = new EventEmitter();
|
|
31
|
+
}
|
|
32
|
+
setupAlgolia(config) {
|
|
33
|
+
if (config?.id && config?.key && (config?.index || config?.multipleIndex)) {
|
|
34
|
+
if (config.multipleIndex) {
|
|
35
|
+
this.isMultiple = true;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.isMultiple = false;
|
|
39
|
+
}
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
termChange(event) {
|
|
47
|
+
if (event.target.value) {
|
|
48
|
+
this.searchTerm = event?.target?.value;
|
|
49
|
+
this.search();
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
this.resetResults.emit(event);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
search() {
|
|
56
|
+
if (this.searchTerm?.length >= this.searchminchars && this.ready) {
|
|
57
|
+
if (!this.isMultiple) {
|
|
58
|
+
this.algoliaSearchApiService.search(this.searchTerm, this.algoliaConfig.index, this.searchParams).subscribe({
|
|
59
|
+
next: (results) => {
|
|
60
|
+
this.algoliaResults.emit(results);
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
const queries = this.compAlgoliaConfig?.multipleIndex.map((i) => {
|
|
66
|
+
return { ...i, query: this.searchTerm };
|
|
67
|
+
});
|
|
68
|
+
this.algoliaSearchApiService.searchMultipleIndexes(queries).subscribe({
|
|
69
|
+
next: (results) => {
|
|
70
|
+
this.algoliaResults.emit(results.results);
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
optionSelect(event) {
|
|
77
|
+
this.optionSelected.emit(event.target.value);
|
|
78
|
+
}
|
|
79
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AlgoliaDropdownComponent, deps: [{ token: i1.AlgoliaSearchApiService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
80
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AlgoliaDropdownComponent, isStandalone: true, selector: "rdsite-algolia-dropdown", inputs: { algoliaConfig: "algoliaConfig", name: "name", size: "size", label: "label", placeholder: "placeholder", status: "status", icon: "icon", disabled: "disabled", required: "required", maxheight: "maxheight", searchdelay: "searchdelay", searchminchars: "searchminchars", helperText: "helperText", cssMaxHeight: "cssMaxHeight", searchParams: "searchParams" }, outputs: { algoliaResults: "algoliaResults", resetResults: "resetResults", optionSelected: "optionSelected" }, ngImport: i0, template: "<cura-dropdown-search\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [label]=\"label\"\n [status]=\"status\"\n [icon]=\"icon\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [maxheight]=\"maxheight\"\n [searchdelay]=\"searchdelay\"\n [searchminchars]=\"searchminchars\"\n [helperText]=\"helperText\"\n [cssMaxHeight]=\"cssMaxHeight\"\n (termchange)=\"termChange($event)\"\n (optionselect)=\"optionSelect($event)\"\n>\n <ng-content></ng-content>\n</cura-dropdown-search>\n", styles: [""] }); }
|
|
81
|
+
}
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AlgoliaDropdownComponent, decorators: [{
|
|
83
|
+
type: Component,
|
|
84
|
+
args: [{ selector: 'rdsite-algolia-dropdown', standalone: true, imports: [], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<cura-dropdown-search\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [label]=\"label\"\n [status]=\"status\"\n [icon]=\"icon\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [maxheight]=\"maxheight\"\n [searchdelay]=\"searchdelay\"\n [searchminchars]=\"searchminchars\"\n [helperText]=\"helperText\"\n [cssMaxHeight]=\"cssMaxHeight\"\n (termchange)=\"termChange($event)\"\n (optionselect)=\"optionSelect($event)\"\n>\n <ng-content></ng-content>\n</cura-dropdown-search>\n" }]
|
|
85
|
+
}], ctorParameters: () => [{ type: i1.AlgoliaSearchApiService }], propDecorators: { algoliaConfig: [{
|
|
86
|
+
type: Input,
|
|
87
|
+
args: ['algoliaConfig']
|
|
88
|
+
}], name: [{
|
|
89
|
+
type: Input
|
|
90
|
+
}], size: [{
|
|
91
|
+
type: Input
|
|
92
|
+
}], label: [{
|
|
93
|
+
type: Input
|
|
94
|
+
}], placeholder: [{
|
|
95
|
+
type: Input
|
|
96
|
+
}], status: [{
|
|
97
|
+
type: Input
|
|
98
|
+
}], icon: [{
|
|
99
|
+
type: Input
|
|
100
|
+
}], disabled: [{
|
|
101
|
+
type: Input
|
|
102
|
+
}], required: [{
|
|
103
|
+
type: Input
|
|
104
|
+
}], maxheight: [{
|
|
105
|
+
type: Input
|
|
106
|
+
}], searchdelay: [{
|
|
107
|
+
type: Input
|
|
108
|
+
}], searchminchars: [{
|
|
109
|
+
type: Input
|
|
110
|
+
}], helperText: [{
|
|
111
|
+
type: Input
|
|
112
|
+
}], cssMaxHeight: [{
|
|
113
|
+
type: Input
|
|
114
|
+
}], searchParams: [{
|
|
115
|
+
type: Input
|
|
116
|
+
}], algoliaResults: [{
|
|
117
|
+
type: Output
|
|
118
|
+
}], resetResults: [{
|
|
119
|
+
type: Output
|
|
120
|
+
}], optionSelected: [{
|
|
121
|
+
type: Output
|
|
122
|
+
}] } });
|
|
123
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxnb2xpYS1kcm9wZG93bi5jb21wb25lbnQuanMiL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N1cmEtZHJvcGRvd24tc2VhcmNoXG4gIFtuYW1lXT1cIm5hbWVcIlxuICBbcGxhY2Vob2xkZXJdPVwicGxhY2Vob2xkZXJcIlxuICBbbGFiZWxdPVwibGFiZWxcIlxuICBbc3RhdHVzXT1cInN0YXR1c1wiXG4gIFtpY29uXT1cImljb25cIlxuICBbZGlzYWJsZWRdPVwiZGlzYWJsZWRcIlxuICBbcmVxdWlyZWRdPVwicmVxdWlyZWRcIlxuICBbbWF4aGVpZ2h0XT1cIm1heGhlaWdodFwiXG4gIFtzZWFyY2hkZWxheV09XCJzZWFyY2hkZWxheVwiXG4gIFtzZWFyY2htaW5jaGFyc109XCJzZWFyY2htaW5jaGFyc1wiXG4gIFtoZWxwZXJUZXh0XT1cImhlbHBlclRleHRcIlxuICBbY3NzTWF4SGVpZ2h0XT1cImNzc01heEhlaWdodFwiXG4gICh0ZXJtY2hhbmdlKT1cInRlcm1DaGFuZ2UoJGV2ZW50KVwiXG4gIChvcHRpb25zZWxlY3QpPVwib3B0aW9uU2VsZWN0KCRldmVudClcIlxuPlxuICA8bmctY29udGVudD48L25nLWNvbnRlbnQ+XG48L2N1cmEtZHJvcGRvd24tc2VhcmNoPlxuIl19
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, CUSTOM_ELEMENTS_SCHEMA, HostBinding, Input } from '@angular/core';
|
|
2
|
+
import { Component, CUSTOM_ELEMENTS_SCHEMA, EventEmitter, HostBinding, Input, Output } from '@angular/core';
|
|
3
3
|
import { RdsiteLinkDirective } from '../../../directives';
|
|
4
4
|
import { ImageComponent } from '../../image/image.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
@@ -15,17 +15,23 @@ export class ContentBannerComponent {
|
|
|
15
15
|
constructor(curaService) {
|
|
16
16
|
this.curaService = curaService;
|
|
17
17
|
this.content = null;
|
|
18
|
+
this.ctaClick = new EventEmitter();
|
|
19
|
+
}
|
|
20
|
+
onCtaClick(text, link) {
|
|
21
|
+
this.ctaClick.emit({ text, link });
|
|
18
22
|
}
|
|
19
23
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentBannerComponent, deps: [{ token: i1.CuraService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ContentBannerComponent, isStandalone: true, selector: "rdsite-content-banner", inputs: { content: "content" }, host: { properties: { "style": "this.styleBinding" } }, ngImport: i0, template: "@if (content?.title) {\n <cura-heading level=\"4\" weight=\"bold\" color=\"neutral-purewhite\" margin-block=\"0\">\n {{ content?.title }}\n </cura-heading>\n}\n\n@if (content?.text) {\n <cura-paragraph color=\"neutral-purewhite\" margin-block=\"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 size=\"large\"
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ContentBannerComponent, isStandalone: true, selector: "rdsite-content-banner", inputs: { content: "content" }, outputs: { ctaClick: "ctaClick" }, host: { properties: { "style": "this.styleBinding" } }, ngImport: i0, template: "@if (content?.title) {\n <cura-heading level=\"4\" weight=\"bold\" color=\"neutral-purewhite\" margin-block=\"0\">\n {{ content?.title }}\n </cura-heading>\n}\n\n@if (content?.text) {\n <cura-paragraph color=\"neutral-purewhite\" margin-block=\"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 (click)=\"onCtaClick(content?.cta?.text || '', content?.cta?.link || '')\"\n size=\"large\"\n type=\"button\"\n color=\"accent\"\n [attr.icon-name]=\"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 [imageDefaultSrc]=\"content?.image.url\" [imageWebpSrc]=\"content?.image?.webp_url\" [title]=\"content?.image.title\" [alt]=\"content?.image.alt\">\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: i2.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"] }] }); }
|
|
21
25
|
}
|
|
22
26
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentBannerComponent, decorators: [{
|
|
23
27
|
type: Component,
|
|
24
|
-
args: [{ selector: 'rdsite-content-banner', standalone: true, imports: [CommonModule, RdsiteLinkDirective, ImageComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "@if (content?.title) {\n <cura-heading level=\"4\" weight=\"bold\" color=\"neutral-purewhite\" margin-block=\"0\">\n {{ content?.title }}\n </cura-heading>\n}\n\n@if (content?.text) {\n <cura-paragraph color=\"neutral-purewhite\" margin-block=\"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 size=\"large\"
|
|
28
|
+
args: [{ selector: 'rdsite-content-banner', standalone: true, imports: [CommonModule, RdsiteLinkDirective, ImageComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "@if (content?.title) {\n <cura-heading level=\"4\" weight=\"bold\" color=\"neutral-purewhite\" margin-block=\"0\">\n {{ content?.title }}\n </cura-heading>\n}\n\n@if (content?.text) {\n <cura-paragraph color=\"neutral-purewhite\" margin-block=\"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 (click)=\"onCtaClick(content?.cta?.text || '', content?.cta?.link || '')\"\n size=\"large\"\n type=\"button\"\n color=\"accent\"\n [attr.icon-name]=\"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 [imageDefaultSrc]=\"content?.image.url\" [imageWebpSrc]=\"content?.image?.webp_url\" [title]=\"content?.image.title\" [alt]=\"content?.image.alt\">\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"] }]
|
|
25
29
|
}], ctorParameters: () => [{ type: i1.CuraService }], propDecorators: { content: [{
|
|
26
30
|
type: Input
|
|
31
|
+
}], ctaClick: [{
|
|
32
|
+
type: Output
|
|
27
33
|
}], styleBinding: [{
|
|
28
34
|
type: HostBinding,
|
|
29
35
|
args: ['style']
|
|
30
36
|
}] } });
|
|
31
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC1iYW5uZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2l0ZS1mcm9udC1lbmQtbGliL3NyYy9saWIvY29tcG9uZW50cy9iYW5uZXIvY29udGVudC1iYW5uZXIvY29udGVudC1iYW5uZXIuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2l0ZS1mcm9udC1lbmQtbGliL3NyYy9saWIvY29tcG9uZW50cy9iYW5uZXIvY29udGVudC1iYW5uZXIvY29udGVudC1iYW5uZXIuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxTQUFTLEVBQUUsc0JBQXNCLEVBQUUsWUFBWSxFQUFFLFdBQVcsRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzVHLE9BQU8sRUFBRSx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9jdXJhLWJ1dHRvbj5cbn1cblxuQGlmIChjb250ZW50Py5pbWFnZSkge1xuICA8cmRzaXRlLWltYWdlIFtpbWFnZURlZmF1bHRTcmNdPVwiY29udGVudD8uaW1hZ2UudXJsXCIgW2ltYWdlV2VicFNyY109XCJjb250ZW50Py5pbWFnZT8ud2VicF91cmxcIiBbdGl0bGVdPVwiY29udGVudD8uaW1hZ2UudGl0bGVcIiBbYWx0XT1cImNvbnRlbnQ/LmltYWdlLmFsdFwiPlxuICA8L3Jkc2l0ZS1pbWFnZT5cbn1cbiJdfQ==
|
|
@@ -21,7 +21,7 @@ export * from './side-ctas/components/side-ctas-right-bottom/side-ctas-right-bot
|
|
|
21
21
|
export * from './side-ctas/components/side-ctas-right-middle/side-ctas-right-middle.component';
|
|
22
22
|
export * from './side-ctas/components/side-ctas-right-top/side-ctas-right-top.component';
|
|
23
23
|
export * from './whatsapp/whatsapp.component';
|
|
24
|
-
export * from './algolia/algolia.component';
|
|
24
|
+
export * from './algolia-dropdown/algolia-dropdown.component';
|
|
25
25
|
export * from './error/error.component';
|
|
26
26
|
export * from './error/error-service/error.service';
|
|
27
27
|
export * from './cta-wrapper/cta-wrapper.component';
|
|
@@ -38,4 +38,4 @@ export * from './banner/content-banner/content-banner.component';
|
|
|
38
38
|
export * from './pagination/pagination.component';
|
|
39
39
|
export * from './cards/testimonial-card/testimonial-card.component';
|
|
40
40
|
export * from './carousels/testimonials-carousel/testimonials-carousel.component';
|
|
41
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9zaXRlLWZyb250LWVuZC1saWIvc3JjL2xpYi9jb21wb25lbnRzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGFBQWE7QUFD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29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vaW1hZ2UvaW1hZ2UuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vY2FyZHMvY2FyZC11bmlkYWRlLXBsYW5vcy1jb252ZW5pb3MvY2FyZC11bmlkYWRlLXBsYW5vcy1jb252ZW5pb3MuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vY2FyZHMvZXhwYW5kYWJsZS1jYXJkL2V4cGFuZGFibGUtY2FyZC5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9iYW5uZXIvY29udGVudC1iYW5uZXIvY29udGVudC1iYW5uZXIuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vcGFnaW5hdGlvbi9wYWdpbmF0aW9uLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2NhcmRzL3Rlc3RpbW9uaWFsLWNhcmQvdGVzdGltb25pYWwtY2FyZC5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9jYXJvdXNlbHMvdGVzdGltb25pYWxzLWNhcm91c2VsL3Rlc3RpbW9uaWFscy1jYXJvdXNlbC5jb21wb25lbnQnO1xuIl19
|
|
@@ -3388,7 +3388,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
3388
3388
|
args: [{ selector: 'rdsite-side-ctas-right-top', standalone: true, imports: [], template: "<ng-content></ng-content>\n", styles: [":host{display:none}@media only screen and (min-width: 1024px){:host{display:block}}\n"] }]
|
|
3389
3389
|
}] });
|
|
3390
3390
|
|
|
3391
|
-
class
|
|
3391
|
+
class AlgoliaDropdownComponent {
|
|
3392
3392
|
get algoliaConfig() {
|
|
3393
3393
|
return this.compAlgoliaConfig;
|
|
3394
3394
|
}
|
|
@@ -3400,60 +3400,21 @@ class AlgoliaComponent {
|
|
|
3400
3400
|
this.ready = true;
|
|
3401
3401
|
}
|
|
3402
3402
|
}
|
|
3403
|
-
constructor(algoliaSearchApiService
|
|
3403
|
+
constructor(algoliaSearchApiService) {
|
|
3404
3404
|
this.algoliaSearchApiService = algoliaSearchApiService;
|
|
3405
|
-
this.platformId = platformId;
|
|
3406
3405
|
this.compAlgoliaConfig = { id: '', key: '' };
|
|
3407
|
-
this.
|
|
3408
|
-
this.name = 'cura-dropdown';
|
|
3406
|
+
this.disabled = false;
|
|
3409
3407
|
this.required = false;
|
|
3410
|
-
this.
|
|
3411
|
-
this.value = '';
|
|
3412
|
-
this.placeholder = 'Faça a sua busca';
|
|
3413
|
-
this.deleteButton = false;
|
|
3414
|
-
this.iconName = 'search';
|
|
3415
|
-
this.status = 'default';
|
|
3416
|
-
this.startSearchAtCharLen = 2;
|
|
3417
|
-
this.hintTitle = 'Mais Buscados';
|
|
3418
|
-
this.hints = [];
|
|
3408
|
+
this.searchminchars = 2;
|
|
3419
3409
|
this.searchParams = {};
|
|
3420
3410
|
this.searchTerm = '';
|
|
3421
3411
|
// Algolia
|
|
3422
3412
|
this.isMultiple = false;
|
|
3423
3413
|
// State
|
|
3424
3414
|
this.ready = false;
|
|
3425
|
-
this.isMobile = false;
|
|
3426
|
-
this.isSafari = false;
|
|
3427
|
-
this.mediumBreakpoint = 768;
|
|
3428
|
-
this.scrollY = null;
|
|
3429
|
-
this.resetItem = new EventEmitter();
|
|
3430
3415
|
this.algoliaResults = new EventEmitter();
|
|
3431
|
-
this.
|
|
3432
|
-
this.
|
|
3433
|
-
}
|
|
3434
|
-
ngOnInit() {
|
|
3435
|
-
if (isPlatformBrowser(this.platformId)) {
|
|
3436
|
-
const viewportInnerWidth = window.innerWidth;
|
|
3437
|
-
this.isMobile = viewportInnerWidth < this.mediumBreakpoint;
|
|
3438
|
-
}
|
|
3439
|
-
}
|
|
3440
|
-
manageFocus() {
|
|
3441
|
-
this.focusEmit.emit();
|
|
3442
|
-
}
|
|
3443
|
-
manageBlur() {
|
|
3444
|
-
this.blurEmit.emit();
|
|
3445
|
-
}
|
|
3446
|
-
resetValues() {
|
|
3447
|
-
this.resetItem.emit();
|
|
3448
|
-
}
|
|
3449
|
-
termChange(event) {
|
|
3450
|
-
if (event.target.value) {
|
|
3451
|
-
this.searchTerm = event?.target?.value;
|
|
3452
|
-
this.search();
|
|
3453
|
-
}
|
|
3454
|
-
else {
|
|
3455
|
-
this.resetValues();
|
|
3456
|
-
}
|
|
3416
|
+
this.resetResults = new EventEmitter();
|
|
3417
|
+
this.optionSelected = new EventEmitter();
|
|
3457
3418
|
}
|
|
3458
3419
|
setupAlgolia(config) {
|
|
3459
3420
|
if (config?.id && config?.key && (config?.index || config?.multipleIndex)) {
|
|
@@ -3469,8 +3430,17 @@ class AlgoliaComponent {
|
|
|
3469
3430
|
return false;
|
|
3470
3431
|
}
|
|
3471
3432
|
}
|
|
3433
|
+
termChange(event) {
|
|
3434
|
+
if (event.target.value) {
|
|
3435
|
+
this.searchTerm = event?.target?.value;
|
|
3436
|
+
this.search();
|
|
3437
|
+
}
|
|
3438
|
+
else {
|
|
3439
|
+
this.resetResults.emit(event);
|
|
3440
|
+
}
|
|
3441
|
+
}
|
|
3472
3442
|
search() {
|
|
3473
|
-
if (this.searchTerm?.length >= this.
|
|
3443
|
+
if (this.searchTerm?.length >= this.searchminchars && this.ready) {
|
|
3474
3444
|
if (!this.isMultiple) {
|
|
3475
3445
|
this.algoliaSearchApiService.search(this.searchTerm, this.algoliaConfig.index, this.searchParams).subscribe({
|
|
3476
3446
|
next: (results) => {
|
|
@@ -3490,51 +3460,51 @@ class AlgoliaComponent {
|
|
|
3490
3460
|
}
|
|
3491
3461
|
}
|
|
3492
3462
|
}
|
|
3493
|
-
|
|
3494
|
-
|
|
3463
|
+
optionSelect(event) {
|
|
3464
|
+
this.optionSelected.emit(event.target.value);
|
|
3465
|
+
}
|
|
3466
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AlgoliaDropdownComponent, deps: [{ token: AlgoliaSearchApiService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3467
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AlgoliaDropdownComponent, isStandalone: true, selector: "rdsite-algolia-dropdown", inputs: { algoliaConfig: "algoliaConfig", name: "name", size: "size", label: "label", placeholder: "placeholder", status: "status", icon: "icon", disabled: "disabled", required: "required", maxheight: "maxheight", searchdelay: "searchdelay", searchminchars: "searchminchars", helperText: "helperText", cssMaxHeight: "cssMaxHeight", searchParams: "searchParams" }, outputs: { algoliaResults: "algoliaResults", resetResults: "resetResults", optionSelected: "optionSelected" }, ngImport: i0, template: "<cura-dropdown-search\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [label]=\"label\"\n [status]=\"status\"\n [icon]=\"icon\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [maxheight]=\"maxheight\"\n [searchdelay]=\"searchdelay\"\n [searchminchars]=\"searchminchars\"\n [helperText]=\"helperText\"\n [cssMaxHeight]=\"cssMaxHeight\"\n (termchange)=\"termChange($event)\"\n (optionselect)=\"optionSelect($event)\"\n>\n <ng-content></ng-content>\n</cura-dropdown-search>\n", styles: [""] }); }
|
|
3495
3468
|
}
|
|
3496
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type:
|
|
3469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AlgoliaDropdownComponent, decorators: [{
|
|
3497
3470
|
type: Component,
|
|
3498
|
-
args: [{ selector: 'rdsite-algolia', standalone: true, schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<cura-dropdown-search\n [
|
|
3499
|
-
}], ctorParameters: () => [{ type: AlgoliaSearchApiService },
|
|
3500
|
-
type: Inject,
|
|
3501
|
-
args: [PLATFORM_ID]
|
|
3502
|
-
}] }], propDecorators: { algoliaConfig: [{
|
|
3471
|
+
args: [{ selector: 'rdsite-algolia-dropdown', standalone: true, imports: [], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<cura-dropdown-search\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [label]=\"label\"\n [status]=\"status\"\n [icon]=\"icon\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [maxheight]=\"maxheight\"\n [searchdelay]=\"searchdelay\"\n [searchminchars]=\"searchminchars\"\n [helperText]=\"helperText\"\n [cssMaxHeight]=\"cssMaxHeight\"\n (termchange)=\"termChange($event)\"\n (optionselect)=\"optionSelect($event)\"\n>\n <ng-content></ng-content>\n</cura-dropdown-search>\n" }]
|
|
3472
|
+
}], ctorParameters: () => [{ type: AlgoliaSearchApiService }], propDecorators: { algoliaConfig: [{
|
|
3503
3473
|
type: Input,
|
|
3504
3474
|
args: ['algoliaConfig']
|
|
3505
|
-
}], label: [{
|
|
3506
|
-
type: Input
|
|
3507
3475
|
}], name: [{
|
|
3508
3476
|
type: Input
|
|
3509
|
-
}],
|
|
3510
|
-
type: Input
|
|
3511
|
-
}], selected: [{
|
|
3477
|
+
}], size: [{
|
|
3512
3478
|
type: Input
|
|
3513
|
-
}],
|
|
3479
|
+
}], label: [{
|
|
3514
3480
|
type: Input
|
|
3515
3481
|
}], placeholder: [{
|
|
3516
3482
|
type: Input
|
|
3517
|
-
}],
|
|
3483
|
+
}], status: [{
|
|
3518
3484
|
type: Input
|
|
3519
|
-
}],
|
|
3485
|
+
}], icon: [{
|
|
3520
3486
|
type: Input
|
|
3521
|
-
}],
|
|
3487
|
+
}], disabled: [{
|
|
3488
|
+
type: Input
|
|
3489
|
+
}], required: [{
|
|
3490
|
+
type: Input
|
|
3491
|
+
}], maxheight: [{
|
|
3522
3492
|
type: Input
|
|
3523
|
-
}],
|
|
3493
|
+
}], searchdelay: [{
|
|
3524
3494
|
type: Input
|
|
3525
|
-
}],
|
|
3495
|
+
}], searchminchars: [{
|
|
3526
3496
|
type: Input
|
|
3527
|
-
}],
|
|
3497
|
+
}], helperText: [{
|
|
3498
|
+
type: Input
|
|
3499
|
+
}], cssMaxHeight: [{
|
|
3528
3500
|
type: Input
|
|
3529
3501
|
}], searchParams: [{
|
|
3530
3502
|
type: Input
|
|
3531
|
-
}], resetItem: [{
|
|
3532
|
-
type: Output
|
|
3533
3503
|
}], algoliaResults: [{
|
|
3534
3504
|
type: Output
|
|
3535
|
-
}],
|
|
3505
|
+
}], resetResults: [{
|
|
3536
3506
|
type: Output
|
|
3537
|
-
}],
|
|
3507
|
+
}], optionSelected: [{
|
|
3538
3508
|
type: Output
|
|
3539
3509
|
}] } });
|
|
3540
3510
|
|
|
@@ -4566,15 +4536,21 @@ class ContentBannerComponent {
|
|
|
4566
4536
|
constructor(curaService) {
|
|
4567
4537
|
this.curaService = curaService;
|
|
4568
4538
|
this.content = null;
|
|
4539
|
+
this.ctaClick = new EventEmitter();
|
|
4540
|
+
}
|
|
4541
|
+
onCtaClick(text, link) {
|
|
4542
|
+
this.ctaClick.emit({ text, link });
|
|
4569
4543
|
}
|
|
4570
4544
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentBannerComponent, deps: [{ token: CuraService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4571
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ContentBannerComponent, isStandalone: true, selector: "rdsite-content-banner", inputs: { content: "content" }, host: { properties: { "style": "this.styleBinding" } }, ngImport: i0, template: "@if (content?.title) {\n <cura-heading level=\"4\" weight=\"bold\" color=\"neutral-purewhite\" margin-block=\"0\">\n {{ content?.title }}\n </cura-heading>\n}\n\n@if (content?.text) {\n <cura-paragraph color=\"neutral-purewhite\" margin-block=\"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 size=\"large\"
|
|
4545
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ContentBannerComponent, isStandalone: true, selector: "rdsite-content-banner", inputs: { content: "content" }, outputs: { ctaClick: "ctaClick" }, host: { properties: { "style": "this.styleBinding" } }, ngImport: i0, template: "@if (content?.title) {\n <cura-heading level=\"4\" weight=\"bold\" color=\"neutral-purewhite\" margin-block=\"0\">\n {{ content?.title }}\n </cura-heading>\n}\n\n@if (content?.text) {\n <cura-paragraph color=\"neutral-purewhite\" margin-block=\"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 (click)=\"onCtaClick(content?.cta?.text || '', content?.cta?.link || '')\"\n size=\"large\"\n type=\"button\"\n color=\"accent\"\n [attr.icon-name]=\"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 [imageDefaultSrc]=\"content?.image.url\" [imageWebpSrc]=\"content?.image?.webp_url\" [title]=\"content?.image.title\" [alt]=\"content?.image.alt\">\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: i2.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"] }] }); }
|
|
4572
4546
|
}
|
|
4573
4547
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentBannerComponent, decorators: [{
|
|
4574
4548
|
type: Component,
|
|
4575
|
-
args: [{ selector: 'rdsite-content-banner', standalone: true, imports: [CommonModule, RdsiteLinkDirective, ImageComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "@if (content?.title) {\n <cura-heading level=\"4\" weight=\"bold\" color=\"neutral-purewhite\" margin-block=\"0\">\n {{ content?.title }}\n </cura-heading>\n}\n\n@if (content?.text) {\n <cura-paragraph color=\"neutral-purewhite\" margin-block=\"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 size=\"large\"
|
|
4549
|
+
args: [{ selector: 'rdsite-content-banner', standalone: true, imports: [CommonModule, RdsiteLinkDirective, ImageComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "@if (content?.title) {\n <cura-heading level=\"4\" weight=\"bold\" color=\"neutral-purewhite\" margin-block=\"0\">\n {{ content?.title }}\n </cura-heading>\n}\n\n@if (content?.text) {\n <cura-paragraph color=\"neutral-purewhite\" margin-block=\"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 (click)=\"onCtaClick(content?.cta?.text || '', content?.cta?.link || '')\"\n size=\"large\"\n type=\"button\"\n color=\"accent\"\n [attr.icon-name]=\"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 [imageDefaultSrc]=\"content?.image.url\" [imageWebpSrc]=\"content?.image?.webp_url\" [title]=\"content?.image.title\" [alt]=\"content?.image.alt\">\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"] }]
|
|
4576
4550
|
}], ctorParameters: () => [{ type: CuraService }], propDecorators: { content: [{
|
|
4577
4551
|
type: Input
|
|
4552
|
+
}], ctaClick: [{
|
|
4553
|
+
type: Output
|
|
4578
4554
|
}], styleBinding: [{
|
|
4579
4555
|
type: HostBinding,
|
|
4580
4556
|
args: ['style']
|
|
@@ -4828,5 +4804,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
4828
4804
|
* Generated bundle index. Do not edit.
|
|
4829
4805
|
*/
|
|
4830
4806
|
|
|
4831
|
-
export { AbstractModalComponent, AbstractModalDrawerComponent,
|
|
4807
|
+
export { AbstractModalComponent, AbstractModalDrawerComponent, AlgoliaDropdownComponent, AlgoliaSearchApiService, AlgoliaService, BreadcrumbsComponent, CardUnidadePlanosConveniosComponent, ContentBannerComponent, CtaWrapperComponent, CuraService, EnumDoencaTaxonomy, EnumDoencaTaxonomyCat, ErrorComponent, ErrorInterceptor, ErrorService, Errors, Estados, ExpandableCardComponent, FilterLetterAndTermsComponent, FilterPlanosConveniosComponent, FooterComponent, GeolocService, GeolocationPermissions, HeaderActionMenuComponent, HeaderAuxMenuComponent, HeaderAuxMenuContainerComponent, HeaderAuxMenuItemComponent, HeaderAuxMenuItemDropdownComponent, HeaderComponent, HeaderLogoComponent, HeaderMainMenuComponent, HeaderMainMenuItemComponent, HeaderMainMenuItemDropdownComponent, HeaderService, HeaderSideMenuComponent, HeaderSideMenuItemComponent, HttpClientService, IconCuraDefaultType, ImageComponent, ImageMimeType, LIB_CONFIG, LoadScreenComponent, LogInterceptor, LogService, MapBoxService, ModalDrawerService, ModalService, NguCarouselService, OverlayComponent, PageHeaderComponent, PageTemplateSidebarComponent, PaginationComponent, PhonePipe, PhoneService, PrivacyToolsService, REQUEST, RESPONSE, RdsiteClickOutsideDirective, RdsiteLinkDirective, RdsiteModalComponentStyle, RdsiteModalDrawerComponentStyle, RdsitePhoneModalDirective, SSR_CURA_API, SearchComponent, SectionNavigationComponent, SeoService, ServerResponseService, SideCtasBottomComponent, SideCtasComponent, SideCtasRightBottomComponent, SideCtasRightMiddleComponent, SideCtasRightTopComponent, SiteBackendService, SsrLoadingService, TestimonialCardComponent, TestimonialsCarouselComponent, Themes, TransferStateService, UnidadeCoverageType, WhatsappComponent, YoutubeService, formatPhone, getCircularReplacer, getSiteUrl, removeDuplicateObjectsFromArray, removeDuplicateValuesFromArray, removeHtmlTags, toQueryParams };
|
|
4832
4808
|
//# sourceMappingURL=rededor-site-front-end-lib.mjs.map
|