@rededor/site-front-end-lib 4.0.0-alpha.2 → 4.0.0-alpha.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/components/filters/index.d.ts +10 -7
- package/core/index.d.ts +3 -32
- package/fesm2022/rededor-site-front-end-lib-components-algolia-dropdown.mjs +1 -0
- package/fesm2022/rededor-site-front-end-lib-components-algolia-dropdown.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-banner.mjs +7 -3
- package/fesm2022/rededor-site-front-end-lib-components-banner.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-breadcrumbs.mjs +4 -3
- package/fesm2022/rededor-site-front-end-lib-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-cards.mjs +11 -6
- package/fesm2022/rededor-site-front-end-lib-components-cards.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-carousels.mjs +4 -3
- package/fesm2022/rededor-site-front-end-lib-components-carousels.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-cta-wrapper.mjs +4 -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 +17 -3
- 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-filters.mjs +60 -19
- package/fesm2022/rededor-site-front-end-lib-components-filters.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-page-template-sidebar.mjs +2 -2
- package/fesm2022/rededor-site-front-end-lib-components-page-template-sidebar.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-section-navigation.mjs +2 -2
- package/fesm2022/rededor-site-front-end-lib-components-section-navigation.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-side-ctas.mjs +7 -6
- package/fesm2022/rededor-site-front-end-lib-components-side-ctas.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-whatsapp.mjs +4 -3
- package/fesm2022/rededor-site-front-end-lib-components-whatsapp.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-core.mjs +2 -85
- package/fesm2022/rededor-site-front-end-lib-core.mjs.map +1 -1
- package/package.json +28 -28
|
@@ -2,6 +2,9 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { OnInit, AfterViewInit } from '@angular/core';
|
|
3
3
|
import { FormControl } from '@angular/forms';
|
|
4
4
|
import { FilterEvent, FilterSection, FilterControlValue, FilterPlanosConveniosChange, FilterPlanosConvenios, FilterPlanosConveniosCobertura } from '@rededor/site-front-end-lib/core';
|
|
5
|
+
import { CheckboxChangeEvent } from '@rededor/site-front-end-lib/cura/forms/cura-checkbox';
|
|
6
|
+
import { RadioChangeEvent } from '@rededor/site-front-end-lib/cura/forms/cura-radio';
|
|
7
|
+
import { SelectSelectedEvent } from '@rededor/site-front-end-lib/cura/forms/cura-select';
|
|
5
8
|
|
|
6
9
|
declare class FilterGenericComponent implements OnInit {
|
|
7
10
|
private readonly curaApiService;
|
|
@@ -38,10 +41,10 @@ declare class FilterGenericComponent implements OnInit {
|
|
|
38
41
|
'--primary-lighter': string;
|
|
39
42
|
};
|
|
40
43
|
ngOnInit(): void;
|
|
41
|
-
handleInputChange(event:
|
|
42
|
-
handleSelectChange(
|
|
43
|
-
handleCheckboxChange(
|
|
44
|
-
handleRadioChange(
|
|
44
|
+
handleInputChange(event: string | number, control: FormControl): void;
|
|
45
|
+
handleSelectChange({ value }: SelectSelectedEvent, control: FormControl): void;
|
|
46
|
+
handleCheckboxChange({ value, checked }: CheckboxChangeEvent, options: any[]): void;
|
|
47
|
+
handleRadioChange({ value }: RadioChangeEvent, control: FormControl): void;
|
|
45
48
|
filter(): void;
|
|
46
49
|
reset(): void;
|
|
47
50
|
close(): void;
|
|
@@ -88,9 +91,9 @@ declare class FilterPlanosConveniosComponent implements AfterViewInit {
|
|
|
88
91
|
'--neutral-purewhite': string;
|
|
89
92
|
};
|
|
90
93
|
ngAfterViewInit(): void;
|
|
91
|
-
inputTextChange(
|
|
92
|
-
selectChange({
|
|
93
|
-
checkboxChange(
|
|
94
|
+
inputTextChange(detail: number | string): void;
|
|
95
|
+
selectChange({ value }: SelectSelectedEvent): void;
|
|
96
|
+
checkboxChange(detail: CuraCheckboxOption<string>): void;
|
|
94
97
|
filter(): void;
|
|
95
98
|
reset(): void;
|
|
96
99
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FilterPlanosConveniosComponent, never>;
|
package/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ElementRef, InjectionToken, TemplateRef
|
|
2
|
+
import { ElementRef, InjectionToken, TemplateRef } from '@angular/core';
|
|
3
3
|
import * as qs from 'qs';
|
|
4
4
|
import * as express_serve_static_core from 'express-serve-static-core';
|
|
5
5
|
import { Request, Response } from 'express';
|
|
@@ -45,8 +45,6 @@ interface LibConfig {
|
|
|
45
45
|
}
|
|
46
46
|
declare const LIB_CONFIG: InjectionToken<LibConfig>;
|
|
47
47
|
|
|
48
|
-
declare const SSR_CURA_API: InjectionToken<any>;
|
|
49
|
-
|
|
50
48
|
declare const REQUEST: InjectionToken<Request<express_serve_static_core.ParamsDictionary, any, any, qs.ParsedQs, Record<string, any>>>;
|
|
51
49
|
declare const RESPONSE: InjectionToken<Response<any, Record<string, any>>>;
|
|
52
50
|
|
|
@@ -1312,7 +1310,7 @@ interface FilterPlanosConveniosChange {
|
|
|
1312
1310
|
}
|
|
1313
1311
|
interface FilterOption {
|
|
1314
1312
|
label: string;
|
|
1315
|
-
value: string
|
|
1313
|
+
value: string;
|
|
1316
1314
|
checked?: boolean;
|
|
1317
1315
|
disabled?: boolean;
|
|
1318
1316
|
}
|
|
@@ -1557,33 +1555,6 @@ interface SectionNavigationConfig {
|
|
|
1557
1555
|
containerClass: string;
|
|
1558
1556
|
}
|
|
1559
1557
|
|
|
1560
|
-
declare class CuraService implements OnDestroy {
|
|
1561
|
-
private log;
|
|
1562
|
-
private platformId;
|
|
1563
|
-
private document;
|
|
1564
|
-
private libConfig;
|
|
1565
|
-
private ssrCuraAPI;
|
|
1566
|
-
private curaAPISubscription;
|
|
1567
|
-
private curaApi;
|
|
1568
|
-
constructor();
|
|
1569
|
-
curaInit(): void;
|
|
1570
|
-
private curaAPISubscriptionInit;
|
|
1571
|
-
private injectCuraAPI;
|
|
1572
|
-
loadTheme(theme: string): void;
|
|
1573
|
-
getColor(colorWithDepth: string, opacity?: number): string | null;
|
|
1574
|
-
getSpacing(): string | null;
|
|
1575
|
-
getFontFamily(type: string): string | null;
|
|
1576
|
-
getFontWeights(): {
|
|
1577
|
-
[alias: string]: string;
|
|
1578
|
-
};
|
|
1579
|
-
getFontSize(): string;
|
|
1580
|
-
getFontColor(): string;
|
|
1581
|
-
getCuraIconName(icon: string): string;
|
|
1582
|
-
ngOnDestroy(): void;
|
|
1583
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CuraService, never>;
|
|
1584
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CuraService>;
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
1558
|
declare class ErrorService {
|
|
1588
1559
|
ctas: BehaviorSubject<CtaWrapper>;
|
|
1589
1560
|
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorService, never>;
|
|
@@ -2007,5 +1978,5 @@ declare class SiteBackendService {
|
|
|
2007
1978
|
static ɵprov: i0.ɵɵInjectableDeclaration<SiteBackendService>;
|
|
2008
1979
|
}
|
|
2009
1980
|
|
|
2010
|
-
export { AbstractModalComponent, AbstractModalDrawerComponent,
|
|
1981
|
+
export { AbstractModalComponent, AbstractModalDrawerComponent, EnumDoencaTaxonomy, EnumDoencaTaxonomyCat, ErrorInterceptor, ErrorService, FilterType, GeolocService, GeolocationPermissions, HttpClientService, LIB_CONFIG, LogInterceptor, LogService, MapBoxService, ModalDrawerService, ModalService, PhoneService, PrivacyToolsService, REQUEST, RESPONSE, RdsiteLinkDirective, RdsiteModalComponentStyle, RdsiteModalDrawerComponentStyle, RdsitePhoneModalDirective, SeoService, ServerResponseService, SiteBackendService, checkSafariAgent, executeWithRetry, formatPhone, getCircularReplacer, getSiteUrl, removeHtmlTags };
|
|
2011
1982
|
export type { Address, AlgoliaConfig, AlgoliaMultipleResults, AlgoliaOption, AlgoliaResult, AlgoliaSearchParams, BreadcrumbsItems, BreadcrumbsJsonItem, CentroEstudosBackendMedico, CentroMedico, CheckboxGroupFilterConfig, CheckboxGroupFilterSection, Content, ContentBanner, CtaWrapper, CustomFilterConfig, CustomFilterSection, DoencaBackend, DoencaTaxonomy, EspecialidadeBackend, EspecialidadeGrupoBackend, ExameApiDados, ExameBackend, Excerpt, FeaturedMedia, FeaturedMediaDetails, FilterAction, FilterControl, FilterControlValue, FilterEvent, FilterOption, FilterPlanosConvenios, FilterPlanosConveniosChange, FilterPlanosConveniosCobertura, FilterSection, FilterSectionBase, FlexibleContent, Geolocation, Guid, HomeSlideshow, HttpCacheDirective, IServerResponseService, InputFilterConfig, InputFilterSection, LibConfig, Links, MapBoxGeocodingParams, MapBoxReverseGeocodingParams, MedicoCv, MenuCta, MenuDeUnidade, MenuDeUnidadesItem, MenuItem, MenuItemDestaque, MenuPorEstado, MenuSocialMedia, Meta, PrivacyToolsConfigOptions, PrivacyToolsCookieBanner, RDSLCobertura, RDSLCoberturaParams, RDSLConvenio, RDSLConvenioParams, RDSLEspecialidade, RDSLEspecialidadesParams, RDSLGrupoEspecialidade, RDSLGrupoEspecialidadeParams, RDSLPlano, RDSLPlanoParams, RDSLUnidade, RDSLUnidadesParams, RadioGroupFilterConfig, RadioGroupFilterSection, RadioGroupValue, RdsiteImage, RdslAlgoliaMultipleIndex, RdslAlgoliaSearchParams, RdslPostCategory, SectionNavigationConfig, SectionNavigationData, SelectFilterConfig, SelectFilterSection, SeoData, SeoUnidade, SocialMetaProperties, TaxonomiasDoencasList, Title, UnidadeCta, UnidadeEmergencia, UnidadeEspecialidadeProcurada, UnidadeEstiloWhatsapp, UnidadeExamesProcurados, UnidadeInfo, UnidadeNossasMarcas, UnidadeOptions, UnidadePhoneModal, UnifiedMenu, WpAuthorQueryParams, WpCategory, WpCategoryQueryParams, WpCommonQueryParams, WpCommonResponse, WpCustomPost, WpDoenca, WpEnvelopeResponse, WpGlobalQueryParams, WpGlobalResponse, WpHttpParams, WpPage, WpPageQueryParams, WpPaginationQueryParams, WpPost, WpPostQueryParams, WpPublishingQueryParams, WpPublishingResponse, WpUnidadeOnco, WpUnidadeSite, WpUnidadeSiteDetalhe, WpYoastResponse, YoastData, YoastHeadJson, YoastMeta };
|
|
@@ -2,6 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { inject, input, output, Input, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
|
|
3
3
|
import { AlgoliaSearchApiService } from '@rededor/site-front-end-lib/services/algolia-search-api';
|
|
4
4
|
|
|
5
|
+
// TODO: REFATORAR COMPONENTE QUANDO FOR CRIADO O "CURA-DROPDOWN-SEARCH" NO CURA EM ANGULAR. (NA VERSÃO 20 DA LIB, ESTE COMPONENTE NÃO FUNCIONA)
|
|
5
6
|
class AlgoliaDropdownComponent {
|
|
6
7
|
constructor() {
|
|
7
8
|
this.algoliaSearchApiService = inject(AlgoliaSearchApiService);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-components-algolia-dropdown.mjs","sources":["../../../projects/site-front-end-lib/components/algolia-dropdown/algolia-dropdown.component.ts","../../../projects/site-front-end-lib/components/algolia-dropdown/algolia-dropdown.component.html","../../../projects/site-front-end-lib/components/algolia-dropdown/rededor-site-front-end-lib-components-algolia-dropdown.ts"],"sourcesContent":["import { Component, CUSTOM_ELEMENTS_SCHEMA, Input, input, output, inject } from '@angular/core';\
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-components-algolia-dropdown.mjs","sources":["../../../projects/site-front-end-lib/components/algolia-dropdown/algolia-dropdown.component.ts","../../../projects/site-front-end-lib/components/algolia-dropdown/algolia-dropdown.component.html","../../../projects/site-front-end-lib/components/algolia-dropdown/rededor-site-front-end-lib-components-algolia-dropdown.ts"],"sourcesContent":["import { Component, CUSTOM_ELEMENTS_SCHEMA, Input, input, output, inject } from '@angular/core';\nimport { AlgoliaConfig, AlgoliaSearchParams, RdslAlgoliaMultipleIndex } from '@rededor/site-front-end-lib/core';\nimport { AlgoliaSearchApiService } from '@rededor/site-front-end-lib/services/algolia-search-api';\n\n// TODO: REFATORAR COMPONENTE QUANDO FOR CRIADO O \"CURA-DROPDOWN-SEARCH\" NO CURA EM ANGULAR. (NA VERSÃO 20 DA LIB, ESTE COMPONENTE NÃO FUNCIONA)\n@Component({\n selector: 'rdsite-algolia-dropdown',\n imports: [],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n templateUrl: './algolia-dropdown.component.html',\n styleUrl: './algolia-dropdown.component.scss',\n})\nexport class AlgoliaDropdownComponent {\n private readonly algoliaSearchApiService = inject(AlgoliaSearchApiService);\n\n compAlgoliaConfig: AlgoliaConfig = { id: '', key: '' };\n get algoliaConfig() {\n return this.compAlgoliaConfig;\n }\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('algoliaConfig')\n set algoliaConfig(config: AlgoliaConfig) {\n this.ready = false;\n if (this.setupAlgolia(config)) {\n this.compAlgoliaConfig = config;\n this.ready = true;\n }\n }\n readonly name = input.required<string>();\n readonly value = input.required<string>();\n readonly size = input.required<string>();\n readonly label = input.required<string>();\n readonly placeholder = input.required<string>();\n readonly status = input.required<string>();\n readonly icon = input.required<string>();\n readonly disabled = input<boolean>(false);\n readonly required = input<boolean>(false);\n readonly maxheight = input.required<string>();\n readonly searchdelay = input.required<string>();\n readonly searchminchars = input<number>(2);\n readonly helperText = input.required<string>();\n readonly cssMaxHeight = input.required<string>();\n readonly searchParams = input<AlgoliaSearchParams>({});\n\n public searchTerm: string = '';\n\n // Algolia\n isMultiple: boolean = false;\n\n // State\n ready: boolean = false;\n\n readonly algoliaResults = output<any>();\n readonly resetResults = output<any>();\n readonly optionSelected = output<any>();\n\n setupAlgolia(config: AlgoliaConfig): boolean {\n if (config?.id && config?.key && (config?.index || config?.multipleIndex)) {\n if (config.multipleIndex) {\n this.isMultiple = true;\n } else {\n this.isMultiple = false;\n }\n return true;\n } else {\n return false;\n }\n }\n\n termChange(event: any) {\n if (event.target.value) {\n this.searchTerm = event?.target?.value;\n this.search();\n } else {\n this.resetResults.emit(event);\n }\n }\n\n search(): void {\n if (this.searchTerm?.length >= this.searchminchars() && this.ready) {\n if (!this.isMultiple) {\n this.algoliaSearchApiService.search(this.searchTerm, this.algoliaConfig.index!, this.searchParams()).subscribe({\n next: (results) => {\n this.algoliaResults.emit(results);\n },\n });\n } else {\n const queries: RdslAlgoliaMultipleIndex[] = this.compAlgoliaConfig?.multipleIndex!.map((i: RdslAlgoliaMultipleIndex) => {\n return { ...i, query: this.searchTerm };\n });\n this.algoliaSearchApiService.searchMultipleIndexes(queries).subscribe({\n next: (results) => {\n this.algoliaResults.emit(results.results);\n },\n });\n }\n }\n }\n\n optionSelect(event: any) {\n this.optionSelected.emit(event.target.value);\n }\n}\n","<cura-dropdown-search\r\n [name]=\"name()\"\r\n [value]=\"value()\"\r\n [placeholder]=\"placeholder()\"\r\n [label]=\"label()\"\r\n [status]=\"status()\"\r\n [icon]=\"icon()\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [maxheight]=\"maxheight()\"\r\n [searchdelay]=\"searchdelay()\"\r\n [searchminchars]=\"searchminchars()\"\r\n [helperText]=\"helperText()\"\r\n [cssMaxHeight]=\"cssMaxHeight()\"\r\n (termchange)=\"termChange($event)\"\r\n (optionselect)=\"optionSelect($event)\"\r\n>\r\n <ng-content></ng-content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AAA,CAAA;;2FDPa,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAPpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EAAA,OAAA,EAC1B,EAAE,EAAA,OAAA,EACF,CAAC,sBAAsB,CAAC,EAAA,QAAA,EAAA,ykBAAA,EAAA;8BAa7B,aAAa,EAAA,CAAA;sBADhB,KAAK;uBAAC,eAAe;;;AEpBxB;;AAEG;;;;"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, input, output, HostBinding,
|
|
4
|
+
import { inject, input, output, HostBinding, Component } from '@angular/core';
|
|
5
5
|
import { RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';
|
|
6
6
|
import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
|
|
7
7
|
import { ImageComponent } from '@rededor/site-front-end-lib/components/image';
|
|
8
|
+
import { CuraHeadingComponent } from '@rededor/site-front-end-lib/cura/texts/cura-heading';
|
|
9
|
+
import { CuraParagraphComponent } from '@rededor/site-front-end-lib/cura/texts/cura-paragraph';
|
|
10
|
+
import { CuraButtonComponent } from '@rededor/site-front-end-lib/cura/buttons/cura-button';
|
|
11
|
+
import { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';
|
|
8
12
|
|
|
9
13
|
class ContentBannerComponent {
|
|
10
14
|
constructor() {
|
|
@@ -22,11 +26,11 @@ class ContentBannerComponent {
|
|
|
22
26
|
this.ctaClick.emit({ text, link });
|
|
23
27
|
}
|
|
24
28
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ContentBannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
25
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", 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.1.7", 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\" 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\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"], outputs: ["buttonClick"] }, { kind: "component", type: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }] }); }
|
|
26
30
|
}
|
|
27
31
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ContentBannerComponent, decorators: [{
|
|
28
32
|
type: Component,
|
|
29
|
-
args: [{ selector: 'rdsite-content-banner', imports: [CommonModule, RdsiteLinkDirective, ImageComponent
|
|
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\" 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\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"] }]
|
|
30
34
|
}], propDecorators: { styleBinding: [{
|
|
31
35
|
type: HostBinding,
|
|
32
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';\
|
|
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';\nimport { Component, HostBinding, input, output, inject } from '@angular/core';\nimport { ContentBanner, RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\nimport { ImageComponent } from '@rededor/site-front-end-lib/components/image';\nimport { CuraHeadingComponent } from '@rededor/site-front-end-lib/cura/texts/cura-heading';\nimport { CuraParagraphComponent } from '@rededor/site-front-end-lib/cura/texts/cura-paragraph';\nimport { CuraButtonComponent } from '@rededor/site-front-end-lib/cura/buttons/cura-button';\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\n\n@Component({\n selector: 'rdsite-content-banner',\n imports: [CommonModule, RdsiteLinkDirective, ImageComponent, CuraHeadingComponent, CuraParagraphComponent, CuraButtonComponent, CuraIconComponent],\n templateUrl: './content-banner.component.html',\n styleUrls: ['./content-banner.component.scss'],\n})\nexport class ContentBannerComponent {\n private curaApiService = inject(CuraApiService);\n\n readonly content = input<ContentBanner | null>(null);\n readonly ctaClick = output<{\n text: string;\n link: string;\n }>();\n\n @HostBinding('style') get styleBinding() {\n return {\n '--neutral-purewhite': this.curaApiService.theme.colors.getColor('neutral-purewhite'),\n '--color-one-lighter': this.curaApiService.theme.colors.getColor('primary-lighter', 0.5),\n };\n }\n\n onCtaClick(text: string, link: string) {\n this.ctaClick.emit({ text, link });\n }\n}\n","@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\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;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;;IAGH,UAAU,CAAC,IAAY,EAAE,IAAY,EAAA;QACnC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;8GAjBzB,s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A,EAAA,WAAA,EAAA,OAAA,EAAA,aAAA,EAAA,YAAA,EAAA,cAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,sBAAsB,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,WAAA,EAAA,OAAA,EAAA,aAAA,EAAA,YAAA,EAAA,cAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,mBAAmB,sQAAE,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,w5CAAA,EAAA,MAAA,EAAA,CAAA,kuCAAA,CAAA,EAAA;8BAaxH,YAAY,EAAA,CAAA;sBAArC,WAAW;uBAAC,OAAO;;;AEzBtB;;AAEG;;;;"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, DOCUMENT, ChangeDetectorRef, PLATFORM_ID, input, signal, viewChild, Input,
|
|
2
|
+
import { inject, DOCUMENT, ChangeDetectorRef, PLATFORM_ID, input, signal, viewChild, Input, Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
5
5
|
import * as he from 'he';
|
|
6
6
|
import { LIB_CONFIG, RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';
|
|
7
7
|
import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
|
|
8
8
|
import { MediaQueries } from '@rededor/site-front-end-lib/shared';
|
|
9
|
+
import { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';
|
|
9
10
|
|
|
10
11
|
class BreadcrumbsComponent {
|
|
11
12
|
constructor() {
|
|
@@ -107,11 +108,11 @@ class BreadcrumbsComponent {
|
|
|
107
108
|
}));
|
|
108
109
|
}
|
|
109
110
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: BreadcrumbsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
110
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: BreadcrumbsComponent, isStandalone: true, selector: "rdsite-breadcrumbs", inputs: { labelIconColor: { classPropertyName: "labelIconColor", publicName: "labelIconColor", isSignal: true, isRequired: false, transformFunction: null }, fontWeight: { classPropertyName: "fontWeight", publicName: "fontWeight", isSignal: true, isRequired: false, transformFunction: null }, breadcrumbs: { classPropertyName: "breadcrumbs", publicName: "breadcrumbs", isSignal: false, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "breadCrumbsElement", first: true, predicate: ["breadCrumbsElement"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (breadcrumbs.length) {\n <nav class=\"breadcrumb\" #breadCrumbsElement>\n <ol>\n @if (isDesktop() !== null && (isDesktop() || breadcrumbs.length < 3)) {\n <ng-container *ngTemplateOutlet=\"Desktop\"></ng-container>\n } @else if (isDesktop() !== null) {\n <ng-container *ngTemplateOutlet=\"Mobile\"></ng-container>\n }\n </ol>\n </nav>\n}\n\n<ng-template #Desktop>\n @for (breadcrumb of breadcrumbs; track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\n <li>\n @if (!last) {\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n @if (first) {\n <cura-icon name=\"home\" [attr.color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\n }\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n <span class=\"divider\">/</span>\n } @else {\n <span [class.last-item]=\"last && !first\">\n {{ breadcrumb.label }}\n </span>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #Mobile>\n @for (breadcrumb of breadcrumbs; track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\n <li>\n @if (first) {\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n <cura-icon name=\"home\" [attr.color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n <span class=\"divider\">/</span>\n } @else if (index === breadcrumbs.length - 2) {\n <span class=\"back\"><</span>\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n }\n </li>\n }\n</ng-template>\n", styles: [".breadcrumb *{font-family:var(--font-family)}.breadcrumb ol{display:flex}.breadcrumb ol li{display:flex;gap:8px}.breadcrumb ol li a{color:var(--label-icon-color);display:flex;gap:4px;text-decoration:none}.breadcrumb ol li a span{text-decoration:underline;font-size:12px;font-weight:var(--font-weight, 500);line-height:16px;letter-spacing:.72px}.breadcrumb ol li span.last-item{color:var(--disabled-color);text-decoration:none;pointer-events:none;font-size:12px;font-weight:var(--font-weight, 500);line-height:16px;letter-spacing:.72px}.breadcrumb ol li span.divider,.breadcrumb ol li span.back{color:var(--divider-color);padding-right:8px;font-size:12px;font-weight:var(--font-weight, 500);line-height:16px;letter-spacing:.72px}.breadcrumb ol li span.back{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RdsiteLinkDirective, selector: "[rdsitelink]", inputs: ["anchorAdjustment", "anchorExtraAdjustment", "phonemodal"] }] }); }
|
|
111
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: BreadcrumbsComponent, isStandalone: true, selector: "rdsite-breadcrumbs", inputs: { labelIconColor: { classPropertyName: "labelIconColor", publicName: "labelIconColor", isSignal: true, isRequired: false, transformFunction: null }, fontWeight: { classPropertyName: "fontWeight", publicName: "fontWeight", isSignal: true, isRequired: false, transformFunction: null }, breadcrumbs: { classPropertyName: "breadcrumbs", publicName: "breadcrumbs", isSignal: false, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "breadCrumbsElement", first: true, predicate: ["breadCrumbsElement"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (breadcrumbs.length) {\n <nav class=\"breadcrumb\" #breadCrumbsElement>\n <ol>\n @if (isDesktop() !== null && (isDesktop() || breadcrumbs.length < 3)) {\n <ng-container *ngTemplateOutlet=\"Desktop\"></ng-container>\n } @else if (isDesktop() !== null) {\n <ng-container *ngTemplateOutlet=\"Mobile\"></ng-container>\n }\n </ol>\n </nav>\n}\n\n<ng-template #Desktop>\n @for (breadcrumb of breadcrumbs; track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\n <li>\n @if (!last) {\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n @if (first) {\n <cura-icon name=\"home\" [attr.color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\n }\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n <span class=\"divider\">/</span>\n } @else {\n <span [class.last-item]=\"last && !first\">\n {{ breadcrumb.label }}\n </span>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #Mobile>\n @for (breadcrumb of breadcrumbs; track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\n <li>\n @if (first) {\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n <cura-icon name=\"home\" [attr.color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n <span class=\"divider\">/</span>\n } @else if (index === breadcrumbs.length - 2) {\n <span class=\"back\"><</span>\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n }\n </li>\n }\n</ng-template>\n", styles: [".breadcrumb *{font-family:var(--font-family)}.breadcrumb ol{display:flex}.breadcrumb ol li{display:flex;gap:8px}.breadcrumb ol li a{color:var(--label-icon-color);display:flex;gap:4px;text-decoration:none}.breadcrumb ol li a span{text-decoration:underline;font-size:12px;font-weight:var(--font-weight, 500);line-height:16px;letter-spacing:.72px}.breadcrumb ol li span.last-item{color:var(--disabled-color);text-decoration:none;pointer-events:none;font-size:12px;font-weight:var(--font-weight, 500);line-height:16px;letter-spacing:.72px}.breadcrumb ol li span.divider,.breadcrumb ol li span.back{color:var(--divider-color);padding-right:8px;font-size:12px;font-weight:var(--font-weight, 500);line-height:16px;letter-spacing:.72px}.breadcrumb ol li span.back{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RdsiteLinkDirective, selector: "[rdsitelink]", inputs: ["anchorAdjustment", "anchorExtraAdjustment", "phonemodal"] }, { kind: "component", type: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }] }); }
|
|
111
112
|
}
|
|
112
113
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: BreadcrumbsComponent, decorators: [{
|
|
113
114
|
type: Component,
|
|
114
|
-
args: [{ selector: 'rdsite-breadcrumbs', imports: [CommonModule, RdsiteLinkDirective
|
|
115
|
+
args: [{ selector: 'rdsite-breadcrumbs', imports: [CommonModule, RdsiteLinkDirective, CuraIconComponent], template: "@if (breadcrumbs.length) {\n <nav class=\"breadcrumb\" #breadCrumbsElement>\n <ol>\n @if (isDesktop() !== null && (isDesktop() || breadcrumbs.length < 3)) {\n <ng-container *ngTemplateOutlet=\"Desktop\"></ng-container>\n } @else if (isDesktop() !== null) {\n <ng-container *ngTemplateOutlet=\"Mobile\"></ng-container>\n }\n </ol>\n </nav>\n}\n\n<ng-template #Desktop>\n @for (breadcrumb of breadcrumbs; track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\n <li>\n @if (!last) {\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n @if (first) {\n <cura-icon name=\"home\" [attr.color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\n }\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n <span class=\"divider\">/</span>\n } @else {\n <span [class.last-item]=\"last && !first\">\n {{ breadcrumb.label }}\n </span>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #Mobile>\n @for (breadcrumb of breadcrumbs; track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\n <li>\n @if (first) {\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n <cura-icon name=\"home\" [attr.color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n <span class=\"divider\">/</span>\n } @else if (index === breadcrumbs.length - 2) {\n <span class=\"back\"><</span>\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n }\n </li>\n }\n</ng-template>\n", styles: [".breadcrumb *{font-family:var(--font-family)}.breadcrumb ol{display:flex}.breadcrumb ol li{display:flex;gap:8px}.breadcrumb ol li a{color:var(--label-icon-color);display:flex;gap:4px;text-decoration:none}.breadcrumb ol li a span{text-decoration:underline;font-size:12px;font-weight:var(--font-weight, 500);line-height:16px;letter-spacing:.72px}.breadcrumb ol li span.last-item{color:var(--disabled-color);text-decoration:none;pointer-events:none;font-size:12px;font-weight:var(--font-weight, 500);line-height:16px;letter-spacing:.72px}.breadcrumb ol li span.divider,.breadcrumb ol li span.back{color:var(--divider-color);padding-right:8px;font-size:12px;font-weight:var(--font-weight, 500);line-height:16px;letter-spacing:.72px}.breadcrumb ol li span.back{padding:0}\n"] }]
|
|
115
116
|
}], propDecorators: { breadcrumbs: [{
|
|
116
117
|
type: Input
|
|
117
118
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-components-breadcrumbs.mjs","sources":["../../../projects/site-front-end-lib/components/breadcrumbs/breadcrumbs.component.ts","../../../projects/site-front-end-lib/components/breadcrumbs/breadcrumbs.component.html","../../../projects/site-front-end-lib/components/breadcrumbs/rededor-site-front-end-lib-components-breadcrumbs.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n ElementRef,\n Input,\n OnDestroy,\n PLATFORM_ID,\n DOCUMENT,\n input,\n viewChild,\n inject,\n signal,\n} from '@angular/core';\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\nimport * as he from 'he';\nimport { BreadcrumbsItems, RdsiteLinkDirective, BreadcrumbsJsonItem, LIB_CONFIG, LibConfig } from '@rededor/site-front-end-lib/core';\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\nimport { MediaQueries } from '@rededor/site-front-end-lib/shared';\n\n@Component({\n selector: 'rdsite-breadcrumbs',\n imports: [CommonModule, RdsiteLinkDirective],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n templateUrl: './breadcrumbs.component.html',\n styleUrl: './breadcrumbs.component.scss',\n})\nexport class BreadcrumbsComponent implements AfterViewInit, OnDestroy {\n private curaApiService = inject(CuraApiService);\n private libConfig = inject<LibConfig>(LIB_CONFIG);\n private document = inject<Document>(DOCUMENT);\n private cdr: ChangeDetectorRef = inject(ChangeDetectorRef);\n private readonly platformId = inject(PLATFORM_ID);\n\n readonly labelIconColor = input<string>('neutral-purewhite');\n readonly fontWeight = input<string>('');\n readonly isDesktop = signal<boolean | null>(null);\n\n private _breadcrumbs: BreadcrumbsItems[] = [];\n @Input()\n set breadcrumbs(value: BreadcrumbsItems[]) {\n this._breadcrumbs = value || [];\n if (value?.length) {\n this.setBreadcrumbsJson(value);\n }\n }\n get breadcrumbs() {\n return this._breadcrumbs;\n }\n\n private breadcrumbsJsonTag!: HTMLScriptElement;\n private readonly breadcrumbsJsonTagId = 'breadcrumbsJSON';\n private resizeObserver!: ResizeObserver;\n\n readonly breadCrumbsElement = viewChild.required<ElementRef<HTMLDivElement>>('breadCrumbsElement');\n\n ngAfterViewInit(): void {\n this.getColors(this.labelIconColor());\n this.initViewportDetection();\n }\n\n ngOnDestroy(): void {\n this.resizeObserver?.disconnect();\n }\n\n private initViewportDetection(): void {\n if (!isPlatformBrowser(this.platformId)) {\n this.isDesktop.set(true);\n return;\n }\n\n this.checkViewportSize();\n this.setupResizeObserver();\n }\n\n private setupResizeObserver(): void {\n this.resizeObserver = new ResizeObserver(() => {\n this.checkViewportSize();\n });\n\n this.resizeObserver.observe(document.body);\n }\n\n private checkViewportSize(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n const newValue = window.innerWidth > MediaQueries.smallBreakpoint;\n if (this.isDesktop() !== newValue) {\n this.isDesktop.set(newValue);\n this.cdr.detectChanges();\n }\n }\n\n getColors(color: string): void {\n if (isPlatformBrowser(this.platformId) && this.breadCrumbsElement()?.nativeElement) {\n const element = this.breadCrumbsElement()?.nativeElement;\n element.style.setProperty('--font-family', this.curaApiService.theme.fonts.getFamily(''));\n element.style.setProperty('--label-icon-color', this.curaApiService.theme.colors.getColor(color));\n element.style.setProperty('--divider-color', this.curaApiService.theme.colors.getColor('neutral-light'));\n if (this.fontWeight()) {\n element.style.setProperty('--font-weight', this.fontWeight());\n }\n\n const disabledColor = color?.includes('neutral') ? 'primary-lighter' : 'neutral-dark';\n element.style.setProperty('--disabled-color', this.curaApiService.theme.colors.getColor(disabledColor));\n }\n }\n\n getUrl(urls: string[] = []): string {\n return urls.join('');\n }\n\n private setBreadcrumbsJson(items: BreadcrumbsItems[]): void {\n this.breadcrumbsJsonTag = this.getBreadcrumbsJSONTag();\n const json = {\n '@context': 'http://schema.org',\n '@type': 'BreadcrumbList',\n itemListElement: this.getJsonBreadcrumbItems(items),\n };\n this.breadcrumbsJsonTag.innerHTML = JSON.stringify(json);\n }\n\n private getBreadcrumbsJSONTag(): HTMLScriptElement {\n const existingTag = this.document.getElementById(this.breadcrumbsJsonTagId) as HTMLScriptElement;\n return existingTag || this.createBreadcrumbsJSONTag();\n }\n\n private createBreadcrumbsJSONTag(): HTMLScriptElement {\n const tag = this.document.createElement('script');\n tag.id = this.breadcrumbsJsonTagId;\n tag.type = 'application/ld+json';\n this.document.head.appendChild(tag);\n return tag;\n }\n\n private getJsonBreadcrumbItems(items: BreadcrumbsItems[]): BreadcrumbsJsonItem[] {\n return items.map((item, i) => ({\n '@type': 'ListItem',\n position: i + 1,\n item: {\n '@id': `${this.libConfig.siteUrl.replace(/\\/$/, '')}${this.getUrl(item.url)}`,\n name: he.encode(item.label),\n },\n }));\n }\n}\n","@if (breadcrumbs.length) {\n <nav class=\"breadcrumb\" #breadCrumbsElement>\n <ol>\n @if (isDesktop() !== null && (isDesktop() || breadcrumbs.length < 3)) {\n <ng-container *ngTemplateOutlet=\"Desktop\"></ng-container>\n } @else if (isDesktop() !== null) {\n <ng-container *ngTemplateOutlet=\"Mobile\"></ng-container>\n }\n </ol>\n </nav>\n}\n\n<ng-template #Desktop>\n @for (breadcrumb of breadcrumbs; track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\n <li>\n @if (!last) {\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n @if (first) {\n <cura-icon name=\"home\" [attr.color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\n }\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n <span class=\"divider\">/</span>\n } @else {\n <span [class.last-item]=\"last && !first\">\n {{ breadcrumb.label }}\n </span>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #Mobile>\n @for (breadcrumb of breadcrumbs; track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\n <li>\n @if (first) {\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n <cura-icon name=\"home\" [attr.color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n <span class=\"divider\">/</span>\n } @else if (index === breadcrumbs.length - 2) {\n <span class=\"back\"><</span>\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n }\n </li>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MA4Ba,oBAAoB,CAAA;AAPjC,IAAA,WAAA,GAAA;AAQU,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACvC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAY,UAAU,CAAC;AACzC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAW,QAAQ,CAAC;AACrC,QAAA,IAAA,CAAA,GAAG,GAAsB,MAAM,CAAC,iBAAiB,CAAC;AACzC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAExC,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAS,mBAAmB,0DAAC;AACnD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,EAAE,sDAAC;AAC9B,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAiB,IAAI,qDAAC;QAEzC,IAAA,CAAA,YAAY,GAAuB,EAAE;QAa5B,IAAA,CAAA,oBAAoB,GAAG,iBAAiB;AAGhD,QAAA,IAAA,CAAA,kBAAkB,GAAG,SAAS,CAAC,QAAQ,CAA6B,oBAAoB,CAAC;AA0FnG;IAzGC,IACI,WAAW,CAAC,KAAyB,EAAA;AACvC,QAAA,IAAI,CAAC,YAAY,GAAG,KAAK,IAAI,EAAE;AAC/B,QAAA,IAAI,KAA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A;sBADd;;;AExCH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-components-breadcrumbs.mjs","sources":["../../../projects/site-front-end-lib/components/breadcrumbs/breadcrumbs.component.ts","../../../projects/site-front-end-lib/components/breadcrumbs/breadcrumbs.component.html","../../../projects/site-front-end-lib/components/breadcrumbs/rededor-site-front-end-lib-components-breadcrumbs.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n PLATFORM_ID,\n DOCUMENT,\n input,\n viewChild,\n inject,\n signal,\n} from '@angular/core';\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\nimport * as he from 'he';\nimport { BreadcrumbsItems, RdsiteLinkDirective, BreadcrumbsJsonItem, LIB_CONFIG, LibConfig } from '@rededor/site-front-end-lib/core';\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\nimport { MediaQueries } from '@rededor/site-front-end-lib/shared';\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\n\n@Component({\n selector: 'rdsite-breadcrumbs',\n imports: [CommonModule, RdsiteLinkDirective, CuraIconComponent],\n templateUrl: './breadcrumbs.component.html',\n styleUrl: './breadcrumbs.component.scss',\n})\nexport class BreadcrumbsComponent implements AfterViewInit, OnDestroy {\n private curaApiService = inject(CuraApiService);\n private libConfig = inject<LibConfig>(LIB_CONFIG);\n private document = inject<Document>(DOCUMENT);\n private cdr: ChangeDetectorRef = inject(ChangeDetectorRef);\n private readonly platformId = inject(PLATFORM_ID);\n\n readonly labelIconColor = input<string>('neutral-purewhite');\n readonly fontWeight = input<string>('');\n readonly isDesktop = signal<boolean | null>(null);\n\n private _breadcrumbs: BreadcrumbsItems[] = [];\n @Input()\n set breadcrumbs(value: BreadcrumbsItems[]) {\n this._breadcrumbs = value || [];\n if (value?.length) {\n this.setBreadcrumbsJson(value);\n }\n }\n get breadcrumbs() {\n return this._breadcrumbs;\n }\n\n private breadcrumbsJsonTag!: HTMLScriptElement;\n private readonly breadcrumbsJsonTagId = 'breadcrumbsJSON';\n private resizeObserver!: ResizeObserver;\n\n readonly breadCrumbsElement = viewChild.required<ElementRef<HTMLDivElement>>('breadCrumbsElement');\n\n ngAfterViewInit(): void {\n this.getColors(this.labelIconColor());\n this.initViewportDetection();\n }\n\n ngOnDestroy(): void {\n this.resizeObserver?.disconnect();\n }\n\n private initViewportDetection(): void {\n if (!isPlatformBrowser(this.platformId)) {\n this.isDesktop.set(true);\n return;\n }\n\n this.checkViewportSize();\n this.setupResizeObserver();\n }\n\n private setupResizeObserver(): void {\n this.resizeObserver = new ResizeObserver(() => {\n this.checkViewportSize();\n });\n\n this.resizeObserver.observe(document.body);\n }\n\n private checkViewportSize(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n const newValue = window.innerWidth > MediaQueries.smallBreakpoint;\n if (this.isDesktop() !== newValue) {\n this.isDesktop.set(newValue);\n this.cdr.detectChanges();\n }\n }\n\n getColors(color: string): void {\n if (isPlatformBrowser(this.platformId) && this.breadCrumbsElement()?.nativeElement) {\n const element = this.breadCrumbsElement()?.nativeElement;\n element.style.setProperty('--font-family', this.curaApiService.theme.fonts.getFamily(''));\n element.style.setProperty('--label-icon-color', this.curaApiService.theme.colors.getColor(color));\n element.style.setProperty('--divider-color', this.curaApiService.theme.colors.getColor('neutral-light'));\n if (this.fontWeight()) {\n element.style.setProperty('--font-weight', this.fontWeight());\n }\n\n const disabledColor = color?.includes('neutral') ? 'primary-lighter' : 'neutral-dark';\n element.style.setProperty('--disabled-color', this.curaApiService.theme.colors.getColor(disabledColor));\n }\n }\n\n getUrl(urls: string[] = []): string {\n return urls.join('');\n }\n\n private setBreadcrumbsJson(items: BreadcrumbsItems[]): void {\n this.breadcrumbsJsonTag = this.getBreadcrumbsJSONTag();\n const json = {\n '@context': 'http://schema.org',\n '@type': 'BreadcrumbList',\n itemListElement: this.getJsonBreadcrumbItems(items),\n };\n this.breadcrumbsJsonTag.innerHTML = JSON.stringify(json);\n }\n\n private getBreadcrumbsJSONTag(): HTMLScriptElement {\n const existingTag = this.document.getElementById(this.breadcrumbsJsonTagId) as HTMLScriptElement;\n return existingTag || this.createBreadcrumbsJSONTag();\n }\n\n private createBreadcrumbsJSONTag(): HTMLScriptElement {\n const tag = this.document.createElement('script');\n tag.id = this.breadcrumbsJsonTagId;\n tag.type = 'application/ld+json';\n this.document.head.appendChild(tag);\n return tag;\n }\n\n private getJsonBreadcrumbItems(items: BreadcrumbsItems[]): BreadcrumbsJsonItem[] {\n return items.map((item, i) => ({\n '@type': 'ListItem',\n position: i + 1,\n item: {\n '@id': `${this.libConfig.siteUrl.replace(/\\/$/, '')}${this.getUrl(item.url)}`,\n name: he.encode(item.label),\n },\n }));\n }\n}\n","@if (breadcrumbs.length) {\n <nav class=\"breadcrumb\" #breadCrumbsElement>\n <ol>\n @if (isDesktop() !== null && (isDesktop() || breadcrumbs.length < 3)) {\n <ng-container *ngTemplateOutlet=\"Desktop\"></ng-container>\n } @else if (isDesktop() !== null) {\n <ng-container *ngTemplateOutlet=\"Mobile\"></ng-container>\n }\n </ol>\n </nav>\n}\n\n<ng-template #Desktop>\n @for (breadcrumb of breadcrumbs; track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\n <li>\n @if (!last) {\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n @if (first) {\n <cura-icon name=\"home\" [attr.color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\n }\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n <span class=\"divider\">/</span>\n } @else {\n <span [class.last-item]=\"last && !first\">\n {{ breadcrumb.label }}\n </span>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #Mobile>\n @for (breadcrumb of breadcrumbs; track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\n <li>\n @if (first) {\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n <cura-icon name=\"home\" [attr.color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n <span class=\"divider\">/</span>\n } @else if (index === breadcrumbs.length - 2) {\n <span class=\"back\"><</span>\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\n <span>\n {{ breadcrumb.label }}\n </span>\n </a>\n }\n </li>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MA2Ba,oBAAoB,CAAA;AANjC,IAAA,WAAA,GAAA;AAOU,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACvC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAY,UAAU,CAAC;AACzC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAW,QAAQ,CAAC;AACrC,QAAA,IAAA,CAAA,GAAG,GAAsB,MAAM,CAAC,iBAAiB,CAAC;AACzC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAExC,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAS,mBAAmB,0DAAC;AACnD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,EAAE,sDAAC;AAC9B,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAiB,IAAI,qDAAC;QAEzC,IAAA,CAAA,YAAY,GAAuB,EAAE;QAa5B,IAAA,CAAA,oBAAoB,GAAG,iBAAiB;AAGhD,QAAA,IAAA,CAAA,kBAAkB,GAAG,SAAS,CAAC,QAAQ,CAA6B,oBAAoB,CAAC;AA0FnG;IAzGC,IACI,WAAW,CAAC,KAAyB,EAAA;AACvC,QAAA,IAAI,CAAC,YAAY,GAAG,KAAK,IAAI,EAAE;AAC/B,QAAA,IAAI,KAAK,EAAE,MAAM,EAAE;AACjB,YAAA,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;;;AAGlC,IAAA,IAAI,WAAW,GAAA;QACb,OAAO,IAAI,CAAC,YAAY;;IAS1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,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,mBAAmB,8HAAE,iBAAiB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAInD,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,WACrB,CAAC,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,CAAC,EAAA,QAAA,EAAA,uvDAAA,EAAA,MAAA,EAAA,CAAA,kwBAAA,CAAA,EAAA;8BAiB3D,WAAW,EAAA,CAAA;sBADd;;;AEvCH;;AAEG;;;;"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, input, HostBinding,
|
|
2
|
+
import { inject, input, HostBinding, Component, model, output, PLATFORM_ID, signal, viewChild } from '@angular/core';
|
|
3
3
|
import { RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';
|
|
4
4
|
import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
|
|
5
5
|
import { ImageMimeType } from '@rededor/site-front-end-lib/enums';
|
|
6
6
|
import { ImageComponent } from '@rededor/site-front-end-lib/components/image';
|
|
7
|
+
import { CuraHeadingComponent } from '@rededor/site-front-end-lib/cura/texts/cura-heading';
|
|
8
|
+
import { CuraParagraphComponent } from '@rededor/site-front-end-lib/cura/texts/cura-paragraph';
|
|
9
|
+
import { CuraBadgePillComponent } from '@rededor/site-front-end-lib/cura/badges/cura-badge-pill';
|
|
10
|
+
import { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';
|
|
11
|
+
import { CuraButtonComponent } from '@rededor/site-front-end-lib/cura/buttons/cura-button';
|
|
7
12
|
import * as i1 from '@angular/common';
|
|
8
13
|
import { CommonModule, isPlatformBrowser } from '@angular/common';
|
|
9
14
|
import * as i1$1 from '@angular/youtube-player';
|
|
@@ -33,11 +38,11 @@ class CardUnidadePlanosConveniosComponent {
|
|
|
33
38
|
};
|
|
34
39
|
}
|
|
35
40
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CardUnidadePlanosConveniosComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CardUnidadePlanosConveniosComponent, isStandalone: true, selector: "rdsite-card-unidade-planos-convenios", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, coverage: { classPropertyName: "coverage", publicName: "coverage", isSignal: true, isRequired: false, transformFunction: null }, address: { classPropertyName: "address", publicName: "address", isSignal: true, isRequired: false, transformFunction: null }, cta1: { classPropertyName: "cta1", publicName: "cta1", isSignal: true, isRequired: false, transformFunction: null }, cta2: { classPropertyName: "cta2", publicName: "cta2", isSignal: true, isRequired: false, transformFunction: null }, logoWebpSrc: { classPropertyName: "logoWebpSrc", publicName: "logoWebpSrc", isSignal: true, isRequired: false, transformFunction: null }, logoDefaultSrc: { classPropertyName: "logoDefaultSrc", publicName: "logoDefaultSrc", isSignal: true, isRequired: false, transformFunction: null }, logoSizes: { classPropertyName: "logoSizes", publicName: "logoSizes", isSignal: true, isRequired: false, transformFunction: null }, logoMimeType: { classPropertyName: "logoMimeType", publicName: "logoMimeType", isSignal: true, isRequired: false, transformFunction: null }, logoAlt: { classPropertyName: "logoAlt", publicName: "logoAlt", isSignal: true, isRequired: false, transformFunction: null }, logoTitle: { classPropertyName: "logoTitle", publicName: "logoTitle", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "this.styleBinding" } }, ngImport: i0, template: "<div class=\"rdsite-card-unidade-planos-convenios\">\
|
|
41
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CardUnidadePlanosConveniosComponent, isStandalone: true, selector: "rdsite-card-unidade-planos-convenios", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, coverage: { classPropertyName: "coverage", publicName: "coverage", isSignal: true, isRequired: false, transformFunction: null }, address: { classPropertyName: "address", publicName: "address", isSignal: true, isRequired: false, transformFunction: null }, cta1: { classPropertyName: "cta1", publicName: "cta1", isSignal: true, isRequired: false, transformFunction: null }, cta2: { classPropertyName: "cta2", publicName: "cta2", isSignal: true, isRequired: false, transformFunction: null }, logoWebpSrc: { classPropertyName: "logoWebpSrc", publicName: "logoWebpSrc", isSignal: true, isRequired: false, transformFunction: null }, logoDefaultSrc: { classPropertyName: "logoDefaultSrc", publicName: "logoDefaultSrc", isSignal: true, isRequired: false, transformFunction: null }, logoSizes: { classPropertyName: "logoSizes", publicName: "logoSizes", isSignal: true, isRequired: false, transformFunction: null }, logoMimeType: { classPropertyName: "logoMimeType", publicName: "logoMimeType", isSignal: true, isRequired: false, transformFunction: null }, logoAlt: { classPropertyName: "logoAlt", publicName: "logoAlt", isSignal: true, isRequired: false, transformFunction: null }, logoTitle: { classPropertyName: "logoTitle", publicName: "logoTitle", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "this.styleBinding" } }, ngImport: i0, template: "<div class=\"rdsite-card-unidade-planos-convenios\">\n <rdsite-image\n class=\"rdsite-card-unidade-planos-convenios-logo\"\n [imageWebpSrc]=\"logoWebpSrc()\"\n [imageDefaultSrc]=\"logoDefaultSrc()\"\n [imageSizes]=\"logoSizes()\"\n [mimeType]=\"logoMimeType()\"\n [alt]=\"logoAlt()\"\n [title]=\"logoTitle()\"\n loading=\"lazy\"\n ></rdsite-image>\n\n <div class=\"rdsite-card-unidade-planos-convenios-heading\">\n @if (title()) {\n <cura-heading size=\"small\" [level]=\"2\" color=\"neutral-black\" weight=\"bold\" margin-block=\"0\" line-height=\"150%\">\n {{ title() }}\n </cura-heading>\n }\n\n @if (subtitle()) {\n <cura-paragraph size=\"xsmall\" color=\"neutral-dark\" weight=\"bold\" margin-block=\"0\" line-height=\"130%\">\n <span class=\"cura-paragraph-weight\">\n {{ subtitle() }}\n </span>\n </cura-paragraph>\n }\n </div>\n\n <div class=\"rdsite-card-unidade-planos-convenios-content\">\n @if (coverage()) {\n <cura-paragraph size=\"xsmall\" color=\"neutral-black\" margin-block=\"0\" line-height=\"130%\">\n <span class=\"cura-paragraph-weight\">\n {{ coverage()?.title }}\n </span>\n </cura-paragraph>\n\n @if (coverage()?.list?.length) {\n <div class=\"coverage-list\">\n @for (item of coverage()?.list; track item.title) {\n <cura-badge-pill type=\"solid\" color=\"success\" [attr.disabled]=\"!item.isCovered\" [attr.icon-name]=\"item.isCovered ? 'check' : 'close'\">\n {{ item.title }}\n </cura-badge-pill>\n }\n </div>\n }\n }\n\n @if (address()) {\n <div class=\"address\">\n <cura-icon name=\"geotag\" color=\"neutral-dark\" size=\"20\"></cura-icon>\n\n <cura-paragraph size=\"xsmall\" color=\"neutral-black\" margin-block=\"0\" line-height=\"130%\">\n <span class=\"cura-paragraph-weight\"> {{ address() }} \u2022 </span>\n <a rdsitelink href=\"https://www.google.com/maps?q={{ address() }}\">Mapa</a>\n </cura-paragraph>\n </div>\n }\n </div>\n\n <div class=\"rdsite-card-unidade-planos-convenios-ctas\">\n @if (cta2() && cta2()?.label && cta2()?.link) {\n <cura-button type=\"button\" size=\"medium\" icon-name=\"calendar\" color=\"accent\" rdsitelink [href]=\"cta2()!.link\">\n {{ cta2()?.label }}\n </cura-button>\n }\n\n @if (cta1() && cta1()?.label && cta1()?.link) {\n <cura-button type=\"button\" size=\"medium\" icon-name=\"exam\" color=\"accent\" rdsitelink [href]=\"cta1()!.link\">\n {{ cta1()?.label }}\n </cura-button>\n }\n </div>\n</div>\n", styles: [":host{display:flex;width:100%;padding:20px;border-radius:12px;border:1px solid var(--neutral-light, rgb(212, 212, 212));background-color:var(--neutral-purewhite, rgb(255, 255, 255))}.rdsite-card-unidade-planos-convenios{display:grid;grid-template-rows:auto;grid-template-columns:auto;grid-template-areas:\"logo\" \"heading\" \"content\" \"ctas\";gap:12px 0;width:100%}.rdsite-card-unidade-planos-convenios-logo{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:2.26}.rdsite-card-unidade-planos-convenios ::ng-deep rdsite-image{grid-area:logo;padding:16px;background-color:var(--neutral-white);border-radius:4px}.rdsite-card-unidade-planos-convenios ::ng-deep rdsite-image picture,.rdsite-card-unidade-planos-convenios ::ng-deep rdsite-image picture img{width:80%;display:flex;align-items:center;justify-content:center}.rdsite-card-unidade-planos-convenios-heading{grid-area:heading}.rdsite-card-unidade-planos-convenios-content{grid-area:content;display:flex;flex-direction:column;align-items:flex-start;gap:8px;flex:3 0 0;width:100%}.rdsite-card-unidade-planos-convenios-content .address{display:flex;padding:8px;align-items:center;gap:8px;width:100%;border-radius:4px;background-color:var(--neutral-white, rgb(246, 246, 246))}.rdsite-card-unidade-planos-convenios-content .address a{color:var(--color-base);font-weight:500}.rdsite-card-unidade-planos-convenios-content .coverage-list{display:flex;gap:8px;flex-wrap:wrap}.rdsite-card-unidade-planos-convenios-ctas{grid-area:ctas;display:flex;width:100%;flex-direction:column;justify-content:center;align-items:stretch;gap:12px}@media screen and (min-width: 992px){.rdsite-card-unidade-planos-convenios{grid-template-rows:auto;grid-template-columns:152px 1fr auto;grid-template-areas:\"logo heading ctas\" \"content content content\";gap:20px;align-items:flex-start}.rdsite-card-unidade-planos-convenios-logo{aspect-ratio:1.26}.rdsite-card-unidade-planos-convenios ::ng-deep rdsite-image picture,.rdsite-card-unidade-planos-convenios ::ng-deep rdsite-image picture img{width:100%}.rdsite-card-unidade-planos-convenios-content{gap:16px}.rdsite-card-unidade-planos-convenios-content .coverage-list{gap:16px 8px}.rdsite-card-unidade-planos-convenios-content .address{width:fit-content}.rdsite-card-unidade-planos-convenios-ctas{width:224px}}span.cura-paragraph-weight{font-weight:500}\n"], dependencies: [{ kind: "component", type: ImageComponent, selector: "rdsite-image", inputs: ["imageWebpSrc", "imageDefaultSrc", "imageSizes", "mimeType", "alt", "title", "loading"], outputs: ["imageDefaultSrcChange", "mimeTypeChange"] }, { kind: "directive", type: RdsiteLinkDirective, selector: "[rdsitelink]", inputs: ["anchorAdjustment", "anchorExtraAdjustment", "phonemodal"] }, { 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: CuraBadgePillComponent, selector: "cura-badge-pill", inputs: ["type", "color", "iconName", "iconset", "disabled", "iconOnly", "borderRadius"] }, { kind: "component", type: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }, { kind: "component", type: CuraButtonComponent, selector: "cura-button", inputs: ["type", "size", "disabled", "isLoading", "iconName", "iconset", "iconPosition", "iconOnly", "href", "target", "color", "background", "fontColor", "textAlign", "justify"], outputs: ["buttonClick"] }] }); }
|
|
37
42
|
}
|
|
38
43
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CardUnidadePlanosConveniosComponent, decorators: [{
|
|
39
44
|
type: Component,
|
|
40
|
-
args: [{ selector: 'rdsite-card-unidade-planos-convenios', imports: [ImageComponent, RdsiteLinkDirective
|
|
45
|
+
args: [{ selector: 'rdsite-card-unidade-planos-convenios', imports: [ImageComponent, RdsiteLinkDirective, CuraHeadingComponent, CuraParagraphComponent, CuraBadgePillComponent, CuraIconComponent, CuraButtonComponent], template: "<div class=\"rdsite-card-unidade-planos-convenios\">\n <rdsite-image\n class=\"rdsite-card-unidade-planos-convenios-logo\"\n [imageWebpSrc]=\"logoWebpSrc()\"\n [imageDefaultSrc]=\"logoDefaultSrc()\"\n [imageSizes]=\"logoSizes()\"\n [mimeType]=\"logoMimeType()\"\n [alt]=\"logoAlt()\"\n [title]=\"logoTitle()\"\n loading=\"lazy\"\n ></rdsite-image>\n\n <div class=\"rdsite-card-unidade-planos-convenios-heading\">\n @if (title()) {\n <cura-heading size=\"small\" [level]=\"2\" color=\"neutral-black\" weight=\"bold\" margin-block=\"0\" line-height=\"150%\">\n {{ title() }}\n </cura-heading>\n }\n\n @if (subtitle()) {\n <cura-paragraph size=\"xsmall\" color=\"neutral-dark\" weight=\"bold\" margin-block=\"0\" line-height=\"130%\">\n <span class=\"cura-paragraph-weight\">\n {{ subtitle() }}\n </span>\n </cura-paragraph>\n }\n </div>\n\n <div class=\"rdsite-card-unidade-planos-convenios-content\">\n @if (coverage()) {\n <cura-paragraph size=\"xsmall\" color=\"neutral-black\" margin-block=\"0\" line-height=\"130%\">\n <span class=\"cura-paragraph-weight\">\n {{ coverage()?.title }}\n </span>\n </cura-paragraph>\n\n @if (coverage()?.list?.length) {\n <div class=\"coverage-list\">\n @for (item of coverage()?.list; track item.title) {\n <cura-badge-pill type=\"solid\" color=\"success\" [attr.disabled]=\"!item.isCovered\" [attr.icon-name]=\"item.isCovered ? 'check' : 'close'\">\n {{ item.title }}\n </cura-badge-pill>\n }\n </div>\n }\n }\n\n @if (address()) {\n <div class=\"address\">\n <cura-icon name=\"geotag\" color=\"neutral-dark\" size=\"20\"></cura-icon>\n\n <cura-paragraph size=\"xsmall\" color=\"neutral-black\" margin-block=\"0\" line-height=\"130%\">\n <span class=\"cura-paragraph-weight\"> {{ address() }} \u2022 </span>\n <a rdsitelink href=\"https://www.google.com/maps?q={{ address() }}\">Mapa</a>\n </cura-paragraph>\n </div>\n }\n </div>\n\n <div class=\"rdsite-card-unidade-planos-convenios-ctas\">\n @if (cta2() && cta2()?.label && cta2()?.link) {\n <cura-button type=\"button\" size=\"medium\" icon-name=\"calendar\" color=\"accent\" rdsitelink [href]=\"cta2()!.link\">\n {{ cta2()?.label }}\n </cura-button>\n }\n\n @if (cta1() && cta1()?.label && cta1()?.link) {\n <cura-button type=\"button\" size=\"medium\" icon-name=\"exam\" color=\"accent\" rdsitelink [href]=\"cta1()!.link\">\n {{ cta1()?.label }}\n </cura-button>\n }\n </div>\n</div>\n", styles: [":host{display:flex;width:100%;padding:20px;border-radius:12px;border:1px solid var(--neutral-light, rgb(212, 212, 212));background-color:var(--neutral-purewhite, rgb(255, 255, 255))}.rdsite-card-unidade-planos-convenios{display:grid;grid-template-rows:auto;grid-template-columns:auto;grid-template-areas:\"logo\" \"heading\" \"content\" \"ctas\";gap:12px 0;width:100%}.rdsite-card-unidade-planos-convenios-logo{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:2.26}.rdsite-card-unidade-planos-convenios ::ng-deep rdsite-image{grid-area:logo;padding:16px;background-color:var(--neutral-white);border-radius:4px}.rdsite-card-unidade-planos-convenios ::ng-deep rdsite-image picture,.rdsite-card-unidade-planos-convenios ::ng-deep rdsite-image picture img{width:80%;display:flex;align-items:center;justify-content:center}.rdsite-card-unidade-planos-convenios-heading{grid-area:heading}.rdsite-card-unidade-planos-convenios-content{grid-area:content;display:flex;flex-direction:column;align-items:flex-start;gap:8px;flex:3 0 0;width:100%}.rdsite-card-unidade-planos-convenios-content .address{display:flex;padding:8px;align-items:center;gap:8px;width:100%;border-radius:4px;background-color:var(--neutral-white, rgb(246, 246, 246))}.rdsite-card-unidade-planos-convenios-content .address a{color:var(--color-base);font-weight:500}.rdsite-card-unidade-planos-convenios-content .coverage-list{display:flex;gap:8px;flex-wrap:wrap}.rdsite-card-unidade-planos-convenios-ctas{grid-area:ctas;display:flex;width:100%;flex-direction:column;justify-content:center;align-items:stretch;gap:12px}@media screen and (min-width: 992px){.rdsite-card-unidade-planos-convenios{grid-template-rows:auto;grid-template-columns:152px 1fr auto;grid-template-areas:\"logo heading ctas\" \"content content content\";gap:20px;align-items:flex-start}.rdsite-card-unidade-planos-convenios-logo{aspect-ratio:1.26}.rdsite-card-unidade-planos-convenios ::ng-deep rdsite-image picture,.rdsite-card-unidade-planos-convenios ::ng-deep rdsite-image picture img{width:100%}.rdsite-card-unidade-planos-convenios-content{gap:16px}.rdsite-card-unidade-planos-convenios-content .coverage-list{gap:16px 8px}.rdsite-card-unidade-planos-convenios-content .address{width:fit-content}.rdsite-card-unidade-planos-convenios-ctas{width:224px}}span.cura-paragraph-weight{font-weight:500}\n"] }]
|
|
41
46
|
}], propDecorators: { styleBinding: [{
|
|
42
47
|
type: HostBinding,
|
|
43
48
|
args: ['style']
|
|
@@ -75,11 +80,11 @@ class ExpandableCardComponent {
|
|
|
75
80
|
this.classes = this.disabled() ? ['disabled'] : [];
|
|
76
81
|
}
|
|
77
82
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ExpandableCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
78
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: ExpandableCardComponent, isStandalone: true, selector: "rdsite-expandable-card", inputs: { opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, badgeLabel: { classPropertyName: "badgeLabel", publicName: "badgeLabel", isSignal: true, isRequired: false, transformFunction: null }, openIcon: { classPropertyName: "openIcon", publicName: "openIcon", isSignal: true, isRequired: false, transformFunction: null }, closeIcon: { classPropertyName: "closeIcon", publicName: "closeIcon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "openedChange", toggle: "toggle" }, host: { properties: { "style": "this.styleBinding", "class": "this.classes" } }, usesOnChanges: true, ngImport: i0, template: "@if (label()) {\r\n <div class=\"card-header\" [ngClass]=\"{ noBadge: !badgeLabel() }\" (click)=\"toggleCard()\">\r\n @if (link() && label()) {\r\n <a rdsitelink class=\"card-link\" [href]=\"link()\">\r\n {{ label() }}\r\n <cura-icon name=\"arrowRight\" color=\"primary-dark\" size=\"16\"></cura-icon>\r\n </a>\r\n }\r\n\r\n @if (badgeLabel()) {\r\n <cura-badge-pill type=\"solid\" color=\"primary\">\r\n {{ badgeLabel() }}\r\n </cura-badge-pill>\r\n }\r\n\r\n <cura-icon [attr.name]=\"opened() ? closeIcon() : openIcon()\" color=\"primary-dark\" size=\"20\"></cura-icon>\r\n </div>\r\n\r\n <div class=\"card-content\" [ngClass]=\"{ opened: opened() }\">\r\n <ng-content></ng-content>\r\n </div>\r\n}\r\n", styles: [":host{display:block;width:100%;height:auto;border-radius:12px;border:2px solid var(--neutral-base);background:var(--neutral-purewhite)}:host .card-header{display:grid;grid-template-rows:auto;grid-template-columns:auto 1fr auto;grid-template-areas:\"badge . icon\" \"label . icon\" \"link . icon\";width:100%;height:auto;padding:20px;cursor:pointer}:host .card-header .card-link{grid-area:link;font-family:var(--font-family);color:var(--color-one-dark);font-size:14px;font-weight:500;line-height:19px;letter-spacing:.28px;text-decoration-line:underline;display:flex;justify-content:flex-start;align-items:center;gap:8px;margin-top:4px}@media screen and (min-width: 992px){:host .card-header .card-link{font-size:16px;line-height:23px;letter-spacing:.32px}}:host .card-header cura-badge-pill{grid-area:badge;margin-bottom:4px}:host .card-header>cura-icon{grid-area:icon;margin-left:16px}:host .card-header.noBadge{grid-template-areas:\"label . icon\" \"link . icon\"}:host .card-content{overflow:hidden;max-height:0;transition:all .25s ease;transform:translateZ(0)}:host .card-content.opened{max-height:fit-content;transition:.5s ease .14s}:host.disabled .card-header{grid-template-areas:\"label\" \"link\";cursor:default}:host.disabled .card-header cura-badge-pill,:host.disabled .card-header>cura-icon{display:none}\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"] }] }); }
|
|
83
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: ExpandableCardComponent, isStandalone: true, selector: "rdsite-expandable-card", inputs: { opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, badgeLabel: { classPropertyName: "badgeLabel", publicName: "badgeLabel", isSignal: true, isRequired: false, transformFunction: null }, openIcon: { classPropertyName: "openIcon", publicName: "openIcon", isSignal: true, isRequired: false, transformFunction: null }, closeIcon: { classPropertyName: "closeIcon", publicName: "closeIcon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "openedChange", toggle: "toggle" }, host: { properties: { "style": "this.styleBinding", "class": "this.classes" } }, usesOnChanges: true, ngImport: i0, template: "@if (label()) {\r\n <div class=\"card-header\" [ngClass]=\"{ noBadge: !badgeLabel() }\" (click)=\"toggleCard()\">\r\n @if (link() && label()) {\r\n <a rdsitelink class=\"card-link\" [href]=\"link()\">\r\n {{ label() }}\r\n <cura-icon name=\"arrowRight\" color=\"primary-dark\" size=\"16\"></cura-icon>\r\n </a>\r\n }\r\n\r\n @if (badgeLabel()) {\r\n <cura-badge-pill type=\"solid\" color=\"primary\">\r\n {{ badgeLabel() }}\r\n </cura-badge-pill>\r\n }\r\n\r\n <cura-icon [attr.name]=\"opened() ? closeIcon() : openIcon()\" color=\"primary-dark\" size=\"20\"></cura-icon>\r\n </div>\r\n\r\n <div class=\"card-content\" [ngClass]=\"{ opened: opened() }\">\r\n <ng-content></ng-content>\r\n </div>\r\n}\r\n", styles: [":host{display:block;width:100%;height:auto;border-radius:12px;border:2px solid var(--neutral-base);background:var(--neutral-purewhite)}:host .card-header{display:grid;grid-template-rows:auto;grid-template-columns:auto 1fr auto;grid-template-areas:\"badge . icon\" \"label . icon\" \"link . icon\";width:100%;height:auto;padding:20px;cursor:pointer}:host .card-header .card-link{grid-area:link;font-family:var(--font-family);color:var(--color-one-dark);font-size:14px;font-weight:500;line-height:19px;letter-spacing:.28px;text-decoration-line:underline;display:flex;justify-content:flex-start;align-items:center;gap:8px;margin-top:4px}@media screen and (min-width: 992px){:host .card-header .card-link{font-size:16px;line-height:23px;letter-spacing:.32px}}:host .card-header cura-badge-pill{grid-area:badge;margin-bottom:4px}:host .card-header>cura-icon{grid-area:icon;margin-left:16px}:host .card-header.noBadge{grid-template-areas:\"label . icon\" \"link . icon\"}:host .card-content{overflow:hidden;max-height:0;transition:all .25s ease;transform:translateZ(0)}:host .card-content.opened{max-height:fit-content;transition:.5s ease .14s}:host.disabled .card-header{grid-template-areas:\"label\" \"link\";cursor:default}:host.disabled .card-header cura-badge-pill,:host.disabled .card-header>cura-icon{display:none}\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: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }, { kind: "component", type: CuraBadgePillComponent, selector: "cura-badge-pill", inputs: ["type", "color", "iconName", "iconset", "disabled", "iconOnly", "borderRadius"] }] }); }
|
|
79
84
|
}
|
|
80
85
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ExpandableCardComponent, decorators: [{
|
|
81
86
|
type: Component,
|
|
82
|
-
args: [{ selector: 'rdsite-expandable-card', imports: [CommonModule, RdsiteLinkDirective
|
|
87
|
+
args: [{ selector: 'rdsite-expandable-card', imports: [CommonModule, RdsiteLinkDirective, CuraIconComponent, CuraBadgePillComponent], template: "@if (label()) {\r\n <div class=\"card-header\" [ngClass]=\"{ noBadge: !badgeLabel() }\" (click)=\"toggleCard()\">\r\n @if (link() && label()) {\r\n <a rdsitelink class=\"card-link\" [href]=\"link()\">\r\n {{ label() }}\r\n <cura-icon name=\"arrowRight\" color=\"primary-dark\" size=\"16\"></cura-icon>\r\n </a>\r\n }\r\n\r\n @if (badgeLabel()) {\r\n <cura-badge-pill type=\"solid\" color=\"primary\">\r\n {{ badgeLabel() }}\r\n </cura-badge-pill>\r\n }\r\n\r\n <cura-icon [attr.name]=\"opened() ? closeIcon() : openIcon()\" color=\"primary-dark\" size=\"20\"></cura-icon>\r\n </div>\r\n\r\n <div class=\"card-content\" [ngClass]=\"{ opened: opened() }\">\r\n <ng-content></ng-content>\r\n </div>\r\n}\r\n", styles: [":host{display:block;width:100%;height:auto;border-radius:12px;border:2px solid var(--neutral-base);background:var(--neutral-purewhite)}:host .card-header{display:grid;grid-template-rows:auto;grid-template-columns:auto 1fr auto;grid-template-areas:\"badge . icon\" \"label . icon\" \"link . icon\";width:100%;height:auto;padding:20px;cursor:pointer}:host .card-header .card-link{grid-area:link;font-family:var(--font-family);color:var(--color-one-dark);font-size:14px;font-weight:500;line-height:19px;letter-spacing:.28px;text-decoration-line:underline;display:flex;justify-content:flex-start;align-items:center;gap:8px;margin-top:4px}@media screen and (min-width: 992px){:host .card-header .card-link{font-size:16px;line-height:23px;letter-spacing:.32px}}:host .card-header cura-badge-pill{grid-area:badge;margin-bottom:4px}:host .card-header>cura-icon{grid-area:icon;margin-left:16px}:host .card-header.noBadge{grid-template-areas:\"label . icon\" \"link . icon\"}:host .card-content{overflow:hidden;max-height:0;transition:all .25s ease;transform:translateZ(0)}:host .card-content.opened{max-height:fit-content;transition:.5s ease .14s}:host.disabled .card-header{grid-template-areas:\"label\" \"link\";cursor:default}:host.disabled .card-header cura-badge-pill,:host.disabled .card-header>cura-icon{display:none}\n"] }]
|
|
83
88
|
}], propDecorators: { styleBinding: [{
|
|
84
89
|
type: HostBinding,
|
|
85
90
|
args: ['style']
|
|
@@ -133,7 +138,7 @@ class TestimonialCardComponent {
|
|
|
133
138
|
}
|
|
134
139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: TestimonialCardComponent, decorators: [{
|
|
135
140
|
type: Component,
|
|
136
|
-
args: [{ selector: 'rdsite-testimonial-card', imports: [ImageComponent, YouTubePlayerModule],
|
|
141
|
+
args: [{ selector: 'rdsite-testimonial-card', imports: [ImageComponent, YouTubePlayerModule], template: "@if ((image() || getVideoId()) && text()) {\n @switch (type()) {\n @case ('image') {\n @if (image()) {\n <rdsite-image\n [imageWebpSrc]=\"image()?.webp_sizes?.['rdsl-card-unidades']\"\n [imageDefaultSrc]=\"image()?.sizes?.['rdsl-card-unidades']\"\n [mimeType]=\"image()?.mime_type\"\n [alt]=\"image()?.alt\"\n >\n </rdsite-image>\n }\n }\n @case ('video') {\n @if (getVideoId() && platformBrowser()) {\n <youtube-player #youtubePlayer [videoId]=\"getVideoId()\" [disablePlaceholder]=\"true\"></youtube-player>\n }\n }\n }\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"26\" viewBox=\"0 0 32 26\" fill=\"none\">\n <path\n d=\"M14.375 3.3125C12.9062 4.15625 11.7188 4.89062 10.8125 5.51562C9.90625 6.10938 8.98438 6.90625 8.04688 7.90625C7.17188 8.84375 6.5 9.82812 6.03125 10.8594C5.5625 11.8906 5.23438 13.2188 5.04688 14.8438H7.29688C9.23438 14.8438 10.75 15.3281 11.8438 16.2969C12.9688 17.2344 13.5312 18.625 13.5312 20.4688C13.5312 21.7812 13.0312 23.0156 12.0312 24.1719C11.0625 25.2969 9.71875 25.8594 8 25.8594C5.3125 25.8594 3.39062 24.9844 2.23438 23.2344C1.07812 21.4531 0.5 19.125 0.5 16.25C0.5 14.2188 0.9375 12.375 1.8125 10.7188C2.6875 9.03125 3.75 7.53125 5 6.21875C6.28125 4.875 7.64062 3.73438 9.07812 2.79688C10.5156 1.85938 11.7188 1.09375 12.6875 0.5L14.375 3.3125ZM31.7188 3.3125C30.25 4.15625 29.0625 4.89062 28.1562 5.51562C27.25 6.10938 26.3281 6.90625 25.3906 7.90625C24.4844 8.875 23.7969 9.875 23.3281 10.9062C22.8906 11.9062 22.5781 13.2188 22.3906 14.8438H24.6406C26.5781 14.8438 28.0938 15.3281 29.1875 16.2969C30.3125 17.2344 30.875 18.625 30.875 20.4688C30.875 21.7812 30.375 23.0156 29.375 24.1719C28.4062 25.2969 27.0625 25.8594 25.3438 25.8594C22.6562 25.8594 20.7344 24.9844 19.5781 23.2344C18.4219 21.4531 17.8438 19.125 17.8438 16.25C17.8438 14.2188 18.2812 12.375 19.1562 10.7188C20.0312 9.03125 21.0938 7.53125 22.3438 6.21875C23.625 4.875 24.9844 3.73438 26.4219 2.79688C27.8594 1.85938 29.0625 1.09375 30.0312 0.5L31.7188 3.3125Z\"\n fill=\"#202122\"\n />\n </svg>\n\n <div class=\"testimonials-text\">\n <q class=\"quote\" [innerHTML]=\"text()\" (click)=\"stopVideo()\"></q>\n\n @if (author()) {\n <span class=\"author\">{{ author() }}</span>\n }\n\n @if (position()) {\n <span class=\"position\">\n {{ position() }}\n </span>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;gap:15px;width:100%;height:auto;padding:28px;border-radius:3px;background-color:#f7f5f0}@media screen and (min-width: 1024px){:host{flex-direction:row;justify-content:center;gap:12px;background:linear-gradient(to right,#fff 102px,#f7f5f0 0)}}:host rdsite-image,:host youtube-player{border-radius:3px 50px 3px 3px}@media screen and (min-width: 1024px){:host rdsite-image,:host youtube-player{flex:1 1 50%}}:host rdsite-image{aspect-ratio:1.35}@media screen and (min-width: 769px){:host rdsite-image{aspect-ratio:1.78}}:host youtube-player{overflow:hidden;aspect-ratio:1.35}@media screen and (min-width: 769px){:host youtube-player{aspect-ratio:unset}}:host youtube-player ::ng-deep>div{width:100%;height:100%}:host youtube-player ::ng-deep iframe{width:100%;height:100%}:host svg{margin-top:24px}:host .testimonials-text{flex:1 1 50%;display:flex;flex-direction:column}:host .testimonials-text *{font-family:var(--font-family)}:host .testimonials-text .quote{color:var(--color-one-darker);font-size:17px;font-weight:400;line-height:150%;margin-bottom:15px}@media screen and (min-width: 1024px){:host .testimonials-text .quote{font-size:19px;margin-bottom:44px;margin-top:44px}}:host .testimonials-text .author,:host .testimonials-text .position{color:var(--neutral-black);font-size:12px;font-weight:500;line-height:135%;letter-spacing:.48px}@media screen and (min-width: 1024px){:host .testimonials-text .author,:host .testimonials-text .position{font-size:14px;letter-spacing:.56px}}\n"] }]
|
|
137
142
|
}], ctorParameters: () => [], propDecorators: { styleBinding: [{
|
|
138
143
|
type: HostBinding,
|
|
139
144
|
args: ['style']
|