@erplora/outfitkit 0.1.11 → 0.1.13
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.
|
@@ -181,6 +181,11 @@ export declare class OkDataTable extends LitElement {
|
|
|
181
181
|
* vistas. La presencia de 'cards' (o 'card') habilita la vista tarjetas. Compatibilidad: el
|
|
182
182
|
* antiguo valor booleano sigue funcionando. */
|
|
183
183
|
views: boolean | string[];
|
|
184
|
+
/** (NUEVO) Vista inicial al montar: 'cards' | 'table'. Por defecto 'table' (compatibilidad). Solo
|
|
185
|
+
* aplica una vez, en el primer render; el usuario puede luego conmutar con el toggle. Si pide
|
|
186
|
+
* 'cards' pero la vista tarjetas no está habilitada (`views`), se ignora. Evita el hack de fijar
|
|
187
|
+
* `viewMode` por referencia tras montar (frágil si la tabla monta detrás de un `v-if`/loading). */
|
|
188
|
+
defaultView?: 'table' | 'cards';
|
|
184
189
|
/** (NUEVO, alias documentado) Habilita import/export CSV (equivalente a `exportable`+`importable`
|
|
185
190
|
* / `csv`). Mostrar el botón de Exportar. */
|
|
186
191
|
exportable: boolean;
|
|
@@ -250,7 +255,7 @@ export declare class OkDataTable extends LitElement {
|
|
|
250
255
|
private onImportFile;
|
|
251
256
|
private toggle;
|
|
252
257
|
private cloneFilters;
|
|
253
|
-
private
|
|
258
|
+
private setFilterValues;
|
|
254
259
|
private setFilterRange;
|
|
255
260
|
private applyFilters;
|
|
256
261
|
private clearFilters;
|
|
@@ -286,6 +291,7 @@ export declare class OkDataTable extends LitElement {
|
|
|
286
291
|
private onFilterSelect;
|
|
287
292
|
private onInlineRange;
|
|
288
293
|
private openMenu;
|
|
294
|
+
firstUpdated(): void;
|
|
289
295
|
private setViewMode;
|
|
290
296
|
private renderFilterControl;
|
|
291
297
|
private renderInlineFilters;
|
package/dist/ok-data-table.js
CHANGED
|
@@ -149,13 +149,7 @@ class OkDataTable extends LitElement {
|
|
|
149
149
|
.fblock { display: flex; flex-direction: column; gap: 0.45rem; }
|
|
150
150
|
.flabel { font-size: 13px; font-weight: 500; color: var(--color); }
|
|
151
151
|
.frange { display: flex; gap: 0.5rem; }
|
|
152
|
-
/* Filtros cliente:
|
|
153
|
-
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
|
|
154
|
-
.chip { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.6rem; border: 1px solid var(--border-color); border-radius: 999px; background: var(--background); color: var(--color-muted); font-size: 12px; cursor: pointer; transition: color 0.12s, background 0.12s, border-color 0.12s; }
|
|
155
|
-
.chip:hover { color: var(--color); }
|
|
156
|
-
.chip.on { border-color: var(--primary); color: var(--primary); background: color-mix(in srgb, var(--primary) 15%, transparent); }
|
|
157
|
-
.chip ion-icon { font-size: 12px; }
|
|
158
|
-
.chip-empty { font-size: 12px; color: var(--color-muted); }
|
|
152
|
+
/* Filtros cliente: multi-select con ion-select (ventana flotante de Ionic) + rango de fechas. */
|
|
159
153
|
.daterange { display: flex; gap: 0.6rem; }
|
|
160
154
|
.daterange ion-input { flex: 1; }
|
|
161
155
|
/* Pie del drawer de filtros: Limpiar / Aplicar. */
|
|
@@ -167,6 +161,10 @@ class OkDataTable extends LitElement {
|
|
|
167
161
|
:host([fill]) .card { flex: 1 1 auto; min-height: 0; }
|
|
168
162
|
:host([fill]) .bar, :host([fill]) .panel, :host([fill]) .pager { flex: 0 0 auto; }
|
|
169
163
|
:host([fill]) .scroll, :host([fill]) .cards-grid { flex: 1 1 auto; min-height: 0; overflow: auto; }
|
|
164
|
+
/* Sin filas, renderTable/renderCards devuelven SOLO el bloque .empty (sin .scroll). En modo
|
|
165
|
+
fill hay que estirarlo para que ocupe el hueco entre toolbar y pager y centre su contenido
|
|
166
|
+
(icono + mensaje) en vertical; si no, queda pegado arriba con el pager a media altura. */
|
|
167
|
+
:host([fill]) .empty { flex: 1 1 auto; min-height: 0; }
|
|
170
168
|
|
|
171
169
|
/* ── Topbar / cabecera (relieve) ─────────────────────────────────────────────────────── */
|
|
172
170
|
.bar { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.65rem 1rem; border-bottom: 1px solid var(--border-color); background: var(--header-background); }
|
|
@@ -271,27 +269,35 @@ class OkDataTable extends LitElement {
|
|
|
271
269
|
.range { display: flex; gap: 0.25rem; }
|
|
272
270
|
|
|
273
271
|
/* ── Vista tarjetas ──────────────────────────────────────────────────────────────────── */
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
272
|
+
/* Cada tarjeta mide SU contenido (no se estira al alto de la fila ni del contenedor):
|
|
273
|
+
- grid-auto-rows: max-content → cada fila implícita = alto de su contenido. CLAVE: sin esto,
|
|
274
|
+
en modo fill (grid de alto fijo + align-content:start) cuando las tarjetas no caben el
|
|
275
|
+
navegador encoge los tracks de fila y las tarjetas se solapan.
|
|
276
|
+
- align-content: start → empaqueta las filas arriba (no reparte el hueco sobrante estirando).
|
|
277
|
+
- align-items: start → en una fila multi-columna cada tarjeta mide su propio contenido.
|
|
278
|
+
En modo fill el grid es flex-child con overflow:auto → cuando las tarjetas no caben aparece el
|
|
279
|
+
scroll DENTRO de la tabla (no crece hacia fuera). */
|
|
280
|
+
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.75rem; padding: 1rem; grid-auto-rows: max-content; align-content: start; align-items: start; }
|
|
281
|
+
/* Tarjeta = ion-card NATIVO de Ionic: su fondo, radio, elevación y padding son los de Ionic y NO
|
|
282
|
+
se sobrescriben. Aquí solo se ajusta lo que el contexto de rejilla exige (margin) y los huecos
|
|
283
|
+
que Ionic no trae (cabecera en fila, filas clave-valor, barra de acciones, resalte de selección). */
|
|
284
|
+
ion-card.rcard { margin: 0; } /* la rejilla aporta el gap → sin esto el margin por defecto de ion-card lo duplica */
|
|
285
|
+
ion-card.rcard.selected { outline: 2px solid var(--primary); outline-offset: -2px; }
|
|
281
286
|
@media (prefers-reduced-motion: reduce) {
|
|
282
287
|
.gh.sortable:hover, .gh.sortable:active,
|
|
283
|
-
.grow-data:hover, .grow-data:active
|
|
284
|
-
.rcard:hover, .rcard:active { transform: none; }
|
|
288
|
+
.grow-data:hover, .grow-data:active { transform: none; }
|
|
285
289
|
}
|
|
286
|
-
|
|
287
|
-
.rcard-head { display: flex; align-items: center; gap: 0.5rem;
|
|
290
|
+
/* Cabecera: ion-card-header en fila (icono + título + checkbox); se conserva su padding Ionic. */
|
|
291
|
+
ion-card-header.rcard-head { display: flex; align-items: center; gap: 0.5rem; }
|
|
288
292
|
.rcard-head .rc-icon { display: inline-flex; color: var(--primary); }
|
|
289
293
|
.rcard-head .rc-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
|
|
290
|
-
|
|
294
|
+
/* Cuerpo: ion-card-content (padding Ionic por defecto) con las filas clave-valor apiladas. */
|
|
295
|
+
ion-card-content.rcard-body { display: flex; flex-direction: column; gap: 0.4rem; }
|
|
291
296
|
.rrow { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 13px; }
|
|
292
297
|
.rrow .rk { color: var(--color-muted); }
|
|
293
|
-
.rrow .rv { font-weight: 500; text-align: right; }
|
|
294
|
-
|
|
298
|
+
.rrow .rv { font-weight: 500; text-align: right; color: var(--color); }
|
|
299
|
+
/* Barra de acciones (Ionic no trae "card actions"): pie alineado a la derecha, fondo transparente. */
|
|
300
|
+
.ractions { display: flex; justify-content: flex-end; gap: 0.25rem; padding: 0 0.5rem 0.5rem; }
|
|
295
301
|
|
|
296
302
|
/* ── Estado vacío ────────────────────────────────────────────────────────────────────── */
|
|
297
303
|
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; padding: 3.5rem 1rem; text-align: center; color: var(--color-muted); }
|
|
@@ -465,12 +471,12 @@ class OkDataTable extends LitElement {
|
|
|
465
471
|
}
|
|
466
472
|
return out;
|
|
467
473
|
}
|
|
468
|
-
|
|
474
|
+
// Fija el conjunto de valores seleccionados de una columna (multi-select del drawer = ion-select).
|
|
475
|
+
setFilterValues(key, values) {
|
|
469
476
|
const next = this.cloneFilters(this.filterDraft);
|
|
470
|
-
const
|
|
471
|
-
if (
|
|
472
|
-
else values
|
|
473
|
-
next[key] = { ...next[key], values };
|
|
477
|
+
const clean = (values ?? []).filter((v) => v != null && v !== "");
|
|
478
|
+
if (clean.length) next[key] = { ...next[key], values: new Set(clean) };
|
|
479
|
+
else next[key] = { ...next[key], values: void 0 };
|
|
474
480
|
this.filterDraft = next;
|
|
475
481
|
}
|
|
476
482
|
setFilterRange(key, edge, value) {
|
|
@@ -665,6 +671,13 @@ class OkDataTable extends LitElement {
|
|
|
665
671
|
this.menuEv = ev;
|
|
666
672
|
this.menuOpen = true;
|
|
667
673
|
}
|
|
674
|
+
// Aplica la vista inicial declarada (`default-view`) una sola vez, tras el primer render. Es la
|
|
675
|
+
// forma robusta de arrancar en tarjetas sin depender de fijar `viewMode` por referencia (que
|
|
676
|
+
// falla si la tabla monta detrás de un `v-if`/loading y el ref aún es null).
|
|
677
|
+
firstUpdated() {
|
|
678
|
+
if (this.defaultView === "cards" && this.cardViewEnabled) this.viewMode = "cards";
|
|
679
|
+
else if (this.defaultView === "table") this.viewMode = "table";
|
|
680
|
+
}
|
|
668
681
|
setViewMode(mode) {
|
|
669
682
|
if (this.viewMode === mode) return;
|
|
670
683
|
this.viewMode = mode;
|
|
@@ -1020,21 +1033,23 @@ class OkDataTable extends LitElement {
|
|
|
1020
1033
|
</div>
|
|
1021
1034
|
`;
|
|
1022
1035
|
}
|
|
1023
|
-
const
|
|
1024
|
-
const selected = this.filterDraft[col.key]?.values ?? /* @__PURE__ */ new Set();
|
|
1036
|
+
const opts = col.options ?? this.distinctValues(col).map((v) => ({ value: v, label: v }));
|
|
1037
|
+
const selected = [...this.filterDraft[col.key]?.values ?? /* @__PURE__ */ new Set()];
|
|
1025
1038
|
return html`
|
|
1026
1039
|
<div class="fblock">
|
|
1027
|
-
<
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1040
|
+
<ion-select
|
|
1041
|
+
label=${label}
|
|
1042
|
+
label-placement="stacked"
|
|
1043
|
+
fill="outline"
|
|
1044
|
+
multiple
|
|
1045
|
+
interface="modal"
|
|
1046
|
+
.interfaceOptions=${{ cssClass: "ok-overlay" }}
|
|
1047
|
+
placeholder=${this.t.select}
|
|
1048
|
+
.value=${selected}
|
|
1049
|
+
@ionChange=${(e) => this.setFilterValues(col.key, e.detail.value ?? [])}
|
|
1050
|
+
>
|
|
1051
|
+
${opts.length === 0 ? html`<ion-select-option .disabled=${true} value="">${this.t.noValues}</ion-select-option>` : opts.map((o) => html`<ion-select-option value=${o.value}>${o.label}</ion-select-option>`)}
|
|
1052
|
+
</ion-select>
|
|
1038
1053
|
</div>
|
|
1039
1054
|
`;
|
|
1040
1055
|
}
|
|
@@ -1113,21 +1128,21 @@ class OkDataTable extends LitElement {
|
|
|
1113
1128
|
const selected = this.selectable && this.selection.has(key);
|
|
1114
1129
|
const icon = this.cardIcon?.(row);
|
|
1115
1130
|
return html`
|
|
1116
|
-
<
|
|
1131
|
+
<ion-card class=${`rcard${selected ? " selected" : ""}`}>
|
|
1117
1132
|
${hasHead ? html`
|
|
1118
|
-
<header class="rcard-head">
|
|
1133
|
+
<ion-card-header class="rcard-head">
|
|
1119
1134
|
${icon != null && icon !== "" ? html`<span class="rc-icon">${typeof icon === "string" ? html`<ion-icon name=${icon}></ion-icon>` : icon}</span>` : nothing}
|
|
1120
1135
|
<span class="rc-title">${this.cardTitle ? this.cardTitle(row) : nothing}</span>
|
|
1121
1136
|
${this.selectable ? html`<ion-checkbox .checked=${selected} aria-label=${this.t.select} @ionChange=${() => this.toggleRow(key)}></ion-checkbox>` : nothing}
|
|
1122
|
-
</header>
|
|
1137
|
+
</ion-card-header>
|
|
1123
1138
|
` : nothing}
|
|
1124
|
-
<
|
|
1139
|
+
<ion-card-content class="rcard-body">
|
|
1125
1140
|
${this.renderCard ? this.renderCard(row) : this.visibleColumns.map(
|
|
1126
1141
|
(c) => html`<div class="rrow"><span class="rk">${c.header}</span><span class="rv">${c.render ? c.render(row) : this.cell(c, row)}</span></div>`
|
|
1127
1142
|
)}
|
|
1128
|
-
</
|
|
1143
|
+
</ion-card-content>
|
|
1129
1144
|
${this.actions.length ? html`<div class="ractions">${this.actionButtons(row)}</div>` : nothing}
|
|
1130
|
-
</
|
|
1145
|
+
</ion-card>
|
|
1131
1146
|
`;
|
|
1132
1147
|
}
|
|
1133
1148
|
)}
|
|
@@ -1207,6 +1222,9 @@ __decorateClass([
|
|
|
1207
1222
|
__decorateClass([
|
|
1208
1223
|
property({ attribute: false })
|
|
1209
1224
|
], OkDataTable.prototype, "views");
|
|
1225
|
+
__decorateClass([
|
|
1226
|
+
property({ attribute: "default-view" })
|
|
1227
|
+
], OkDataTable.prototype, "defaultView");
|
|
1210
1228
|
__decorateClass([
|
|
1211
1229
|
property({ type: Boolean })
|
|
1212
1230
|
], OkDataTable.prototype, "exportable");
|
package/dist/outfitkit.bundle.js
CHANGED
|
@@ -264,7 +264,7 @@ Yt.elementStyles = [], Yt.shadowRootOptions = { mode: "open" }, Yt[Cr("elementPr
|
|
|
264
264
|
*/
|
|
265
265
|
const Wo = globalThis, ya = (n) => n, no = Wo.trustedTypes, ka = no ? no.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Go = "$lit$", xe = `lit$${Math.random().toFixed(9).slice(2)}$`, Qo = "?" + xe, bi = `<${Qo}>`, gt = document, Er = () => gt.createComment(""), Pr = (n) => n === null || typeof n != "object" && typeof n != "function", Zo = Array.isArray, Ra = (n) => Zo(n) || typeof n?.[Symbol.iterator] == "function", Oo = `[
|
|
266
266
|
\f\r]`, kr = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, wa = /-->/g, $a = />/g, mt = RegExp(`>|${Oo}(?:([^\\s"'>=/]+)(${Oo}*=${Oo}*(?:[^
|
|
267
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), za = /'/g, _a = /"/g, Na = /^(?:script|style|textarea|title)$/i, Jo = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), s = Jo(1), P = Jo(2),
|
|
267
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), za = /'/g, _a = /"/g, Na = /^(?:script|style|textarea|title)$/i, Jo = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), s = Jo(1), P = Jo(2), Ld = Jo(3), ye = Symbol.for("lit-noChange"), m = Symbol.for("lit-nothing"), Ca = /* @__PURE__ */ new WeakMap(), ft = gt.createTreeWalker(gt, 129);
|
|
268
268
|
function qa(n, e) {
|
|
269
269
|
if (!Zo(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
270
270
|
return ka !== void 0 ? ka.createHTML(e) : e;
|
|
@@ -585,7 +585,7 @@ const Sa = (n, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorat
|
|
|
585
585
|
* Copyright 2017 Google LLC
|
|
586
586
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
587
587
|
*/
|
|
588
|
-
function
|
|
588
|
+
function L(n, e) {
|
|
589
589
|
return (t, r, o) => {
|
|
590
590
|
const a = (i) => i.renderRoot?.querySelector(n) ?? null;
|
|
591
591
|
if (e) {
|
|
@@ -976,10 +976,10 @@ const Qa = "important", ji = " !" + Qa, Ma = ra(class extends oa {
|
|
|
976
976
|
return ye;
|
|
977
977
|
}
|
|
978
978
|
});
|
|
979
|
-
var
|
|
980
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
979
|
+
var Ii = Object.defineProperty, Li = Object.getOwnPropertyDescriptor, C = (n, e, t, r) => {
|
|
980
|
+
for (var o = r > 1 ? void 0 : r ? Li(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
981
981
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
982
|
-
return r && o &&
|
|
982
|
+
return r && o && Ii(e, t, o), o;
|
|
983
983
|
};
|
|
984
984
|
const Ti = {
|
|
985
985
|
search: "Search…",
|
|
@@ -1074,13 +1074,7 @@ class _ extends g {
|
|
|
1074
1074
|
.fblock { display: flex; flex-direction: column; gap: 0.45rem; }
|
|
1075
1075
|
.flabel { font-size: 13px; font-weight: 500; color: var(--color); }
|
|
1076
1076
|
.frange { display: flex; gap: 0.5rem; }
|
|
1077
|
-
/* Filtros cliente:
|
|
1078
|
-
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
|
|
1079
|
-
.chip { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.6rem; border: 1px solid var(--border-color); border-radius: 999px; background: var(--background); color: var(--color-muted); font-size: 12px; cursor: pointer; transition: color 0.12s, background 0.12s, border-color 0.12s; }
|
|
1080
|
-
.chip:hover { color: var(--color); }
|
|
1081
|
-
.chip.on { border-color: var(--primary); color: var(--primary); background: color-mix(in srgb, var(--primary) 15%, transparent); }
|
|
1082
|
-
.chip ion-icon { font-size: 12px; }
|
|
1083
|
-
.chip-empty { font-size: 12px; color: var(--color-muted); }
|
|
1077
|
+
/* Filtros cliente: multi-select con ion-select (ventana flotante de Ionic) + rango de fechas. */
|
|
1084
1078
|
.daterange { display: flex; gap: 0.6rem; }
|
|
1085
1079
|
.daterange ion-input { flex: 1; }
|
|
1086
1080
|
/* Pie del drawer de filtros: Limpiar / Aplicar. */
|
|
@@ -1092,6 +1086,10 @@ class _ extends g {
|
|
|
1092
1086
|
:host([fill]) .card { flex: 1 1 auto; min-height: 0; }
|
|
1093
1087
|
:host([fill]) .bar, :host([fill]) .panel, :host([fill]) .pager { flex: 0 0 auto; }
|
|
1094
1088
|
:host([fill]) .scroll, :host([fill]) .cards-grid { flex: 1 1 auto; min-height: 0; overflow: auto; }
|
|
1089
|
+
/* Sin filas, renderTable/renderCards devuelven SOLO el bloque .empty (sin .scroll). En modo
|
|
1090
|
+
fill hay que estirarlo para que ocupe el hueco entre toolbar y pager y centre su contenido
|
|
1091
|
+
(icono + mensaje) en vertical; si no, queda pegado arriba con el pager a media altura. */
|
|
1092
|
+
:host([fill]) .empty { flex: 1 1 auto; min-height: 0; }
|
|
1095
1093
|
|
|
1096
1094
|
/* ── Topbar / cabecera (relieve) ─────────────────────────────────────────────────────── */
|
|
1097
1095
|
.bar { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.65rem 1rem; border-bottom: 1px solid var(--border-color); background: var(--header-background); }
|
|
@@ -1196,27 +1194,35 @@ class _ extends g {
|
|
|
1196
1194
|
.range { display: flex; gap: 0.25rem; }
|
|
1197
1195
|
|
|
1198
1196
|
/* ── Vista tarjetas ──────────────────────────────────────────────────────────────────── */
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1197
|
+
/* Cada tarjeta mide SU contenido (no se estira al alto de la fila ni del contenedor):
|
|
1198
|
+
- grid-auto-rows: max-content → cada fila implícita = alto de su contenido. CLAVE: sin esto,
|
|
1199
|
+
en modo fill (grid de alto fijo + align-content:start) cuando las tarjetas no caben el
|
|
1200
|
+
navegador encoge los tracks de fila y las tarjetas se solapan.
|
|
1201
|
+
- align-content: start → empaqueta las filas arriba (no reparte el hueco sobrante estirando).
|
|
1202
|
+
- align-items: start → en una fila multi-columna cada tarjeta mide su propio contenido.
|
|
1203
|
+
En modo fill el grid es flex-child con overflow:auto → cuando las tarjetas no caben aparece el
|
|
1204
|
+
scroll DENTRO de la tabla (no crece hacia fuera). */
|
|
1205
|
+
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.75rem; padding: 1rem; grid-auto-rows: max-content; align-content: start; align-items: start; }
|
|
1206
|
+
/* Tarjeta = ion-card NATIVO de Ionic: su fondo, radio, elevación y padding son los de Ionic y NO
|
|
1207
|
+
se sobrescriben. Aquí solo se ajusta lo que el contexto de rejilla exige (margin) y los huecos
|
|
1208
|
+
que Ionic no trae (cabecera en fila, filas clave-valor, barra de acciones, resalte de selección). */
|
|
1209
|
+
ion-card.rcard { margin: 0; } /* la rejilla aporta el gap → sin esto el margin por defecto de ion-card lo duplica */
|
|
1210
|
+
ion-card.rcard.selected { outline: 2px solid var(--primary); outline-offset: -2px; }
|
|
1206
1211
|
@media (prefers-reduced-motion: reduce) {
|
|
1207
1212
|
.gh.sortable:hover, .gh.sortable:active,
|
|
1208
|
-
.grow-data:hover, .grow-data:active
|
|
1209
|
-
.rcard:hover, .rcard:active { transform: none; }
|
|
1213
|
+
.grow-data:hover, .grow-data:active { transform: none; }
|
|
1210
1214
|
}
|
|
1211
|
-
|
|
1212
|
-
.rcard-head { display: flex; align-items: center; gap: 0.5rem;
|
|
1215
|
+
/* Cabecera: ion-card-header en fila (icono + título + checkbox); se conserva su padding Ionic. */
|
|
1216
|
+
ion-card-header.rcard-head { display: flex; align-items: center; gap: 0.5rem; }
|
|
1213
1217
|
.rcard-head .rc-icon { display: inline-flex; color: var(--primary); }
|
|
1214
1218
|
.rcard-head .rc-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
|
|
1215
|
-
|
|
1219
|
+
/* Cuerpo: ion-card-content (padding Ionic por defecto) con las filas clave-valor apiladas. */
|
|
1220
|
+
ion-card-content.rcard-body { display: flex; flex-direction: column; gap: 0.4rem; }
|
|
1216
1221
|
.rrow { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 13px; }
|
|
1217
1222
|
.rrow .rk { color: var(--color-muted); }
|
|
1218
|
-
.rrow .rv { font-weight: 500; text-align: right; }
|
|
1219
|
-
|
|
1223
|
+
.rrow .rv { font-weight: 500; text-align: right; color: var(--color); }
|
|
1224
|
+
/* Barra de acciones (Ionic no trae "card actions"): pie alineado a la derecha, fondo transparente. */
|
|
1225
|
+
.ractions { display: flex; justify-content: flex-end; gap: 0.25rem; padding: 0 0.5rem 0.5rem; }
|
|
1220
1226
|
|
|
1221
1227
|
/* ── Estado vacío ────────────────────────────────────────────────────────────────────── */
|
|
1222
1228
|
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; padding: 3.5rem 1rem; text-align: center; color: var(--color-muted); }
|
|
@@ -1338,9 +1344,10 @@ class _ extends g {
|
|
|
1338
1344
|
t[r] = { values: o.values ? new Set(o.values) : void 0, from: o.from, to: o.to };
|
|
1339
1345
|
return t;
|
|
1340
1346
|
}
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1347
|
+
// Fija el conjunto de valores seleccionados de una columna (multi-select del drawer = ion-select).
|
|
1348
|
+
setFilterValues(e, t) {
|
|
1349
|
+
const r = this.cloneFilters(this.filterDraft), o = (t ?? []).filter((a) => a != null && a !== "");
|
|
1350
|
+
o.length ? r[e] = { ...r[e], values: new Set(o) } : r[e] = { ...r[e], values: void 0 }, this.filterDraft = r;
|
|
1344
1351
|
}
|
|
1345
1352
|
setFilterRange(e, t, r) {
|
|
1346
1353
|
const o = this.cloneFilters(this.filterDraft);
|
|
@@ -1500,6 +1507,12 @@ class _ extends g {
|
|
|
1500
1507
|
openMenu(e) {
|
|
1501
1508
|
this.menuEv = e, this.menuOpen = !0;
|
|
1502
1509
|
}
|
|
1510
|
+
// Aplica la vista inicial declarada (`default-view`) una sola vez, tras el primer render. Es la
|
|
1511
|
+
// forma robusta de arrancar en tarjetas sin depender de fijar `viewMode` por referencia (que
|
|
1512
|
+
// falla si la tabla monta detrás de un `v-if`/loading y el ref aún es null).
|
|
1513
|
+
firstUpdated() {
|
|
1514
|
+
this.defaultView === "cards" && this.cardViewEnabled ? this.viewMode = "cards" : this.defaultView === "table" && (this.viewMode = "table");
|
|
1515
|
+
}
|
|
1503
1516
|
setViewMode(e) {
|
|
1504
1517
|
this.viewMode !== e && (this.viewMode = e, this.emit("viewChange", e));
|
|
1505
1518
|
}
|
|
@@ -1819,20 +1832,22 @@ class _ extends g {
|
|
|
1819
1832
|
</div>
|
|
1820
1833
|
`;
|
|
1821
1834
|
}
|
|
1822
|
-
const r = this.distinctValues(e), o = this.filterDraft[e.key]?.values ?? /* @__PURE__ */ new Set();
|
|
1835
|
+
const r = e.options ?? this.distinctValues(e).map((a) => ({ value: a, label: a })), o = [...this.filterDraft[e.key]?.values ?? /* @__PURE__ */ new Set()];
|
|
1823
1836
|
return s`
|
|
1824
1837
|
<div class="fblock">
|
|
1825
|
-
<
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1838
|
+
<ion-select
|
|
1839
|
+
label=${t}
|
|
1840
|
+
label-placement="stacked"
|
|
1841
|
+
fill="outline"
|
|
1842
|
+
multiple
|
|
1843
|
+
interface="modal"
|
|
1844
|
+
.interfaceOptions=${{ cssClass: "ok-overlay" }}
|
|
1845
|
+
placeholder=${this.t.select}
|
|
1846
|
+
.value=${o}
|
|
1847
|
+
@ionChange=${(a) => this.setFilterValues(e.key, a.detail.value ?? [])}
|
|
1848
|
+
>
|
|
1849
|
+
${r.length === 0 ? s`<ion-select-option .disabled=${!0} value="">${this.t.noValues}</ion-select-option>` : r.map((a) => s`<ion-select-option value=${a.value}>${a.label}</ion-select-option>`)}
|
|
1850
|
+
</ion-select>
|
|
1836
1851
|
</div>
|
|
1837
1852
|
`;
|
|
1838
1853
|
}
|
|
@@ -1902,21 +1917,21 @@ class _ extends g {
|
|
|
1902
1917
|
(r) => {
|
|
1903
1918
|
const o = this.keyOf(r), a = this.selectable && this.selection.has(o), i = this.cardIcon?.(r);
|
|
1904
1919
|
return s`
|
|
1905
|
-
<
|
|
1920
|
+
<ion-card class=${`rcard${a ? " selected" : ""}`}>
|
|
1906
1921
|
${t ? s`
|
|
1907
|
-
<header class="rcard-head">
|
|
1922
|
+
<ion-card-header class="rcard-head">
|
|
1908
1923
|
${i != null && i !== "" ? s`<span class="rc-icon">${typeof i == "string" ? s`<ion-icon name=${i}></ion-icon>` : i}</span>` : m}
|
|
1909
1924
|
<span class="rc-title">${this.cardTitle ? this.cardTitle(r) : m}</span>
|
|
1910
1925
|
${this.selectable ? s`<ion-checkbox .checked=${a} aria-label=${this.t.select} @ionChange=${() => this.toggleRow(o)}></ion-checkbox>` : m}
|
|
1911
|
-
</header>
|
|
1926
|
+
</ion-card-header>
|
|
1912
1927
|
` : m}
|
|
1913
|
-
<
|
|
1928
|
+
<ion-card-content class="rcard-body">
|
|
1914
1929
|
${this.renderCard ? this.renderCard(r) : this.visibleColumns.map(
|
|
1915
1930
|
(c) => s`<div class="rrow"><span class="rk">${c.header}</span><span class="rv">${c.render ? c.render(r) : this.cell(c, r)}</span></div>`
|
|
1916
1931
|
)}
|
|
1917
|
-
</
|
|
1932
|
+
</ion-card-content>
|
|
1918
1933
|
${this.actions.length ? s`<div class="ractions">${this.actionButtons(r)}</div>` : m}
|
|
1919
|
-
</
|
|
1934
|
+
</ion-card>
|
|
1920
1935
|
`;
|
|
1921
1936
|
}
|
|
1922
1937
|
)}
|
|
@@ -1996,6 +2011,9 @@ C([
|
|
|
1996
2011
|
C([
|
|
1997
2012
|
l({ attribute: !1 })
|
|
1998
2013
|
], _.prototype, "views", 2);
|
|
2014
|
+
C([
|
|
2015
|
+
l({ attribute: "default-view" })
|
|
2016
|
+
], _.prototype, "defaultView", 2);
|
|
1999
2017
|
C([
|
|
2000
2018
|
l({ type: Boolean })
|
|
2001
2019
|
], _.prototype, "exportable", 2);
|
|
@@ -3608,7 +3626,7 @@ sa([
|
|
|
3608
3626
|
l({ attribute: !1 })
|
|
3609
3627
|
], uo.prototype, "labels", 2);
|
|
3610
3628
|
y("ok-stepper", uo);
|
|
3611
|
-
var rs = Object.defineProperty, os = Object.getOwnPropertyDescriptor,
|
|
3629
|
+
var rs = Object.defineProperty, os = Object.getOwnPropertyDescriptor, Ir = (n, e, t, r) => {
|
|
3612
3630
|
for (var o = r > 1 ? void 0 : r ? os(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
3613
3631
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
3614
3632
|
return r && o && rs(e, t, o), o;
|
|
@@ -3724,19 +3742,19 @@ class Jt extends g {
|
|
|
3724
3742
|
`;
|
|
3725
3743
|
}
|
|
3726
3744
|
}
|
|
3727
|
-
|
|
3745
|
+
Ir([
|
|
3728
3746
|
l({ attribute: !1 })
|
|
3729
3747
|
], Jt.prototype, "steps", 2);
|
|
3730
|
-
|
|
3748
|
+
Ir([
|
|
3731
3749
|
l({ type: Number })
|
|
3732
3750
|
], Jt.prototype, "current", 2);
|
|
3733
|
-
|
|
3751
|
+
Ir([
|
|
3734
3752
|
l()
|
|
3735
3753
|
], Jt.prototype, "backLabel", 2);
|
|
3736
|
-
|
|
3754
|
+
Ir([
|
|
3737
3755
|
l()
|
|
3738
3756
|
], Jt.prototype, "nextLabel", 2);
|
|
3739
|
-
|
|
3757
|
+
Ir([
|
|
3740
3758
|
l()
|
|
3741
3759
|
], Jt.prototype, "finishLabel", 2);
|
|
3742
3760
|
y("ok-wizard", Jt);
|
|
@@ -5055,7 +5073,7 @@ const xs = {
|
|
|
5055
5073
|
empty: "No apps",
|
|
5056
5074
|
close: "Close"
|
|
5057
5075
|
};
|
|
5058
|
-
class
|
|
5076
|
+
class Lr extends g {
|
|
5059
5077
|
constructor() {
|
|
5060
5078
|
super(...arguments), this.apps = [], this.labels = {}, this.open = !1, this.shown = !1, this.onKeydown = (e) => {
|
|
5061
5079
|
e.key === "Escape" && this.close();
|
|
@@ -5393,17 +5411,17 @@ class Ir extends g {
|
|
|
5393
5411
|
}
|
|
5394
5412
|
mo([
|
|
5395
5413
|
l({ attribute: !1 })
|
|
5396
|
-
],
|
|
5414
|
+
], Lr.prototype, "apps", 2);
|
|
5397
5415
|
mo([
|
|
5398
5416
|
l({ attribute: !1 })
|
|
5399
|
-
],
|
|
5417
|
+
], Lr.prototype, "labels", 2);
|
|
5400
5418
|
mo([
|
|
5401
5419
|
v()
|
|
5402
|
-
],
|
|
5420
|
+
], Lr.prototype, "open", 2);
|
|
5403
5421
|
mo([
|
|
5404
5422
|
v()
|
|
5405
|
-
],
|
|
5406
|
-
y("ok-app-launcher",
|
|
5423
|
+
], Lr.prototype, "shown", 2);
|
|
5424
|
+
y("ok-app-launcher", Lr);
|
|
5407
5425
|
var ys = Object.defineProperty, ks = Object.getOwnPropertyDescriptor, er = (n, e, t, r) => {
|
|
5408
5426
|
for (var o = r > 1 ? void 0 : r ? ks(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
5409
5427
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
@@ -6527,13 +6545,13 @@ vo([
|
|
|
6527
6545
|
l({ attribute: !1 })
|
|
6528
6546
|
], Tr.prototype, "labels", 2);
|
|
6529
6547
|
vo([
|
|
6530
|
-
|
|
6548
|
+
L("input")
|
|
6531
6549
|
], Tr.prototype, "firstInput", 2);
|
|
6532
6550
|
y("ok-otp", Tr);
|
|
6533
|
-
var
|
|
6534
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
6551
|
+
var Is = Object.defineProperty, Ls = Object.getOwnPropertyDescriptor, Ge = (n, e, t, r) => {
|
|
6552
|
+
for (var o = r > 1 ? void 0 : r ? Ls(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
6535
6553
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
6536
|
-
return r && o &&
|
|
6554
|
+
return r && o && Is(e, t, o), o;
|
|
6537
6555
|
};
|
|
6538
6556
|
const Ts = {
|
|
6539
6557
|
keypad: "Number pad",
|
|
@@ -7416,7 +7434,7 @@ ze([
|
|
|
7416
7434
|
v()
|
|
7417
7435
|
], ie.prototype, "error", 2);
|
|
7418
7436
|
ze([
|
|
7419
|
-
|
|
7437
|
+
L('input[type="file"]')
|
|
7420
7438
|
], ie.prototype, "input", 2);
|
|
7421
7439
|
y("ok-dropzone", ie);
|
|
7422
7440
|
var Ys = Object.defineProperty, Xs = Object.getOwnPropertyDescriptor, rr = (n, e, t, r) => {
|
|
@@ -7815,10 +7833,10 @@ Mt([
|
|
|
7815
7833
|
l({ attribute: !1 })
|
|
7816
7834
|
], Je.prototype, "labels", 2);
|
|
7817
7835
|
Mt([
|
|
7818
|
-
|
|
7836
|
+
L(".log")
|
|
7819
7837
|
], Je.prototype, "logEl", 2);
|
|
7820
7838
|
Mt([
|
|
7821
|
-
|
|
7839
|
+
L("ion-textarea")
|
|
7822
7840
|
], Je.prototype, "textareaEl", 2);
|
|
7823
7841
|
y("ok-chat", Je);
|
|
7824
7842
|
var Zs = Object.defineProperty, Js = Object.getOwnPropertyDescriptor, _e = (n, e, t, r) => {
|
|
@@ -9140,7 +9158,7 @@ Dt([
|
|
|
9140
9158
|
v()
|
|
9141
9159
|
], tt.prototype, "slottedCount", 2);
|
|
9142
9160
|
Dt([
|
|
9143
|
-
|
|
9161
|
+
L(".track")
|
|
9144
9162
|
], tt.prototype, "trackEl", 2);
|
|
9145
9163
|
y("ok-carousel", tt);
|
|
9146
9164
|
var ln = Object.defineProperty, cn = Object.getOwnPropertyDescriptor, At = (n, e, t, r) => {
|
|
@@ -9336,7 +9354,7 @@ At([
|
|
|
9336
9354
|
l({ attribute: !1 })
|
|
9337
9355
|
], rt.prototype, "labels", 2);
|
|
9338
9356
|
At([
|
|
9339
|
-
|
|
9357
|
+
L("canvas")
|
|
9340
9358
|
], rt.prototype, "canvas", 2);
|
|
9341
9359
|
y("ok-signature", rt);
|
|
9342
9360
|
var pn = Object.defineProperty, hn = Object.getOwnPropertyDescriptor, or = (n, e, t, r) => {
|
|
@@ -10133,7 +10151,7 @@ Se([
|
|
|
10133
10151
|
v()
|
|
10134
10152
|
], ne.prototype, "muted", 2);
|
|
10135
10153
|
Se([
|
|
10136
|
-
|
|
10154
|
+
L("audio")
|
|
10137
10155
|
], ne.prototype, "audioEl", 2);
|
|
10138
10156
|
y("ok-audio", ne);
|
|
10139
10157
|
var Mn = Object.defineProperty, Dn = Object.getOwnPropertyDescriptor, le = (n, e, t, r) => {
|
|
@@ -10452,18 +10470,18 @@ le([
|
|
|
10452
10470
|
v()
|
|
10453
10471
|
], G.prototype, "muted", 2);
|
|
10454
10472
|
le([
|
|
10455
|
-
|
|
10473
|
+
L("video")
|
|
10456
10474
|
], G.prototype, "videoEl", 2);
|
|
10457
10475
|
le([
|
|
10458
|
-
|
|
10476
|
+
L(".stage")
|
|
10459
10477
|
], G.prototype, "stageEl", 2);
|
|
10460
10478
|
y("ok-video", G);
|
|
10461
|
-
var jn = Object.defineProperty,
|
|
10462
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
10479
|
+
var jn = Object.defineProperty, In = Object.getOwnPropertyDescriptor, bo = (n, e, t, r) => {
|
|
10480
|
+
for (var o = r > 1 ? void 0 : r ? In(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
10463
10481
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
10464
10482
|
return r && o && jn(e, t, o), o;
|
|
10465
10483
|
};
|
|
10466
|
-
const
|
|
10484
|
+
const Ln = {
|
|
10467
10485
|
documentTitle: "PDF document",
|
|
10468
10486
|
open: "Open",
|
|
10469
10487
|
openAria: "Open or download PDF",
|
|
@@ -10553,7 +10571,7 @@ class Br extends g {
|
|
|
10553
10571
|
`;
|
|
10554
10572
|
}
|
|
10555
10573
|
get t() {
|
|
10556
|
-
return { ...
|
|
10574
|
+
return { ...Ln, ...this.labels };
|
|
10557
10575
|
}
|
|
10558
10576
|
// Abre el PDF en una pestaña nueva (descarga / vista a pantalla completa del navegador).
|
|
10559
10577
|
open() {
|
|
@@ -11224,7 +11242,7 @@ const Yn = {
|
|
|
11224
11242
|
decrement: "Decrease",
|
|
11225
11243
|
increment: "Increase"
|
|
11226
11244
|
};
|
|
11227
|
-
class
|
|
11245
|
+
class It extends g {
|
|
11228
11246
|
constructor() {
|
|
11229
11247
|
super(...arguments), this.value = 0, this.min = 0, this.step = 1, this.disabled = !1, this.labels = {};
|
|
11230
11248
|
}
|
|
@@ -11381,23 +11399,23 @@ class Lt extends g {
|
|
|
11381
11399
|
}
|
|
11382
11400
|
ar([
|
|
11383
11401
|
l({ type: Number })
|
|
11384
|
-
],
|
|
11402
|
+
], It.prototype, "value", 2);
|
|
11385
11403
|
ar([
|
|
11386
11404
|
l({ type: Number })
|
|
11387
|
-
],
|
|
11405
|
+
], It.prototype, "min", 2);
|
|
11388
11406
|
ar([
|
|
11389
11407
|
l({ type: Number })
|
|
11390
|
-
],
|
|
11408
|
+
], It.prototype, "max", 2);
|
|
11391
11409
|
ar([
|
|
11392
11410
|
l({ type: Number })
|
|
11393
|
-
],
|
|
11411
|
+
], It.prototype, "step", 2);
|
|
11394
11412
|
ar([
|
|
11395
11413
|
l({ type: Boolean, reflect: !0 })
|
|
11396
|
-
],
|
|
11414
|
+
], It.prototype, "disabled", 2);
|
|
11397
11415
|
ar([
|
|
11398
11416
|
l({ attribute: !1 })
|
|
11399
|
-
],
|
|
11400
|
-
y("ok-qty-stepper",
|
|
11417
|
+
], It.prototype, "labels", 2);
|
|
11418
|
+
y("ok-qty-stepper", It);
|
|
11401
11419
|
var Xn = Object.defineProperty, Wn = Object.getOwnPropertyDescriptor, ot = (n, e, t, r) => {
|
|
11402
11420
|
for (var o = r > 1 ? void 0 : r ? Wn(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
11403
11421
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
@@ -11797,7 +11815,7 @@ ot([
|
|
|
11797
11815
|
v()
|
|
11798
11816
|
], Ee.prototype, "activeIndex", 2);
|
|
11799
11817
|
ot([
|
|
11800
|
-
|
|
11818
|
+
L(".search input")
|
|
11801
11819
|
], Ee.prototype, "searchInput", 2);
|
|
11802
11820
|
y("ok-command-palette", Ee);
|
|
11803
11821
|
var Qn = Object.defineProperty, Zn = Object.getOwnPropertyDescriptor, Pe = (n, e, t, r) => {
|
|
@@ -11862,7 +11880,7 @@ function oo(n) {
|
|
|
11862
11880
|
b: parseInt(e.slice(4, 6), 16)
|
|
11863
11881
|
} : null;
|
|
11864
11882
|
}
|
|
11865
|
-
function
|
|
11883
|
+
function Io(n) {
|
|
11866
11884
|
const e = oo(n);
|
|
11867
11885
|
return e ? _r(e) : null;
|
|
11868
11886
|
}
|
|
@@ -12167,7 +12185,7 @@ class ce extends g {
|
|
|
12167
12185
|
// Maneja la edición del input hex: valida y, si es correcto, deriva el HSV y emite.
|
|
12168
12186
|
onHexInput(e) {
|
|
12169
12187
|
this.hexInput = e;
|
|
12170
|
-
const t =
|
|
12188
|
+
const t = Io(e);
|
|
12171
12189
|
if (!t) {
|
|
12172
12190
|
this.hexInvalid = !0;
|
|
12173
12191
|
return;
|
|
@@ -12179,7 +12197,7 @@ class ce extends g {
|
|
|
12179
12197
|
// --- Presets ---
|
|
12180
12198
|
// Selecciona un swatch preset: deriva HSV/hex y emite.
|
|
12181
12199
|
selectPreset(e) {
|
|
12182
|
-
const t =
|
|
12200
|
+
const t = Io(e);
|
|
12183
12201
|
if (!t) return;
|
|
12184
12202
|
const r = oo(t), { h: o, s: a, v: i } = Ao(r.r, r.g, r.b);
|
|
12185
12203
|
this.h = o, this.s = a, this.v = i, this.value = t, this.hexInput = t, this.hexInvalid = !1, this.emit(t, r);
|
|
@@ -12229,7 +12247,7 @@ class ce extends g {
|
|
|
12229
12247
|
</div>
|
|
12230
12248
|
${this.presets.length ? s`<div class="presets">
|
|
12231
12249
|
${this.presets.map((i) => {
|
|
12232
|
-
const c =
|
|
12250
|
+
const c = Io(i), d = c !== null && c === this.value.toLowerCase();
|
|
12233
12251
|
return s`<button
|
|
12234
12252
|
type="button"
|
|
12235
12253
|
class=${d ? "active" : ""}
|
|
@@ -12842,7 +12860,7 @@ Me([
|
|
|
12842
12860
|
l({ attribute: !1 })
|
|
12843
12861
|
], pe.prototype, "labels", 2);
|
|
12844
12862
|
Me([
|
|
12845
|
-
|
|
12863
|
+
L(".panel")
|
|
12846
12864
|
], pe.prototype, "panel", 2);
|
|
12847
12865
|
y("ok-drawer", pe);
|
|
12848
12866
|
var ll = Object.defineProperty, cl = Object.getOwnPropertyDescriptor, at = (n, e, t, r) => {
|
|
@@ -13612,7 +13630,7 @@ var kl = Object.defineProperty, wl = Object.getOwnPropertyDescriptor, nr = (n, e
|
|
|
13612
13630
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
13613
13631
|
return r && o && kl(e, t, o), o;
|
|
13614
13632
|
};
|
|
13615
|
-
class
|
|
13633
|
+
class Lt extends g {
|
|
13616
13634
|
static {
|
|
13617
13635
|
this.styles = x`
|
|
13618
13636
|
:host {
|
|
@@ -13756,23 +13774,23 @@ class It extends g {
|
|
|
13756
13774
|
}
|
|
13757
13775
|
nr([
|
|
13758
13776
|
l()
|
|
13759
|
-
],
|
|
13777
|
+
], Lt.prototype, "icon", 2);
|
|
13760
13778
|
nr([
|
|
13761
13779
|
l()
|
|
13762
|
-
],
|
|
13780
|
+
], Lt.prototype, "category", 2);
|
|
13763
13781
|
nr([
|
|
13764
13782
|
l()
|
|
13765
|
-
],
|
|
13783
|
+
], Lt.prototype, "name", 2);
|
|
13766
13784
|
nr([
|
|
13767
13785
|
l()
|
|
13768
|
-
],
|
|
13786
|
+
], Lt.prototype, "badge", 2);
|
|
13769
13787
|
nr([
|
|
13770
13788
|
l()
|
|
13771
|
-
],
|
|
13789
|
+
], Lt.prototype, "price", 2);
|
|
13772
13790
|
nr([
|
|
13773
13791
|
l()
|
|
13774
|
-
],
|
|
13775
|
-
y("ok-product-card",
|
|
13792
|
+
], Lt.prototype, "href", 2);
|
|
13793
|
+
y("ok-product-card", Lt);
|
|
13776
13794
|
var $l = Object.defineProperty, zl = Object.getOwnPropertyDescriptor, oi = (n, e, t, r) => {
|
|
13777
13795
|
for (var o = r > 1 ? void 0 : r ? zl(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
13778
13796
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
@@ -14272,9 +14290,9 @@ var Dl = Object.defineProperty, Al = Object.getOwnPropertyDescriptor, Vr = (n, e
|
|
|
14272
14290
|
const jl = {
|
|
14273
14291
|
menu: "Menu",
|
|
14274
14292
|
close: "Close"
|
|
14275
|
-
},
|
|
14293
|
+
}, Il = "(max-width: 800px)";
|
|
14276
14294
|
let ja = !1;
|
|
14277
|
-
function
|
|
14295
|
+
function Ll() {
|
|
14278
14296
|
if (ja) return;
|
|
14279
14297
|
ja = !0;
|
|
14280
14298
|
const n = new CSSStyleSheet();
|
|
@@ -14430,7 +14448,7 @@ class cr extends g {
|
|
|
14430
14448
|
return { ...jl, ...this.labels };
|
|
14431
14449
|
}
|
|
14432
14450
|
connectedCallback() {
|
|
14433
|
-
super.connectedCallback(), this.mq = window.matchMedia(
|
|
14451
|
+
super.connectedCallback(), this.mq = window.matchMedia(Il), this.isMobile = this.mq.matches, this.mq.addEventListener("change", this.onMqChange);
|
|
14434
14452
|
}
|
|
14435
14453
|
disconnectedCallback() {
|
|
14436
14454
|
super.disconnectedCallback(), this.mq?.removeEventListener("change", this.onMqChange), this.mq = null, this.restoreNodes(), this.modal?.remove(), this.modal = null;
|
|
@@ -14458,7 +14476,7 @@ class cr extends g {
|
|
|
14458
14476
|
}
|
|
14459
14477
|
async presentPanel() {
|
|
14460
14478
|
if (this.isMobile) {
|
|
14461
|
-
if (
|
|
14479
|
+
if (Ll(), this.modal || (this.modal = this.buildModal()), this.movedNodes.length === 0 && this.linksHost && this.actionsHost)
|
|
14462
14480
|
for (const e of Array.from(this.children)) {
|
|
14463
14481
|
const t = e.getAttribute("slot");
|
|
14464
14482
|
t !== "brand" && (this.movedNodes.push(e), (t === "actions" ? this.actionsHost : this.linksHost).appendChild(e));
|
|
@@ -14611,7 +14629,7 @@ class Bl extends g {
|
|
|
14611
14629
|
}
|
|
14612
14630
|
}
|
|
14613
14631
|
y("ok-hero", Bl);
|
|
14614
|
-
var Fl = Object.defineProperty, Rl = Object.getOwnPropertyDescriptor,
|
|
14632
|
+
var Fl = Object.defineProperty, Rl = Object.getOwnPropertyDescriptor, Ie = (n, e, t, r) => {
|
|
14615
14633
|
for (var o = r > 1 ? void 0 : r ? Rl(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
14616
14634
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
14617
14635
|
return r && o && Fl(e, t, o), o;
|
|
@@ -14893,31 +14911,31 @@ class ue extends g {
|
|
|
14893
14911
|
`;
|
|
14894
14912
|
}
|
|
14895
14913
|
}
|
|
14896
|
-
|
|
14914
|
+
Ie([
|
|
14897
14915
|
l({ type: Number })
|
|
14898
14916
|
], ue.prototype, "total", 2);
|
|
14899
|
-
|
|
14917
|
+
Ie([
|
|
14900
14918
|
l({ type: Number })
|
|
14901
14919
|
], ue.prototype, "page", 2);
|
|
14902
|
-
|
|
14920
|
+
Ie([
|
|
14903
14921
|
l({ type: Number, attribute: "page-size" })
|
|
14904
14922
|
], ue.prototype, "pageSize", 2);
|
|
14905
|
-
|
|
14923
|
+
Ie([
|
|
14906
14924
|
l({ type: Number, attribute: "sibling-count" })
|
|
14907
14925
|
], ue.prototype, "siblingCount", 2);
|
|
14908
|
-
|
|
14926
|
+
Ie([
|
|
14909
14927
|
l({ type: Number, attribute: "boundary-count" })
|
|
14910
14928
|
], ue.prototype, "boundaryCount", 2);
|
|
14911
|
-
|
|
14929
|
+
Ie([
|
|
14912
14930
|
l()
|
|
14913
14931
|
], ue.prototype, "variant", 2);
|
|
14914
|
-
|
|
14932
|
+
Ie([
|
|
14915
14933
|
l({ type: Boolean })
|
|
14916
14934
|
], ue.prototype, "info", 2);
|
|
14917
|
-
|
|
14935
|
+
Ie([
|
|
14918
14936
|
l({ type: Array, attribute: "page-size-options" })
|
|
14919
14937
|
], ue.prototype, "pageSizeOptions", 2);
|
|
14920
|
-
|
|
14938
|
+
Ie([
|
|
14921
14939
|
l()
|
|
14922
14940
|
], ue.prototype, "label", 2);
|
|
14923
14941
|
y("ok-pagination", ue);
|
|
@@ -14926,7 +14944,7 @@ var Nl = Object.defineProperty, ql = Object.getOwnPropertyDescriptor, st = (n, e
|
|
|
14926
14944
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
14927
14945
|
return r && o && Nl(e, t, o), o;
|
|
14928
14946
|
};
|
|
14929
|
-
class
|
|
14947
|
+
class Le extends g {
|
|
14930
14948
|
constructor() {
|
|
14931
14949
|
super(...arguments), this.variant = "text", this.lines = 1, this.preset = "none", this.rows = 5, this.cols = 4;
|
|
14932
14950
|
}
|
|
@@ -15215,29 +15233,29 @@ class Ie extends g {
|
|
|
15215
15233
|
}
|
|
15216
15234
|
st([
|
|
15217
15235
|
l()
|
|
15218
|
-
],
|
|
15236
|
+
], Le.prototype, "variant", 2);
|
|
15219
15237
|
st([
|
|
15220
15238
|
l({ type: Number })
|
|
15221
|
-
],
|
|
15239
|
+
], Le.prototype, "lines", 2);
|
|
15222
15240
|
st([
|
|
15223
15241
|
l()
|
|
15224
|
-
],
|
|
15242
|
+
], Le.prototype, "width", 2);
|
|
15225
15243
|
st([
|
|
15226
15244
|
l()
|
|
15227
|
-
],
|
|
15245
|
+
], Le.prototype, "height", 2);
|
|
15228
15246
|
st([
|
|
15229
15247
|
l()
|
|
15230
|
-
],
|
|
15248
|
+
], Le.prototype, "radius", 2);
|
|
15231
15249
|
st([
|
|
15232
15250
|
l()
|
|
15233
|
-
],
|
|
15251
|
+
], Le.prototype, "preset", 2);
|
|
15234
15252
|
st([
|
|
15235
15253
|
l({ type: Number })
|
|
15236
|
-
],
|
|
15254
|
+
], Le.prototype, "rows", 2);
|
|
15237
15255
|
st([
|
|
15238
15256
|
l({ type: Number })
|
|
15239
|
-
],
|
|
15240
|
-
y("ok-skeleton",
|
|
15257
|
+
], Le.prototype, "cols", 2);
|
|
15258
|
+
y("ok-skeleton", Le);
|
|
15241
15259
|
var Ul = Object.defineProperty, Vl = Object.getOwnPropertyDescriptor, Q = (n, e, t, r) => {
|
|
15242
15260
|
for (var o = r > 1 ? void 0 : r ? Vl(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
15243
15261
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
@@ -15843,7 +15861,7 @@ var Yl = Object.defineProperty, Xl = Object.getOwnPropertyDescriptor, Tt = (n, e
|
|
|
15843
15861
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
15844
15862
|
return r && o && Yl(e, t, o), o;
|
|
15845
15863
|
};
|
|
15846
|
-
const
|
|
15864
|
+
const Ia = [
|
|
15847
15865
|
"var(--ok-primary, var(--ion-color-primary, #3880ff))",
|
|
15848
15866
|
"var(--ok-success, var(--ion-color-success, #2dd36f))",
|
|
15849
15867
|
"var(--ok-warning, var(--ion-color-warning, #ffc409))",
|
|
@@ -15953,7 +15971,7 @@ class lt extends g {
|
|
|
15953
15971
|
}
|
|
15954
15972
|
// Color efectivo de un slice (su color o el de la paleta por índice).
|
|
15955
15973
|
colorAt(e, t) {
|
|
15956
|
-
return e.color ||
|
|
15974
|
+
return e.color || Ia[t % Ia.length];
|
|
15957
15975
|
}
|
|
15958
15976
|
// Porcentaje (0–100) de un slice sobre el total.
|
|
15959
15977
|
pct(e) {
|
|
@@ -16081,7 +16099,7 @@ var Wl = Object.defineProperty, Gl = Object.getOwnPropertyDescriptor, dr = (n, e
|
|
|
16081
16099
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
16082
16100
|
return r && o && Wl(e, t, o), o;
|
|
16083
16101
|
};
|
|
16084
|
-
const
|
|
16102
|
+
const La = [
|
|
16085
16103
|
"Ene",
|
|
16086
16104
|
"Feb",
|
|
16087
16105
|
"Mar",
|
|
@@ -16270,8 +16288,8 @@ class Bt extends g {
|
|
|
16270
16288
|
}
|
|
16271
16289
|
return s`<div class="year" role="grid" aria-label="Heatmap anual">
|
|
16272
16290
|
${t.map(
|
|
16273
|
-
(r, o) => s`<div class="month" role="row" aria-label=${
|
|
16274
|
-
<div class="month-label">${
|
|
16291
|
+
(r, o) => s`<div class="month" role="row" aria-label=${La[o]}>
|
|
16292
|
+
<div class="month-label">${La[o]}</div>
|
|
16275
16293
|
<div class="days">
|
|
16276
16294
|
${r.slice().sort((a, i) => a.day - i.day).map((a) => this.renderCell(a.cell))}
|
|
16277
16295
|
</div>
|
|
@@ -17647,7 +17665,7 @@ me([
|
|
|
17647
17665
|
v()
|
|
17648
17666
|
], Z.prototype, "openSub", 2);
|
|
17649
17667
|
y("ok-menu", Z);
|
|
17650
|
-
var vc = Object.defineProperty, bc = Object.getOwnPropertyDescriptor,
|
|
17668
|
+
var vc = Object.defineProperty, bc = Object.getOwnPropertyDescriptor, I = (n, e, t, r) => {
|
|
17651
17669
|
for (var o = r > 1 ? void 0 : r ? bc(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
17652
17670
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
17653
17671
|
return r && o && vc(e, t, o), o;
|
|
@@ -18008,59 +18026,59 @@ class j extends g {
|
|
|
18008
18026
|
`;
|
|
18009
18027
|
}
|
|
18010
18028
|
}
|
|
18011
|
-
|
|
18029
|
+
I([
|
|
18012
18030
|
l()
|
|
18013
18031
|
], j.prototype, "name", 2);
|
|
18014
|
-
|
|
18032
|
+
I([
|
|
18015
18033
|
l()
|
|
18016
18034
|
], j.prototype, "badge", 2);
|
|
18017
|
-
|
|
18035
|
+
I([
|
|
18018
18036
|
l()
|
|
18019
18037
|
], j.prototype, "handle", 2);
|
|
18020
|
-
|
|
18038
|
+
I([
|
|
18021
18039
|
l()
|
|
18022
18040
|
], j.prototype, "avatar", 2);
|
|
18023
|
-
|
|
18041
|
+
I([
|
|
18024
18042
|
l({ attribute: "avatar-src" })
|
|
18025
18043
|
], j.prototype, "avatarSrc", 2);
|
|
18026
|
-
|
|
18044
|
+
I([
|
|
18027
18045
|
l()
|
|
18028
18046
|
], j.prototype, "body", 2);
|
|
18029
|
-
|
|
18047
|
+
I([
|
|
18030
18048
|
l({ attribute: !1 })
|
|
18031
18049
|
], j.prototype, "stats", 2);
|
|
18032
|
-
|
|
18050
|
+
I([
|
|
18033
18051
|
l({ attribute: !1 })
|
|
18034
18052
|
], j.prototype, "actions", 2);
|
|
18035
|
-
|
|
18053
|
+
I([
|
|
18036
18054
|
l()
|
|
18037
18055
|
], j.prototype, "placement", 2);
|
|
18038
|
-
|
|
18056
|
+
I([
|
|
18039
18057
|
l({ type: Number, attribute: "open-delay" })
|
|
18040
18058
|
], j.prototype, "openDelay", 2);
|
|
18041
|
-
|
|
18059
|
+
I([
|
|
18042
18060
|
l({ type: Number, attribute: "close-delay" })
|
|
18043
18061
|
], j.prototype, "closeDelay", 2);
|
|
18044
|
-
|
|
18062
|
+
I([
|
|
18045
18063
|
l({ attribute: !1 })
|
|
18046
18064
|
], j.prototype, "labels", 2);
|
|
18047
|
-
|
|
18065
|
+
I([
|
|
18048
18066
|
v()
|
|
18049
18067
|
], j.prototype, "open", 2);
|
|
18050
|
-
|
|
18068
|
+
I([
|
|
18051
18069
|
v()
|
|
18052
18070
|
], j.prototype, "shown", 2);
|
|
18053
|
-
|
|
18071
|
+
I([
|
|
18054
18072
|
v()
|
|
18055
18073
|
], j.prototype, "end", 2);
|
|
18056
|
-
|
|
18074
|
+
I([
|
|
18057
18075
|
v()
|
|
18058
18076
|
], j.prototype, "above", 2);
|
|
18059
|
-
|
|
18060
|
-
|
|
18077
|
+
I([
|
|
18078
|
+
L(".card")
|
|
18061
18079
|
], j.prototype, "cardEl", 2);
|
|
18062
|
-
|
|
18063
|
-
|
|
18080
|
+
I([
|
|
18081
|
+
L(".trigger")
|
|
18064
18082
|
], j.prototype, "triggerEl", 2);
|
|
18065
18083
|
y("ok-hover-card", j);
|
|
18066
18084
|
var gc = Object.defineProperty, xc = Object.getOwnPropertyDescriptor, mr = (n, e, t, r) => {
|
|
@@ -20070,10 +20088,10 @@ class F extends g {
|
|
|
20070
20088
|
);
|
|
20071
20089
|
}
|
|
20072
20090
|
prevMonth() {
|
|
20073
|
-
this.viewDate =
|
|
20091
|
+
this.viewDate = Lo(this.viewDate, -1);
|
|
20074
20092
|
}
|
|
20075
20093
|
nextMonth() {
|
|
20076
|
-
this.viewDate =
|
|
20094
|
+
this.viewDate = Lo(this.viewDate, 1);
|
|
20077
20095
|
}
|
|
20078
20096
|
// ---- Presets -------------------------------------------------------------
|
|
20079
20097
|
applyPreset(e) {
|
|
@@ -20184,7 +20202,7 @@ class F extends g {
|
|
|
20184
20202
|
aria-modal="false"
|
|
20185
20203
|
>
|
|
20186
20204
|
<div class="months ${this.months === 2 ? "two" : ""}">
|
|
20187
|
-
${t.map((r) => this.renderMonth(
|
|
20205
|
+
${t.map((r) => this.renderMonth(Lo(this.viewDate, r), r))}
|
|
20188
20206
|
</div>
|
|
20189
20207
|
${this.presets && this.presets.length ? s`<div class="presets" role="group">
|
|
20190
20208
|
${this.presets.map(
|
|
@@ -20334,7 +20352,7 @@ function Xt(n) {
|
|
|
20334
20352
|
function eo(n) {
|
|
20335
20353
|
return new Date(n.getFullYear(), n.getMonth() + 1, 0);
|
|
20336
20354
|
}
|
|
20337
|
-
function
|
|
20355
|
+
function Lo(n, e) {
|
|
20338
20356
|
return new Date(n.getFullYear(), n.getMonth() + e, 1);
|
|
20339
20357
|
}
|
|
20340
20358
|
function Wt(n, e) {
|
|
@@ -20353,10 +20371,10 @@ function jc(n) {
|
|
|
20353
20371
|
return r;
|
|
20354
20372
|
}
|
|
20355
20373
|
y("ok-date-picker", F);
|
|
20356
|
-
var
|
|
20357
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
20374
|
+
var Ic = Object.defineProperty, Lc = Object.getOwnPropertyDescriptor, Fe = (n, e, t, r) => {
|
|
20375
|
+
for (var o = r > 1 ? void 0 : r ? Lc(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
20358
20376
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
20359
|
-
return r && o &&
|
|
20377
|
+
return r && o && Ic(e, t, o), o;
|
|
20360
20378
|
};
|
|
20361
20379
|
function To(n) {
|
|
20362
20380
|
if (!n) return null;
|
|
@@ -21745,7 +21763,7 @@ fe([
|
|
|
21745
21763
|
v()
|
|
21746
21764
|
], J.prototype, "words", 2);
|
|
21747
21765
|
fe([
|
|
21748
|
-
|
|
21766
|
+
L(".content")
|
|
21749
21767
|
], J.prototype, "contentEl", 2);
|
|
21750
21768
|
let Vc = J;
|
|
21751
21769
|
y("ok-rich-text", Vc);
|
|
@@ -27201,6 +27219,6 @@ N([
|
|
|
27201
27219
|
v()
|
|
27202
27220
|
], T.prototype, "dragging", 2);
|
|
27203
27221
|
N([
|
|
27204
|
-
|
|
27222
|
+
L('input[type="file"]')
|
|
27205
27223
|
], T.prototype, "fileInput", 2);
|
|
27206
27224
|
y("ok-file-manager", T);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@erplora/outfitkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
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",
|