@erplora/outfitkit 0.1.15 → 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.
Files changed (46) hide show
  1. package/dist/cdn.d.ts +1 -0
  2. package/dist/components/ok-data-table/csv-encoding.d.ts +4 -0
  3. package/dist/components/ok-data-table/csv-encoding.test.d.ts +1 -0
  4. package/dist/components/ok-receipt/ok-receipt.d.ts +7 -0
  5. package/dist/components/ok-receipt/ok-receipt.test.d.ts +1 -0
  6. package/dist/components/ok-theme-picker/ok-theme-picker.d.ts +46 -0
  7. package/dist/components/ok-theme-picker/ok-theme-picker.test.d.ts +1 -0
  8. package/dist/index.d.ts +4 -2
  9. package/dist/index.js +4 -0
  10. package/dist/ok-app-launcher.js +1 -1
  11. package/dist/ok-audio.js +1 -1
  12. package/dist/ok-calendar.js +1 -1
  13. package/dist/ok-carousel.js +1 -1
  14. package/dist/ok-chat.js +1 -1
  15. package/dist/ok-combo.js +1 -1
  16. package/dist/ok-command-palette.js +1 -1
  17. package/dist/ok-data-table.js +13 -3
  18. package/dist/ok-date-picker.js +1 -1
  19. package/dist/ok-drawer.js +1 -1
  20. package/dist/ok-dropzone.js +1 -1
  21. package/dist/ok-file-manager.js +1 -1
  22. package/dist/ok-inline-feedback.js +1 -1
  23. package/dist/ok-kpi.js +1 -1
  24. package/dist/ok-lightbox.js +1 -1
  25. package/dist/ok-mail.js +1 -1
  26. package/dist/ok-menubar.js +1 -1
  27. package/dist/ok-notification-center.js +1 -1
  28. package/dist/ok-pdf.js +1 -1
  29. package/dist/ok-pinpad.js +1 -1
  30. package/dist/ok-qty-stepper.js +1 -1
  31. package/dist/ok-receipt.js +11 -0
  32. package/dist/ok-scheduler.js +1 -1
  33. package/dist/ok-signature.js +1 -1
  34. package/dist/ok-split-button.js +1 -1
  35. package/dist/ok-stepper.js +1 -1
  36. package/dist/ok-tag-input.js +1 -1
  37. package/dist/ok-theme-picker.js +221 -0
  38. package/dist/ok-tree.js +1 -1
  39. package/dist/ok-video.js +1 -1
  40. package/dist/ok-widget-board.js +1 -1
  41. package/dist/outfitkit.bundle.js +1257 -1041
  42. package/dist/outfitkit.js +1 -0
  43. package/dist/palettes.css +422 -0
  44. package/dist/shared/icons.js +45 -45
  45. package/dist/theme/palettes.test.d.ts +1 -0
  46. package/package.json +4 -1
package/dist/cdn.d.ts CHANGED
@@ -73,6 +73,7 @@ import './components/ok-hover-card/ok-hover-card.js';
73
73
  import './components/ok-notification-center/ok-notification-center.js';
74
74
  import './components/ok-coachmark/ok-coachmark.js';
75
75
  import './components/ok-select-card/ok-select-card.js';
76
+ import './components/ok-theme-picker/ok-theme-picker.js';
76
77
  import './components/ok-error-page/ok-error-page.js';
77
78
  import './components/ok-date-picker/ok-date-picker.js';
78
79
  import './components/ok-time-picker/ok-time-picker.js';
