@rededor/site-front-end-lib 20.0.36 → 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 +13 -0
- 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-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-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.
|
|
@@ -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,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,EAAE,EAAE,IAAI,EAAE;AACzD,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,QAAQ,EAAE;AACR,gBAAA,MAAM,EAAE,MAAM;AACd,gBAAA,YAAY,EAAE,MAAM;AACrB,aAAA;A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
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>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AAA,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-services-ngu-carousel.mjs","sources":["../../../projects/site-front-end-lib/services/ngu-carousel/ngu-carousel.service.ts","../../../projects/site-front-end-lib/services/ngu-carousel/rededor-site-front-end-lib-services-ngu-carousel.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-services-ngu-carousel.mjs","sources":["../../../projects/site-front-end-lib/services/ngu-carousel/ngu-carousel.service.ts","../../../projects/site-front-end-lib/services/ngu-carousel/rededor-site-front-end-lib-services-ngu-carousel.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { NguCarousel, NguCarouselConfig } from '@rededor/ngu-carousel';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NguCarouselService {\n private _defaultCarouselConfig: NguCarouselConfig = {\n grid: { xs: 1.2, sm: 1.2, md: 3.2, lg: 4.2, xl: 5.2, all: 0 },\n gridBreakpoints: { sm: 360, md: 768, lg: 1366, xl: 1920 },\n slide: 1,\n speed: 500,\n interval: {\n timing: 7000,\n initialDelay: 1000,\n },\n point: {\n visible: false,\n },\n velocity: 0.5,\n load: 1,\n loop: true,\n touch: true,\n easing: 'ease-in-out',\n };\n get defaultCarouselConfig() {\n return { ...JSON.parse(JSON.stringify(this._defaultCarouselConfig)) };\n }\n\n customCarouselConfig(config: Partial<NguCarouselConfig>) {\n return {\n ...this.defaultCarouselConfig,\n ...config,\n };\n }\n\n moveTo(carousel: NguCarousel<any, any>, index: number) {\n carousel.moveTo(index);\n }\n\n scrollLeft(carousel: NguCarousel<any, any>, loop = true) {\n if (carousel.isFirst() || carousel.activePoint() < 1) {\n if (loop) {\n carousel.moveTo(carousel.pointNumbers()[carousel.pointNumbers().length - 1]);\n }\n } else {\n carousel.moveTo(carousel.activePoint() - 1);\n }\n }\n\n scrollRight(carousel: NguCarousel<any, any>, loop = true) {\n if (carousel.isLast() || carousel.activePoint() > carousel.pointNumbers().length - 1) {\n if (loop) {\n carousel.moveTo(0);\n }\n } else {\n carousel.moveTo(carousel.activePoint() + 1);\n }\n }\n\n needShowControls(config: NguCarouselConfig, width: number, itemsLength: number = 0) {\n const {\n grid: { xs, sm, md, lg, xl },\n gridBreakpoints,\n } = config;\n if (width > (gridBreakpoints?.xl ?? 0)) {\n return itemsLength > (xl ?? 0);\n }\n if (width > (gridBreakpoints?.lg ?? 0)) {\n return itemsLength > lg;\n }\n if (width > (gridBreakpoints?.md ?? 0)) {\n return itemsLength > md;\n }\n if (width > (gridBreakpoints?.sm ?? 0)) {\n return itemsLength > sm;\n }\n return itemsLength > xs;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":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IAAI,KAAK,IAAI,eAAe,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE;YACtC,OAAO,WAAW,GAAG,EAAE;QACzB;QACA,OAAO,WAAW,GAAG,EAAE;IACzB;+GAxEW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFjB,MAAM,EAAA,CAAA,CAAA;;4FAEP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACLD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rededor/site-front-end-lib",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.37-alpha.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^20.3.0",
|
|
6
6
|
"@angular/core": "^20.3.0",
|
|
7
7
|
"@angular/animations": "^20.3.0",
|
|
8
|
-
"@ngu
|
|
8
|
+
"@rededor/ngu-carousel": "^20.0.1",
|
|
9
9
|
"algoliasearch": "^4.0.0",
|
|
10
10
|
"express": "^5.0.0",
|
|
11
11
|
"he": "^1.2.0",
|