@rededor/site-front-end-lib 20.0.35 → 20.0.37-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -5
- package/components/breadcrumbs/index.d.ts +3 -12
- package/components/carousels/index.d.ts +3 -5
- package/components/cta-wrapper/index.d.ts +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-breadcrumbs.mjs +4 -38
- package/fesm2022/rededor-site-front-end-lib-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-carousels.mjs +4 -15
- package/fesm2022/rededor-site-front-end-lib-components-carousels.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-cta-wrapper.mjs +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-cta-wrapper.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-side-ctas.mjs +2 -3
- package/fesm2022/rededor-site-front-end-lib-components-side-ctas.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-sticky-navigation.mjs +2 -2
- package/fesm2022/rededor-site-front-end-lib-components-sticky-navigation.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-core.mjs +10 -6
- package/fesm2022/rededor-site-front-end-lib-core.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-services-ngu-carousel.mjs.map +1 -1
- package/package.json +2 -2
- package/services/ngu-carousel/index.d.ts +1 -1
package/README.md
CHANGED
|
@@ -20,6 +20,19 @@ A tabela abaixo mostra a compatibilidade entre as versões da lib e as versões
|
|
|
20
20
|
- Para criação de componentes, services, etc, os comandos são os mesmos utilizados no desenvolvimento dentro do contexto dos projetos do site.
|
|
21
21
|
- Obs: antes de utilizar os comandos `ng`, verifique a pasta atual de seu terminal (`cd projects/site-front-end-lib`).
|
|
22
22
|
|
|
23
|
+
## Demo local SSR (zoneless)
|
|
24
|
+
|
|
25
|
+
No workspace existe o app `lib-demo` (Angular 20 SSR zoneless) para smoke test rápido dos componentes da lib via path mapping.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# na raiz do workspace
|
|
29
|
+
npm run demo:start
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Scripts úteis: `demo:serve`, `demo:build`, `demo:ssr`, `demo:build-lib`.
|
|
33
|
+
|
|
34
|
+
A demo **não** substitui o fluxo `pack-local-target` / `.tgz` nos sites consumidores.
|
|
35
|
+
|
|
23
36
|
## Desenvolvimento com Live Reload
|
|
24
37
|
|
|
25
38
|
Para rodar o projeto com live reload, é necessário realizar algumas configurações.
|
|
@@ -82,22 +95,72 @@ Após realizar os testes, é recomendavel realizar a **limpeza** dessas linkagen
|
|
|
82
95
|
|
|
83
96
|
Feito isso, voce pode checar se as linkagens foram removidas corretamente com `npm list -g`.
|
|
84
97
|
|
|
98
|
+
## Desenvolvimento local com SSR
|
|
99
|
+
|
|
100
|
+
A partir de `site-front-end-lib-workspace`:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
node scripts/pack-local-target.mjs --target ../site-front-end-v2
|
|
104
|
+
node scripts/pack-local-target.mjs --target ../onco-front-end
|
|
105
|
+
node scripts/pack-local-target.mjs --target ../star-front-end --no-serve
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Funciona em qualquer front-end que consuma a lib e tenha `build:localdev` + `serve:ssr` (`site-front-end`, `site-front-end-v2`, `onco-front-end`, `maternidade-front-end`, `richet-front-end`, `star-front-end`).
|
|
109
|
+
|
|
110
|
+
O script incrementa a versão alpha, empacota a lib, instala no alvo, roda `build:localdev` e sobe `serve:ssr`. Única flag opcional: `--no-serve`. Ver `--help`.
|
|
111
|
+
|
|
112
|
+
### Fluxo manual (alternativo)
|
|
113
|
+
|
|
114
|
+
#### 1 — No contexto da LIB
|
|
115
|
+
|
|
116
|
+
1. Incremente uma versão alpha no `package.json` antes de cada build de teste (ex.: `20.0.36-alpha.1`, `20.0.36-alpha.2`).
|
|
117
|
+
2. Faça o build e empacote a lib:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
ng build site-front-end-lib
|
|
121
|
+
cd dist/site-front-end-lib
|
|
122
|
+
npm pack
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
1. Copie ou mova o arquivo `.tgz` gerado para a raiz do projeto que será testado.
|
|
126
|
+
|
|
127
|
+
#### 2 — No contexto do PROJETO
|
|
128
|
+
|
|
129
|
+
1. Com o arquivo `.tgz` na raiz do projeto, atualize a dependência `@rededor/site-front-end-lib` no `package.json`:
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
"@rededor/site-front-end-lib": "file:./rededor-site-front-end-lib-20.0.36-alpha.1.tgz"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
> Substitua o nome do arquivo pela versão gerada no passo anterior.
|
|
136
|
+
|
|
137
|
+
1. Instale as dependências:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
npm i
|
|
141
|
+
# ou, em caso de erro:
|
|
142
|
+
npm i --force
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
1. Faça o build e inicie o SSR:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
npm run build:localdev
|
|
149
|
+
npm run serve:ssr
|
|
150
|
+
```
|
|
151
|
+
|
|
85
152
|
## \(DEPRECATED\) \(Recomenda-se utilizar o fluxo descrito em [VERSIONAMENTO](../../VERSIONAMENTO.md)\)
|
|
86
153
|
|
|
87
154
|
## Versionamento manual
|
|
88
155
|
|
|
89
156
|
- Lembre-se de trocar o número da versão no `package.json`.
|
|
90
|
-
|
|
91
|
-
- Adicione uma mensagem de versão no [`CHANGELOG.md`](CHANGELOG.md).
|
|
157
|
+
- Adicione uma mensagem de versão no `[CHANGELOG.md](CHANGELOG.md)`.
|
|
92
158
|
|
|
93
159
|
## Pull request e tag de versão manual
|
|
94
160
|
|
|
95
161
|
- Realize o Pull Request (PR) de sua branch para a branch **master**.
|
|
96
|
-
|
|
97
162
|
- Após aprovação pelo code review, realize o merge do PR.
|
|
98
|
-
|
|
99
163
|
- Atualize sua master local com a branch **master**.
|
|
100
|
-
|
|
101
164
|
- Crie a tag da versão no git (troque o número da versão pela atual).
|
|
102
165
|
|
|
103
166
|
```
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ElementRef } from '@angular/core';
|
|
3
3
|
import { BreadcrumbsItems } from '@rededor/site-front-end-lib/core';
|
|
4
4
|
|
|
5
|
-
declare class BreadcrumbsComponent
|
|
5
|
+
declare class BreadcrumbsComponent {
|
|
6
6
|
private curaApiService;
|
|
7
7
|
private libConfig;
|
|
8
8
|
private document;
|
|
9
|
-
private cdr;
|
|
10
|
-
private readonly platformId;
|
|
11
9
|
readonly labelIconColor: _angular_core.InputSignal<string>;
|
|
12
10
|
readonly fontWeight: _angular_core.InputSignal<string>;
|
|
13
11
|
readonly breadcrumbs: _angular_core.InputSignal<BreadcrumbsItems[]>;
|
|
14
12
|
readonly mobileBackView: _angular_core.InputSignal<boolean>;
|
|
15
|
-
readonly isDesktop: _angular_core.WritableSignal<boolean | null>;
|
|
16
13
|
private breadcrumbsJsonTag;
|
|
17
14
|
private readonly breadcrumbsJsonTagId;
|
|
18
|
-
|
|
19
|
-
readonly breadCrumbsElement: _angular_core.Signal<ElementRef<HTMLDivElement>>;
|
|
15
|
+
readonly breadCrumbsElement: _angular_core.Signal<ElementRef<HTMLElement>>;
|
|
20
16
|
get hostStyles(): {
|
|
21
17
|
'--font-family': string;
|
|
22
18
|
'--label-icon-color': string;
|
|
@@ -25,11 +21,6 @@ declare class BreadcrumbsComponent implements AfterViewInit, OnDestroy {
|
|
|
25
21
|
'--font-weight': string | null;
|
|
26
22
|
};
|
|
27
23
|
constructor();
|
|
28
|
-
ngAfterViewInit(): void;
|
|
29
|
-
ngOnDestroy(): void;
|
|
30
|
-
private initViewportDetection;
|
|
31
|
-
private setupResizeObserver;
|
|
32
|
-
private checkViewportSize;
|
|
33
24
|
getUrl(urls?: string[]): string;
|
|
34
25
|
private setBreadcrumbsJson;
|
|
35
26
|
private getBreadcrumbsJSONTag;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { NguCarousel } from '@ngu/carousel';
|
|
2
|
+
import { NguCarouselConfig, NguCarousel } from '@rededor/ngu-carousel';
|
|
4
3
|
import { TestimonialCardComponent } from '@rededor/site-front-end-lib/components/cards';
|
|
5
4
|
|
|
6
|
-
declare class TestimonialsCarouselComponent
|
|
5
|
+
declare class TestimonialsCarouselComponent {
|
|
7
6
|
private readonly curaApiService;
|
|
8
7
|
private nguService;
|
|
9
8
|
title: _angular_core.InputSignal<string>;
|
|
10
9
|
items: _angular_core.InputSignal<any[] | null>;
|
|
11
|
-
carouselTestimonialsConfig:
|
|
10
|
+
readonly carouselTestimonialsConfig: _angular_core.WritableSignal<NguCarouselConfig>;
|
|
12
11
|
readonly carouselTestimonials: _angular_core.Signal<NguCarousel<any[], _angular_core.NgIterable<any[]>>>;
|
|
13
12
|
readonly testimonialCards: _angular_core.Signal<readonly TestimonialCardComponent[]>;
|
|
14
13
|
styleBinding: {
|
|
@@ -16,7 +15,6 @@ declare class TestimonialsCarouselComponent implements OnInit {
|
|
|
16
15
|
'--neutral-black': string;
|
|
17
16
|
'--font-family': string;
|
|
18
17
|
};
|
|
19
|
-
ngOnInit(): void;
|
|
20
18
|
nextSlide(): void;
|
|
21
19
|
prevSlide(): void;
|
|
22
20
|
moveTo(pointerNumber: number): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { OnInit } from '@angular/core';
|
|
3
|
-
import { NguCarouselConfig, NguCarousel } from '@ngu
|
|
3
|
+
import { NguCarouselConfig, NguCarousel } from '@rededor/ngu-carousel';
|
|
4
4
|
import { CtaWrapper } from '@rededor/site-front-end-lib/core';
|
|
5
5
|
|
|
6
6
|
declare class CtaWrapperComponent implements OnInit {
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, DOCUMENT,
|
|
3
|
-
import
|
|
4
|
-
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
2
|
+
import { inject, DOCUMENT, input, viewChild, effect, HostBinding, Component } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
5
4
|
import * as he from 'he';
|
|
6
5
|
import { LIB_CONFIG, RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';
|
|
7
6
|
import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
|
|
8
|
-
import { MediaQueries } from '@rededor/site-front-end-lib/shared';
|
|
9
7
|
import { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';
|
|
10
8
|
|
|
11
9
|
class BreadcrumbsComponent {
|
|
@@ -24,13 +22,10 @@ class BreadcrumbsComponent {
|
|
|
24
22
|
this.curaApiService = inject(CuraApiService);
|
|
25
23
|
this.libConfig = inject(LIB_CONFIG);
|
|
26
24
|
this.document = inject(DOCUMENT);
|
|
27
|
-
this.cdr = inject(ChangeDetectorRef);
|
|
28
|
-
this.platformId = inject(PLATFORM_ID);
|
|
29
25
|
this.labelIconColor = input('neutral-purewhite', ...(ngDevMode ? [{ debugName: "labelIconColor" }] : []));
|
|
30
26
|
this.fontWeight = input('', ...(ngDevMode ? [{ debugName: "fontWeight" }] : []));
|
|
31
27
|
this.breadcrumbs = input([], ...(ngDevMode ? [{ debugName: "breadcrumbs" }] : []));
|
|
32
28
|
this.mobileBackView = input(false, ...(ngDevMode ? [{ debugName: "mobileBackView" }] : []));
|
|
33
|
-
this.isDesktop = signal(null, ...(ngDevMode ? [{ debugName: "isDesktop" }] : []));
|
|
34
29
|
this.breadcrumbsJsonTagId = 'breadcrumbsJSON';
|
|
35
30
|
this.breadCrumbsElement = viewChild.required('breadCrumbsElement');
|
|
36
31
|
effect(() => {
|
|
@@ -39,35 +34,6 @@ class BreadcrumbsComponent {
|
|
|
39
34
|
}
|
|
40
35
|
});
|
|
41
36
|
}
|
|
42
|
-
ngAfterViewInit() {
|
|
43
|
-
this.initViewportDetection();
|
|
44
|
-
}
|
|
45
|
-
ngOnDestroy() {
|
|
46
|
-
this.resizeObserver?.disconnect();
|
|
47
|
-
}
|
|
48
|
-
initViewportDetection() {
|
|
49
|
-
if (!isPlatformBrowser(this.platformId)) {
|
|
50
|
-
this.isDesktop.set(true);
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
this.checkViewportSize();
|
|
54
|
-
this.setupResizeObserver();
|
|
55
|
-
}
|
|
56
|
-
setupResizeObserver() {
|
|
57
|
-
this.resizeObserver = new ResizeObserver(() => {
|
|
58
|
-
this.checkViewportSize();
|
|
59
|
-
});
|
|
60
|
-
this.resizeObserver.observe(document.body);
|
|
61
|
-
}
|
|
62
|
-
checkViewportSize() {
|
|
63
|
-
if (!isPlatformBrowser(this.platformId))
|
|
64
|
-
return;
|
|
65
|
-
const newValue = window.innerWidth > MediaQueries.smallBreakpoint;
|
|
66
|
-
if (this.isDesktop() !== newValue) {
|
|
67
|
-
this.isDesktop.set(newValue);
|
|
68
|
-
this.cdr.detectChanges();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
37
|
getUrl(urls = []) {
|
|
72
38
|
return urls.join('');
|
|
73
39
|
}
|
|
@@ -102,11 +68,11 @@ class BreadcrumbsComponent {
|
|
|
102
68
|
}));
|
|
103
69
|
}
|
|
104
70
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: BreadcrumbsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
105
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", 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: true, isRequired: false, transformFunction: null }, mobileBackView: { classPropertyName: "mobileBackView", publicName: "mobileBackView", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "this.hostStyles" } }, viewQueries: [{ propertyName: "breadCrumbsElement", first: true, predicate: ["breadCrumbsElement"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (breadcrumbs().length) {\r\n <nav class=\"
|
|
71
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", 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: true, isRequired: false, transformFunction: null }, mobileBackView: { classPropertyName: "mobileBackView", publicName: "mobileBackView", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "this.hostStyles" } }, viewQueries: [{ propertyName: "breadCrumbsElement", first: true, predicate: ["breadCrumbsElement"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (breadcrumbs().length) {\r\n <nav class=\"rdsite-breadcrumbs\" [class.rdsite-breadcrumbs-short]=\"breadcrumbs().length < 3 && !mobileBackView()\" #breadCrumbsElement>\r\n <ol class=\"rdsite-breadcrumbs-list rdsite-breadcrumbs-list-desktop\">\r\n @for (breadcrumb of breadcrumbs(); track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\r\n <li>\r\n @if (!last) {\r\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\r\n @if (first) {\r\n <cura-icon name=\"home\" [color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\r\n }\r\n <span>\r\n {{ breadcrumb.label }}\r\n </span>\r\n </a>\r\n <span class=\"divider\">/</span>\r\n } @else {\r\n <span [class.last-item]=\"last && !first\">\r\n {{ breadcrumb.label }}\r\n </span>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n\r\n <ol class=\"rdsite-breadcrumbs-list rdsite-breadcrumbs-list-mobile\">\r\n @for (breadcrumb of breadcrumbs(); track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\r\n <li>\r\n @if (breadcrumbs().length > 2 && first) {\r\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\r\n <cura-icon name=\"home\" [color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\r\n <span>\r\n {{ breadcrumb.label }}\r\n </span>\r\n </a>\r\n <span class=\"divider\">/</span>\r\n } @else if (index === breadcrumbs().length - 2) {\r\n <cura-icon name=\"arrowLeft\" [color]=\"labelIconColor()\" size=\"16\"></cura-icon>\r\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\r\n <span>\r\n {{ breadcrumb.label }}\r\n </span>\r\n </a>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </nav>\r\n}\r\n", styles: [".rdsite-breadcrumbs *{font-family:var(--font-family)}.rdsite-breadcrumbs-list{display:flex;margin:0;padding:0;list-style:none}.rdsite-breadcrumbs-list li{display:flex;gap:8px}.rdsite-breadcrumbs-list li a{color:var(--label-icon-color);display:flex;gap:4px;text-decoration:none}.rdsite-breadcrumbs-list li a span{text-decoration:underline;font-size:12px;font-weight:var(--font-weight, 500);line-height:16px;letter-spacing:.72px}.rdsite-breadcrumbs-list 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}.rdsite-breadcrumbs-list li span.divider,.rdsite-breadcrumbs-list 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}.rdsite-breadcrumbs-list li span.back{padding:0}.rdsite-breadcrumbs-list-desktop{display:none}@media screen and (min-width: 769px){.rdsite-breadcrumbs-list-desktop{display:flex}}.rdsite-breadcrumbs-list-mobile{display:flex}@media screen and (min-width: 769px){.rdsite-breadcrumbs-list-mobile{display:none}}.rdsite-breadcrumbs-short .rdsite-breadcrumbs-list-desktop{display:flex}.rdsite-breadcrumbs-short .rdsite-breadcrumbs-list-mobile{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: RdsiteLinkDirective, selector: "[rdsitelink]", inputs: ["anchorAdjustment", "anchorExtraAdjustment", "phonemodal"] }, { kind: "component", type: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }] }); }
|
|
106
72
|
}
|
|
107
73
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: BreadcrumbsComponent, decorators: [{
|
|
108
74
|
type: Component,
|
|
109
|
-
args: [{ selector: 'rdsite-breadcrumbs', imports: [CommonModule, RdsiteLinkDirective, CuraIconComponent], template: "@if (breadcrumbs().length) {\r\n <nav class=\"
|
|
75
|
+
args: [{ selector: 'rdsite-breadcrumbs', imports: [CommonModule, RdsiteLinkDirective, CuraIconComponent], template: "@if (breadcrumbs().length) {\r\n <nav class=\"rdsite-breadcrumbs\" [class.rdsite-breadcrumbs-short]=\"breadcrumbs().length < 3 && !mobileBackView()\" #breadCrumbsElement>\r\n <ol class=\"rdsite-breadcrumbs-list rdsite-breadcrumbs-list-desktop\">\r\n @for (breadcrumb of breadcrumbs(); track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\r\n <li>\r\n @if (!last) {\r\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\r\n @if (first) {\r\n <cura-icon name=\"home\" [color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\r\n }\r\n <span>\r\n {{ breadcrumb.label }}\r\n </span>\r\n </a>\r\n <span class=\"divider\">/</span>\r\n } @else {\r\n <span [class.last-item]=\"last && !first\">\r\n {{ breadcrumb.label }}\r\n </span>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n\r\n <ol class=\"rdsite-breadcrumbs-list rdsite-breadcrumbs-list-mobile\">\r\n @for (breadcrumb of breadcrumbs(); track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\r\n <li>\r\n @if (breadcrumbs().length > 2 && first) {\r\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\r\n <cura-icon name=\"home\" [color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\r\n <span>\r\n {{ breadcrumb.label }}\r\n </span>\r\n </a>\r\n <span class=\"divider\">/</span>\r\n } @else if (index === breadcrumbs().length - 2) {\r\n <cura-icon name=\"arrowLeft\" [color]=\"labelIconColor()\" size=\"16\"></cura-icon>\r\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\r\n <span>\r\n {{ breadcrumb.label }}\r\n </span>\r\n </a>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </nav>\r\n}\r\n", styles: [".rdsite-breadcrumbs *{font-family:var(--font-family)}.rdsite-breadcrumbs-list{display:flex;margin:0;padding:0;list-style:none}.rdsite-breadcrumbs-list li{display:flex;gap:8px}.rdsite-breadcrumbs-list li a{color:var(--label-icon-color);display:flex;gap:4px;text-decoration:none}.rdsite-breadcrumbs-list li a span{text-decoration:underline;font-size:12px;font-weight:var(--font-weight, 500);line-height:16px;letter-spacing:.72px}.rdsite-breadcrumbs-list 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}.rdsite-breadcrumbs-list li span.divider,.rdsite-breadcrumbs-list 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}.rdsite-breadcrumbs-list li span.back{padding:0}.rdsite-breadcrumbs-list-desktop{display:none}@media screen and (min-width: 769px){.rdsite-breadcrumbs-list-desktop{display:flex}}.rdsite-breadcrumbs-list-mobile{display:flex}@media screen and (min-width: 769px){.rdsite-breadcrumbs-list-mobile{display:none}}.rdsite-breadcrumbs-short .rdsite-breadcrumbs-list-desktop{display:flex}.rdsite-breadcrumbs-short .rdsite-breadcrumbs-list-mobile{display:none}\n"] }]
|
|
110
76
|
}], ctorParameters: () => [], propDecorators: { labelIconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelIconColor", required: false }] }], fontWeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "fontWeight", required: false }] }], breadcrumbs: [{ type: i0.Input, args: [{ isSignal: true, alias: "breadcrumbs", required: false }] }], mobileBackView: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileBackView", required: false }] }], breadCrumbsElement: [{ type: i0.ViewChild, args: ['breadCrumbsElement', { isSignal: true }] }], hostStyles: [{
|
|
111
77
|
type: HostBinding,
|
|
112
78
|
args: ['style']
|
|
@@ -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 {\r\n AfterViewInit,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n OnDestroy,\r\n PLATFORM_ID,\r\n DOCUMENT,\r\n HostBinding,\r\n input,\r\n viewChild,\r\n inject,\r\n signal,\r\n effect,\r\n} from '@angular/core';\r\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\r\nimport * as he from 'he';\r\nimport { BreadcrumbsItems, RdsiteLinkDirective, BreadcrumbsJsonItem, LIB_CONFIG, LibConfig } from '@rededor/site-front-end-lib/core';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { MediaQueries } from '@rededor/site-front-end-lib/shared';\r\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\r\n\r\n@Component({\r\n selector: 'rdsite-breadcrumbs',\r\n imports: [CommonModule, RdsiteLinkDirective, CuraIconComponent],\r\n templateUrl: './breadcrumbs.component.html',\r\n styleUrl: './breadcrumbs.component.scss',\r\n})\r\nexport class BreadcrumbsComponent implements AfterViewInit, OnDestroy {\r\n private curaApiService = inject(CuraApiService);\r\n private libConfig = inject<LibConfig>(LIB_CONFIG);\r\n private document = inject<Document>(DOCUMENT);\r\n private cdr: ChangeDetectorRef = inject(ChangeDetectorRef);\r\n private readonly platformId = inject(PLATFORM_ID);\r\n\r\n readonly labelIconColor = input<string>('neutral-purewhite');\r\n readonly fontWeight = input<string>('');\r\n readonly breadcrumbs = input<BreadcrumbsItems[]>([]);\r\n readonly mobileBackView = input<boolean>(false);\r\n\r\n readonly isDesktop = signal<boolean | null>(null);\r\n\r\n private breadcrumbsJsonTag!: HTMLScriptElement;\r\n private readonly breadcrumbsJsonTagId = 'breadcrumbsJSON';\r\n private resizeObserver!: ResizeObserver;\r\n\r\n readonly breadCrumbsElement = viewChild.required<ElementRef<HTMLDivElement>>('breadCrumbsElement');\r\n\r\n @HostBinding('style') get hostStyles() {\r\n const color = this.labelIconColor();\r\n const disabledColor = color?.includes('neutral') ? 'primary-lighter' : 'neutral-dark';\r\n\r\n return {\r\n '--font-family': this.curaApiService.theme.fonts.getFamily(''),\r\n '--label-icon-color': this.curaApiService.theme.colors.getColor(color),\r\n '--divider-color': this.curaApiService.theme.colors.getColor('neutral-light'),\r\n '--disabled-color': this.curaApiService.theme.colors.getColor(disabledColor),\r\n '--font-weight': this.fontWeight() || null,\r\n };\r\n }\r\n\r\n constructor() {\r\n effect(() => {\r\n if (this.breadcrumbs().length) {\r\n this.setBreadcrumbsJson(this.breadcrumbs());\r\n }\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.initViewportDetection();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.resizeObserver?.disconnect();\r\n }\r\n\r\n private initViewportDetection(): void {\r\n if (!isPlatformBrowser(this.platformId)) {\r\n this.isDesktop.set(true);\r\n return;\r\n }\r\n\r\n this.checkViewportSize();\r\n this.setupResizeObserver();\r\n }\r\n\r\n private setupResizeObserver(): void {\r\n this.resizeObserver = new ResizeObserver(() => {\r\n this.checkViewportSize();\r\n });\r\n\r\n this.resizeObserver.observe(document.body);\r\n }\r\n\r\n private checkViewportSize(): void {\r\n if (!isPlatformBrowser(this.platformId)) return;\r\n const newValue = window.innerWidth > MediaQueries.smallBreakpoint;\r\n if (this.isDesktop() !== newValue) {\r\n this.isDesktop.set(newValue);\r\n this.cdr.detectChanges();\r\n }\r\n }\r\n\r\n getUrl(urls: string[] = []): string {\r\n return urls.join('');\r\n }\r\n\r\n private setBreadcrumbsJson(items: BreadcrumbsItems[]): void {\r\n this.breadcrumbsJsonTag = this.getBreadcrumbsJSONTag();\r\n const json = {\r\n '@context': 'http://schema.org',\r\n '@type': 'BreadcrumbList',\r\n itemListElement: this.getJsonBreadcrumbItems(items),\r\n };\r\n this.breadcrumbsJsonTag.innerHTML = JSON.stringify(json);\r\n }\r\n\r\n private getBreadcrumbsJSONTag(): HTMLScriptElement {\r\n const existingTag = this.document.getElementById(this.breadcrumbsJsonTagId) as HTMLScriptElement;\r\n return existingTag || this.createBreadcrumbsJSONTag();\r\n }\r\n\r\n private createBreadcrumbsJSONTag(): HTMLScriptElement {\r\n const tag = this.document.createElement('script');\r\n tag.id = this.breadcrumbsJsonTagId;\r\n tag.type = 'application/ld+json';\r\n this.document.head.appendChild(tag);\r\n return tag;\r\n }\r\n\r\n private getJsonBreadcrumbItems(items: BreadcrumbsItems[]): BreadcrumbsJsonItem[] {\r\n return items.map((item, i) => ({\r\n '@type': 'ListItem',\r\n position: i + 1,\r\n item: {\r\n '@id': `${this.libConfig.siteUrl.replace(/\\/$/, '')}${this.getUrl(item.url)}`,\r\n name: he.encode(item.label),\r\n },\r\n }));\r\n }\r\n}\r\n","@if (breadcrumbs().length) {\r\n <nav class=\"breadcrumb\" #breadCrumbsElement>\r\n <ol>\r\n @if (isDesktop() !== null && (isDesktop() || (!mobileBackView() && breadcrumbs().length < 3))) {\r\n <ng-container *ngTemplateOutlet=\"Desktop\"></ng-container>\r\n } @else if (isDesktop() !== null) {\r\n <ng-container *ngTemplateOutlet=\"Mobile\"></ng-container>\r\n }\r\n </ol>\r\n </nav>\r\n}\r\n\r\n<ng-template #Desktop>\r\n @for (breadcrumb of breadcrumbs(); track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\r\n <li>\r\n @if (!last) {\r\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\r\n @if (first) {\r\n <cura-icon name=\"home\" [color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\r\n }\r\n <span>\r\n {{ breadcrumb.label }}\r\n </span>\r\n </a>\r\n <span class=\"divider\">/</span>\r\n } @else {\r\n <span [class.last-item]=\"last && !first\">\r\n {{ breadcrumb.label }}\r\n </span>\r\n }\r\n </li>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #Mobile>\r\n @for (breadcrumb of breadcrumbs(); track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\r\n <li>\r\n @if (breadcrumbs().length > 2 && first) {\r\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\r\n <cura-icon name=\"home\" [color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\r\n <span>\r\n {{ breadcrumb.label }}\r\n </span>\r\n </a>\r\n <span class=\"divider\">/</span>\r\n } @else if (index === breadcrumbs().length - 2) {\r\n <cura-icon name=\"arrowLeft\" [color]=\"labelIconColor()\" size=\"16\"></cura-icon>\r\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\r\n <span>\r\n {{ breadcrumb.label }}\r\n </span>\r\n </a>\r\n }\r\n </li>\r\n }\r\n</ng-template>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MA4Ba,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A,kwBAAA,CAAA,EAAA;4gBAsBc,oBAAoB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA;sBAEhG,WAAW;uBAAC,OAAO;;;AEhDtB;;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 { Component, DOCUMENT, HostBinding, input, viewChild, inject, effect, ElementRef } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport * as he from 'he';\r\nimport { BreadcrumbsItems, RdsiteLinkDirective, BreadcrumbsJsonItem, LIB_CONFIG, LibConfig } from '@rededor/site-front-end-lib/core';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\r\n\r\n@Component({\r\n selector: 'rdsite-breadcrumbs',\r\n imports: [CommonModule, RdsiteLinkDirective, CuraIconComponent],\r\n templateUrl: './breadcrumbs.component.html',\r\n styleUrl: './breadcrumbs.component.scss',\r\n})\r\nexport class BreadcrumbsComponent {\r\n private curaApiService = inject(CuraApiService);\r\n private libConfig = inject<LibConfig>(LIB_CONFIG);\r\n private document = inject<Document>(DOCUMENT);\r\n\r\n readonly labelIconColor = input<string>('neutral-purewhite');\r\n readonly fontWeight = input<string>('');\r\n readonly breadcrumbs = input<BreadcrumbsItems[]>([]);\r\n readonly mobileBackView = input<boolean>(false);\r\n\r\n private breadcrumbsJsonTag!: HTMLScriptElement;\r\n private readonly breadcrumbsJsonTagId = 'breadcrumbsJSON';\r\n\r\n readonly breadCrumbsElement = viewChild.required<ElementRef<HTMLElement>>('breadCrumbsElement');\r\n\r\n @HostBinding('style') get hostStyles() {\r\n const color = this.labelIconColor();\r\n const disabledColor = color?.includes('neutral') ? 'primary-lighter' : 'neutral-dark';\r\n\r\n return {\r\n '--font-family': this.curaApiService.theme.fonts.getFamily(''),\r\n '--label-icon-color': this.curaApiService.theme.colors.getColor(color),\r\n '--divider-color': this.curaApiService.theme.colors.getColor('neutral-light'),\r\n '--disabled-color': this.curaApiService.theme.colors.getColor(disabledColor),\r\n '--font-weight': this.fontWeight() || null,\r\n };\r\n }\r\n\r\n constructor() {\r\n effect(() => {\r\n if (this.breadcrumbs().length) {\r\n this.setBreadcrumbsJson(this.breadcrumbs());\r\n }\r\n });\r\n }\r\n\r\n getUrl(urls: string[] = []): string {\r\n return urls.join('');\r\n }\r\n\r\n private setBreadcrumbsJson(items: BreadcrumbsItems[]): void {\r\n this.breadcrumbsJsonTag = this.getBreadcrumbsJSONTag();\r\n const json = {\r\n '@context': 'http://schema.org',\r\n '@type': 'BreadcrumbList',\r\n itemListElement: this.getJsonBreadcrumbItems(items),\r\n };\r\n this.breadcrumbsJsonTag.innerHTML = JSON.stringify(json);\r\n }\r\n\r\n private getBreadcrumbsJSONTag(): HTMLScriptElement {\r\n const existingTag = this.document.getElementById(this.breadcrumbsJsonTagId) as HTMLScriptElement;\r\n return existingTag || this.createBreadcrumbsJSONTag();\r\n }\r\n\r\n private createBreadcrumbsJSONTag(): HTMLScriptElement {\r\n const tag = this.document.createElement('script');\r\n tag.id = this.breadcrumbsJsonTagId;\r\n tag.type = 'application/ld+json';\r\n this.document.head.appendChild(tag);\r\n return tag;\r\n }\r\n\r\n private getJsonBreadcrumbItems(items: BreadcrumbsItems[]): BreadcrumbsJsonItem[] {\r\n return items.map((item, i) => ({\r\n '@type': 'ListItem',\r\n position: i + 1,\r\n item: {\r\n '@id': `${this.libConfig.siteUrl.replace(/\\/$/, '')}${this.getUrl(item.url)}`,\r\n name: he.encode(item.label),\r\n },\r\n }));\r\n }\r\n}\r\n","@if (breadcrumbs().length) {\r\n <nav class=\"rdsite-breadcrumbs\" [class.rdsite-breadcrumbs-short]=\"breadcrumbs().length < 3 && !mobileBackView()\" #breadCrumbsElement>\r\n <ol class=\"rdsite-breadcrumbs-list rdsite-breadcrumbs-list-desktop\">\r\n @for (breadcrumb of breadcrumbs(); track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\r\n <li>\r\n @if (!last) {\r\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\r\n @if (first) {\r\n <cura-icon name=\"home\" [color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\r\n }\r\n <span>\r\n {{ breadcrumb.label }}\r\n </span>\r\n </a>\r\n <span class=\"divider\">/</span>\r\n } @else {\r\n <span [class.last-item]=\"last && !first\">\r\n {{ breadcrumb.label }}\r\n </span>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n\r\n <ol class=\"rdsite-breadcrumbs-list rdsite-breadcrumbs-list-mobile\">\r\n @for (breadcrumb of breadcrumbs(); track breadcrumb.label; let first = $first; let last = $last; let index = $index) {\r\n <li>\r\n @if (breadcrumbs().length > 2 && first) {\r\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\r\n <cura-icon name=\"home\" [color]=\"labelIconColor()\" size=\"16\"> </cura-icon>\r\n <span>\r\n {{ breadcrumb.label }}\r\n </span>\r\n </a>\r\n <span class=\"divider\">/</span>\r\n } @else if (index === breadcrumbs().length - 2) {\r\n <cura-icon name=\"arrowLeft\" [color]=\"labelIconColor()\" size=\"16\"></cura-icon>\r\n <a rdsitelink [href]=\"getUrl(breadcrumb.url)\">\r\n <span>\r\n {{ breadcrumb.label }}\r\n </span>\r\n </a>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </nav>\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAaa,oBAAoB,CAAA;AAe/B,IAAA,IAA0B,UAAU,GAAA;AAClC,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE;AACn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AC,OAAO;;;AE5BtB;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, input, viewChild, viewChildren, HostBinding, Component } from '@angular/core';
|
|
3
|
-
import { NguCarousel, NguItemComponent, NguCarouselDefDirective } from '@ngu
|
|
2
|
+
import { inject, input, signal, viewChild, viewChildren, HostBinding, Component } from '@angular/core';
|
|
3
|
+
import { NguCarousel, NguItemComponent, NguCarouselDefDirective } from '@rededor/ngu-carousel';
|
|
4
4
|
import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
|
|
5
5
|
import { NguCarouselService } from '@rededor/site-front-end-lib/services/ngu-carousel';
|
|
6
6
|
import { TestimonialCardComponent } from '@rededor/site-front-end-lib/components/cards';
|
|
@@ -12,7 +12,7 @@ class TestimonialsCarouselComponent {
|
|
|
12
12
|
this.nguService = inject(NguCarouselService);
|
|
13
13
|
this.title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
14
14
|
this.items = input([], ...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
15
|
-
this.carouselTestimonialsConfig = this.nguService.customCarouselConfig({
|
|
15
|
+
this.carouselTestimonialsConfig = signal(this.nguService.customCarouselConfig({
|
|
16
16
|
grid: { xs: 1, sm: 1, md: 1, lg: 1.1, all: 0 },
|
|
17
17
|
gridBreakpoints: { sm: 360, md: 768, lg: 1024, xl: 1920 },
|
|
18
18
|
loop: true,
|
|
@@ -20,7 +20,7 @@ class TestimonialsCarouselComponent {
|
|
|
20
20
|
timing: 600000,
|
|
21
21
|
initialDelay: 600000,
|
|
22
22
|
},
|
|
23
|
-
});
|
|
23
|
+
}), ...(ngDevMode ? [{ debugName: "carouselTestimonialsConfig" }] : []));
|
|
24
24
|
this.carouselTestimonials = viewChild.required('carouselTestimonialsEl');
|
|
25
25
|
this.testimonialCards = viewChildren('testimonialCard', ...(ngDevMode ? [{ debugName: "testimonialCards" }] : []));
|
|
26
26
|
this.styleBinding = {
|
|
@@ -29,17 +29,6 @@ class TestimonialsCarouselComponent {
|
|
|
29
29
|
'--font-family': this.curaApiService.theme.fonts.getFamily(''),
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
ngOnInit() {
|
|
33
|
-
this.carouselTestimonialsConfig.set(this.nguService.customCarouselConfig({
|
|
34
|
-
grid: { xs: 1, sm: 1, md: 1, lg: 1.1, all: 0 },
|
|
35
|
-
gridBreakpoints: { sm: 360, md: 768, lg: 1024, xl: 1920 },
|
|
36
|
-
loop: true,
|
|
37
|
-
interval: {
|
|
38
|
-
timing: 600000,
|
|
39
|
-
initialDelay: 600000,
|
|
40
|
-
},
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
32
|
nextSlide() {
|
|
44
33
|
this.nguService.scrollRight(this.carouselTestimonials());
|
|
45
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-components-carousels.mjs","sources":["../../../projects/site-front-end-lib/components/carousels/testimonials-carousel/testimonials-carousel.component.ts","../../../projects/site-front-end-lib/components/carousels/testimonials-carousel/testimonials-carousel.component.html","../../../projects/site-front-end-lib/components/carousels/rededor-site-front-end-lib-components-carousels.ts"],"sourcesContent":["import { Component, HostBinding, input,
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-components-carousels.mjs","sources":["../../../projects/site-front-end-lib/components/carousels/testimonials-carousel/testimonials-carousel.component.ts","../../../projects/site-front-end-lib/components/carousels/testimonials-carousel/testimonials-carousel.component.html","../../../projects/site-front-end-lib/components/carousels/rededor-site-front-end-lib-components-carousels.ts"],"sourcesContent":["import { Component, HostBinding, input, signal, viewChild, viewChildren, inject } from '@angular/core';\nimport { NguCarousel, NguCarouselConfig, NguCarouselDefDirective, NguItemComponent } from '@rededor/ngu-carousel';\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\nimport { NguCarouselService } from '@rededor/site-front-end-lib/services/ngu-carousel';\nimport { TestimonialCardComponent } from '@rededor/site-front-end-lib/components/cards';\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\n\n@Component({\n selector: 'rdsite-testimonials-carousel',\n imports: [NguCarousel, NguItemComponent, NguCarouselDefDirective, TestimonialCardComponent, CuraIconComponent],\n templateUrl: './testimonials-carousel.component.html',\n styleUrls: ['./testimonials-carousel.component.scss'],\n})\nexport class TestimonialsCarouselComponent {\n private readonly curaApiService = inject(CuraApiService);\n private nguService = inject(NguCarouselService);\n\n title = input('');\n items = input<any[] | null>([]);\n\n readonly carouselTestimonialsConfig = signal<NguCarouselConfig>(\n this.nguService.customCarouselConfig({\n grid: { xs: 1, sm: 1, md: 1, lg: 1.1, all: 0 },\n gridBreakpoints: { sm: 360, md: 768, lg: 1024, xl: 1920 },\n loop: true,\n interval: {\n timing: 600000,\n initialDelay: 600000,\n },\n }),\n );\n\n readonly carouselTestimonials = viewChild.required<NguCarousel<any[]>>('carouselTestimonialsEl');\n readonly testimonialCards = viewChildren<TestimonialCardComponent>('testimonialCard');\n\n @HostBinding('style') styleBinding = {\n '--neutral-purewhite': this.curaApiService.theme.colors.getColor('neutral-purewhite'),\n '--neutral-black': this.curaApiService.theme.colors.getColor('neutral-black'),\n '--font-family': this.curaApiService.theme.fonts.getFamily(''),\n };\n\n nextSlide(): void {\n this.nguService.scrollRight(this.carouselTestimonials());\n }\n\n prevSlide(): void {\n this.nguService.scrollLeft(this.carouselTestimonials());\n }\n\n moveTo(pointerNumber: number): void {\n this.nguService.moveTo(this.carouselTestimonials(), pointerNumber);\n }\n\n stopVideos(): void {\n this.testimonialCards().forEach((card) => {\n if (card.type() === 'video') {\n card.stopVideo();\n }\n });\n }\n}\n","@if (title()) {\r\n <h3 class=\"testimonials-carousel-title\">{{ title() }}</h3>\r\n}\r\n\r\n<ngu-carousel #carouselTestimonialsEl [inputs]=\"carouselTestimonialsConfig()!\" [dataSource]=\"items()\" (onMove)=\"stopVideos()\">\r\n <ngu-item *nguCarouselDef=\"let item\">\r\n <rdsite-testimonial-card\r\n #testimonialCard\r\n [type]=\"item.type\"\r\n [image]=\"item.image\"\r\n [videoUrl]=\"item.video_url\"\r\n [text]=\"item.text\"\r\n [author]=\"item.author\"\r\n [position]=\"item.role\"\r\n >\r\n </rdsite-testimonial-card>\r\n </ngu-item>\r\n</ngu-carousel>\r\n\r\n<div class=\"testimonials-carousel-controls\">\r\n <cura-icon name=\"arrowLeftCircle\" size=\"40\" color=\"primary-base\" (click)=\"prevSlide()\"></cura-icon>\r\n\r\n <cura-icon name=\"arrowRightCircle\" size=\"40\" color=\"primary-base\" (click)=\"nextSlide()\"></cura-icon>\r\n\r\n <ul>\r\n @for (item of carouselTestimonials().pointNumbers(); track i; let i = $index) {\r\n <li [class.active]=\"i === carouselTestimonials().activePoint()\" (click)=\"moveTo(i)\"></li>\r\n }\r\n </ul>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAaa,6BAA6B,CAAA;AAN1C,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAChD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAE/C,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,EAAE,iDAAC;AACjB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAe,EAAE,iDAAC;QAEtB,IAAA,CAAA,0BAA0B,GAAG,MAAM,CAC1C,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC;YACnC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE;AAC9C,YAAA,eAAe,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE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AA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA;sBAEnF,WAAW;uBAAC,OAAO;;;AEnCtB;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isPlatformBrowser } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, PLATFORM_ID, input, output, viewChild, HostBinding, HostListener, Component } from '@angular/core';
|
|
4
|
-
import { NguCarousel, NguItemComponent, NguCarouselDefDirective } from '@ngu
|
|
4
|
+
import { NguCarousel, NguItemComponent, NguCarouselDefDirective } from '@rededor/ngu-carousel';
|
|
5
5
|
import { RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';
|
|
6
6
|
import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
|
|
7
7
|
import { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-components-cta-wrapper.mjs","sources":["../../../projects/site-front-end-lib/components/cta-wrapper/cta-wrapper.component.ts","../../../projects/site-front-end-lib/components/cta-wrapper/cta-wrapper.component.html","../../../projects/site-front-end-lib/components/cta-wrapper/rededor-site-front-end-lib-components-cta-wrapper.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-components-cta-wrapper.mjs","sources":["../../../projects/site-front-end-lib/components/cta-wrapper/cta-wrapper.component.ts","../../../projects/site-front-end-lib/components/cta-wrapper/cta-wrapper.component.html","../../../projects/site-front-end-lib/components/cta-wrapper/rededor-site-front-end-lib-components-cta-wrapper.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { Component, HostBinding, HostListener, OnInit, PLATFORM_ID, input, viewChild, inject, output } from '@angular/core';\nimport { NguCarousel, NguCarouselConfig, NguCarouselDefDirective, NguItemComponent } from '@rededor/ngu-carousel';\nimport { CtaWrapper, RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\nimport { NguCarouselService } from '@rededor/site-front-end-lib/services/ngu-carousel';\nimport { MediaQueries } from '@rededor/site-front-end-lib/shared';\n\n@Component({\n selector: 'rdsite-cta-wrapper',\n imports: [NguCarousel, NguItemComponent, NguCarouselDefDirective, RdsiteLinkDirective, CuraIconComponent],\n templateUrl: './cta-wrapper.component.html',\n styleUrl: './cta-wrapper.component.scss',\n})\nexport class CtaWrapperComponent implements OnInit {\n private readonly curaApiService = inject(CuraApiService);\n private nguService = inject(NguCarouselService);\n private readonly platformId = inject(PLATFORM_ID);\n\n readonly content = input<CtaWrapper | null>(null);\n readonly showTitleAndText = input(true);\n readonly colors = input<{\n border: string;\n icon: string;\n }>({ border: 'primary-base', icon: 'primary-dark' });\n\n readonly ctaWrapperItemClick = output<Event>();\n\n carouselCtasConfig!: NguCarouselConfig;\n\n bannerControl = false;\n seeMoreControl = false;\n\n readonly nguCarouselCtas = viewChild.required<NguCarousel<any, any>>('nguCarouselCtas');\n\n @HostListener('window:resize')\n onWindowResize() {\n if (isPlatformBrowser(this.platformId)) {\n this.bannerControl = window.innerWidth > MediaQueries.smallBreakpoint;\n }\n }\n\n @HostBinding('style')\n get style(): { [key: string]: string } {\n return {\n '--font-family': this.curaApiService.theme.fonts.getFamily('') ?? '',\n '--border-color': this.curaApiService.theme.colors.getColor(this.colors().border) ?? '',\n '--icon-color': this.curaApiService.theme.colors.getColor(this.colors().icon) ?? '',\n };\n }\n\n @HostBinding('class') class = ['rdsite-container'];\n\n ngOnInit(): void {\n if (isPlatformBrowser(this.platformId)) {\n this.bannerControl = window.innerWidth > MediaQueries.smallBreakpoint;\n }\n\n this.carouselCtasConfig = this.nguService.customCarouselConfig({\n grid: { xs: 2.1, sm: 2.1, md: 2.1, lg: 2.1, all: 0 },\n loop: true,\n interval: {\n timing: 600000,\n initialDelay: 600000,\n },\n });\n }\n\n moreOptions(): void {\n this.seeMoreControl = !this.seeMoreControl;\n }\n\n ctaWrapperItemClicked(event: Event) {\n this.ctaWrapperItemClick.emit(event);\n }\n}\n","@if (content()?.ctas?.length) {\r\n @if (content()?.title && showTitleAndText()) {\r\n <h3 class=\"ctas-title\">{{ content()?.title }}</h3>\r\n }\r\n\r\n @if (content()?.text && showTitleAndText()) {\r\n <p class=\"ctas-text\" [innerHTML]=\"content()?.text\"></p>\r\n }\r\n\r\n @if (!seeMoreControl) {\r\n <nav class=\"ctas-wrapper\" data-testid=\"_rdsite-ctas-wrapper\">\r\n @if (!bannerControl) {\r\n <ngu-carousel #nguCarouselCtas [inputs]=\"carouselCtasConfig\" [dataSource]=\"content()?.ctas\">\r\n <ngu-item *nguCarouselDef=\"let cta; let i = index\">\r\n <a rdsitelink class=\"cta\" [href]=\"cta?.link\" (click)=\"ctaWrapperItemClicked($event)\">\r\n @if (cta?.icon) {\r\n <cura-icon [name]=\"cta.icon\" size=\"24\" [color]=\"colors().icon\"></cura-icon>\r\n }\r\n <p>{{ cta?.label }}</p>\r\n </a>\r\n </ngu-item>\r\n </ngu-carousel>\r\n\r\n <div class=\"show-more\" data-testid=\"_rdsite-ctas-wrapper-show-more\">\r\n <button type=\"button\" (click)=\"moreOptions()\">Mais opções</button>\r\n </div>\r\n } @else {\r\n @for (cta of content()?.ctas; track $index) {\r\n @if (cta?.label) {\r\n <a rdsitelink class=\"cta\" [href]=\"cta?.link\" (click)=\"ctaWrapperItemClicked($event)\">\r\n @if (cta?.icon) {\r\n <cura-icon [name]=\"cta.icon\" size=\"24\" [color]=\"colors().icon\"></cura-icon>\r\n }\r\n <p>{{ cta?.label }}</p>\r\n </a>\r\n }\r\n }\r\n }\r\n </nav>\r\n } @else {\r\n <nav class=\"more-options\" data-testid=\"_rdsite-ctas-wrapper-more-options\">\r\n @for (cta of content()?.ctas; track $index) {\r\n @if (cta?.label) {\r\n <a rdsitelink class=\"cta\" [href]=\"cta?.link\" (click)=\"ctaWrapperItemClicked($event)\">\r\n @if (cta?.icon) {\r\n <cura-icon [name]=\"cta.icon\" size=\"24\" [color]=\"colors().icon\"></cura-icon>\r\n }\r\n <p>{{ cta?.label }}</p>\r\n </a>\r\n }\r\n }\r\n </nav>\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAea,mBAAmB,CAAA;AANhC,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAChD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC9B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAExC,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAoB,IAAI,mDAAC;AACxC,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAC,IAAI,4DAAC;AAC9B,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAGpB,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,EAAE,kDAAC;QAE3C,IAAA,CAAA,mBAAmB,GAAG,MAAM,EAAS;QAI9C,IAAA,CAAA,aAAa,GAAG,KAAK;QACrB,IAAA,CAAA,cAAc,GAAG,KAAK;AAEb,QAAA,IAAA,CAAA,eAAe,GAAG,SAAS,CAAC,QAAQ,CAAwB,iBAAiB,CAAC;AAkBjE,QAAA,IAAA,CAAA,KAAK,GAAG,CAAC,kBAAkB,CAAC;AAwBnD,IAAA;IAvCC,cAAc,GAAA;AACZ,QAAA,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACtC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,UAAU,GAAG,YAAY,CAAC,eAAe;QACvE;IACF;AAEA,IAAA,IACI,KAAK,GAAA;QACP,OAAO;AACL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,EAAE,gBAAgB,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,uBAAuB,EAAA,QAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,kBAAA,EAAA,uBAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,iBAAiB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAI7F,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,SAAS;+BACE,oBAAoB,EAAA,OAAA,EACrB,CAAC,WAAW,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,iBAAiB,CAAC,EAAA,QAAA,EAAA,4pEAAA,EAAA,MAAA,EAAA,CAAA,0tDAAA,CAAA,EAAA;kcAuBpC,iBAAiB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,cAAA,EAAA,CAAA;sBAErF,YAAY;uBAAC,eAAe;;sBAO5B,WAAW;uBAAC,OAAO;;sBASnB,WAAW;uBAAC,OAAO;;;AEpDtB;;AAEG;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, HostBinding, Component, input, output } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
3
|
import { CommonModule } from '@angular/common';
|
|
5
4
|
import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
|
|
6
5
|
import { RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';
|
|
@@ -15,11 +14,11 @@ class SideCtasComponent {
|
|
|
15
14
|
};
|
|
16
15
|
}
|
|
17
16
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: SideCtasComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: SideCtasComponent, isStandalone: true, selector: "rdsite-side-ctas", host: { properties: { "style": "this.style" } }, ngImport: i0, template: "<div
|
|
17
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: SideCtasComponent, isStandalone: true, selector: "rdsite-side-ctas", host: { properties: { "style": "this.style" } }, ngImport: i0, template: "<div class=\"rdsite-side-ctas-right\">\r\n <div class=\"rdsite-side-ctas-right-top\">\r\n <ng-content select=\"rdsite-side-ctas-right-top\"></ng-content>\r\n </div>\r\n <div class=\"rdsite-side-ctas-right-middle\">\r\n <ng-content select=\"rdsite-side-ctas-right-middle\"></ng-content>\r\n </div>\r\n <div class=\"rdsite-side-ctas-right-bottom\">\r\n <ng-content select=\"rdsite-side-ctas-right-bottom\"></ng-content>\r\n </div>\r\n</div>\r\n\r\n<div class=\"rdsite-side-ctas-bottom\">\r\n <div class=\"rdsite-side-ctas-bottom-container\">\r\n <ng-content select=\"rdsite-side-ctas-bottom\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: [":host{position:sticky;bottom:0;right:0;display:block;z-index:3003;pointer-events:none}@media only screen and (min-width: 1024px){:host{margin-top:-88px}}.rdsite-side-ctas-right{position:absolute;bottom:0;right:0;height:min-content;width:88px;background-color:var(--color-right);display:none;flex-direction:column;justify-content:space-between;align-items:center;pointer-events:auto}.rdsite-side-ctas-right:has(rdsite-side-ctas-right-top),.rdsite-side-ctas-right:has(rdsite-side-ctas-right-middle),.rdsite-side-ctas-right:has(rdsite-side-ctas-right-bottom){display:flex}.rdsite-side-ctas-right-middle{display:flex;flex-grow:1;align-items:center}.rdsite-side-ctas-bottom{display:none;justify-content:flex-end;padding-right:0;background-color:transparent;height:88px}.rdsite-side-ctas-bottom:has(rdsite-side-ctas-bottom){display:flex}.rdsite-side-ctas-bottom-container{pointer-events:auto;width:100%}:host:has(.rdsite-side-ctas-right rdsite-side-ctas-right-top) .rdsite-side-ctas-bottom,:host:has(.rdsite-side-ctas-right rdsite-side-ctas-right-middle) .rdsite-side-ctas-bottom,:host:has(.rdsite-side-ctas-right rdsite-side-ctas-right-bottom) .rdsite-side-ctas-bottom{padding-right:88px}@media only screen and (min-width: 1024px){.rdsite-side-ctas-right{height:calc(100vh - 80px)}.rdsite-side-ctas-bottom-container{width:fit-content;gap:10px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
19
18
|
}
|
|
20
19
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: SideCtasComponent, decorators: [{
|
|
21
20
|
type: Component,
|
|
22
|
-
args: [{ selector: 'rdsite-side-ctas', imports: [CommonModule], template: "<div
|
|
21
|
+
args: [{ selector: 'rdsite-side-ctas', imports: [CommonModule], template: "<div class=\"rdsite-side-ctas-right\">\r\n <div class=\"rdsite-side-ctas-right-top\">\r\n <ng-content select=\"rdsite-side-ctas-right-top\"></ng-content>\r\n </div>\r\n <div class=\"rdsite-side-ctas-right-middle\">\r\n <ng-content select=\"rdsite-side-ctas-right-middle\"></ng-content>\r\n </div>\r\n <div class=\"rdsite-side-ctas-right-bottom\">\r\n <ng-content select=\"rdsite-side-ctas-right-bottom\"></ng-content>\r\n </div>\r\n</div>\r\n\r\n<div class=\"rdsite-side-ctas-bottom\">\r\n <div class=\"rdsite-side-ctas-bottom-container\">\r\n <ng-content select=\"rdsite-side-ctas-bottom\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: [":host{position:sticky;bottom:0;right:0;display:block;z-index:3003;pointer-events:none}@media only screen and (min-width: 1024px){:host{margin-top:-88px}}.rdsite-side-ctas-right{position:absolute;bottom:0;right:0;height:min-content;width:88px;background-color:var(--color-right);display:none;flex-direction:column;justify-content:space-between;align-items:center;pointer-events:auto}.rdsite-side-ctas-right:has(rdsite-side-ctas-right-top),.rdsite-side-ctas-right:has(rdsite-side-ctas-right-middle),.rdsite-side-ctas-right:has(rdsite-side-ctas-right-bottom){display:flex}.rdsite-side-ctas-right-middle{display:flex;flex-grow:1;align-items:center}.rdsite-side-ctas-bottom{display:none;justify-content:flex-end;padding-right:0;background-color:transparent;height:88px}.rdsite-side-ctas-bottom:has(rdsite-side-ctas-bottom){display:flex}.rdsite-side-ctas-bottom-container{pointer-events:auto;width:100%}:host:has(.rdsite-side-ctas-right rdsite-side-ctas-right-top) .rdsite-side-ctas-bottom,:host:has(.rdsite-side-ctas-right rdsite-side-ctas-right-middle) .rdsite-side-ctas-bottom,:host:has(.rdsite-side-ctas-right rdsite-side-ctas-right-bottom) .rdsite-side-ctas-bottom{padding-right:88px}@media only screen and (min-width: 1024px){.rdsite-side-ctas-right{height:calc(100vh - 80px)}.rdsite-side-ctas-bottom-container{width:fit-content;gap:10px}}\n"] }]
|
|
23
22
|
}], propDecorators: { style: [{
|
|
24
23
|
type: HostBinding,
|
|
25
24
|
args: ['style']
|