valtech-components 4.0.116 → 4.0.118
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/molecules/ticket-card/ticket-card.component.mjs +49 -6
- package/esm2022/lib/components/molecules/ticket-card/types.mjs +1 -1
- package/esm2022/lib/services/markdown-article/markdown-article-parser.mjs +7 -2
- package/esm2022/lib/services/ticket-card-image/ticket-card-image.service.mjs +181 -0
- package/esm2022/lib/services/ticket-card-image/types.mjs +2 -0
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/valtech-components.mjs +231 -7
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/ticket-card/ticket-card.component.d.ts +4 -0
- package/lib/components/molecules/ticket-card/types.d.ts +14 -0
- package/lib/services/ticket-card-image/ticket-card-image.service.d.ts +12 -0
- package/lib/services/ticket-card-image/types.d.ts +20 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -24,11 +24,14 @@ export declare class TicketCardComponent {
|
|
|
24
24
|
/** Props object-first del componente. */
|
|
25
25
|
readonly props: import("@angular/core").InputSignal<TicketCardMetadata>;
|
|
26
26
|
private qrService;
|
|
27
|
+
private ticketCardImageService;
|
|
27
28
|
private i18n;
|
|
28
29
|
/** QR generado (null mientras carga o si falló). */
|
|
29
30
|
readonly qr: import("@angular/core").WritableSignal<QrResult>;
|
|
30
31
|
/** Falló la generación del QR → fallback al token corto. */
|
|
31
32
|
readonly failed: import("@angular/core").WritableSignal<boolean>;
|
|
33
|
+
/** True mientras se genera y comparte la tarjeta branded. */
|
|
34
|
+
readonly sharing: import("@angular/core").WritableSignal<boolean>;
|
|
32
35
|
constructor();
|
|
33
36
|
private generate;
|
|
34
37
|
t(key: string): string;
|
|
@@ -36,6 +39,7 @@ export declare class TicketCardComponent {
|
|
|
36
39
|
readonly tokenShort: import("@angular/core").Signal<string>;
|
|
37
40
|
readonly folioText: import("@angular/core").Signal<string>;
|
|
38
41
|
readonly statusLabel: import("@angular/core").Signal<string>;
|
|
42
|
+
shareCard(): Promise<void>;
|
|
39
43
|
qrProps(q: QrResult): QrCodeMetadata;
|
|
40
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<TicketCardComponent, never>;
|
|
41
45
|
static ɵcmp: i0.ɵɵComponentDeclaration<TicketCardComponent, "val-ticket-card", never, { "props": { "alias": "props"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -42,4 +42,18 @@ export interface TicketCardMetadata {
|
|
|
42
42
|
statusSoldLabel?: string;
|
|
43
43
|
/** Label del badge cuando `status === 'checkedIn'` (default: "Canjeada"). */
|
|
44
44
|
statusCheckedInLabel?: string;
|
|
45
|
+
/** URL del logo de marca para la tarjeta compartida. */
|
|
46
|
+
shareLogoUrl?: string;
|
|
47
|
+
/** Color de fondo del encabezado en la tarjeta compartida. Default: gradiente bingo. */
|
|
48
|
+
shareBrandColor?: string;
|
|
49
|
+
/** Color secundario del gradiente (optional). */
|
|
50
|
+
shareBrandColorTo?: string;
|
|
51
|
+
/** Nombre de evento / marca en la tarjeta compartida. */
|
|
52
|
+
shareBrandName?: string;
|
|
53
|
+
/** Label del folio en la tarjeta compartida. Default "Entrada". */
|
|
54
|
+
shareFolioLabel?: string;
|
|
55
|
+
/** Label del share button. */
|
|
56
|
+
shareLabel?: string;
|
|
57
|
+
/** Label del download button. */
|
|
58
|
+
downloadLabel?: string;
|
|
45
59
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TicketCardImageConfig } from './types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TicketCardImageService {
|
|
4
|
+
generate(config: TicketCardImageConfig): Promise<Blob>;
|
|
5
|
+
share(config: TicketCardImageConfig, shareTitle?: string): Promise<boolean>;
|
|
6
|
+
private drawHeader;
|
|
7
|
+
private drawQrZone;
|
|
8
|
+
private drawFooter;
|
|
9
|
+
private loadImage;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TicketCardImageService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TicketCardImageService>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface TicketCardImageConfig {
|
|
2
|
+
/** QR code as dataUrl (PNG/base64) */
|
|
3
|
+
qrDataUrl: string;
|
|
4
|
+
/** Logo to show in the header. URL or dataUrl. Optional. */
|
|
5
|
+
logoUrl?: string;
|
|
6
|
+
/** Header background color (CSS color). Default: bingo gradient '#9b1fde' -> '#c93075'. */
|
|
7
|
+
brandColor?: string;
|
|
8
|
+
/** Second color for gradient. If absent, use solid brandColor. */
|
|
9
|
+
brandColorTo?: string;
|
|
10
|
+
/** Brand/event name shown in header. */
|
|
11
|
+
brandName?: string;
|
|
12
|
+
/** Folio number or string. */
|
|
13
|
+
folio?: number | string;
|
|
14
|
+
/** Label for folio. Default: "Entrada". */
|
|
15
|
+
folioLabel?: string;
|
|
16
|
+
/** Buyer name. Optional. */
|
|
17
|
+
buyerName?: string;
|
|
18
|
+
/** Canvas width (default 560). */
|
|
19
|
+
width?: number;
|
|
20
|
+
}
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -359,6 +359,8 @@ export * from './lib/services/confirmation-dialog/confirmation-dialog.service';
|
|
|
359
359
|
export * from './lib/services/confirmation-dialog/types';
|
|
360
360
|
export * from './lib/services/qr-generator/qr-generator.service';
|
|
361
361
|
export * from './lib/services/qr-generator/types';
|
|
362
|
+
export * from './lib/services/ticket-card-image/ticket-card-image.service';
|
|
363
|
+
export * from './lib/services/ticket-card-image/types';
|
|
362
364
|
export * from './lib/services/modal/modal.service';
|
|
363
365
|
export * from './lib/services/modal/types';
|
|
364
366
|
export * from './lib/services/meta';
|