codexly-ui 0.11.3 → 0.11.5
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 +39 -30
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +4 -2
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -11369,6 +11369,11 @@ class ClxNotificationComponent {
|
|
|
11369
11369
|
/** Optional third tab that filters items by ClxNotificationItem.category — e.g.
|
|
11370
11370
|
* `{ id: 'orders', label: 'Órdenes' }`. Omit for just Todas/Sin leer. */
|
|
11371
11371
|
categoryTab = input(undefined, ...(ngDevMode ? [{ debugName: "categoryTab" }] : /* istanbul ignore next */ []));
|
|
11372
|
+
// ── Trigger button overrides — the bell is a real clx-button under the hood, so any of its
|
|
11373
|
+
// own look-and-feel inputs can be pinned here without needing a separate trigger component. ──
|
|
11374
|
+
triggerVariant = input('ghost', ...(ngDevMode ? [{ debugName: "triggerVariant" }] : /* istanbul ignore next */ []));
|
|
11375
|
+
triggerSize = input('md', ...(ngDevMode ? [{ debugName: "triggerSize" }] : /* istanbul ignore next */ []));
|
|
11376
|
+
triggerIcon = input('notifications', ...(ngDevMode ? [{ debugName: "triggerIcon" }] : /* istanbul ignore next */ []));
|
|
11372
11377
|
itemClick = output();
|
|
11373
11378
|
markRead = output();
|
|
11374
11379
|
markAllRead = output();
|
|
@@ -11385,10 +11390,6 @@ class ClxNotificationComponent {
|
|
|
11385
11390
|
];
|
|
11386
11391
|
_isOpen = signal(false, ...(ngDevMode ? [{ debugName: "_isOpen" }] : /* istanbul ignore next */ []));
|
|
11387
11392
|
_filter = signal('all', ...(ngDevMode ? [{ debugName: "_filter" }] : /* istanbul ignore next */ []));
|
|
11388
|
-
_ringClass = computed(() => {
|
|
11389
|
-
const t = resolveColor(this._color());
|
|
11390
|
-
return `focus-visible:${t.ringBase}`;
|
|
11391
|
-
}, ...(ngDevMode ? [{ debugName: "_ringClass" }] : /* istanbul ignore next */ []));
|
|
11392
11393
|
_panelClass = computed(() => `w-96 bg-clx-surface shadow-xl border border-clx-border-soft overflow-hidden mt-2 flex flex-col ${resolveContainerRadius(this._style().radius)}`, ...(ngDevMode ? [{ debugName: "_panelClass" }] : /* istanbul ignore next */ []));
|
|
11393
11394
|
_unreadCount = computed(() => this.items().filter(i => !i.read).length, ...(ngDevMode ? [{ debugName: "_unreadCount" }] : /* istanbul ignore next */ []));
|
|
11394
11395
|
_readCount = computed(() => this.items().filter(i => i.read).length, ...(ngDevMode ? [{ debugName: "_readCount" }] : /* istanbul ignore next */ []));
|
|
@@ -11473,20 +11474,25 @@ class ClxNotificationComponent {
|
|
|
11473
11474
|
return new Date(iso).toLocaleTimeString('es-CO', { hour: '2-digit', minute: '2-digit' });
|
|
11474
11475
|
}
|
|
11475
11476
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11476
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxNotificationComponent, isStandalone: true, selector: "clx-notification", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, categoryTab: { classPropertyName: "categoryTab", publicName: "categoryTab", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", markRead: "markRead", markAllRead: "markAllRead", delete: "delete", deleteAllRead: "deleteAllRead" }, host: { classAttribute: "relative inline-flex items-center" }, ngImport: i0, template: `
|
|
11477
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxNotificationComponent, isStandalone: true, selector: "clx-notification", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, categoryTab: { classPropertyName: "categoryTab", publicName: "categoryTab", isSignal: true, isRequired: false, transformFunction: null }, triggerVariant: { classPropertyName: "triggerVariant", publicName: "triggerVariant", isSignal: true, isRequired: false, transformFunction: null }, triggerSize: { classPropertyName: "triggerSize", publicName: "triggerSize", isSignal: true, isRequired: false, transformFunction: null }, triggerIcon: { classPropertyName: "triggerIcon", publicName: "triggerIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", markRead: "markRead", markAllRead: "markAllRead", delete: "delete", deleteAllRead: "deleteAllRead" }, host: { classAttribute: "relative inline-flex items-center" }, ngImport: i0, template: `
|
|
11477
11478
|
<!-- Trigger -->
|
|
11478
|
-
<button
|
|
11479
|
+
<button clx-button
|
|
11479
11480
|
#origin="cdkOverlayOrigin"
|
|
11480
11481
|
cdkOverlayOrigin
|
|
11481
11482
|
type="button"
|
|
11483
|
+
[variant]="triggerVariant()"
|
|
11484
|
+
[color]="_color()"
|
|
11485
|
+
[size]="triggerSize()"
|
|
11486
|
+
shape="circle"
|
|
11487
|
+
[icon]="triggerIcon()"
|
|
11488
|
+
[iconOnly]="true"
|
|
11482
11489
|
aria-label="Notificaciones"
|
|
11483
|
-
class="relative
|
|
11484
|
-
[class]="_ringClass()"
|
|
11490
|
+
class="relative"
|
|
11485
11491
|
(click)="_toggle()">
|
|
11486
|
-
<span clx-icon name="notifications" size="sm"></span>
|
|
11487
11492
|
@if (_unreadCount() > 0) {
|
|
11488
|
-
<span clx-badge [color]="_style().unreadColor" variant="solid" size="xs" shape="circle"
|
|
11489
|
-
|
|
11493
|
+
<span clx-badge [color]="_style().unreadColor" variant="solid" size="xs" shape="circle" [positioned]="true">
|
|
11494
|
+
{{ _unreadCount() > 9 ? '9+' : _unreadCount() }}
|
|
11495
|
+
</span>
|
|
11490
11496
|
}
|
|
11491
11497
|
</button>
|
|
11492
11498
|
|
|
@@ -11507,7 +11513,7 @@ class ClxNotificationComponent {
|
|
|
11507
11513
|
<p class="text-base font-semibold text-clx-text-label">Notificaciones</p>
|
|
11508
11514
|
<div class="flex items-center gap-3">
|
|
11509
11515
|
@if (_unreadCount() > 0) {
|
|
11510
|
-
<button type="button"
|
|
11516
|
+
<button clx-button type="button" variant="ghost" [color]="_color()" size="xs"
|
|
11511
11517
|
(click)="markAllRead.emit()">
|
|
11512
11518
|
Marcar todo leído
|
|
11513
11519
|
</button>
|
|
@@ -11554,12 +11560,11 @@ class ClxNotificationComponent {
|
|
|
11554
11560
|
<p class="mt-1 text-xs text-clx-text-subtle tabular-nums">{{ _timeOf(item.createdAt) }}</p>
|
|
11555
11561
|
</div>
|
|
11556
11562
|
|
|
11557
|
-
<button type="button"
|
|
11558
|
-
|
|
11563
|
+
<button clx-button type="button" variant="ghost" color="red" shape="circle" size="xs"
|
|
11564
|
+
icon="close" [iconOnly]="true"
|
|
11565
|
+
class="opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity shrink-0"
|
|
11559
11566
|
aria-label="Eliminar notificación"
|
|
11560
|
-
(click)="$event.stopPropagation(); delete.emit(item.id)">
|
|
11561
|
-
<span clx-icon name="close" size="xs"></span>
|
|
11562
|
-
</button>
|
|
11567
|
+
(click)="$event.stopPropagation(); delete.emit(item.id)"></button>
|
|
11563
11568
|
</div>
|
|
11564
11569
|
}
|
|
11565
11570
|
}
|
|
@@ -11589,18 +11594,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
11589
11594
|
imports: [OverlayModule, ClxIconComponent, ClxBadgeComponent, ClxButtonComponent, ClxPageEmptyComponent, ClxTabsComponent],
|
|
11590
11595
|
template: `
|
|
11591
11596
|
<!-- Trigger -->
|
|
11592
|
-
<button
|
|
11597
|
+
<button clx-button
|
|
11593
11598
|
#origin="cdkOverlayOrigin"
|
|
11594
11599
|
cdkOverlayOrigin
|
|
11595
11600
|
type="button"
|
|
11601
|
+
[variant]="triggerVariant()"
|
|
11602
|
+
[color]="_color()"
|
|
11603
|
+
[size]="triggerSize()"
|
|
11604
|
+
shape="circle"
|
|
11605
|
+
[icon]="triggerIcon()"
|
|
11606
|
+
[iconOnly]="true"
|
|
11596
11607
|
aria-label="Notificaciones"
|
|
11597
|
-
class="relative
|
|
11598
|
-
[class]="_ringClass()"
|
|
11608
|
+
class="relative"
|
|
11599
11609
|
(click)="_toggle()">
|
|
11600
|
-
<span clx-icon name="notifications" size="sm"></span>
|
|
11601
11610
|
@if (_unreadCount() > 0) {
|
|
11602
|
-
<span clx-badge [color]="_style().unreadColor" variant="solid" size="xs" shape="circle"
|
|
11603
|
-
|
|
11611
|
+
<span clx-badge [color]="_style().unreadColor" variant="solid" size="xs" shape="circle" [positioned]="true">
|
|
11612
|
+
{{ _unreadCount() > 9 ? '9+' : _unreadCount() }}
|
|
11613
|
+
</span>
|
|
11604
11614
|
}
|
|
11605
11615
|
</button>
|
|
11606
11616
|
|
|
@@ -11621,7 +11631,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
11621
11631
|
<p class="text-base font-semibold text-clx-text-label">Notificaciones</p>
|
|
11622
11632
|
<div class="flex items-center gap-3">
|
|
11623
11633
|
@if (_unreadCount() > 0) {
|
|
11624
|
-
<button type="button"
|
|
11634
|
+
<button clx-button type="button" variant="ghost" [color]="_color()" size="xs"
|
|
11625
11635
|
(click)="markAllRead.emit()">
|
|
11626
11636
|
Marcar todo leído
|
|
11627
11637
|
</button>
|
|
@@ -11668,12 +11678,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
11668
11678
|
<p class="mt-1 text-xs text-clx-text-subtle tabular-nums">{{ _timeOf(item.createdAt) }}</p>
|
|
11669
11679
|
</div>
|
|
11670
11680
|
|
|
11671
|
-
<button type="button"
|
|
11672
|
-
|
|
11681
|
+
<button clx-button type="button" variant="ghost" color="red" shape="circle" size="xs"
|
|
11682
|
+
icon="close" [iconOnly]="true"
|
|
11683
|
+
class="opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity shrink-0"
|
|
11673
11684
|
aria-label="Eliminar notificación"
|
|
11674
|
-
(click)="$event.stopPropagation(); delete.emit(item.id)">
|
|
11675
|
-
<span clx-icon name="close" size="xs"></span>
|
|
11676
|
-
</button>
|
|
11685
|
+
(click)="$event.stopPropagation(); delete.emit(item.id)"></button>
|
|
11677
11686
|
</div>
|
|
11678
11687
|
}
|
|
11679
11688
|
}
|
|
@@ -11698,7 +11707,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
11698
11707
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11699
11708
|
host: { class: 'relative inline-flex items-center' },
|
|
11700
11709
|
}]
|
|
11701
|
-
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], categoryTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "categoryTab", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], markRead: [{ type: i0.Output, args: ["markRead"] }], markAllRead: [{ type: i0.Output, args: ["markAllRead"] }], delete: [{ type: i0.Output, args: ["delete"] }], deleteAllRead: [{ type: i0.Output, args: ["deleteAllRead"] }] } });
|
|
11710
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], categoryTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "categoryTab", required: false }] }], triggerVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerVariant", required: false }] }], triggerSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerSize", required: false }] }], triggerIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerIcon", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], markRead: [{ type: i0.Output, args: ["markRead"] }], markAllRead: [{ type: i0.Output, args: ["markAllRead"] }], delete: [{ type: i0.Output, args: ["delete"] }], deleteAllRead: [{ type: i0.Output, args: ["deleteAllRead"] }] } });
|
|
11702
11711
|
|
|
11703
11712
|
// ─── CDK overlay token (carries the resolved ref into the component) ──────────
|
|
11704
11713
|
const CLX_ALERT_OPTIONS = new InjectionToken('CLX_ALERT_OPTIONS');
|