@@ -0,0 +1,4 @@
1
+ /** BOM UTF-8: al frente del export para que Excel detecte la codificación. */
2
+ export declare const CSV_BOM = "\uFEFF";
3
+ /** Bytes de un fichero CSV → texto: UTF-8 estricto con fallback a Windows-1252 (Excel). */
4
+ export declare function decodeCsvBuffer(buf: ArrayBuffer): string;
@@ -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';
@@ -0,0 +1,46 @@
1
+ import { LitElement } from 'lit';
2
+ export interface OkThemePickerPalette {
3
+ /** Id de la paleta (valor de `data-ok-palette`; 'erplora' = default sin atributo). */
4
+ id: string;
5
+ /** Nombre visible/accesible. */
6
+ label: string;
7
+ /** Color de marca para el swatch. */
8
+ brand: string;
9
+ }
10
+ /** Paletas canónicas — espejo 1:1 de palettes.css (guard en palettes.test.ts). */
11
+ export declare const DEFAULT_PALETTES: OkThemePickerPalette[];
12
+ /** Único punto que escribe `data-ok-palette`: 'erplora' (o vacío) QUITA el atributo. */
13
+ export declare function applyPalette(root: Element, palette: string): void;
14
+ export type OkThemePickerMode = 'system' | 'light' | 'dark';
15
+ export interface OkThemePickerLabels {
16
+ /** Encabezado de la sección de paletas. */
17
+ palette: string;
18
+ /** Encabezado de la sección de modo. */
19
+ mode: string;
20
+ system: string;
21
+ light: string;
22
+ dark: string;
23
+ }
24
+ export declare class OkThemePicker extends LitElement {
25
+ static styles: import("lit").CSSResult;
26
+ /** Paleta activa ('erplora' = marca por defecto). */
27
+ palette: string;
28
+ /** Modo de color activo. */
29
+ mode: OkThemePickerMode;
30
+ /** Oculta el segmento de modo (para hosts con su propio toggle claro/oscuro). */
31
+ hideMode: boolean;
32
+ /** Paletas a mostrar (default: las canónicas de palettes.css). */
33
+ palettes: OkThemePickerPalette[];
34
+ /** Textos i18n (parcial; se mezclan sobre los defaults en inglés). */
35
+ labels: Partial<OkThemePickerLabels>;
36
+ private get t();
37
+ private emitChange;
38
+ private pickPalette;
39
+ private pickMode;
40
+ render(): unknown;
41
+ }
42
+ declare global {
43
+ interface HTMLElementTagNameMap {
44
+ 'ok-theme-picker': OkThemePicker;
45
+ }
46
+ }
@@ -0,0 +1 @@
1
+ import './ok-theme-picker.js';
package/dist/index.d.ts CHANGED
@@ -51,9 +51,9 @@ export { OkAudio } from './components/ok-audio/ok-audio.js';
51
51
  export { OkVideo } from './components/ok-video/ok-video.js';
52
52
  export { OkPdf } from './components/ok-pdf/ok-pdf.js';
53
53
  export { OkReceipt } from './components/ok-receipt/ok-receipt.js';
54
- export type { ReceiptData, ReceiptLine, ReceiptTax, ReceiptPayment, ReceiptBusiness, } from './components/ok-receipt/ok-receipt.js';
54
+ export type { ReceiptData, ReceiptLine, ReceiptTax, ReceiptPayment, ReceiptBusiness, OkReceiptLabels, } from './components/ok-receipt/ok-receipt.js';
55
55
  export { OkInvoice } from './components/ok-invoice/ok-invoice.js';
56
- export type { InvoiceData, InvoiceParty, InvoiceLine, InvoiceTaxLine, } from './components/ok-invoice/ok-invoice.js';
56
+ export type { InvoiceData, InvoiceParty, InvoiceLine, InvoiceTaxLine, OkInvoiceLabels, } from './components/ok-invoice/ok-invoice.js';
57
57
  export { OkTimeline } from './components/ok-timeline/ok-timeline.js';
58
58
  export type { OkTimelineItem } from './components/ok-timeline/ok-timeline.js';
59
59
  export { OkQtyStepper } from './components/ok-qty-stepper/ok-qty-stepper.js';
@@ -115,6 +115,8 @@ export { OkCoachmark } from './components/ok-coachmark/ok-coachmark.js';
115
115
  export type { OkCoachStep, OkCoachPlacement, OkCoachmarkLabels } from './components/ok-coachmark/ok-coachmark.js';
