@dev-tcloud/tcloud-ui 6.26.0 → 6.26.2
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/docs/tcloud-ui-carousel.md +159 -0
- package/fesm2022/dev-tcloud-tcloud-ui.mjs +389 -2
- package/fesm2022/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/js/tcloud-ui-app.js +2 -2
- package/lib/_modules/tcloud-ui-carousel/tcloud-ui-carousel.component.d.ts +134 -0
- package/lib/tcloud-ui.module.d.ts +54 -53
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/scss/components/custom/table.scss +55 -44
- package/scss/tcloud-ui/styles.scss +1 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# TCloudUiCarousel
|
|
2
|
+
|
|
3
|
+
O componente `tcloud-ui-carousel` exibe conteúdos em formato de carrossel horizontal, com suporte a imagens ou qualquer conteúdo projetado via `ng-content`. Ele foi pensado para banners, cards e blocos visuais simples, mantendo navegação, paginação, autoplay e efeitos configuráveis por atributos.
|
|
4
|
+
|
|
5
|
+
## Características
|
|
6
|
+
|
|
7
|
+
- Projeção de conteúdo via `ng-content`
|
|
8
|
+
- Cada item projetado ocupa 100% da largura disponível do carrossel
|
|
9
|
+
- Navegação por setas sobre a imagem
|
|
10
|
+
- Paginação por indicadores sobre a imagem
|
|
11
|
+
- Autoplay configurável
|
|
12
|
+
- Suporte a efeito `slide` e `fade`
|
|
13
|
+
- Loop opcional
|
|
14
|
+
- Scroll snap opcional
|
|
15
|
+
- Componente standalone
|
|
16
|
+
|
|
17
|
+
## Instalação
|
|
18
|
+
|
|
19
|
+
Importe o componente diretamente em componentes standalone:
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { TCloudUiCarouselComponent } from 'tcloud-ui';
|
|
23
|
+
|
|
24
|
+
@Component({
|
|
25
|
+
standalone: true,
|
|
26
|
+
imports: [TCloudUiCarouselComponent],
|
|
27
|
+
template: `...`
|
|
28
|
+
})
|
|
29
|
+
export class ExemploCarouselComponent {}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Ou utilize pelo `TCloudUiModule`, quando a aplicação já importar o módulo completo da biblioteca.
|
|
33
|
+
|
|
34
|
+
## Uso Básico
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<tcloud-ui-carousel>
|
|
38
|
+
<img src="assets/banner-1.png" alt="Banner 1">
|
|
39
|
+
<img src="assets/banner-2.png" alt="Banner 2">
|
|
40
|
+
<img src="assets/banner-3.png" alt="Banner 3">
|
|
41
|
+
</tcloud-ui-carousel>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Uso com Configurações
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<tcloud-ui-carousel
|
|
48
|
+
autoplay-delay="8000"
|
|
49
|
+
autoplay-disable-on-interaction="false"
|
|
50
|
+
effect="fade"
|
|
51
|
+
loop="true"
|
|
52
|
+
pagination="true"
|
|
53
|
+
pagination-clickable="true"
|
|
54
|
+
navigation="true"
|
|
55
|
+
speed="1000">
|
|
56
|
+
<img src="assets/banner-1.png" alt="Banner 1">
|
|
57
|
+
<img src="assets/banner-2.png" alt="Banner 2">
|
|
58
|
+
</tcloud-ui-carousel>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Controlando a Largura Externamente
|
|
62
|
+
|
|
63
|
+
O carrossel ocupa `100%` da largura do container pai. Para exibir em tamanho menor, controle o wrapper externo:
|
|
64
|
+
|
|
65
|
+
```html
|
|
66
|
+
<div class="carousel-wrapper">
|
|
67
|
+
<tcloud-ui-carousel pagination="true" navigation="true">
|
|
68
|
+
<img src="assets/banner-1.png" alt="Banner 1">
|
|
69
|
+
<img src="assets/banner-2.png" alt="Banner 2">
|
|
70
|
+
</tcloud-ui-carousel>
|
|
71
|
+
</div>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
```scss
|
|
75
|
+
.carousel-wrapper {
|
|
76
|
+
width: 80%;
|
|
77
|
+
max-width: 900px;
|
|
78
|
+
margin: 0 auto;
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Propriedades
|
|
83
|
+
|
|
84
|
+
### Inputs
|
|
85
|
+
|
|
86
|
+
| Propriedade | Tipo | Padrão | Descrição |
|
|
87
|
+
|-------------|------|--------|-----------|
|
|
88
|
+
| `ariaLabel` | `string` | `'Carrossel'` | Texto acessível usado para identificar a região do carrossel para leitores de tela. |
|
|
89
|
+
| `controlsPosition` | `'inside' \| 'outside'` | `'inside'` | Define a posição dos botões. Atualmente o uso principal é `inside`, com setas sobre o conteúdo. |
|
|
90
|
+
| `gap` | `string` | `'0'` | Espaçamento horizontal entre slides. Aceita qualquer valor CSS válido, como `'0'`, `'8px'` ou `'var(--size-16)'`. |
|
|
91
|
+
| `hideScrollbar` | `boolean` | `true` | Oculta a scrollbar horizontal do carrossel. |
|
|
92
|
+
| `scrollBehavior` | `ScrollBehavior` | `'smooth'` | Comportamento nativo do scroll. Aceita `'smooth'`, `'auto'` ou `'instant'`, conforme suporte do navegador. |
|
|
93
|
+
| `snap` | `boolean` | `true` | Faz o scroll encaixar no início de cada slide. Evita que o carrossel pare entre dois slides no efeito `slide`. |
|
|
94
|
+
| `autoplay-delay` | `number` | `0` | Tempo em milissegundos entre as trocas automáticas de slide. Use `0` para desativar autoplay. |
|
|
95
|
+
| `autoplay-disable-on-interaction` | `boolean` | `true` | Define se o autoplay deve parar quando o usuário interagir com setas ou paginação. |
|
|
96
|
+
| `effect` | `'slide' \| 'fade'` | `'slide'` | Tipo de transição visual entre slides. |
|
|
97
|
+
| `loop` | `boolean` | `false` | Permite navegação circular entre os slides. Ao avançar no último, volta para o primeiro. |
|
|
98
|
+
| `pagination` | `boolean` | `false` | Exibe os indicadores de paginação sobre a imagem. |
|
|
99
|
+
| `pagination-clickable` | `boolean` | `true` | Permite clicar nos indicadores para navegar diretamente para um slide. |
|
|
100
|
+
| `navigation` | `boolean` | `true` | Exibe os botões de navegação anterior e próximo sobre a imagem. |
|
|
101
|
+
| `speed` | `number` | `300` | Duração da animação em milissegundos. Afeta a animação customizada de slide e a transição de opacidade no `fade`. |
|
|
102
|
+
|
|
103
|
+
### Outputs
|
|
104
|
+
|
|
105
|
+
| Output | Tipo | Descrição |
|
|
106
|
+
|--------|------|-----------|
|
|
107
|
+
| `activeIndexChange` | `EventEmitter<number>` | Emitido quando o slide ativo muda. Retorna o índice do slide, começando em `0`. |
|
|
108
|
+
|
|
109
|
+
## Exemplos
|
|
110
|
+
|
|
111
|
+
### Com Slide, Paginação e Setas
|
|
112
|
+
|
|
113
|
+
```html
|
|
114
|
+
<tcloud-ui-carousel
|
|
115
|
+
effect="slide"
|
|
116
|
+
pagination="true"
|
|
117
|
+
navigation="true"
|
|
118
|
+
loop="true">
|
|
119
|
+
<img src="assets/banner-1.png" alt="Banner 1">
|
|
120
|
+
<img src="assets/banner-2.png" alt="Banner 2">
|
|
121
|
+
</tcloud-ui-carousel>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Com Fade e Autoplay
|
|
125
|
+
|
|
126
|
+
```html
|
|
127
|
+
<tcloud-ui-carousel
|
|
128
|
+
effect="fade"
|
|
129
|
+
autoplay-delay="5000"
|
|
130
|
+
autoplay-disable-on-interaction="false"
|
|
131
|
+
speed="1000"
|
|
132
|
+
pagination="true">
|
|
133
|
+
<img src="assets/banner-1.png" alt="Banner 1">
|
|
134
|
+
<img src="assets/banner-2.png" alt="Banner 2">
|
|
135
|
+
</tcloud-ui-carousel>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Com Cards
|
|
139
|
+
|
|
140
|
+
```html
|
|
141
|
+
<tcloud-ui-carousel pagination="true" navigation="true">
|
|
142
|
+
<article class="card">
|
|
143
|
+
<h3>Plano Basic</h3>
|
|
144
|
+
<p>Conteúdo do primeiro slide.</p>
|
|
145
|
+
</article>
|
|
146
|
+
|
|
147
|
+
<article class="card">
|
|
148
|
+
<h3>Plano Prime</h3>
|
|
149
|
+
<p>Conteúdo do segundo slide.</p>
|
|
150
|
+
</article>
|
|
151
|
+
</tcloud-ui-carousel>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Observações
|
|
155
|
+
|
|
156
|
+
- Para imagens externas, prefira URLs públicas e estáveis. URLs assinadas com expiração podem fazer o carrossel parecer vazio quando vencerem.
|
|
157
|
+
- Para reduzir a largura visual, use um container externo em vez de alterar estilos internos do componente.
|
|
158
|
+
- No modo `fade`, os slides são sobrepostos e alternados por opacidade.
|
|
159
|
+
- No modo `slide`, o carrossel usa scroll horizontal com suporte a snap.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, EventEmitter, Input, Output, InjectionToken, Optional, Inject, inject, signal, Pipe, forwardRef, ViewChild, input, effect, Directive, ViewEncapsulation, SkipSelf, ChangeDetectionStrategy, HostListener, ChangeDetectorRef, computed, ApplicationRef, output, model, ContentChildren, viewChild, EnvironmentInjector, createComponent, ViewContainerRef, NgModule, makeEnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { Injectable, Component, EventEmitter, Input, Output, InjectionToken, Optional, Inject, inject, signal, Pipe, forwardRef, ViewChild, input, effect, Directive, ViewEncapsulation, SkipSelf, ChangeDetectionStrategy, HostListener, ChangeDetectorRef, computed, ApplicationRef, output, model, numberAttribute, booleanAttribute, HostBinding, ContentChildren, viewChild, EnvironmentInjector, createComponent, ViewContainerRef, NgModule, makeEnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, DatePipe, DOCUMENT } from '@angular/common';
|
|
5
5
|
import { Subject, Subscription, BehaviorSubject, debounceTime, distinctUntilChanged, map } from 'rxjs';
|
|
@@ -8504,6 +8504,389 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
8504
8504
|
type: Input
|
|
8505
8505
|
}] } });
|
|
8506
8506
|
|
|
8507
|
+
class TCloudUiCarouselComponent {
|
|
8508
|
+
get carouselSpeed() {
|
|
8509
|
+
return `${this.speed}ms`;
|
|
8510
|
+
}
|
|
8511
|
+
get carouselGap() {
|
|
8512
|
+
return this.gap;
|
|
8513
|
+
}
|
|
8514
|
+
get hideCarouselScrollbar() {
|
|
8515
|
+
return this.hideScrollbar;
|
|
8516
|
+
}
|
|
8517
|
+
get useCarouselSnap() {
|
|
8518
|
+
return this.snap && this.currentEffect === 'slide';
|
|
8519
|
+
}
|
|
8520
|
+
get useFadeEffect() {
|
|
8521
|
+
return this.currentEffect === 'fade';
|
|
8522
|
+
}
|
|
8523
|
+
get useSlideEffect() {
|
|
8524
|
+
return this.currentEffect === 'slide';
|
|
8525
|
+
}
|
|
8526
|
+
get currentEffect() {
|
|
8527
|
+
return this.effect === 'fade' ? 'fade' : 'slide';
|
|
8528
|
+
}
|
|
8529
|
+
get showCarouselControls() {
|
|
8530
|
+
//return this.showControls && this.navigation;
|
|
8531
|
+
return this.navigation;
|
|
8532
|
+
}
|
|
8533
|
+
get showCarouselIndicators() {
|
|
8534
|
+
//return this.showIndicators || this.pagination;
|
|
8535
|
+
return this.pagination;
|
|
8536
|
+
}
|
|
8537
|
+
constructor(changeDetectorRef, ngZone) {
|
|
8538
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
8539
|
+
this.ngZone = ngZone;
|
|
8540
|
+
/**
|
|
8541
|
+
* Texto acessível usado para identificar a região do carrossel.
|
|
8542
|
+
* Esperado: string curta e descritiva para leitores de tela.
|
|
8543
|
+
*/
|
|
8544
|
+
this.ariaLabel = 'Carrossel';
|
|
8545
|
+
/**
|
|
8546
|
+
* Define a posição dos botões de navegação.
|
|
8547
|
+
* Esperado: 'inside' para botões sobre o conteúdo ou 'outside' para uso futuro fora da área visual.
|
|
8548
|
+
*/
|
|
8549
|
+
this.controlsPosition = 'inside';
|
|
8550
|
+
/**
|
|
8551
|
+
* Espaçamento horizontal entre os slides.
|
|
8552
|
+
* Esperado: qualquer valor CSS válido, como '0', '8px' ou 'var(--size-16)'.
|
|
8553
|
+
*/
|
|
8554
|
+
this.gap = '0';
|
|
8555
|
+
/**
|
|
8556
|
+
* Ocultar Scrollbar horizontal do carrossel.
|
|
8557
|
+
* Esperado: true para esconder a barra de rolagem ou false para exibi-la.
|
|
8558
|
+
*/
|
|
8559
|
+
this.hideScrollbar = true;
|
|
8560
|
+
/**
|
|
8561
|
+
* Quantidade de deslocamento usada ao avançar ou voltar no efeito slide.
|
|
8562
|
+
* Esperado: 'page' para mover uma largura completa do carrossel ou um número em pixels.
|
|
8563
|
+
*/
|
|
8564
|
+
//@Input() scrollAmount: 'page' | number = 'page';
|
|
8565
|
+
/**
|
|
8566
|
+
* Comportamento nativo do scroll quando o carrossel navega entre slides.
|
|
8567
|
+
* Esperado: 'smooth', 'auto' ou 'instant', conforme suporte do navegador.
|
|
8568
|
+
*/
|
|
8569
|
+
this.scrollBehavior = 'smooth';
|
|
8570
|
+
// @Input() showControls: boolean = true;
|
|
8571
|
+
// @Input() showIndicators: boolean = true;
|
|
8572
|
+
/**
|
|
8573
|
+
* Encaixar o scroll no início de cada slide.
|
|
8574
|
+
* Esperado: true para evitar parar entre dois slides ou false para permitir rolagem livre.
|
|
8575
|
+
*/
|
|
8576
|
+
this.snap = true;
|
|
8577
|
+
/**
|
|
8578
|
+
* Tempo de espera entre uma troca automática de slide e outra.
|
|
8579
|
+
* Esperado: número em milissegundos; use 0 para desativar autoplay.
|
|
8580
|
+
* Exemplo: autoplay-delay="8000".
|
|
8581
|
+
*/
|
|
8582
|
+
this.autoplayDelay = 0;
|
|
8583
|
+
/**
|
|
8584
|
+
* Define se o autoplay deve parar quando o usuário interagir com o carrossel.
|
|
8585
|
+
* Esperado: true para parar ao clicar/navegar ou false para continuar após interação.
|
|
8586
|
+
* Exemplo: autoplay-disable-on-interaction="false".
|
|
8587
|
+
*/
|
|
8588
|
+
this.autoplayDisableOnInteraction = true;
|
|
8589
|
+
/**
|
|
8590
|
+
* Tipo de transição visual entre os slides.
|
|
8591
|
+
* Esperado: 'slide' para rolagem horizontal ou 'fade' para transição por opacidade.
|
|
8592
|
+
*/
|
|
8593
|
+
this.effect = 'slide';
|
|
8594
|
+
/**
|
|
8595
|
+
* Permitir navegação circular entre os slides.
|
|
8596
|
+
* Esperado: true para voltar do último slide ao primeiro ou false para travar nas extremidades.
|
|
8597
|
+
*/
|
|
8598
|
+
this.loop = false;
|
|
8599
|
+
/**
|
|
8600
|
+
* Exibir indicadores de paginação sobre a imagem.
|
|
8601
|
+
* Esperado: true para mostrar os dots ou false para ocultá-los.
|
|
8602
|
+
*/
|
|
8603
|
+
this.pagination = false;
|
|
8604
|
+
/**
|
|
8605
|
+
* Permitir clique nos indicadores de paginação.
|
|
8606
|
+
* Esperado: true para navegar ao clicar nos dots ou false para deixá-los apenas informativos.
|
|
8607
|
+
* Exemplo: pagination-clickable="true".
|
|
8608
|
+
*/
|
|
8609
|
+
this.paginationClickable = true;
|
|
8610
|
+
/**
|
|
8611
|
+
* Exibir botões de navegação anterior e próximo sobre a imagem.
|
|
8612
|
+
* Esperado: true para mostrar as setas ou false para ocultá-las.
|
|
8613
|
+
*/
|
|
8614
|
+
this.navigation = true;
|
|
8615
|
+
/**
|
|
8616
|
+
* Duração da animação de troca de slide.
|
|
8617
|
+
* Esperado: número em milissegundos.
|
|
8618
|
+
* Exemplo: speed="1000".
|
|
8619
|
+
*/
|
|
8620
|
+
this.speed = 300;
|
|
8621
|
+
this.activeIndexChange = new EventEmitter();
|
|
8622
|
+
this.activeIndex = 0;
|
|
8623
|
+
this.canScrollNext = false;
|
|
8624
|
+
this.canScrollPrev = false;
|
|
8625
|
+
this.isOverflowed = false;
|
|
8626
|
+
this.pages = [0];
|
|
8627
|
+
this.autoplayTimeout = null;
|
|
8628
|
+
this.scrollAnimationRaf = null;
|
|
8629
|
+
this.scrollRaf = null;
|
|
8630
|
+
this.stateRaf = null;
|
|
8631
|
+
this.handleScroll = () => {
|
|
8632
|
+
if (this.scrollRaf !== null) {
|
|
8633
|
+
return;
|
|
8634
|
+
}
|
|
8635
|
+
this.scrollRaf = requestAnimationFrame(() => {
|
|
8636
|
+
this.scrollRaf = null;
|
|
8637
|
+
this.updateState();
|
|
8638
|
+
});
|
|
8639
|
+
};
|
|
8640
|
+
}
|
|
8641
|
+
ngAfterViewInit() {
|
|
8642
|
+
this.ngZone.runOutsideAngular(() => {
|
|
8643
|
+
const el = this.carouselTrack.nativeElement;
|
|
8644
|
+
el.addEventListener('scroll', this.handleScroll, { passive: true });
|
|
8645
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
8646
|
+
this.resizeObserver = new ResizeObserver(() => this.scheduleStateUpdate());
|
|
8647
|
+
this.resizeObserver.observe(el);
|
|
8648
|
+
}
|
|
8649
|
+
this.scheduleStateUpdate();
|
|
8650
|
+
this.scheduleAutoplay();
|
|
8651
|
+
});
|
|
8652
|
+
}
|
|
8653
|
+
ngOnDestroy() {
|
|
8654
|
+
const el = this.carouselTrack?.nativeElement;
|
|
8655
|
+
el?.removeEventListener('scroll', this.handleScroll);
|
|
8656
|
+
this.resizeObserver?.disconnect();
|
|
8657
|
+
if (this.scrollRaf !== null) {
|
|
8658
|
+
cancelAnimationFrame(this.scrollRaf);
|
|
8659
|
+
}
|
|
8660
|
+
if (this.stateRaf !== null) {
|
|
8661
|
+
cancelAnimationFrame(this.stateRaf);
|
|
8662
|
+
}
|
|
8663
|
+
if (this.scrollAnimationRaf !== null) {
|
|
8664
|
+
cancelAnimationFrame(this.scrollAnimationRaf);
|
|
8665
|
+
}
|
|
8666
|
+
this.clearAutoplay();
|
|
8667
|
+
}
|
|
8668
|
+
next() {
|
|
8669
|
+
this.handleInteraction();
|
|
8670
|
+
this.goToIndex(this.activeIndex + 1);
|
|
8671
|
+
}
|
|
8672
|
+
previous() {
|
|
8673
|
+
this.handleInteraction();
|
|
8674
|
+
this.goToIndex(this.activeIndex - 1);
|
|
8675
|
+
}
|
|
8676
|
+
scrollToIndex(index) {
|
|
8677
|
+
if (!this.paginationClickable)
|
|
8678
|
+
return;
|
|
8679
|
+
this.handleInteraction();
|
|
8680
|
+
this.goToIndex(index);
|
|
8681
|
+
}
|
|
8682
|
+
goToIndex(index, isAutoplay = false) {
|
|
8683
|
+
const el = this.carouselTrack?.nativeElement;
|
|
8684
|
+
if (!el)
|
|
8685
|
+
return;
|
|
8686
|
+
const targetIndex = this.normalizeIndex(index);
|
|
8687
|
+
const slides = this.getSlides();
|
|
8688
|
+
if (this.currentEffect === 'fade') {
|
|
8689
|
+
this.setActiveIndex(targetIndex);
|
|
8690
|
+
if (isAutoplay) {
|
|
8691
|
+
this.scheduleAutoplay();
|
|
8692
|
+
}
|
|
8693
|
+
return;
|
|
8694
|
+
}
|
|
8695
|
+
const targetSlide = slides[targetIndex];
|
|
8696
|
+
const targetLeft = targetSlide ? targetSlide.offsetLeft : targetIndex * el.clientWidth;
|
|
8697
|
+
this.animateScrollTo(targetLeft);
|
|
8698
|
+
if (isAutoplay) {
|
|
8699
|
+
this.scheduleAutoplay();
|
|
8700
|
+
}
|
|
8701
|
+
}
|
|
8702
|
+
handleInteraction() {
|
|
8703
|
+
if (this.autoplayDisableOnInteraction) {
|
|
8704
|
+
this.clearAutoplay();
|
|
8705
|
+
return;
|
|
8706
|
+
}
|
|
8707
|
+
this.scheduleAutoplay();
|
|
8708
|
+
}
|
|
8709
|
+
scheduleStateUpdate() {
|
|
8710
|
+
if (this.stateRaf !== null) {
|
|
8711
|
+
return;
|
|
8712
|
+
}
|
|
8713
|
+
this.stateRaf = requestAnimationFrame(() => {
|
|
8714
|
+
this.stateRaf = null;
|
|
8715
|
+
this.updateState();
|
|
8716
|
+
});
|
|
8717
|
+
}
|
|
8718
|
+
scheduleAutoplay() {
|
|
8719
|
+
this.clearAutoplay();
|
|
8720
|
+
if (!this.autoplayDelay || this.autoplayDelay <= 0) {
|
|
8721
|
+
return;
|
|
8722
|
+
}
|
|
8723
|
+
this.autoplayTimeout = setTimeout(() => {
|
|
8724
|
+
this.ngZone.runOutsideAngular(() => {
|
|
8725
|
+
this.goToIndex(this.activeIndex + 1, true);
|
|
8726
|
+
});
|
|
8727
|
+
}, this.autoplayDelay);
|
|
8728
|
+
}
|
|
8729
|
+
clearAutoplay() {
|
|
8730
|
+
if (this.autoplayTimeout === null) {
|
|
8731
|
+
return;
|
|
8732
|
+
}
|
|
8733
|
+
clearTimeout(this.autoplayTimeout);
|
|
8734
|
+
this.autoplayTimeout = null;
|
|
8735
|
+
}
|
|
8736
|
+
updateState() {
|
|
8737
|
+
const el = this.carouselTrack?.nativeElement;
|
|
8738
|
+
if (!el)
|
|
8739
|
+
return;
|
|
8740
|
+
const slides = this.getSlides();
|
|
8741
|
+
const pagesLength = Math.max(1, slides.length);
|
|
8742
|
+
const maxScrollLeft = Math.max(0, el.scrollWidth - el.clientWidth);
|
|
8743
|
+
const activeIndex = this.currentEffect === 'fade'
|
|
8744
|
+
? this.activeIndex
|
|
8745
|
+
: this.getClosestSlideIndex(slides, el.scrollLeft);
|
|
8746
|
+
this.ngZone.run(() => {
|
|
8747
|
+
this.activeIndex = Math.min(activeIndex, Math.max(0, pagesLength - 1));
|
|
8748
|
+
this.canScrollPrev = this.loop || this.activeIndex > 0 || el.scrollLeft > 1;
|
|
8749
|
+
this.canScrollNext = this.loop || this.activeIndex < pagesLength - 1 || el.scrollLeft < maxScrollLeft - 1;
|
|
8750
|
+
this.isOverflowed = pagesLength > 1 || maxScrollLeft > 1;
|
|
8751
|
+
this.pages = Array.from({ length: pagesLength }, (_, index) => index);
|
|
8752
|
+
this.updateSlidesState();
|
|
8753
|
+
this.changeDetectorRef.markForCheck();
|
|
8754
|
+
});
|
|
8755
|
+
}
|
|
8756
|
+
setActiveIndex(index) {
|
|
8757
|
+
const previousActiveIndex = this.activeIndex;
|
|
8758
|
+
this.activeIndex = this.normalizeIndex(index);
|
|
8759
|
+
this.canScrollPrev = this.loop || this.activeIndex > 0;
|
|
8760
|
+
this.canScrollNext = this.loop || this.activeIndex < this.pages.length - 1;
|
|
8761
|
+
this.updateSlidesState();
|
|
8762
|
+
if (previousActiveIndex !== this.activeIndex) {
|
|
8763
|
+
this.activeIndexChange.emit(this.activeIndex);
|
|
8764
|
+
}
|
|
8765
|
+
this.changeDetectorRef.markForCheck();
|
|
8766
|
+
}
|
|
8767
|
+
normalizeIndex(index) {
|
|
8768
|
+
const slidesLength = this.getSlides().length;
|
|
8769
|
+
if (slidesLength === 0)
|
|
8770
|
+
return 0;
|
|
8771
|
+
if (this.loop) {
|
|
8772
|
+
return (index + slidesLength) % slidesLength;
|
|
8773
|
+
}
|
|
8774
|
+
return Math.min(Math.max(index, 0), slidesLength - 1);
|
|
8775
|
+
}
|
|
8776
|
+
getSlides() {
|
|
8777
|
+
const el = this.carouselTrack?.nativeElement;
|
|
8778
|
+
if (!el)
|
|
8779
|
+
return [];
|
|
8780
|
+
return Array.from(el.children);
|
|
8781
|
+
}
|
|
8782
|
+
getClosestSlideIndex(slides, scrollLeft) {
|
|
8783
|
+
if (!slides.length)
|
|
8784
|
+
return 0;
|
|
8785
|
+
return slides.reduce((closestIndex, slide, index) => {
|
|
8786
|
+
const currentDistance = Math.abs(slide.offsetLeft - scrollLeft);
|
|
8787
|
+
const closestDistance = Math.abs(slides[closestIndex].offsetLeft - scrollLeft);
|
|
8788
|
+
return currentDistance < closestDistance ? index : closestIndex;
|
|
8789
|
+
}, 0);
|
|
8790
|
+
}
|
|
8791
|
+
updateSlidesState() {
|
|
8792
|
+
this.getSlides().forEach((slide, index) => {
|
|
8793
|
+
slide.classList.toggle('tc-carousel-item-active', index === this.activeIndex);
|
|
8794
|
+
slide.classList.toggle('tc-carousel-item-hidden', index !== this.activeIndex);
|
|
8795
|
+
});
|
|
8796
|
+
}
|
|
8797
|
+
animateScrollTo(left) {
|
|
8798
|
+
const el = this.carouselTrack?.nativeElement;
|
|
8799
|
+
if (!el)
|
|
8800
|
+
return;
|
|
8801
|
+
if (this.scrollAnimationRaf !== null) {
|
|
8802
|
+
cancelAnimationFrame(this.scrollAnimationRaf);
|
|
8803
|
+
}
|
|
8804
|
+
if (this.scrollBehavior !== 'smooth' || this.speed <= 0) {
|
|
8805
|
+
el.scrollTo({ left, behavior: this.scrollBehavior });
|
|
8806
|
+
return;
|
|
8807
|
+
}
|
|
8808
|
+
const startLeft = el.scrollLeft;
|
|
8809
|
+
const distance = left - startLeft;
|
|
8810
|
+
const startTime = performance.now();
|
|
8811
|
+
const animate = (currentTime) => {
|
|
8812
|
+
const progress = Math.min((currentTime - startTime) / this.speed, 1);
|
|
8813
|
+
const easeProgress = 1 - Math.pow(1 - progress, 3);
|
|
8814
|
+
el.scrollLeft = startLeft + distance * easeProgress;
|
|
8815
|
+
if (progress < 1) {
|
|
8816
|
+
this.scrollAnimationRaf = requestAnimationFrame(animate);
|
|
8817
|
+
return;
|
|
8818
|
+
}
|
|
8819
|
+
this.scrollAnimationRaf = null;
|
|
8820
|
+
this.updateState();
|
|
8821
|
+
};
|
|
8822
|
+
this.scrollAnimationRaf = requestAnimationFrame(animate);
|
|
8823
|
+
}
|
|
8824
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TCloudUiCarouselComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8825
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.20", type: TCloudUiCarouselComponent, isStandalone: true, selector: "tcloud-ui-carousel", inputs: { ariaLabel: "ariaLabel", controlsPosition: "controlsPosition", gap: "gap", hideScrollbar: "hideScrollbar", scrollBehavior: "scrollBehavior", snap: "snap", autoplayDelay: ["autoplay-delay", "autoplayDelay", numberAttribute], autoplayDisableOnInteraction: ["autoplay-disable-on-interaction", "autoplayDisableOnInteraction", booleanAttribute], effect: "effect", loop: ["loop", "loop", booleanAttribute], pagination: ["pagination", "pagination", booleanAttribute], paginationClickable: ["pagination-clickable", "paginationClickable", booleanAttribute], navigation: ["navigation", "navigation", booleanAttribute], speed: ["speed", "speed", numberAttribute] }, outputs: { activeIndexChange: "activeIndexChange" }, host: { properties: { "style.--tc-carousel-speed": "this.carouselSpeed", "style.--tc-carousel-gap": "this.carouselGap", "class.tc-carousel-hide-scrollbar": "this.hideCarouselScrollbar", "class.tc-carousel-snap": "this.useCarouselSnap", "class.tc-carousel-fade": "this.useFadeEffect", "class.tc-carousel-slide": "this.useSlideEffect" } }, viewQueries: [{ propertyName: "carouselTrack", first: true, predicate: ["carouselTrack"], descendants: true }], ngImport: i0, template: "<div\n class=\"tcloud-ui-carousel\"\n [class.controls-outside]=\"controlsPosition === 'outside'\"\n [class.overflowed]=\"showCarouselControls && isOverflowed\">\n <button\n *ngIf=\"showCarouselControls && isOverflowed\"\n class=\"tcloud-ui-carousel-control previous\"\n type=\"button\"\n [disabled]=\"!canScrollPrev\"\n (click)=\"previous()\"\n aria-label=\"Anterior\">\n <i class=\"fa-solid fa-angle-left\"></i>\n </button>\n <div\n #carouselTrack\n class=\"tcloud-ui-carousel-track\"\n tabindex=\"0\"\n role=\"region\"\n [attr.aria-label]=\"ariaLabel\">\n <ng-content></ng-content>\n </div>\n\n <button\n *ngIf=\"showCarouselControls && isOverflowed\"\n class=\"tcloud-ui-carousel-control next\"\n type=\"button\"\n [disabled]=\"!canScrollNext\"\n (click)=\"next()\"\n aria-label=\"Pr\u00F3ximo\">\n <i class=\"fa-solid fa-angle-right\"></i>\n </button>\n\n\n <div\n *ngIf=\"showCarouselIndicators && pages.length > 1\"\n class=\"tcloud-ui-carousel-indicators\">\n <button\n *ngFor=\"let page of pages; let index = index\"\n class=\"tcloud-ui-carousel-indicator\"\n type=\"button\"\n [disabled]=\"!paginationClickable\"\n [attr.aria-label]=\"'Ir para item ' + (index + 1)\"\n [class.active]=\"index === activeIndex\"\n (click)=\"scrollToIndex(page)\">\n </button>\n</div>\n</div>\n\n<!-- <div\n *ngIf=\"showCarouselIndicators && pages.length > 1\"\n class=\"tcloud-ui-carousel-indicators\">\n <button\n *ngFor=\"let page of pages; let index = index\"\n class=\"tcloud-ui-carousel-indicator\"\n type=\"button\"\n [disabled]=\"!paginationClickable\"\n [attr.aria-label]=\"'Ir para item ' + (index + 1)\"\n [class.active]=\"index === activeIndex\"\n (click)=\"scrollToIndex(page)\">\n </button>\n</div> -->\n", styles: ["tcloud-ui-carousel{display:block;width:100%}tcloud-ui-carousel .tcloud-ui-carousel{align-items:center;display:block;gap:var(--size-8);overflow:hidden;position:relative;width:100%}tcloud-ui-carousel .tcloud-ui-carousel.overflowed{display:block}tcloud-ui-carousel .tcloud-ui-carousel .tcloud-ui-carousel-control{position:absolute;top:50%;transform:translateY(-50%);z-index:2;background-color:transparent;border:none;font-size:xx-large;color:var(--tc-primary)}tcloud-ui-carousel .tcloud-ui-carousel .tcloud-ui-carousel-control.previous{left:var(--size-4)}tcloud-ui-carousel .tcloud-ui-carousel .tcloud-ui-carousel-control.next{right:var(--size-4)}tcloud-ui-carousel .tcloud-ui-carousel-track{display:flex;gap:var(--tc-carousel-gap);overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-gutter:stable;width:100%}tcloud-ui-carousel .tcloud-ui-carousel-track:focus{outline:none}tcloud-ui-carousel .tcloud-ui-carousel-track:focus-visible{outline:var(--bor-size-2) solid var(--c-primary-500);outline-offset:var(--size-2)}tcloud-ui-carousel .tcloud-ui-carousel-track>*{box-sizing:border-box;display:block;flex:0 0 100%;max-width:100%;min-width:100%;width:100%}tcloud-ui-carousel .tcloud-ui-carousel-track>img{height:auto;object-fit:cover}tcloud-ui-carousel.tc-carousel-fade .tcloud-ui-carousel-track{display:block;overflow:hidden;position:relative}tcloud-ui-carousel.tc-carousel-fade .tcloud-ui-carousel-track>*{inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity var(--tc-carousel-speed) ease;z-index:0}tcloud-ui-carousel.tc-carousel-fade .tcloud-ui-carousel-track>*.tc-carousel-item-active{opacity:1;pointer-events:auto;position:relative;z-index:1}tcloud-ui-carousel.tc-carousel-fade .tcloud-ui-carousel-track>*:first-child{opacity:1;pointer-events:auto;position:relative;z-index:1}tcloud-ui-carousel.tc-carousel-fade .tcloud-ui-carousel-track>*:first-child:not(.tc-carousel-item-active):has(~.tc-carousel-item-active){opacity:0;pointer-events:none;position:absolute;z-index:0}tcloud-ui-carousel.tc-carousel-snap .tcloud-ui-carousel-track{scroll-snap-type:x proximity}tcloud-ui-carousel.tc-carousel-snap .tcloud-ui-carousel-track>*{scroll-snap-align:start}tcloud-ui-carousel.tc-carousel-hide-scrollbar .tcloud-ui-carousel-track{-ms-overflow-style:none;scrollbar-width:none}tcloud-ui-carousel.tc-carousel-hide-scrollbar .tcloud-ui-carousel-track::-webkit-scrollbar{display:none}tcloud-ui-carousel .tcloud-ui-carousel-control{align-items:center;background-color:var(--c-neutral-50);border:var(--bor-size-1) solid var(--c-neutral-400);border-radius:var(--bor-radius-8);color:var(--c-neutral-700);cursor:pointer;display:flex;font-size:var(--f-size-14);height:var(--size-40);justify-content:center;padding:0;transition:all .2s ease;width:var(--size-40)}tcloud-ui-carousel .tcloud-ui-carousel-control:hover:not(:disabled){background-color:var(--c-neutral-200);border-color:var(--c-neutral-200);color:var(--c-primary-500)}tcloud-ui-carousel .tcloud-ui-carousel-control:focus{outline:none}tcloud-ui-carousel .tcloud-ui-carousel-control:focus-visible:not(:disabled){outline:var(--bor-size-2) solid var(--c-primary-500);outline-offset:var(--size-2)}tcloud-ui-carousel .tcloud-ui-carousel-control:disabled{border-color:var(--c-neutral-200);color:var(--c-neutral-400);cursor:not-allowed}tcloud-ui-carousel .tcloud-ui-carousel-indicators{align-items:center;bottom:var(--size-12);display:flex;gap:var(--size-8);justify-content:center;left:50%;position:absolute;transform:translate(-50%);z-index:2}tcloud-ui-carousel .tcloud-ui-carousel-indicator{background-color:var(--c-neutral-300);border:0;border-radius:var(--bor-radius-16);cursor:pointer;height:var(--size-14);padding:0;transition:all .2s ease;width:var(--size-14)}tcloud-ui-carousel .tcloud-ui-carousel-indicator.active{background-color:var(--c-primary-500)}tcloud-ui-carousel .tcloud-ui-carousel-indicator:disabled{cursor:default}@media (max-width: 480px){tcloud-ui-carousel .tcloud-ui-carousel{display:block}tcloud-ui-carousel .tcloud-ui-carousel.overflowed{display:block}tcloud-ui-carousel .tcloud-ui-carousel-control{height:var(--size-32);width:var(--size-32)}tcloud-ui-carousel .tcloud-ui-carousel-control.previous{left:var(--size-8)}tcloud-ui-carousel .tcloud-ui-carousel-control.next{right:var(--size-8)}tcloud-ui-carousel .tcloud-ui-carousel-track{width:100%}tcloud-ui-carousel .tcloud-ui-carousel-indicators{bottom:var(--size-8)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
8826
|
+
}
|
|
8827
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TCloudUiCarouselComponent, decorators: [{
|
|
8828
|
+
type: Component,
|
|
8829
|
+
args: [{ selector: 'tcloud-ui-carousel', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"tcloud-ui-carousel\"\n [class.controls-outside]=\"controlsPosition === 'outside'\"\n [class.overflowed]=\"showCarouselControls && isOverflowed\">\n <button\n *ngIf=\"showCarouselControls && isOverflowed\"\n class=\"tcloud-ui-carousel-control previous\"\n type=\"button\"\n [disabled]=\"!canScrollPrev\"\n (click)=\"previous()\"\n aria-label=\"Anterior\">\n <i class=\"fa-solid fa-angle-left\"></i>\n </button>\n <div\n #carouselTrack\n class=\"tcloud-ui-carousel-track\"\n tabindex=\"0\"\n role=\"region\"\n [attr.aria-label]=\"ariaLabel\">\n <ng-content></ng-content>\n </div>\n\n <button\n *ngIf=\"showCarouselControls && isOverflowed\"\n class=\"tcloud-ui-carousel-control next\"\n type=\"button\"\n [disabled]=\"!canScrollNext\"\n (click)=\"next()\"\n aria-label=\"Pr\u00F3ximo\">\n <i class=\"fa-solid fa-angle-right\"></i>\n </button>\n\n\n <div\n *ngIf=\"showCarouselIndicators && pages.length > 1\"\n class=\"tcloud-ui-carousel-indicators\">\n <button\n *ngFor=\"let page of pages; let index = index\"\n class=\"tcloud-ui-carousel-indicator\"\n type=\"button\"\n [disabled]=\"!paginationClickable\"\n [attr.aria-label]=\"'Ir para item ' + (index + 1)\"\n [class.active]=\"index === activeIndex\"\n (click)=\"scrollToIndex(page)\">\n </button>\n</div>\n</div>\n\n<!-- <div\n *ngIf=\"showCarouselIndicators && pages.length > 1\"\n class=\"tcloud-ui-carousel-indicators\">\n <button\n *ngFor=\"let page of pages; let index = index\"\n class=\"tcloud-ui-carousel-indicator\"\n type=\"button\"\n [disabled]=\"!paginationClickable\"\n [attr.aria-label]=\"'Ir para item ' + (index + 1)\"\n [class.active]=\"index === activeIndex\"\n (click)=\"scrollToIndex(page)\">\n </button>\n</div> -->\n", styles: ["tcloud-ui-carousel{display:block;width:100%}tcloud-ui-carousel .tcloud-ui-carousel{align-items:center;display:block;gap:var(--size-8);overflow:hidden;position:relative;width:100%}tcloud-ui-carousel .tcloud-ui-carousel.overflowed{display:block}tcloud-ui-carousel .tcloud-ui-carousel .tcloud-ui-carousel-control{position:absolute;top:50%;transform:translateY(-50%);z-index:2;background-color:transparent;border:none;font-size:xx-large;color:var(--tc-primary)}tcloud-ui-carousel .tcloud-ui-carousel .tcloud-ui-carousel-control.previous{left:var(--size-4)}tcloud-ui-carousel .tcloud-ui-carousel .tcloud-ui-carousel-control.next{right:var(--size-4)}tcloud-ui-carousel .tcloud-ui-carousel-track{display:flex;gap:var(--tc-carousel-gap);overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-gutter:stable;width:100%}tcloud-ui-carousel .tcloud-ui-carousel-track:focus{outline:none}tcloud-ui-carousel .tcloud-ui-carousel-track:focus-visible{outline:var(--bor-size-2) solid var(--c-primary-500);outline-offset:var(--size-2)}tcloud-ui-carousel .tcloud-ui-carousel-track>*{box-sizing:border-box;display:block;flex:0 0 100%;max-width:100%;min-width:100%;width:100%}tcloud-ui-carousel .tcloud-ui-carousel-track>img{height:auto;object-fit:cover}tcloud-ui-carousel.tc-carousel-fade .tcloud-ui-carousel-track{display:block;overflow:hidden;position:relative}tcloud-ui-carousel.tc-carousel-fade .tcloud-ui-carousel-track>*{inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity var(--tc-carousel-speed) ease;z-index:0}tcloud-ui-carousel.tc-carousel-fade .tcloud-ui-carousel-track>*.tc-carousel-item-active{opacity:1;pointer-events:auto;position:relative;z-index:1}tcloud-ui-carousel.tc-carousel-fade .tcloud-ui-carousel-track>*:first-child{opacity:1;pointer-events:auto;position:relative;z-index:1}tcloud-ui-carousel.tc-carousel-fade .tcloud-ui-carousel-track>*:first-child:not(.tc-carousel-item-active):has(~.tc-carousel-item-active){opacity:0;pointer-events:none;position:absolute;z-index:0}tcloud-ui-carousel.tc-carousel-snap .tcloud-ui-carousel-track{scroll-snap-type:x proximity}tcloud-ui-carousel.tc-carousel-snap .tcloud-ui-carousel-track>*{scroll-snap-align:start}tcloud-ui-carousel.tc-carousel-hide-scrollbar .tcloud-ui-carousel-track{-ms-overflow-style:none;scrollbar-width:none}tcloud-ui-carousel.tc-carousel-hide-scrollbar .tcloud-ui-carousel-track::-webkit-scrollbar{display:none}tcloud-ui-carousel .tcloud-ui-carousel-control{align-items:center;background-color:var(--c-neutral-50);border:var(--bor-size-1) solid var(--c-neutral-400);border-radius:var(--bor-radius-8);color:var(--c-neutral-700);cursor:pointer;display:flex;font-size:var(--f-size-14);height:var(--size-40);justify-content:center;padding:0;transition:all .2s ease;width:var(--size-40)}tcloud-ui-carousel .tcloud-ui-carousel-control:hover:not(:disabled){background-color:var(--c-neutral-200);border-color:var(--c-neutral-200);color:var(--c-primary-500)}tcloud-ui-carousel .tcloud-ui-carousel-control:focus{outline:none}tcloud-ui-carousel .tcloud-ui-carousel-control:focus-visible:not(:disabled){outline:var(--bor-size-2) solid var(--c-primary-500);outline-offset:var(--size-2)}tcloud-ui-carousel .tcloud-ui-carousel-control:disabled{border-color:var(--c-neutral-200);color:var(--c-neutral-400);cursor:not-allowed}tcloud-ui-carousel .tcloud-ui-carousel-indicators{align-items:center;bottom:var(--size-12);display:flex;gap:var(--size-8);justify-content:center;left:50%;position:absolute;transform:translate(-50%);z-index:2}tcloud-ui-carousel .tcloud-ui-carousel-indicator{background-color:var(--c-neutral-300);border:0;border-radius:var(--bor-radius-16);cursor:pointer;height:var(--size-14);padding:0;transition:all .2s ease;width:var(--size-14)}tcloud-ui-carousel .tcloud-ui-carousel-indicator.active{background-color:var(--c-primary-500)}tcloud-ui-carousel .tcloud-ui-carousel-indicator:disabled{cursor:default}@media (max-width: 480px){tcloud-ui-carousel .tcloud-ui-carousel{display:block}tcloud-ui-carousel .tcloud-ui-carousel.overflowed{display:block}tcloud-ui-carousel .tcloud-ui-carousel-control{height:var(--size-32);width:var(--size-32)}tcloud-ui-carousel .tcloud-ui-carousel-control.previous{left:var(--size-8)}tcloud-ui-carousel .tcloud-ui-carousel-control.next{right:var(--size-8)}tcloud-ui-carousel .tcloud-ui-carousel-track{width:100%}tcloud-ui-carousel .tcloud-ui-carousel-indicators{bottom:var(--size-8)}}\n"] }]
|
|
8830
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { carouselTrack: [{
|
|
8831
|
+
type: ViewChild,
|
|
8832
|
+
args: ['carouselTrack']
|
|
8833
|
+
}], ariaLabel: [{
|
|
8834
|
+
type: Input
|
|
8835
|
+
}], controlsPosition: [{
|
|
8836
|
+
type: Input
|
|
8837
|
+
}], gap: [{
|
|
8838
|
+
type: Input
|
|
8839
|
+
}], hideScrollbar: [{
|
|
8840
|
+
type: Input
|
|
8841
|
+
}], scrollBehavior: [{
|
|
8842
|
+
type: Input
|
|
8843
|
+
}], snap: [{
|
|
8844
|
+
type: Input
|
|
8845
|
+
}], autoplayDelay: [{
|
|
8846
|
+
type: Input,
|
|
8847
|
+
args: [{ alias: 'autoplay-delay', transform: numberAttribute }]
|
|
8848
|
+
}], autoplayDisableOnInteraction: [{
|
|
8849
|
+
type: Input,
|
|
8850
|
+
args: [{ alias: 'autoplay-disable-on-interaction', transform: booleanAttribute }]
|
|
8851
|
+
}], effect: [{
|
|
8852
|
+
type: Input
|
|
8853
|
+
}], loop: [{
|
|
8854
|
+
type: Input,
|
|
8855
|
+
args: [{ transform: booleanAttribute }]
|
|
8856
|
+
}], pagination: [{
|
|
8857
|
+
type: Input,
|
|
8858
|
+
args: [{ transform: booleanAttribute }]
|
|
8859
|
+
}], paginationClickable: [{
|
|
8860
|
+
type: Input,
|
|
8861
|
+
args: [{ alias: 'pagination-clickable', transform: booleanAttribute }]
|
|
8862
|
+
}], navigation: [{
|
|
8863
|
+
type: Input,
|
|
8864
|
+
args: [{ transform: booleanAttribute }]
|
|
8865
|
+
}], speed: [{
|
|
8866
|
+
type: Input,
|
|
8867
|
+
args: [{ transform: numberAttribute }]
|
|
8868
|
+
}], activeIndexChange: [{
|
|
8869
|
+
type: Output
|
|
8870
|
+
}], carouselSpeed: [{
|
|
8871
|
+
type: HostBinding,
|
|
8872
|
+
args: ['style.--tc-carousel-speed']
|
|
8873
|
+
}], carouselGap: [{
|
|
8874
|
+
type: HostBinding,
|
|
8875
|
+
args: ['style.--tc-carousel-gap']
|
|
8876
|
+
}], hideCarouselScrollbar: [{
|
|
8877
|
+
type: HostBinding,
|
|
8878
|
+
args: ['class.tc-carousel-hide-scrollbar']
|
|
8879
|
+
}], useCarouselSnap: [{
|
|
8880
|
+
type: HostBinding,
|
|
8881
|
+
args: ['class.tc-carousel-snap']
|
|
8882
|
+
}], useFadeEffect: [{
|
|
8883
|
+
type: HostBinding,
|
|
8884
|
+
args: ['class.tc-carousel-fade']
|
|
8885
|
+
}], useSlideEffect: [{
|
|
8886
|
+
type: HostBinding,
|
|
8887
|
+
args: ['class.tc-carousel-slide']
|
|
8888
|
+
}] } });
|
|
8889
|
+
|
|
8507
8890
|
/**
|
|
8508
8891
|
* Verifica se um elemento de texto está elipsado (texto cortado com ...)
|
|
8509
8892
|
* @param element - O elemento HTML que contém o texto
|
|
@@ -9910,6 +10293,7 @@ const COMPONENTS = [
|
|
|
9910
10293
|
TCloudUiCardTitleComponent,
|
|
9911
10294
|
TCloudUiCardAccordionComponent,
|
|
9912
10295
|
TCloudUiCalendarComponent,
|
|
10296
|
+
TCloudUiCarouselComponent,
|
|
9913
10297
|
TCloudUiDropdownComponent,
|
|
9914
10298
|
TCloudUiDropdownMultiComponent,
|
|
9915
10299
|
TCloudUiDialogComponent,
|
|
@@ -10045,6 +10429,7 @@ class TCloudUiModule {
|
|
|
10045
10429
|
TCloudUiCardTitleComponent,
|
|
10046
10430
|
TCloudUiCardAccordionComponent,
|
|
10047
10431
|
TCloudUiCalendarComponent,
|
|
10432
|
+
TCloudUiCarouselComponent,
|
|
10048
10433
|
TCloudUiDropdownComponent,
|
|
10049
10434
|
TCloudUiDropdownMultiComponent,
|
|
10050
10435
|
TCloudUiDialogComponent,
|
|
@@ -10142,6 +10527,7 @@ class TCloudUiModule {
|
|
|
10142
10527
|
TCloudUiCardTitleComponent,
|
|
10143
10528
|
TCloudUiCardAccordionComponent,
|
|
10144
10529
|
TCloudUiCalendarComponent,
|
|
10530
|
+
TCloudUiCarouselComponent,
|
|
10145
10531
|
TCloudUiDropdownComponent,
|
|
10146
10532
|
TCloudUiDropdownMultiComponent,
|
|
10147
10533
|
TCloudUiDialogComponent,
|
|
@@ -10240,6 +10626,7 @@ class TCloudUiModule {
|
|
|
10240
10626
|
TCloudUiCardComponent,
|
|
10241
10627
|
TCloudUiCardAccordionComponent,
|
|
10242
10628
|
TCloudUiCalendarComponent,
|
|
10629
|
+
TCloudUiCarouselComponent,
|
|
10243
10630
|
TCloudUiDropdownComponent,
|
|
10244
10631
|
TCloudUiDropdownMultiComponent,
|
|
10245
10632
|
TCloudUiDialogComponent,
|
|
@@ -12285,5 +12672,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
12285
12672
|
* Generated bundle index. Do not edit.
|
|
12286
12673
|
*/
|
|
12287
12674
|
|
|
12288
|
-
export { AcceptedFileType, BytesPipe, CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, DateBRPipe, DropdownGroupedSize, DropdownMultiSize$1 as DropdownMultiSize, DropdownSize$1 as DropdownSize, MonthNamePipe, MultiLevelDropdownSize$1 as MultiLevelDropdownSize, ProductActionPipe, ProgressStatusBarGradientStatus$1 as ProgressStatusBarGradientStatus, RespectivePipe, StatusInfoPipe, TCCondition, TCFiltersType, TCLOUD_UI_CONFIG, TCLOUD_UI_LAYOUT_SERVICE, TCLOUD_UI_LOCALE_SERVICE, TCLOUD_UI_USER_SERVICE, TCLOUD_UI_VIEWPORT_SERVICE, TCloudUiAccordionBodyComponent, TCloudUiAccordionComponent, TCloudUiAccordionTitleComponent, TCloudUiAlertBannerComponent, TCloudUiAlignDirective, TCloudUiBreadcrumbComponent, TCloudUiBreadcrumbService, TCloudUiButtonDirective, TCloudUiCalendarComponent, TCloudUiCardAccordionComponent, TCloudUiCardComponent, TCloudUiCardTitleComponent, TCloudUiCheckAccessDirective, TCloudUiCheckAccessService, TCloudUiCheckboxDirective, TCloudUiChoiceIssuesComponent, TCloudUiContainerColComponent, TCloudUiContainerComponent, TCloudUiContainerContentComponent, TCloudUiCubesComponent, TCloudUiCurrencyDirective, TCloudUiDataListComponent, TCloudUiDataListOptionComponent, TCloudUiDatepickerComponent, TCloudUiDatepickerTimeComponent, TCloudUiDialogComponent, TCloudUiDialogEventsEnum, TCloudUiDialogHostComponent, TCloudUiDialogModel, TCloudUiDialogService, TCloudUiDialogStatusEnum, TCloudUiDialogTextConfirmationEnum, TCloudUiDigitOnlyDirective, TCloudUiDropdownComponent, TCloudUiDropdownMultiComponent, TCloudUiDropdownMultiLevelComponent, TCloudUiEditorComponent, TCloudUiEditorDiffComponent, TCloudUiElCopyDirective, TCloudUiEmptyContentComponent, TCloudUiFaqComponent, TCloudUiFilterBarComponent, TCloudUiFiltersComponent, TCloudUiFormDirective, TCloudUiHighLightDirective, TCloudUiHoverParentDirective, TCloudUiIconButtonDirective, TCloudUiInputContainerComponent, TCloudUiInputDirective, TCloudUiInputPasswordComponent, TCloudUiInputSearchComponent, TCloudUiIpMaskDirective, TCloudUiLabelTokenComponent, TCloudUiLegendComponent, TCloudUiLineStepCircleComponent, TCloudUiLineStepTitleComponent, TCloudUiLinhaLogoComponent, TCloudUiLoadingComponent, TCloudUiLoadingTransitionsService, TCloudUiMarkReadmeComponent, TCloudUiMessageComponent, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModule, TCloudUiMultiInputComponent, TCloudUiMultiSelectComponent, TCloudUiMultiplesValuesComponent, TCloudUiNgCheckAccessDirective, TCloudUiNgFeatureFlagsDirective, TCloudUiNotFoundComponent, TCloudUiNumberStepComponent, TCloudUiPaginationComponent, TCloudUiPaginationPipe, TCloudUiProgressBarComponent, TCloudUiProgressStatusBarComponent, TCloudUiRadioDirective, TCloudUiRangeDateComponent, TCloudUiReorderItemsComponent, TCloudUiScrollBoxComponent, TCloudUiSearchBarComponent, TCloudUiSearchInObjectService, TCloudUiSearchInputComponent, TCloudUiSkeletonLoadingComponent, TCloudUiSkeletonLoadingComponentStyle, TCloudUiSlideToggleDirective, TCloudUiSubNavbarComponent, TCloudUiSubNavbarGroupComponent, TCloudUiSubNavbarItemComponent, TCloudUiTabContentComponent, TCloudUiTabGroupComponent, TCloudUiTabHeadComponent, TCloudUiTabItemComponent, TCloudUiTabMenuComponent, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTableComponent, TCloudUiTagComponent, TCloudUiToastComponent, TCloudUiTooltipDirective, TCloudUiUploadAreaComponent, TCloudUiWelcomeComponent, TCloudUiWizardStepsComponent, TagColorsEnum, TcRevButtonDirective, TcRevCalendarComponent, TcRevCardAccordionComponent, TcRevCardComponent, TcRevCardTitleComponent, TcRevCheckboxDirective, TcRevComponentsLibModule, TcRevDropdownComponent, TcRevDropdownGroupedComponent, TcRevDropdownMultiComponent, TcRevDropdownMultiLevelComponent, TcRevEmptyContentComponent, TcRevFaqComponent, TcRevIconButtonDirective, TcRevInputContainerComponent, TcRevInputDirective, TcRevLoadingComponent, TcRevMessageComponent, TcRevMultiInputComponent, TcRevPaginationComponent, TcRevProgressStatusBarComponent, TcRevRadioDirective, TcRevSearchInputComponent, TcRevSideDrawerComponent, TcRevSkeletonLoadingComponent, TcRevSkeletonLoadingComponentStyle, TcRevSlideToggleDirective, TcRevSmallLoadingComponent, TcRevSmallLoadingComponentStyle, TcRevSubNavbarComponent, TcRevSubNavbarItemComponent, TcRevTabGroupComponent, TcRevTabItemComponent, TcRevTagComponent, TcRevToastComponent, TcRevTooltipDirective, TcRevWizardStepsComponent, ToTextPipe, TopologyEnvironmentPipe, TopologyProductPipe, TopologyRegionPipe, TopologyStatusPipe, echartBarConfig, isTextEllipsed, provideTCloudUi };
|
|
12675
|
+
export { AcceptedFileType, BytesPipe, CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, DateBRPipe, DropdownGroupedSize, DropdownMultiSize$1 as DropdownMultiSize, DropdownSize$1 as DropdownSize, MonthNamePipe, MultiLevelDropdownSize$1 as MultiLevelDropdownSize, ProductActionPipe, ProgressStatusBarGradientStatus$1 as ProgressStatusBarGradientStatus, RespectivePipe, StatusInfoPipe, TCCondition, TCFiltersType, TCLOUD_UI_CONFIG, TCLOUD_UI_LAYOUT_SERVICE, TCLOUD_UI_LOCALE_SERVICE, TCLOUD_UI_USER_SERVICE, TCLOUD_UI_VIEWPORT_SERVICE, TCloudUiAccordionBodyComponent, TCloudUiAccordionComponent, TCloudUiAccordionTitleComponent, TCloudUiAlertBannerComponent, TCloudUiAlignDirective, TCloudUiBreadcrumbComponent, TCloudUiBreadcrumbService, TCloudUiButtonDirective, TCloudUiCalendarComponent, TCloudUiCardAccordionComponent, TCloudUiCardComponent, TCloudUiCardTitleComponent, TCloudUiCarouselComponent, TCloudUiCheckAccessDirective, TCloudUiCheckAccessService, TCloudUiCheckboxDirective, TCloudUiChoiceIssuesComponent, TCloudUiContainerColComponent, TCloudUiContainerComponent, TCloudUiContainerContentComponent, TCloudUiCubesComponent, TCloudUiCurrencyDirective, TCloudUiDataListComponent, TCloudUiDataListOptionComponent, TCloudUiDatepickerComponent, TCloudUiDatepickerTimeComponent, TCloudUiDialogComponent, TCloudUiDialogEventsEnum, TCloudUiDialogHostComponent, TCloudUiDialogModel, TCloudUiDialogService, TCloudUiDialogStatusEnum, TCloudUiDialogTextConfirmationEnum, TCloudUiDigitOnlyDirective, TCloudUiDropdownComponent, TCloudUiDropdownMultiComponent, TCloudUiDropdownMultiLevelComponent, TCloudUiEditorComponent, TCloudUiEditorDiffComponent, TCloudUiElCopyDirective, TCloudUiEmptyContentComponent, TCloudUiFaqComponent, TCloudUiFilterBarComponent, TCloudUiFiltersComponent, TCloudUiFormDirective, TCloudUiHighLightDirective, TCloudUiHoverParentDirective, TCloudUiIconButtonDirective, TCloudUiInputContainerComponent, TCloudUiInputDirective, TCloudUiInputPasswordComponent, TCloudUiInputSearchComponent, TCloudUiIpMaskDirective, TCloudUiLabelTokenComponent, TCloudUiLegendComponent, TCloudUiLineStepCircleComponent, TCloudUiLineStepTitleComponent, TCloudUiLinhaLogoComponent, TCloudUiLoadingComponent, TCloudUiLoadingTransitionsService, TCloudUiMarkReadmeComponent, TCloudUiMessageComponent, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModule, TCloudUiMultiInputComponent, TCloudUiMultiSelectComponent, TCloudUiMultiplesValuesComponent, TCloudUiNgCheckAccessDirective, TCloudUiNgFeatureFlagsDirective, TCloudUiNotFoundComponent, TCloudUiNumberStepComponent, TCloudUiPaginationComponent, TCloudUiPaginationPipe, TCloudUiProgressBarComponent, TCloudUiProgressStatusBarComponent, TCloudUiRadioDirective, TCloudUiRangeDateComponent, TCloudUiReorderItemsComponent, TCloudUiScrollBoxComponent, TCloudUiSearchBarComponent, TCloudUiSearchInObjectService, TCloudUiSearchInputComponent, TCloudUiSkeletonLoadingComponent, TCloudUiSkeletonLoadingComponentStyle, TCloudUiSlideToggleDirective, TCloudUiSubNavbarComponent, TCloudUiSubNavbarGroupComponent, TCloudUiSubNavbarItemComponent, TCloudUiTabContentComponent, TCloudUiTabGroupComponent, TCloudUiTabHeadComponent, TCloudUiTabItemComponent, TCloudUiTabMenuComponent, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTableComponent, TCloudUiTagComponent, TCloudUiToastComponent, TCloudUiTooltipDirective, TCloudUiUploadAreaComponent, TCloudUiWelcomeComponent, TCloudUiWizardStepsComponent, TagColorsEnum, TcRevButtonDirective, TcRevCalendarComponent, TcRevCardAccordionComponent, TcRevCardComponent, TcRevCardTitleComponent, TcRevCheckboxDirective, TcRevComponentsLibModule, TcRevDropdownComponent, TcRevDropdownGroupedComponent, TcRevDropdownMultiComponent, TcRevDropdownMultiLevelComponent, TcRevEmptyContentComponent, TcRevFaqComponent, TcRevIconButtonDirective, TcRevInputContainerComponent, TcRevInputDirective, TcRevLoadingComponent, TcRevMessageComponent, TcRevMultiInputComponent, TcRevPaginationComponent, TcRevProgressStatusBarComponent, TcRevRadioDirective, TcRevSearchInputComponent, TcRevSideDrawerComponent, TcRevSkeletonLoadingComponent, TcRevSkeletonLoadingComponentStyle, TcRevSlideToggleDirective, TcRevSmallLoadingComponent, TcRevSmallLoadingComponentStyle, TcRevSubNavbarComponent, TcRevSubNavbarItemComponent, TcRevTabGroupComponent, TcRevTabItemComponent, TcRevTagComponent, TcRevToastComponent, TcRevTooltipDirective, TcRevWizardStepsComponent, ToTextPipe, TopologyEnvironmentPipe, TopologyProductPipe, TopologyRegionPipe, TopologyStatusPipe, echartBarConfig, isTextEllipsed, provideTCloudUi };
|
|
12289
12676
|
//# sourceMappingURL=dev-tcloud-tcloud-ui.mjs.map
|