@erplora/outfitkit 0.1.12 → 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. */
|
|
@@ -275,27 +269,35 @@ class OkDataTable extends LitElement {
|
|
|
275
269
|
.range { display: flex; gap: 0.25rem; }
|
|
276
270
|
|
|
277
271
|
/* ── Vista tarjetas ──────────────────────────────────────────────────────────────────── */
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
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; }
|
|
285
286
|
@media (prefers-reduced-motion: reduce) {
|
|
286
287
|
.gh.sortable:hover, .gh.sortable:active,
|
|
287
|
-
.grow-data:hover, .grow-data:active
|
|
288
|
-
.rcard:hover, .rcard:active { transform: none; }
|
|
288
|
+
.grow-data:hover, .grow-data:active { transform: none; }
|
|
289
289
|
}
|
|
290
|
-
|
|
291
|
-
.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; }
|
|
292
292
|
.rcard-head .rc-icon { display: inline-flex; color: var(--primary); }
|
|
293
293
|
.rcard-head .rc-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
|
|
294
|
-
|
|
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; }
|
|
295
296
|
.rrow { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 13px; }
|
|
296
297
|
.rrow .rk { color: var(--color-muted); }
|
|
297
|
-
.rrow .rv { font-weight: 500; text-align: right; }
|
|
298
|
-
|
|
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; }
|
|
299
301
|
|
|
300
302
|
/* ── Estado vacío ────────────────────────────────────────────────────────────────────── */
|
|
301
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); }
|
|
@@ -469,12 +471,12 @@ class OkDataTable extends LitElement {
|
|
|
469
471
|
}
|
|
470
472
|
return out;
|
|
471
473
|
}
|
|
472
|
-
|
|
474
|
+
// Fija el conjunto de valores seleccionados de una columna (multi-select del drawer = ion-select).
|
|
475
|
+
setFilterValues(key, values) {
|
|
473
476
|
const next = this.cloneFilters(this.filterDraft);
|
|
474
|
-
const
|
|
475
|
-
if (
|
|
476
|
-
else values
|
|
477
|
-
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 };
|
|
478
480
|
this.filterDraft = next;
|
|
479
481
|
}
|
|
480
482
|
setFilterRange(key, edge, value) {
|
|
@@ -669,6 +671,13 @@ class OkDataTable extends LitElement {
|
|
|
669
671
|
this.menuEv = ev;
|
|
670
672
|
this.menuOpen = true;
|
|
671
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
|
+
}
|
|
672
681
|
setViewMode(mode) {
|
|
673
682
|
if (this.viewMode === mode) return;
|
|
674
683
|
this.viewMode = mode;
|
|
@@ -1024,21 +1033,23 @@ class OkDataTable extends LitElement {
|
|
|
1024
1033
|
</div>
|
|
1025
1034
|
`;
|
|
1026
1035
|
}
|
|
1027
|
-
const
|
|
1028
|
-
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()];
|
|
1029
1038
|
return html`
|
|
1030
1039
|
<div class="fblock">
|
|
1031
|
-
<
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
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>
|
|
1042
1053
|
</div>
|
|
1043
1054
|
`;
|
|
1044
1055
|
}
|
|
@@ -1117,21 +1128,21 @@ class OkDataTable extends LitElement {
|
|
|
1117
1128
|
const selected = this.selectable && this.selection.has(key);
|
|
1118
1129
|
const icon = this.cardIcon?.(row);
|
|
1119
1130
|
return html`
|
|
1120
|
-
<
|
|
1131
|
+
<ion-card class=${`rcard${selected ? " selected" : ""}`}>
|
|
1121
1132
|
${hasHead ? html`
|
|
1122
|
-
<header class="rcard-head">
|
|
1133
|
+
<ion-card-header class="rcard-head">
|
|
1123
1134
|
${icon != null && icon !== "" ? html`<span class="rc-icon">${typeof icon === "string" ? html`<ion-icon name=${icon}></ion-icon>` : icon}</span>` : nothing}
|
|
1124
1135
|
<span class="rc-title">${this.cardTitle ? this.cardTitle(row) : nothing}</span>
|
|
1125
1136
|
${this.selectable ? html`<ion-checkbox .checked=${selected} aria-label=${this.t.select} @ionChange=${() => this.toggleRow(key)}></ion-checkbox>` : nothing}
|
|
1126
|
-
</header>
|
|
1137
|
+
</ion-card-header>
|
|
1127
1138
|
` : nothing}
|
|
1128
|
-
<
|
|
1139
|
+
<ion-card-content class="rcard-body">
|
|
1129
1140
|
${this.renderCard ? this.renderCard(row) : this.visibleColumns.map(
|
|
1130
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>`
|
|
1131
1142
|
)}
|
|
1132
|
-
</
|
|
1143
|
+
</ion-card-content>
|
|
1133
1144
|
${this.actions.length ? html`<div class="ractions">${this.actionButtons(row)}</div>` : nothing}
|
|
1134
|
-
</
|
|
1145
|
+
</ion-card>
|
|
1135
1146
|
`;
|
|
1136
1147
|
}
|
|
1137
1148
|
)}
|
|
@@ -1211,6 +1222,9 @@ __decorateClass([
|
|
|
1211
1222
|
__decorateClass([
|
|
1212
1223
|
property({ attribute: false })
|
|
1213
1224
|
], OkDataTable.prototype, "views");
|
|
1225
|
+
__decorateClass([
|
|
1226
|
+
property({ attribute: "default-view" })
|
|
1227
|
+
], OkDataTable.prototype, "defaultView");
|
|
1214
1228
|
__decorateClass([
|
|
1215
1229
|
property({ type: Boolean })
|
|
1216
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. */
|
|
@@ -1200,27 +1194,35 @@ class _ extends g {
|
|
|
1200
1194
|
.range { display: flex; gap: 0.25rem; }
|
|
1201
1195
|
|
|
1202
1196
|
/* ── Vista tarjetas ──────────────────────────────────────────────────────────────────── */
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
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; }
|
|
1210
1211
|
@media (prefers-reduced-motion: reduce) {
|
|
1211
1212
|
.gh.sortable:hover, .gh.sortable:active,
|
|
1212
|
-
.grow-data:hover, .grow-data:active
|
|
1213
|
-
.rcard:hover, .rcard:active { transform: none; }
|
|
1213
|
+
.grow-data:hover, .grow-data:active { transform: none; }
|
|
1214
1214
|
}
|
|
1215
|
-
|
|
1216
|
-
.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; }
|
|
1217
1217
|
.rcard-head .rc-icon { display: inline-flex; color: var(--primary); }
|
|
1218
1218
|
.rcard-head .rc-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
|
|
1219
|
-
|
|
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; }
|
|
1220
1221
|
.rrow { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 13px; }
|
|
1221
1222
|
.rrow .rk { color: var(--color-muted); }
|
|
1222
|
-
.rrow .rv { font-weight: 500; text-align: right; }
|
|
1223
|
-
|
|
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; }
|
|
1224
1226
|
|
|
1225
1227
|
/* ── Estado vacío ────────────────────────────────────────────────────────────────────── */
|
|
1226
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); }
|
|
@@ -1342,9 +1344,10 @@ class _ extends g {
|
|
|
1342
1344
|
t[r] = { values: o.values ? new Set(o.values) : void 0, from: o.from, to: o.to };
|
|
1343
1345
|
return t;
|
|
1344
1346
|
}
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
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;
|
|
1348
1351
|
}
|
|
1349
1352
|
setFilterRange(e, t, r) {
|
|
1350
1353
|
const o = this.cloneFilters(this.filterDraft);
|
|
@@ -1504,6 +1507,12 @@ class _ extends g {
|
|
|
1504
1507
|
openMenu(e) {
|
|
1505
1508
|
this.menuEv = e, this.menuOpen = !0;
|
|
1506
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
|
+
}
|
|
1507
1516
|
setViewMode(e) {
|
|
1508
1517
|
this.viewMode !== e && (this.viewMode = e, this.emit("viewChange", e));
|
|
1509
1518
|
}
|
|
@@ -1823,20 +1832,22 @@ class _ extends g {
|
|
|
1823
1832
|
</div>
|
|
1824
1833
|
`;
|
|
1825
1834
|
}
|
|
1826
|
-
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()];
|
|
1827
1836
|
return s`
|
|
1828
1837
|
<div class="fblock">
|
|
1829
|
-
<
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
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>
|
|
1840
1851
|
</div>
|
|
1841
1852
|
`;
|
|
1842
1853
|
}
|
|
@@ -1906,21 +1917,21 @@ class _ extends g {
|
|
|
1906
1917
|
(r) => {
|
|
1907
1918
|
const o = this.keyOf(r), a = this.selectable && this.selection.has(o), i = this.cardIcon?.(r);
|
|
1908
1919
|
return s`
|
|
1909
|
-
<
|
|
1920
|
+
<ion-card class=${`rcard${a ? " selected" : ""}`}>
|
|
1910
1921
|
${t ? s`
|
|
1911
|
-
<header class="rcard-head">
|
|
1922
|
+
<ion-card-header class="rcard-head">
|
|
1912
1923
|
${i != null && i !== "" ? s`<span class="rc-icon">${typeof i == "string" ? s`<ion-icon name=${i}></ion-icon>` : i}</span>` : m}
|
|
1913
1924
|
<span class="rc-title">${this.cardTitle ? this.cardTitle(r) : m}</span>
|
|
1914
1925
|
${this.selectable ? s`<ion-checkbox .checked=${a} aria-label=${this.t.select} @ionChange=${() => this.toggleRow(o)}></ion-checkbox>` : m}
|
|
1915
|
-
</header>
|
|
1926
|
+
</ion-card-header>
|
|
1916
1927
|
` : m}
|
|
1917
|
-
<
|
|
1928
|
+
<ion-card-content class="rcard-body">
|
|
1918
1929
|
${this.renderCard ? this.renderCard(r) : this.visibleColumns.map(
|
|
1919
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>`
|
|
1920
1931
|
)}
|
|
1921
|
-
</
|
|
1932
|
+
</ion-card-content>
|
|
1922
1933
|
${this.actions.length ? s`<div class="ractions">${this.actionButtons(r)}</div>` : m}
|
|
1923
|
-
</
|
|
1934
|
+
</ion-card>
|
|
1924
1935
|
`;
|
|
1925
1936
|
}
|
|
1926
1937
|
)}
|
|
@@ -2000,6 +2011,9 @@ C([
|
|
|
2000
2011
|
C([
|
|
2001
2012
|
l({ attribute: !1 })
|
|
2002
2013
|
], _.prototype, "views", 2);
|
|
2014
|
+
C([
|
|
2015
|
+
l({ attribute: "default-view" })
|
|
2016
|
+
], _.prototype, "defaultView", 2);
|
|
2003
2017
|
C([
|
|
2004
2018
|
l({ type: Boolean })
|
|
2005
2019
|
], _.prototype, "exportable", 2);
|
|
@@ -3612,7 +3626,7 @@ sa([
|
|
|
3612
3626
|
l({ attribute: !1 })
|
|
3613
3627
|
], uo.prototype, "labels", 2);
|
|
3614
3628
|
y("ok-stepper", uo);
|
|
3615
|
-
var rs = Object.defineProperty, os = Object.getOwnPropertyDescriptor,
|
|
3629
|
+
var rs = Object.defineProperty, os = Object.getOwnPropertyDescriptor, Ir = (n, e, t, r) => {
|
|
3616
3630
|
for (var o = r > 1 ? void 0 : r ? os(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
3617
3631
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
3618
3632
|
return r && o && rs(e, t, o), o;
|
|
@@ -3728,19 +3742,19 @@ class Jt extends g {
|
|
|
3728
3742
|
`;
|
|
3729
3743
|
}
|
|
3730
3744
|
}
|
|
3731
|
-
|
|
3745
|
+
Ir([
|
|
3732
3746
|
l({ attribute: !1 })
|
|
3733
3747
|
], Jt.prototype, "steps", 2);
|
|
3734
|
-
|
|
3748
|
+
Ir([
|
|
3735
3749
|
l({ type: Number })
|
|
3736
3750
|
], Jt.prototype, "current", 2);
|
|
3737
|
-
|
|
3751
|
+
Ir([
|
|
3738
3752
|
l()
|
|
3739
3753
|
], Jt.prototype, "backLabel", 2);
|
|
3740
|
-
|
|
3754
|
+
Ir([
|
|
3741
3755
|
l()
|
|
3742
3756
|
], Jt.prototype, "nextLabel", 2);
|
|
3743
|
-
|
|
3757
|
+
Ir([
|
|
3744
3758
|
l()
|
|
3745
3759
|
], Jt.prototype, "finishLabel", 2);
|
|
3746
3760
|
y("ok-wizard", Jt);
|
|
@@ -5059,7 +5073,7 @@ const xs = {
|
|
|
5059
5073
|
empty: "No apps",
|
|
5060
5074
|
close: "Close"
|
|
5061
5075
|
};
|
|
5062
|
-
class
|
|
5076
|
+
class Lr extends g {
|
|
5063
5077
|
constructor() {
|
|
5064
5078
|
super(...arguments), this.apps = [], this.labels = {}, this.open = !1, this.shown = !1, this.onKeydown = (e) => {
|
|
5065
5079
|
e.key === "Escape" && this.close();
|
|
@@ -5397,17 +5411,17 @@ class Ir extends g {
|
|
|
5397
5411
|
}
|
|
5398
5412
|
mo([
|
|
5399
5413
|
l({ attribute: !1 })
|
|
5400
|
-
],
|
|
5414
|
+
], Lr.prototype, "apps", 2);
|
|
5401
5415
|
mo([
|
|
5402
5416
|
l({ attribute: !1 })
|
|
5403
|
-
],
|
|
5417
|
+
], Lr.prototype, "labels", 2);
|
|
5404
5418
|
mo([
|
|
5405
5419
|
v()
|
|
5406
|
-
],
|
|
5420
|
+
], Lr.prototype, "open", 2);
|
|
5407
5421
|
mo([
|
|
5408
5422
|
v()
|
|
5409
|
-
],
|
|
5410
|
-
y("ok-app-launcher",
|
|
5423
|
+
], Lr.prototype, "shown", 2);
|
|
5424
|
+
y("ok-app-launcher", Lr);
|
|
5411
5425
|
var ys = Object.defineProperty, ks = Object.getOwnPropertyDescriptor, er = (n, e, t, r) => {
|
|
5412
5426
|
for (var o = r > 1 ? void 0 : r ? ks(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
5413
5427
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
@@ -6531,13 +6545,13 @@ vo([
|
|
|
6531
6545
|
l({ attribute: !1 })
|
|
6532
6546
|
], Tr.prototype, "labels", 2);
|
|
6533
6547
|
vo([
|
|
6534
|
-
|
|
6548
|
+
L("input")
|
|
6535
6549
|
], Tr.prototype, "firstInput", 2);
|
|
6536
6550
|
y("ok-otp", Tr);
|
|
6537
|
-
var
|
|
6538
|
-
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--)
|
|
6539
6553
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
6540
|
-
return r && o &&
|
|
6554
|
+
return r && o && Is(e, t, o), o;
|
|
6541
6555
|
};
|
|
6542
6556
|
const Ts = {
|
|
6543
6557
|
keypad: "Number pad",
|
|
@@ -7420,7 +7434,7 @@ ze([
|
|
|
7420
7434
|
v()
|
|
7421
7435
|
], ie.prototype, "error", 2);
|
|
7422
7436
|
ze([
|
|
7423
|
-
|
|
7437
|
+
L('input[type="file"]')
|
|
7424
7438
|
], ie.prototype, "input", 2);
|
|
7425
7439
|
y("ok-dropzone", ie);
|
|
7426
7440
|
var Ys = Object.defineProperty, Xs = Object.getOwnPropertyDescriptor, rr = (n, e, t, r) => {
|
|
@@ -7819,10 +7833,10 @@ Mt([
|
|
|
7819
7833
|
l({ attribute: !1 })
|
|
7820
7834
|
], Je.prototype, "labels", 2);
|
|
7821
7835
|
Mt([
|
|
7822
|
-
|
|
7836
|
+
L(".log")
|
|
7823
7837
|
], Je.prototype, "logEl", 2);
|
|
7824
7838
|
Mt([
|
|
7825
|
-
|
|
7839
|
+
L("ion-textarea")
|
|
7826
7840
|
], Je.prototype, "textareaEl", 2);
|
|
7827
7841
|
y("ok-chat", Je);
|
|
7828
7842
|
var Zs = Object.defineProperty, Js = Object.getOwnPropertyDescriptor, _e = (n, e, t, r) => {
|
|
@@ -9144,7 +9158,7 @@ Dt([
|
|
|
9144
9158
|
v()
|
|
9145
9159
|
], tt.prototype, "slottedCount", 2);
|
|
9146
9160
|
Dt([
|
|
9147
|
-
|
|
9161
|
+
L(".track")
|
|
9148
9162
|
], tt.prototype, "trackEl", 2);
|
|
9149
9163
|
y("ok-carousel", tt);
|
|
9150
9164
|
var ln = Object.defineProperty, cn = Object.getOwnPropertyDescriptor, At = (n, e, t, r) => {
|
|
@@ -9340,7 +9354,7 @@ At([
|
|
|
9340
9354
|
l({ attribute: !1 })
|
|
9341
9355
|
], rt.prototype, "labels", 2);
|
|
9342
9356
|
At([
|
|
9343
|
-
|
|
9357
|
+
L("canvas")
|
|
9344
9358
|
], rt.prototype, "canvas", 2);
|
|
9345
9359
|
y("ok-signature", rt);
|
|
9346
9360
|
var pn = Object.defineProperty, hn = Object.getOwnPropertyDescriptor, or = (n, e, t, r) => {
|
|
@@ -10137,7 +10151,7 @@ Se([
|
|
|
10137
10151
|
v()
|
|
10138
10152
|
], ne.prototype, "muted", 2);
|
|
10139
10153
|
Se([
|
|
10140
|
-
|
|
10154
|
+
L("audio")
|
|
10141
10155
|
], ne.prototype, "audioEl", 2);
|
|
10142
10156
|
y("ok-audio", ne);
|
|
10143
10157
|
var Mn = Object.defineProperty, Dn = Object.getOwnPropertyDescriptor, le = (n, e, t, r) => {
|
|
@@ -10456,18 +10470,18 @@ le([
|
|
|
10456
10470
|
v()
|
|
10457
10471
|
], G.prototype, "muted", 2);
|
|
10458
10472
|
le([
|
|
10459
|
-
|
|
10473
|
+
L("video")
|
|
10460
10474
|
], G.prototype, "videoEl", 2);
|
|
10461
10475
|
le([
|
|
10462
|
-
|
|
10476
|
+
L(".stage")
|
|
10463
10477
|
], G.prototype, "stageEl", 2);
|
|
10464
10478
|
y("ok-video", G);
|
|
10465
|
-
var jn = Object.defineProperty,
|
|
10466
|
-
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--)
|
|
10467
10481
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
10468
10482
|
return r && o && jn(e, t, o), o;
|
|
10469
10483
|
};
|
|
10470
|
-
const
|
|
10484
|
+
const Ln = {
|
|
10471
10485
|
documentTitle: "PDF document",
|
|
10472
10486
|
open: "Open",
|
|
10473
10487
|
openAria: "Open or download PDF",
|
|
@@ -10557,7 +10571,7 @@ class Br extends g {
|
|
|
10557
10571
|
`;
|
|
10558
10572
|
}
|
|
10559
10573
|
get t() {
|
|
10560
|
-
return { ...
|
|
10574
|
+
return { ...Ln, ...this.labels };
|
|
10561
10575
|
}
|
|
10562
10576
|
// Abre el PDF en una pestaña nueva (descarga / vista a pantalla completa del navegador).
|
|
10563
10577
|
open() {
|
|
@@ -11228,7 +11242,7 @@ const Yn = {
|
|
|
11228
11242
|
decrement: "Decrease",
|
|
11229
11243
|
increment: "Increase"
|
|
11230
11244
|
};
|
|
11231
|
-
class
|
|
11245
|
+
class It extends g {
|
|
11232
11246
|
constructor() {
|
|
11233
11247
|
super(...arguments), this.value = 0, this.min = 0, this.step = 1, this.disabled = !1, this.labels = {};
|
|
11234
11248
|
}
|
|
@@ -11385,23 +11399,23 @@ class Lt extends g {
|
|
|
11385
11399
|
}
|
|
11386
11400
|
ar([
|
|
11387
11401
|
l({ type: Number })
|
|
11388
|
-
],
|
|
11402
|
+
], It.prototype, "value", 2);
|
|
11389
11403
|
ar([
|
|
11390
11404
|
l({ type: Number })
|
|
11391
|
-
],
|
|
11405
|
+
], It.prototype, "min", 2);
|
|
11392
11406
|
ar([
|
|
11393
11407
|
l({ type: Number })
|
|
11394
|
-
],
|
|
11408
|
+
], It.prototype, "max", 2);
|
|
11395
11409
|
ar([
|
|
11396
11410
|
l({ type: Number })
|
|
11397
|
-
],
|
|
11411
|
+
], It.prototype, "step", 2);
|
|
11398
11412
|
ar([
|
|
11399
11413
|
l({ type: Boolean, reflect: !0 })
|
|
11400
|
-
],
|
|
11414
|
+
], It.prototype, "disabled", 2);
|
|
11401
11415
|
ar([
|
|
11402
11416
|
l({ attribute: !1 })
|
|
11403
|
-
],
|
|
11404
|
-
y("ok-qty-stepper",
|
|
11417
|
+
], It.prototype, "labels", 2);
|
|
11418
|
+
y("ok-qty-stepper", It);
|
|
11405
11419
|
var Xn = Object.defineProperty, Wn = Object.getOwnPropertyDescriptor, ot = (n, e, t, r) => {
|
|
11406
11420
|
for (var o = r > 1 ? void 0 : r ? Wn(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
11407
11421
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
@@ -11801,7 +11815,7 @@ ot([
|
|
|
11801
11815
|
v()
|
|
11802
11816
|
], Ee.prototype, "activeIndex", 2);
|
|
11803
11817
|
ot([
|
|
11804
|
-
|
|
11818
|
+
L(".search input")
|
|
11805
11819
|
], Ee.prototype, "searchInput", 2);
|
|
11806
11820
|
y("ok-command-palette", Ee);
|
|
11807
11821
|
var Qn = Object.defineProperty, Zn = Object.getOwnPropertyDescriptor, Pe = (n, e, t, r) => {
|
|
@@ -11866,7 +11880,7 @@ function oo(n) {
|
|
|
11866
11880
|
b: parseInt(e.slice(4, 6), 16)
|
|
11867
11881
|
} : null;
|
|
11868
11882
|
}
|
|
11869
|
-
function
|
|
11883
|
+
function Io(n) {
|
|
11870
11884
|
const e = oo(n);
|
|
11871
11885
|
return e ? _r(e) : null;
|
|
11872
11886
|
}
|
|
@@ -12171,7 +12185,7 @@ class ce extends g {
|
|
|
12171
12185
|
// Maneja la edición del input hex: valida y, si es correcto, deriva el HSV y emite.
|
|
12172
12186
|
onHexInput(e) {
|
|
12173
12187
|
this.hexInput = e;
|
|
12174
|
-
const t =
|
|
12188
|
+
const t = Io(e);
|
|
12175
12189
|
if (!t) {
|
|
12176
12190
|
this.hexInvalid = !0;
|
|
12177
12191
|
return;
|
|
@@ -12183,7 +12197,7 @@ class ce extends g {
|
|
|
12183
12197
|
// --- Presets ---
|
|
12184
12198
|
// Selecciona un swatch preset: deriva HSV/hex y emite.
|
|
12185
12199
|
selectPreset(e) {
|
|
12186
|
-
const t =
|
|
12200
|
+
const t = Io(e);
|
|
12187
12201
|
if (!t) return;
|
|
12188
12202
|
const r = oo(t), { h: o, s: a, v: i } = Ao(r.r, r.g, r.b);
|
|
12189
12203
|
this.h = o, this.s = a, this.v = i, this.value = t, this.hexInput = t, this.hexInvalid = !1, this.emit(t, r);
|
|
@@ -12233,7 +12247,7 @@ class ce extends g {
|
|
|
12233
12247
|
</div>
|
|
12234
12248
|
${this.presets.length ? s`<div class="presets">
|
|
12235
12249
|
${this.presets.map((i) => {
|
|
12236
|
-
const c =
|
|
12250
|
+
const c = Io(i), d = c !== null && c === this.value.toLowerCase();
|
|
12237
12251
|
return s`<button
|
|
12238
12252
|
type="button"
|
|
12239
12253
|
class=${d ? "active" : ""}
|
|
@@ -12846,7 +12860,7 @@ Me([
|
|
|
12846
12860
|
l({ attribute: !1 })
|
|
12847
12861
|
], pe.prototype, "labels", 2);
|
|
12848
12862
|
Me([
|
|
12849
|
-
|
|
12863
|
+
L(".panel")
|
|
12850
12864
|
], pe.prototype, "panel", 2);
|
|
12851
12865
|
y("ok-drawer", pe);
|
|
12852
12866
|
var ll = Object.defineProperty, cl = Object.getOwnPropertyDescriptor, at = (n, e, t, r) => {
|
|
@@ -13616,7 +13630,7 @@ var kl = Object.defineProperty, wl = Object.getOwnPropertyDescriptor, nr = (n, e
|
|
|
13616
13630
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
13617
13631
|
return r && o && kl(e, t, o), o;
|
|
13618
13632
|
};
|
|
13619
|
-
class
|
|
13633
|
+
class Lt extends g {
|
|
13620
13634
|
static {
|
|
13621
13635
|
this.styles = x`
|
|
13622
13636
|
:host {
|
|
@@ -13760,23 +13774,23 @@ class It extends g {
|
|
|
13760
13774
|
}
|
|
13761
13775
|
nr([
|
|
13762
13776
|
l()
|
|
13763
|
-
],
|
|
13777
|
+
], Lt.prototype, "icon", 2);
|
|
13764
13778
|
nr([
|
|
13765
13779
|
l()
|
|
13766
|
-
],
|
|
13780
|
+
], Lt.prototype, "category", 2);
|
|
13767
13781
|
nr([
|
|
13768
13782
|
l()
|
|
13769
|
-
],
|
|
13783
|
+
], Lt.prototype, "name", 2);
|
|
13770
13784
|
nr([
|
|
13771
13785
|
l()
|
|
13772
|
-
],
|
|
13786
|
+
], Lt.prototype, "badge", 2);
|
|
13773
13787
|
nr([
|
|
13774
13788
|
l()
|
|
13775
|
-
],
|
|
13789
|
+
], Lt.prototype, "price", 2);
|
|
13776
13790
|
nr([
|
|
13777
13791
|
l()
|
|
13778
|
-
],
|
|
13779
|
-
y("ok-product-card",
|
|
13792
|
+
], Lt.prototype, "href", 2);
|
|
13793
|
+
y("ok-product-card", Lt);
|
|
13780
13794
|
var $l = Object.defineProperty, zl = Object.getOwnPropertyDescriptor, oi = (n, e, t, r) => {
|
|
13781
13795
|
for (var o = r > 1 ? void 0 : r ? zl(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
13782
13796
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
@@ -14276,9 +14290,9 @@ var Dl = Object.defineProperty, Al = Object.getOwnPropertyDescriptor, Vr = (n, e
|
|
|
14276
14290
|
const jl = {
|
|
14277
14291
|
menu: "Menu",
|
|
14278
14292
|
close: "Close"
|
|
14279
|
-
},
|
|
14293
|
+
}, Il = "(max-width: 800px)";
|
|
14280
14294
|
let ja = !1;
|
|
14281
|
-
function
|
|
14295
|
+
function Ll() {
|
|
14282
14296
|
if (ja) return;
|
|
14283
14297
|
ja = !0;
|
|
14284
14298
|
const n = new CSSStyleSheet();
|
|
@@ -14434,7 +14448,7 @@ class cr extends g {
|
|
|
14434
14448
|
return { ...jl, ...this.labels };
|
|
14435
14449
|
}
|
|
14436
14450
|
connectedCallback() {
|
|
14437
|
-
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);
|
|
14438
14452
|
}
|
|
14439
14453
|
disconnectedCallback() {
|
|
14440
14454
|
super.disconnectedCallback(), this.mq?.removeEventListener("change", this.onMqChange), this.mq = null, this.restoreNodes(), this.modal?.remove(), this.modal = null;
|
|
@@ -14462,7 +14476,7 @@ class cr extends g {
|
|
|
14462
14476
|
}
|
|
14463
14477
|
async presentPanel() {
|
|
14464
14478
|
if (this.isMobile) {
|
|
14465
|
-
if (
|
|
14479
|
+
if (Ll(), this.modal || (this.modal = this.buildModal()), this.movedNodes.length === 0 && this.linksHost && this.actionsHost)
|
|
14466
14480
|
for (const e of Array.from(this.children)) {
|
|
14467
14481
|
const t = e.getAttribute("slot");
|
|
14468
14482
|
t !== "brand" && (this.movedNodes.push(e), (t === "actions" ? this.actionsHost : this.linksHost).appendChild(e));
|
|
@@ -14615,7 +14629,7 @@ class Bl extends g {
|
|
|
14615
14629
|
}
|
|
14616
14630
|
}
|
|
14617
14631
|
y("ok-hero", Bl);
|
|
14618
|
-
var Fl = Object.defineProperty, Rl = Object.getOwnPropertyDescriptor,
|
|
14632
|
+
var Fl = Object.defineProperty, Rl = Object.getOwnPropertyDescriptor, Ie = (n, e, t, r) => {
|
|
14619
14633
|
for (var o = r > 1 ? void 0 : r ? Rl(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
14620
14634
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
14621
14635
|
return r && o && Fl(e, t, o), o;
|
|
@@ -14897,31 +14911,31 @@ class ue extends g {
|
|
|
14897
14911
|
`;
|
|
14898
14912
|
}
|
|
14899
14913
|
}
|
|
14900
|
-
|
|
14914
|
+
Ie([
|
|
14901
14915
|
l({ type: Number })
|
|
14902
14916
|
], ue.prototype, "total", 2);
|
|
14903
|
-
|
|
14917
|
+
Ie([
|
|
14904
14918
|
l({ type: Number })
|
|
14905
14919
|
], ue.prototype, "page", 2);
|
|
14906
|
-
|
|
14920
|
+
Ie([
|
|
14907
14921
|
l({ type: Number, attribute: "page-size" })
|
|
14908
14922
|
], ue.prototype, "pageSize", 2);
|
|
14909
|
-
|
|
14923
|
+
Ie([
|
|
14910
14924
|
l({ type: Number, attribute: "sibling-count" })
|
|
14911
14925
|
], ue.prototype, "siblingCount", 2);
|
|
14912
|
-
|
|
14926
|
+
Ie([
|
|
14913
14927
|
l({ type: Number, attribute: "boundary-count" })
|
|
14914
14928
|
], ue.prototype, "boundaryCount", 2);
|
|
14915
|
-
|
|
14929
|
+
Ie([
|
|
14916
14930
|
l()
|
|
14917
14931
|
], ue.prototype, "variant", 2);
|
|
14918
|
-
|
|
14932
|
+
Ie([
|
|
14919
14933
|
l({ type: Boolean })
|
|
14920
14934
|
], ue.prototype, "info", 2);
|
|
14921
|
-
|
|
14935
|
+
Ie([
|
|
14922
14936
|
l({ type: Array, attribute: "page-size-options" })
|
|
14923
14937
|
], ue.prototype, "pageSizeOptions", 2);
|
|
14924
|
-
|
|
14938
|
+
Ie([
|
|
14925
14939
|
l()
|
|
14926
14940
|
], ue.prototype, "label", 2);
|
|
14927
14941
|
y("ok-pagination", ue);
|
|
@@ -14930,7 +14944,7 @@ var Nl = Object.defineProperty, ql = Object.getOwnPropertyDescriptor, st = (n, e
|
|
|
14930
14944
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
14931
14945
|
return r && o && Nl(e, t, o), o;
|
|
14932
14946
|
};
|
|
14933
|
-
class
|
|
14947
|
+
class Le extends g {
|
|
14934
14948
|
constructor() {
|
|
14935
14949
|
super(...arguments), this.variant = "text", this.lines = 1, this.preset = "none", this.rows = 5, this.cols = 4;
|
|
14936
14950
|
}
|
|
@@ -15219,29 +15233,29 @@ class Ie extends g {
|
|
|
15219
15233
|
}
|
|
15220
15234
|
st([
|
|
15221
15235
|
l()
|
|
15222
|
-
],
|
|
15236
|
+
], Le.prototype, "variant", 2);
|
|
15223
15237
|
st([
|
|
15224
15238
|
l({ type: Number })
|
|
15225
|
-
],
|
|
15239
|
+
], Le.prototype, "lines", 2);
|
|
15226
15240
|
st([
|
|
15227
15241
|
l()
|
|
15228
|
-
],
|
|
15242
|
+
], Le.prototype, "width", 2);
|
|
15229
15243
|
st([
|
|
15230
15244
|
l()
|
|
15231
|
-
],
|
|
15245
|
+
], Le.prototype, "height", 2);
|
|
15232
15246
|
st([
|
|
15233
15247
|
l()
|
|
15234
|
-
],
|
|
15248
|
+
], Le.prototype, "radius", 2);
|
|
15235
15249
|
st([
|
|
15236
15250
|
l()
|
|
15237
|
-
],
|
|
15251
|
+
], Le.prototype, "preset", 2);
|
|
15238
15252
|
st([
|
|
15239
15253
|
l({ type: Number })
|
|
15240
|
-
],
|
|
15254
|
+
], Le.prototype, "rows", 2);
|
|
15241
15255
|
st([
|
|
15242
15256
|
l({ type: Number })
|
|
15243
|
-
],
|
|
15244
|
-
y("ok-skeleton",
|
|
15257
|
+
], Le.prototype, "cols", 2);
|
|
15258
|
+
y("ok-skeleton", Le);
|
|
15245
15259
|
var Ul = Object.defineProperty, Vl = Object.getOwnPropertyDescriptor, Q = (n, e, t, r) => {
|
|
15246
15260
|
for (var o = r > 1 ? void 0 : r ? Vl(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
15247
15261
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
@@ -15847,7 +15861,7 @@ var Yl = Object.defineProperty, Xl = Object.getOwnPropertyDescriptor, Tt = (n, e
|
|
|
15847
15861
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
15848
15862
|
return r && o && Yl(e, t, o), o;
|
|
15849
15863
|
};
|
|
15850
|
-
const
|
|
15864
|
+
const Ia = [
|
|
15851
15865
|
"var(--ok-primary, var(--ion-color-primary, #3880ff))",
|
|
15852
15866
|
"var(--ok-success, var(--ion-color-success, #2dd36f))",
|
|
15853
15867
|
"var(--ok-warning, var(--ion-color-warning, #ffc409))",
|
|
@@ -15957,7 +15971,7 @@ class lt extends g {
|
|
|
15957
15971
|
}
|
|
15958
15972
|
// Color efectivo de un slice (su color o el de la paleta por índice).
|
|
15959
15973
|
colorAt(e, t) {
|
|
15960
|
-
return e.color ||
|
|
15974
|
+
return e.color || Ia[t % Ia.length];
|
|
15961
15975
|
}
|
|
15962
15976
|
// Porcentaje (0–100) de un slice sobre el total.
|
|
15963
15977
|
pct(e) {
|
|
@@ -16085,7 +16099,7 @@ var Wl = Object.defineProperty, Gl = Object.getOwnPropertyDescriptor, dr = (n, e
|
|
|
16085
16099
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
16086
16100
|
return r && o && Wl(e, t, o), o;
|
|
16087
16101
|
};
|
|
16088
|
-
const
|
|
16102
|
+
const La = [
|
|
16089
16103
|
"Ene",
|
|
16090
16104
|
"Feb",
|
|
16091
16105
|
"Mar",
|
|
@@ -16274,8 +16288,8 @@ class Bt extends g {
|
|
|
16274
16288
|
}
|
|
16275
16289
|
return s`<div class="year" role="grid" aria-label="Heatmap anual">
|
|
16276
16290
|
${t.map(
|
|
16277
|
-
(r, o) => s`<div class="month" role="row" aria-label=${
|
|
16278
|
-
<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>
|
|
16279
16293
|
<div class="days">
|
|
16280
16294
|
${r.slice().sort((a, i) => a.day - i.day).map((a) => this.renderCell(a.cell))}
|
|
16281
16295
|
</div>
|
|
@@ -17651,7 +17665,7 @@ me([
|
|
|
17651
17665
|
v()
|
|
17652
17666
|
], Z.prototype, "openSub", 2);
|
|
17653
17667
|
y("ok-menu", Z);
|
|
17654
|
-
var vc = Object.defineProperty, bc = Object.getOwnPropertyDescriptor,
|
|
17668
|
+
var vc = Object.defineProperty, bc = Object.getOwnPropertyDescriptor, I = (n, e, t, r) => {
|
|
17655
17669
|
for (var o = r > 1 ? void 0 : r ? bc(e, t) : e, a = n.length - 1, i; a >= 0; a--)
|
|
17656
17670
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
17657
17671
|
return r && o && vc(e, t, o), o;
|
|
@@ -18012,59 +18026,59 @@ class j extends g {
|
|
|
18012
18026
|
`;
|
|
18013
18027
|
}
|
|
18014
18028
|
}
|
|
18015
|
-
|
|
18029
|
+
I([
|
|
18016
18030
|
l()
|
|
18017
18031
|
], j.prototype, "name", 2);
|
|
18018
|
-
|
|
18032
|
+
I([
|
|
18019
18033
|
l()
|
|
18020
18034
|
], j.prototype, "badge", 2);
|
|
18021
|
-
|
|
18035
|
+
I([
|
|
18022
18036
|
l()
|
|
18023
18037
|
], j.prototype, "handle", 2);
|
|
18024
|
-
|
|
18038
|
+
I([
|
|
18025
18039
|
l()
|
|
18026
18040
|
], j.prototype, "avatar", 2);
|
|
18027
|
-
|
|
18041
|
+
I([
|
|
18028
18042
|
l({ attribute: "avatar-src" })
|
|
18029
18043
|
], j.prototype, "avatarSrc", 2);
|
|
18030
|
-
|
|
18044
|
+
I([
|
|
18031
18045
|
l()
|
|
18032
18046
|
], j.prototype, "body", 2);
|
|
18033
|
-
|
|
18047
|
+
I([
|
|
18034
18048
|
l({ attribute: !1 })
|
|
18035
18049
|
], j.prototype, "stats", 2);
|
|
18036
|
-
|
|
18050
|
+
I([
|
|
18037
18051
|
l({ attribute: !1 })
|
|
18038
18052
|
], j.prototype, "actions", 2);
|
|
18039
|
-
|
|
18053
|
+
I([
|
|
18040
18054
|
l()
|
|
18041
18055
|
], j.prototype, "placement", 2);
|
|
18042
|
-
|
|
18056
|
+
I([
|
|
18043
18057
|
l({ type: Number, attribute: "open-delay" })
|
|
18044
18058
|
], j.prototype, "openDelay", 2);
|
|
18045
|
-
|
|
18059
|
+
I([
|
|
18046
18060
|
l({ type: Number, attribute: "close-delay" })
|
|
18047
18061
|
], j.prototype, "closeDelay", 2);
|
|
18048
|
-
|
|
18062
|
+
I([
|
|
18049
18063
|
l({ attribute: !1 })
|
|
18050
18064
|
], j.prototype, "labels", 2);
|
|
18051
|
-
|
|
18065
|
+
I([
|
|
18052
18066
|
v()
|
|
18053
18067
|
], j.prototype, "open", 2);
|
|
18054
|
-
|
|
18068
|
+
I([
|
|
18055
18069
|
v()
|
|
18056
18070
|
], j.prototype, "shown", 2);
|
|
18057
|
-
|
|
18071
|
+
I([
|
|
18058
18072
|
v()
|
|
18059
18073
|
], j.prototype, "end", 2);
|
|
18060
|
-
|
|
18074
|
+
I([
|
|
18061
18075
|
v()
|
|
18062
18076
|
], j.prototype, "above", 2);
|
|
18063
|
-
|
|
18064
|
-
|
|
18077
|
+
I([
|
|
18078
|
+
L(".card")
|
|
18065
18079
|
], j.prototype, "cardEl", 2);
|
|
18066
|
-
|
|
18067
|
-
|
|
18080
|
+
I([
|
|
18081
|
+
L(".trigger")
|
|
18068
18082
|
], j.prototype, "triggerEl", 2);
|
|
18069
18083
|
y("ok-hover-card", j);
|
|
18070
18084
|
var gc = Object.defineProperty, xc = Object.getOwnPropertyDescriptor, mr = (n, e, t, r) => {
|
|
@@ -20074,10 +20088,10 @@ class F extends g {
|
|
|
20074
20088
|
);
|
|
20075
20089
|
}
|
|
20076
20090
|
prevMonth() {
|
|
20077
|
-
this.viewDate =
|
|
20091
|
+
this.viewDate = Lo(this.viewDate, -1);
|
|
20078
20092
|
}
|
|
20079
20093
|
nextMonth() {
|
|
20080
|
-
this.viewDate =
|
|
20094
|
+
this.viewDate = Lo(this.viewDate, 1);
|
|
20081
20095
|
}
|
|
20082
20096
|
// ---- Presets -------------------------------------------------------------
|
|
20083
20097
|
applyPreset(e) {
|
|
@@ -20188,7 +20202,7 @@ class F extends g {
|
|
|
20188
20202
|
aria-modal="false"
|
|
20189
20203
|
>
|
|
20190
20204
|
<div class="months ${this.months === 2 ? "two" : ""}">
|
|
20191
|
-
${t.map((r) => this.renderMonth(
|
|
20205
|
+
${t.map((r) => this.renderMonth(Lo(this.viewDate, r), r))}
|
|
20192
20206
|
</div>
|
|
20193
20207
|
${this.presets && this.presets.length ? s`<div class="presets" role="group">
|
|
20194
20208
|
${this.presets.map(
|
|
@@ -20338,7 +20352,7 @@ function Xt(n) {
|
|
|
20338
20352
|
function eo(n) {
|
|
20339
20353
|
return new Date(n.getFullYear(), n.getMonth() + 1, 0);
|
|
20340
20354
|
}
|
|
20341
|
-
function
|
|
20355
|
+
function Lo(n, e) {
|
|
20342
20356
|
return new Date(n.getFullYear(), n.getMonth() + e, 1);
|
|
20343
20357
|
}
|
|
20344
20358
|
function Wt(n, e) {
|
|
@@ -20357,10 +20371,10 @@ function jc(n) {
|
|
|
20357
20371
|
return r;
|
|
20358
20372
|
}
|
|
20359
20373
|
y("ok-date-picker", F);
|
|
20360
|
-
var
|
|
20361
|
-
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--)
|
|
20362
20376
|
(i = n[a]) && (o = (r ? i(e, t, o) : i(o)) || o);
|
|
20363
|
-
return r && o &&
|
|
20377
|
+
return r && o && Ic(e, t, o), o;
|
|
20364
20378
|
};
|
|
20365
20379
|
function To(n) {
|
|
20366
20380
|
if (!n) return null;
|
|
@@ -21749,7 +21763,7 @@ fe([
|
|
|
21749
21763
|
v()
|
|
21750
21764
|
], J.prototype, "words", 2);
|
|
21751
21765
|
fe([
|
|
21752
|
-
|
|
21766
|
+
L(".content")
|
|
21753
21767
|
], J.prototype, "contentEl", 2);
|
|
21754
21768
|
let Vc = J;
|
|
21755
21769
|
y("ok-rich-text", Vc);
|
|
@@ -27205,6 +27219,6 @@ N([
|
|
|
27205
27219
|
v()
|
|
27206
27220
|
], T.prototype, "dragging", 2);
|
|
27207
27221
|
N([
|
|
27208
|
-
|
|
27222
|
+
L('input[type="file"]')
|
|
27209
27223
|
], T.prototype, "fileInput", 2);
|
|
27210
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",
|