valtech-components 2.0.712 → 2.0.714

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 (54) hide show
  1. package/esm2022/lib/components/organisms/cards-carousel/cards-carousel.component.mjs +63 -16
  2. package/esm2022/lib/components/organisms/cards-carousel/types.mjs +1 -1
  3. package/esm2022/lib/components/templates/simple/simple.component.mjs +7 -9
  4. package/esm2022/lib/services/auth/auth.service.mjs +33 -17
  5. package/esm2022/lib/services/content/content-types/blog.mjs +275 -0
  6. package/esm2022/lib/services/content/content-types/documentation.mjs +303 -0
  7. package/esm2022/lib/services/content/content-types/news.mjs +277 -0
  8. package/esm2022/lib/services/content/index.mjs +51 -0
  9. package/esm2022/lib/services/content/transformer.mjs +265 -0
  10. package/esm2022/lib/services/content/types.mjs +41 -0
  11. package/esm2022/lib/services/firebase/firestore-collection.mjs +4 -5
  12. package/esm2022/lib/services/firebase/firestore.service.mjs +23 -9
  13. package/esm2022/lib/services/firebase/notifications.service.mjs +23 -18
  14. package/esm2022/lib/version.mjs +2 -2
  15. package/esm2022/public-api.mjs +2 -14
  16. package/fesm2022/valtech-components.mjs +9559 -10275
  17. package/fesm2022/valtech-components.mjs.map +1 -1
  18. package/lib/components/organisms/bottom-nav/bottom-nav.component.d.ts +1 -1
  19. package/lib/components/organisms/cards-carousel/cards-carousel.component.d.ts +12 -6
  20. package/lib/components/organisms/cards-carousel/types.d.ts +32 -3
  21. package/lib/services/content/content-types/blog.d.ts +148 -0
  22. package/lib/services/content/content-types/documentation.d.ts +183 -0
  23. package/lib/services/content/content-types/news.d.ts +162 -0
  24. package/lib/services/content/index.d.ts +49 -0
  25. package/lib/services/content/transformer.d.ts +96 -0
  26. package/lib/services/content/types.d.ts +220 -0
  27. package/lib/services/firebase/firestore-collection.d.ts +2 -2
  28. package/lib/services/firebase/firestore.service.d.ts +5 -0
  29. package/lib/services/firebase/notifications.service.d.ts +3 -2
  30. package/lib/version.d.ts +1 -1
  31. package/package.json +5 -5
  32. package/public-api.d.ts +1 -11
  33. package/esm2022/lib/components/molecules/participant-card/participant-card.component.mjs +0 -514
  34. package/esm2022/lib/components/molecules/participant-card/types.mjs +0 -21
  35. package/esm2022/lib/components/molecules/raffle-status-card/raffle-status-card.component.mjs +0 -476
  36. package/esm2022/lib/components/molecules/raffle-status-card/types.mjs +0 -23
  37. package/esm2022/lib/components/molecules/recap-card/recap-card.component.mjs +0 -78
  38. package/esm2022/lib/components/molecules/recap-card/types.mjs +0 -2
  39. package/esm2022/lib/components/molecules/ticket-grid/ticket-grid.component.mjs +0 -489
  40. package/esm2022/lib/components/molecules/ticket-grid/types.mjs +0 -11
  41. package/esm2022/lib/components/molecules/winner-display/types.mjs +0 -9
  42. package/esm2022/lib/components/molecules/winner-display/winner-display.component.mjs +0 -359
  43. package/esm2022/lib/components/templates/layout/layout.component.mjs +0 -19
  44. package/lib/components/molecules/participant-card/participant-card.component.d.ts +0 -34
  45. package/lib/components/molecules/participant-card/types.d.ts +0 -132
  46. package/lib/components/molecules/raffle-status-card/raffle-status-card.component.d.ts +0 -21
  47. package/lib/components/molecules/raffle-status-card/types.d.ts +0 -108
  48. package/lib/components/molecules/recap-card/recap-card.component.d.ts +0 -36
  49. package/lib/components/molecules/recap-card/types.d.ts +0 -30
  50. package/lib/components/molecules/ticket-grid/ticket-grid.component.d.ts +0 -40
  51. package/lib/components/molecules/ticket-grid/types.d.ts +0 -122
  52. package/lib/components/molecules/winner-display/types.d.ts +0 -103
  53. package/lib/components/molecules/winner-display/winner-display.component.d.ts +0 -36
  54. package/lib/components/templates/layout/layout.component.d.ts +0 -5
