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.
@@ -1,5 +1,5 @@
1
- import { AccordionMetadata } from '../../molecules/accordion/types';
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
- * Compone `val-accordion` (una por categoría) + `val-searchbar`.
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 (lowercase). */
25
+ /** Término de búsqueda actual. */
24
26
  private readonly query;
25
27
  /**
26
- * Categorías visibles tras aplicar el filtro de búsqueda. Una categoría
27
- * desaparece si ninguna de sus preguntas matchea. El match es sobre
28
- * pregunta + respuesta, case-insensitive.
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
@@ -2,4 +2,4 @@
2
2
  * Current version of valtech-components.
3
3
  * This is automatically updated during the publish process.
4
4
  */
5
- export declare const VERSION = "2.0.810";
5
+ export declare const VERSION = "2.0.813";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.810",
3
+ "version": "2.0.813",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"