@litigiovirtual/ius-design-components 2.15.0 → 2.15.1
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.
|
@@ -28379,10 +28379,10 @@ let uid = 0;
|
|
|
28379
28379
|
* `info` el descarte siempre está; en `action` solo con `dismissible`.
|
|
28380
28380
|
*
|
|
28381
28381
|
* «Ver más» / «Ver menos» (`expandable`, encendido por defecto): solo en `info` y solo si
|
|
28382
|
-
* el corte
|
|
28383
|
-
* y el título. Lo definió diseño el 11/11 por la
|
|
28384
|
-
* con el `title` nativo no se podía leer completo
|
|
28385
|
-
* `NotificationItem.jsx` de Claude Design.
|
|
28382
|
+
* el corte esconde algo, sea el mensaje (3 líneas) o el título (una línea con «…»);
|
|
28383
|
+
* desplegada, se ven completos el mensaje y el título. Lo definió diseño el 11/11 por la
|
|
28384
|
+
* devolución de QA de F6 (PBI 12352/12353): con el `title` nativo no se podía leer completo
|
|
28385
|
+
* sin mouse. Aún no está en el `NotificationItem.jsx` de Claude Design.
|
|
28386
28386
|
*/
|
|
28387
28387
|
class NotificationItemComponent {
|
|
28388
28388
|
constructor() {
|
|
@@ -28412,7 +28412,7 @@ class NotificationItemComponent {
|
|
|
28412
28412
|
...(ngDevMode ? [{ debugName: "openLabel" }] : /* istanbul ignore next */ []));
|
|
28413
28413
|
this.dismissLabel = input('Marcar como vista', /* @ts-ignore */
|
|
28414
28414
|
...(ngDevMode ? [{ debugName: "dismissLabel" }] : /* istanbul ignore next */ []));
|
|
28415
|
-
/** «Ver más» en `info` cuando el corte esconde texto. En `false` el mensaje
|
|
28415
|
+
/** «Ver más» en `info` cuando el corte esconde texto. En `false` el título y el mensaje quedan cortados. */
|
|
28416
28416
|
this.expandable = input(true, /* @ts-ignore */
|
|
28417
28417
|
...(ngDevMode ? [{ debugName: "expandable" }] : /* istanbul ignore next */ []));
|
|
28418
28418
|
/**
|
|
@@ -28448,12 +28448,17 @@ class NotificationItemComponent {
|
|
|
28448
28448
|
this.hostEl = inject(ElementRef).nativeElement;
|
|
28449
28449
|
this.msgRef = viewChild('msg', /* @ts-ignore */
|
|
28450
28450
|
...(ngDevMode ? [{ debugName: "msgRef" }] : /* istanbul ignore next */ []));
|
|
28451
|
-
this.
|
|
28451
|
+
this.titleRef = viewChild('ttl', /* @ts-ignore */
|
|
28452
|
+
...(ngDevMode ? [{ debugName: "titleRef" }] : /* istanbul ignore next */ []));
|
|
28453
|
+
/** Lo que despliega «Ver más»: el cuerpo, con el título y el mensaje. */
|
|
28454
|
+
this.bodyId = `ius-notif-body-${uid++}`;
|
|
28452
28455
|
/** `undefined` = aún sin pulsar → manda `defaultExpanded`. */
|
|
28453
28456
|
this.picked = signal(undefined, /* @ts-ignore */
|
|
28454
28457
|
...(ngDevMode ? [{ debugName: "picked" }] : /* istanbul ignore next */ []));
|
|
28455
|
-
/**
|
|
28456
|
-
this.
|
|
28458
|
+
/** Qué esconde el corte. Un título o un mensaje nuevo vuelve a medirse desde contraído. */
|
|
28459
|
+
this.cut = linkedSignal({ ...(ngDevMode ? { debugName: "cut" } : /* istanbul ignore next */ {}), source: () => `${this.title()}\n${this.message() ?? ''}`,
|
|
28460
|
+
computation: () => ({ title: false, message: false }),
|
|
28461
|
+
equal: (a, b) => a.title === b.title && a.message === b.message });
|
|
28457
28462
|
this.isAction = computed(() => this.kind() === 'action', /* @ts-ignore */
|
|
28458
28463
|
...(ngDevMode ? [{ debugName: "isAction" }] : /* istanbul ignore next */ []));
|
|
28459
28464
|
this.isLeaving = computed(() => this.leaving() || this.exiting(), /* @ts-ignore */
|
|
@@ -28464,7 +28469,7 @@ class NotificationItemComponent {
|
|
|
28464
28469
|
...(ngDevMode ? [{ debugName: "isExpanded" }] : /* istanbul ignore next */ []));
|
|
28465
28470
|
this.measurable = computed(() => !this.isAction() && this.expandable(), /* @ts-ignore */
|
|
28466
28471
|
...(ngDevMode ? [{ debugName: "measurable" }] : /* istanbul ignore next */ []));
|
|
28467
|
-
this.canExpand = computed(() => this.measurable() && this.
|
|
28472
|
+
this.canExpand = computed(() => this.measurable() && (this.cut().title || this.cut().message), /* @ts-ignore */
|
|
28468
28473
|
...(ngDevMode ? [{ debugName: "canExpand" }] : /* istanbul ignore next */ []));
|
|
28469
28474
|
this.showFull = computed(() => this.canExpand() && this.isExpanded(), /* @ts-ignore */
|
|
28470
28475
|
...(ngDevMode ? [{ debugName: "showFull" }] : /* istanbul ignore next */ []));
|
|
@@ -28472,7 +28477,7 @@ class NotificationItemComponent {
|
|
|
28472
28477
|
this.msgTitle = computed(() => {
|
|
28473
28478
|
if (!this.measurable())
|
|
28474
28479
|
return this.message();
|
|
28475
|
-
return this.
|
|
28480
|
+
return this.cut().message && !this.showFull() ? this.message() : null;
|
|
28476
28481
|
}, /* @ts-ignore */
|
|
28477
28482
|
...(ngDevMode ? [{ debugName: "msgTitle" }] : /* istanbul ignore next */ []));
|
|
28478
28483
|
this.label = computed(() => [
|
|
@@ -28501,23 +28506,24 @@ class NotificationItemComponent {
|
|
|
28501
28506
|
onCleanup(() => clearTimeout(t));
|
|
28502
28507
|
});
|
|
28503
28508
|
inject(DestroyRef).onDestroy(() => clearTimeout(this.timer));
|
|
28504
|
-
// Fase `read`: el párrafo ya
|
|
28505
|
-
// `showFull` porque un texto nuevo
|
|
28506
|
-
// y el observer no avisa.
|
|
28509
|
+
// Fase `read`: el título y el párrafo ya tienen el texto y el corte nuevos. Se leen
|
|
28510
|
+
// `title`, `message` y `showFull` porque un texto nuevo del mismo tamaño visible no
|
|
28511
|
+
// cambia las cajas y el observer no avisa.
|
|
28507
28512
|
afterRenderEffect({
|
|
28508
28513
|
read: () => {
|
|
28514
|
+
this.title();
|
|
28509
28515
|
this.message();
|
|
28510
28516
|
this.showFull();
|
|
28511
28517
|
this.measure();
|
|
28512
28518
|
},
|
|
28513
28519
|
});
|
|
28514
|
-
// Cambiar el ancho, o desplegar y contraer, cambia el tamaño del párrafo.
|
|
28520
|
+
// Cambiar el ancho, o desplegar y contraer, cambia el tamaño del título y del párrafo.
|
|
28515
28521
|
effect(onCleanup => {
|
|
28516
|
-
const
|
|
28517
|
-
if (!
|
|
28522
|
+
const els = [this.titleRef()?.nativeElement, this.msgRef()?.nativeElement].filter((el) => !!el);
|
|
28523
|
+
if (!els.length || !this.measurable() || typeof ResizeObserver === 'undefined')
|
|
28518
28524
|
return;
|
|
28519
28525
|
const ro = new ResizeObserver(() => this.measure());
|
|
28520
|
-
ro.observe(el);
|
|
28526
|
+
els.forEach(el => ro.observe(el));
|
|
28521
28527
|
onCleanup(() => ro.disconnect());
|
|
28522
28528
|
});
|
|
28523
28529
|
}
|
|
@@ -28545,18 +28551,23 @@ class NotificationItemComponent {
|
|
|
28545
28551
|
event.stopPropagation();
|
|
28546
28552
|
}
|
|
28547
28553
|
/**
|
|
28548
|
-
* Solo el párrafo con el corte puesto
|
|
28549
|
-
*
|
|
28550
|
-
*
|
|
28554
|
+
* Solo el título y el párrafo con el corte puesto dicen si el texto cabe: el título en su
|
|
28555
|
+
* línea (ancho) y el párrafo en sus líneas (alto). Se mira el DOM y no la señal porque la
|
|
28556
|
+
* medición puede correr antes de que la vista aplique el cambio; desplegada se conserva lo
|
|
28557
|
+
* medido para seguir ofreciendo «Ver menos».
|
|
28551
28558
|
*/
|
|
28552
28559
|
measure() {
|
|
28553
|
-
|
|
28554
|
-
if (!el || !this.measurable() || this.hostEl.hasAttribute('data-expanded'))
|
|
28560
|
+
if (!this.measurable() || this.hostEl.hasAttribute('data-expanded'))
|
|
28555
28561
|
return;
|
|
28556
|
-
this.
|
|
28562
|
+
const ttl = this.titleRef()?.nativeElement;
|
|
28563
|
+
const msg = this.msgRef()?.nativeElement;
|
|
28564
|
+
this.cut.set({
|
|
28565
|
+
title: !!ttl && ttl.scrollWidth > ttl.clientWidth,
|
|
28566
|
+
message: !!msg && msg.scrollHeight > msg.clientHeight,
|
|
28567
|
+
});
|
|
28557
28568
|
}
|
|
28558
28569
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: NotificationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
28559
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: NotificationItemComponent, isStandalone: true, selector: "ius-notification-item", inputs: { kind: { classPropertyName: "kind", publicName: "kind", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, module: { classPropertyName: "module", publicName: "module", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, time: { classPropertyName: "time", publicName: "time", isSignal: true, isRequired: false, transformFunction: null }, unread: { classPropertyName: "unread", publicName: "unread", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, openLabel: { classPropertyName: "openLabel", publicName: "openLabel", isSignal: true, isRequired: false, transformFunction: null }, dismissLabel: { classPropertyName: "dismissLabel", publicName: "dismissLabel", isSignal: true, isRequired: false, transformFunction: null }, expandable: { classPropertyName: "expandable", publicName: "expandable", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, defaultExpanded: { classPropertyName: "defaultExpanded", publicName: "defaultExpanded", isSignal: true, isRequired: false, transformFunction: null }, moreLabel: { classPropertyName: "moreLabel", publicName: "moreLabel", isSignal: true, isRequired: false, transformFunction: null }, lessLabel: { classPropertyName: "lessLabel", publicName: "lessLabel", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, leaving: { classPropertyName: "leaving", publicName: "leaving", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", dismissed: "dismissed", actionClick: "actionClick", exited: "exited", expandedChange: "expandedChange" }, host: { properties: { "attr.data-kind": "kind()", "attr.data-unread": "unread() ? 'true' : null", "attr.data-leaving": "isLeaving() ? 'true' : null", "attr.data-expanded": "showFull() ? 'true' : null" }, classAttribute: "ius-notif" }, viewQueries: [{ propertyName: "msgRef", first: true, predicate: ["msg"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ius-notif__inner\">\r\n @if (isAction()) {\r\n <ius-card\r\n variant=\"outlined\"\r\n padding=\"sm\"\r\n radius=\"md\"\r\n interactive\r\n [ariaLabel]=\"label()\"\r\n (clicked)=\"open()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"row\" />\r\n </ius-card>\r\n } @else {\r\n <article ius-card variant=\"outlined\" padding=\"sm\" radius=\"md\" [ariaLabel]=\"label()\">\r\n <ng-container *ngTemplateOutlet=\"row\" />\r\n </article>\r\n }\r\n</div>\r\n\r\n<ng-template #row>\r\n <div class=\"ius-notif__row\">\r\n <span class=\"ius-notif__mark\">\r\n @if (unread()) {\r\n <ius-insignia variant=\"dot\" tone=\"primary\" size=\"small\" />\r\n }\r\n </span>\r\n <span class=\"ius-notif__glyph\" aria-hidden=\"true\">\r\n <span translate=\"no\" class=\"ius-icon\">{{ icon() }}</span>\r\n </span>\r\n <div class=\"ius-notif__body\">\r\n <div class=\"ius-notif__head\">\r\n <span class=\"ius-notif__title\" [attr.title]=\"showFull() ? null : title() || null\">{{ title() }}</span>\r\n @if (time() != null) {\r\n <span class=\"ius-notif__time\">{{ time() }}</span>\r\n }\r\n </div>\r\n @if (message()) {\r\n <p #msg class=\"ius-notif__msg\" [id]=\"msgId\" [attr.title]=\"msgTitle()\">{{ message() }}</p>\r\n @if (canExpand()) {\r\n <span class=\"ius-notif__more\" (click)=\"stop($event)\">\r\n <ius-text-button\r\n size=\"small\"\r\n [label]=\"showFull() ? lessLabel() : moreLabel()\"\r\n [ariaExpanded]=\"showFull()\"\r\n [ariaControls]=\"msgId\"\r\n [disabled]=\"isLeaving()\"\r\n (clicked)=\"toggleExpanded()\"\r\n />\r\n </span>\r\n }\r\n }\r\n @if (ordered().length || isAction()) {\r\n <div class=\"ius-notif__actions\" (click)=\"stop($event)\">\r\n @for (a of ordered(); track a.key; let i = $index) {\r\n @if (hasPrimary() && i === 0) {\r\n <ius-button\r\n variant=\"primary\"\r\n size=\"small\"\r\n [label]=\"a.label\"\r\n [disabled]=\"!!a.disabled || isLeaving()\"\r\n (clicked)=\"actionClick.emit(a.key)\"\r\n />\r\n } @else {\r\n <ius-text-button\r\n size=\"small\"\r\n [label]=\"a.label\"\r\n [disabled]=\"!!a.disabled || isLeaving()\"\r\n (clicked)=\"actionClick.emit(a.key)\"\r\n />\r\n }\r\n }\r\n @if (isAction()) {\r\n <span class=\"ius-notif__open\">\r\n <ius-text-button\r\n size=\"small\"\r\n sufixIcon=\"chevron_right\"\r\n [label]=\"openLabel()\"\r\n [disabled]=\"isLeaving()\"\r\n (clicked)=\"open()\"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n </div>\r\n @if (showDismiss()) {\r\n <span class=\"ius-notif__end\" (click)=\"stop($event)\">\r\n <ius-icon-button\r\n icon=\"done_all\"\r\n variant=\"tertiary\"\r\n size=\"small\"\r\n shape=\"circle\"\r\n tooltipPlacement=\"left\"\r\n [tooltip]=\"dismissLabel()\"\r\n [ariaLabel]=\"dismissLabel() + ': ' + title()\"\r\n (clicked)=\"dismiss()\"\r\n />\r\n </span>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:grid;grid-template-rows:1fr;box-sizing:border-box;width:100%;font-family:var(--ius-font-body);text-align:left;opacity:1;-webkit-user-select:none;user-select:none;transition:grid-template-rows var(--ius-duration-base) var(--ius-ease-standard),opacity var(--ius-duration-base) var(--ius-ease-standard),margin var(--ius-duration-base) var(--ius-ease-standard)}:host-context(.ius-notif + .ius-notif){margin-top:var(--ius-space-xs)}:host([data-leaving=true]){grid-template-rows:0fr;opacity:0;pointer-events:none}:host(.ius-notif[data-leaving=true]){margin-top:0}:host([data-leaving=true]) .ius-notif__inner{overflow:hidden}@media(prefers-reduced-motion:reduce){:host{transition:none}}.ius-notif__inner{min-height:0}.ius-notif__row{display:grid;grid-template-columns:var(--ius-space-xs) var(--ius-icon-sm) minmax(0,1fr) auto;column-gap:var(--ius-space-xs);align-items:start}.ius-notif__mark{display:flex;justify-content:center;align-items:center;height:var(--ius-lh-base)}.ius-notif__glyph{display:flex;align-items:center;height:var(--ius-lh-base);color:var(--ius-text-tertiary)}.ius-notif__glyph .ius-icon{font-size:var(--ius-icon-sm);line-height:1}.ius-notif__body{min-width:0;display:flex;flex-direction:column;gap:var(--ius-space-xxs)}.ius-notif__head{display:flex;align-items:baseline;gap:var(--ius-space-xs);min-width:0}.ius-notif__title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ius-fs-base);line-height:var(--ius-lh-base);font-weight:var(--ius-fw-regular);color:var(--ius-text-primary)}:host([data-unread=true]) .ius-notif__title{font-weight:var(--ius-fw-semibold)}.ius-notif__time{flex:0 0 auto;font-size:var(--ius-fs-sm);line-height:var(--ius-lh-sm);color:var(--ius-text-tertiary);white-space:nowrap;font-variant-numeric:tabular-nums}.ius-notif__msg{margin:0;font-size:var(--ius-fs-sm);line-height:var(--ius-lh-sm);color:var(--ius-text-secondary);overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow-wrap:anywhere;-webkit-user-select:text;user-select:text}:host([data-kind=action]) .ius-notif__msg{-webkit-line-clamp:2;line-clamp:2}:host([data-expanded=true]) .ius-notif__title{white-space:normal;overflow-wrap:anywhere}:host([data-expanded=true]) .ius-notif__msg{display:block;-webkit-line-clamp:none;line-clamp:none}.ius-notif__more{display:inline-flex;align-self:flex-start}.ius-notif__actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ius-space-sm) var(--ius-space-md);padding-top:var(--ius-space-xs)}.ius-notif__open{margin-left:auto}.ius-notif__end{display:inline-flex;align-items:center;align-self:start}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "ius-button", inputs: ["variant", "label", "prefixIcon", "sufixIcon", "dynamic", "loading", "status", "disabled", "pressed", "fullWidth", "type", "ariaLabel", "ariaCurrent", "action", "size"], outputs: ["clicked"] }, { kind: "component", type: CardComponent, selector: "ius-card, a[ius-card], button[ius-card], section[ius-card], article[ius-card]", inputs: ["variant", "padding", "radius", "interactive", "selected", "ariaLabel"], outputs: ["clicked"] }, { kind: "component", type: IconButtonComponent, selector: "ius-icon-button", inputs: ["icon", "variant", "size", "shape", "disabled", "type", "ariaLabel", "tooltip", "ariaPressed", "ariaExpanded", "ariaControls", "ariaHaspopup", "tooltipPlacement"], outputs: ["clicked"] }, { kind: "component", type: InsigniaComponent, selector: "ius-insignia", inputs: ["variant", "tone", "size", "label", "count", "max", "ring", "ariaLabel"] }, { kind: "component", type: TextButtonComponent, selector: "ius-text-button", inputs: ["label", "prefixIcon", "sufixIcon", "size", "disabled", "type", "ariaExpanded", "ariaControls"], outputs: ["clicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
28570
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: NotificationItemComponent, isStandalone: true, selector: "ius-notification-item", inputs: { kind: { classPropertyName: "kind", publicName: "kind", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, module: { classPropertyName: "module", publicName: "module", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, time: { classPropertyName: "time", publicName: "time", isSignal: true, isRequired: false, transformFunction: null }, unread: { classPropertyName: "unread", publicName: "unread", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, openLabel: { classPropertyName: "openLabel", publicName: "openLabel", isSignal: true, isRequired: false, transformFunction: null }, dismissLabel: { classPropertyName: "dismissLabel", publicName: "dismissLabel", isSignal: true, isRequired: false, transformFunction: null }, expandable: { classPropertyName: "expandable", publicName: "expandable", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, defaultExpanded: { classPropertyName: "defaultExpanded", publicName: "defaultExpanded", isSignal: true, isRequired: false, transformFunction: null }, moreLabel: { classPropertyName: "moreLabel", publicName: "moreLabel", isSignal: true, isRequired: false, transformFunction: null }, lessLabel: { classPropertyName: "lessLabel", publicName: "lessLabel", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, leaving: { classPropertyName: "leaving", publicName: "leaving", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", dismissed: "dismissed", actionClick: "actionClick", exited: "exited", expandedChange: "expandedChange" }, host: { properties: { "attr.data-kind": "kind()", "attr.data-unread": "unread() ? 'true' : null", "attr.data-leaving": "isLeaving() ? 'true' : null", "attr.data-expanded": "showFull() ? 'true' : null" }, classAttribute: "ius-notif" }, viewQueries: [{ propertyName: "msgRef", first: true, predicate: ["msg"], descendants: true, isSignal: true }, { propertyName: "titleRef", first: true, predicate: ["ttl"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ius-notif__inner\">\r\n @if (isAction()) {\r\n <ius-card\r\n variant=\"outlined\"\r\n padding=\"sm\"\r\n radius=\"md\"\r\n interactive\r\n [ariaLabel]=\"label()\"\r\n (clicked)=\"open()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"row\" />\r\n </ius-card>\r\n } @else {\r\n <article ius-card variant=\"outlined\" padding=\"sm\" radius=\"md\" [ariaLabel]=\"label()\">\r\n <ng-container *ngTemplateOutlet=\"row\" />\r\n </article>\r\n }\r\n</div>\r\n\r\n<ng-template #row>\r\n <div class=\"ius-notif__row\">\r\n <span class=\"ius-notif__mark\">\r\n @if (unread()) {\r\n <ius-insignia variant=\"dot\" tone=\"primary\" size=\"small\" />\r\n }\r\n </span>\r\n <span class=\"ius-notif__glyph\" aria-hidden=\"true\">\r\n <span translate=\"no\" class=\"ius-icon\">{{ icon() }}</span>\r\n </span>\r\n <div class=\"ius-notif__body\" [id]=\"bodyId\">\r\n <div class=\"ius-notif__head\">\r\n <span #ttl class=\"ius-notif__title\" [attr.title]=\"showFull() ? null : title() || null\">{{ title() }}</span>\r\n @if (time() != null) {\r\n <span class=\"ius-notif__time\">{{ time() }}</span>\r\n }\r\n </div>\r\n @if (message()) {\r\n <p #msg class=\"ius-notif__msg\" [attr.title]=\"msgTitle()\">{{ message() }}</p>\r\n }\r\n @if (canExpand()) {\r\n <span class=\"ius-notif__more\" (click)=\"stop($event)\">\r\n <ius-text-button\r\n size=\"small\"\r\n [label]=\"showFull() ? lessLabel() : moreLabel()\"\r\n [ariaExpanded]=\"showFull()\"\r\n [ariaControls]=\"bodyId\"\r\n [disabled]=\"isLeaving()\"\r\n (clicked)=\"toggleExpanded()\"\r\n />\r\n </span>\r\n }\r\n @if (ordered().length || isAction()) {\r\n <div class=\"ius-notif__actions\" (click)=\"stop($event)\">\r\n @for (a of ordered(); track a.key; let i = $index) {\r\n @if (hasPrimary() && i === 0) {\r\n <ius-button\r\n variant=\"primary\"\r\n size=\"small\"\r\n [label]=\"a.label\"\r\n [disabled]=\"!!a.disabled || isLeaving()\"\r\n (clicked)=\"actionClick.emit(a.key)\"\r\n />\r\n } @else {\r\n <ius-text-button\r\n size=\"small\"\r\n [label]=\"a.label\"\r\n [disabled]=\"!!a.disabled || isLeaving()\"\r\n (clicked)=\"actionClick.emit(a.key)\"\r\n />\r\n }\r\n }\r\n @if (isAction()) {\r\n <span class=\"ius-notif__open\">\r\n <ius-text-button\r\n size=\"small\"\r\n sufixIcon=\"chevron_right\"\r\n [label]=\"openLabel()\"\r\n [disabled]=\"isLeaving()\"\r\n (clicked)=\"open()\"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n </div>\r\n @if (showDismiss()) {\r\n <span class=\"ius-notif__end\" (click)=\"stop($event)\">\r\n <ius-icon-button\r\n icon=\"done_all\"\r\n variant=\"tertiary\"\r\n size=\"small\"\r\n shape=\"circle\"\r\n tooltipPlacement=\"left\"\r\n [tooltip]=\"dismissLabel()\"\r\n [ariaLabel]=\"dismissLabel() + ': ' + title()\"\r\n (clicked)=\"dismiss()\"\r\n />\r\n </span>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:grid;grid-template-rows:1fr;box-sizing:border-box;width:100%;font-family:var(--ius-font-body);text-align:left;opacity:1;-webkit-user-select:none;user-select:none;transition:grid-template-rows var(--ius-duration-base) var(--ius-ease-standard),opacity var(--ius-duration-base) var(--ius-ease-standard),margin var(--ius-duration-base) var(--ius-ease-standard)}:host-context(.ius-notif + .ius-notif){margin-top:var(--ius-space-xs)}:host([data-leaving=true]){grid-template-rows:0fr;opacity:0;pointer-events:none}:host(.ius-notif[data-leaving=true]){margin-top:0}:host([data-leaving=true]) .ius-notif__inner{overflow:hidden}@media(prefers-reduced-motion:reduce){:host{transition:none}}.ius-notif__inner{min-height:0}.ius-notif__row{display:grid;grid-template-columns:var(--ius-space-xs) var(--ius-icon-sm) minmax(0,1fr) auto;column-gap:var(--ius-space-xs);align-items:start}.ius-notif__mark{display:flex;justify-content:center;align-items:center;height:var(--ius-lh-base)}.ius-notif__glyph{display:flex;align-items:center;height:var(--ius-lh-base);color:var(--ius-text-tertiary)}.ius-notif__glyph .ius-icon{font-size:var(--ius-icon-sm);line-height:1}.ius-notif__body{min-width:0;display:flex;flex-direction:column;gap:var(--ius-space-xxs)}.ius-notif__head{display:flex;align-items:baseline;gap:var(--ius-space-xs);min-width:0}.ius-notif__title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ius-fs-base);line-height:var(--ius-lh-base);font-weight:var(--ius-fw-regular);color:var(--ius-text-primary)}:host([data-unread=true]) .ius-notif__title{font-weight:var(--ius-fw-semibold)}.ius-notif__time{flex:0 0 auto;font-size:var(--ius-fs-sm);line-height:var(--ius-lh-sm);color:var(--ius-text-tertiary);white-space:nowrap;font-variant-numeric:tabular-nums}.ius-notif__msg{margin:0;font-size:var(--ius-fs-sm);line-height:var(--ius-lh-sm);color:var(--ius-text-secondary);overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow-wrap:anywhere;-webkit-user-select:text;user-select:text}:host([data-kind=action]) .ius-notif__msg{-webkit-line-clamp:2;line-clamp:2}:host([data-expanded=true]) .ius-notif__title{white-space:normal;overflow-wrap:anywhere}:host([data-expanded=true]) .ius-notif__msg{display:block;-webkit-line-clamp:none;line-clamp:none}.ius-notif__more{display:inline-flex;align-self:flex-start}.ius-notif__actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ius-space-sm) var(--ius-space-md);padding-top:var(--ius-space-xs)}.ius-notif__open{margin-left:auto}.ius-notif__end{display:inline-flex;align-items:center;align-self:start}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "ius-button", inputs: ["variant", "label", "prefixIcon", "sufixIcon", "dynamic", "loading", "status", "disabled", "pressed", "fullWidth", "type", "ariaLabel", "ariaCurrent", "action", "size"], outputs: ["clicked"] }, { kind: "component", type: CardComponent, selector: "ius-card, a[ius-card], button[ius-card], section[ius-card], article[ius-card]", inputs: ["variant", "padding", "radius", "interactive", "selected", "ariaLabel"], outputs: ["clicked"] }, { kind: "component", type: IconButtonComponent, selector: "ius-icon-button", inputs: ["icon", "variant", "size", "shape", "disabled", "type", "ariaLabel", "tooltip", "ariaPressed", "ariaExpanded", "ariaControls", "ariaHaspopup", "tooltipPlacement"], outputs: ["clicked"] }, { kind: "component", type: InsigniaComponent, selector: "ius-insignia", inputs: ["variant", "tone", "size", "label", "count", "max", "ring", "ariaLabel"] }, { kind: "component", type: TextButtonComponent, selector: "ius-text-button", inputs: ["label", "prefixIcon", "sufixIcon", "size", "disabled", "type", "ariaExpanded", "ariaControls"], outputs: ["clicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
28560
28571
|
}
|
|
28561
28572
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: NotificationItemComponent, decorators: [{
|
|
28562
28573
|
type: Component,
|
|
@@ -28573,8 +28584,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
28573
28584
|
'[attr.data-unread]': "unread() ? 'true' : null",
|
|
28574
28585
|
'[attr.data-leaving]': "isLeaving() ? 'true' : null",
|
|
28575
28586
|
'[attr.data-expanded]': "showFull() ? 'true' : null",
|
|
28576
|
-
}, template: "<div class=\"ius-notif__inner\">\r\n @if (isAction()) {\r\n <ius-card\r\n variant=\"outlined\"\r\n padding=\"sm\"\r\n radius=\"md\"\r\n interactive\r\n [ariaLabel]=\"label()\"\r\n (clicked)=\"open()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"row\" />\r\n </ius-card>\r\n } @else {\r\n <article ius-card variant=\"outlined\" padding=\"sm\" radius=\"md\" [ariaLabel]=\"label()\">\r\n <ng-container *ngTemplateOutlet=\"row\" />\r\n </article>\r\n }\r\n</div>\r\n\r\n<ng-template #row>\r\n <div class=\"ius-notif__row\">\r\n <span class=\"ius-notif__mark\">\r\n @if (unread()) {\r\n <ius-insignia variant=\"dot\" tone=\"primary\" size=\"small\" />\r\n }\r\n </span>\r\n <span class=\"ius-notif__glyph\" aria-hidden=\"true\">\r\n <span translate=\"no\" class=\"ius-icon\">{{ icon() }}</span>\r\n </span>\r\n <div class=\"ius-notif__body\">\r\n <div class=\"ius-notif__head\">\r\n <span class=\"ius-notif__title\" [attr.title]=\"showFull() ? null : title() || null\">{{ title() }}</span>\r\n @if (time() != null) {\r\n <span class=\"ius-notif__time\">{{ time() }}</span>\r\n }\r\n </div>\r\n @if (message()) {\r\n <p #msg class=\"ius-notif__msg\" [
|
|
28577
|
-
}], ctorParameters: () => [], propDecorators: { kind: [{ type: i0.Input, args: [{ isSignal: true, alias: "kind", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], module: [{ type: i0.Input, args: [{ isSignal: true, alias: "module", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], time: [{ type: i0.Input, args: [{ isSignal: true, alias: "time", required: false }] }], unread: [{ type: i0.Input, args: [{ isSignal: true, alias: "unread", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], openLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "openLabel", required: false }] }], dismissLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissLabel", required: false }] }], expandable: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandable", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], defaultExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultExpanded", required: false }] }], moreLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "moreLabel", required: false }] }], lessLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "lessLabel", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], leaving: [{ type: i0.Input, args: [{ isSignal: true, alias: "leaving", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }], exited: [{ type: i0.Output, args: ["exited"] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }], msgRef: [{ type: i0.ViewChild, args: ['msg', { isSignal: true }] }] } });
|
|
28587
|
+
}, template: "<div class=\"ius-notif__inner\">\r\n @if (isAction()) {\r\n <ius-card\r\n variant=\"outlined\"\r\n padding=\"sm\"\r\n radius=\"md\"\r\n interactive\r\n [ariaLabel]=\"label()\"\r\n (clicked)=\"open()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"row\" />\r\n </ius-card>\r\n } @else {\r\n <article ius-card variant=\"outlined\" padding=\"sm\" radius=\"md\" [ariaLabel]=\"label()\">\r\n <ng-container *ngTemplateOutlet=\"row\" />\r\n </article>\r\n }\r\n</div>\r\n\r\n<ng-template #row>\r\n <div class=\"ius-notif__row\">\r\n <span class=\"ius-notif__mark\">\r\n @if (unread()) {\r\n <ius-insignia variant=\"dot\" tone=\"primary\" size=\"small\" />\r\n }\r\n </span>\r\n <span class=\"ius-notif__glyph\" aria-hidden=\"true\">\r\n <span translate=\"no\" class=\"ius-icon\">{{ icon() }}</span>\r\n </span>\r\n <div class=\"ius-notif__body\" [id]=\"bodyId\">\r\n <div class=\"ius-notif__head\">\r\n <span #ttl class=\"ius-notif__title\" [attr.title]=\"showFull() ? null : title() || null\">{{ title() }}</span>\r\n @if (time() != null) {\r\n <span class=\"ius-notif__time\">{{ time() }}</span>\r\n }\r\n </div>\r\n @if (message()) {\r\n <p #msg class=\"ius-notif__msg\" [attr.title]=\"msgTitle()\">{{ message() }}</p>\r\n }\r\n @if (canExpand()) {\r\n <span class=\"ius-notif__more\" (click)=\"stop($event)\">\r\n <ius-text-button\r\n size=\"small\"\r\n [label]=\"showFull() ? lessLabel() : moreLabel()\"\r\n [ariaExpanded]=\"showFull()\"\r\n [ariaControls]=\"bodyId\"\r\n [disabled]=\"isLeaving()\"\r\n (clicked)=\"toggleExpanded()\"\r\n />\r\n </span>\r\n }\r\n @if (ordered().length || isAction()) {\r\n <div class=\"ius-notif__actions\" (click)=\"stop($event)\">\r\n @for (a of ordered(); track a.key; let i = $index) {\r\n @if (hasPrimary() && i === 0) {\r\n <ius-button\r\n variant=\"primary\"\r\n size=\"small\"\r\n [label]=\"a.label\"\r\n [disabled]=\"!!a.disabled || isLeaving()\"\r\n (clicked)=\"actionClick.emit(a.key)\"\r\n />\r\n } @else {\r\n <ius-text-button\r\n size=\"small\"\r\n [label]=\"a.label\"\r\n [disabled]=\"!!a.disabled || isLeaving()\"\r\n (clicked)=\"actionClick.emit(a.key)\"\r\n />\r\n }\r\n }\r\n @if (isAction()) {\r\n <span class=\"ius-notif__open\">\r\n <ius-text-button\r\n size=\"small\"\r\n sufixIcon=\"chevron_right\"\r\n [label]=\"openLabel()\"\r\n [disabled]=\"isLeaving()\"\r\n (clicked)=\"open()\"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n </div>\r\n @if (showDismiss()) {\r\n <span class=\"ius-notif__end\" (click)=\"stop($event)\">\r\n <ius-icon-button\r\n icon=\"done_all\"\r\n variant=\"tertiary\"\r\n size=\"small\"\r\n shape=\"circle\"\r\n tooltipPlacement=\"left\"\r\n [tooltip]=\"dismissLabel()\"\r\n [ariaLabel]=\"dismissLabel() + ': ' + title()\"\r\n (clicked)=\"dismiss()\"\r\n />\r\n </span>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:grid;grid-template-rows:1fr;box-sizing:border-box;width:100%;font-family:var(--ius-font-body);text-align:left;opacity:1;-webkit-user-select:none;user-select:none;transition:grid-template-rows var(--ius-duration-base) var(--ius-ease-standard),opacity var(--ius-duration-base) var(--ius-ease-standard),margin var(--ius-duration-base) var(--ius-ease-standard)}:host-context(.ius-notif + .ius-notif){margin-top:var(--ius-space-xs)}:host([data-leaving=true]){grid-template-rows:0fr;opacity:0;pointer-events:none}:host(.ius-notif[data-leaving=true]){margin-top:0}:host([data-leaving=true]) .ius-notif__inner{overflow:hidden}@media(prefers-reduced-motion:reduce){:host{transition:none}}.ius-notif__inner{min-height:0}.ius-notif__row{display:grid;grid-template-columns:var(--ius-space-xs) var(--ius-icon-sm) minmax(0,1fr) auto;column-gap:var(--ius-space-xs);align-items:start}.ius-notif__mark{display:flex;justify-content:center;align-items:center;height:var(--ius-lh-base)}.ius-notif__glyph{display:flex;align-items:center;height:var(--ius-lh-base);color:var(--ius-text-tertiary)}.ius-notif__glyph .ius-icon{font-size:var(--ius-icon-sm);line-height:1}.ius-notif__body{min-width:0;display:flex;flex-direction:column;gap:var(--ius-space-xxs)}.ius-notif__head{display:flex;align-items:baseline;gap:var(--ius-space-xs);min-width:0}.ius-notif__title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ius-fs-base);line-height:var(--ius-lh-base);font-weight:var(--ius-fw-regular);color:var(--ius-text-primary)}:host([data-unread=true]) .ius-notif__title{font-weight:var(--ius-fw-semibold)}.ius-notif__time{flex:0 0 auto;font-size:var(--ius-fs-sm);line-height:var(--ius-lh-sm);color:var(--ius-text-tertiary);white-space:nowrap;font-variant-numeric:tabular-nums}.ius-notif__msg{margin:0;font-size:var(--ius-fs-sm);line-height:var(--ius-lh-sm);color:var(--ius-text-secondary);overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow-wrap:anywhere;-webkit-user-select:text;user-select:text}:host([data-kind=action]) .ius-notif__msg{-webkit-line-clamp:2;line-clamp:2}:host([data-expanded=true]) .ius-notif__title{white-space:normal;overflow-wrap:anywhere}:host([data-expanded=true]) .ius-notif__msg{display:block;-webkit-line-clamp:none;line-clamp:none}.ius-notif__more{display:inline-flex;align-self:flex-start}.ius-notif__actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ius-space-sm) var(--ius-space-md);padding-top:var(--ius-space-xs)}.ius-notif__open{margin-left:auto}.ius-notif__end{display:inline-flex;align-items:center;align-self:start}\n"] }]
|
|
28588
|
+
}], ctorParameters: () => [], propDecorators: { kind: [{ type: i0.Input, args: [{ isSignal: true, alias: "kind", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], module: [{ type: i0.Input, args: [{ isSignal: true, alias: "module", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], time: [{ type: i0.Input, args: [{ isSignal: true, alias: "time", required: false }] }], unread: [{ type: i0.Input, args: [{ isSignal: true, alias: "unread", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], openLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "openLabel", required: false }] }], dismissLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissLabel", required: false }] }], expandable: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandable", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], defaultExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultExpanded", required: false }] }], moreLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "moreLabel", required: false }] }], lessLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "lessLabel", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], leaving: [{ type: i0.Input, args: [{ isSignal: true, alias: "leaving", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }], exited: [{ type: i0.Output, args: ["exited"] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }], msgRef: [{ type: i0.ViewChild, args: ['msg', { isSignal: true }] }], titleRef: [{ type: i0.ViewChild, args: ['ttl', { isSignal: true }] }] } });
|
|
28578
28589
|
|
|
28579
28590
|
/**
|
|
28580
28591
|
* IconToggle — Ius Design v2 (familia inputs).
|