valtech-components 2.0.304 → 2.0.306
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/organisms/article/article.component.mjs +494 -0
- package/esm2022/lib/components/organisms/article/types.mjs +157 -0
- package/esm2022/lib/services/lang-provider/content.mjs +1 -18
- package/esm2022/public-api.mjs +5 -1
- package/fesm2022/valtech-components.mjs +645 -18
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/article/article.component.d.ts +82 -0
- package/lib/components/organisms/article/types.d.ts +293 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
|
@@ -5633,6 +5633,650 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
5633
5633
|
type: Input
|
|
5634
5634
|
}] } });
|
|
5635
5635
|
|
|
5636
|
+
/**
|
|
5637
|
+
* val-article
|
|
5638
|
+
*
|
|
5639
|
+
* Componente para crear artículos, blogs y documentación de forma declarativa.
|
|
5640
|
+
* Permite combinar múltiples elementos (títulos, texto, imágenes, código, etc.)
|
|
5641
|
+
* con espaciado automático y soporte multi-idioma.
|
|
5642
|
+
*
|
|
5643
|
+
* @example Uso básico:
|
|
5644
|
+
* ```html
|
|
5645
|
+
* <val-article [props]="articleConfig"></val-article>
|
|
5646
|
+
* ```
|
|
5647
|
+
*
|
|
5648
|
+
* @example Con ArticleBuilder:
|
|
5649
|
+
* ```typescript
|
|
5650
|
+
* articleConfig = new ArticleBuilder()
|
|
5651
|
+
* .title(titleProps)
|
|
5652
|
+
* .paragraph(textProps)
|
|
5653
|
+
* .code('console.log("Hello World")', 'javascript')
|
|
5654
|
+
* .build();
|
|
5655
|
+
* ```
|
|
5656
|
+
*
|
|
5657
|
+
* @input props: ArticleMetadata - Configuración completa del artículo
|
|
5658
|
+
*/
|
|
5659
|
+
class ArticleComponent {
|
|
5660
|
+
constructor() { }
|
|
5661
|
+
ngOnInit() {
|
|
5662
|
+
// Validación básica
|
|
5663
|
+
if (!this.props || !this.props.elements) {
|
|
5664
|
+
console.warn('val-article: props.elements is required');
|
|
5665
|
+
}
|
|
5666
|
+
}
|
|
5667
|
+
/**
|
|
5668
|
+
* Función de trackBy para optimizar el rendering de elementos
|
|
5669
|
+
*/
|
|
5670
|
+
trackByFn(index, element) {
|
|
5671
|
+
return element.id || index;
|
|
5672
|
+
}
|
|
5673
|
+
/**
|
|
5674
|
+
* Obtiene las clases CSS para el espaciado del elemento
|
|
5675
|
+
*/
|
|
5676
|
+
getElementSpacingClass(element) {
|
|
5677
|
+
const spacing = element.spacing || this.props.defaultSpacing;
|
|
5678
|
+
const classes = [];
|
|
5679
|
+
if (spacing?.top) {
|
|
5680
|
+
classes.push(`val-article__spacing-top--${spacing.top}`);
|
|
5681
|
+
}
|
|
5682
|
+
if (spacing?.bottom) {
|
|
5683
|
+
classes.push(`val-article__spacing-bottom--${spacing.bottom}`);
|
|
5684
|
+
}
|
|
5685
|
+
if (spacing?.horizontal) {
|
|
5686
|
+
classes.push(`val-article__spacing-horizontal--${spacing.horizontal}`);
|
|
5687
|
+
}
|
|
5688
|
+
return classes.join(' ');
|
|
5689
|
+
}
|
|
5690
|
+
// === FUNCIONES DE TIPO PARA TYPESCRIPT ===
|
|
5691
|
+
getTitleElement(element) {
|
|
5692
|
+
return element;
|
|
5693
|
+
}
|
|
5694
|
+
getSubtitleElement(element) {
|
|
5695
|
+
return element;
|
|
5696
|
+
}
|
|
5697
|
+
getTextElement(element) {
|
|
5698
|
+
return element;
|
|
5699
|
+
}
|
|
5700
|
+
getQuoteElement(element) {
|
|
5701
|
+
return element;
|
|
5702
|
+
}
|
|
5703
|
+
getHighlightElement(element) {
|
|
5704
|
+
return element;
|
|
5705
|
+
}
|
|
5706
|
+
getCodeElement(element) {
|
|
5707
|
+
return element;
|
|
5708
|
+
}
|
|
5709
|
+
getListElement(element) {
|
|
5710
|
+
return element;
|
|
5711
|
+
}
|
|
5712
|
+
getButtonElement(element) {
|
|
5713
|
+
return element;
|
|
5714
|
+
}
|
|
5715
|
+
getSeparatorElement(element) {
|
|
5716
|
+
return element;
|
|
5717
|
+
}
|
|
5718
|
+
getImageElement(element) {
|
|
5719
|
+
return element;
|
|
5720
|
+
}
|
|
5721
|
+
getVideoElement(element) {
|
|
5722
|
+
return element;
|
|
5723
|
+
}
|
|
5724
|
+
getCustomElement(element) {
|
|
5725
|
+
return element;
|
|
5726
|
+
}
|
|
5727
|
+
// === FUNCIONES AUXILIARES PARA PROPS ===
|
|
5728
|
+
getQuoteTextProps(element) {
|
|
5729
|
+
const quoteElement = this.getQuoteElement(element);
|
|
5730
|
+
const { author, source, ...textProps } = quoteElement.props;
|
|
5731
|
+
return textProps;
|
|
5732
|
+
}
|
|
5733
|
+
getHighlightTextProps(element) {
|
|
5734
|
+
const highlightElement = this.getHighlightElement(element);
|
|
5735
|
+
const { backgroundColor, rounded, ...textProps } = highlightElement.props;
|
|
5736
|
+
return textProps;
|
|
5737
|
+
}
|
|
5738
|
+
getHighlightColor(element) {
|
|
5739
|
+
const highlightElement = this.getHighlightElement(element);
|
|
5740
|
+
return highlightElement.props.backgroundColor || 'var(--ion-color-light)';
|
|
5741
|
+
}
|
|
5742
|
+
getButtonProps(element) {
|
|
5743
|
+
const buttonElement = this.getButtonElement(element);
|
|
5744
|
+
const { alignment, ...buttonProps } = buttonElement.props;
|
|
5745
|
+
return buttonProps;
|
|
5746
|
+
}
|
|
5747
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ArticleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5748
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ArticleComponent, isStandalone: true, selector: "val-article", inputs: { props: "props" }, ngImport: i0, template: `
|
|
5749
|
+
<article
|
|
5750
|
+
class="val-article"
|
|
5751
|
+
[class]="props.cssClass"
|
|
5752
|
+
[ngClass]="{
|
|
5753
|
+
'val-article--centered': props.centered,
|
|
5754
|
+
'val-article--light': props.theme === 'light',
|
|
5755
|
+
'val-article--dark': props.theme === 'dark',
|
|
5756
|
+
}"
|
|
5757
|
+
[style.max-width]="props.maxWidth"
|
|
5758
|
+
>
|
|
5759
|
+
<div
|
|
5760
|
+
*ngFor="let element of props.elements; trackBy: trackByFn"
|
|
5761
|
+
class="val-article__element"
|
|
5762
|
+
[class]="element.cssClass"
|
|
5763
|
+
[ngClass]="getElementSpacingClass(element)"
|
|
5764
|
+
[style.display]="element.visible === false ? 'none' : 'block'"
|
|
5765
|
+
>
|
|
5766
|
+
<!-- Título -->
|
|
5767
|
+
<ng-container *ngIf="element.type === 'title'">
|
|
5768
|
+
<val-title [props]="getTitleElement(element).props"></val-title>
|
|
5769
|
+
</ng-container>
|
|
5770
|
+
|
|
5771
|
+
<!-- Subtítulo -->
|
|
5772
|
+
<ng-container *ngIf="element.type === 'subtitle'">
|
|
5773
|
+
<val-title [props]="getSubtitleElement(element).props"></val-title>
|
|
5774
|
+
</ng-container>
|
|
5775
|
+
|
|
5776
|
+
<!-- Texto/Párrafo -->
|
|
5777
|
+
<ng-container *ngIf="element.type === 'text' || element.type === 'paragraph'">
|
|
5778
|
+
<val-text [props]="getTextElement(element).props"></val-text>
|
|
5779
|
+
</ng-container>
|
|
5780
|
+
|
|
5781
|
+
<!-- Cita -->
|
|
5782
|
+
<ng-container *ngIf="element.type === 'quote'">
|
|
5783
|
+
<div class="val-article__quote">
|
|
5784
|
+
<div class="val-article__quote-content">
|
|
5785
|
+
<val-text [props]="getQuoteTextProps(element)"></val-text>
|
|
5786
|
+
</div>
|
|
5787
|
+
<div *ngIf="getQuoteElement(element).props.author" class="val-article__quote-author">
|
|
5788
|
+
— {{ getQuoteElement(element).props.author }}
|
|
5789
|
+
<span *ngIf="getQuoteElement(element).props.source" class="val-article__quote-source">
|
|
5790
|
+
, {{ getQuoteElement(element).props.source }}
|
|
5791
|
+
</span>
|
|
5792
|
+
</div>
|
|
5793
|
+
</div>
|
|
5794
|
+
</ng-container>
|
|
5795
|
+
|
|
5796
|
+
<!-- Texto destacado -->
|
|
5797
|
+
<ng-container *ngIf="element.type === 'highlight'">
|
|
5798
|
+
<div
|
|
5799
|
+
class="val-article__highlight"
|
|
5800
|
+
[ngClass]="{
|
|
5801
|
+
'val-article__highlight--rounded': getHighlightElement(element).props.rounded,
|
|
5802
|
+
}"
|
|
5803
|
+
[style.background-color]="getHighlightColor(element)"
|
|
5804
|
+
>
|
|
5805
|
+
<val-text [props]="getHighlightTextProps(element)"></val-text>
|
|
5806
|
+
</div>
|
|
5807
|
+
</ng-container>
|
|
5808
|
+
|
|
5809
|
+
<!-- Código -->
|
|
5810
|
+
<ng-container *ngIf="element.type === 'code'">
|
|
5811
|
+
<div class="val-article__code">
|
|
5812
|
+
<div *ngIf="getCodeElement(element).props.language" class="val-article__code-language">
|
|
5813
|
+
{{ getCodeElement(element).props.language }}
|
|
5814
|
+
</div>
|
|
5815
|
+
<pre
|
|
5816
|
+
class="val-article__code-content"
|
|
5817
|
+
[ngClass]="{
|
|
5818
|
+
'val-article__code-content--dark': getCodeElement(element).props.theme === 'dark',
|
|
5819
|
+
}"
|
|
5820
|
+
><code>{{ getCodeElement(element).props.code }}</code></pre>
|
|
5821
|
+
</div>
|
|
5822
|
+
</ng-container>
|
|
5823
|
+
|
|
5824
|
+
<!-- Lista -->
|
|
5825
|
+
<ng-container *ngIf="element.type === 'list'">
|
|
5826
|
+
<ul *ngIf="getListElement(element).props.listType !== 'ordered'" class="val-article__list">
|
|
5827
|
+
<li *ngFor="let item of getListElement(element).props.items" class="val-article__list-item">
|
|
5828
|
+
<span *ngIf="getListElement(element).props.listType === 'checklist'" class="val-article__list-check"
|
|
5829
|
+
>✓</span
|
|
5830
|
+
>
|
|
5831
|
+
{{ item.text }}
|
|
5832
|
+
</li>
|
|
5833
|
+
</ul>
|
|
5834
|
+
<ol
|
|
5835
|
+
*ngIf="getListElement(element).props.listType === 'ordered'"
|
|
5836
|
+
class="val-article__list val-article__list--ordered"
|
|
5837
|
+
>
|
|
5838
|
+
<li *ngFor="let item of getListElement(element).props.items" class="val-article__list-item">
|
|
5839
|
+
{{ item.text }}
|
|
5840
|
+
</li>
|
|
5841
|
+
</ol>
|
|
5842
|
+
</ng-container>
|
|
5843
|
+
|
|
5844
|
+
<!-- Botón -->
|
|
5845
|
+
<ng-container *ngIf="element.type === 'button'">
|
|
5846
|
+
<div
|
|
5847
|
+
class="val-article__button-container"
|
|
5848
|
+
[ngClass]="{
|
|
5849
|
+
'val-article__button-container--left': getButtonElement(element).props.alignment === 'left',
|
|
5850
|
+
'val-article__button-container--center': getButtonElement(element).props.alignment === 'center',
|
|
5851
|
+
'val-article__button-container--right': getButtonElement(element).props.alignment === 'right',
|
|
5852
|
+
}"
|
|
5853
|
+
>
|
|
5854
|
+
<val-button [props]="getButtonProps(element)"></val-button>
|
|
5855
|
+
</div>
|
|
5856
|
+
</ng-container>
|
|
5857
|
+
|
|
5858
|
+
<!-- Separador -->
|
|
5859
|
+
<ng-container *ngIf="element.type === 'separator'">
|
|
5860
|
+
<div class="val-article__separator">
|
|
5861
|
+
<hr
|
|
5862
|
+
*ngIf="getSeparatorElement(element).props.style === 'line'"
|
|
5863
|
+
class="val-article__separator-line"
|
|
5864
|
+
[ngClass]="{
|
|
5865
|
+
'val-article__separator-line--thin': getSeparatorElement(element).props.thickness === 'thin',
|
|
5866
|
+
'val-article__separator-line--thick': getSeparatorElement(element).props.thickness === 'thick',
|
|
5867
|
+
}"
|
|
5868
|
+
/>
|
|
5869
|
+
<div *ngIf="getSeparatorElement(element).props.style === 'dots'" class="val-article__separator-dots">
|
|
5870
|
+
• • •
|
|
5871
|
+
</div>
|
|
5872
|
+
<div
|
|
5873
|
+
*ngIf="getSeparatorElement(element).props.style === 'space'"
|
|
5874
|
+
class="val-article__separator-space"
|
|
5875
|
+
></div>
|
|
5876
|
+
</div>
|
|
5877
|
+
</ng-container>
|
|
5878
|
+
|
|
5879
|
+
<!-- Imagen -->
|
|
5880
|
+
<ng-container *ngIf="element.type === 'image'">
|
|
5881
|
+
<figure
|
|
5882
|
+
class="val-article__image"
|
|
5883
|
+
[ngClass]="{
|
|
5884
|
+
'val-article__image--left': getImageElement(element).props.alignment === 'left',
|
|
5885
|
+
'val-article__image--center': getImageElement(element).props.alignment === 'center',
|
|
5886
|
+
'val-article__image--right': getImageElement(element).props.alignment === 'right',
|
|
5887
|
+
}"
|
|
5888
|
+
>
|
|
5889
|
+
<img
|
|
5890
|
+
[src]="getImageElement(element).props.src"
|
|
5891
|
+
[alt]="getImageElement(element).props.alt"
|
|
5892
|
+
[title]="getImageElement(element).props.title"
|
|
5893
|
+
[style.max-width]="getImageElement(element).props.maxWidth"
|
|
5894
|
+
[ngClass]="{
|
|
5895
|
+
'val-article__image-content--rounded': getImageElement(element).props.rounded,
|
|
5896
|
+
}"
|
|
5897
|
+
class="val-article__image-content"
|
|
5898
|
+
/>
|
|
5899
|
+
<figcaption *ngIf="getImageElement(element).props.caption" class="val-article__image-caption">
|
|
5900
|
+
{{ getImageElement(element).props.caption }}
|
|
5901
|
+
</figcaption>
|
|
5902
|
+
</figure>
|
|
5903
|
+
</ng-container>
|
|
5904
|
+
|
|
5905
|
+
<!-- Video -->
|
|
5906
|
+
<ng-container *ngIf="element.type === 'video'">
|
|
5907
|
+
<div class="val-article__video">
|
|
5908
|
+
<video
|
|
5909
|
+
[src]="getVideoElement(element).props.src"
|
|
5910
|
+
[poster]="getVideoElement(element).props.poster"
|
|
5911
|
+
[controls]="getVideoElement(element).props.controls !== false"
|
|
5912
|
+
[autoplay]="getVideoElement(element).props.autoplay"
|
|
5913
|
+
[muted]="getVideoElement(element).props.muted"
|
|
5914
|
+
[style.max-width]="getVideoElement(element).props.maxWidth"
|
|
5915
|
+
class="val-article__video-content"
|
|
5916
|
+
>
|
|
5917
|
+
Tu navegador no soporta el elemento video.
|
|
5918
|
+
</video>
|
|
5919
|
+
<div *ngIf="getVideoElement(element).props.title" class="val-article__video-title">
|
|
5920
|
+
{{ getVideoElement(element).props.title }}
|
|
5921
|
+
</div>
|
|
5922
|
+
</div>
|
|
5923
|
+
</ng-container>
|
|
5924
|
+
|
|
5925
|
+
<!-- Contenido personalizado -->
|
|
5926
|
+
<ng-container *ngIf="element.type === 'custom'">
|
|
5927
|
+
<div class="val-article__custom" [innerHTML]="getCustomElement(element).props.htmlContent"></div>
|
|
5928
|
+
</ng-container>
|
|
5929
|
+
</div>
|
|
5930
|
+
</article>
|
|
5931
|
+
`, isInline: true, styles: [".val-article{width:100%;margin:0 auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;line-height:1.6;color:var(--ion-color-dark, #1f2937)}.val-article--centered{margin:0 auto}.val-article--light{background-color:var(--ion-color-light, #ffffff);color:var(--ion-color-dark, #1f2937)}.val-article--dark{background-color:var(--ion-color-dark, #1f2937);color:var(--ion-color-light, #ffffff)}.val-article__element{position:relative}.val-article__element:last-child{margin-bottom:0!important}.val-article__spacing-top--none{margin-top:0!important}.val-article__spacing-top--small{margin-top:.5rem!important}.val-article__spacing-top--medium{margin-top:1rem!important}.val-article__spacing-top--large{margin-top:1.5rem!important}.val-article__spacing-top--xlarge{margin-top:2.5rem!important}.val-article__spacing-bottom--none{margin-bottom:0!important}.val-article__spacing-bottom--small{margin-bottom:.5rem!important}.val-article__spacing-bottom--medium{margin-bottom:1rem!important}.val-article__spacing-bottom--large{margin-bottom:1.5rem!important}.val-article__spacing-bottom--xlarge{margin-bottom:2.5rem!important}.val-article__spacing-horizontal--none{margin-left:0!important;margin-right:0!important}.val-article__spacing-horizontal--small{margin-left:.5rem!important;margin-right:.5rem!important}.val-article__spacing-horizontal--medium{margin-left:1rem!important;margin-right:1rem!important}.val-article__spacing-horizontal--large{margin-left:1.5rem!important;margin-right:1.5rem!important}.val-article__spacing-horizontal--xlarge{margin-left:2.5rem!important;margin-right:2.5rem!important}.val-article__quote{border-left:4px solid #0969da;padding:1rem;margin:1rem 0;background-color:var(--ion-color-light-shade, #f8f9fa);border-radius:0 8px 8px 0;font-style:italic}.val-article__quote-content{margin-bottom:.5rem;font-size:1.1em}.val-article__quote-author{font-size:.9em;color:var(--ion-color-medium, #6c757d);font-style:normal;font-weight:500;text-align:right}.val-article__quote-source{font-weight:400;opacity:.8}.val-article__highlight{padding:1rem;margin:.5rem 0;background-color:var(--ion-color-warning-tint, #fff3cd);border:1px solid var(--ion-color-warning, #ffc107);border-radius:4px}.val-article__highlight--rounded{border-radius:12px}.val-article__code{margin:1rem 0;border-radius:8px;overflow:hidden;border:1px solid #e1e5e9}.val-article__code-language{background-color:var(--ion-color-medium-tint, #f8f9fa);padding:.5rem 1rem;font-size:.875em;font-weight:500;color:var(--ion-color-dark, #495057);border-bottom:1px solid #e1e5e9;text-transform:uppercase;letter-spacing:.5px}.val-article__code-content{background-color:#f6f8fa;color:#24292e;padding:1rem;margin:0;overflow-x:auto;font-family:SFMono-Regular,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;line-height:1.5}.val-article__code-content code{background:none;padding:0;font-size:inherit;color:inherit}.val-article__code-content--dark{background-color:#161b22;color:#f0f6fc}.val-article__list{margin:1rem 0;padding-left:1.5rem}.val-article__list--ordered{list-style-type:decimal}.val-article__list-item{margin-bottom:.5rem;line-height:1.6;position:relative}.val-article__list-item:last-child{margin-bottom:0}.val-article__list-check{color:var(--ion-color-success, #28a745);font-weight:700;margin-right:.5rem;position:absolute;left:-1.5rem}.val-article .val-article__list:has(.val-article__list-check){list-style:none;padding-left:1rem}.val-article__button-container{margin:1rem 0}.val-article__button-container--left{text-align:left}.val-article__button-container--center{text-align:center}.val-article__button-container--right{text-align:right}.val-article__separator{margin:1.5rem 0;text-align:center}.val-article__separator-line{border:none;height:1px;background-color:#d0d7de;margin:0}.val-article__separator-line--thin{height:1px}.val-article__separator-line--thick{height:3px}.val-article__separator-dots{color:#d0d7de;font-size:1.5em;letter-spacing:.5em;-webkit-user-select:none;user-select:none}.val-article__separator-space{height:1.5rem}.val-article__image{margin:1.5rem 0;text-align:center}.val-article__image--left{text-align:left}.val-article__image--center{text-align:center}.val-article__image--right{text-align:right}.val-article__image-content{max-width:100%;height:auto;border-radius:4px;box-shadow:0 2px 8px #0000001a;transition:transform .2s ease}.val-article__image-content:hover{transform:scale(1.02)}.val-article__image-content--rounded{border-radius:12px}.val-article__image-caption{margin-top:.5rem;font-size:.875em;color:var(--ion-color-medium, #6c757d);font-style:italic;text-align:center}.val-article__video{margin:1.5rem 0;text-align:center}.val-article__video-content{max-width:100%;height:auto;border-radius:8px;box-shadow:0 4px 12px #00000026}.val-article__video-title{margin-top:.5rem;font-size:.9em;color:var(--ion-color-medium, #6c757d);font-weight:500}.val-article__custom{margin:1rem 0}.val-article__custom *{max-width:100%}@media (max-width: 768px){.val-article__code-content{font-size:.8em;padding:.5rem}.val-article__image-content:hover{transform:none}.val-article__quote{padding:.5rem;margin:.5rem 0}.val-article__highlight{padding:.5rem}}@media (prefers-color-scheme: dark){.val-article--auto{background-color:var(--ion-color-dark, #1f2937);color:var(--ion-color-light, #ffffff)}.val-article--auto .val-article__quote{background-color:#ffffff0d}.val-article--auto .val-article__highlight{background-color:#ffc1071a;border-color:var(--ion-color-warning-shade, #e0a800)}.val-article--auto .val-article__code-content{background-color:#161b22;color:#f0f6fc}}.val-article__element{animation:fadeInUp .3s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@media (prefers-contrast: high){.val-article__separator-line{background-color:currentColor;opacity:.5}.val-article__quote{border-left-width:6px}}@media (prefers-reduced-motion: reduce){.val-article .val-article__element{animation:none}.val-article__image-content{transition:none}.val-article__image-content:hover{transform:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TitleComponent, selector: "val-title", inputs: ["props"] }, { kind: "component", type: TextComponent, selector: "val-text", inputs: ["props"] }, { kind: "component", type: ButtonComponent, selector: "val-button", inputs: ["props"], outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5932
|
+
}
|
|
5933
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ArticleComponent, decorators: [{
|
|
5934
|
+
type: Component,
|
|
5935
|
+
args: [{ selector: 'val-article', standalone: true, imports: [CommonModule, TitleComponent, TextComponent, ButtonComponent], template: `
|
|
5936
|
+
<article
|
|
5937
|
+
class="val-article"
|
|
5938
|
+
[class]="props.cssClass"
|
|
5939
|
+
[ngClass]="{
|
|
5940
|
+
'val-article--centered': props.centered,
|
|
5941
|
+
'val-article--light': props.theme === 'light',
|
|
5942
|
+
'val-article--dark': props.theme === 'dark',
|
|
5943
|
+
}"
|
|
5944
|
+
[style.max-width]="props.maxWidth"
|
|
5945
|
+
>
|
|
5946
|
+
<div
|
|
5947
|
+
*ngFor="let element of props.elements; trackBy: trackByFn"
|
|
5948
|
+
class="val-article__element"
|
|
5949
|
+
[class]="element.cssClass"
|
|
5950
|
+
[ngClass]="getElementSpacingClass(element)"
|
|
5951
|
+
[style.display]="element.visible === false ? 'none' : 'block'"
|
|
5952
|
+
>
|
|
5953
|
+
<!-- Título -->
|
|
5954
|
+
<ng-container *ngIf="element.type === 'title'">
|
|
5955
|
+
<val-title [props]="getTitleElement(element).props"></val-title>
|
|
5956
|
+
</ng-container>
|
|
5957
|
+
|
|
5958
|
+
<!-- Subtítulo -->
|
|
5959
|
+
<ng-container *ngIf="element.type === 'subtitle'">
|
|
5960
|
+
<val-title [props]="getSubtitleElement(element).props"></val-title>
|
|
5961
|
+
</ng-container>
|
|
5962
|
+
|
|
5963
|
+
<!-- Texto/Párrafo -->
|
|
5964
|
+
<ng-container *ngIf="element.type === 'text' || element.type === 'paragraph'">
|
|
5965
|
+
<val-text [props]="getTextElement(element).props"></val-text>
|
|
5966
|
+
</ng-container>
|
|
5967
|
+
|
|
5968
|
+
<!-- Cita -->
|
|
5969
|
+
<ng-container *ngIf="element.type === 'quote'">
|
|
5970
|
+
<div class="val-article__quote">
|
|
5971
|
+
<div class="val-article__quote-content">
|
|
5972
|
+
<val-text [props]="getQuoteTextProps(element)"></val-text>
|
|
5973
|
+
</div>
|
|
5974
|
+
<div *ngIf="getQuoteElement(element).props.author" class="val-article__quote-author">
|
|
5975
|
+
— {{ getQuoteElement(element).props.author }}
|
|
5976
|
+
<span *ngIf="getQuoteElement(element).props.source" class="val-article__quote-source">
|
|
5977
|
+
, {{ getQuoteElement(element).props.source }}
|
|
5978
|
+
</span>
|
|
5979
|
+
</div>
|
|
5980
|
+
</div>
|
|
5981
|
+
</ng-container>
|
|
5982
|
+
|
|
5983
|
+
<!-- Texto destacado -->
|
|
5984
|
+
<ng-container *ngIf="element.type === 'highlight'">
|
|
5985
|
+
<div
|
|
5986
|
+
class="val-article__highlight"
|
|
5987
|
+
[ngClass]="{
|
|
5988
|
+
'val-article__highlight--rounded': getHighlightElement(element).props.rounded,
|
|
5989
|
+
}"
|
|
5990
|
+
[style.background-color]="getHighlightColor(element)"
|
|
5991
|
+
>
|
|
5992
|
+
<val-text [props]="getHighlightTextProps(element)"></val-text>
|
|
5993
|
+
</div>
|
|
5994
|
+
</ng-container>
|
|
5995
|
+
|
|
5996
|
+
<!-- Código -->
|
|
5997
|
+
<ng-container *ngIf="element.type === 'code'">
|
|
5998
|
+
<div class="val-article__code">
|
|
5999
|
+
<div *ngIf="getCodeElement(element).props.language" class="val-article__code-language">
|
|
6000
|
+
{{ getCodeElement(element).props.language }}
|
|
6001
|
+
</div>
|
|
6002
|
+
<pre
|
|
6003
|
+
class="val-article__code-content"
|
|
6004
|
+
[ngClass]="{
|
|
6005
|
+
'val-article__code-content--dark': getCodeElement(element).props.theme === 'dark',
|
|
6006
|
+
}"
|
|
6007
|
+
><code>{{ getCodeElement(element).props.code }}</code></pre>
|
|
6008
|
+
</div>
|
|
6009
|
+
</ng-container>
|
|
6010
|
+
|
|
6011
|
+
<!-- Lista -->
|
|
6012
|
+
<ng-container *ngIf="element.type === 'list'">
|
|
6013
|
+
<ul *ngIf="getListElement(element).props.listType !== 'ordered'" class="val-article__list">
|
|
6014
|
+
<li *ngFor="let item of getListElement(element).props.items" class="val-article__list-item">
|
|
6015
|
+
<span *ngIf="getListElement(element).props.listType === 'checklist'" class="val-article__list-check"
|
|
6016
|
+
>✓</span
|
|
6017
|
+
>
|
|
6018
|
+
{{ item.text }}
|
|
6019
|
+
</li>
|
|
6020
|
+
</ul>
|
|
6021
|
+
<ol
|
|
6022
|
+
*ngIf="getListElement(element).props.listType === 'ordered'"
|
|
6023
|
+
class="val-article__list val-article__list--ordered"
|
|
6024
|
+
>
|
|
6025
|
+
<li *ngFor="let item of getListElement(element).props.items" class="val-article__list-item">
|
|
6026
|
+
{{ item.text }}
|
|
6027
|
+
</li>
|
|
6028
|
+
</ol>
|
|
6029
|
+
</ng-container>
|
|
6030
|
+
|
|
6031
|
+
<!-- Botón -->
|
|
6032
|
+
<ng-container *ngIf="element.type === 'button'">
|
|
6033
|
+
<div
|
|
6034
|
+
class="val-article__button-container"
|
|
6035
|
+
[ngClass]="{
|
|
6036
|
+
'val-article__button-container--left': getButtonElement(element).props.alignment === 'left',
|
|
6037
|
+
'val-article__button-container--center': getButtonElement(element).props.alignment === 'center',
|
|
6038
|
+
'val-article__button-container--right': getButtonElement(element).props.alignment === 'right',
|
|
6039
|
+
}"
|
|
6040
|
+
>
|
|
6041
|
+
<val-button [props]="getButtonProps(element)"></val-button>
|
|
6042
|
+
</div>
|
|
6043
|
+
</ng-container>
|
|
6044
|
+
|
|
6045
|
+
<!-- Separador -->
|
|
6046
|
+
<ng-container *ngIf="element.type === 'separator'">
|
|
6047
|
+
<div class="val-article__separator">
|
|
6048
|
+
<hr
|
|
6049
|
+
*ngIf="getSeparatorElement(element).props.style === 'line'"
|
|
6050
|
+
class="val-article__separator-line"
|
|
6051
|
+
[ngClass]="{
|
|
6052
|
+
'val-article__separator-line--thin': getSeparatorElement(element).props.thickness === 'thin',
|
|
6053
|
+
'val-article__separator-line--thick': getSeparatorElement(element).props.thickness === 'thick',
|
|
6054
|
+
}"
|
|
6055
|
+
/>
|
|
6056
|
+
<div *ngIf="getSeparatorElement(element).props.style === 'dots'" class="val-article__separator-dots">
|
|
6057
|
+
• • •
|
|
6058
|
+
</div>
|
|
6059
|
+
<div
|
|
6060
|
+
*ngIf="getSeparatorElement(element).props.style === 'space'"
|
|
6061
|
+
class="val-article__separator-space"
|
|
6062
|
+
></div>
|
|
6063
|
+
</div>
|
|
6064
|
+
</ng-container>
|
|
6065
|
+
|
|
6066
|
+
<!-- Imagen -->
|
|
6067
|
+
<ng-container *ngIf="element.type === 'image'">
|
|
6068
|
+
<figure
|
|
6069
|
+
class="val-article__image"
|
|
6070
|
+
[ngClass]="{
|
|
6071
|
+
'val-article__image--left': getImageElement(element).props.alignment === 'left',
|
|
6072
|
+
'val-article__image--center': getImageElement(element).props.alignment === 'center',
|
|
6073
|
+
'val-article__image--right': getImageElement(element).props.alignment === 'right',
|
|
6074
|
+
}"
|
|
6075
|
+
>
|
|
6076
|
+
<img
|
|
6077
|
+
[src]="getImageElement(element).props.src"
|
|
6078
|
+
[alt]="getImageElement(element).props.alt"
|
|
6079
|
+
[title]="getImageElement(element).props.title"
|
|
6080
|
+
[style.max-width]="getImageElement(element).props.maxWidth"
|
|
6081
|
+
[ngClass]="{
|
|
6082
|
+
'val-article__image-content--rounded': getImageElement(element).props.rounded,
|
|
6083
|
+
}"
|
|
6084
|
+
class="val-article__image-content"
|
|
6085
|
+
/>
|
|
6086
|
+
<figcaption *ngIf="getImageElement(element).props.caption" class="val-article__image-caption">
|
|
6087
|
+
{{ getImageElement(element).props.caption }}
|
|
6088
|
+
</figcaption>
|
|
6089
|
+
</figure>
|
|
6090
|
+
</ng-container>
|
|
6091
|
+
|
|
6092
|
+
<!-- Video -->
|
|
6093
|
+
<ng-container *ngIf="element.type === 'video'">
|
|
6094
|
+
<div class="val-article__video">
|
|
6095
|
+
<video
|
|
6096
|
+
[src]="getVideoElement(element).props.src"
|
|
6097
|
+
[poster]="getVideoElement(element).props.poster"
|
|
6098
|
+
[controls]="getVideoElement(element).props.controls !== false"
|
|
6099
|
+
[autoplay]="getVideoElement(element).props.autoplay"
|
|
6100
|
+
[muted]="getVideoElement(element).props.muted"
|
|
6101
|
+
[style.max-width]="getVideoElement(element).props.maxWidth"
|
|
6102
|
+
class="val-article__video-content"
|
|
6103
|
+
>
|
|
6104
|
+
Tu navegador no soporta el elemento video.
|
|
6105
|
+
</video>
|
|
6106
|
+
<div *ngIf="getVideoElement(element).props.title" class="val-article__video-title">
|
|
6107
|
+
{{ getVideoElement(element).props.title }}
|
|
6108
|
+
</div>
|
|
6109
|
+
</div>
|
|
6110
|
+
</ng-container>
|
|
6111
|
+
|
|
6112
|
+
<!-- Contenido personalizado -->
|
|
6113
|
+
<ng-container *ngIf="element.type === 'custom'">
|
|
6114
|
+
<div class="val-article__custom" [innerHTML]="getCustomElement(element).props.htmlContent"></div>
|
|
6115
|
+
</ng-container>
|
|
6116
|
+
</div>
|
|
6117
|
+
</article>
|
|
6118
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".val-article{width:100%;margin:0 auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;line-height:1.6;color:var(--ion-color-dark, #1f2937)}.val-article--centered{margin:0 auto}.val-article--light{background-color:var(--ion-color-light, #ffffff);color:var(--ion-color-dark, #1f2937)}.val-article--dark{background-color:var(--ion-color-dark, #1f2937);color:var(--ion-color-light, #ffffff)}.val-article__element{position:relative}.val-article__element:last-child{margin-bottom:0!important}.val-article__spacing-top--none{margin-top:0!important}.val-article__spacing-top--small{margin-top:.5rem!important}.val-article__spacing-top--medium{margin-top:1rem!important}.val-article__spacing-top--large{margin-top:1.5rem!important}.val-article__spacing-top--xlarge{margin-top:2.5rem!important}.val-article__spacing-bottom--none{margin-bottom:0!important}.val-article__spacing-bottom--small{margin-bottom:.5rem!important}.val-article__spacing-bottom--medium{margin-bottom:1rem!important}.val-article__spacing-bottom--large{margin-bottom:1.5rem!important}.val-article__spacing-bottom--xlarge{margin-bottom:2.5rem!important}.val-article__spacing-horizontal--none{margin-left:0!important;margin-right:0!important}.val-article__spacing-horizontal--small{margin-left:.5rem!important;margin-right:.5rem!important}.val-article__spacing-horizontal--medium{margin-left:1rem!important;margin-right:1rem!important}.val-article__spacing-horizontal--large{margin-left:1.5rem!important;margin-right:1.5rem!important}.val-article__spacing-horizontal--xlarge{margin-left:2.5rem!important;margin-right:2.5rem!important}.val-article__quote{border-left:4px solid #0969da;padding:1rem;margin:1rem 0;background-color:var(--ion-color-light-shade, #f8f9fa);border-radius:0 8px 8px 0;font-style:italic}.val-article__quote-content{margin-bottom:.5rem;font-size:1.1em}.val-article__quote-author{font-size:.9em;color:var(--ion-color-medium, #6c757d);font-style:normal;font-weight:500;text-align:right}.val-article__quote-source{font-weight:400;opacity:.8}.val-article__highlight{padding:1rem;margin:.5rem 0;background-color:var(--ion-color-warning-tint, #fff3cd);border:1px solid var(--ion-color-warning, #ffc107);border-radius:4px}.val-article__highlight--rounded{border-radius:12px}.val-article__code{margin:1rem 0;border-radius:8px;overflow:hidden;border:1px solid #e1e5e9}.val-article__code-language{background-color:var(--ion-color-medium-tint, #f8f9fa);padding:.5rem 1rem;font-size:.875em;font-weight:500;color:var(--ion-color-dark, #495057);border-bottom:1px solid #e1e5e9;text-transform:uppercase;letter-spacing:.5px}.val-article__code-content{background-color:#f6f8fa;color:#24292e;padding:1rem;margin:0;overflow-x:auto;font-family:SFMono-Regular,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;line-height:1.5}.val-article__code-content code{background:none;padding:0;font-size:inherit;color:inherit}.val-article__code-content--dark{background-color:#161b22;color:#f0f6fc}.val-article__list{margin:1rem 0;padding-left:1.5rem}.val-article__list--ordered{list-style-type:decimal}.val-article__list-item{margin-bottom:.5rem;line-height:1.6;position:relative}.val-article__list-item:last-child{margin-bottom:0}.val-article__list-check{color:var(--ion-color-success, #28a745);font-weight:700;margin-right:.5rem;position:absolute;left:-1.5rem}.val-article .val-article__list:has(.val-article__list-check){list-style:none;padding-left:1rem}.val-article__button-container{margin:1rem 0}.val-article__button-container--left{text-align:left}.val-article__button-container--center{text-align:center}.val-article__button-container--right{text-align:right}.val-article__separator{margin:1.5rem 0;text-align:center}.val-article__separator-line{border:none;height:1px;background-color:#d0d7de;margin:0}.val-article__separator-line--thin{height:1px}.val-article__separator-line--thick{height:3px}.val-article__separator-dots{color:#d0d7de;font-size:1.5em;letter-spacing:.5em;-webkit-user-select:none;user-select:none}.val-article__separator-space{height:1.5rem}.val-article__image{margin:1.5rem 0;text-align:center}.val-article__image--left{text-align:left}.val-article__image--center{text-align:center}.val-article__image--right{text-align:right}.val-article__image-content{max-width:100%;height:auto;border-radius:4px;box-shadow:0 2px 8px #0000001a;transition:transform .2s ease}.val-article__image-content:hover{transform:scale(1.02)}.val-article__image-content--rounded{border-radius:12px}.val-article__image-caption{margin-top:.5rem;font-size:.875em;color:var(--ion-color-medium, #6c757d);font-style:italic;text-align:center}.val-article__video{margin:1.5rem 0;text-align:center}.val-article__video-content{max-width:100%;height:auto;border-radius:8px;box-shadow:0 4px 12px #00000026}.val-article__video-title{margin-top:.5rem;font-size:.9em;color:var(--ion-color-medium, #6c757d);font-weight:500}.val-article__custom{margin:1rem 0}.val-article__custom *{max-width:100%}@media (max-width: 768px){.val-article__code-content{font-size:.8em;padding:.5rem}.val-article__image-content:hover{transform:none}.val-article__quote{padding:.5rem;margin:.5rem 0}.val-article__highlight{padding:.5rem}}@media (prefers-color-scheme: dark){.val-article--auto{background-color:var(--ion-color-dark, #1f2937);color:var(--ion-color-light, #ffffff)}.val-article--auto .val-article__quote{background-color:#ffffff0d}.val-article--auto .val-article__highlight{background-color:#ffc1071a;border-color:var(--ion-color-warning-shade, #e0a800)}.val-article--auto .val-article__code-content{background-color:#161b22;color:#f0f6fc}}.val-article__element{animation:fadeInUp .3s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@media (prefers-contrast: high){.val-article__separator-line{background-color:currentColor;opacity:.5}.val-article__quote{border-left-width:6px}}@media (prefers-reduced-motion: reduce){.val-article .val-article__element{animation:none}.val-article__image-content{transition:none}.val-article__image-content:hover{transform:none}}\n"] }]
|
|
6119
|
+
}], ctorParameters: () => [], propDecorators: { props: [{
|
|
6120
|
+
type: Input
|
|
6121
|
+
}] } });
|
|
6122
|
+
|
|
6123
|
+
/**
|
|
6124
|
+
* Configuración de espaciado predefinida
|
|
6125
|
+
*/
|
|
6126
|
+
const ARTICLE_SPACING = {
|
|
6127
|
+
NONE: { top: 'none', bottom: 'none' },
|
|
6128
|
+
SMALL: { top: 'small', bottom: 'small' },
|
|
6129
|
+
MEDIUM: { top: 'medium', bottom: 'medium' },
|
|
6130
|
+
LARGE: { top: 'large', bottom: 'large' },
|
|
6131
|
+
XLARGE: { top: 'xlarge', bottom: 'xlarge' },
|
|
6132
|
+
// Espaciados específicos para elementos
|
|
6133
|
+
TITLE: { top: 'large', bottom: 'medium' },
|
|
6134
|
+
SUBTITLE: { top: 'medium', bottom: 'small' },
|
|
6135
|
+
PARAGRAPH: { top: 'small', bottom: 'medium' },
|
|
6136
|
+
QUOTE: { top: 'medium', bottom: 'medium' },
|
|
6137
|
+
CODE: { top: 'medium', bottom: 'medium' },
|
|
6138
|
+
LIST: { top: 'small', bottom: 'medium' },
|
|
6139
|
+
BUTTON: { top: 'medium', bottom: 'medium' },
|
|
6140
|
+
IMAGE: { top: 'large', bottom: 'large' },
|
|
6141
|
+
SEPARATOR: { top: 'large', bottom: 'large' },
|
|
6142
|
+
};
|
|
6143
|
+
/**
|
|
6144
|
+
* Función helper para crear elementos de artículo de forma fácil
|
|
6145
|
+
*/
|
|
6146
|
+
class ArticleBuilder {
|
|
6147
|
+
constructor() {
|
|
6148
|
+
this.elements = [];
|
|
6149
|
+
}
|
|
6150
|
+
/**
|
|
6151
|
+
* Añade un título al artículo
|
|
6152
|
+
*/
|
|
6153
|
+
title(props, options) {
|
|
6154
|
+
this.elements.push({
|
|
6155
|
+
type: 'title',
|
|
6156
|
+
props,
|
|
6157
|
+
spacing: ARTICLE_SPACING.TITLE,
|
|
6158
|
+
...options,
|
|
6159
|
+
});
|
|
6160
|
+
return this;
|
|
6161
|
+
}
|
|
6162
|
+
/**
|
|
6163
|
+
* Añade un subtítulo al artículo
|
|
6164
|
+
*/
|
|
6165
|
+
subtitle(props, options) {
|
|
6166
|
+
this.elements.push({
|
|
6167
|
+
type: 'subtitle',
|
|
6168
|
+
props,
|
|
6169
|
+
spacing: ARTICLE_SPACING.SUBTITLE,
|
|
6170
|
+
...options,
|
|
6171
|
+
});
|
|
6172
|
+
return this;
|
|
6173
|
+
}
|
|
6174
|
+
/**
|
|
6175
|
+
* Añade un párrafo al artículo
|
|
6176
|
+
*/
|
|
6177
|
+
paragraph(props, options) {
|
|
6178
|
+
this.elements.push({
|
|
6179
|
+
type: 'paragraph',
|
|
6180
|
+
props,
|
|
6181
|
+
spacing: ARTICLE_SPACING.PARAGRAPH,
|
|
6182
|
+
...options,
|
|
6183
|
+
});
|
|
6184
|
+
return this;
|
|
6185
|
+
}
|
|
6186
|
+
/**
|
|
6187
|
+
* Añade una cita al artículo
|
|
6188
|
+
*/
|
|
6189
|
+
quote(props, options) {
|
|
6190
|
+
this.elements.push({
|
|
6191
|
+
type: 'quote',
|
|
6192
|
+
props,
|
|
6193
|
+
spacing: ARTICLE_SPACING.QUOTE,
|
|
6194
|
+
...options,
|
|
6195
|
+
});
|
|
6196
|
+
return this;
|
|
6197
|
+
}
|
|
6198
|
+
/**
|
|
6199
|
+
* Añade código al artículo
|
|
6200
|
+
*/
|
|
6201
|
+
code(code, language, options) {
|
|
6202
|
+
this.elements.push({
|
|
6203
|
+
type: 'code',
|
|
6204
|
+
props: { code, language },
|
|
6205
|
+
spacing: ARTICLE_SPACING.CODE,
|
|
6206
|
+
...options,
|
|
6207
|
+
});
|
|
6208
|
+
return this;
|
|
6209
|
+
}
|
|
6210
|
+
/**
|
|
6211
|
+
* Añade una lista al artículo
|
|
6212
|
+
*/
|
|
6213
|
+
list(items, listType, options) {
|
|
6214
|
+
this.elements.push({
|
|
6215
|
+
type: 'list',
|
|
6216
|
+
props: { items, listType },
|
|
6217
|
+
spacing: ARTICLE_SPACING.LIST,
|
|
6218
|
+
...options,
|
|
6219
|
+
});
|
|
6220
|
+
return this;
|
|
6221
|
+
}
|
|
6222
|
+
/**
|
|
6223
|
+
* Añade un botón al artículo
|
|
6224
|
+
*/
|
|
6225
|
+
button(props, alignment, options) {
|
|
6226
|
+
this.elements.push({
|
|
6227
|
+
type: 'button',
|
|
6228
|
+
props: { ...props, alignment },
|
|
6229
|
+
spacing: ARTICLE_SPACING.BUTTON,
|
|
6230
|
+
...options,
|
|
6231
|
+
});
|
|
6232
|
+
return this;
|
|
6233
|
+
}
|
|
6234
|
+
/**
|
|
6235
|
+
* Añade un separador al artículo
|
|
6236
|
+
*/
|
|
6237
|
+
separator(style, options) {
|
|
6238
|
+
this.elements.push({
|
|
6239
|
+
type: 'separator',
|
|
6240
|
+
props: { style },
|
|
6241
|
+
spacing: ARTICLE_SPACING.SEPARATOR,
|
|
6242
|
+
...options,
|
|
6243
|
+
});
|
|
6244
|
+
return this;
|
|
6245
|
+
}
|
|
6246
|
+
/**
|
|
6247
|
+
* Añade una imagen al artículo
|
|
6248
|
+
*/
|
|
6249
|
+
image(src, alt, caption, options) {
|
|
6250
|
+
this.elements.push({
|
|
6251
|
+
type: 'image',
|
|
6252
|
+
props: { src, alt, caption },
|
|
6253
|
+
spacing: ARTICLE_SPACING.IMAGE,
|
|
6254
|
+
...options,
|
|
6255
|
+
});
|
|
6256
|
+
return this;
|
|
6257
|
+
}
|
|
6258
|
+
/**
|
|
6259
|
+
* Construye el artículo final
|
|
6260
|
+
*/
|
|
6261
|
+
build(config) {
|
|
6262
|
+
return {
|
|
6263
|
+
elements: this.elements,
|
|
6264
|
+
defaultSpacing: ARTICLE_SPACING.MEDIUM,
|
|
6265
|
+
maxWidth: '800px',
|
|
6266
|
+
centered: true,
|
|
6267
|
+
theme: 'auto',
|
|
6268
|
+
...config,
|
|
6269
|
+
};
|
|
6270
|
+
}
|
|
6271
|
+
/**
|
|
6272
|
+
* Resetea el builder para crear un nuevo artículo
|
|
6273
|
+
*/
|
|
6274
|
+
clear() {
|
|
6275
|
+
this.elements = [];
|
|
6276
|
+
return this;
|
|
6277
|
+
}
|
|
6278
|
+
}
|
|
6279
|
+
|
|
5636
6280
|
/**
|
|
5637
6281
|
* val-banner
|
|
5638
6282
|
*
|
|
@@ -7397,23 +8041,6 @@ const GlobalContent = new TextContent(globalContentData);
|
|
|
7397
8041
|
const content = {
|
|
7398
8042
|
_global: GlobalContent,
|
|
7399
8043
|
LangSettings,
|
|
7400
|
-
testReactivity: new TextContent({
|
|
7401
|
-
es: {
|
|
7402
|
-
welcomeMessage: '¡Bienvenido!',
|
|
7403
|
-
saveButton: 'Guardar',
|
|
7404
|
-
cancelButton: 'Cancelar',
|
|
7405
|
-
},
|
|
7406
|
-
en: {
|
|
7407
|
-
welcomeMessage: 'Welcome!',
|
|
7408
|
-
saveButton: 'Save',
|
|
7409
|
-
cancelButton: 'Cancel',
|
|
7410
|
-
},
|
|
7411
|
-
fr: {
|
|
7412
|
-
welcomeMessage: 'Bienvenue!',
|
|
7413
|
-
saveButton: 'Enregistrer',
|
|
7414
|
-
cancelButton: 'Annuler',
|
|
7415
|
-
},
|
|
7416
|
-
}),
|
|
7417
8044
|
};
|
|
7418
8045
|
|
|
7419
8046
|
/**
|
|
@@ -7471,5 +8098,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
7471
8098
|
* Generated bundle index. Do not edit.
|
|
7472
8099
|
*/
|
|
7473
8100
|
|
|
7474
|
-
export { ActionType, AlertBoxComponent, AvatarComponent, BannerComponent, BaseDefault, BoxComponent, ButtonComponent, ButtonGroupComponent, CardComponent, CardSection, CardType, CheckInputComponent, ClearDefault, ClearDefaultBlock, ClearDefaultFull, ClearDefaultRound, ClearDefaultRoundBlock, ClearDefaultRoundFull, CommentInputComponent, ComponentContentHelper, ComponentStates, ContentLoaderComponent, ContentService, DateInputComponent, DisplayComponent, DividerComponent, DownloadService, EmailInputComponent, ExpandableTextComponent, FileInputComponent, FooterComponent, FormComponent, FormFooterComponent, GlobalContent, HeaderComponent, HintComponent, HourInputComponent, HrefComponent, Icon, IconComponent, IconService, ImageComponent, InAppBrowserService, InputType, ItemListComponent, LANGUAGES, LangService, LanguageSelectorComponent, LayeredCardComponent, LayoutComponent, LinkComponent, LinkProcessorService, LinksCakeComponent, ListContentHelper, LocalStorageService, MOTION, NavigationService, NoContentComponent, NotesBoxComponent, NumberInputComponent, OutlineDefault, OutlineDefaultBlock, OutlineDefaultFull, OutlineDefaultRound, OutlineDefaultRoundBlock, OutlineDefaultRoundFull, PasswordInputComponent, PinInputComponent, PopoverSelectorComponent, PrimarySolidBlockButton, PrimarySolidBlockHrefButton, PrimarySolidBlockIconButton, PrimarySolidBlockIconHrefButton, PrimarySolidDefaultRoundButton, PrimarySolidDefaultRoundHrefButton, PrimarySolidDefaultRoundIconButton, PrimarySolidDefaultRoundIconHrefButton, PrimarySolidFullButton, PrimarySolidFullHrefButton, PrimarySolidFullIconButton, PrimarySolidFullIconHrefButton, PrimarySolidLargeRoundButton, PrimarySolidLargeRoundHrefButton, PrimarySolidLargeRoundIconButton, PrimarySolidLargeRoundIconHrefButton, PrimarySolidSmallRoundButton, PrimarySolidSmallRoundHrefButton, PrimarySolidSmallRoundIconButton, PrimarySolidSmallRoundIconHrefButton, ProcessLinksPipe, ProgressBarComponent, ProgressStatusComponent, PrompterComponent, RadioInputComponent, SearchSelectorComponent, SearchbarComponent, SecondarySolidBlockButton, SecondarySolidBlockHrefButton, SecondarySolidBlockIconButton, SecondarySolidBlockIconHrefButton, SecondarySolidDefaultRoundButton, SecondarySolidDefaultRoundHrefButton, SecondarySolidDefaultRoundIconButton, SecondarySolidDefaultRoundIconHrefButton, SecondarySolidFullButton, SecondarySolidFullHrefButton, SecondarySolidFullIconButton, SecondarySolidFullIconHrefButton, SecondarySolidLargeRoundButton, SecondarySolidLargeRoundHrefButton, SecondarySolidLargeRoundIconButton, SecondarySolidLargeRoundIconHrefButton, SecondarySolidSmallRoundButton, SecondarySolidSmallRoundHrefButton, SecondarySolidSmallRoundIconButton, SecondarySolidSmallRoundIconHrefButton, SelectSearchComponent, SimpleComponent, SolidBlockButton, SolidDefault, SolidDefaultBlock, SolidDefaultButton, SolidDefaultFull, SolidDefaultRound, SolidDefaultRoundBlock, SolidDefaultRoundButton, SolidDefaultRoundFull, SolidFullButton, SolidLargeButton, SolidLargeRoundButton, SolidSmallButton, SolidSmallRoundButton, TextComponent, TextContent, TextInputComponent, ThemeOption, ThemeService, TitleBlockComponent, TitleComponent, ToastService, ToolbarActionType, ToolbarComponent, ValtechConfigService, WizardComponent, WizardFooterComponent, applyDefaultValueToControl, content, createButtonProps, createComponentContentHelper, createContentHelper, createReactiveProps, createTextProps, createTitleProps, fromContent, fromContentWithInterpolation, fromMultipleContent, globalContentData, goToTop, interpolateContent, isAtEnd, maxLength, replaceSpecialChars, resolveColor, resolveInputDefaultValue, shouldUseReactiveContent };
|
|
8101
|
+
export { ARTICLE_SPACING, ActionType, AlertBoxComponent, ArticleBuilder, ArticleComponent, AvatarComponent, BannerComponent, BaseDefault, BoxComponent, ButtonComponent, ButtonGroupComponent, CardComponent, CardSection, CardType, CheckInputComponent, ClearDefault, ClearDefaultBlock, ClearDefaultFull, ClearDefaultRound, ClearDefaultRoundBlock, ClearDefaultRoundFull, CommentInputComponent, ComponentContentHelper, ComponentStates, ContentLoaderComponent, ContentService, DateInputComponent, DisplayComponent, DividerComponent, DownloadService, EmailInputComponent, ExpandableTextComponent, FileInputComponent, FooterComponent, FormComponent, FormFooterComponent, GlobalContent, HeaderComponent, HintComponent, HourInputComponent, HrefComponent, Icon, IconComponent, IconService, ImageComponent, InAppBrowserService, InputType, ItemListComponent, LANGUAGES, LangService, LanguageSelectorComponent, LayeredCardComponent, LayoutComponent, LinkComponent, LinkProcessorService, LinksCakeComponent, ListContentHelper, LocalStorageService, MOTION, NavigationService, NoContentComponent, NotesBoxComponent, NumberInputComponent, OutlineDefault, OutlineDefaultBlock, OutlineDefaultFull, OutlineDefaultRound, OutlineDefaultRoundBlock, OutlineDefaultRoundFull, PasswordInputComponent, PinInputComponent, PopoverSelectorComponent, PrimarySolidBlockButton, PrimarySolidBlockHrefButton, PrimarySolidBlockIconButton, PrimarySolidBlockIconHrefButton, PrimarySolidDefaultRoundButton, PrimarySolidDefaultRoundHrefButton, PrimarySolidDefaultRoundIconButton, PrimarySolidDefaultRoundIconHrefButton, PrimarySolidFullButton, PrimarySolidFullHrefButton, PrimarySolidFullIconButton, PrimarySolidFullIconHrefButton, PrimarySolidLargeRoundButton, PrimarySolidLargeRoundHrefButton, PrimarySolidLargeRoundIconButton, PrimarySolidLargeRoundIconHrefButton, PrimarySolidSmallRoundButton, PrimarySolidSmallRoundHrefButton, PrimarySolidSmallRoundIconButton, PrimarySolidSmallRoundIconHrefButton, ProcessLinksPipe, ProgressBarComponent, ProgressStatusComponent, PrompterComponent, RadioInputComponent, SearchSelectorComponent, SearchbarComponent, SecondarySolidBlockButton, SecondarySolidBlockHrefButton, SecondarySolidBlockIconButton, SecondarySolidBlockIconHrefButton, SecondarySolidDefaultRoundButton, SecondarySolidDefaultRoundHrefButton, SecondarySolidDefaultRoundIconButton, SecondarySolidDefaultRoundIconHrefButton, SecondarySolidFullButton, SecondarySolidFullHrefButton, SecondarySolidFullIconButton, SecondarySolidFullIconHrefButton, SecondarySolidLargeRoundButton, SecondarySolidLargeRoundHrefButton, SecondarySolidLargeRoundIconButton, SecondarySolidLargeRoundIconHrefButton, SecondarySolidSmallRoundButton, SecondarySolidSmallRoundHrefButton, SecondarySolidSmallRoundIconButton, SecondarySolidSmallRoundIconHrefButton, SelectSearchComponent, SimpleComponent, SolidBlockButton, SolidDefault, SolidDefaultBlock, SolidDefaultButton, SolidDefaultFull, SolidDefaultRound, SolidDefaultRoundBlock, SolidDefaultRoundButton, SolidDefaultRoundFull, SolidFullButton, SolidLargeButton, SolidLargeRoundButton, SolidSmallButton, SolidSmallRoundButton, TextComponent, TextContent, TextInputComponent, ThemeOption, ThemeService, TitleBlockComponent, TitleComponent, ToastService, ToolbarActionType, ToolbarComponent, ValtechConfigService, WizardComponent, WizardFooterComponent, applyDefaultValueToControl, content, createButtonProps, createComponentContentHelper, createContentHelper, createReactiveProps, createTextProps, createTitleProps, fromContent, fromContentWithInterpolation, fromMultipleContent, globalContentData, goToTop, interpolateContent, isAtEnd, maxLength, replaceSpecialChars, resolveColor, resolveInputDefaultValue, shouldUseReactiveContent };
|
|
7475
8102
|
//# sourceMappingURL=valtech-components.mjs.map
|