valtech-components 2.0.292 → 2.0.294

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.
Files changed (77) hide show
  1. package/esm2022/lib/components/atoms/avatar/avatar.component.mjs +3 -3
  2. package/esm2022/lib/components/atoms/box/box.component.mjs +3 -3
  3. package/esm2022/lib/components/atoms/button/button.component.mjs +45 -12
  4. package/esm2022/lib/components/atoms/display/display.component.mjs +47 -11
  5. package/esm2022/lib/components/atoms/display/types.mjs +1 -1
  6. package/esm2022/lib/components/atoms/divider/divider.component.mjs +3 -3
  7. package/esm2022/lib/components/atoms/href/href.component.mjs +3 -3
  8. package/esm2022/lib/components/atoms/icon/icon.component.mjs +3 -3
  9. package/esm2022/lib/components/atoms/image/image.component.mjs +3 -3
  10. package/esm2022/lib/components/atoms/progress-bar/progress-bar.component.mjs +3 -3
  11. package/esm2022/lib/components/atoms/text/text.component.mjs +3 -3
  12. package/esm2022/lib/components/atoms/title/title.component.mjs +77 -23
  13. package/esm2022/lib/components/atoms/title/types.mjs +30 -2
  14. package/esm2022/lib/components/molecules/alert-box/alert-box.component.mjs +57 -10
  15. package/esm2022/lib/components/molecules/alert-box/types.mjs +1 -1
  16. package/esm2022/lib/components/molecules/button-group/button-group.component.mjs +3 -3
  17. package/esm2022/lib/components/molecules/card/card.component.mjs +3 -3
  18. package/esm2022/lib/components/molecules/content-loader/content-loader.component.mjs +3 -3
  19. package/esm2022/lib/components/molecules/date-input/date-input.component.mjs +3 -3
  20. package/esm2022/lib/components/molecules/file-input/file-input.component.mjs +3 -3
  21. package/esm2022/lib/components/molecules/hint/hint.component.mjs +3 -3
  22. package/esm2022/lib/components/molecules/language-selector/language-selector.component.mjs +219 -0
  23. package/esm2022/lib/components/molecules/language-selector/types.mjs +2 -0
  24. package/esm2022/lib/components/molecules/layered-card/layered-card.component.mjs +3 -3
  25. package/esm2022/lib/components/molecules/link/link.component.mjs +3 -3
  26. package/esm2022/lib/components/molecules/links-cake/links-cake.component.mjs +3 -3
  27. package/esm2022/lib/components/molecules/notes-box/notes-box.component.mjs +3 -3
  28. package/esm2022/lib/components/molecules/password-input/password-input.component.mjs +3 -3
  29. package/esm2022/lib/components/molecules/pin-input/pin-input.component.mjs +3 -3
  30. package/esm2022/lib/components/molecules/popover-selector/popover-selector.component.mjs +170 -0
  31. package/esm2022/lib/components/molecules/popover-selector/types.mjs +2 -0
  32. package/esm2022/lib/components/molecules/progress-status/progress-status.component.mjs +3 -3
  33. package/esm2022/lib/components/molecules/prompter/prompter.component.mjs +3 -3
  34. package/esm2022/lib/components/molecules/searchbar/searchbar.component.mjs +3 -3
  35. package/esm2022/lib/components/molecules/text-input/text-input.component.mjs +3 -3
  36. package/esm2022/lib/components/molecules/title-block/title-block.component.mjs +3 -3
  37. package/esm2022/lib/components/organisms/banner/banner.component.mjs +3 -3
  38. package/esm2022/lib/components/organisms/form/form.component.mjs +3 -3
  39. package/esm2022/lib/components/organisms/header/header.component.mjs +3 -3
  40. package/esm2022/lib/components/organisms/item-list/item-list.component.mjs +3 -3
  41. package/esm2022/lib/components/organisms/item-list/types.mjs +1 -1
  42. package/esm2022/lib/components/organisms/no-content/no-content.component.mjs +3 -3
  43. package/esm2022/lib/components/organisms/toolbar/toolbar.component.mjs +3 -3
  44. package/esm2022/lib/components/organisms/wizard/wizard.component.mjs +3 -3
  45. package/esm2022/lib/components/templates/layout/layout.component.mjs +2 -2
  46. package/esm2022/lib/components/types.mjs +1 -1
  47. package/esm2022/lib/examples/display-demo.component.mjs +518 -0
  48. package/esm2022/lib/examples/display-simple-example.component.mjs +202 -0
  49. package/esm2022/lib/examples/selector-examples.component.mjs +208 -0
  50. package/esm2022/lib/services/lang-provider/components/display-demo.mjs +86 -0
  51. package/esm2022/lib/services/lang-provider/content.mjs +2 -1
  52. package/esm2022/lib/shared/utils/reactive-content.mjs +117 -0
  53. package/esm2022/public-api.mjs +9 -1
  54. package/fesm2022/valtech-components.mjs +3435 -1844
  55. package/fesm2022/valtech-components.mjs.map +1 -1
  56. package/lib/components/atoms/button/button.component.d.ts +10 -3
  57. package/lib/components/atoms/display/display.component.d.ts +12 -4
  58. package/lib/components/atoms/display/types.d.ts +13 -3
  59. package/lib/components/atoms/title/title.component.d.ts +6 -1
  60. package/lib/components/atoms/title/types.d.ts +29 -3
  61. package/lib/components/molecules/alert-box/alert-box.component.d.ts +17 -9
  62. package/lib/components/molecules/alert-box/types.d.ts +29 -0
  63. package/lib/components/molecules/language-selector/language-selector.component.d.ts +50 -0
  64. package/lib/components/molecules/language-selector/types.d.ts +52 -0
  65. package/lib/components/molecules/popover-selector/popover-selector.component.d.ts +29 -0
  66. package/lib/components/molecules/popover-selector/types.d.ts +69 -0
  67. package/lib/components/organisms/item-list/types.d.ts +54 -9
  68. package/lib/components/types.d.ts +12 -3
  69. package/lib/examples/display-demo.component.d.ts +62 -0
  70. package/lib/examples/display-simple-example.component.d.ts +23 -0
  71. package/lib/examples/selector-examples.component.d.ts +20 -0
  72. package/lib/services/lang-provider/components/display-demo.d.ts +3 -0
  73. package/lib/shared/utils/reactive-content.d.ts +109 -0
  74. package/package.json +4 -2
  75. package/public-api.d.ts +8 -0
  76. package/src/lib/components/styles/overrides.scss +583 -0
  77. package/src/lib/components/styles/variables.scss +7 -3
