valtech-components 2.0.810 → 2.0.813
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/faq/faq.component.mjs +65 -25
- package/esm2022/lib/config/company-footer.config.mjs +4 -2
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +367 -327
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/faq/faq.component.d.ts +17 -9
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FaqCategory, FaqMetadata } from './types';
|
|
1
|
+
import { ArticleMetadata } from '../article/types';
|
|
2
|
+
import { FaqCategory, FaqItem, FaqMetadata } from './types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* `val-faq`
|
|
@@ -9,7 +9,9 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
* reusar la misma data (`FaqMetadata.categories`) para emitir el structured
|
|
10
10
|
* data `FAQPage` (JSON-LD) y ganar rich results en buscadores.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* Las respuestas (`FaqItem.answer`) son **Markdown** — se parsean con
|
|
13
|
+
* `parseMarkdownArticle` y se renderizan vía `val-article`. Soportan links,
|
|
14
|
+
* listas, negritas, tablas, etc.
|
|
13
15
|
*
|
|
14
16
|
* @example
|
|
15
17
|
* ```html
|
|
@@ -20,18 +22,24 @@ export declare class FaqComponent {
|
|
|
20
22
|
private readonly props_;
|
|
21
23
|
set props(value: FaqMetadata | undefined);
|
|
22
24
|
get props(): FaqMetadata;
|
|
23
|
-
/** Término de búsqueda actual
|
|
25
|
+
/** Término de búsqueda actual. */
|
|
24
26
|
private readonly query;
|
|
25
27
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
28
|
+
* Cache de respuestas parseadas (Markdown → ArticleMetadata). Se reconstruye
|
|
29
|
+
* solo cuando cambian las categorías — el parseo NO corre por keystroke.
|
|
30
|
+
* Keyed por id de item (los ids son únicos en toda la FAQ).
|
|
31
|
+
*/
|
|
32
|
+
private readonly parsedAnswers;
|
|
33
|
+
/** Respuesta parseada de un item — desde el cache. */
|
|
34
|
+
answerOf(item: FaqItem): ArticleMetadata;
|
|
35
|
+
/**
|
|
36
|
+
* Categorías visibles tras el filtro. Una categoría desaparece si ninguna
|
|
37
|
+
* de sus preguntas matchea. Match sobre pregunta + respuesta (raw markdown),
|
|
38
|
+
* case-insensitive.
|
|
29
39
|
*/
|
|
30
40
|
readonly visibleCategories: import("@angular/core").Signal<FaqCategory[]>;
|
|
31
41
|
/** `true` si se debe mostrar el label de cada categoría. */
|
|
32
42
|
readonly showCategoryLabel: import("@angular/core").Signal<boolean>;
|
|
33
|
-
/** Mapea una categoría a `AccordionMetadata` para `val-accordion`. */
|
|
34
|
-
accordionFor(cat: FaqCategory): AccordionMetadata;
|
|
35
43
|
onSearch(term: string): void;
|
|
36
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<FaqComponent, never>;
|
|
37
45
|
static ɵcmp: i0.ɵɵComponentDeclaration<FaqComponent, "val-faq", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
|
package/lib/version.d.ts
CHANGED