valtech-components 4.0.256 → 4.0.257
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 +104 -80
- package/esm2022/lib/components/molecules/ticket-card/ticket-card.i18n.mjs +3 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +106 -80
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/ticket-card/ticket-card.i18n.d.ts +2 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -57,7 +57,7 @@ import fixWebmDuration from 'fix-webm-duration';
|
|
|
57
57
|
* Current version of valtech-components.
|
|
58
58
|
* This is automatically updated during the publish process.
|
|
59
59
|
*/
|
|
60
|
-
const VERSION = '4.0.
|
|
60
|
+
const VERSION = '4.0.257';
|
|
61
61
|
|
|
62
62
|
// Control de estado de refresco (singleton a nivel de módulo)
|
|
63
63
|
let isRefreshing = false;
|
|
@@ -71918,6 +71918,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
71918
71918
|
*/
|
|
71919
71919
|
const TICKET_CARD_I18N = {
|
|
71920
71920
|
es: {
|
|
71921
|
+
cardLabel: 'Cartón de bingo',
|
|
71921
71922
|
folio: 'Folio',
|
|
71922
71923
|
statusSold: 'Vendida',
|
|
71923
71924
|
statusCheckedIn: 'Canjeada',
|
|
@@ -71927,6 +71928,7 @@ const TICKET_CARD_I18N = {
|
|
|
71927
71928
|
copiedUrl: 'Link copiado',
|
|
71928
71929
|
},
|
|
71929
71930
|
en: {
|
|
71931
|
+
cardLabel: 'Bingo card',
|
|
71930
71932
|
folio: 'Folio',
|
|
71931
71933
|
statusSold: 'Sold',
|
|
71932
71934
|
statusCheckedIn: 'Checked in',
|
|
@@ -72110,7 +72112,7 @@ class TicketCardComponent {
|
|
|
72110
72112
|
const url = URL.createObjectURL(blob);
|
|
72111
72113
|
const a = document.createElement('a');
|
|
72112
72114
|
a.href = url;
|
|
72113
|
-
a.download = `
|
|
72115
|
+
a.download = `carton-${p.folio ?? 'bingo'}.png`;
|
|
72114
72116
|
document.body.appendChild(a);
|
|
72115
72117
|
a.click();
|
|
72116
72118
|
document.body.removeChild(a);
|
|
@@ -72133,103 +72135,127 @@ class TicketCardComponent {
|
|
|
72133
72135
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TicketCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
72134
72136
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TicketCardComponent, isStandalone: true, selector: "val-ticket-card", inputs: { props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
72135
72137
|
<div class="ticket-card">
|
|
72136
|
-
|
|
72137
|
-
<div class="ticket-
|
|
72138
|
-
|
|
72139
|
-
|
|
72140
|
-
<div class="ticket-card__qr">
|
|
72141
|
-
@if (qr(); as q) {
|
|
72142
|
-
<val-qr-code [props]="qrProps(q)" />
|
|
72143
|
-
} @else if (failed()) {
|
|
72144
|
-
<div class="ticket-card__qr-fallback">{{ tokenShort() }}</div>
|
|
72145
|
-
} @else {
|
|
72146
|
-
<div class="ticket-card__qr-loading">
|
|
72147
|
-
<ion-spinner name="crescent" aria-label="Generando QR" />
|
|
72148
|
-
</div>
|
|
72138
|
+
<div class="ticket-card__header">
|
|
72139
|
+
<div class="ticket-card__eyebrow">{{ t('cardLabel') }}</div>
|
|
72140
|
+
@if (props().title) {
|
|
72141
|
+
<div class="ticket-card__title">{{ props().title }}</div>
|
|
72149
72142
|
}
|
|
72150
72143
|
</div>
|
|
72151
72144
|
|
|
72152
|
-
<div class="ticket-
|
|
72153
|
-
|
|
72154
|
-
|
|
72155
|
-
|
|
72156
|
-
|
|
72157
|
-
|
|
72158
|
-
|
|
72159
|
-
|
|
72160
|
-
|
|
72161
|
-
|
|
72162
|
-
</div>
|
|
72163
|
-
|
|
72164
|
-
@if ((props().showDownload || props().showShare) && qr()) {
|
|
72165
|
-
<div class="ticket-card__actions">
|
|
72166
|
-
@if (props().showDownload) {
|
|
72167
|
-
<ion-button fill="outline" expand="block" [disabled]="downloading()" (click)="downloadCard()">
|
|
72168
|
-
<ion-icon name="download-outline" slot="start" />
|
|
72169
|
-
{{ props().downloadLabel || t('download') }}
|
|
72170
|
-
</ion-button>
|
|
72145
|
+
<div class="ticket-card__body">
|
|
72146
|
+
<div class="ticket-card__qr">
|
|
72147
|
+
@if (qr(); as q) {
|
|
72148
|
+
<val-qr-code [props]="qrProps(q)" />
|
|
72149
|
+
} @else if (failed()) {
|
|
72150
|
+
<div class="ticket-card__qr-fallback">{{ tokenShort() }}</div>
|
|
72151
|
+
} @else {
|
|
72152
|
+
<div class="ticket-card__qr-loading">
|
|
72153
|
+
<ion-spinner name="crescent" aria-label="Generando QR" />
|
|
72154
|
+
</div>
|
|
72171
72155
|
}
|
|
72172
|
-
|
|
72173
|
-
|
|
72174
|
-
|
|
72175
|
-
|
|
72176
|
-
|
|
72156
|
+
</div>
|
|
72157
|
+
|
|
72158
|
+
<div class="ticket-card__perf" aria-hidden="true">
|
|
72159
|
+
<span class="ticket-card__notch ticket-card__notch--left"></span>
|
|
72160
|
+
<span class="ticket-card__notch ticket-card__notch--right"></span>
|
|
72161
|
+
</div>
|
|
72162
|
+
|
|
72163
|
+
<div class="ticket-card__stub">
|
|
72164
|
+
<div class="ticket-card__meta">
|
|
72165
|
+
@if (folioText(); as f) {
|
|
72166
|
+
<div class="ticket-card__folio">{{ f }}</div>
|
|
72167
|
+
}
|
|
72168
|
+
@if (props().buyerName) {
|
|
72169
|
+
<div class="ticket-card__buyer">{{ props().buyerName }}</div>
|
|
72170
|
+
}
|
|
72171
|
+
@if (statusLabel(); as s) {
|
|
72172
|
+
<span class="ticket-card__badge" [attr.data-status]="status()">{{ s }}</span>
|
|
72173
|
+
}
|
|
72174
|
+
</div>
|
|
72175
|
+
|
|
72176
|
+
@if ((props().showDownload || props().showShare) && qr()) {
|
|
72177
|
+
<div class="ticket-card__actions">
|
|
72178
|
+
@if (props().showDownload) {
|
|
72179
|
+
<ion-button fill="outline" expand="block" [disabled]="downloading()" (click)="downloadCard()">
|
|
72180
|
+
<ion-icon name="download-outline" slot="start" />
|
|
72181
|
+
{{ props().downloadLabel || t('download') }}
|
|
72182
|
+
</ion-button>
|
|
72183
|
+
}
|
|
72184
|
+
@if (props().showShare) {
|
|
72185
|
+
<ion-button fill="outline" expand="block" [disabled]="sharing()" (click)="shareCard()">
|
|
72186
|
+
<ion-icon name="share-outline" slot="start" />
|
|
72187
|
+
{{ props().shareLabel || t('share') }}
|
|
72188
|
+
</ion-button>
|
|
72189
|
+
}
|
|
72190
|
+
</div>
|
|
72177
72191
|
}
|
|
72178
72192
|
</div>
|
|
72179
|
-
|
|
72193
|
+
</div>
|
|
72180
72194
|
</div>
|
|
72181
|
-
`, isInline: true, styles: ["
|
|
72195
|
+
`, isInline: true, styles: [":host{display:block}.ticket-card{--ticket-accent: var(--ion-color-primary, #ff00b2);--ticket-accent-2: #7026df;display:flex;flex-direction:column;width:min(100%,380px);margin:0 auto;overflow:hidden;border:1px solid var(--ion-color-light-shade, #d8d8dd);border-radius:22px;background:var(--ion-card-background, #ffffff);box-shadow:0 18px 50px #1f192d1f}.ticket-card__header{padding:22px 22px 20px;text-align:center;color:#fff;background:linear-gradient(135deg,var(--ticket-accent) 0%,var(--ticket-accent-2) 100%)}.ticket-card__eyebrow{margin-bottom:6px;font-size:.6875rem;font-weight:800;letter-spacing:.14em;line-height:1.2;text-transform:uppercase;opacity:.78}.ticket-card__title{font-size:1.25rem;font-weight:800;line-height:1.18}.ticket-card__body{position:relative;display:flex;flex-direction:column;align-items:stretch;background:radial-gradient(circle at 50% 0,rgba(255,0,178,.08),transparent 36%),var(--ion-card-background, #ffffff)}.ticket-card__qr{display:flex;align-items:center;justify-content:center;min-height:232px;padding:22px 22px 18px}.ticket-card__qr val-qr-code{display:block;padding:10px;border:1px solid rgba(31,25,45,.08);border-radius:18px;background:#fff;box-shadow:0 10px 30px #1f192d14}.ticket-card__qr-loading{display:flex;align-items:center;justify-content:center;width:220px;height:220px;border-radius:18px;background:#fff}.ticket-card__qr-fallback{padding:18px;border-radius:14px;background:#6b667514;color:var(--ion-color-medium, #6b6675);font-family:monospace;font-size:.75rem;line-height:1.5;text-align:center;word-break:break-all}.ticket-card__perf{position:relative;margin:0 22px;border-top:2px dashed rgba(107,102,117,.28)}.ticket-card__notch{position:absolute;top:-14px;width:26px;height:26px;border-radius:50%;background:var(--ion-background-color, #f8f8f8);box-shadow:inset 0 0 0 1px #1f192d14}.ticket-card__notch--left{left:-36px}.ticket-card__notch--right{right:-36px}.ticket-card__stub{display:flex;flex-direction:column;gap:18px;padding:18px 22px 22px}.ticket-card__meta{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;text-align:center}.ticket-card__folio{color:var(--ion-color-dark, #2f2b38);font-size:1.45rem;font-weight:850;line-height:1.15}.ticket-card__buyer{max-width:100%;overflow:hidden;color:var(--ion-color-medium, #6b6675);font-size:.9375rem;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}.ticket-card__badge{display:inline-flex;align-items:center;min-height:30px;margin-top:2px;padding:5px 14px;border-radius:999px;background:var(--ion-color-medium, #6b6675);color:var(--ion-color-medium-contrast, #ffffff);font-size:.8125rem;font-weight:800;line-height:1;white-space:nowrap}.ticket-card__badge[data-status=sold]{background:var(--ion-color-success, #16a34a);color:var(--ion-color-success-contrast, #ffffff)}.ticket-card__badge[data-status=checkedIn]{background:var(--ion-color-medium, #6b6675);color:var(--ion-color-medium-contrast, #ffffff)}.ticket-card__actions{display:grid;gap:10px;width:100%}.ticket-card__actions ion-button{min-height:48px;margin:0;font-weight:800;--border-radius: 14px;--border-width: 1.5px}@media (max-width: 420px){.ticket-card{width:100%;border-radius:20px}.ticket-card__qr{min-height:216px;padding-inline:16px}.ticket-card__stub{padding-inline:16px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: QrCodeComponent, selector: "val-qr-code", inputs: ["props"], outputs: ["actionComplete", "imageLoad", "imageError"] }] }); }
|
|
72182
72196
|
}
|
|
72183
72197
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TicketCardComponent, decorators: [{
|
|
72184
72198
|
type: Component,
|
|
72185
72199
|
args: [{ selector: 'val-ticket-card', standalone: true, imports: [CommonModule, IonButton, IonIcon, IonSpinner, QrCodeComponent], template: `
|
|
72186
72200
|
<div class="ticket-card">
|
|
72187
|
-
|
|
72188
|
-
<div class="ticket-
|
|
72189
|
-
|
|
72190
|
-
|
|
72191
|
-
<div class="ticket-card__qr">
|
|
72192
|
-
@if (qr(); as q) {
|
|
72193
|
-
<val-qr-code [props]="qrProps(q)" />
|
|
72194
|
-
} @else if (failed()) {
|
|
72195
|
-
<div class="ticket-card__qr-fallback">{{ tokenShort() }}</div>
|
|
72196
|
-
} @else {
|
|
72197
|
-
<div class="ticket-card__qr-loading">
|
|
72198
|
-
<ion-spinner name="crescent" aria-label="Generando QR" />
|
|
72199
|
-
</div>
|
|
72201
|
+
<div class="ticket-card__header">
|
|
72202
|
+
<div class="ticket-card__eyebrow">{{ t('cardLabel') }}</div>
|
|
72203
|
+
@if (props().title) {
|
|
72204
|
+
<div class="ticket-card__title">{{ props().title }}</div>
|
|
72200
72205
|
}
|
|
72201
72206
|
</div>
|
|
72202
72207
|
|
|
72203
|
-
<div class="ticket-
|
|
72204
|
-
|
|
72205
|
-
|
|
72206
|
-
|
|
72207
|
-
|
|
72208
|
-
|
|
72209
|
-
|
|
72210
|
-
|
|
72211
|
-
|
|
72212
|
-
|
|
72213
|
-
</div>
|
|
72214
|
-
|
|
72215
|
-
@if ((props().showDownload || props().showShare) && qr()) {
|
|
72216
|
-
<div class="ticket-card__actions">
|
|
72217
|
-
@if (props().showDownload) {
|
|
72218
|
-
<ion-button fill="outline" expand="block" [disabled]="downloading()" (click)="downloadCard()">
|
|
72219
|
-
<ion-icon name="download-outline" slot="start" />
|
|
72220
|
-
{{ props().downloadLabel || t('download') }}
|
|
72221
|
-
</ion-button>
|
|
72208
|
+
<div class="ticket-card__body">
|
|
72209
|
+
<div class="ticket-card__qr">
|
|
72210
|
+
@if (qr(); as q) {
|
|
72211
|
+
<val-qr-code [props]="qrProps(q)" />
|
|
72212
|
+
} @else if (failed()) {
|
|
72213
|
+
<div class="ticket-card__qr-fallback">{{ tokenShort() }}</div>
|
|
72214
|
+
} @else {
|
|
72215
|
+
<div class="ticket-card__qr-loading">
|
|
72216
|
+
<ion-spinner name="crescent" aria-label="Generando QR" />
|
|
72217
|
+
</div>
|
|
72222
72218
|
}
|
|
72223
|
-
|
|
72224
|
-
|
|
72225
|
-
|
|
72226
|
-
|
|
72227
|
-
|
|
72219
|
+
</div>
|
|
72220
|
+
|
|
72221
|
+
<div class="ticket-card__perf" aria-hidden="true">
|
|
72222
|
+
<span class="ticket-card__notch ticket-card__notch--left"></span>
|
|
72223
|
+
<span class="ticket-card__notch ticket-card__notch--right"></span>
|
|
72224
|
+
</div>
|
|
72225
|
+
|
|
72226
|
+
<div class="ticket-card__stub">
|
|
72227
|
+
<div class="ticket-card__meta">
|
|
72228
|
+
@if (folioText(); as f) {
|
|
72229
|
+
<div class="ticket-card__folio">{{ f }}</div>
|
|
72230
|
+
}
|
|
72231
|
+
@if (props().buyerName) {
|
|
72232
|
+
<div class="ticket-card__buyer">{{ props().buyerName }}</div>
|
|
72233
|
+
}
|
|
72234
|
+
@if (statusLabel(); as s) {
|
|
72235
|
+
<span class="ticket-card__badge" [attr.data-status]="status()">{{ s }}</span>
|
|
72236
|
+
}
|
|
72237
|
+
</div>
|
|
72238
|
+
|
|
72239
|
+
@if ((props().showDownload || props().showShare) && qr()) {
|
|
72240
|
+
<div class="ticket-card__actions">
|
|
72241
|
+
@if (props().showDownload) {
|
|
72242
|
+
<ion-button fill="outline" expand="block" [disabled]="downloading()" (click)="downloadCard()">
|
|
72243
|
+
<ion-icon name="download-outline" slot="start" />
|
|
72244
|
+
{{ props().downloadLabel || t('download') }}
|
|
72245
|
+
</ion-button>
|
|
72246
|
+
}
|
|
72247
|
+
@if (props().showShare) {
|
|
72248
|
+
<ion-button fill="outline" expand="block" [disabled]="sharing()" (click)="shareCard()">
|
|
72249
|
+
<ion-icon name="share-outline" slot="start" />
|
|
72250
|
+
{{ props().shareLabel || t('share') }}
|
|
72251
|
+
</ion-button>
|
|
72252
|
+
}
|
|
72253
|
+
</div>
|
|
72228
72254
|
}
|
|
72229
72255
|
</div>
|
|
72230
|
-
|
|
72256
|
+
</div>
|
|
72231
72257
|
</div>
|
|
72232
|
-
`, styles: ["
|
|
72258
|
+
`, styles: [":host{display:block}.ticket-card{--ticket-accent: var(--ion-color-primary, #ff00b2);--ticket-accent-2: #7026df;display:flex;flex-direction:column;width:min(100%,380px);margin:0 auto;overflow:hidden;border:1px solid var(--ion-color-light-shade, #d8d8dd);border-radius:22px;background:var(--ion-card-background, #ffffff);box-shadow:0 18px 50px #1f192d1f}.ticket-card__header{padding:22px 22px 20px;text-align:center;color:#fff;background:linear-gradient(135deg,var(--ticket-accent) 0%,var(--ticket-accent-2) 100%)}.ticket-card__eyebrow{margin-bottom:6px;font-size:.6875rem;font-weight:800;letter-spacing:.14em;line-height:1.2;text-transform:uppercase;opacity:.78}.ticket-card__title{font-size:1.25rem;font-weight:800;line-height:1.18}.ticket-card__body{position:relative;display:flex;flex-direction:column;align-items:stretch;background:radial-gradient(circle at 50% 0,rgba(255,0,178,.08),transparent 36%),var(--ion-card-background, #ffffff)}.ticket-card__qr{display:flex;align-items:center;justify-content:center;min-height:232px;padding:22px 22px 18px}.ticket-card__qr val-qr-code{display:block;padding:10px;border:1px solid rgba(31,25,45,.08);border-radius:18px;background:#fff;box-shadow:0 10px 30px #1f192d14}.ticket-card__qr-loading{display:flex;align-items:center;justify-content:center;width:220px;height:220px;border-radius:18px;background:#fff}.ticket-card__qr-fallback{padding:18px;border-radius:14px;background:#6b667514;color:var(--ion-color-medium, #6b6675);font-family:monospace;font-size:.75rem;line-height:1.5;text-align:center;word-break:break-all}.ticket-card__perf{position:relative;margin:0 22px;border-top:2px dashed rgba(107,102,117,.28)}.ticket-card__notch{position:absolute;top:-14px;width:26px;height:26px;border-radius:50%;background:var(--ion-background-color, #f8f8f8);box-shadow:inset 0 0 0 1px #1f192d14}.ticket-card__notch--left{left:-36px}.ticket-card__notch--right{right:-36px}.ticket-card__stub{display:flex;flex-direction:column;gap:18px;padding:18px 22px 22px}.ticket-card__meta{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;text-align:center}.ticket-card__folio{color:var(--ion-color-dark, #2f2b38);font-size:1.45rem;font-weight:850;line-height:1.15}.ticket-card__buyer{max-width:100%;overflow:hidden;color:var(--ion-color-medium, #6b6675);font-size:.9375rem;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}.ticket-card__badge{display:inline-flex;align-items:center;min-height:30px;margin-top:2px;padding:5px 14px;border-radius:999px;background:var(--ion-color-medium, #6b6675);color:var(--ion-color-medium-contrast, #ffffff);font-size:.8125rem;font-weight:800;line-height:1;white-space:nowrap}.ticket-card__badge[data-status=sold]{background:var(--ion-color-success, #16a34a);color:var(--ion-color-success-contrast, #ffffff)}.ticket-card__badge[data-status=checkedIn]{background:var(--ion-color-medium, #6b6675);color:var(--ion-color-medium-contrast, #ffffff)}.ticket-card__actions{display:grid;gap:10px;width:100%}.ticket-card__actions ion-button{min-height:48px;margin:0;font-weight:800;--border-radius: 14px;--border-width: 1.5px}@media (max-width: 420px){.ticket-card{width:100%;border-radius:20px}.ticket-card__qr{min-height:216px;padding-inline:16px}.ticket-card__stub{padding-inline:16px}}\n"] }]
|
|
72233
72259
|
}], ctorParameters: () => [] });
|
|
72234
72260
|
|
|
72235
72261
|
/**
|