@erplora/outfitkit 0.1.16 → 0.1.17
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.
|
@@ -77,6 +77,11 @@ export interface ReceiptData {
|
|
|
77
77
|
qr?: string;
|
|
78
78
|
/** Leyenda bajo el QR. */
|
|
79
79
|
qr_note?: string;
|
|
80
|
+
/** QR promocional del negocio (reseñas Google, redes, web). Va SIEMPRE al final,
|
|
81
|
+
* después del fiscal (que es el legal) y más pequeño. Si vacío, no deja rastro. */
|
|
82
|
+
promo_qr?: string;
|
|
83
|
+
/** Leyenda sobre el QR promocional (p.ej. «Escanea y déjanos una reseña»). */
|
|
84
|
+
promo_note?: string;
|
|
80
85
|
}
|
|
81
86
|
export declare class OkReceipt extends LitElement {
|
|
82
87
|
static styles: import("lit").CSSResult;
|
|
@@ -95,6 +100,8 @@ export declare class OkReceipt extends LitElement {
|
|
|
95
100
|
private renderLines;
|
|
96
101
|
private renderTotals;
|
|
97
102
|
private renderQr;
|
|
103
|
+
/** QR promocional (reseñas/redes): al final del papel y más pequeño que el fiscal. */
|
|
104
|
+
private renderPromo;
|
|
98
105
|
}
|
|
99
106
|
declare global {
|
|
100
107
|
interface HTMLElementTagNameMap {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './ok-receipt.js';
|
package/dist/ok-receipt.js
CHANGED
|
@@ -76,6 +76,8 @@ class OkReceipt extends LitElement {
|
|
|
76
76
|
.footer { font-size: 10px; white-space: pre-line; }
|
|
77
77
|
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 1mm; margin-top: 2mm; }
|
|
78
78
|
.qr-note { font-size: 8px; text-align: center; word-break: break-word; }
|
|
79
|
+
.promo-wrap { display: flex; flex-direction: column; align-items: center; gap: 1mm; margin-top: 2mm; }
|
|
80
|
+
.promo-note { font-size: 9px; text-align: center; word-break: break-word; }
|
|
79
81
|
.empty { padding: 4mm; text-align: center; color: #888; font-style: italic; }
|
|
80
82
|
`;
|
|
81
83
|
}
|
|
@@ -101,6 +103,7 @@ class OkReceipt extends LitElement {
|
|
|
101
103
|
${this.renderTotals(r)}
|
|
102
104
|
${r.footer ? html`<hr class="sep" /><div class="center footer">${r.footer}</div>` : nothing}
|
|
103
105
|
${this.renderQr(r)}
|
|
106
|
+
${this.renderPromo(r)}
|
|
104
107
|
</div>`;
|
|
105
108
|
}
|
|
106
109
|
renderHeader(r) {
|
|
@@ -167,6 +170,14 @@ class OkReceipt extends LitElement {
|
|
|
167
170
|
${r.qr_note ? html`<div class="qr-note">${r.qr_note}</div>` : nothing}
|
|
168
171
|
</div>`;
|
|
169
172
|
}
|
|
173
|
+
/** QR promocional (reseñas/redes): al final del papel y más pequeño que el fiscal. */
|
|
174
|
+
renderPromo(r) {
|
|
175
|
+
if (!r.promo_qr) return nothing;
|
|
176
|
+
return html`<div class="promo-wrap">
|
|
177
|
+
${r.promo_note ? html`<div class="promo-note">${r.promo_note}</div>` : nothing}
|
|
178
|
+
<ok-qr .value=${r.promo_qr} .size=${Math.round(this.qrSize * 0.7)} ec="M" color="#000" background="#fff"></ok-qr>
|
|
179
|
+
</div>`;
|
|
180
|
+
}
|
|
170
181
|
}
|
|
171
182
|
__decorateClass([
|
|
172
183
|
property({ attribute: false })
|
package/dist/outfitkit.bundle.js
CHANGED
|
@@ -10764,6 +10764,8 @@ class So extends g {
|
|
|
10764
10764
|
.footer { font-size: 10px; white-space: pre-line; }
|
|
10765
10765
|
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 1mm; margin-top: 2mm; }
|
|
10766
10766
|
.qr-note { font-size: 8px; text-align: center; word-break: break-word; }
|
|
10767
|
+
.promo-wrap { display: flex; flex-direction: column; align-items: center; gap: 1mm; margin-top: 2mm; }
|
|
10768
|
+
.promo-note { font-size: 9px; text-align: center; word-break: break-word; }
|
|
10767
10769
|
.empty { padding: 4mm; text-align: center; color: #888; font-style: italic; }
|
|
10768
10770
|
`;
|
|
10769
10771
|
}
|
|
@@ -10788,6 +10790,7 @@ class So extends g {
|
|
|
10788
10790
|
${this.renderTotals(e)}
|
|
10789
10791
|
${e.footer ? s`<hr class="sep" /><div class="center footer">${e.footer}</div>` : m}
|
|
10790
10792
|
${this.renderQr(e)}
|
|
10793
|
+
${this.renderPromo(e)}
|
|
10791
10794
|
</div>` : s`<div class="paper empty">${this.t.empty}</div>`;
|
|
10792
10795
|
}
|
|
10793
10796
|
renderHeader(e) {
|
|
@@ -10852,6 +10855,13 @@ class So extends g {
|
|
|
10852
10855
|
${e.qr_note ? s`<div class="qr-note">${e.qr_note}</div>` : m}
|
|
10853
10856
|
</div>` : m;
|
|
10854
10857
|
}
|
|
10858
|
+
/** QR promocional (reseñas/redes): al final del papel y más pequeño que el fiscal. */
|
|
10859
|
+
renderPromo(e) {
|
|
10860
|
+
return e.promo_qr ? s`<div class="promo-wrap">
|
|
10861
|
+
${e.promo_note ? s`<div class="promo-note">${e.promo_note}</div>` : m}
|
|
10862
|
+
<ok-qr .value=${e.promo_qr} .size=${Math.round(this.qrSize * 0.7)} ec="M" color="#000" background="#fff"></ok-qr>
|
|
10863
|
+
</div>` : m;
|
|
10864
|
+
}
|
|
10855
10865
|
}
|
|
10856
10866
|
Ci([
|
|
10857
10867
|
l({ attribute: !1 })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@erplora/outfitkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "OutfitKit — librería de Web Components (Lit) que CONSTRUYE lo que Ionic no tiene (tree, data-table rica, inline-feedback, kpi/stat, stepper/wizard, calendar, kanban…) sobre primitivos de Ionic. Ionic es la base; OutfitKit cubre los huecos. npm + CDN, imports individuales, CSP-safe. Tema vía tokens --ok-* (fallback a --ion-*).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|