@@ -1,108 +0,0 @@
1
- import { Color } from '@ionic/core';
2
- import { ImageMetadata } from '../../atoms/image/types';
3
- import { ButtonMetadata } from '../../types';
4
- /**
5
- * Raffle status type.
6
- */
7
- export type RaffleStatus = 'upcoming' | 'active' | 'sold_out' | 'drawing' | 'completed' | 'cancelled';
8
- /**
9
- * Raffle progress information.
10
- */
11
- export interface RaffleProgress {
12
- /** Total tickets available */
13
- totalTickets: number;
14
- /** Tickets sold */
15
- soldTickets: number;
16
- /** Tickets reserved (not paid) */
17
- reservedTickets?: number;
18
- /** Goal amount (monetary) */
19
- goalAmount?: number;
20
- /** Current amount raised */
21
- currentAmount?: number;
22
- }
23
- /**
24
- * Prize information for the raffle.
25
- */
26
- export interface RafflePrize {
27
- /** Prize name */
28
- name: string;
29
- /** Prize description */
30
- description?: string;
31
- /** Prize image */
32
- image?: ImageMetadata;
33
- /** Prize value */
34
- value?: number;
35
- /** Currency for value */
36
- currency?: string;
37
- }
38
- /**
39
- * Metadata for the raffle status card component.
40
- */
41
- export interface RaffleStatusCardMetadata {
42
- /** Raffle title */
43
- title: string;
44
- /** Raffle description */
45
- description?: string;
46
- /** Current status */
47
- status: RaffleStatus;
48
- /** Progress information */
49
- progress?: RaffleProgress;
50
- /** Prize information */
51
- prize?: RafflePrize;
52
- /** Cover image */
53
- coverImage?: ImageMetadata;
54
- /** Raffle start date */
55
- startDate?: Date | string;
56
- /** Raffle end date / draw date */
57
- endDate?: Date | string;
58
- /** Show countdown to end date */
59
- showCountdown?: boolean;
60
- /** Ticket price */
61
- ticketPrice?: number;
62
- /** Currency */
63
- currency?: string;
64
- /** Currency symbol */
65
- currencySymbol?: string;
66
- /** Card variant */
67
- variant?: 'default' | 'featured' | 'compact' | 'horizontal';
68
- /** Size */
69
- size?: 'small' | 'medium' | 'large';
70
- /** Show progress bar */
71
- showProgress?: boolean;
72
- /** Show ticket stats */
73
- showTicketStats?: boolean;
74
- /** Show price */
75
- showPrice?: boolean;
76
- /** Show dates */
77
- showDates?: boolean;
78
- /** Show status badge */
79
- showStatusBadge?: boolean;
80
- /** Primary action button */
81
- primaryAction?: ButtonMetadata;
82
- /** Secondary action button */
83
- secondaryAction?: ButtonMetadata;
84
- /** Custom CSS class */
85
- cssClass?: string;
86
- /** Status color override */
87
- statusColor?: Color;
88
- /** Beneficiary name */
89
- beneficiary?: string;
90
- /** Beneficiary logo/image */
91
- beneficiaryImage?: ImageMetadata;
92
- /** Custom status labels */
93
- statusLabels?: Partial<Record<RaffleStatus, string>>;
94
- /** Content class for reactive content */
95
- contentClass?: string;
96
- /** Content key for title */
97
- titleContentKey?: string;
98
- /** Content key for description */
99
- descriptionContentKey?: string;
100
- }
101
- /**
102
- * Default status labels.
103
- */
104
- export declare const DEFAULT_STATUS_LABELS: Record<RaffleStatus, string>;
105
- /**
106
- * Default status colors.
107
- */
108
- export declare const DEFAULT_STATUS_COLORS: Record<RaffleStatus, Color>;
@@ -1,36 +0,0 @@
1
- import { RecapCardMetadata, RecapCardShape } from './types';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * val-recap-card
5
- *
6
- * A decorative card component with geometric shapes, title, and link.
7
- * Useful for recap sections, feature highlights, or promotional content.
8
- *
9
- * @example
10
- * <val-recap-card
11
- * [props]="{
12
- * title: { title: 'Feature Title', subtitle: 'Subtitle here' },
13
- * link: { text: 'Learn more', url: '/features' },
14
- * color: 'primary',
15
- * shapes: [
16
- * { color: '#ffffff33', style: { top: '-20px', right: '-20px', width: '100px', height: '100px' } }
17
- * ]
18
- * }"
19
- * ></val-recap-card>
20
- *
21
- * @input props - Card configuration (title, link, shapes, color)
22
- */
23
- export declare class RecapCardComponent {
24
- /**
25
- * Card configuration.
26
- */
27
- props: RecapCardMetadata;
28
- /**
29
- * Merges shape color with additional styles.
30
- */
31
- mergeShapeStyle(shape: RecapCardShape): {
32
- [key: string]: string | number;
33
- };
34
- static ɵfac: i0.ɵɵFactoryDeclaration<RecapCardComponent, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<RecapCardComponent, "val-recap-card", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
36
- }
@@ -1,30 +0,0 @@
1
- import { LinkMetadata } from '../link/types';
2
- import { TitleBlockMetada } from '../title-block/types';
3
- /**
4
- * Configuration for a decorative shape within the recap card.
5
- */
6
- export interface RecapCardShape {
7
- /** Background color of the shape */
8
- color: string;
9
- /** Additional CSS styles (position, size, etc.) */
10
- style?: {
11
- [key: string]: string | number;
12
- };
13
- }
14
- /**
15
- * Configuration for the recap card component.
16
- */
17
- export interface RecapCardMetadata {
18
- /** Title block configuration */
19
- title: TitleBlockMetada;
20
- /** Link configuration */
21
- link: LinkMetadata;
22
- /** Decorative shapes to display behind content */
23
- shapes?: RecapCardShape[];
24
- /** Background color of the card (Ionic color) */
25
- color?: string;
26
- /** Minimum height of the card. Default: '400px' */
27
- minHeight?: string;
28
- /** Width of the card. Default: '280px' */
29
- width?: string;
30
- }
@@ -1,40 +0,0 @@
1
- import { EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
2
- import { TicketGridMetadata, TicketGridSelectionEvent, TicketGridClickEvent, TicketData, TicketGridLegendItem } from './types';
3
- import * as i0 from "@angular/core";
4
- export declare class TicketGridComponent implements OnInit, OnChanges {
5
- props: TicketGridMetadata;
6
- selectionChange: EventEmitter<TicketGridSelectionEvent>;
7
- ticketClick: EventEmitter<TicketGridClickEvent>;
8
- tickets: TicketData[];
9
- displayedTickets: TicketData[];
10
- selectedTickets: number[];
11
- searchTerm: string;
12
- highlightedNumbers: number[];
13
- ngOnInit(): void;
14
- ngOnChanges(changes: SimpleChanges): void;
15
- private buildTickets;
16
- private applySearch;
17
- onSearch(event: CustomEvent): void;
18
- isHighlighted(number: number): boolean;
19
- isSelectable(ticket: TicketData): boolean;
20
- onTicketClick(ticket: TicketData): void;
21
- selectRandom(): void;
22
- /**
23
- * Clear all selections.
24
- */
25
- clearSelection(): void;
26
- /**
27
- * Get selected ticket numbers.
28
- */
29
- getSelectedTickets(): number[];
30
- get availableCount(): number;
31
- get soldCount(): number;
32
- getLegendItems(): TicketGridLegendItem[];
33
- formatNumber(num: number): string;
34
- getTicketAriaLabel(ticket: TicketData): string;
35
- getSearchPlaceholder(): string;
36
- getRandomSelectLabel(): string;
37
- getColor(): string;
38
- static ɵfac: i0.ɵɵFactoryDeclaration<TicketGridComponent, never>;
39
- static ɵcmp: i0.ɵɵComponentDeclaration<TicketGridComponent, "val-ticket-grid", never, { "props": { "alias": "props"; "required": false; }; }, { "selectionChange": "selectionChange"; "ticketClick": "ticketClick"; }, never, never, true, never>;
40
- }
@@ -1,122 +0,0 @@
1
- import { Color } from '@ionic/core';
2
- /**
3
- * Ticket status in the grid.
4
- */
5
- export type TicketStatus = 'available' | 'sold' | 'reserved' | 'selected' | 'disabled';
6
- /**
7
- * Individual ticket data.
8
- */
9
- export interface TicketData {
10
- /** Ticket number */
11
- number: number;
12
- /** Ticket status */
13
- status: TicketStatus;
14
- /** Optional owner name (for sold tickets) */
15
- owner?: string;
16
- /** Optional custom label */
17
- label?: string;
18
- }
19
- /**
20
- * Legend item for ticket grid.
21
- */
22
- export interface TicketGridLegendItem {
23
- /** Status this legend represents */
24
- status: TicketStatus;
25
- /** Display label */
26
- label: string;
27
- /** Optional count */
28
- count?: number;
29
- }
30
- /**
31
- * Metadata for the ticket grid component.
32
- */
33
- export interface TicketGridMetadata {
34
- /** Total number of tickets */
35
- totalTickets: number;
36
- /** Starting ticket number (default: 1) */
37
- startNumber?: number;
38
- /** Numbers of sold tickets */
39
- soldTickets?: number[];
40
- /** Numbers of reserved tickets */
41
- reservedTickets?: number[];
42
- /** Numbers of disabled tickets */
43
- disabledTickets?: number[];
44
- /** Currently selected tickets */
45
- selectedTickets?: number[];
46
- /** Custom ticket data (overrides computed status) */
47
- ticketData?: TicketData[];
48
- /** Selection mode */
49
- selectionMode?: 'single' | 'multiple' | 'none';
50
- /** Maximum tickets that can be selected */
51
- maxSelection?: number;
52
- /** Minimum tickets required */
53
- minSelection?: number;
54
- /** Allow selecting sold/reserved tickets (for admin) */
55
- allowSelectSold?: boolean;
56
- /** Number of columns */
57
- columns?: number;
58
- /** Show legend */
59
- showLegend?: boolean;
60
- /** Legend position */
61
- legendPosition?: 'top' | 'bottom';
62
- /** Custom legend items */
63
- legendItems?: TicketGridLegendItem[];
64
- /** Show ticket count summary */
65
- showSummary?: boolean;
66
- /** Show search/filter input */
67
- showSearch?: boolean;
68
- /** Search placeholder */
69
- searchPlaceholder?: string;
70
- /** Ticket number padding (e.g., 3 = "001") */
71
- numberPadding?: number;
72
- /** Component color for selected state */
73
- color?: Color;
74
- /** Ticket size */
75
- ticketSize?: 'small' | 'medium' | 'large';
76
- /** Grid gap */
77
- gap?: number;
78
- /** Custom CSS class */
79
- cssClass?: string;
80
- /** Show random selection button */
81
- showRandomSelect?: boolean;
82
- /** Random selection count */
83
- randomSelectCount?: number;
84
- /** Random select button label */
85
- randomSelectLabel?: string;
86
- /** Content key for search placeholder */
87
- searchPlaceholderContentKey?: string;
88
- /** Content key for random select label */
89
- randomSelectLabelContentKey?: string;
90
- /** Content class for reactive content */
91
- contentClass?: string;
92
- }
93
- /**
94
- * Event emitted when selection changes.
95
- */
96
- export interface TicketGridSelectionEvent {
97
- /** Currently selected ticket numbers */
98
- selectedTickets: number[];
99
- /** Last changed ticket number */
100
- changedTicket: number;
101
- /** Whether the ticket was selected or deselected */
102
- action: 'select' | 'deselect';
103
- /** Total count of selected tickets */
104
- count: number;
105
- /** Whether max selection reached */
106
- maxReached: boolean;
107
- }
108
- /**
109
- * Event emitted when a ticket is clicked (regardless of selection).
110
- */
111
- export interface TicketGridClickEvent {
112
- /** Ticket number */
113
- number: number;
114
- /** Ticket status */
115
- status: TicketStatus;
116
- /** Whether it was selected/deselected (null if not selectable) */
117
- selected: boolean | null;
118
- }
119
- /**
120
- * Default legend labels in Spanish.
121
- */
122
- export declare const DEFAULT_LEGEND_LABELS: Record<TicketStatus, string>;
@@ -1,103 +0,0 @@
1
- import { Color } from '@ionic/core';
2
- import { AvatarMetadata } from '../../atoms/avatar/types';
3
- /**
4
- * Winner information.
5
- */
6
- export interface WinnerInfo {
7
- /** Winner's name */
8
- name: string;
9
- /** Winner's ticket number */
10
- ticketNumber: number | string;
11
- /** Winner's avatar */
12
- avatar?: AvatarMetadata;
13
- /** Prize won */
14
- prize?: string;
15
- /** Prize description */
16
- prizeDescription?: string;
17
- /** Prize image URL */
18
- prizeImage?: string;
19
- /** Prize value */
20
- prizeValue?: number;
21
- /** Winner's location (city, country) */
22
- location?: string;
23
- /** Additional winner info */
24
- customData?: Record<string, any>;
25
- }
26
- /**
27
- * Animation type for winner reveal.
28
- */
29
- export type WinnerAnimationType = 'none' | 'fade' | 'zoom' | 'slide' | 'confetti' | 'spotlight';
30
- /**
31
- * Display mode for the winner.
32
- */
33
- export type WinnerDisplayMode = 'compact' | 'standard' | 'full' | 'celebration';
34
- /**
35
- * Metadata for the winner display component.
36
- */
37
- export interface WinnerDisplayMetadata {
38
- /** Winner information */
39
- winner: WinnerInfo;
40
- /** Display mode */
41
- mode?: WinnerDisplayMode;
42
- /** Size variant */
43
- size?: 'small' | 'medium' | 'large';
44
- /** Show confetti animation */
45
- showConfetti?: boolean;
46
- /** Show trophy icon */
47
- showTrophy?: boolean;
48
- /** Show ticket number */
49
- showTicketNumber?: boolean;
50
- /** Show prize info */
51
- showPrize?: boolean;
52
- /** Show prize value */
53
- showPrizeValue?: boolean;
54
- /** Show location */
55
- showLocation?: boolean;
56
- /** Number padding for ticket */
57
- numberPadding?: number;
58
- /** Animation type */
59
- animation?: WinnerAnimationType;
60
- /** Animation duration in ms */
61
- animationDuration?: number;
62
- /** Delay before showing (for suspense) */
63
- revealDelay?: number;
64
- /** Auto-play animation on init */
65
- autoPlay?: boolean;
66
- /** Component color */
67
- color?: Color;
68
- /** Custom CSS class */
69
- cssClass?: string;
70
- /** Background style */
71
- background?: 'solid' | 'gradient' | 'transparent';
72
- /** Winner label (e.g., "¡Ganador!") */
73
- winnerLabel?: string;
74
- /** Ticket label (e.g., "Boleto #") */
75
- ticketLabel?: string;
76
- /** Prize label (e.g., "Premio:") */
77
- prizeLabel?: string;
78
- /** Content class for reactive content */
79
- contentClass?: string;
80
- /** Content key for winner label */
81
- winnerLabelContentKey?: string;
82
- /** Content key for ticket label */
83
- ticketLabelContentKey?: string;
84
- /** Content key for prize label */
85
- prizeLabelContentKey?: string;
86
- }
87
- /**
88
- * Event emitted when animation completes.
89
- */
90
- export interface WinnerDisplayAnimationEvent {
91
- /** Animation type that completed */
92
- animation: WinnerAnimationType;
93
- /** Winner info */
94
- winner: WinnerInfo;
95
- }
96
- /**
97
- * Default labels.
98
- */
99
- export declare const DEFAULT_WINNER_LABELS: {
100
- winner: string;
101
- ticket: string;
102
- prize: string;
103
- };
@@ -1,36 +0,0 @@
1
- import { EventEmitter, OnInit, OnDestroy, AfterViewInit } from '@angular/core';
2
- import { WinnerDisplayMetadata, WinnerDisplayAnimationEvent } from './types';
3
- import * as i0 from "@angular/core";
4
- export declare class WinnerDisplayComponent implements OnInit, OnDestroy, AfterViewInit {
5
- props: WinnerDisplayMetadata;
6
- animationComplete: EventEmitter<WinnerDisplayAnimationEvent>;
7
- isAnimating: boolean;
8
- isRevealed: boolean;
9
- showConfetti: boolean;
10
- confettiPieces: number[];
11
- private revealTimeout;
12
- private animationTimeout;
13
- private elementRef;
14
- ngOnInit(): void;
15
- ngAfterViewInit(): void;
16
- ngOnDestroy(): void;
17
- startReveal(): void;
18
- /**
19
- * Manually trigger the reveal animation.
20
- */
21
- reveal(): void;
22
- /**
23
- * Reset to initial state.
24
- */
25
- reset(): void;
26
- formatTicketNumber(): string;
27
- formatPrizeValue(): string;
28
- getRandomX(index: number): string;
29
- getRandomRotation(index: number): string;
30
- getWinnerLabel(): string;
31
- getTicketLabel(): string;
32
- getPrizeLabel(): string;
33
- getColor(): string;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<WinnerDisplayComponent, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<WinnerDisplayComponent, "val-winner-display", never, { "props": { "alias": "props"; "required": false; }; }, { "animationComplete": "animationComplete"; }, never, never, true, never>;
36
- }
@@ -1,5 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class LayoutComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<LayoutComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<LayoutComponent, "val-layout", never, {}, {}, never, ["*"], true, never>;
5
- }