@@ -1,25 +1,32 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { ContentService } from '../../../services/content.service';
2
4
  import { DownloadService } from '../../../services/download.service';
3
5
  import { IconService } from '../../../services/icons.service';
4
6
  import { NavigationService } from '../../../services/navigation.service';
5
7
  import { ButtonMetadata } from '../../types';
6
8
  import * as i0 from "@angular/core";
7
- export declare class ButtonComponent {
9
+ export declare class ButtonComponent implements OnInit, OnDestroy {
8
10
  private download;
9
11
  private navigation;
12
+ private contentService;
10
13
  states: {
11
14
  ENABLED: "ENABLED";
12
15
  DISABLED: "DISABLED";
13
16
  WORKING: "WORKING";
14
17
  ERROR: "ERROR";
15
18
  };
19
+ displayText$: Observable<string>;
20
+ private subscriptions;
16
21
  props: ButtonMetadata;
17
22
  /**
18
23
  * Event emitted when the button is clicked.
19
24
  */
20
25
  onClick: EventEmitter<string>;
21
- constructor(download: DownloadService, icon: IconService, navigation: NavigationService);
26
+ constructor(download: DownloadService, icon: IconService, navigation: NavigationService, contentService: ContentService);
22
27
  ngOnInit(): void;
28
+ ngOnDestroy(): void;
29
+ private initializeDisplayText;
23
30
  clickHandler(): void;
24
31
  static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
25
32
  static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "val-button", never, { "props": { "alias": "props"; "required": false; }; }, { "onClick": "onClick"; }, never, never, true, never>;
@@ -1,17 +1,25 @@
1
- import { OnInit } from '@angular/core';
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { ContentService } from '../../../services/content.service';
2
4
  import { DisplayMetadata } from './types';
3
5
  import * as i0 from "@angular/core";
4
- export declare class DisplayComponent implements OnInit {
6
+ export declare class DisplayComponent implements OnInit, OnDestroy {
7
+ private contentService;
8
+ displayContent$: Observable<string>;
9
+ private subscriptions;
5
10
  /**
6
11
  * Display configuration object.
7
12
  * @type {DisplayMetadata}
8
- * @property content - The text to display.
13
+ * @property content - Static text to display (takes precedence over contentConfig).
14
+ * @property contentConfig - Reactive content configuration.
9
15
  * @property color - The text color (Ionic color string).
10
16
  * @property size - The text size ('small' | 'medium' | 'large' | 'xlarge').
11
17
  */
12
18
  props: DisplayMetadata;
13
- constructor();
19
+ constructor(contentService: ContentService);
14
20
  ngOnInit(): void;
21
+ ngOnDestroy(): void;
22
+ private initializeDisplayContent;
15
23
  static ɵfac: i0.ɵɵFactoryDeclaration<DisplayComponent, never>;
16
24
  static ɵcmp: i0.ɵɵComponentDeclaration<DisplayComponent, "val-display", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
17
25
  }
@@ -1,13 +1,23 @@
1
1
  import { Color } from '@ionic/core';
2
2
  /**
3
- * Props for val-display component.
3
+ * Props for val-display component with reactive content support.
4
+ * Supports both static and reactive content patterns.
4
5
  *
5
6
  * @property size - The text size ('small' | 'medium' | 'large' | 'xlarge').
6
7
  * @property color - The text color (Ionic color string).
7
- * @property content - The text to display.
8
+ * @property content - Static content text (takes precedence over contentConfig).
9
+ * @property contentConfig - Reactive content configuration.
8
10
  */
9
11
  export interface DisplayMetadata {
10
12
  size: 'small' | 'medium' | 'large' | 'xlarge';
11
13
  color: Color;
12
- content: string;
14
+ /** Static content (takes precedence over contentConfig) */
15
+ content?: string;
16
+ /** Reactive content configuration */
17
+ contentConfig?: {
18
+ className?: string;
19
+ key: string;
20
+ fallback?: string;
21
+ interpolation?: Record<string, any>;
22
+ };
13
23
  }
@@ -1,17 +1,22 @@
1
1
  import { OnInit } from '@angular/core';
2
+ import { Observable } from 'rxjs';
2
3
  import { TitleMetadata } from './types';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class TitleComponent implements OnInit {
5
6
  /**
6
7
  * Title configuration object.
7
8
  * @type {TitleMetadata}
8
- * @property content - The title text to display.
9
+ * @property content - Static title text (takes precedence over reactive content).
10
+ * @property contentConfig - Reactive content configuration.
9
11
  * @property color - The title color (Ionic color string).
10
12
  * @property size - The title size ('small' | 'medium' | 'large' | 'xlarge').
11
13
  * @property bold - Whether the title is bold.
12
14
  * @property thin - Whether the title is thin (optional).
13
15
  */
14
16
  props: TitleMetadata;
17
+ private contentService;
18
+ private contentHelper;
19
+ displayContent$: Observable<string>;
15
20
  constructor();
16
21
  ngOnInit(): void;
17
22
  static ɵfac: i0.ɵɵFactoryDeclaration<TitleComponent, never>;
@@ -1,17 +1,43 @@
1
1
  import { Color } from '@ionic/core';
2
+ import { ReactiveTextMetadata } from '../../../shared/utils/reactive-content';
2
3
  /**
3
4
  * Props for val-title component.
5
+ * Supports both static content and reactive content from the language service.
4
6
  *
5
- * @property content - The title text to display.
7
+ * @property content - Static title text to display (takes precedence over reactive content).
8
+ * @property contentConfig - Reactive content configuration (used when content is not provided).
6
9
  * @property color - The title color (Ionic color string).
7
10
  * @property size - The title size ('small' | 'medium' | 'large' | 'xlarge').
8
11
  * @property bold - Whether the title is bold.
9
12
  * @property thin - Whether the title is thin (optional).
10
13
  */
11
- export interface TitleMetadata {
14
+ export interface TitleMetadata extends ReactiveTextMetadata {
12
15
  size: 'small' | 'medium' | 'large' | 'xlarge';
13
16
  color: Color;
14
- content: string;
15
17
  bold: boolean;
16
18
  thin?: boolean;
17
19
  }
20
+ /**
21
+ * Factory function to create title props with reactive content support.
22
+ *
23
+ * @param styleConfig - Title styling configuration
24
+ * @param contentConfig - Content configuration (static or reactive)
25
+ * @returns Complete TitleMetadata object
26
+ *
27
+ * @example Static content:
28
+ * ```typescript
29
+ * const props = createTitleProps(
30
+ * { size: 'large', color: 'primary', bold: true },
31
+ * { content: 'Static Title' }
32
+ * );
33
+ * ```
34
+ *
35
+ * @example Reactive content:
36
+ * ```typescript
37
+ * const props = createTitleProps(
38
+ * { size: 'large', color: 'primary', bold: true },
39
+ * { contentConfig: { key: 'pageTitle', fallback: 'Default Title' } }
40
+ * );
41
+ * ```
42
+ */
43
+ export declare function createTitleProps(styleConfig: Pick<TitleMetadata, 'size' | 'color' | 'bold' | 'thin'>, contentConfig: Pick<TitleMetadata, 'content' | 'contentConfig'>): TitleMetadata;
@@ -1,17 +1,25 @@
1
- import { OnInit } from '@angular/core';
2
- import { AlertBoxMetadata } from './types';
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { ContentService } from '../../../services/content.service';
3
+ import { AlertBoxMetadata, ReactiveAlertBoxMetadata } from './types';
3
4
  import * as i0 from "@angular/core";
4
- export declare class AlertBoxComponent implements OnInit {
5
+ export declare class AlertBoxComponent implements OnInit, OnDestroy {
6
+ private contentService;
7
+ private subscriptions;
5
8
  /**
6
9
  * Alert box configuration object.
7
- * @type {AlertBoxMetadata}
8
- * @property box - Box configuration (see BoxMetadata).
9
- * @property icon - Icon configuration (see IconMetadata).
10
- * @property text - Text configuration (see TextMetadata).
10
+ * Supports both legacy AlertBoxMetadata and ReactiveAlertBoxMetadata patterns.
11
11
  */
12
- props: AlertBoxMetadata;
13
- constructor();
12
+ props: AlertBoxMetadata | ReactiveAlertBoxMetadata;
13
+ /** Computed text properties for reactive pattern */
14
+ computedTextProps: any;
15
+ /** Whether this is using the legacy props pattern */
16
+ get isLegacyProps(): boolean;
17
+ /** Get text props for legacy pattern */
18
+ getLegacyTextProps(): any;
19
+ constructor(contentService: ContentService);
14
20
  ngOnInit(): void;
21
+ ngOnDestroy(): void;
22
+ private initializeReactiveTextProps;
15
23
  static ɵfac: i0.ɵɵFactoryDeclaration<AlertBoxComponent, never>;
16
24
  static ɵcmp: i0.ɵɵComponentDeclaration<AlertBoxComponent, "val-alert-box", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
17
25
  }
@@ -1,8 +1,37 @@
1
1
  import { BoxMetadata } from '../../atoms/box/types';
2
2
  import { IconMetadata } from '../../atoms/icon/types';
3
3
  import { TextMetadata } from '../../atoms/text/types';
4
+ /**
5
+ * Alert box component metadata with support for reactive content.
6
+ * Provides both static and reactive content options for the text element.
7
+ */
4
8
  export interface AlertBoxMetadata {
5
9
  box: BoxMetadata;
6
10
  icon: IconMetadata;
7
11
  text: TextMetadata;
8
12
  }
13
+ /**
14
+ * Enhanced alert box metadata with simplified reactive content support.
15
+ * Alternative to the standard AlertBoxMetadata for common use cases.
16
+ */
17
+ export interface ReactiveAlertBoxMetadata {
18
+ /** Box styling configuration */
19
+ box: BoxMetadata;
20
+ /** Icon configuration */
21
+ icon: IconMetadata;
22
+ /** Static text (takes precedence over textConfig) */
23
+ text?: string;
24
+ /** Reactive content configuration for alert text */
25
+ textConfig?: {
26
+ className?: string;
27
+ key: string;
28
+ fallback?: string;
29
+ interpolation?: Record<string, any>;
30
+ };
31
+ /** Text styling options */
32
+ textStyle?: {
33
+ size?: 'small' | 'medium' | 'large' | 'xlarge';
34
+ color?: string;
35
+ bold?: boolean;
36
+ };
37
+ }
@@ -0,0 +1,50 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { ContentService } from '../../../services/content.service';
4
+ import { LangService } from '../../../services/lang-provider/lang-provider.service';
5
+ import { LangOption } from '../../../services/lang-provider/types';
6
+ import { PopoverSelectorMetadata } from '../popover-selector/types';
7
+ import { LanguageSelectorMetadata } from './types';
8
+ import * as i0 from "@angular/core";
9
+ export declare class LanguageSelectorComponent implements OnInit, OnDestroy {
10
+ private langService;
11
+ private contentService;
12
+ /**
13
+ * Language selector configuration object.
14
+ * @type {LanguageSelectorMetadata}
15
+ */
16
+ props: LanguageSelectorMetadata;
17
+ /**
18
+ * Event emitted when the language selection changes.
19
+ * Emits the selected language code.
20
+ */
21
+ languageChange: EventEmitter<string>;
22
+ /** Popover selector configuration */
23
+ popoverProps: PopoverSelectorMetadata;
24
+ /** Current language observable */
25
+ currentLanguage$: Observable<LangOption>;
26
+ /** Available languages observable */
27
+ availableLanguages$: Observable<LangOption[]>;
28
+ /** Label observable for reactive content */
29
+ label$: Observable<string>;
30
+ private subscriptions;
31
+ /** Default language display names */
32
+ private readonly defaultLanguageNames;
33
+ /** Default flag icons for languages */
34
+ private readonly defaultLanguageFlags;
35
+ constructor(langService: LangService, contentService: ContentService);
36
+ ngOnInit(): void;
37
+ ngOnDestroy(): void;
38
+ private initializeLanguageState;
39
+ private initializeLabel;
40
+ private initializePopoverProps;
41
+ private updatePopoverProps;
42
+ private getLanguageDisplayName;
43
+ /**
44
+ * Handle language selection change.
45
+ * @param selectedLanguage - The selected language code(s)
46
+ */
47
+ onLanguageChange(selectedLanguage: string | string[]): void;
48
+ static ɵfac: i0.ɵɵFactoryDeclaration<LanguageSelectorComponent, never>;
49
+ static ɵcmp: i0.ɵɵComponentDeclaration<LanguageSelectorComponent, "val-language-selector", never, { "props": { "alias": "props"; "required": false; }; }, { "languageChange": "languageChange"; }, never, never, true, never>;
50
+ }
@@ -0,0 +1,52 @@
1
+ import { Color } from '@ionic/core';
2
+ /**
3
+ * Props for val-language-selector component.
4
+ * A specialized component for language selection.
5
+ *
6
+ * @property currentLanguage - Currently selected language code.
7
+ * @property availableLanguages - Array of available language codes.
8
+ * @property showLabel - Whether to show the label.
9
+ * @property label - Custom label text (static).
10
+ * @property labelConfig - Reactive content configuration for label.
11
+ * @property showFlags - Whether to show flag icons for languages.
12
+ * @property color - Button color (Ionic color string).
13
+ * @property size - Button size ('small' | 'default' | 'large').
14
+ * @property fill - Button fill style ('clear' | 'outline' | 'solid' | 'default').
15
+ * @property shape - Button shape ('round' | undefined).
16
+ * @property expand - Button expansion ('full' | 'block' | undefined).
17
+ * @property disabled - Whether the selector is disabled.
18
+ * @property customLanguageNames - Custom display names for languages.
19
+ */
20
+ export interface LanguageSelectorMetadata {
21
+ /** Currently selected language code */
22
+ currentLanguage?: string;
23
+ /** Array of available language codes */
24
+ availableLanguages?: string[];
25
+ /** Whether to show the label */
26
+ showLabel?: boolean;
27
+ /** Static label text (takes precedence over labelConfig) */
28
+ label?: string;
29
+ /** Reactive content configuration for label */
30
+ labelConfig?: {
31
+ className?: string;
32
+ key: string;
33
+ fallback?: string;
34
+ interpolation?: Record<string, any>;
35
+ };
36
+ /** Whether to show flag icons for languages */
37
+ showFlags?: boolean;
38
+ /** Button color */
39
+ color?: Color;
40
+ /** Button size */
41
+ size?: 'small' | 'default' | 'large';
42
+ /** Button fill style */
43
+ fill?: 'clear' | 'outline' | 'solid' | 'default';
44
+ /** Button shape */
45
+ shape?: 'round';
46
+ /** Button expansion */
47
+ expand?: 'full' | 'block';
48
+ /** Whether the selector is disabled */
49
+ disabled?: boolean;
50
+ /** Custom display names for languages */
51
+ customLanguageNames?: Record<string, string>;
52
+ }
@@ -0,0 +1,29 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { PopoverSelectorMetadata } from './types';
3
+ import * as i0 from "@angular/core";
4
+ export declare class PopoverSelectorComponent {
5
+ /**
6
+ * Popover selector configuration object.
7
+ * @type {PopoverSelectorMetadata}
8
+ */
9
+ props: PopoverSelectorMetadata;
10
+ /**
11
+ * Event emitted when the selection changes.
12
+ * Emits the selected value(s).
13
+ */
14
+ selectionChange: EventEmitter<string | string[]>;
15
+ constructor();
16
+ /**
17
+ * Handle selection change from the ion-select.
18
+ * @param event - The ion-select change event
19
+ */
20
+ onSelectionChange(event: any): void;
21
+ /**
22
+ * Get the display text for the trigger button.
23
+ * Shows the selected option's label or placeholder.
24
+ * @returns The display text
25
+ */
26
+ getDisplayText(): string;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<PopoverSelectorComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<PopoverSelectorComponent, "val-popover-selector", never, { "props": { "alias": "props"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
29
+ }
@@ -0,0 +1,69 @@
1
+ import { Color } from '@ionic/core';
2
+ /**
3
+ * Option for the popover selector.
4
+ */
5
+ export interface PopoverOption {
6
+ /** Option value */
7
+ value: string;
8
+ /** Option display label */
9
+ label: string;
10
+ /** Option icon (optional) */
11
+ icon?: string;
12
+ /** Whether the option is disabled */
13
+ disabled?: boolean;
14
+ }
15
+ /**
16
+ * Props for val-popover-selector component.
17
+ * A generic reusable popover selector component.
18
+ *
19
+ * @property options - Array of selectable options.
20
+ * @property selectedValue - Currently selected value.
21
+ * @property label - Display label for the selector.
22
+ * @property icon - Icon to display in the trigger button (optional).
23
+ * @property placeholder - Placeholder text when no option is selected.
24
+ * @property color - Button color (Ionic color string).
25
+ * @property size - Button size ('small' | 'default' | 'large').
26
+ * @property fill - Button fill style ('clear' | 'outline' | 'solid' | 'default').
27
+ * @property shape - Button shape ('round' | undefined).
28
+ * @property expand - Button expansion ('full' | 'block' | undefined).
29
+ * @property disabled - Whether the selector is disabled.
30
+ * @property interface - Popover interface style ('popover' | 'action-sheet' | 'alert').
31
+ * @property showCheckmark - Whether to show checkmarks for selected options.
32
+ * @property multiple - Whether multiple selection is allowed.
33
+ * @property cancelText - Text for cancel button.
34
+ * @property okText - Text for OK button.
35
+ */
36
+ export interface PopoverSelectorMetadata {
37
+ /** Array of selectable options */
38
+ options: PopoverOption[];
39
+ /** Currently selected value(s) */
40
+ selectedValue?: string | string[];
41
+ /** Display label for the selector */
42
+ label?: string;
43
+ /** Icon to display in the trigger */
44
+ icon?: string;
45
+ /** Placeholder text when no option is selected */
46
+ placeholder?: string;
47
+ /** Button color */
48
+ color?: Color;
49
+ /** Button size */
50
+ size?: 'small' | 'default' | 'large';
51
+ /** Button fill style */
52
+ fill?: 'clear' | 'outline' | 'solid' | 'default';
53
+ /** Button shape */
54
+ shape?: 'round';
55
+ /** Button expansion */
56
+ expand?: 'full' | 'block';
57
+ /** Whether the selector is disabled */
58
+ disabled?: boolean;
59
+ /** Popover interface style */
60
+ interface?: 'popover' | 'action-sheet' | 'alert';
61
+ /** Whether to show checkmarks for selected options */
62
+ showCheckmark?: boolean;
63
+ /** Whether multiple selection is allowed */
64
+ multiple?: boolean;
65
+ /** Cancel button text */
66
+ cancelText?: string;
67
+ /** OK button text */
68
+ okText?: string;
69
+ }
@@ -6,27 +6,40 @@ import { Color } from '@ionic/core';
6
6
  import { ComponentState } from '../../types';
7
7
  /**
8
8
  * Representa una acción disponible en un elemento de la lista.
9
+ * Ahora soporta contenido reactivo para la descripción.
9
10
  * @property token Identificador único de la acción.
10
11
  * @property icon (opcional) Icono a mostrar.
11
- * @property description Descripción de la acción.
12
+ * @property description (opcional) Descripción estática de la acción.
13
+ * @property descriptionConfig (opcional) Configuración de contenido reactivo para la descripción.
12
14
  * @property state Estado de la acción (habilitado, deshabilitado, trabajando, etc).
13
15
  */
14
16
  export type ItemAction = {
15
17
  token: string;
16
18
  icon?: string;
17
- description: string;
19
+ description?: string;
20
+ descriptionConfig?: {
21
+ className?: string;
22
+ key: string;
23
+ fallback?: string;
24
+ interpolation?: Record<string, any>;
25
+ };
18
26
  state: ComponentState;
19
27
  };
20
28
  /**
21
29
  * Metadatos de un elemento individual de la lista.
30
+ * Ahora soporta contenido reactivo para todos los campos de texto.
22
31
  * @property token (opcional) Identificador único del elemento.
23
32
  * @property mode Modo de visualización ('justext', 'subtitule', 'avatar', 'icon', 'route', 'actionable').
24
- * @property text Texto principal del elemento.
33
+ * @property text (opcional) Texto estático principal del elemento.
34
+ * @property textConfig (opcional) Configuración de contenido reactivo para el texto principal.
25
35
  * @property image (opcional) Imagen para modo avatar.
26
36
  * @property icon (opcional) Icono para modo icon.
27
- * @property comments (opcional) Comentarios o notas.
28
- * @property subtitle (opcional) Subtítulo.
29
- * @property endNote (opcional) Nota al final del elemento.
37
+ * @property comments (opcional) Comentarios estáticos.
38
+ * @property commentsConfig (opcional) Configuración de contenido reactivo para comentarios.
39
+ * @property subtitle (opcional) Subtítulo estático.
40
+ * @property subtitleConfig (opcional) Configuración de contenido reactivo para subtítulo.
41
+ * @property endNote (opcional) Nota estática al final del elemento.
42
+ * @property endNoteConfig (opcional) Configuración de contenido reactivo para la nota final.
30
43
  * @property actions (opcional) Acciones disponibles para el elemento.
31
44
  * @property color (opcional) Color personalizado.
32
45
  * @property lines (opcional) Tipo de líneas ('full', 'inset', 'none').
@@ -43,12 +56,36 @@ export type ItemAction = {
43
56
  export interface ItemMetadata {
44
57
  token?: string;
45
58
  mode: 'justext' | 'subtitule' | 'avatar' | 'icon' | 'route' | 'actionable';
46
- text: string;
59
+ text?: string;
60
+ textConfig?: {
61
+ className?: string;
62
+ key: string;
63
+ fallback?: string;
64
+ interpolation?: Record<string, any>;
65
+ };
47
66
  image?: string;
48
67
  icon?: string;
49
68
  comments?: string;
69
+ commentsConfig?: {
70
+ className?: string;
71
+ key: string;
72
+ fallback?: string;
73
+ interpolation?: Record<string, any>;
74
+ };
50
75
  subtitle?: string;
76
+ subtitleConfig?: {
77
+ className?: string;
78
+ key: string;
79
+ fallback?: string;
80
+ interpolation?: Record<string, any>;
81
+ };
51
82
  endNote?: string;
83
+ endNoteConfig?: {
84
+ className?: string;
85
+ key: string;
86
+ fallback?: string;
87
+ interpolation?: Record<string, any>;
88
+ };
52
89
  actions?: ItemAction[];
53
90
  color?: string;
54
91
  lines?: 'full' | 'inset' | 'none';
@@ -64,11 +101,13 @@ export interface ItemMetadata {
64
101
  }
65
102
  /**
66
103
  * Metadatos de la lista de elementos.
104
+ * Ahora soporta contenido reactivo para el título.
67
105
  * @property color Color principal de la lista.
68
106
  * @property bordered Si la lista tiene borde.
69
107
  * @property rounded Si la lista tiene bordes redondeados.
70
108
  * @property shadowed Si la lista tiene sombra.
71
- * @property title Título de la lista.
109
+ * @property title (opcional) Título estático de la lista.
110
+ * @property titleConfig (opcional) Configuración de contenido reactivo para el título.
72
111
  * @property items Elementos a mostrar en la lista.
73
112
  */
74
113
  export interface ListMetadata {
@@ -76,6 +115,12 @@ export interface ListMetadata {
76
115
  bordered: boolean;
77
116
  rounded: boolean;
78
117
  shadowed: boolean;
79
- title: string;
118
+ title?: string;
119
+ titleConfig?: {
120
+ className?: string;
121
+ key: string;
122
+ fallback?: string;
123
+ interpolation?: Record<string, any>;
124
+ };
80
125
  items: ItemMetadata[];
81
126
  }
@@ -177,8 +177,10 @@ export interface IconMetada {
177
177
  }
178
178
  /**
179
179
  * Button configuration object.
180
+ * Supports both static and reactive content.
180
181
  * @type {ButtonMetadata}
181
- * @property text - The button label.
182
+ * @property text - Static button label (takes precedence over textConfig).
183
+ * @property textConfig - Reactive content configuration for button text.
182
184
  * @property color - The button color (Ionic color string).
183
185
  * @property icon - Icon to display (optional).
184
186
  * @property state - Button state (enabled, disabled, working, etc.).
@@ -201,8 +203,15 @@ export interface ButtonMetadata {
201
203
  color: Color;
202
204
  /** Button state */
203
205
  state: ComponentState;
204
- /** Display text */
205
- text: string;
206
+ /** Static display text (takes precedence over textConfig) */
207
+ text?: string;
208
+ /** Reactive content configuration for button text */
209
+ textConfig?: {
210
+ className?: string;
211
+ key: string;
212
+ fallback?: string;
213
+ interpolation?: Record<string, any>;
214
+ };
206
215
  /** Associated icon */
207
216
  icon?: IconMetada;
208
217
  /** Button shape */
@@ -0,0 +1,62 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { DisplayMetadata } from '../components/atoms/display/types';
4
+ import { LanguageSelectorMetadata } from '../components/molecules/language-selector/types';
5
+ import { ContentService } from '../services/content.service';
6
+ import { LangService } from '../services/lang-provider/lang-provider.service';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * Componente de demostración para val-display con contenido reactivo.
10
+ * Muestra diferentes patrones de uso y casos de ejemplo.
11
+ */
12
+ export declare class DisplayDemoComponent implements OnInit {
13
+ private contentService;
14
+ private langService;
15
+ demoTitle$: Observable<string>;
16
+ languageLabel$: Observable<string>;
17
+ staticSectionTitle$: Observable<string>;
18
+ reactiveSectionTitle$: Observable<string>;
19
+ mixedSectionTitle$: Observable<string>;
20
+ dynamicSectionTitle$: Observable<string>;
21
+ analysisTitle$: Observable<string>;
22
+ reactiveContentTitle$: Observable<string>;
23
+ interpolationTitle$: Observable<string>;
24
+ fallbackTitle$: Observable<string>;
25
+ mixedContentTitle$: Observable<string>;
26
+ dynamicContentTitle$: Observable<string>;
27
+ updateButtonText$: Observable<string>;
28
+ currentLangLabel$: Observable<string>;
29
+ availableLangsLabel$: Observable<string>;
30
+ currentLanguage$: Observable<string>;
31
+ availableLanguages$: Observable<string[]>;
32
+ private counter;
33
+ languageSelectorProps: LanguageSelectorMetadata;
34
+ smallStaticDisplay: DisplayMetadata;
35
+ mediumStaticDisplay: DisplayMetadata;
36
+ largeStaticDisplay: DisplayMetadata;
37
+ xlargeStaticDisplay: DisplayMetadata;
38
+ primaryDisplay: DisplayMetadata;
39
+ secondaryDisplay: DisplayMetadata;
40
+ successDisplay: DisplayMetadata;
41
+ warningDisplay: DisplayMetadata;
42
+ dangerDisplay: DisplayMetadata;
43
+ welcomeDisplay: DisplayMetadata;
44
+ descriptionDisplay: DisplayMetadata;
45
+ statusDisplay: DisplayMetadata;
46
+ userWelcomeDisplay: DisplayMetadata;
47
+ counterDisplay: DisplayMetadata;
48
+ missingKeyDisplay: DisplayMetadata;
49
+ noFallbackDisplay: DisplayMetadata;
50
+ staticMixedDisplay: DisplayMetadata;
51
+ reactiveMixedDisplay: DisplayMetadata;
52
+ dynamicCounterDisplay: DisplayMetadata;
53
+ constructor(contentService: ContentService, langService: LangService);
54
+ ngOnInit(): void;
55
+ private initializeContent;
56
+ private initializeLanguageState;
57
+ changeLanguage(language: string): void;
58
+ onLanguageChange(language: string): void;
59
+ updateCounter(): void;
60
+ static ɵfac: i0.ɵɵFactoryDeclaration<DisplayDemoComponent, never>;
61
+ static ɵcmp: i0.ɵɵComponentDeclaration<DisplayDemoComponent, "val-display-demo", never, {}, {}, never, never, true, never>;
62
+ }