116
116
  export { OkSelectCard } from './components/ok-select-card/ok-select-card.js';
117
117
  export type { OkSelectCardChangeDetail } from './components/ok-select-card/ok-select-card.js';
118
+ export { OkThemePicker, DEFAULT_PALETTES, applyPalette } from './components/ok-theme-picker/ok-theme-picker.js';
119
+ export type { OkThemePickerPalette, OkThemePickerMode, OkThemePickerLabels, } from './components/ok-theme-picker/ok-theme-picker.js';
118
120
  export { OkErrorPage } from './components/ok-error-page/ok-error-page.js';
119
121
  export type { OkErrorPageVariant, OkErrorPageMode, OkErrorCheckStatus, OkErrorShortcut, OkErrorCheck } from './components/ok-error-page/ok-error-page.js';
120
122
  export { OkDatePicker } from './components/ok-date-picker/ok-date-picker.js';
package/dist/index.js CHANGED
@@ -74,6 +74,7 @@ import { OkHoverCard } from "./ok-hover-card.js";
74
74
  import { OkNotificationCenter } from "./ok-notification-center.js";
75
75
  import { OkCoachmark } from "./ok-coachmark.js";
76
76
  import { OkSelectCard } from "./ok-select-card.js";
77
+ import { DEFAULT_PALETTES, OkThemePicker, applyPalette } from "./ok-theme-picker.js";
77
78
  import { OkErrorPage } from "./ok-error-page.js";
78
79
  import { OkDatePicker } from "./ok-date-picker.js";
79
80
  import { OkTimePicker } from "./ok-time-picker.js";
@@ -96,6 +97,7 @@ import { OkAvatarGroup } from "./ok-avatar-group.js";
96
97
  import { OkOrgChart } from "./ok-org-chart.js";
97
98
  import { OkFileManager } from "./ok-file-manager.js";
