codexly-ui 0.19.8 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/codexly-ui.mjs +216 -28
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +50 -1
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -690,6 +690,7 @@ class ClxThemeService {
|
|
|
690
690
|
/** Resolved border color for ClxCardComponent (outlined/elevated variants) — falls back to
|
|
691
691
|
* primaryColor when unset. Per-instance `[color]` input on clx-card still takes precedence. */
|
|
692
692
|
cardBorderColor = computed(() => this._config().cardBorderColor ?? this._config().primaryColor, ...(ngDevMode ? [{ debugName: "cardBorderColor" }] : /* istanbul ignore next */ []));
|
|
693
|
+
cardIconColor = computed(() => this._config().cardIconColor ?? this._config().primaryColor, ...(ngDevMode ? [{ debugName: "cardIconColor" }] : /* istanbul ignore next */ []));
|
|
693
694
|
/** Resolved divider/border color for ClxListComponent — falls back to primaryColor when unset.
|
|
694
695
|
* Per-instance `[color]` input on clx-list still takes precedence. */
|
|
695
696
|
listBorderColor = computed(() => this._config().listBorderColor ?? this._config().primaryColor, ...(ngDevMode ? [{ debugName: "listBorderColor" }] : /* istanbul ignore next */ []));
|
|
@@ -1624,6 +1625,11 @@ class ClxCardComponent {
|
|
|
1624
1625
|
/** Optional secondary line under headerTitle. */
|
|
1625
1626
|
headerSubtitle = input(undefined, ...(ngDevMode ? [{ debugName: "headerSubtitle" }] : /* istanbul ignore next */ []));
|
|
1626
1627
|
_color = computed(() => this.color() ?? this._themeSvc.cardBorderColor(), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
|
|
1628
|
+
/** Header icon badge: explicit [color] → theme cardIconColor → primaryColor (same fallback chain
|
|
1629
|
+
* as clx-collapse / the form controls). */
|
|
1630
|
+
_iconColor = computed(() => this.color() ?? this._themeSvc.cardIconColor(), ...(ngDevMode ? [{ debugName: "_iconColor" }] : /* istanbul ignore next */ []));
|
|
1631
|
+
_iconWrapCls = computed(() => `w-8 h-8 rounded-lg flex items-center justify-center shrink-0 ${resolveColor(this._iconColor()).bgMuted}`, ...(ngDevMode ? [{ debugName: "_iconWrapCls" }] : /* istanbul ignore next */ []));
|
|
1632
|
+
_iconCls = computed(() => resolveColor(this._iconColor()).textSubtle, ...(ngDevMode ? [{ debugName: "_iconCls" }] : /* istanbul ignore next */ []));
|
|
1627
1633
|
_titleClass = computed(() => `text-sm font-[${this._themeSvc.cardTitleStyle().weight}] text-clx-text-label leading-tight truncate`, ...(ngDevMode ? [{ debugName: "_titleClass" }] : /* istanbul ignore next */ []));
|
|
1628
1634
|
_headerSlot = contentChild(ClxCardHeaderDirective, ...(ngDevMode ? [{ debugName: "_headerSlot" }] : /* istanbul ignore next */ []));
|
|
1629
1635
|
_headerActionsSlot = contentChild(ClxCardHeaderActionsDirective, ...(ngDevMode ? [{ debugName: "_headerActionsSlot" }] : /* istanbul ignore next */ []));
|
|
@@ -1679,8 +1685,8 @@ class ClxCardComponent {
|
|
|
1679
1685
|
<div class="clx-card-header flex w-full items-center justify-between gap-3 px-4 py-3 border-b border-clx-border-soft">
|
|
1680
1686
|
<div class="flex items-center gap-3 min-w-0">
|
|
1681
1687
|
@if (icon()) {
|
|
1682
|
-
<div class="
|
|
1683
|
-
<span clx-icon [name]="icon()!" size="sm" class="
|
|
1688
|
+
<div [class]="_iconWrapCls()">
|
|
1689
|
+
<span clx-icon [name]="icon()!" size="sm" [class]="_iconCls()"></span>
|
|
1684
1690
|
</div>
|
|
1685
1691
|
}
|
|
1686
1692
|
<div class="flex flex-col min-w-0">
|
|
@@ -1731,8 +1737,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
1731
1737
|
<div class="clx-card-header flex w-full items-center justify-between gap-3 px-4 py-3 border-b border-clx-border-soft">
|
|
1732
1738
|
<div class="flex items-center gap-3 min-w-0">
|
|
1733
1739
|
@if (icon()) {
|
|
1734
|
-
<div class="
|
|
1735
|
-
<span clx-icon [name]="icon()!" size="sm" class="
|
|
1740
|
+
<div [class]="_iconWrapCls()">
|
|
1741
|
+
<span clx-icon [name]="icon()!" size="sm" [class]="_iconCls()"></span>
|
|
1736
1742
|
</div>
|
|
1737
1743
|
}
|
|
1738
1744
|
<div class="flex flex-col min-w-0">
|
|
@@ -7704,7 +7710,7 @@ function isSameDay$1(a, b) {
|
|
|
7704
7710
|
a.getMonth() === b.getMonth() &&
|
|
7705
7711
|
a.getDate() === b.getDate();
|
|
7706
7712
|
}
|
|
7707
|
-
function startOfDay$
|
|
7713
|
+
function startOfDay$2(d) {
|
|
7708
7714
|
return new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
7709
7715
|
}
|
|
7710
7716
|
class ClxDatepickerComponent {
|
|
@@ -7801,10 +7807,10 @@ class ClxDatepickerComponent {
|
|
|
7801
7807
|
_calendarDays = computed(() => {
|
|
7802
7808
|
const year = this._cursorYear();
|
|
7803
7809
|
const month = this._cursorMonth();
|
|
7804
|
-
const today = startOfDay$
|
|
7805
|
-
const selected = this._value() ? startOfDay$
|
|
7806
|
-
const min = this.minDate() ? startOfDay$
|
|
7807
|
-
const max = this.maxDate() ? startOfDay$
|
|
7810
|
+
const today = startOfDay$2(new Date());
|
|
7811
|
+
const selected = this._value() ? startOfDay$2(this._value()) : null;
|
|
7812
|
+
const min = this.minDate() ? startOfDay$2(this.minDate()) : null;
|
|
7813
|
+
const max = this.maxDate() ? startOfDay$2(this.maxDate()) : null;
|
|
7808
7814
|
const firstDay = new Date(year, month, 1);
|
|
7809
7815
|
const lastDay = new Date(year, month + 1, 0);
|
|
7810
7816
|
const days = [];
|
|
@@ -7876,15 +7882,15 @@ class ClxDatepickerComponent {
|
|
|
7876
7882
|
this._cursorYear.set(y);
|
|
7877
7883
|
}
|
|
7878
7884
|
_selectDate(date) {
|
|
7879
|
-
const d = startOfDay$
|
|
7885
|
+
const d = startOfDay$2(date);
|
|
7880
7886
|
this._value.set(d);
|
|
7881
7887
|
this._onChange(d);
|
|
7882
7888
|
this._closePanel();
|
|
7883
7889
|
}
|
|
7884
7890
|
_selectToday() {
|
|
7885
|
-
const today = startOfDay$
|
|
7886
|
-
const min = this.minDate() ? startOfDay$
|
|
7887
|
-
const max = this.maxDate() ? startOfDay$
|
|
7891
|
+
const today = startOfDay$2(new Date());
|
|
7892
|
+
const min = this.minDate() ? startOfDay$2(this.minDate()) : null;
|
|
7893
|
+
const max = this.maxDate() ? startOfDay$2(this.maxDate()) : null;
|
|
7888
7894
|
if ((min && today < min) || (max && today > max))
|
|
7889
7895
|
return;
|
|
7890
7896
|
this._selectDate(today);
|
|
@@ -7898,7 +7904,7 @@ class ClxDatepickerComponent {
|
|
|
7898
7904
|
}
|
|
7899
7905
|
writeValue(val) {
|
|
7900
7906
|
this._cvaConnected = true;
|
|
7901
|
-
const d = val ? startOfDay$
|
|
7907
|
+
const d = val ? startOfDay$2(val) : null;
|
|
7902
7908
|
this._value.set(d);
|
|
7903
7909
|
if (d) {
|
|
7904
7910
|
this._cursorYear.set(d.getFullYear());
|
|
@@ -8421,7 +8427,7 @@ const MONTH_NAMES_ES = [
|
|
|
8421
8427
|
'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre',
|
|
8422
8428
|
];
|
|
8423
8429
|
const DAY_LABELS = ['Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa'];
|
|
8424
|
-
function startOfDay(d) {
|
|
8430
|
+
function startOfDay$1(d) {
|
|
8425
8431
|
return new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
8426
8432
|
}
|
|
8427
8433
|
function isSameDay(a, b) {
|
|
@@ -8449,9 +8455,9 @@ function addMonths(year, month, delta) {
|
|
|
8449
8455
|
return { year: y, month: m };
|
|
8450
8456
|
}
|
|
8451
8457
|
function buildCalendar(year, month, minDate, maxDate) {
|
|
8452
|
-
const today = startOfDay(new Date());
|
|
8453
|
-
const min = minDate ? startOfDay(minDate) : null;
|
|
8454
|
-
const max = maxDate ? startOfDay(maxDate) : null;
|
|
8458
|
+
const today = startOfDay$1(new Date());
|
|
8459
|
+
const min = minDate ? startOfDay$1(minDate) : null;
|
|
8460
|
+
const max = maxDate ? startOfDay$1(maxDate) : null;
|
|
8455
8461
|
const firstDay = new Date(year, month, 1);
|
|
8456
8462
|
const lastDay = new Date(year, month + 1, 0);
|
|
8457
8463
|
const days = [];
|
|
@@ -8471,8 +8477,8 @@ function buildCalendar(year, month, minDate, maxDate) {
|
|
|
8471
8477
|
return days;
|
|
8472
8478
|
}
|
|
8473
8479
|
const DATE_PRESETS = [
|
|
8474
|
-
{ label: 'Hoy', range: () => { const t = startOfDay(new Date()); return { from: t, to: t }; } },
|
|
8475
|
-
{ label: 'Esta semana', range: () => { const t = startOfDay(new Date()); const d = t.getDay(); const f = new Date(t); f.setDate(t.getDate() - d); const e = new Date(f); e.setDate(f.getDate() + 6); return { from: f, to: e }; } },
|
|
8480
|
+
{ label: 'Hoy', range: () => { const t = startOfDay$1(new Date()); return { from: t, to: t }; } },
|
|
8481
|
+
{ label: 'Esta semana', range: () => { const t = startOfDay$1(new Date()); const d = t.getDay(); const f = new Date(t); f.setDate(t.getDate() - d); const e = new Date(f); e.setDate(f.getDate() + 6); return { from: f, to: e }; } },
|
|
8476
8482
|
{ label: 'Este mes', range: () => { const t = new Date(); return { from: new Date(t.getFullYear(), t.getMonth(), 1), to: new Date(t.getFullYear(), t.getMonth() + 1, 0) }; } },
|
|
8477
8483
|
{ label: 'Mes anterior', range: () => { const t = new Date(); return { from: new Date(t.getFullYear(), t.getMonth() - 1, 1), to: new Date(t.getFullYear(), t.getMonth(), 0) }; } },
|
|
8478
8484
|
{ label: 'Último trimestre', range: () => { const t = new Date(); const q = Math.floor(t.getMonth() / 3); return { from: new Date(t.getFullYear(), (q - 1) * 3, 1), to: new Date(t.getFullYear(), q * 3, 0) }; } },
|
|
@@ -8515,8 +8521,8 @@ class ClxDateRangePickerComponent {
|
|
|
8515
8521
|
untracked(() => {
|
|
8516
8522
|
this._committed.set(v);
|
|
8517
8523
|
if (v) {
|
|
8518
|
-
this._draftFrom.set(startOfDay(v.from));
|
|
8519
|
-
this._draftTo.set(startOfDay(v.to));
|
|
8524
|
+
this._draftFrom.set(startOfDay$1(v.from));
|
|
8525
|
+
this._draftTo.set(startOfDay$1(v.to));
|
|
8520
8526
|
this._cursorYear.set(v.from.getFullYear());
|
|
8521
8527
|
this._cursorMonth.set(v.from.getMonth());
|
|
8522
8528
|
}
|
|
@@ -8585,7 +8591,7 @@ class ClxDateRangePickerComponent {
|
|
|
8585
8591
|
const base = 'w-9 h-9 flex items-center justify-center text-sm transition-colors focus:outline-none relative';
|
|
8586
8592
|
if (cell.isDisabled)
|
|
8587
8593
|
return `${base} text-gray-200 cursor-not-allowed rounded-full`;
|
|
8588
|
-
const d = startOfDay(cell.date);
|
|
8594
|
+
const d = startOfDay$1(cell.date);
|
|
8589
8595
|
const from = this._draftFrom();
|
|
8590
8596
|
const to = this._draftTo();
|
|
8591
8597
|
const hover = this._hoverDate();
|
|
@@ -8623,7 +8629,7 @@ class ClxDateRangePickerComponent {
|
|
|
8623
8629
|
_formatShort(d) { return formatShort(d); }
|
|
8624
8630
|
// ── Selection logic ────────────────────────────────────────────────────────
|
|
8625
8631
|
_selectDate(date) {
|
|
8626
|
-
const d = startOfDay(date);
|
|
8632
|
+
const d = startOfDay$1(date);
|
|
8627
8633
|
const from = this._draftFrom();
|
|
8628
8634
|
// Reset and start new if no from, or both already set, or clicked before from
|
|
8629
8635
|
if (!from || (from && this._draftTo()) || isBefore(d, from)) {
|
|
@@ -8638,7 +8644,7 @@ class ClxDateRangePickerComponent {
|
|
|
8638
8644
|
}
|
|
8639
8645
|
_onHover(date) {
|
|
8640
8646
|
if (this._draftFrom() && !this._draftTo()) {
|
|
8641
|
-
this._hoverDate.set(startOfDay(date));
|
|
8647
|
+
this._hoverDate.set(startOfDay$1(date));
|
|
8642
8648
|
}
|
|
8643
8649
|
}
|
|
8644
8650
|
_applyPreset(preset) {
|
|
@@ -8712,8 +8718,8 @@ class ClxDateRangePickerComponent {
|
|
|
8712
8718
|
const r = val ?? null;
|
|
8713
8719
|
this._committed.set(r);
|
|
8714
8720
|
if (r) {
|
|
8715
|
-
this._draftFrom.set(startOfDay(r.from));
|
|
8716
|
-
this._draftTo.set(startOfDay(r.to));
|
|
8721
|
+
this._draftFrom.set(startOfDay$1(r.from));
|
|
8722
|
+
this._draftTo.set(startOfDay$1(r.to));
|
|
8717
8723
|
this._cursorYear.set(r.from.getFullYear());
|
|
8718
8724
|
this._cursorMonth.set(r.from.getMonth());
|
|
8719
8725
|
}
|
|
@@ -16024,6 +16030,188 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16024
16030
|
}]
|
|
16025
16031
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], retryLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "retryLabel", required: false }] }], backLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "backLabel", required: false }] }], errorId: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorId", required: false }] }], retry: [{ type: i0.Output, args: ["retry"] }], back: [{ type: i0.Output, args: ["back"] }] } });
|
|
16026
16032
|
|
|
16033
|
+
/** Time formatting shared by clx-page-maintenance and clx-maintenance-banner (es-CO, 12 h). */
|
|
16034
|
+
const TIME = new Intl.DateTimeFormat('es-CO', { hour: 'numeric', minute: '2-digit' });
|
|
16035
|
+
const DAY = new Intl.DateTimeFormat('es-CO', { weekday: 'long', day: 'numeric', month: 'short' });
|
|
16036
|
+
function toDate(value) {
|
|
16037
|
+
if (!value)
|
|
16038
|
+
return null;
|
|
16039
|
+
const d = value instanceof Date ? value : new Date(value);
|
|
16040
|
+
return isNaN(d.getTime()) ? null : d;
|
|
16041
|
+
}
|
|
16042
|
+
/** "11:30 p. m." — empty string when there is no valid date. */
|
|
16043
|
+
function formatClxTime(value) {
|
|
16044
|
+
const d = toDate(value);
|
|
16045
|
+
return d ? TIME.format(d) : '';
|
|
16046
|
+
}
|
|
16047
|
+
/** "hoy de 11:00 p. m. a 11:30 p. m." · "mañana de …" · "el jueves, 23 oct de …" ·
|
|
16048
|
+
* spanning midnight: "hoy de 11:00 p. m. a mañana 1:00 a. m.". */
|
|
16049
|
+
function formatClxWindow(start, end, now = new Date()) {
|
|
16050
|
+
const s = toDate(start);
|
|
16051
|
+
const e = toDate(end);
|
|
16052
|
+
if (!s || !e)
|
|
16053
|
+
return '';
|
|
16054
|
+
const day = (d) => {
|
|
16055
|
+
const diff = Math.round((startOfDay(d) - startOfDay(now)) / 86_400_000);
|
|
16056
|
+
if (diff === 0)
|
|
16057
|
+
return 'hoy';
|
|
16058
|
+
if (diff === 1)
|
|
16059
|
+
return 'mañana';
|
|
16060
|
+
return 'el ' + DAY.format(d);
|
|
16061
|
+
};
|
|
16062
|
+
const sameDay = startOfDay(s) === startOfDay(e);
|
|
16063
|
+
return sameDay
|
|
16064
|
+
? `${day(s)} de ${TIME.format(s)} a ${TIME.format(e)}`
|
|
16065
|
+
: `${day(s)} de ${TIME.format(s)} a ${day(e)} ${TIME.format(e)}`;
|
|
16066
|
+
}
|
|
16067
|
+
function startOfDay(d) {
|
|
16068
|
+
return new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();
|
|
16069
|
+
}
|
|
16070
|
+
|
|
16071
|
+
/** Full-page "we're under maintenance" state (503). Same layout as clx-page-server-error, in the
|
|
16072
|
+
* brand yellow. No buttons: the host app removes it by itself when the service is back. */
|
|
16073
|
+
class ClxPageMaintenanceComponent {
|
|
16074
|
+
title = input('Estamos en mantenimiento', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
16075
|
+
description = input('Estamos actualizando la plataforma para darte un mejor servicio. Vuelve en unos minutos.', ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
16076
|
+
/** Estimated end (ISO string or Date). Empty → no "Volvemos a las…" pill. */
|
|
16077
|
+
until = input(null, ...(ngDevMode ? [{ debugName: "until" }] : /* istanbul ignore next */ []));
|
|
16078
|
+
liveLabel = input('Esta página se actualiza sola cuando volvamos', ...(ngDevMode ? [{ debugName: "liveLabel" }] : /* istanbul ignore next */ []));
|
|
16079
|
+
showCode = input(true, ...(ngDevMode ? [{ debugName: "showCode" }] : /* istanbul ignore next */ []));
|
|
16080
|
+
untilLabel = computed(() => formatClxTime(this.until()), ...(ngDevMode ? [{ debugName: "untilLabel" }] : /* istanbul ignore next */ []));
|
|
16081
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxPageMaintenanceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16082
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxPageMaintenanceComponent, isStandalone: true, selector: "clx-page-maintenance", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, until: { classPropertyName: "until", publicName: "until", isSignal: true, isRequired: false, transformFunction: null }, liveLabel: { classPropertyName: "liveLabel", publicName: "liveLabel", isSignal: true, isRequired: false, transformFunction: null }, showCode: { classPropertyName: "showCode", publicName: "showCode", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "status", "aria-live": "polite" }, classAttribute: "flex flex-col items-center justify-center min-h-[60vh] px-6 text-center text-sm" }, ngImport: i0, template: `
|
|
16083
|
+
<div class="w-20 h-20 rounded-2xl bg-yellow-50 flex items-center justify-center mb-6">
|
|
16084
|
+
<span clx-icon name="build" size="xl" class="text-yellow-500"></span>
|
|
16085
|
+
</div>
|
|
16086
|
+
|
|
16087
|
+
@if (showCode()) {
|
|
16088
|
+
<p class="text-[50px] font-black text-clx-text-faint leading-none select-none mb-2">503</p>
|
|
16089
|
+
}
|
|
16090
|
+
<h1 class="text-base font-semibold text-clx-text-label mb-2">{{ title() }}</h1>
|
|
16091
|
+
<p class="text-clx-text-subtle max-w-sm mb-6">{{ description() }}</p>
|
|
16092
|
+
|
|
16093
|
+
@if (untilLabel()) {
|
|
16094
|
+
<div class="inline-flex items-center gap-2 rounded-full border border-clx-border-soft bg-clx-surface
|
|
16095
|
+
px-3.5 py-1.5 font-semibold text-clx-text-label mb-5">
|
|
16096
|
+
<span clx-icon name="schedule" size="sm" class="text-yellow-500"></span>
|
|
16097
|
+
Volvemos aprox. a las {{ untilLabel() }}
|
|
16098
|
+
</div>
|
|
16099
|
+
}
|
|
16100
|
+
|
|
16101
|
+
@if (liveLabel()) {
|
|
16102
|
+
<p class="inline-flex items-center gap-2 text-xs text-clx-text-subtle">
|
|
16103
|
+
<span class="w-2 h-2 rounded-full bg-yellow-500 animate-pulse" aria-hidden="true"></span>
|
|
16104
|
+
{{ liveLabel() }}
|
|
16105
|
+
</p>
|
|
16106
|
+
}
|
|
16107
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ClxIconComponent, selector: "span[clx-icon]", inputs: ["name", "size", "color", "fill"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
16108
|
+
}
|
|
16109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxPageMaintenanceComponent, decorators: [{
|
|
16110
|
+
type: Component,
|
|
16111
|
+
args: [{
|
|
16112
|
+
selector: 'clx-page-maintenance',
|
|
16113
|
+
standalone: true,
|
|
16114
|
+
imports: [ClxIconComponent],
|
|
16115
|
+
encapsulation: ViewEncapsulation.None,
|
|
16116
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16117
|
+
host: {
|
|
16118
|
+
class: 'flex flex-col items-center justify-center min-h-[60vh] px-6 text-center text-sm',
|
|
16119
|
+
role: 'status',
|
|
16120
|
+
'aria-live': 'polite',
|
|
16121
|
+
},
|
|
16122
|
+
template: `
|
|
16123
|
+
<div class="w-20 h-20 rounded-2xl bg-yellow-50 flex items-center justify-center mb-6">
|
|
16124
|
+
<span clx-icon name="build" size="xl" class="text-yellow-500"></span>
|
|
16125
|
+
</div>
|
|
16126
|
+
|
|
16127
|
+
@if (showCode()) {
|
|
16128
|
+
<p class="text-[50px] font-black text-clx-text-faint leading-none select-none mb-2">503</p>
|
|
16129
|
+
}
|
|
16130
|
+
<h1 class="text-base font-semibold text-clx-text-label mb-2">{{ title() }}</h1>
|
|
16131
|
+
<p class="text-clx-text-subtle max-w-sm mb-6">{{ description() }}</p>
|
|
16132
|
+
|
|
16133
|
+
@if (untilLabel()) {
|
|
16134
|
+
<div class="inline-flex items-center gap-2 rounded-full border border-clx-border-soft bg-clx-surface
|
|
16135
|
+
px-3.5 py-1.5 font-semibold text-clx-text-label mb-5">
|
|
16136
|
+
<span clx-icon name="schedule" size="sm" class="text-yellow-500"></span>
|
|
16137
|
+
Volvemos aprox. a las {{ untilLabel() }}
|
|
16138
|
+
</div>
|
|
16139
|
+
}
|
|
16140
|
+
|
|
16141
|
+
@if (liveLabel()) {
|
|
16142
|
+
<p class="inline-flex items-center gap-2 text-xs text-clx-text-subtle">
|
|
16143
|
+
<span class="w-2 h-2 rounded-full bg-yellow-500 animate-pulse" aria-hidden="true"></span>
|
|
16144
|
+
{{ liveLabel() }}
|
|
16145
|
+
</p>
|
|
16146
|
+
}
|
|
16147
|
+
`,
|
|
16148
|
+
}]
|
|
16149
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], until: [{ type: i0.Input, args: [{ isSignal: true, alias: "until", required: false }] }], liveLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "liveLabel", required: false }] }], showCode: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCode", required: false }] }] } });
|
|
16150
|
+
|
|
16151
|
+
/** Non-blocking announcement of a scheduled maintenance window:
|
|
16152
|
+
* "Mantenimiento programado hoy de 11:00 p. m. a 11:30 p. m. · <message>". The window is formatted
|
|
16153
|
+
* from startsAt/endsAt (hoy / mañana / day name). `checkoutBlocked` switches the copy to "las
|
|
16154
|
+
* compras están pausadas" for the store. Emits `dismissed` when closed (the host decides for how long). */
|
|
16155
|
+
class ClxMaintenanceBannerComponent {
|
|
16156
|
+
startsAt = input.required(...(ngDevMode ? [{ debugName: "startsAt" }] : /* istanbul ignore next */ []));
|
|
16157
|
+
endsAt = input.required(...(ngDevMode ? [{ debugName: "endsAt" }] : /* istanbul ignore next */ []));
|
|
16158
|
+
/** Extra text from Sistema → Mantenimiento. */
|
|
16159
|
+
message = input(null, ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
16160
|
+
/** The store already stopped taking purchases. */
|
|
16161
|
+
checkoutBlocked = input(false, ...(ngDevMode ? [{ debugName: "checkoutBlocked" }] : /* istanbul ignore next */ []));
|
|
16162
|
+
dismissible = input(true, ...(ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []));
|
|
16163
|
+
dismissed = output();
|
|
16164
|
+
heading = computed(() => {
|
|
16165
|
+
const window = formatClxWindow(this.startsAt(), this.endsAt());
|
|
16166
|
+
return this.checkoutBlocked()
|
|
16167
|
+
? `Compras pausadas por mantenimiento ${window}`
|
|
16168
|
+
: `Mantenimiento programado ${window}`;
|
|
16169
|
+
}, ...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
16170
|
+
detail = computed(() => this.message()?.trim() || null, ...(ngDevMode ? [{ debugName: "detail" }] : /* istanbul ignore next */ []));
|
|
16171
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxMaintenanceBannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16172
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxMaintenanceBannerComponent, isStandalone: true, selector: "clx-maintenance-banner", inputs: { startsAt: { classPropertyName: "startsAt", publicName: "startsAt", isSignal: true, isRequired: true, transformFunction: null }, endsAt: { classPropertyName: "endsAt", publicName: "endsAt", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, checkoutBlocked: { classPropertyName: "checkoutBlocked", publicName: "checkoutBlocked", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismissed: "dismissed" }, host: { attributes: { "role": "status", "aria-live": "polite" }, classAttribute: "flex items-start gap-3 rounded-xl border border-yellow-300 bg-yellow-50 px-4 py-3 text-sm text-yellow-900" }, ngImport: i0, template: `
|
|
16173
|
+
<span clx-icon name="build" size="sm" class="text-yellow-600 mt-0.5 shrink-0"></span>
|
|
16174
|
+
<p class="flex-1 min-w-0 leading-snug">
|
|
16175
|
+
<span class="font-semibold">{{ heading() }}</span>
|
|
16176
|
+
@if (detail()) { <span> · {{ detail() }}</span> }
|
|
16177
|
+
</p>
|
|
16178
|
+
@if (dismissible()) {
|
|
16179
|
+
<button type="button" class="shrink-0 -m-1 p-1 rounded-md text-yellow-700 hover:bg-yellow-100 cursor-pointer"
|
|
16180
|
+
aria-label="Cerrar aviso" (click)="dismissed.emit()">
|
|
16181
|
+
<span clx-icon name="close" size="sm"></span>
|
|
16182
|
+
</button>
|
|
16183
|
+
}
|
|
16184
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ClxIconComponent, selector: "span[clx-icon]", inputs: ["name", "size", "color", "fill"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
16185
|
+
}
|
|
16186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxMaintenanceBannerComponent, decorators: [{
|
|
16187
|
+
type: Component,
|
|
16188
|
+
args: [{
|
|
16189
|
+
selector: 'clx-maintenance-banner',
|
|
16190
|
+
standalone: true,
|
|
16191
|
+
imports: [ClxIconComponent],
|
|
16192
|
+
encapsulation: ViewEncapsulation.None,
|
|
16193
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16194
|
+
host: {
|
|
16195
|
+
class: 'flex items-start gap-3 rounded-xl border border-yellow-300 bg-yellow-50 px-4 py-3 text-sm text-yellow-900',
|
|
16196
|
+
role: 'status',
|
|
16197
|
+
'aria-live': 'polite',
|
|
16198
|
+
},
|
|
16199
|
+
template: `
|
|
16200
|
+
<span clx-icon name="build" size="sm" class="text-yellow-600 mt-0.5 shrink-0"></span>
|
|
16201
|
+
<p class="flex-1 min-w-0 leading-snug">
|
|
16202
|
+
<span class="font-semibold">{{ heading() }}</span>
|
|
16203
|
+
@if (detail()) { <span> · {{ detail() }}</span> }
|
|
16204
|
+
</p>
|
|
16205
|
+
@if (dismissible()) {
|
|
16206
|
+
<button type="button" class="shrink-0 -m-1 p-1 rounded-md text-yellow-700 hover:bg-yellow-100 cursor-pointer"
|
|
16207
|
+
aria-label="Cerrar aviso" (click)="dismissed.emit()">
|
|
16208
|
+
<span clx-icon name="close" size="sm"></span>
|
|
16209
|
+
</button>
|
|
16210
|
+
}
|
|
16211
|
+
`,
|
|
16212
|
+
}]
|
|
16213
|
+
}], propDecorators: { startsAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "startsAt", required: true }] }], endsAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "endsAt", required: true }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], checkoutBlocked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkoutBlocked", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }] } });
|
|
16214
|
+
|
|
16027
16215
|
class ClxStatCardComponent {
|
|
16028
16216
|
_themeSvc = inject(ClxThemeService);
|
|
16029
16217
|
metric = input.required(...(ngDevMode ? [{ debugName: "metric" }] : /* istanbul ignore next */ []));
|
|
@@ -19607,5 +19795,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
19607
19795
|
* Generated bundle index. Do not edit.
|
|
19608
19796
|
*/
|
|
19609
19797
|
|
|
19610
|
-
export { CLX_ADDON_BORDER, CLX_ADDON_TEXT, CLX_ALERT_OPTIONS, CLX_ALERT_RESOLVE, CLX_BG_ADDON, CLX_BG_DISABLED, CLX_BG_ICON_WRAP, CLX_BG_SECTION, CLX_BG_SURFACE, CLX_BORDER_DEFAULT, CLX_BORDER_DISABLED, CLX_BORDER_MEDIUM, CLX_COLOR_HEX, CLX_COLOR_HEX_100, CLX_COLOR_MAP, CLX_FONT_CATALOG, CLX_MODAL_ANIM_CONFIG, CLX_MODAL_DATA, CLX_MODAL_REF, CLX_OPTION_DISABLED, CLX_PLACEHOLDER, CLX_RADIO_GROUP, CLX_RADIUS_MAP, CLX_TEXT_BODY, CLX_TEXT_DISABLED, CLX_TEXT_HEADING, CLX_TEXT_HINT, CLX_TEXT_IDLE, CLX_TEXT_INPUT, CLX_TEXT_LABEL, CLX_TEXT_OPTION, CLX_TEXT_SUBTITLE, CLX_TEXT_TITLE, CLX_THEME_CONFIG, CLX_THEME_DEFAULTS, CLX_TOAST_DEFAULTS, ClxAlertComponent, ClxAlertListComponent, ClxAlertService, ClxAnimateDirective, ClxAnimateGroupDirective, ClxAnimateService, ClxAppLayoutComponent, ClxAvatarComponent, ClxBadgeComponent, ClxBrandComponent, ClxButtonComponent, ClxButtonGroupComponent, ClxCardBodyDirective, ClxCardComponent, ClxCardExpiryInputComponent, ClxCardFooterDirective, ClxCardHeaderActionsDirective, ClxCardHeaderDirective, ClxCardNumberInputComponent, ClxCardValidators, ClxCarouselComponent, ClxCarouselDirective, ClxCartComponent, ClxCartSummaryDrawer, ClxCellDirective, ClxCheckboxComponent, ClxCollapseComponent, ClxColorPickerComponent, ClxColumnDefDirective, ClxDateRangePickerComponent, ClxDatepickerComponent, ClxDrawerComponent, ClxDrawerService, ClxEditorComponent, ClxEditorImageModalComponent, ClxEditorLinkModalComponent, ClxFabComponent, ClxFilterPanelComponent, ClxHeaderCellDirective, ClxIconComponent, ClxInputComponent, ClxListComponent, ClxListItemComponent, ClxMenuComponent, ClxMenuItemComponent, ClxMenuItemTrailingDirective, ClxModalComponent, ClxModalService, ClxNativeOverlayService, ClxNavGroupComponent, ClxNotificationComponent, ClxNumberComponent, ClxOtpComponent, ClxPageEmptyComponent, ClxPageHeaderComponent, ClxPageHeaderTitleDirective, ClxPageNotFoundComponent, ClxPageServerErrorComponent, ClxPageUnauthorizedComponent, ClxPaginationComponent, ClxProductComponent, ClxProductDetailComponent, ClxProductQuickViewComponent, ClxProfileComponent, ClxProgressBarComponent, ClxRadioComponent, ClxRadioGroupComponent, ClxRankedListComponent, ClxRatingComponent, ClxSearchComponent, ClxSelectComponent, ClxSkeletonComponent, ClxSliderComponent, ClxSocialIconComponent, ClxSpinnerComponent, ClxStatCardComponent, ClxStepComponent, ClxStepperComponent, ClxSwitchComponent, ClxTabDirective, ClxTableActionsComponent, ClxTableComponent, ClxTableProductCellComponent, ClxTableProgressCellComponent, ClxTableStatusCellComponent, ClxTabsComponent, ClxTagComponent, ClxTextareaComponent, ClxThemeService, ClxTimelineComponent, ClxTimelineItemComponent, ClxTimepickerComponent, ClxToastComponent, ClxToastContainerComponent, ClxToastService, ClxTooltipComponent, ClxTooltipDirective, ClxTreeComponent, ClxUploadComponent, ClxWidgetCardComponent, ClxWishlistComponent, ClxWizardComponent, TIMEPICKER_SIZE_MAP, detectClxCardBrand, isClxCardExpired, parseColorInput, provideCodexlyTheme, resolveColor, resolveContainerRadius, resolveRadius };
|
|
19798
|
+
export { CLX_ADDON_BORDER, CLX_ADDON_TEXT, CLX_ALERT_OPTIONS, CLX_ALERT_RESOLVE, CLX_BG_ADDON, CLX_BG_DISABLED, CLX_BG_ICON_WRAP, CLX_BG_SECTION, CLX_BG_SURFACE, CLX_BORDER_DEFAULT, CLX_BORDER_DISABLED, CLX_BORDER_MEDIUM, CLX_COLOR_HEX, CLX_COLOR_HEX_100, CLX_COLOR_MAP, CLX_FONT_CATALOG, CLX_MODAL_ANIM_CONFIG, CLX_MODAL_DATA, CLX_MODAL_REF, CLX_OPTION_DISABLED, CLX_PLACEHOLDER, CLX_RADIO_GROUP, CLX_RADIUS_MAP, CLX_TEXT_BODY, CLX_TEXT_DISABLED, CLX_TEXT_HEADING, CLX_TEXT_HINT, CLX_TEXT_IDLE, CLX_TEXT_INPUT, CLX_TEXT_LABEL, CLX_TEXT_OPTION, CLX_TEXT_SUBTITLE, CLX_TEXT_TITLE, CLX_THEME_CONFIG, CLX_THEME_DEFAULTS, CLX_TOAST_DEFAULTS, ClxAlertComponent, ClxAlertListComponent, ClxAlertService, ClxAnimateDirective, ClxAnimateGroupDirective, ClxAnimateService, ClxAppLayoutComponent, ClxAvatarComponent, ClxBadgeComponent, ClxBrandComponent, ClxButtonComponent, ClxButtonGroupComponent, ClxCardBodyDirective, ClxCardComponent, ClxCardExpiryInputComponent, ClxCardFooterDirective, ClxCardHeaderActionsDirective, ClxCardHeaderDirective, ClxCardNumberInputComponent, ClxCardValidators, ClxCarouselComponent, ClxCarouselDirective, ClxCartComponent, ClxCartSummaryDrawer, ClxCellDirective, ClxCheckboxComponent, ClxCollapseComponent, ClxColorPickerComponent, ClxColumnDefDirective, ClxDateRangePickerComponent, ClxDatepickerComponent, ClxDrawerComponent, ClxDrawerService, ClxEditorComponent, ClxEditorImageModalComponent, ClxEditorLinkModalComponent, ClxFabComponent, ClxFilterPanelComponent, ClxHeaderCellDirective, ClxIconComponent, ClxInputComponent, ClxListComponent, ClxListItemComponent, ClxMaintenanceBannerComponent, ClxMenuComponent, ClxMenuItemComponent, ClxMenuItemTrailingDirective, ClxModalComponent, ClxModalService, ClxNativeOverlayService, ClxNavGroupComponent, ClxNotificationComponent, ClxNumberComponent, ClxOtpComponent, ClxPageEmptyComponent, ClxPageHeaderComponent, ClxPageHeaderTitleDirective, ClxPageMaintenanceComponent, ClxPageNotFoundComponent, ClxPageServerErrorComponent, ClxPageUnauthorizedComponent, ClxPaginationComponent, ClxProductComponent, ClxProductDetailComponent, ClxProductQuickViewComponent, ClxProfileComponent, ClxProgressBarComponent, ClxRadioComponent, ClxRadioGroupComponent, ClxRankedListComponent, ClxRatingComponent, ClxSearchComponent, ClxSelectComponent, ClxSkeletonComponent, ClxSliderComponent, ClxSocialIconComponent, ClxSpinnerComponent, ClxStatCardComponent, ClxStepComponent, ClxStepperComponent, ClxSwitchComponent, ClxTabDirective, ClxTableActionsComponent, ClxTableComponent, ClxTableProductCellComponent, ClxTableProgressCellComponent, ClxTableStatusCellComponent, ClxTabsComponent, ClxTagComponent, ClxTextareaComponent, ClxThemeService, ClxTimelineComponent, ClxTimelineItemComponent, ClxTimepickerComponent, ClxToastComponent, ClxToastContainerComponent, ClxToastService, ClxTooltipComponent, ClxTooltipDirective, ClxTreeComponent, ClxUploadComponent, ClxWidgetCardComponent, ClxWishlistComponent, ClxWizardComponent, TIMEPICKER_SIZE_MAP, detectClxCardBrand, formatClxTime, formatClxWindow, isClxCardExpired, parseColorInput, provideCodexlyTheme, resolveColor, resolveContainerRadius, resolveRadius };
|
|
19611
19799
|
//# sourceMappingURL=codexly-ui.mjs.map
|