98
99
  export {
100
+ DEFAULT_PALETTES,
99
101
  OkAppLauncher,
100
102
  OkAudio,
101
103
  OkAvatar,
@@ -185,6 +187,7 @@ export {
185
187
  OkStore,
186
188
  OkTagInput,
187
189
  OkTestimonial,
190
+ OkThemePicker,
188
191
  OkTimePicker,
189
192
  OkTimeline,
190
193
  OkTree,
@@ -192,6 +195,7 @@ export {
192
195
  OkWidgetBoard,
193
196
  OkWizard,
194
197
  StoreController,
198
+ applyPalette,
195
199
  createStore,
196
200
  store
197
201
  };
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, render, nothing, html } from "lit";
2
2
  import { property, state } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { o as okIcon, A as iconAppsOutline, B as iconCloseOutline } from "./shared/icons.js";
4
+ import { o as okIcon, u as iconAppsOutline, v as iconCloseOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
package/dist/ok-audio.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, state, query } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { J as iconVolumeMuteOutline, K as iconVolumeLowOutline, L as iconVolumeHighOutline, o as okIcon } from "./shared/icons.js";
4
+ import { E as iconVolumeMuteOutline, F as iconVolumeLowOutline, G as iconVolumeHighOutline, o as okIcon } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, state } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { q as iconChevronForwardOutline, z as iconChevronBackOutline } from "./shared/icons.js";
4
+ import { g as iconChevronForwardOutline, t as iconChevronBackOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, state, query } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { z as iconChevronBackOutline, q as iconChevronForwardOutline } from "./shared/icons.js";
4
+ import { t as iconChevronBackOutline, g as iconChevronForwardOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
package/dist/ok-chat.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, query } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { G as iconSend } from "./shared/icons.js";
4
+ import { B as iconSend } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
package/dist/ok-combo.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, state } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { h as iconChevronDownOutline } from "./shared/icons.js";
4
+ import { w as iconChevronDownOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, state, query } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { o as okIcon, Q as iconSearchOutline } from "./shared/icons.js";
4
+ import { o as okIcon, L as iconSearchOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -3,7 +3,17 @@ import { property, state } from "lit/decorators.js";
3
3
  import { repeat } from "lit/directives/repeat.js";
4
4
  import { styleMap } from "lit/directives/style-map.js";
5
5
  import { define } from "./define.js";
6
- import { i as iconCalendarOutline, a as iconEllipsisVertical, o as okIcon, b as iconClose, c as iconChevronBack, d as iconChevronForward, e as iconFileTrayOutline, f as iconSwapVerticalOutline, g as iconChevronUpOutline, h as iconChevronDownOutline } from "./shared/icons.js";
6
+ import { N as iconCalendarOutline, s as iconEllipsisVertical, o as okIcon, m as iconClose, a as iconChevronBack, Q as iconChevronForward, R as iconFileTrayOutline, S as iconSwapVerticalOutline, T as iconChevronUpOutline, w as iconChevronDownOutline } from "./shared/icons.js";
7
+ const CSV_BOM = "\uFEFF";
8
+ function decodeCsvBuffer(buf) {
9
+ let text;
10
+ try {
11
+ text = new TextDecoder("utf-8", { fatal: true }).decode(buf);
12
+ } catch {
13
+ text = new TextDecoder("windows-1252").decode(buf);
14
+ }
15
+ return text.charCodeAt(0) === 65279 ? text.slice(1) : text;
16
+ }
7
17
  var __defProp = Object.defineProperty;
8
18
  var __decorateClass = (decorators, target, key, kind) => {
9
19
  var result = void 0;
@@ -408,7 +418,7 @@ class OkDataTable extends LitElement {
408
418
  const head = cols.map((c) => this.csvEscape(c.key)).join(",");
409
419
  const lines = this.rows.map((r) => cols.map((c) => this.csvEscape(r[c.key])).join(","));
410
420
  const csv = [head, ...lines].join("\r\n");
411
- const blob = new Blob([csv], { type: "text/csv;charset=utf-8" });
421
+ const blob = new Blob([CSV_BOM + csv], { type: "text/csv;charset=utf-8" });
412
422
  const url = URL.createObjectURL(blob);
413
423
  const a = document.createElement("a");
414
424
  a.href = url;
@@ -456,7 +466,7 @@ class OkDataTable extends LitElement {
456
466
  const input = ev.target;
457
467
  const file = input.files?.[0];
458
468
  if (!file) return;
459
- const text = await file.text();
469
+ const text = decodeCsvBuffer(await file.arrayBuffer());
460
470
  const { headers, rows } = this.parseCsv(text);
461
471
  this.emit("csvImport", { headers, rows });
462
472
  this.emit("import", { headers, rows });
@@ -2,7 +2,7 @@ import { LitElement, css, nothing, html } from "lit";
2
2
  import { property, state } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
4
  import { c as computeAnchor } from "./shared/anchor.js";
5
- import { i as iconCalendarOutline, z as iconChevronBackOutline, q as iconChevronForwardOutline } from "./shared/icons.js";
5
+ import { N as iconCalendarOutline, t as iconChevronBackOutline, g as iconChevronForwardOutline } from "./shared/icons.js";
6
6
  var __defProp = Object.defineProperty;
7
7
  var __decorateClass = (decorators, target, key, kind) => {
8
8
  var result = void 0;
package/dist/ok-drawer.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, query } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { o as okIcon, B as iconCloseOutline } from "./shared/icons.js";
4
+ import { o as okIcon, v as iconCloseOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, state, query } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { D as iconCloudUploadOutline, E as iconAlertCircleOutline, F as iconDocumentOutline, B as iconCloseOutline } from "./shared/icons.js";
4
+ import { y as iconCloudUploadOutline, z as iconAlertCircleOutline, A as iconDocumentOutline, v as iconCloseOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, state, query } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { q as iconChevronForwardOutline, o as okIcon, T as iconFolderOpenOutline } from "./shared/icons.js";
4
+ import { g as iconChevronForwardOutline, o as okIcon, P as iconFolderOpenOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, state } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { r as iconInformationCircle, s as iconAlertCircle, t as iconWarning, u as iconCheckmarkCircle, o as okIcon, b as iconClose } from "./shared/icons.js";
4
+ import { h as iconInformationCircle, j as iconAlertCircle, k as iconWarning, l as iconCheckmarkCircle, o as okIcon, m as iconClose } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
package/dist/ok-kpi.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { v as iconTrendingUp, w as iconTrendingDown, x as iconRemove, o as okIcon } from "./shared/icons.js";
4
+ import { n as iconTrendingUp, p as iconTrendingDown, q as iconRemove, o as okIcon } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, render, nothing, html } from "lit";
2
2
  import { property, state } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { M as iconExpandOutline, B as iconCloseOutline, z as iconChevronBackOutline, q as iconChevronForwardOutline, I as iconDownloadOutline, S as iconPlayOutline } from "./shared/icons.js";
4
+ import { H as iconExpandOutline, v as iconCloseOutline, t as iconChevronBackOutline, g as iconChevronForwardOutline, D as iconDownloadOutline, O as iconPlayOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
package/dist/ok-mail.js CHANGED
@@ -2,7 +2,7 @@ import { LitElement, css, nothing, html } from "lit";
2
2
  import { property, state } from "lit/decorators.js";
3
3
  import { repeat } from "lit/directives/repeat.js";
4
4
  import { define } from "./define.js";
5
- import { j as iconCreateOutline, o as okIcon, c as iconChevronBack, k as iconArrowUndoOutline, l as iconArrowRedoOutline, m as iconArchiveOutline, n as iconTrashOutline, p as iconDocumentAttachOutline } from "./shared/icons.js";
5
+ import { i as iconCreateOutline, o as okIcon, a as iconChevronBack, b as iconArrowUndoOutline, c as iconArrowRedoOutline, d as iconArchiveOutline, e as iconTrashOutline, f as iconDocumentAttachOutline } from "./shared/icons.js";
6
6
  var __defProp = Object.defineProperty;
7
7
  var __decorateClass = (decorators, target, key, kind) => {
8
8
  var result = void 0;
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, state } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { o as okIcon, q as iconChevronForwardOutline, H as iconMenuOutline } from "./shared/icons.js";
4
+ import { o as okIcon, g as iconChevronForwardOutline, C as iconMenuOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html, nothing } from "lit";
2
2
  import { property } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { o as okIcon, R as iconNotificationsOffOutline, B as iconCloseOutline } from "./shared/icons.js";
4
+ import { o as okIcon, M as iconNotificationsOffOutline, v as iconCloseOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
package/dist/ok-pdf.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { N as iconOpenOutline, O as iconDocumentTextOutline, I as iconDownloadOutline } from "./shared/icons.js";
4
+ import { I as iconOpenOutline, J as iconDocumentTextOutline, D as iconDownloadOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
package/dist/ok-pinpad.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { C as iconBackspaceOutline, o as okIcon } from "./shared/icons.js";
4
+ import { x as iconBackspaceOutline, o as okIcon } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { x as iconRemove, P as iconAdd } from "./shared/icons.js";
4
+ import { q as iconRemove, K as iconAdd } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -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 })
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, state } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { z as iconChevronBackOutline, q as iconChevronForwardOutline } from "./shared/icons.js";
4
+ import { t as iconChevronBackOutline, g as iconChevronForwardOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, query } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { n as iconTrashOutline, I as iconDownloadOutline } from "./shared/icons.js";
4
+ import { e as iconTrashOutline, D as iconDownloadOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, state } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { o as okIcon, h as iconChevronDownOutline } from "./shared/icons.js";
4
+ import { o as okIcon, w as iconChevronDownOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { y as iconCheckmarkOutline } from "./shared/icons.js";
4
+ import { r as iconCheckmarkOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, state } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { B as iconCloseOutline } from "./shared/icons.js";
4
+ import { v as iconCloseOutline } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;