@litigiovirtual/ius-design-components 2.1.14 → 2.1.15
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, signal, booleanAttribute, Output, Input, ChangeDetectionStrategy, Component, inject, NgZone, ElementRef, numberAttribute, ViewChild, ViewContainerRef, forwardRef, computed, viewChildren, input, output, effect, DestroyRef, Directive, contentChild, isDevMode, TemplateRef, ContentChild, linkedSignal, PLATFORM_ID, viewChild, HostListener, afterRenderEffect, Injectable } from '@angular/core';
|
|
2
|
+
import { EventEmitter, signal, booleanAttribute, Output, Input, ChangeDetectionStrategy, Component, inject, NgZone, ElementRef, numberAttribute, ViewChild, ViewContainerRef, forwardRef, computed, viewChildren, input, output, effect, DestroyRef, Directive, contentChild, isDevMode, TemplateRef, ContentChild, linkedSignal, PLATFORM_ID, viewChild, HostListener, afterRenderEffect, Injectable, untracked } from '@angular/core';
|
|
3
3
|
import { Overlay } from '@angular/cdk/overlay';
|
|
4
4
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
5
5
|
import { Subscription } from 'rxjs';
|
|
6
6
|
import * as i1$1 from '@angular/forms';
|
|
7
7
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
8
8
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
9
|
-
import { NgTemplateOutlet, isPlatformBrowser, NgStyle } from '@angular/common';
|
|
9
|
+
import { NgTemplateOutlet, isPlatformBrowser, NgStyle, DOCUMENT } from '@angular/common';
|
|
10
10
|
import * as i1 from '@angular/cdk/a11y';
|
|
11
11
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
12
12
|
|
|
@@ -2604,13 +2604,13 @@ class CheckboxComponent {
|
|
|
2604
2604
|
this.onTouched();
|
|
2605
2605
|
}
|
|
2606
2606
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2607
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CheckboxComponent, isStandalone: true, selector: "ius-checkbox", inputs: { label: "label", labelPosition: "labelPosition", showIconHelp: ["showIconHelp", "showIconHelp", booleanAttribute], iconHelpTitle: "iconHelpTitle", iconHelpContent: "iconHelpContent", name: "name", value: "value", size: "size", checked: ["checked", "checked", booleanAttribute], defaultChecked: ["defaultChecked", "defaultChecked", booleanAttribute], indeterminate: ["indeterminate", "indeterminate", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute] }, outputs: { checkedChange: "checkedChange" }, host: { properties: { "attr.data-size": "size !== 'medium' ? size : null", "attr.data-checked": "checked ? 'true' : null", "attr.data-indeterminate": "indeterminate ? 'true' : null", "attr.data-disabled": "disabled ? 'true' : null" }, classAttribute: "ius-cbx" }, providers: [
|
|
2607
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CheckboxComponent, isStandalone: true, selector: "ius-checkbox", inputs: { label: "label", labelPosition: "labelPosition", showIconHelp: ["showIconHelp", "showIconHelp", booleanAttribute], iconHelpTitle: "iconHelpTitle", iconHelpContent: "iconHelpContent", name: "name", value: "value", ariaLabel: "ariaLabel", size: "size", checked: ["checked", "checked", booleanAttribute], defaultChecked: ["defaultChecked", "defaultChecked", booleanAttribute], indeterminate: ["indeterminate", "indeterminate", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute] }, outputs: { checkedChange: "checkedChange" }, host: { properties: { "attr.data-size": "size !== 'medium' ? size : null", "attr.data-checked": "checked ? 'true' : null", "attr.data-indeterminate": "indeterminate ? 'true' : null", "attr.data-disabled": "disabled ? 'true' : null" }, classAttribute: "ius-cbx" }, providers: [
|
|
2608
2608
|
{
|
|
2609
2609
|
provide: NG_VALUE_ACCESSOR,
|
|
2610
2610
|
useExisting: forwardRef(() => CheckboxComponent),
|
|
2611
2611
|
multi: true,
|
|
2612
2612
|
},
|
|
2613
|
-
], ngImport: i0, template: "<label class=\"ius-cbx__inner\" [attr.data-label-position]=\"labelPosition\">\r\n <!-- Input primero + ctrl inmediatamente despu\u00E9s: el halo de foco usa el\r\n selector adyacente `.ius-cbx__input:focus-visible + .ius-cbx__ctrl`, as\u00ED\r\n que el orden DOM se fija aqu\u00ED y la posici\u00F3n visual del label la resuelve\r\n `order` en el SCSS (labelPosition left/right). -->\r\n <input\r\n [id]=\"inputId\"\r\n class=\"ius-cbx__input\"\r\n type=\"checkbox\"\r\n [name]=\"name\"\r\n [attr.value]=\"value\"\r\n [checked]=\"checked\"\r\n [indeterminate]=\"indeterminate\"\r\n [disabled]=\"disabled\"\r\n [attr.aria-checked]=\"ariaChecked\"\r\n (change)=\"onToggle()\"\r\n (blur)=\"onBlur()\"\r\n />\r\n\r\n <span class=\"ius-cbx__ctrl\" aria-hidden=\"true\">\r\n <span class=\"ius-cbx__box\">\r\n <span class=\"ius-cbx__check\">\r\n <span translate=\"no\" class=\"ius-icon\">{{ glyph }}</span>\r\n </span>\r\n </span>\r\n </span>\r\n\r\n @if (label != null) {\r\n <span class=\"ius-cbx__label\">\r\n <span>{{ label }}</span>\r\n @if (showIconHelp) {\r\n <ius-popover\r\n [title]=\"iconHelpTitle\"\r\n [content]=\"iconHelpContent\"\r\n [disabled]=\"!iconHelpTitle && !iconHelpContent\"\r\n >\r\n <span\r\n class=\"ius-cbx__help\"\r\n tabindex=\"0\"\r\n aria-label=\"Ayuda\"\r\n (click)=\"$event.preventDefault()\"\r\n >\r\n <span translate=\"no\" class=\"ius-icon\">help</span>\r\n </span>\r\n </ius-popover>\r\n }\r\n </span>\r\n }\r\n</label>\r\n", styles: ["@charset \"UTF-8\";:host{--_cbx-size: 20px;--_cbx-halo: 38px;--_cbx-fs: var(--ius-fs-base);display:inline-block;vertical-align:middle}:host([data-size=small]){--_cbx-size: 16px;--_cbx-halo: 32px;--_cbx-fs: var(--ius-fs-base)}:host([data-size=large]){--_cbx-size: 24px;--_cbx-halo: var(--ius-hit-target-min, 44px);--_cbx-fs: var(--ius-fs-lg)}.ius-cbx__inner{display:inline-flex;align-items:center;gap:var(--ius-space-xs);font-family:var(--ius-font-body);font-size:var(--_cbx-fs);color:var(--ius-text-primary);cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ius-cbx__inner[data-label-position=left] .ius-cbx__label{order:-1}:host([data-disabled=true]) .ius-cbx__inner{cursor:not-allowed;color:var(--ius-text-disabled)}.ius-cbx__input{position:absolute;opacity:0;width:0;height:0;margin:0}.ius-cbx__ctrl{position:relative;flex:0 0 auto;display:grid;place-items:center}.ius-cbx__ctrl:before{content:\"\";position:absolute;width:var(--_cbx-halo);height:var(--_cbx-halo);border-radius:var(--ius-radius-pill);background:transparent;z-index:0;transition:background-color var(--ius-duration-fast) var(--ius-ease-standard)}.ius-cbx__box{position:relative;z-index:1;width:var(--_cbx-size);height:var(--_cbx-size);border-radius:var(--ius-radius-sm);background:var(--ius-neutral-3);border:1.5px solid transparent;display:grid;place-items:center;color:var(--ius-neutral-white);transition:background-color var(--ius-duration-fast) var(--ius-ease-standard),border-color var(--ius-duration-fast) var(--ius-ease-standard)}.ius-cbx__check{display:inline-flex;opacity:0}.ius-cbx__check .ius-icon{font-size:calc(var(--_cbx-size) - 4px);line-height:1}.ius-cbx__label{display:inline-flex;align-items:center;gap:var(--ius-space-xs)}.ius-cbx__help{display:inline-flex;align-items:center;justify-content:center;color:var(--ius-neutral-7);cursor:help}.ius-cbx__help .ius-icon{font-size:calc(var(--_cbx-fs) + 4px);line-height:1}:host([data-disabled=true]) .ius-cbx__help{color:var(--ius-text-disabled)}:host(:hover) .ius-cbx__ctrl:before,:host([data-force=hover]) .ius-cbx__ctrl:before{background:var(--ius-neutral-3)}:host(:active) .ius-cbx__ctrl:before,:host([data-force=pressed]) .ius-cbx__ctrl:before,:host([data-force=focused]) .ius-cbx__ctrl:before,.ius-cbx__input:focus-visible+.ius-cbx__ctrl:before{background:var(--ius-info-200)}:host(:not([data-checked=true]):not([data-indeterminate=true]):not([data-disabled=true]):hover) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true]):not([data-disabled=true]):active) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true])[data-force=hover]) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true])[data-force=pressed]) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true])[data-force=focused]) .ius-cbx__box,.ius-cbx__input:focus-visible+.ius-cbx__ctrl .ius-cbx__box{background:var(--ius-neutral-white);border-color:var(--ius-stroke-strong)}:host([data-checked=true]) .ius-cbx__box,:host([data-indeterminate=true]) .ius-cbx__box{background:var(--ius-primary-900);border-color:transparent}:host([data-checked=true]) .ius-cbx__check,:host([data-indeterminate=true]) .ius-cbx__check{opacity:1}:host([data-disabled=true]) .ius-cbx__box{background:transparent;border-color:var(--ius-stroke)}:host([data-disabled=true][data-checked=true]) .ius-cbx__box,:host([data-disabled=true][data-indeterminate=true]) .ius-cbx__box{background:var(--ius-neutral-3);border-color:transparent;color:var(--ius-neutral-white)}:host([data-disabled=true]) .ius-cbx__ctrl:before{background:transparent!important}\n"], dependencies: [{ kind: "component", type: PopoverComponent, selector: "ius-popover", inputs: ["title", "content", "placement", "trigger", "offset", "open", "defaultOpen", "showArrow", "disabled", "anchorRect", "padding", "dismissable", "panelClass"], outputs: ["openChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2613
|
+
], ngImport: i0, template: "<label class=\"ius-cbx__inner\" [attr.data-label-position]=\"labelPosition\">\r\n <!-- Input primero + ctrl inmediatamente despu\u00E9s: el halo de foco usa el\r\n selector adyacente `.ius-cbx__input:focus-visible + .ius-cbx__ctrl`, as\u00ED\r\n que el orden DOM se fija aqu\u00ED y la posici\u00F3n visual del label la resuelve\r\n `order` en el SCSS (labelPosition left/right). -->\r\n <input\r\n [id]=\"inputId\"\r\n class=\"ius-cbx__input\"\r\n type=\"checkbox\"\r\n [name]=\"name\"\r\n [attr.value]=\"value\"\r\n [checked]=\"checked\"\r\n [indeterminate]=\"indeterminate\"\r\n [disabled]=\"disabled\"\r\n [attr.aria-checked]=\"ariaChecked\"\r\n [attr.aria-label]=\"ariaLabel ?? null\"\r\n (change)=\"onToggle()\"\r\n (blur)=\"onBlur()\"\r\n />\r\n\r\n <span class=\"ius-cbx__ctrl\" aria-hidden=\"true\">\r\n <span class=\"ius-cbx__box\">\r\n <span class=\"ius-cbx__check\">\r\n <span translate=\"no\" class=\"ius-icon\">{{ glyph }}</span>\r\n </span>\r\n </span>\r\n </span>\r\n\r\n @if (label != null) {\r\n <span class=\"ius-cbx__label\">\r\n <span>{{ label }}</span>\r\n @if (showIconHelp) {\r\n <ius-popover\r\n [title]=\"iconHelpTitle\"\r\n [content]=\"iconHelpContent\"\r\n [disabled]=\"!iconHelpTitle && !iconHelpContent\"\r\n >\r\n <span\r\n class=\"ius-cbx__help\"\r\n tabindex=\"0\"\r\n aria-label=\"Ayuda\"\r\n (click)=\"$event.preventDefault()\"\r\n >\r\n <span translate=\"no\" class=\"ius-icon\">help</span>\r\n </span>\r\n </ius-popover>\r\n }\r\n </span>\r\n }\r\n</label>\r\n", styles: ["@charset \"UTF-8\";:host{--_cbx-size: 20px;--_cbx-halo: 38px;--_cbx-fs: var(--ius-fs-base);display:inline-block;vertical-align:middle}:host([data-size=small]){--_cbx-size: 16px;--_cbx-halo: 32px;--_cbx-fs: var(--ius-fs-base)}:host([data-size=large]){--_cbx-size: 24px;--_cbx-halo: var(--ius-hit-target-min, 44px);--_cbx-fs: var(--ius-fs-lg)}.ius-cbx__inner{display:inline-flex;align-items:center;gap:var(--ius-space-xs);font-family:var(--ius-font-body);font-size:var(--_cbx-fs);color:var(--ius-text-primary);cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ius-cbx__inner[data-label-position=left] .ius-cbx__label{order:-1}:host([data-disabled=true]) .ius-cbx__inner{cursor:not-allowed;color:var(--ius-text-disabled)}.ius-cbx__input{position:absolute;opacity:0;width:0;height:0;margin:0}.ius-cbx__ctrl{position:relative;flex:0 0 auto;display:grid;place-items:center}.ius-cbx__ctrl:before{content:\"\";position:absolute;width:var(--_cbx-halo);height:var(--_cbx-halo);border-radius:var(--ius-radius-pill);background:transparent;z-index:0;transition:background-color var(--ius-duration-fast) var(--ius-ease-standard)}.ius-cbx__box{position:relative;z-index:1;width:var(--_cbx-size);height:var(--_cbx-size);border-radius:var(--ius-radius-sm);background:var(--ius-neutral-3);border:1.5px solid transparent;display:grid;place-items:center;color:var(--ius-neutral-white);transition:background-color var(--ius-duration-fast) var(--ius-ease-standard),border-color var(--ius-duration-fast) var(--ius-ease-standard)}.ius-cbx__check{display:inline-flex;opacity:0}.ius-cbx__check .ius-icon{font-size:calc(var(--_cbx-size) - 4px);line-height:1}.ius-cbx__label{display:inline-flex;align-items:center;gap:var(--ius-space-xs)}.ius-cbx__help{display:inline-flex;align-items:center;justify-content:center;color:var(--ius-neutral-7);cursor:help}.ius-cbx__help .ius-icon{font-size:calc(var(--_cbx-fs) + 4px);line-height:1}:host([data-disabled=true]) .ius-cbx__help{color:var(--ius-text-disabled)}:host(:hover) .ius-cbx__ctrl:before,:host([data-force=hover]) .ius-cbx__ctrl:before{background:var(--ius-neutral-3)}:host(:active) .ius-cbx__ctrl:before,:host([data-force=pressed]) .ius-cbx__ctrl:before,:host([data-force=focused]) .ius-cbx__ctrl:before,.ius-cbx__input:focus-visible+.ius-cbx__ctrl:before{background:var(--ius-info-200)}:host(:not([data-checked=true]):not([data-indeterminate=true]):not([data-disabled=true]):hover) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true]):not([data-disabled=true]):active) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true])[data-force=hover]) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true])[data-force=pressed]) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true])[data-force=focused]) .ius-cbx__box,.ius-cbx__input:focus-visible+.ius-cbx__ctrl .ius-cbx__box{background:var(--ius-neutral-white);border-color:var(--ius-stroke-strong)}:host([data-checked=true]) .ius-cbx__box,:host([data-indeterminate=true]) .ius-cbx__box{background:var(--ius-primary-900);border-color:transparent}:host([data-checked=true]) .ius-cbx__check,:host([data-indeterminate=true]) .ius-cbx__check{opacity:1}:host([data-disabled=true]) .ius-cbx__box{background:transparent;border-color:var(--ius-stroke)}:host([data-disabled=true][data-checked=true]) .ius-cbx__box,:host([data-disabled=true][data-indeterminate=true]) .ius-cbx__box{background:var(--ius-neutral-3);border-color:transparent;color:var(--ius-neutral-white)}:host([data-disabled=true]) .ius-cbx__ctrl:before{background:transparent!important}\n"], dependencies: [{ kind: "component", type: PopoverComponent, selector: "ius-popover", inputs: ["title", "content", "placement", "trigger", "offset", "open", "defaultOpen", "showArrow", "disabled", "anchorRect", "padding", "dismissable", "panelClass"], outputs: ["openChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2614
2614
|
}
|
|
2615
2615
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
2616
2616
|
type: Component,
|
|
@@ -2626,7 +2626,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
2626
2626
|
'[attr.data-checked]': "checked ? 'true' : null",
|
|
2627
2627
|
'[attr.data-indeterminate]': "indeterminate ? 'true' : null",
|
|
2628
2628
|
'[attr.data-disabled]': "disabled ? 'true' : null",
|
|
2629
|
-
}, template: "<label class=\"ius-cbx__inner\" [attr.data-label-position]=\"labelPosition\">\r\n <!-- Input primero + ctrl inmediatamente despu\u00E9s: el halo de foco usa el\r\n selector adyacente `.ius-cbx__input:focus-visible + .ius-cbx__ctrl`, as\u00ED\r\n que el orden DOM se fija aqu\u00ED y la posici\u00F3n visual del label la resuelve\r\n `order` en el SCSS (labelPosition left/right). -->\r\n <input\r\n [id]=\"inputId\"\r\n class=\"ius-cbx__input\"\r\n type=\"checkbox\"\r\n [name]=\"name\"\r\n [attr.value]=\"value\"\r\n [checked]=\"checked\"\r\n [indeterminate]=\"indeterminate\"\r\n [disabled]=\"disabled\"\r\n [attr.aria-checked]=\"ariaChecked\"\r\n (change)=\"onToggle()\"\r\n (blur)=\"onBlur()\"\r\n />\r\n\r\n <span class=\"ius-cbx__ctrl\" aria-hidden=\"true\">\r\n <span class=\"ius-cbx__box\">\r\n <span class=\"ius-cbx__check\">\r\n <span translate=\"no\" class=\"ius-icon\">{{ glyph }}</span>\r\n </span>\r\n </span>\r\n </span>\r\n\r\n @if (label != null) {\r\n <span class=\"ius-cbx__label\">\r\n <span>{{ label }}</span>\r\n @if (showIconHelp) {\r\n <ius-popover\r\n [title]=\"iconHelpTitle\"\r\n [content]=\"iconHelpContent\"\r\n [disabled]=\"!iconHelpTitle && !iconHelpContent\"\r\n >\r\n <span\r\n class=\"ius-cbx__help\"\r\n tabindex=\"0\"\r\n aria-label=\"Ayuda\"\r\n (click)=\"$event.preventDefault()\"\r\n >\r\n <span translate=\"no\" class=\"ius-icon\">help</span>\r\n </span>\r\n </ius-popover>\r\n }\r\n </span>\r\n }\r\n</label>\r\n", styles: ["@charset \"UTF-8\";:host{--_cbx-size: 20px;--_cbx-halo: 38px;--_cbx-fs: var(--ius-fs-base);display:inline-block;vertical-align:middle}:host([data-size=small]){--_cbx-size: 16px;--_cbx-halo: 32px;--_cbx-fs: var(--ius-fs-base)}:host([data-size=large]){--_cbx-size: 24px;--_cbx-halo: var(--ius-hit-target-min, 44px);--_cbx-fs: var(--ius-fs-lg)}.ius-cbx__inner{display:inline-flex;align-items:center;gap:var(--ius-space-xs);font-family:var(--ius-font-body);font-size:var(--_cbx-fs);color:var(--ius-text-primary);cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ius-cbx__inner[data-label-position=left] .ius-cbx__label{order:-1}:host([data-disabled=true]) .ius-cbx__inner{cursor:not-allowed;color:var(--ius-text-disabled)}.ius-cbx__input{position:absolute;opacity:0;width:0;height:0;margin:0}.ius-cbx__ctrl{position:relative;flex:0 0 auto;display:grid;place-items:center}.ius-cbx__ctrl:before{content:\"\";position:absolute;width:var(--_cbx-halo);height:var(--_cbx-halo);border-radius:var(--ius-radius-pill);background:transparent;z-index:0;transition:background-color var(--ius-duration-fast) var(--ius-ease-standard)}.ius-cbx__box{position:relative;z-index:1;width:var(--_cbx-size);height:var(--_cbx-size);border-radius:var(--ius-radius-sm);background:var(--ius-neutral-3);border:1.5px solid transparent;display:grid;place-items:center;color:var(--ius-neutral-white);transition:background-color var(--ius-duration-fast) var(--ius-ease-standard),border-color var(--ius-duration-fast) var(--ius-ease-standard)}.ius-cbx__check{display:inline-flex;opacity:0}.ius-cbx__check .ius-icon{font-size:calc(var(--_cbx-size) - 4px);line-height:1}.ius-cbx__label{display:inline-flex;align-items:center;gap:var(--ius-space-xs)}.ius-cbx__help{display:inline-flex;align-items:center;justify-content:center;color:var(--ius-neutral-7);cursor:help}.ius-cbx__help .ius-icon{font-size:calc(var(--_cbx-fs) + 4px);line-height:1}:host([data-disabled=true]) .ius-cbx__help{color:var(--ius-text-disabled)}:host(:hover) .ius-cbx__ctrl:before,:host([data-force=hover]) .ius-cbx__ctrl:before{background:var(--ius-neutral-3)}:host(:active) .ius-cbx__ctrl:before,:host([data-force=pressed]) .ius-cbx__ctrl:before,:host([data-force=focused]) .ius-cbx__ctrl:before,.ius-cbx__input:focus-visible+.ius-cbx__ctrl:before{background:var(--ius-info-200)}:host(:not([data-checked=true]):not([data-indeterminate=true]):not([data-disabled=true]):hover) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true]):not([data-disabled=true]):active) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true])[data-force=hover]) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true])[data-force=pressed]) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true])[data-force=focused]) .ius-cbx__box,.ius-cbx__input:focus-visible+.ius-cbx__ctrl .ius-cbx__box{background:var(--ius-neutral-white);border-color:var(--ius-stroke-strong)}:host([data-checked=true]) .ius-cbx__box,:host([data-indeterminate=true]) .ius-cbx__box{background:var(--ius-primary-900);border-color:transparent}:host([data-checked=true]) .ius-cbx__check,:host([data-indeterminate=true]) .ius-cbx__check{opacity:1}:host([data-disabled=true]) .ius-cbx__box{background:transparent;border-color:var(--ius-stroke)}:host([data-disabled=true][data-checked=true]) .ius-cbx__box,:host([data-disabled=true][data-indeterminate=true]) .ius-cbx__box{background:var(--ius-neutral-3);border-color:transparent;color:var(--ius-neutral-white)}:host([data-disabled=true]) .ius-cbx__ctrl:before{background:transparent!important}\n"] }]
|
|
2629
|
+
}, template: "<label class=\"ius-cbx__inner\" [attr.data-label-position]=\"labelPosition\">\r\n <!-- Input primero + ctrl inmediatamente despu\u00E9s: el halo de foco usa el\r\n selector adyacente `.ius-cbx__input:focus-visible + .ius-cbx__ctrl`, as\u00ED\r\n que el orden DOM se fija aqu\u00ED y la posici\u00F3n visual del label la resuelve\r\n `order` en el SCSS (labelPosition left/right). -->\r\n <input\r\n [id]=\"inputId\"\r\n class=\"ius-cbx__input\"\r\n type=\"checkbox\"\r\n [name]=\"name\"\r\n [attr.value]=\"value\"\r\n [checked]=\"checked\"\r\n [indeterminate]=\"indeterminate\"\r\n [disabled]=\"disabled\"\r\n [attr.aria-checked]=\"ariaChecked\"\r\n [attr.aria-label]=\"ariaLabel ?? null\"\r\n (change)=\"onToggle()\"\r\n (blur)=\"onBlur()\"\r\n />\r\n\r\n <span class=\"ius-cbx__ctrl\" aria-hidden=\"true\">\r\n <span class=\"ius-cbx__box\">\r\n <span class=\"ius-cbx__check\">\r\n <span translate=\"no\" class=\"ius-icon\">{{ glyph }}</span>\r\n </span>\r\n </span>\r\n </span>\r\n\r\n @if (label != null) {\r\n <span class=\"ius-cbx__label\">\r\n <span>{{ label }}</span>\r\n @if (showIconHelp) {\r\n <ius-popover\r\n [title]=\"iconHelpTitle\"\r\n [content]=\"iconHelpContent\"\r\n [disabled]=\"!iconHelpTitle && !iconHelpContent\"\r\n >\r\n <span\r\n class=\"ius-cbx__help\"\r\n tabindex=\"0\"\r\n aria-label=\"Ayuda\"\r\n (click)=\"$event.preventDefault()\"\r\n >\r\n <span translate=\"no\" class=\"ius-icon\">help</span>\r\n </span>\r\n </ius-popover>\r\n }\r\n </span>\r\n }\r\n</label>\r\n", styles: ["@charset \"UTF-8\";:host{--_cbx-size: 20px;--_cbx-halo: 38px;--_cbx-fs: var(--ius-fs-base);display:inline-block;vertical-align:middle}:host([data-size=small]){--_cbx-size: 16px;--_cbx-halo: 32px;--_cbx-fs: var(--ius-fs-base)}:host([data-size=large]){--_cbx-size: 24px;--_cbx-halo: var(--ius-hit-target-min, 44px);--_cbx-fs: var(--ius-fs-lg)}.ius-cbx__inner{display:inline-flex;align-items:center;gap:var(--ius-space-xs);font-family:var(--ius-font-body);font-size:var(--_cbx-fs);color:var(--ius-text-primary);cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ius-cbx__inner[data-label-position=left] .ius-cbx__label{order:-1}:host([data-disabled=true]) .ius-cbx__inner{cursor:not-allowed;color:var(--ius-text-disabled)}.ius-cbx__input{position:absolute;opacity:0;width:0;height:0;margin:0}.ius-cbx__ctrl{position:relative;flex:0 0 auto;display:grid;place-items:center}.ius-cbx__ctrl:before{content:\"\";position:absolute;width:var(--_cbx-halo);height:var(--_cbx-halo);border-radius:var(--ius-radius-pill);background:transparent;z-index:0;transition:background-color var(--ius-duration-fast) var(--ius-ease-standard)}.ius-cbx__box{position:relative;z-index:1;width:var(--_cbx-size);height:var(--_cbx-size);border-radius:var(--ius-radius-sm);background:var(--ius-neutral-3);border:1.5px solid transparent;display:grid;place-items:center;color:var(--ius-neutral-white);transition:background-color var(--ius-duration-fast) var(--ius-ease-standard),border-color var(--ius-duration-fast) var(--ius-ease-standard)}.ius-cbx__check{display:inline-flex;opacity:0}.ius-cbx__check .ius-icon{font-size:calc(var(--_cbx-size) - 4px);line-height:1}.ius-cbx__label{display:inline-flex;align-items:center;gap:var(--ius-space-xs)}.ius-cbx__help{display:inline-flex;align-items:center;justify-content:center;color:var(--ius-neutral-7);cursor:help}.ius-cbx__help .ius-icon{font-size:calc(var(--_cbx-fs) + 4px);line-height:1}:host([data-disabled=true]) .ius-cbx__help{color:var(--ius-text-disabled)}:host(:hover) .ius-cbx__ctrl:before,:host([data-force=hover]) .ius-cbx__ctrl:before{background:var(--ius-neutral-3)}:host(:active) .ius-cbx__ctrl:before,:host([data-force=pressed]) .ius-cbx__ctrl:before,:host([data-force=focused]) .ius-cbx__ctrl:before,.ius-cbx__input:focus-visible+.ius-cbx__ctrl:before{background:var(--ius-info-200)}:host(:not([data-checked=true]):not([data-indeterminate=true]):not([data-disabled=true]):hover) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true]):not([data-disabled=true]):active) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true])[data-force=hover]) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true])[data-force=pressed]) .ius-cbx__box,:host(:not([data-checked=true]):not([data-indeterminate=true])[data-force=focused]) .ius-cbx__box,.ius-cbx__input:focus-visible+.ius-cbx__ctrl .ius-cbx__box{background:var(--ius-neutral-white);border-color:var(--ius-stroke-strong)}:host([data-checked=true]) .ius-cbx__box,:host([data-indeterminate=true]) .ius-cbx__box{background:var(--ius-primary-900);border-color:transparent}:host([data-checked=true]) .ius-cbx__check,:host([data-indeterminate=true]) .ius-cbx__check{opacity:1}:host([data-disabled=true]) .ius-cbx__box{background:transparent;border-color:var(--ius-stroke)}:host([data-disabled=true][data-checked=true]) .ius-cbx__box,:host([data-disabled=true][data-indeterminate=true]) .ius-cbx__box{background:var(--ius-neutral-3);border-color:transparent;color:var(--ius-neutral-white)}:host([data-disabled=true]) .ius-cbx__ctrl:before{background:transparent!important}\n"] }]
|
|
2630
2630
|
}], propDecorators: { label: [{
|
|
2631
2631
|
type: Input
|
|
2632
2632
|
}], labelPosition: [{
|
|
@@ -2642,6 +2642,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
2642
2642
|
type: Input
|
|
2643
2643
|
}], value: [{
|
|
2644
2644
|
type: Input
|
|
2645
|
+
}], ariaLabel: [{
|
|
2646
|
+
type: Input
|
|
2645
2647
|
}], size: [{
|
|
2646
2648
|
type: Input
|
|
2647
2649
|
}], checked: [{
|
|
@@ -8244,7 +8246,7 @@ class ListViewComponent {
|
|
|
8244
8246
|
this.sortChange.emit(payload.value);
|
|
8245
8247
|
}
|
|
8246
8248
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ListViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8247
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ListViewComponent, isStandalone: true, selector: "ius-list-view", inputs: { hideHeader: ["hideHeader", "hideHeader", booleanAttribute], selectable: ["selectable", "selectable", booleanAttribute], allSelected: ["allSelected", "allSelected", booleanAttribute], someSelected: ["someSelected", "someSelected", booleanAttribute], selectLabel: "selectLabel", sortOptions: "sortOptions", sortValue: "sortValue", actions: "actions", selectedCount: ["selectedCount", "selectedCount", numberAttribute], selectionActions: "selectionActions", gap: "gap", bodyPadding: "bodyPadding", bordered: ["bordered", "bordered", booleanAttribute], scrollTrackMargin: "scrollTrackMargin", fit: ["fit", "fit", booleanAttribute], fieldWidths: "fieldWidths", hideFooter: ["hideFooter", "hideFooter", booleanAttribute], total: "total", countNoun: "countNoun", pagination: ["pagination", "pagination", booleanAttribute], paginationVariant: "paginationVariant", page: "page", pageSize: ["pageSize", "pageSize", numberAttribute], pageSizeOptions: "pageSizeOptions", size: "size" }, outputs: { selectAll: "selectAll", sortChange: "sortChange", clearSelection: "clearSelection", pageChange: "pageChange", pageSizeChange: "pageSizeChange" }, host: { properties: { "attr.data-size": "size !== 'medium' ? size : null", "attr.data-bordered": "bordered ? 'true' : 'false'", "attr.data-fit": "fit ? 'height' : null" }, classAttribute: "ius-listview" }, queries: [{ propertyName: "filtersRef", first: true, predicate: IusListViewFiltersDirective, descendants: true, isSignal: true }, { propertyName: "headerStartRef", first: true, predicate: IusListViewHeaderStartDirective, descendants: true, isSignal: true }, { propertyName: "headerEndRef", first: true, predicate: IusListViewHeaderEndDirective, descendants: true, isSignal: true }, { propertyName: "toolbarRef", first: true, predicate: IusListViewToolbarDirective, descendants: true, isSignal: true }, { propertyName: "footerStartRef", first: true, predicate: IusListViewFooterStartDirective, descendants: true, isSignal: true }, { propertyName: "footerEndRef", first: true, predicate: IusListViewFooterEndDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Header: modo selecci\u00F3n > toolbar > integrado -->\r\n@if (!hideHeader) {\r\n @if (inSelection) {\r\n <div class=\"ius-listview__header\" data-mode=\"selection\">\r\n @if (selectable) {\r\n <ius-checkbox\r\n [checked]=\"allSelected\"\r\n [indeterminate]=\"someSelected\"\r\n size=\"small\"\r\n (checkedChange)=\"selectAll.emit($event)\"\r\n />\r\n }\r\n <span class=\"ius-listview__selcount\">{{ selCountText }}</span>\r\n @if (selectionActions.length) {\r\n <span class=\"ius-listview__divider\"></span>\r\n }\r\n <div class=\"ius-listview__actions\">\r\n @for (a of selectionActions; track a.key ?? $index) {\r\n <ius-icon-button\r\n [icon]=\"a.icon\"\r\n variant=\"tertiary\"\r\n [size]=\"iconSize\"\r\n [ariaLabel]=\"a.ariaLabel || a.label || a.icon\"\r\n [disabled]=\"a.disabled ?? false\"\r\n (clicked)=\"onAction(a, $event)\"\r\n />\r\n }\r\n </div>\r\n <span class=\"ius-listview__spacer\"></span>\r\n @if (showClear) {\r\n <ius-text-button label=\"Limpiar\" (clicked)=\"clearSelection.emit()\" />\r\n }\r\n </div>\r\n } @else if (hasToolbar) {\r\n <div class=\"ius-listview__header ius-listview__header--toolbar\">\r\n <ng-content select=\"[iusListViewToolbar]\" />\r\n </div>\r\n } @else {\r\n <div class=\"ius-listview__header\">\r\n <div class=\"ius-listview__hgroup ius-listview__hgroup--grow\">\r\n <ng-content select=\"[iusListViewHeaderStart]\" />\r\n @if (selectable) {\r\n <ius-checkbox\r\n [checked]=\"allSelected\"\r\n [indeterminate]=\"someSelected\"\r\n size=\"small\"\r\n [label]=\"selectLabel\"\r\n (checkedChange)=\"selectAll.emit($event)\"\r\n />\r\n }\r\n @if (sortOptions.length) {\r\n <!-- orden: Dropdown de selecci\u00F3n \u00FAnica (trigger ghost swap_vert, tone neutral) -->\r\n <span class=\"ius-listview__sort\">\r\n <ius-dropdown\r\n selectable\r\n [items]=\"sortOptions\"\r\n [value]=\"sortValue\"\r\n [triggerLabel]=\"sortTriggerFallback\"\r\n triggerIcon=\"swap_vert\"\r\n tone=\"neutral\"\r\n ariaLabel=\"Ordenar\"\r\n (valueChange)=\"onSortChange($event)\"\r\n />\r\n </span>\r\n }\r\n @if (hasFilters) {\r\n <div class=\"ius-listview__filters\"><ng-content select=\"[iusListViewFilters]\" /></div>\r\n }\r\n </div>\r\n <div class=\"ius-listview__hgroup ius-listview__hgroup--end\">\r\n @if (actions.length) {\r\n <div class=\"ius-listview__actions\">\r\n @for (a of actions; track a.key ?? $index) {\r\n <ius-icon-button\r\n [icon]=\"a.icon\"\r\n variant=\"tertiary\"\r\n [size]=\"iconSize\"\r\n [ariaLabel]=\"a.ariaLabel || a.label || a.icon\"\r\n [disabled]=\"a.disabled ?? false\"\r\n (clicked)=\"onAction(a, $event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n <ng-content select=\"[iusListViewHeaderEnd]\" />\r\n </div>\r\n </div>\r\n }\r\n}\r\n\r\n<!-- Body: \u00FAnico scroller; emite la rejilla --_lc-col-N a los ListCard proyectados -->\r\n<div\r\n class=\"ius-listview__body ius-scroll\"\r\n [style.gap]=\"px(gap)\"\r\n [style.padding]=\"px(bodyPadding)\"\r\n [style.--_sb-track-margin]=\"px(scrollTrackMargin)\"\r\n [style.--_lc-col-1]=\"colVar(0)\"\r\n [style.--_lc-col-2]=\"colVar(1)\"\r\n [style.--_lc-col-3]=\"colVar(2)\"\r\n [style.--_lc-col-4]=\"colVar(3)\"\r\n [style.--_lc-col-5]=\"colVar(4)\"\r\n [style.--_lc-col-6]=\"colVar(5)\"\r\n>\r\n <ng-content />\r\n</div>\r\n\r\n<!-- Footer: total a la izquierda + paginaci\u00F3n a la derecha -->\r\n@if (showFooter) {\r\n <div class=\"ius-listview__footer\">\r\n <ng-content select=\"[iusListViewFooterStart]\" />\r\n @if (countText) {\r\n <span class=\"ius-listview__count\">{{ countText }}</span>\r\n }\r\n @if (pagination) {\r\n <!-- FALLBACK Pagination: port interno (reemplazar por ius-pagination cuando exista) -->\r\n <ius-list-view-pagination\r\n [variant]=\"paginationVariant\"\r\n [total]=\"total\"\r\n [page]=\"page\"\r\n [pageSize]=\"pageSize\"\r\n [pageSizeOptions]=\"pageSizeOptions\"\r\n size=\"small\"\r\n (pageChange)=\"pageChange.emit($event)\"\r\n (pageSizeChange)=\"pageSizeChange.emit($event)\"\r\n />\r\n }\r\n <ng-content select=\"[iusListViewFooterEnd]\" />\r\n </div>\r\n}\r\n", styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;min-height:0;width:100%;height:100%;font-family:var(--ius-font-body);box-sizing:border-box}:host([data-bordered=true]){background:var(--ius-surface-card);border:1px solid var(--ius-stroke);border-radius:var(--ius-radius-lg);overflow:hidden}.ius-listview__header{flex:0 0 auto;display:flex;align-items:center;gap:var(--ius-space-sm);flex-wrap:nowrap;padding:var(--ius-space-xs) var(--ius-space-md);min-height:40px}.ius-listview__hgroup{display:flex;align-items:center;gap:var(--ius-space-sm);min-width:0;flex-wrap:wrap}.ius-listview__hgroup--grow{flex:1 1 auto}.ius-listview__hgroup--end{flex:0 0 auto;flex-wrap:nowrap;justify-content:flex-end}:host([data-bordered=true]) .ius-listview__header{border-bottom:1px solid var(--ius-stroke)}.ius-listview__header--toolbar{flex-wrap:wrap;min-height:0}:host([data-size=small]) .ius-listview__header{gap:var(--ius-space-xs);padding:var(--ius-space-xs) var(--ius-space-sm);min-height:36px}@container style(--ius-density: small){:host(:not([data-size])) .ius-listview__header{gap:var(--ius-space-xs);padding:var(--ius-space-xs) var(--ius-space-sm);min-height:36px}}.ius-listview__spacer{flex:1 1 auto}.ius-listview__divider{align-self:stretch;width:1px;background:var(--ius-stroke);margin:var(--ius-space-xxs) var(--ius-space-xs)}.ius-listview__filters{display:flex;align-items:center;gap:var(--ius-space-xs);flex-wrap:wrap}.ius-listview__actions{display:flex;align-items:center;gap:var(--ius-space-xxs)}.ius-listview__selcount{font:var(--ius-fw-regular, 400) var(--ius-fs-base)/var(--ius-lh-base) var(--ius-font-body);color:var(--ius-primary-900);font-variant-numeric:tabular-nums}.ius-listview__body{flex:1 1 auto;min-height:0;overflow-y:auto;display:flex;flex-direction:column}:host([data-fit=height]){flex:1 1 auto;min-height:0;overflow:hidden}.ius-listview__body ::ng-deep .ius-listcard:hover{z-index:2}.ius-listview__footer{flex:0 0 auto;display:flex;align-items:center;gap:var(--ius-space-sm);padding:var(--ius-space-xs) var(--ius-space-md)}:host([data-bordered=true]) .ius-listview__footer{border-top:1px solid var(--ius-stroke)}.ius-listview__count{font:var(--ius-fw-regular, 400) var(--ius-fs-sm)/var(--ius-lh-sm) var(--ius-font-body);color:var(--ius-text-secondary);font-variant-numeric:tabular-nums}.ius-listview__footer .ius-pagination{margin-left:auto;flex:0 0 auto}.ius-listview__sort{display:inline-flex}\n"], dependencies: [{ kind: "component", type: CheckboxComponent, selector: "ius-checkbox", inputs: ["label", "labelPosition", "showIconHelp", "iconHelpTitle", "iconHelpContent", "name", "value", "size", "checked", "defaultChecked", "indeterminate", "disabled"], outputs: ["checkedChange"] }, { kind: "component", type: DropdownComponent, selector: "ius-dropdown", inputs: ["items", "selectable", "value", "label", "triggerLabel", "triggerIcon", "tone", "variant", "placement", "open", "defaultOpen", "ariaLabel"], outputs: ["valueChange", "openChange"] }, { kind: "component", type: IconButtonComponent, selector: "ius-icon-button", inputs: ["icon", "variant", "size", "shape", "disabled", "type", "ariaLabel", "tooltip", "tooltipPlacement"], outputs: ["clicked"] }, { kind: "component", type: TextButtonComponent, selector: "ius-text-button", inputs: ["label", "prefixIcon", "sufixIcon", "size", "disabled", "type", "ariaExpanded", "ariaControls"], outputs: ["clicked"] }, { kind: "component", type: ListViewPaginationComponent, selector: "ius-list-view-pagination", inputs: ["variant", "page", "defaultPage", "totalPages", "total", "pageSize", "pageSizeOptions", "showCount", "countNoun", "siblingCount", "boundaryCount", "size", "disabled"], outputs: ["pageChange", "pageSizeChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8249
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ListViewComponent, isStandalone: true, selector: "ius-list-view", inputs: { hideHeader: ["hideHeader", "hideHeader", booleanAttribute], selectable: ["selectable", "selectable", booleanAttribute], allSelected: ["allSelected", "allSelected", booleanAttribute], someSelected: ["someSelected", "someSelected", booleanAttribute], selectLabel: "selectLabel", sortOptions: "sortOptions", sortValue: "sortValue", actions: "actions", selectedCount: ["selectedCount", "selectedCount", numberAttribute], selectionActions: "selectionActions", gap: "gap", bodyPadding: "bodyPadding", bordered: ["bordered", "bordered", booleanAttribute], scrollTrackMargin: "scrollTrackMargin", fit: ["fit", "fit", booleanAttribute], fieldWidths: "fieldWidths", hideFooter: ["hideFooter", "hideFooter", booleanAttribute], total: "total", countNoun: "countNoun", pagination: ["pagination", "pagination", booleanAttribute], paginationVariant: "paginationVariant", page: "page", pageSize: ["pageSize", "pageSize", numberAttribute], pageSizeOptions: "pageSizeOptions", size: "size" }, outputs: { selectAll: "selectAll", sortChange: "sortChange", clearSelection: "clearSelection", pageChange: "pageChange", pageSizeChange: "pageSizeChange" }, host: { properties: { "attr.data-size": "size !== 'medium' ? size : null", "attr.data-bordered": "bordered ? 'true' : 'false'", "attr.data-fit": "fit ? 'height' : null" }, classAttribute: "ius-listview" }, queries: [{ propertyName: "filtersRef", first: true, predicate: IusListViewFiltersDirective, descendants: true, isSignal: true }, { propertyName: "headerStartRef", first: true, predicate: IusListViewHeaderStartDirective, descendants: true, isSignal: true }, { propertyName: "headerEndRef", first: true, predicate: IusListViewHeaderEndDirective, descendants: true, isSignal: true }, { propertyName: "toolbarRef", first: true, predicate: IusListViewToolbarDirective, descendants: true, isSignal: true }, { propertyName: "footerStartRef", first: true, predicate: IusListViewFooterStartDirective, descendants: true, isSignal: true }, { propertyName: "footerEndRef", first: true, predicate: IusListViewFooterEndDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Header: modo selecci\u00F3n > toolbar > integrado -->\r\n@if (!hideHeader) {\r\n @if (inSelection) {\r\n <div class=\"ius-listview__header\" data-mode=\"selection\">\r\n @if (selectable) {\r\n <ius-checkbox\r\n [checked]=\"allSelected\"\r\n [indeterminate]=\"someSelected\"\r\n size=\"small\"\r\n (checkedChange)=\"selectAll.emit($event)\"\r\n />\r\n }\r\n <span class=\"ius-listview__selcount\">{{ selCountText }}</span>\r\n @if (selectionActions.length) {\r\n <span class=\"ius-listview__divider\"></span>\r\n }\r\n <div class=\"ius-listview__actions\">\r\n @for (a of selectionActions; track a.key ?? $index) {\r\n <ius-icon-button\r\n [icon]=\"a.icon\"\r\n variant=\"tertiary\"\r\n [size]=\"iconSize\"\r\n [ariaLabel]=\"a.ariaLabel || a.label || a.icon\"\r\n [disabled]=\"a.disabled ?? false\"\r\n (clicked)=\"onAction(a, $event)\"\r\n />\r\n }\r\n </div>\r\n <span class=\"ius-listview__spacer\"></span>\r\n @if (showClear) {\r\n <ius-text-button label=\"Limpiar\" (clicked)=\"clearSelection.emit()\" />\r\n }\r\n </div>\r\n } @else if (hasToolbar) {\r\n <div class=\"ius-listview__header ius-listview__header--toolbar\">\r\n <ng-content select=\"[iusListViewToolbar]\" />\r\n </div>\r\n } @else {\r\n <div class=\"ius-listview__header\">\r\n <div class=\"ius-listview__hgroup ius-listview__hgroup--grow\">\r\n <ng-content select=\"[iusListViewHeaderStart]\" />\r\n @if (selectable) {\r\n <ius-checkbox\r\n [checked]=\"allSelected\"\r\n [indeterminate]=\"someSelected\"\r\n size=\"small\"\r\n [label]=\"selectLabel\"\r\n (checkedChange)=\"selectAll.emit($event)\"\r\n />\r\n }\r\n @if (sortOptions.length) {\r\n <!-- orden: Dropdown de selecci\u00F3n \u00FAnica (trigger ghost swap_vert, tone neutral) -->\r\n <span class=\"ius-listview__sort\">\r\n <ius-dropdown\r\n selectable\r\n [items]=\"sortOptions\"\r\n [value]=\"sortValue\"\r\n [triggerLabel]=\"sortTriggerFallback\"\r\n triggerIcon=\"swap_vert\"\r\n tone=\"neutral\"\r\n ariaLabel=\"Ordenar\"\r\n (valueChange)=\"onSortChange($event)\"\r\n />\r\n </span>\r\n }\r\n @if (hasFilters) {\r\n <div class=\"ius-listview__filters\"><ng-content select=\"[iusListViewFilters]\" /></div>\r\n }\r\n </div>\r\n <div class=\"ius-listview__hgroup ius-listview__hgroup--end\">\r\n @if (actions.length) {\r\n <div class=\"ius-listview__actions\">\r\n @for (a of actions; track a.key ?? $index) {\r\n <ius-icon-button\r\n [icon]=\"a.icon\"\r\n variant=\"tertiary\"\r\n [size]=\"iconSize\"\r\n [ariaLabel]=\"a.ariaLabel || a.label || a.icon\"\r\n [disabled]=\"a.disabled ?? false\"\r\n (clicked)=\"onAction(a, $event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n <ng-content select=\"[iusListViewHeaderEnd]\" />\r\n </div>\r\n </div>\r\n }\r\n}\r\n\r\n<!-- Body: \u00FAnico scroller; emite la rejilla --_lc-col-N a los ListCard proyectados -->\r\n<div\r\n class=\"ius-listview__body ius-scroll\"\r\n [style.gap]=\"px(gap)\"\r\n [style.padding]=\"px(bodyPadding)\"\r\n [style.--_sb-track-margin]=\"px(scrollTrackMargin)\"\r\n [style.--_lc-col-1]=\"colVar(0)\"\r\n [style.--_lc-col-2]=\"colVar(1)\"\r\n [style.--_lc-col-3]=\"colVar(2)\"\r\n [style.--_lc-col-4]=\"colVar(3)\"\r\n [style.--_lc-col-5]=\"colVar(4)\"\r\n [style.--_lc-col-6]=\"colVar(5)\"\r\n>\r\n <ng-content />\r\n</div>\r\n\r\n<!-- Footer: total a la izquierda + paginaci\u00F3n a la derecha -->\r\n@if (showFooter) {\r\n <div class=\"ius-listview__footer\">\r\n <ng-content select=\"[iusListViewFooterStart]\" />\r\n @if (countText) {\r\n <span class=\"ius-listview__count\">{{ countText }}</span>\r\n }\r\n @if (pagination) {\r\n <!-- FALLBACK Pagination: port interno (reemplazar por ius-pagination cuando exista) -->\r\n <ius-list-view-pagination\r\n [variant]=\"paginationVariant\"\r\n [total]=\"total\"\r\n [page]=\"page\"\r\n [pageSize]=\"pageSize\"\r\n [pageSizeOptions]=\"pageSizeOptions\"\r\n size=\"small\"\r\n (pageChange)=\"pageChange.emit($event)\"\r\n (pageSizeChange)=\"pageSizeChange.emit($event)\"\r\n />\r\n }\r\n <ng-content select=\"[iusListViewFooterEnd]\" />\r\n </div>\r\n}\r\n", styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;min-height:0;width:100%;height:100%;font-family:var(--ius-font-body);box-sizing:border-box}:host([data-bordered=true]){background:var(--ius-surface-card);border:1px solid var(--ius-stroke);border-radius:var(--ius-radius-lg);overflow:hidden}.ius-listview__header{flex:0 0 auto;display:flex;align-items:center;gap:var(--ius-space-sm);flex-wrap:nowrap;padding:var(--ius-space-xs) var(--ius-space-md);min-height:40px}.ius-listview__hgroup{display:flex;align-items:center;gap:var(--ius-space-sm);min-width:0;flex-wrap:wrap}.ius-listview__hgroup--grow{flex:1 1 auto}.ius-listview__hgroup--end{flex:0 0 auto;flex-wrap:nowrap;justify-content:flex-end}:host([data-bordered=true]) .ius-listview__header{border-bottom:1px solid var(--ius-stroke)}.ius-listview__header--toolbar{flex-wrap:wrap;min-height:0}:host([data-size=small]) .ius-listview__header{gap:var(--ius-space-xs);padding:var(--ius-space-xs) var(--ius-space-sm);min-height:36px}@container style(--ius-density: small){:host(:not([data-size])) .ius-listview__header{gap:var(--ius-space-xs);padding:var(--ius-space-xs) var(--ius-space-sm);min-height:36px}}.ius-listview__spacer{flex:1 1 auto}.ius-listview__divider{align-self:stretch;width:1px;background:var(--ius-stroke);margin:var(--ius-space-xxs) var(--ius-space-xs)}.ius-listview__filters{display:flex;align-items:center;gap:var(--ius-space-xs);flex-wrap:wrap}.ius-listview__actions{display:flex;align-items:center;gap:var(--ius-space-xxs)}.ius-listview__selcount{font:var(--ius-fw-regular, 400) var(--ius-fs-base)/var(--ius-lh-base) var(--ius-font-body);color:var(--ius-primary-900);font-variant-numeric:tabular-nums}.ius-listview__body{flex:1 1 auto;min-height:0;overflow-y:auto;display:flex;flex-direction:column}:host([data-fit=height]){flex:1 1 auto;min-height:0;overflow:hidden}.ius-listview__body ::ng-deep .ius-listcard:hover{z-index:2}.ius-listview__footer{flex:0 0 auto;display:flex;align-items:center;gap:var(--ius-space-sm);padding:var(--ius-space-xs) var(--ius-space-md)}:host([data-bordered=true]) .ius-listview__footer{border-top:1px solid var(--ius-stroke)}.ius-listview__count{font:var(--ius-fw-regular, 400) var(--ius-fs-sm)/var(--ius-lh-sm) var(--ius-font-body);color:var(--ius-text-secondary);font-variant-numeric:tabular-nums}.ius-listview__footer .ius-pagination{margin-left:auto;flex:0 0 auto}.ius-listview__sort{display:inline-flex}\n"], dependencies: [{ kind: "component", type: CheckboxComponent, selector: "ius-checkbox", inputs: ["label", "labelPosition", "showIconHelp", "iconHelpTitle", "iconHelpContent", "name", "value", "ariaLabel", "size", "checked", "defaultChecked", "indeterminate", "disabled"], outputs: ["checkedChange"] }, { kind: "component", type: DropdownComponent, selector: "ius-dropdown", inputs: ["items", "selectable", "value", "label", "triggerLabel", "triggerIcon", "tone", "variant", "placement", "open", "defaultOpen", "ariaLabel"], outputs: ["valueChange", "openChange"] }, { kind: "component", type: IconButtonComponent, selector: "ius-icon-button", inputs: ["icon", "variant", "size", "shape", "disabled", "type", "ariaLabel", "tooltip", "tooltipPlacement"], outputs: ["clicked"] }, { kind: "component", type: TextButtonComponent, selector: "ius-text-button", inputs: ["label", "prefixIcon", "sufixIcon", "size", "disabled", "type", "ariaExpanded", "ariaControls"], outputs: ["clicked"] }, { kind: "component", type: ListViewPaginationComponent, selector: "ius-list-view-pagination", inputs: ["variant", "page", "defaultPage", "totalPages", "total", "pageSize", "pageSizeOptions", "showCount", "countNoun", "siblingCount", "boundaryCount", "size", "disabled"], outputs: ["pageChange", "pageSizeChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8248
8250
|
}
|
|
8249
8251
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ListViewComponent, decorators: [{
|
|
8250
8252
|
type: Component,
|
|
@@ -13284,6 +13286,477 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
13284
13286
|
}, template: "<!-- SectionHeader \u2014 espejo de SectionHeader.jsx. Con collapsible, el cuerpo es\n un <button> interno para que el slot de acci\u00F3n no anide botones. -->\n@if (collapsible()) {\n <button\n type=\"button\"\n class=\"ius-sech__toggle\"\n [attr.aria-expanded]=\"collapsed() ? 'false' : 'true'\"\n [attr.aria-label]=\"ariaLabel() || null\"\n (click)=\"toggle.emit($event)\"\n >\n <span class=\"ius-sech__twisty\">\n <span translate=\"no\" class=\"ius-icon\">expand_more</span>\n </span>\n <ng-container [ngTemplateOutlet]=\"cuerpo\" />\n </button>\n} @else {\n <ng-container [ngTemplateOutlet]=\"cuerpo\" />\n}\n\n<span class=\"ius-sech__action\">\n <ng-content select=\"[iusSectionHeaderAction]\" />\n</span>\n\n<ng-template #cuerpo>\n @if (icon()) {\n <span class=\"ius-sech__ic\">\n <span translate=\"no\" class=\"ius-icon\">{{ icon() }}</span>\n </span>\n }\n <span class=\"ius-sech__label\"><ng-content /></span>\n @if (count() != null) {\n <span class=\"ius-sech__count\">\n <ius-insignia variant=\"count-soft\" [tone]=\"insigniaTone()\" [count]=\"count()\" />\n </span>\n }\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{box-sizing:border-box;-webkit-user-select:none;user-select:none;display:flex;align-items:center;gap:var(--ius-space-xs);width:100%;border:0;background:transparent;font-family:var(--ius-font-display);text-align:left;color:var(--ius-text-tertiary)}:host([data-sticky=true]){position:sticky;top:0;z-index:var(--ius-z-sticky);background:var(--ius-surface-card)}:host([data-variant=group]){padding:var(--ius-space-sm) var(--ius-space-xs) var(--ius-space-xxs);font-weight:var(--ius-fw-bold, 700);font-size:var(--ius-fs-sm);letter-spacing:.05em;text-transform:uppercase}:host([data-variant=letter]){padding:var(--ius-space-xs) var(--ius-space-xs) var(--ius-space-xxs);font-weight:var(--ius-fw-semibold);font-size:var(--ius-fs-sm);color:var(--_sech-accent, var(--ius-info-600))}.ius-sech__twisty{flex:0 0 auto;width:16px;height:16px;display:inline-flex;align-items:center;justify-content:center;color:var(--ius-text-tertiary);transition:transform var(--ius-duration-fast) var(--ius-ease-standard)}.ius-sech__twisty .ius-icon{font-size:var(--ius-icon-sm)}:host([data-collapsed=true]) .ius-sech__twisty{transform:rotate(-90deg)}.ius-sech__ic{flex:0 0 auto;display:inline-flex;color:var(--_sech-accent, currentColor)}.ius-sech__ic .ius-icon{font-size:var(--ius-icon-sm);line-height:1}.ius-sech__label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ius-sech__count{flex:0 0 auto}.ius-sech__action{flex:0 0 auto;display:inline-flex;align-items:center}.ius-sech__action:empty{display:none}.ius-sech__toggle{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:var(--ius-space-xs);border:0;background:transparent;padding:0;margin:0;font:inherit;color:inherit;letter-spacing:inherit;text-transform:inherit;text-align:left;cursor:pointer;border-radius:var(--ius-radius-sm)}.ius-sech__toggle:hover .ius-sech__label{color:var(--ius-text-secondary)}.ius-sech__toggle:focus-visible{outline:none;box-shadow:var(--ius-focus-ring)}\n"] }]
|
|
13285
13287
|
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], accent: [{ type: i0.Input, args: [{ isSignal: true, alias: "accent", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }], sticky: [{ type: i0.Input, args: [{ isSignal: true, alias: "sticky", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], toggle: [{ type: i0.Output, args: ["toggle"] }] } });
|
|
13286
13288
|
|
|
13289
|
+
/** Pseudo-columna de selección (misma clave que el golden). */
|
|
13290
|
+
const SEL_KEY = '__sel';
|
|
13291
|
+
/**
|
|
13292
|
+
* Table — Ius Design v2.
|
|
13293
|
+
*
|
|
13294
|
+
* **Rejilla de datos tabulares**: filas y columnas tipadas, con cabecera fija al
|
|
13295
|
+
* hacer scroll, orden por columna, selección de filas, columnas fijables
|
|
13296
|
+
* (pinned), densidades, estado de carga (skeleton) y vacío. Para listados con
|
|
13297
|
+
* muchas columnas comparables —procesos/radicados, movimientos, facturas,
|
|
13298
|
+
* pagos, consumos— donde el valor está en alinear y comparar columnas.
|
|
13299
|
+
*
|
|
13300
|
+
* Es una **tabla controlada**: el consumidor mantiene los datos ya ordenados,
|
|
13301
|
+
* filtrados y paginados, y el estado de orden/selección; `ius-table` solo
|
|
13302
|
+
* pinta la rejilla y emite los cambios (`sortChange`, `selectionChange`,
|
|
13303
|
+
* `rowClick`). No ordena ni pagina por dentro.
|
|
13304
|
+
*
|
|
13305
|
+
* **Composición**: para la barra de herramientas y la paginación numerada del
|
|
13306
|
+
* pie, envolverla en `ius-list-view` (`bordered=false` en ambos). Compone
|
|
13307
|
+
* `ius-checkbox` (selección) y `ius-empty-state` (vacío).
|
|
13308
|
+
*
|
|
13309
|
+
* Decisiones del port (golden `Table.jsx` / `Table.d.ts`):
|
|
13310
|
+
* - `render(row, i)` → `column.render: TemplateRef<IusTableCellContext>`;
|
|
13311
|
+
* `header` como nodo → `column.headerTemplate`; `empty` → `emptyTemplate`;
|
|
13312
|
+
* `summary[].value` como nodo → `summary[].template`.
|
|
13313
|
+
* - En React la sola presencia de `onRowClick` hace la fila clicable/enfocable.
|
|
13314
|
+
* Un output Angular no expone si tiene suscriptores → input explícito
|
|
13315
|
+
* `rowClickable` + output `rowClick`.
|
|
13316
|
+
* - `rowStyle` es un objeto CSS (o función que lo devuelve) consumido por el
|
|
13317
|
+
* binding `[style]`; se combina con la atenuación de `isRowDisabled`.
|
|
13318
|
+
*/
|
|
13319
|
+
class TableComponent {
|
|
13320
|
+
constructor() {
|
|
13321
|
+
this.document = inject(DOCUMENT);
|
|
13322
|
+
this.scrollRef = viewChild('scroller', /* @ts-ignore */
|
|
13323
|
+
...(ngDevMode ? [{ debugName: "scrollRef" }] : /* istanbul ignore next */ []));
|
|
13324
|
+
this.tableRef = viewChild('tabla', /* @ts-ignore */
|
|
13325
|
+
...(ngDevMode ? [{ debugName: "tableRef" }] : /* istanbul ignore next */ []));
|
|
13326
|
+
// ── Datos ─────────────────────────────────────────────────────────────
|
|
13327
|
+
/** Definición de columnas, en orden de aparición. */
|
|
13328
|
+
this.columns = input([], /* @ts-ignore */
|
|
13329
|
+
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
13330
|
+
/** Filas a renderizar (ya ordenadas/filtradas/paginadas por el consumidor). */
|
|
13331
|
+
this.data = input([], /* @ts-ignore */
|
|
13332
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
13333
|
+
/** Clave estable de fila: nombre de campo o función. Default `id`. */
|
|
13334
|
+
this.rowKey = input('id', /* @ts-ignore */
|
|
13335
|
+
...(ngDevMode ? [{ debugName: "rowKey" }] : /* istanbul ignore next */ []));
|
|
13336
|
+
// ── Orden (controlado) ────────────────────────────────────────────────
|
|
13337
|
+
/** `key` de la columna activa de orden. */
|
|
13338
|
+
this.sortColumn = input(null, /* @ts-ignore */
|
|
13339
|
+
...(ngDevMode ? [{ debugName: "sortColumn" }] : /* istanbul ignore next */ []));
|
|
13340
|
+
/** Dirección activa. */
|
|
13341
|
+
this.sortDirection = input(null, /* @ts-ignore */
|
|
13342
|
+
...(ngDevMode ? [{ debugName: "sortDirection" }] : /* istanbul ignore next */ []));
|
|
13343
|
+
// ── Selección (controlada) ────────────────────────────────────────────
|
|
13344
|
+
/** Muestra la columna de checkboxes + "Seleccionar todo" en la cabecera. */
|
|
13345
|
+
this.selectable = input(false, { ...(ngDevMode ? { debugName: "selectable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
13346
|
+
/** Claves seleccionadas (controlado). */
|
|
13347
|
+
this.selectedKeys = input([], /* @ts-ignore */
|
|
13348
|
+
...(ngDevMode ? [{ debugName: "selectedKeys" }] : /* istanbul ignore next */ []));
|
|
13349
|
+
/** Etiqueta accesible del checkbox de fila. Default `Seleccionar fila`. */
|
|
13350
|
+
this.selectAriaLabel = input('Seleccionar fila', /* @ts-ignore */
|
|
13351
|
+
...(ngDevMode ? [{ debugName: "selectAriaLabel" }] : /* istanbul ignore next */ []));
|
|
13352
|
+
// ── Interacción ───────────────────────────────────────────────────────
|
|
13353
|
+
/** Hace la fila enfocable y clicable (emite `rowClick`). Equivale a pasar `onRowClick` en el golden. */
|
|
13354
|
+
this.rowClickable = input(false, { ...(ngDevMode ? { debugName: "rowClickable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
13355
|
+
/** Marca filas no seleccionables/atenuadas. */
|
|
13356
|
+
this.isRowDisabled = input(undefined, /* @ts-ignore */
|
|
13357
|
+
...(ngDevMode ? [{ debugName: "isRowDisabled" }] : /* istanbul ignore next */ []));
|
|
13358
|
+
/** Tono por fila → barra de 3px a la izquierda de la primera celda. `null`/`undefined` = sin barra. */
|
|
13359
|
+
this.getRowAccent = input(undefined, /* @ts-ignore */
|
|
13360
|
+
...(ngDevMode ? [{ debugName: "getRowAccent" }] : /* istanbul ignore next */ []));
|
|
13361
|
+
/** Clase CSS por fila (o función `(row, i) => string`). */
|
|
13362
|
+
this.rowClassName = input(undefined, /* @ts-ignore */
|
|
13363
|
+
...(ngDevMode ? [{ debugName: "rowClassName" }] : /* istanbul ignore next */ []));
|
|
13364
|
+
/** Estilo inline por fila (o función `(row, i) => estilo`). Se combina con la atenuación de `isRowDisabled`. */
|
|
13365
|
+
this.rowStyle = input(undefined, /* @ts-ignore */
|
|
13366
|
+
...(ngDevMode ? [{ debugName: "rowStyle" }] : /* istanbul ignore next */ []));
|
|
13367
|
+
// ── Columnas ──────────────────────────────────────────────────────────
|
|
13368
|
+
/** Redimensionado de columnas por arrastre del borde de la cabecera. Default `true`. */
|
|
13369
|
+
this.resizable = input(true, { ...(ngDevMode ? { debugName: "resizable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
13370
|
+
/** Divisores verticales hairline entre columnas. Default `true`. */
|
|
13371
|
+
this.columnDividers = input(true, { ...(ngDevMode ? { debugName: "columnDividers" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
13372
|
+
// ── Estados ───────────────────────────────────────────────────────────
|
|
13373
|
+
/** Primera carga: filas skeleton en vez de datos. */
|
|
13374
|
+
this.loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
13375
|
+
/** Nº de filas skeleton mientras `loading`. Default 8. */
|
|
13376
|
+
this.skeletonRows = input(8, { ...(ngDevMode ? { debugName: "skeletonRows" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
13377
|
+
/** Plantilla propia cuando `data` está vacío (reemplaza el EmptyState por defecto). */
|
|
13378
|
+
this.emptyTemplate = input(undefined, /* @ts-ignore */
|
|
13379
|
+
...(ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []));
|
|
13380
|
+
/** Título del EmptyState por defecto. Default `Sin resultados`. */
|
|
13381
|
+
this.emptyTitle = input('Sin resultados', /* @ts-ignore */
|
|
13382
|
+
...(ngDevMode ? [{ debugName: "emptyTitle" }] : /* istanbul ignore next */ []));
|
|
13383
|
+
/** Descripción del EmptyState por defecto. */
|
|
13384
|
+
this.emptyDescription = input(undefined, /* @ts-ignore */
|
|
13385
|
+
...(ngDevMode ? [{ debugName: "emptyDescription" }] : /* istanbul ignore next */ []));
|
|
13386
|
+
// ── Visual ────────────────────────────────────────────────────────────
|
|
13387
|
+
/** Densidad. Default `medium` (= sin `data-size`: hereda `--ius-density` del ancestro). */
|
|
13388
|
+
this.size = input('medium', /* @ts-ignore */
|
|
13389
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
13390
|
+
/** Contenedor con superficie + borde + radio. Default `true`. `false` al ras (dentro de ListView/tarjeta). */
|
|
13391
|
+
this.bordered = input(true, { ...(ngDevMode ? { debugName: "bordered" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
13392
|
+
/** Filas cebra (fondo alterno). Default `false`. */
|
|
13393
|
+
this.striped = input(false, { ...(ngDevMode ? { debugName: "striped" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
13394
|
+
/** Resaltado de fila al pasar el cursor. Default `true`. */
|
|
13395
|
+
this.hover = input(true, { ...(ngDevMode ? { debugName: "hover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
13396
|
+
/** Cabecera fija al hacer scroll vertical. Default `true`. */
|
|
13397
|
+
this.stickyHeader = input(true, { ...(ngDevMode ? { debugName: "stickyHeader" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
13398
|
+
// ── Resumen ───────────────────────────────────────────────────────────
|
|
13399
|
+
/** Fila de pie fija (totales/sumas) por columna. */
|
|
13400
|
+
this.summary = input(undefined, /* @ts-ignore */
|
|
13401
|
+
...(ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []));
|
|
13402
|
+
// ── Layout ────────────────────────────────────────────────────────────
|
|
13403
|
+
/** Alto fijo del área scrollable (px o CSS). Activa el scroll vertical. */
|
|
13404
|
+
this.height = input(undefined, /* @ts-ignore */
|
|
13405
|
+
...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
13406
|
+
/** Alto máximo (px o CSS). */
|
|
13407
|
+
this.maxHeight = input(undefined, /* @ts-ignore */
|
|
13408
|
+
...(ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []));
|
|
13409
|
+
/** Etiqueta accesible de la tabla. */
|
|
13410
|
+
this.ariaLabel = input(undefined, /* @ts-ignore */
|
|
13411
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
13412
|
+
// ── Outputs ───────────────────────────────────────────────────────────
|
|
13413
|
+
/** Cambio de orden al clicar una cabecera `sortable` (tri-estado asc → desc → ninguno). */
|
|
13414
|
+
this.sortChange = output();
|
|
13415
|
+
/** Nuevo conjunto de claves seleccionadas. */
|
|
13416
|
+
this.selectionChange = output();
|
|
13417
|
+
/** Click/Enter/Espacio sobre una fila (requiere `rowClickable`). */
|
|
13418
|
+
this.rowClick = output();
|
|
13419
|
+
// ── Estado interno ────────────────────────────────────────────────────
|
|
13420
|
+
this.scrolledX = signal(false, /* @ts-ignore */
|
|
13421
|
+
...(ngDevMode ? [{ debugName: "scrolledX" }] : /* istanbul ignore next */ []));
|
|
13422
|
+
this.resizing = signal(false, /* @ts-ignore */
|
|
13423
|
+
...(ngDevMode ? [{ debugName: "resizing" }] : /* istanbul ignore next */ []));
|
|
13424
|
+
/** Anchos medidos / redimensionados por `key` (px). */
|
|
13425
|
+
this.colW = signal({}, /* @ts-ignore */
|
|
13426
|
+
...(ngDevMode ? [{ debugName: "colW" }] : /* istanbul ignore next */ []));
|
|
13427
|
+
this.measured = signal(false, /* @ts-ignore */
|
|
13428
|
+
...(ngDevMode ? [{ debugName: "measured" }] : /* istanbul ignore next */ []));
|
|
13429
|
+
this.cols = computed(() => this.columns().filter(Boolean), /* @ts-ignore */
|
|
13430
|
+
...(ngDevMode ? [{ debugName: "cols" }] : /* istanbul ignore next */ []));
|
|
13431
|
+
this.colCount = computed(() => this.cols().length + (this.selectable() ? 1 : 0), /* @ts-ignore */
|
|
13432
|
+
...(ngDevMode ? [{ debugName: "colCount" }] : /* istanbul ignore next */ []));
|
|
13433
|
+
this.selWidth = computed(() => {
|
|
13434
|
+
const s = this.size();
|
|
13435
|
+
return s === 'large' ? 52 : s === 'small' ? 40 : 44;
|
|
13436
|
+
}, /* @ts-ignore */
|
|
13437
|
+
...(ngDevMode ? [{ debugName: "selWidth" }] : /* istanbul ignore next */ []));
|
|
13438
|
+
this.isEmpty = computed(() => !this.loading() && !this.data().length, /* @ts-ignore */
|
|
13439
|
+
...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
13440
|
+
this.tableLayout = computed(() => (this.resizable() && this.measured() ? 'fixed' : 'auto'), /* @ts-ignore */
|
|
13441
|
+
...(ngDevMode ? [{ debugName: "tableLayout" }] : /* istanbul ignore next */ []));
|
|
13442
|
+
this.skeletonIdx = computed(() => Array.from({ length: Math.max(0, this.skeletonRows()) }, (_, i) => i), /* @ts-ignore */
|
|
13443
|
+
...(ngDevMode ? [{ debugName: "skeletonIdx" }] : /* istanbul ignore next */ []));
|
|
13444
|
+
this.showSummary = computed(() => {
|
|
13445
|
+
const s = this.summary();
|
|
13446
|
+
return !!(s && s.length && this.data().length && !this.loading());
|
|
13447
|
+
}, /* @ts-ignore */
|
|
13448
|
+
...(ngDevMode ? [{ debugName: "showSummary" }] : /* istanbul ignore next */ []));
|
|
13449
|
+
/** Firma de estructura: al cambiar, se descartan los anchos medidos. */
|
|
13450
|
+
this.colsSig = computed(() => this.cols().map(c => c.key).join('|'), /* @ts-ignore */
|
|
13451
|
+
...(ngDevMode ? [{ debugName: "colsSig" }] : /* istanbul ignore next */ []));
|
|
13452
|
+
// ── Selección ─────────────────────────────────────────────────────────
|
|
13453
|
+
this.selSet = computed(() => new Set(this.selectedKeys() ?? []), /* @ts-ignore */
|
|
13454
|
+
...(ngDevMode ? [{ debugName: "selSet" }] : /* istanbul ignore next */ []));
|
|
13455
|
+
this.allKeys = computed(() => {
|
|
13456
|
+
const dis = this.isRowDisabled();
|
|
13457
|
+
const rk = this.rowKey();
|
|
13458
|
+
const keys = [];
|
|
13459
|
+
this.data().forEach((r, i) => {
|
|
13460
|
+
if (!(dis && dis(r, i)))
|
|
13461
|
+
keys.push(this.keyOf(r, rk, i));
|
|
13462
|
+
});
|
|
13463
|
+
return keys;
|
|
13464
|
+
}, /* @ts-ignore */
|
|
13465
|
+
...(ngDevMode ? [{ debugName: "allKeys" }] : /* istanbul ignore next */ []));
|
|
13466
|
+
this.allSelected = computed(() => {
|
|
13467
|
+
const all = this.allKeys();
|
|
13468
|
+
if (!all.length)
|
|
13469
|
+
return false;
|
|
13470
|
+
const set = this.selSet();
|
|
13471
|
+
return all.every(k => set.has(k));
|
|
13472
|
+
}, /* @ts-ignore */
|
|
13473
|
+
...(ngDevMode ? [{ debugName: "allSelected" }] : /* istanbul ignore next */ []));
|
|
13474
|
+
this.someSelected = computed(() => {
|
|
13475
|
+
if (this.allSelected())
|
|
13476
|
+
return false;
|
|
13477
|
+
const set = this.selSet();
|
|
13478
|
+
return this.allKeys().some(k => set.has(k));
|
|
13479
|
+
}, /* @ts-ignore */
|
|
13480
|
+
...(ngDevMode ? [{ debugName: "someSelected" }] : /* istanbul ignore next */ []));
|
|
13481
|
+
// ── Pinning: offsets acumulados ───────────────────────────────────────
|
|
13482
|
+
this.pinInfo = computed(() => {
|
|
13483
|
+
const info = new Map();
|
|
13484
|
+
const cols = this.cols();
|
|
13485
|
+
const selectable = this.selectable();
|
|
13486
|
+
const selWidth = this.selWidth();
|
|
13487
|
+
const colW = this.colW();
|
|
13488
|
+
const widthOf = (key, col) => {
|
|
13489
|
+
if (key === SEL_KEY)
|
|
13490
|
+
return colW[SEL_KEY] || selWidth;
|
|
13491
|
+
if (colW[key] != null)
|
|
13492
|
+
return colW[key];
|
|
13493
|
+
if (col && typeof col.width === 'number')
|
|
13494
|
+
return col.width;
|
|
13495
|
+
return undefined;
|
|
13496
|
+
};
|
|
13497
|
+
const left = [];
|
|
13498
|
+
const right = [];
|
|
13499
|
+
if (selectable)
|
|
13500
|
+
left.push({ key: SEL_KEY, col: null });
|
|
13501
|
+
for (const c of cols) {
|
|
13502
|
+
if (c.pinned === 'start' || c.pinned === true)
|
|
13503
|
+
left.push({ key: c.key, col: c });
|
|
13504
|
+
else if (c.pinned === 'end')
|
|
13505
|
+
right.push({ key: c.key, col: c });
|
|
13506
|
+
}
|
|
13507
|
+
let acc = 0;
|
|
13508
|
+
left.forEach((e, i) => {
|
|
13509
|
+
info.set(e.key, { side: 'start', offset: acc, edge: i === left.length - 1 });
|
|
13510
|
+
acc += widthOf(e.key, e.col) || (e.key === SEL_KEY ? selWidth : 160);
|
|
13511
|
+
});
|
|
13512
|
+
acc = 0;
|
|
13513
|
+
[...right].reverse().forEach(e => {
|
|
13514
|
+
info.set(e.key, { side: 'end', offset: acc, edge: false });
|
|
13515
|
+
acc += widthOf(e.key, e.col) || 160;
|
|
13516
|
+
});
|
|
13517
|
+
return info;
|
|
13518
|
+
}, /* @ts-ignore */
|
|
13519
|
+
...(ngDevMode ? [{ debugName: "pinInfo" }] : /* istanbul ignore next */ []));
|
|
13520
|
+
this.selKey = SEL_KEY;
|
|
13521
|
+
// Re-medir si cambia la estructura/densidad (useEffect [colsSig, size, selectable]).
|
|
13522
|
+
effect(() => {
|
|
13523
|
+
this.colsSig();
|
|
13524
|
+
this.size();
|
|
13525
|
+
this.selectable();
|
|
13526
|
+
untracked(() => {
|
|
13527
|
+
this.colW.set({});
|
|
13528
|
+
this.measured.set(false);
|
|
13529
|
+
});
|
|
13530
|
+
});
|
|
13531
|
+
// Medición inicial de anchos para fijar `table-layout: fixed` (useLayoutEffect).
|
|
13532
|
+
afterRenderEffect(() => {
|
|
13533
|
+
if (!this.resizable() || this.measured() || this.loading() || !this.data().length)
|
|
13534
|
+
return;
|
|
13535
|
+
const next = untracked(() => this.measureAll());
|
|
13536
|
+
if (Object.keys(next).length) {
|
|
13537
|
+
this.colW.set(next);
|
|
13538
|
+
this.measured.set(true);
|
|
13539
|
+
}
|
|
13540
|
+
});
|
|
13541
|
+
}
|
|
13542
|
+
// ── Helpers de plantilla ──────────────────────────────────────────────
|
|
13543
|
+
keyOf(row, rowKey, i) {
|
|
13544
|
+
if (typeof rowKey === 'function')
|
|
13545
|
+
return rowKey(row, i);
|
|
13546
|
+
const r = row;
|
|
13547
|
+
if (rowKey && r && r[rowKey] != null)
|
|
13548
|
+
return r[rowKey];
|
|
13549
|
+
if (r && r['id'] != null)
|
|
13550
|
+
return r['id'];
|
|
13551
|
+
return i;
|
|
13552
|
+
}
|
|
13553
|
+
rowKeyOf(row, i) {
|
|
13554
|
+
return this.keyOf(row, this.rowKey(), i);
|
|
13555
|
+
}
|
|
13556
|
+
alignOf(c) {
|
|
13557
|
+
return c.align || (c.numeric ? 'end' : 'start');
|
|
13558
|
+
}
|
|
13559
|
+
dirOf(key) {
|
|
13560
|
+
return this.sortColumn() === key ? this.sortDirection() || 'asc' : null;
|
|
13561
|
+
}
|
|
13562
|
+
sortIcon(key) {
|
|
13563
|
+
const d = this.dirOf(key);
|
|
13564
|
+
return d === 'desc' ? 'keyboard_arrow_down' : d === 'asc' ? 'keyboard_arrow_up' : 'unfold_more';
|
|
13565
|
+
}
|
|
13566
|
+
ariaSort(key) {
|
|
13567
|
+
const d = this.dirOf(key);
|
|
13568
|
+
return d === 'asc' ? 'ascending' : d === 'desc' ? 'descending' : null;
|
|
13569
|
+
}
|
|
13570
|
+
/** La última columna no es redimensionable (no hay columna a su derecha). */
|
|
13571
|
+
canResize(c, ci) {
|
|
13572
|
+
return this.resizable() && c.resizable !== false && ci < this.cols().length - 1;
|
|
13573
|
+
}
|
|
13574
|
+
colWidth(key, fallback) {
|
|
13575
|
+
const w = this.colW()[key];
|
|
13576
|
+
return this.px(w != null ? w : fallback);
|
|
13577
|
+
}
|
|
13578
|
+
selColWidth() {
|
|
13579
|
+
return this.px(this.colW()[SEL_KEY] || this.selWidth());
|
|
13580
|
+
}
|
|
13581
|
+
pinSide(key) {
|
|
13582
|
+
return this.pinInfo().get(key)?.side ?? null;
|
|
13583
|
+
}
|
|
13584
|
+
pinEdge(key) {
|
|
13585
|
+
const p = this.pinInfo().get(key);
|
|
13586
|
+
return p && p.side === 'start' && p.edge ? 'true' : null;
|
|
13587
|
+
}
|
|
13588
|
+
pinLeft(key) {
|
|
13589
|
+
const p = this.pinInfo().get(key);
|
|
13590
|
+
return p && p.side === 'start' ? this.px(p.offset) : null;
|
|
13591
|
+
}
|
|
13592
|
+
pinRight(key) {
|
|
13593
|
+
const p = this.pinInfo().get(key);
|
|
13594
|
+
return p && p.side === 'end' ? this.px(p.offset) : null;
|
|
13595
|
+
}
|
|
13596
|
+
px(v) {
|
|
13597
|
+
if (v == null || v === '')
|
|
13598
|
+
return null;
|
|
13599
|
+
return typeof v === 'number' ? `${v}px` : v;
|
|
13600
|
+
}
|
|
13601
|
+
cellValue(row, c) {
|
|
13602
|
+
return row[c.key];
|
|
13603
|
+
}
|
|
13604
|
+
isBlank(v) {
|
|
13605
|
+
return v == null || v === '';
|
|
13606
|
+
}
|
|
13607
|
+
cellTitle(row, c) {
|
|
13608
|
+
if (c.render)
|
|
13609
|
+
return c.headerTitle ?? null;
|
|
13610
|
+
const v = this.cellValue(row, c);
|
|
13611
|
+
return typeof v === 'string' ? v : (c.headerTitle ?? null);
|
|
13612
|
+
}
|
|
13613
|
+
cellContext(row, i, c) {
|
|
13614
|
+
return { $implicit: row, row, index: i, column: c, value: this.cellValue(row, c) };
|
|
13615
|
+
}
|
|
13616
|
+
headerContext(c) {
|
|
13617
|
+
return { $implicit: c, column: c };
|
|
13618
|
+
}
|
|
13619
|
+
isDisabled(row, i) {
|
|
13620
|
+
const f = this.isRowDisabled();
|
|
13621
|
+
return !!(f && f(row, i));
|
|
13622
|
+
}
|
|
13623
|
+
isSelected(row, i) {
|
|
13624
|
+
return this.selSet().has(this.rowKeyOf(row, i));
|
|
13625
|
+
}
|
|
13626
|
+
isClickable(row, i) {
|
|
13627
|
+
return this.rowClickable() && !this.isDisabled(row, i);
|
|
13628
|
+
}
|
|
13629
|
+
rowClass(row, i) {
|
|
13630
|
+
const rc = this.rowClassName();
|
|
13631
|
+
const v = typeof rc === 'function' ? rc(row, i) : rc;
|
|
13632
|
+
return v || null;
|
|
13633
|
+
}
|
|
13634
|
+
/** `{ ...(disabled ? { opacity: .55 } : null), ...rowStyle }` del golden. */
|
|
13635
|
+
rowStyles(row, i) {
|
|
13636
|
+
const rs = this.rowStyle();
|
|
13637
|
+
const own = typeof rs === 'function' ? rs(row, i) : rs;
|
|
13638
|
+
const disabled = this.isDisabled(row, i);
|
|
13639
|
+
if (!disabled && !own)
|
|
13640
|
+
return null;
|
|
13641
|
+
return { ...(disabled ? { opacity: 0.55 } : null), ...(own || null) };
|
|
13642
|
+
}
|
|
13643
|
+
/** Barra de acento (3px) sobre la primera celda de la fila; `null` = sin barra. */
|
|
13644
|
+
accentShadow(row, i) {
|
|
13645
|
+
const f = this.getRowAccent();
|
|
13646
|
+
const tone = f ? f(row, i) : null;
|
|
13647
|
+
if (!tone)
|
|
13648
|
+
return null;
|
|
13649
|
+
const color = tone === 'neutral' ? 'var(--ius-stroke-strong)' : `var(--ius-${tone}-500)`;
|
|
13650
|
+
return `inset 3px 0 0 0 ${color}`;
|
|
13651
|
+
}
|
|
13652
|
+
skelWidth(c, ci) {
|
|
13653
|
+
return ci === 0 ? '72%' : c.numeric ? '42%' : '85%';
|
|
13654
|
+
}
|
|
13655
|
+
summaryCell(key) {
|
|
13656
|
+
return this.summary()?.find(s => s.key === key);
|
|
13657
|
+
}
|
|
13658
|
+
// ── Handlers ──────────────────────────────────────────────────────────
|
|
13659
|
+
onScroll() {
|
|
13660
|
+
const el = this.scrollRef()?.nativeElement;
|
|
13661
|
+
if (el)
|
|
13662
|
+
this.scrolledX.set(el.scrollLeft > 0);
|
|
13663
|
+
}
|
|
13664
|
+
onHeaderSort(col) {
|
|
13665
|
+
if (!col.sortable)
|
|
13666
|
+
return;
|
|
13667
|
+
const cur = this.sortColumn() === col.key ? this.sortDirection() : null;
|
|
13668
|
+
const next = cur === 'asc' ? 'desc' : cur === 'desc' ? null : 'asc';
|
|
13669
|
+
this.sortChange.emit({ column: next ? col.key : null, direction: next });
|
|
13670
|
+
}
|
|
13671
|
+
toggleAll(checked) {
|
|
13672
|
+
this.selectionChange.emit(checked ? this.allKeys().slice() : []);
|
|
13673
|
+
}
|
|
13674
|
+
toggleRow(key, checked) {
|
|
13675
|
+
const next = new Set(this.selSet());
|
|
13676
|
+
if (checked)
|
|
13677
|
+
next.add(key);
|
|
13678
|
+
else
|
|
13679
|
+
next.delete(key);
|
|
13680
|
+
this.selectionChange.emit([...next]);
|
|
13681
|
+
}
|
|
13682
|
+
onRowClick(row, i, event) {
|
|
13683
|
+
if (!this.isClickable(row, i))
|
|
13684
|
+
return;
|
|
13685
|
+
this.rowClick.emit({ row, index: i, event });
|
|
13686
|
+
}
|
|
13687
|
+
onRowKeydown(row, i, event) {
|
|
13688
|
+
if (!this.isClickable(row, i))
|
|
13689
|
+
return;
|
|
13690
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
13691
|
+
event.preventDefault();
|
|
13692
|
+
this.rowClick.emit({ row, index: i, event });
|
|
13693
|
+
}
|
|
13694
|
+
}
|
|
13695
|
+
// ── Redimensionado por arrastre ───────────────────────────────────────
|
|
13696
|
+
measureAll() {
|
|
13697
|
+
const table = this.tableRef()?.nativeElement;
|
|
13698
|
+
if (!table)
|
|
13699
|
+
return {};
|
|
13700
|
+
const next = {};
|
|
13701
|
+
if (this.selectable())
|
|
13702
|
+
next[SEL_KEY] = this.selWidth();
|
|
13703
|
+
for (const c of this.cols()) {
|
|
13704
|
+
const th = table.querySelector(`thead th[data-key="${c.key}"]`);
|
|
13705
|
+
if (th)
|
|
13706
|
+
next[c.key] = Math.round(th.getBoundingClientRect().width);
|
|
13707
|
+
}
|
|
13708
|
+
return next;
|
|
13709
|
+
}
|
|
13710
|
+
startResize(e, col) {
|
|
13711
|
+
e.preventDefault();
|
|
13712
|
+
e.stopPropagation();
|
|
13713
|
+
let base = this.colW();
|
|
13714
|
+
if (!this.measured() || base[col.key] == null) {
|
|
13715
|
+
base = { ...this.measureAll(), ...base };
|
|
13716
|
+
this.colW.set(base);
|
|
13717
|
+
this.measured.set(true);
|
|
13718
|
+
}
|
|
13719
|
+
const startX = e.clientX;
|
|
13720
|
+
const startW = base[col.key] || 160;
|
|
13721
|
+
const minW = typeof col.minWidth === 'number' ? col.minWidth : 64;
|
|
13722
|
+
this.resizing.set(true);
|
|
13723
|
+
const win = this.document.defaultView;
|
|
13724
|
+
const body = this.document.body;
|
|
13725
|
+
const onMove = (ev) => {
|
|
13726
|
+
const dx = ev.clientX - startX;
|
|
13727
|
+
this.colW.update(prev => ({ ...prev, [col.key]: Math.max(minW, Math.round(startW + dx)) }));
|
|
13728
|
+
};
|
|
13729
|
+
const onUp = () => {
|
|
13730
|
+
win?.removeEventListener('mousemove', onMove);
|
|
13731
|
+
win?.removeEventListener('mouseup', onUp);
|
|
13732
|
+
body.style.cursor = '';
|
|
13733
|
+
body.style.userSelect = '';
|
|
13734
|
+
this.resizing.set(false);
|
|
13735
|
+
};
|
|
13736
|
+
win?.addEventListener('mousemove', onMove);
|
|
13737
|
+
win?.addEventListener('mouseup', onUp);
|
|
13738
|
+
body.style.cursor = 'col-resize';
|
|
13739
|
+
body.style.userSelect = 'none';
|
|
13740
|
+
}
|
|
13741
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13742
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: TableComponent, isStandalone: true, selector: "ius-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, sortColumn: { classPropertyName: "sortColumn", publicName: "sortColumn", isSignal: true, isRequired: false, transformFunction: null }, sortDirection: { classPropertyName: "sortDirection", publicName: "sortDirection", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selectedKeys: { classPropertyName: "selectedKeys", publicName: "selectedKeys", isSignal: true, isRequired: false, transformFunction: null }, selectAriaLabel: { classPropertyName: "selectAriaLabel", publicName: "selectAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, rowClickable: { classPropertyName: "rowClickable", publicName: "rowClickable", isSignal: true, isRequired: false, transformFunction: null }, isRowDisabled: { classPropertyName: "isRowDisabled", publicName: "isRowDisabled", isSignal: true, isRequired: false, transformFunction: null }, getRowAccent: { classPropertyName: "getRowAccent", publicName: "getRowAccent", isSignal: true, isRequired: false, transformFunction: null }, rowClassName: { classPropertyName: "rowClassName", publicName: "rowClassName", isSignal: true, isRequired: false, transformFunction: null }, rowStyle: { classPropertyName: "rowStyle", publicName: "rowStyle", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, columnDividers: { classPropertyName: "columnDividers", publicName: "columnDividers", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, skeletonRows: { classPropertyName: "skeletonRows", publicName: "skeletonRows", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null }, emptyTitle: { classPropertyName: "emptyTitle", publicName: "emptyTitle", isSignal: true, isRequired: false, transformFunction: null }, emptyDescription: { classPropertyName: "emptyDescription", publicName: "emptyDescription", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, hover: { classPropertyName: "hover", publicName: "hover", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sortChange: "sortChange", selectionChange: "selectionChange", rowClick: "rowClick" }, host: { properties: { "attr.data-size": "size() !== 'medium' ? size() : null", "attr.data-bordered": "bordered() ? 'true' : 'false'", "attr.data-striped": "striped() ? 'true' : 'false'", "attr.data-hover": "hover() ? 'true' : 'false'", "attr.data-col-dividers": "columnDividers() ? 'true' : 'false'", "attr.data-sticky-header": "stickyHeader() ? 'true' : 'false'", "attr.data-clickable": "rowClickable() ? 'true' : 'false'", "attr.data-scrolled-x": "scrolledX() ? 'true' : 'false'", "attr.data-resizing": "resizing() ? 'true' : 'false'" }, classAttribute: "ius-table-wrap" }, viewQueries: [{ propertyName: "scrollRef", first: true, predicate: ["scroller"], descendants: true, isSignal: true }, { propertyName: "tableRef", first: true, predicate: ["tabla"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Encabezado de columna: \u00EDcono + label + control de orden (unfold_more siempre visible). -->\n<ng-template #hcell let-c>\n <span class=\"ius-table__hcell\">\n @if (c.headerIcon) {\n <span translate=\"no\" class=\"ius-icon ius-table__sorticon\" style=\"opacity: 1\">{{ c.headerIcon }}</span>\n }\n <span class=\"ius-table__hlabel\">\n @if (c.headerTemplate) {\n <ng-container *ngTemplateOutlet=\"c.headerTemplate; context: headerContext(c)\" />\n } @else {\n {{ c.header }}\n }\n </span>\n @if (c.sortable) {\n <span translate=\"no\" class=\"ius-icon ius-table__sorticon\" aria-hidden=\"true\">{{ sortIcon(c.key) }}</span>\n }\n </span>\n</ng-template>\n\n<div\n #scroller\n class=\"ius-table-scroll ius-scroll\"\n [style.height]=\"px(height())\"\n [style.max-height]=\"px(maxHeight())\"\n (scroll)=\"onScroll()\"\n>\n <table\n #tabla\n class=\"ius-table\"\n role=\"table\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.data-empty]=\"isEmpty() ? 'true' : null\"\n [style.table-layout]=\"tableLayout()\"\n >\n <!-- \u2500\u2500 colgroup (anchos efectivos) \u2500\u2500 -->\n <colgroup>\n @if (selectable()) {\n <col [style.width]=\"selColWidth()\" />\n }\n @for (c of cols(); track c.key) {\n <col [style.width]=\"colWidth(c.key, c.width)\" />\n }\n </colgroup>\n\n <!-- \u2500\u2500 head \u2500\u2500 -->\n <thead>\n <tr>\n @if (selectable()) {\n <th\n class=\"ius-table__selcell\"\n [attr.data-pinned]=\"pinSide(selKey)\"\n [attr.data-pinned-edge]=\"pinEdge(selKey)\"\n [style.left]=\"pinLeft(selKey)\"\n [style.right]=\"pinRight(selKey)\"\n >\n <ius-checkbox\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (checkedChange)=\"toggleAll($event)\"\n size=\"small\"\n ariaLabel=\"Seleccionar todo\"\n />\n </th>\n }\n @for (c of cols(); track c.key; let ci = $index) {\n <th\n [attr.data-key]=\"c.key\"\n [attr.data-align]=\"alignOf(c)\"\n [attr.data-sorted]=\"dirOf(c.key) ? 'true' : null\"\n [attr.aria-sort]=\"ariaSort(c.key)\"\n [attr.title]=\"c.headerTitle ?? null\"\n [attr.data-pinned]=\"pinSide(c.key)\"\n [attr.data-pinned-edge]=\"pinEdge(c.key)\"\n [style.left]=\"pinLeft(c.key)\"\n [style.right]=\"pinRight(c.key)\"\n >\n @if (c.sortable) {\n <button type=\"button\" class=\"ius-table__sortbtn\" (click)=\"onHeaderSort(c)\">\n <ng-container *ngTemplateOutlet=\"hcell; context: { $implicit: c }\" />\n </button>\n } @else {\n <ng-container *ngTemplateOutlet=\"hcell; context: { $implicit: c }\" />\n }\n @if (canResize(c, ci)) {\n <span\n class=\"ius-table__resizer\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"'Ajustar ancho de ' + (c.header || 'columna')\"\n (mousedown)=\"startResize($event, c)\"\n (click)=\"$event.stopPropagation()\"\n ></span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <!-- \u2500\u2500 body \u2500\u2500 -->\n @if (loading()) {\n <tbody>\n @for (ri of skeletonIdx(); track ri) {\n <tr class=\"ius-table__skel-row\">\n @if (selectable()) {\n <td class=\"ius-table__selcell\">\n <span class=\"ius-table__skel\" style=\"width: 16px; margin: 0 auto\"></span>\n </td>\n }\n @for (c of cols(); track c.key; let ci = $index) {\n <td [attr.data-align]=\"alignOf(c)\">\n <span\n class=\"ius-table__skel\"\n [style.width]=\"skelWidth(c, ci)\"\n [style.margin-left]=\"alignOf(c) === 'end' ? 'auto' : '0'\"\n ></span>\n </td>\n }\n </tr>\n }\n </tbody>\n } @else if (!data().length) {\n <tbody>\n <tr>\n <td [attr.colspan]=\"colCount()\" style=\"border-bottom: 0\">\n <div class=\"ius-table__block\">\n @if (emptyTemplate(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <ius-empty-state\n variant=\"no-results\"\n size=\"compact\"\n [title]=\"emptyTitle()\"\n [description]=\"emptyDescription()\"\n />\n }\n </div>\n </td>\n </tr>\n </tbody>\n } @else {\n <tbody>\n @for (row of data(); track rowKeyOf(row, $index); let ri = $index) {\n <tr\n [class]=\"rowClass(row, ri)\"\n [attr.data-selected]=\"isSelected(row, ri) ? 'true' : null\"\n [attr.tabindex]=\"isClickable(row, ri) ? 0 : null\"\n [style]=\"rowStyles(row, ri)\"\n (click)=\"onRowClick(row, ri, $event)\"\n (keydown)=\"onRowKeydown(row, ri, $event)\"\n >\n @if (selectable()) {\n <td\n class=\"ius-table__selcell\"\n [attr.data-pinned]=\"pinSide(selKey)\"\n [attr.data-pinned-edge]=\"pinEdge(selKey)\"\n [style.left]=\"pinLeft(selKey)\"\n [style.right]=\"pinRight(selKey)\"\n [style.box-shadow]=\"accentShadow(row, ri)\"\n (click)=\"$event.stopPropagation()\"\n >\n <ius-checkbox\n [checked]=\"isSelected(row, ri)\"\n (checkedChange)=\"toggleRow(rowKeyOf(row, ri), $event)\"\n size=\"small\"\n [disabled]=\"isDisabled(row, ri)\"\n [ariaLabel]=\"selectAriaLabel()\"\n />\n </td>\n }\n @for (c of cols(); track c.key; let ci = $index) {\n <td\n [attr.data-align]=\"alignOf(c)\"\n [attr.data-numeric]=\"c.numeric ? 'true' : null\"\n [attr.title]=\"cellTitle(row, c)\"\n [attr.data-pinned]=\"pinSide(c.key)\"\n [attr.data-pinned-edge]=\"pinEdge(c.key)\"\n [style.left]=\"pinLeft(c.key)\"\n [style.right]=\"pinRight(c.key)\"\n [style.box-shadow]=\"!selectable() && ci === 0 ? accentShadow(row, ri) : null\"\n >\n @if (c.render) {\n <ng-container *ngTemplateOutlet=\"c.render; context: cellContext(row, ri, c)\" />\n } @else if (isBlank(cellValue(row, c))) {\n <span class=\"ius-table__muted\">\u2014</span>\n } @else {\n {{ cellValue(row, c) }}\n }\n </td>\n }\n </tr>\n }\n </tbody>\n }\n\n <!-- \u2500\u2500 footer resumen \u2500\u2500 -->\n @if (showSummary()) {\n <tfoot>\n <tr>\n @if (selectable()) {\n <td class=\"ius-table__selcell\"></td>\n }\n @for (c of cols(); track c.key) {\n <td [attr.data-align]=\"alignOf(c)\">\n @if (summaryCell(c.key); as cell) {\n @if (cell.template) {\n <ng-container *ngTemplateOutlet=\"cell.template; context: { $implicit: cell }\" />\n } @else {\n {{ cell.value }}\n }\n }\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;min-height:0;min-width:0;max-width:100%;width:100%;font-family:var(--ius-font-body);box-sizing:border-box;--_t-py: var(--ius-space-sm);--_t-px: var(--ius-space-md);--_t-fs: var(--ius-fs-base);--_t-lh: var(--ius-lh-base);--_t-head-fs: var(--ius-fs-sm);--_t-head-lh: var(--ius-lh-sm);--_t-icon: var(--ius-icon-sm)}:host([data-size=small]){--_t-py: var(--ius-space-xs);--_t-px: var(--ius-space-sm);--_t-fs: var(--ius-fs-sm);--_t-lh: var(--ius-lh-sm)}@container style(--ius-density: small){:host(:not([data-size])){--_t-py: var(--ius-space-xs);--_t-px: var(--ius-space-sm);--_t-fs: var(--ius-fs-sm);--_t-lh: var(--ius-lh-sm)}}@container style(--ius-density: large){:host(:not([data-size])){--_t-py: var(--ius-space-md);--_t-px: var(--ius-space-md);--_t-fs: var(--ius-fs-base);--_t-lh: var(--ius-lh-base)}}:host([data-size=large]){--_t-py: var(--ius-space-md);--_t-px: var(--ius-space-md);--_t-fs: var(--ius-fs-base);--_t-lh: var(--ius-lh-base)}:host([data-bordered=true]){background:var(--ius-surface-card);border:1px solid var(--ius-stroke);border-radius:var(--ius-radius-lg);overflow:hidden}.ius-table-scroll{flex:1 1 auto;min-height:0;min-width:0;width:100%;overflow:auto}:host([data-bordered=true]) .ius-table-scroll{--_sb-track-margin: var(--ius-radius-lg);--_sb-track-margin-x: var(--ius-radius-lg)}.ius-table{border-collapse:separate;border-spacing:0;width:100%;font-variant-numeric:tabular-nums}.ius-table thead th{position:sticky;top:0;z-index:2;background:var(--ius-surface-card);color:var(--ius-text-tertiary);font-family:var(--ius-font-display);font-weight:var(--ius-fw-medium);font-size:var(--_t-head-fs);line-height:var(--_t-head-lh);letter-spacing:.01em;text-align:left;vertical-align:middle;white-space:nowrap;padding:var(--_t-py) var(--_t-px);border-bottom:1px solid var(--ius-stroke-strong);box-sizing:border-box}:host([data-sticky-header=false]) thead th{position:relative}.ius-table thead th[data-align=end]{text-align:right}.ius-table thead th[data-align=center]{text-align:center}.ius-table__hcell{display:inline-flex;align-items:center;gap:var(--ius-space-xxs);max-width:100%}.ius-table th[data-align=end] .ius-table__hcell{flex-direction:row-reverse}.ius-table th[data-align=center] .ius-table__hcell{justify-content:center}.ius-table__hlabel{overflow:hidden;text-overflow:ellipsis}.ius-table__sortbtn{appearance:none;border:0;background:transparent;margin:0;padding:0;display:inline-flex;align-items:center;gap:var(--ius-space-xxs);font:inherit;color:inherit;cursor:pointer;max-width:100%;border-radius:var(--ius-radius-sm);transition:color var(--ius-duration-fast) var(--ius-ease-standard);-webkit-user-select:none;user-select:none}.ius-table__sortbtn:hover{color:var(--ius-text-primary)}.ius-table__sortbtn:focus-visible{outline:none;box-shadow:var(--ius-focus-ring)}.ius-table th[data-sorted=true] .ius-table__sortbtn{color:var(--ius-text-primary);font-weight:var(--ius-fw-bold)}.ius-table__sorticon{font-size:var(--_t-icon);line-height:1;flex:0 0 auto;opacity:1;transition:opacity var(--ius-duration-fast) var(--ius-ease-standard),color var(--ius-duration-fast) var(--ius-ease-standard)}.ius-table__sortbtn .ius-table__sorticon{color:var(--ius-text-tertiary);opacity:.75}.ius-table__sortbtn:hover .ius-table__sorticon{opacity:1;color:var(--ius-text-secondary)}.ius-table th[data-sorted=true] .ius-table__sorticon{opacity:1;color:var(--ius-text-primary)}.ius-table__resizer{position:absolute;top:0;right:-4px;width:9px;height:100%;cursor:col-resize;z-index:4;touch-action:none;-webkit-user-select:none;user-select:none}.ius-table__resizer:after{content:\"\";position:absolute;top:18%;bottom:18%;right:4px;width:2px;border-radius:var(--ius-radius-pill);background:transparent;transition:background var(--ius-duration-fast) var(--ius-ease-standard)}.ius-table thead th:hover .ius-table__resizer:after{background:var(--ius-stroke-strong)}.ius-table__resizer:hover:after{background:var(--ius-primary-500)}:host([data-resizing=true]) .ius-table__resizer:after{background:var(--ius-primary-500)}.ius-table tbody td{padding:var(--_t-py) var(--_t-px);font-size:var(--_t-fs);line-height:var(--_t-lh);color:var(--ius-text-primary);vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-bottom:1px solid var(--ius-neutral-3);background:var(--ius-surface-card);box-sizing:border-box}.ius-table tbody tr:last-child td{border-bottom:0}.ius-table td[data-align=end]{text-align:right}.ius-table td[data-align=center]{text-align:center}.ius-table td[data-numeric=true]{font-variant-numeric:tabular-nums}.ius-table__muted{color:var(--ius-text-tertiary)}:host([data-col-dividers=true]) thead th:not(:last-child),:host([data-col-dividers=true]) tbody td:not(:last-child),:host([data-col-dividers=true]) tfoot td:not(:last-child){border-right:1px solid var(--ius-neutral-3)}:host([data-striped=true]) tbody tr:nth-child(2n) td{background:var(--ius-neutral-1)}:host([data-hover=true]) tbody tr:hover td{box-shadow:inset 0 1px 0 0 var(--ius-info-200),inset 0 -1px 0 0 var(--ius-info-200)}:host([data-clickable=true]) tbody tr{cursor:pointer}:host([data-clickable=true]) tbody tr:active td{background:var(--ius-info-100)}.ius-table tbody tr:focus-visible{outline:none}.ius-table tbody tr:focus-visible td{box-shadow:inset 0 0 0 2px var(--ius-stroke-focus)}.ius-table thead th.ius-table__selcell,.ius-table tbody td.ius-table__selcell,.ius-table tfoot td.ius-table__selcell{text-align:center;overflow:visible;text-overflow:clip}.ius-table__selcell>*{vertical-align:middle}.ius-table th[data-pinned],.ius-table td[data-pinned]{position:sticky;z-index:1}.ius-table thead th[data-pinned]{z-index:3}.ius-table th[data-pinned=end],.ius-table td[data-pinned=end]{box-shadow:-1px 0 0 0 var(--ius-stroke)}:host([data-scrolled-x=true]) th[data-pinned=start][data-pinned-edge=true],:host([data-scrolled-x=true]) td[data-pinned=start][data-pinned-edge=true]{box-shadow:1px 0 0 0 var(--ius-stroke),5px 0 7px -5px var(--ius-stroke-strong)}.ius-table tfoot td{position:sticky;bottom:0;z-index:2;padding:var(--_t-py) var(--_t-px);font-size:var(--_t-fs);line-height:var(--_t-lh);font-weight:var(--ius-fw-bold);color:var(--ius-text-primary);background:var(--ius-neutral-1);border-top:1px solid var(--ius-stroke-strong);font-variant-numeric:tabular-nums;box-sizing:border-box;white-space:nowrap}.ius-table tfoot td[data-align=end]{text-align:right}.ius-table tfoot td[data-align=center]{text-align:center}.ius-table__block{padding:var(--ius-space-2xl) var(--ius-space-lg);display:grid;place-items:center;box-sizing:border-box}.ius-table[data-empty=true]{height:100%}.ius-table[data-empty=true]>tbody{height:100%}.ius-table[data-empty=true]>tbody>tr>td{height:100%}.ius-table[data-empty=true] .ius-table__block{min-height:100%}.ius-table__skel-row td{border-bottom:1px solid var(--ius-neutral-3);background:var(--ius-surface-card)}.ius-table__skel{display:block;height:var(--_t-fs);border-radius:var(--ius-radius-sm);background:linear-gradient(90deg,var(--ius-neutral-2) 25%,var(--ius-neutral-3) 37%,var(--ius-neutral-2) 63%);background-size:400% 100%;animation:ius-table-shimmer 1.4s ease infinite}@keyframes ius-table-shimmer{0%{background-position:100% 50%}to{background-position:0 50%}}@media(prefers-reduced-motion:reduce){.ius-table__skel{animation:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CheckboxComponent, selector: "ius-checkbox", inputs: ["label", "labelPosition", "showIconHelp", "iconHelpTitle", "iconHelpContent", "name", "value", "ariaLabel", "size", "checked", "defaultChecked", "indeterminate", "disabled"], outputs: ["checkedChange"] }, { kind: "component", type: EmptyStateComponent, selector: "ius-empty-state", inputs: ["variant", "size", "tone", "icon", "illustration", "illustrationTemplate", "title", "description", "primaryAction", "secondaryAction", "actionsTemplate", "role"], outputs: ["primaryClick", "secondaryClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13743
|
+
}
|
|
13744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TableComponent, decorators: [{
|
|
13745
|
+
type: Component,
|
|
13746
|
+
args: [{ selector: 'ius-table', standalone: true, imports: [NgTemplateOutlet, CheckboxComponent, EmptyStateComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
13747
|
+
class: 'ius-table-wrap',
|
|
13748
|
+
'[attr.data-size]': "size() !== 'medium' ? size() : null",
|
|
13749
|
+
'[attr.data-bordered]': "bordered() ? 'true' : 'false'",
|
|
13750
|
+
'[attr.data-striped]': "striped() ? 'true' : 'false'",
|
|
13751
|
+
'[attr.data-hover]': "hover() ? 'true' : 'false'",
|
|
13752
|
+
'[attr.data-col-dividers]': "columnDividers() ? 'true' : 'false'",
|
|
13753
|
+
'[attr.data-sticky-header]': "stickyHeader() ? 'true' : 'false'",
|
|
13754
|
+
'[attr.data-clickable]': "rowClickable() ? 'true' : 'false'",
|
|
13755
|
+
'[attr.data-scrolled-x]': "scrolledX() ? 'true' : 'false'",
|
|
13756
|
+
'[attr.data-resizing]': "resizing() ? 'true' : 'false'",
|
|
13757
|
+
}, template: "<!-- Encabezado de columna: \u00EDcono + label + control de orden (unfold_more siempre visible). -->\n<ng-template #hcell let-c>\n <span class=\"ius-table__hcell\">\n @if (c.headerIcon) {\n <span translate=\"no\" class=\"ius-icon ius-table__sorticon\" style=\"opacity: 1\">{{ c.headerIcon }}</span>\n }\n <span class=\"ius-table__hlabel\">\n @if (c.headerTemplate) {\n <ng-container *ngTemplateOutlet=\"c.headerTemplate; context: headerContext(c)\" />\n } @else {\n {{ c.header }}\n }\n </span>\n @if (c.sortable) {\n <span translate=\"no\" class=\"ius-icon ius-table__sorticon\" aria-hidden=\"true\">{{ sortIcon(c.key) }}</span>\n }\n </span>\n</ng-template>\n\n<div\n #scroller\n class=\"ius-table-scroll ius-scroll\"\n [style.height]=\"px(height())\"\n [style.max-height]=\"px(maxHeight())\"\n (scroll)=\"onScroll()\"\n>\n <table\n #tabla\n class=\"ius-table\"\n role=\"table\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.data-empty]=\"isEmpty() ? 'true' : null\"\n [style.table-layout]=\"tableLayout()\"\n >\n <!-- \u2500\u2500 colgroup (anchos efectivos) \u2500\u2500 -->\n <colgroup>\n @if (selectable()) {\n <col [style.width]=\"selColWidth()\" />\n }\n @for (c of cols(); track c.key) {\n <col [style.width]=\"colWidth(c.key, c.width)\" />\n }\n </colgroup>\n\n <!-- \u2500\u2500 head \u2500\u2500 -->\n <thead>\n <tr>\n @if (selectable()) {\n <th\n class=\"ius-table__selcell\"\n [attr.data-pinned]=\"pinSide(selKey)\"\n [attr.data-pinned-edge]=\"pinEdge(selKey)\"\n [style.left]=\"pinLeft(selKey)\"\n [style.right]=\"pinRight(selKey)\"\n >\n <ius-checkbox\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (checkedChange)=\"toggleAll($event)\"\n size=\"small\"\n ariaLabel=\"Seleccionar todo\"\n />\n </th>\n }\n @for (c of cols(); track c.key; let ci = $index) {\n <th\n [attr.data-key]=\"c.key\"\n [attr.data-align]=\"alignOf(c)\"\n [attr.data-sorted]=\"dirOf(c.key) ? 'true' : null\"\n [attr.aria-sort]=\"ariaSort(c.key)\"\n [attr.title]=\"c.headerTitle ?? null\"\n [attr.data-pinned]=\"pinSide(c.key)\"\n [attr.data-pinned-edge]=\"pinEdge(c.key)\"\n [style.left]=\"pinLeft(c.key)\"\n [style.right]=\"pinRight(c.key)\"\n >\n @if (c.sortable) {\n <button type=\"button\" class=\"ius-table__sortbtn\" (click)=\"onHeaderSort(c)\">\n <ng-container *ngTemplateOutlet=\"hcell; context: { $implicit: c }\" />\n </button>\n } @else {\n <ng-container *ngTemplateOutlet=\"hcell; context: { $implicit: c }\" />\n }\n @if (canResize(c, ci)) {\n <span\n class=\"ius-table__resizer\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"'Ajustar ancho de ' + (c.header || 'columna')\"\n (mousedown)=\"startResize($event, c)\"\n (click)=\"$event.stopPropagation()\"\n ></span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <!-- \u2500\u2500 body \u2500\u2500 -->\n @if (loading()) {\n <tbody>\n @for (ri of skeletonIdx(); track ri) {\n <tr class=\"ius-table__skel-row\">\n @if (selectable()) {\n <td class=\"ius-table__selcell\">\n <span class=\"ius-table__skel\" style=\"width: 16px; margin: 0 auto\"></span>\n </td>\n }\n @for (c of cols(); track c.key; let ci = $index) {\n <td [attr.data-align]=\"alignOf(c)\">\n <span\n class=\"ius-table__skel\"\n [style.width]=\"skelWidth(c, ci)\"\n [style.margin-left]=\"alignOf(c) === 'end' ? 'auto' : '0'\"\n ></span>\n </td>\n }\n </tr>\n }\n </tbody>\n } @else if (!data().length) {\n <tbody>\n <tr>\n <td [attr.colspan]=\"colCount()\" style=\"border-bottom: 0\">\n <div class=\"ius-table__block\">\n @if (emptyTemplate(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <ius-empty-state\n variant=\"no-results\"\n size=\"compact\"\n [title]=\"emptyTitle()\"\n [description]=\"emptyDescription()\"\n />\n }\n </div>\n </td>\n </tr>\n </tbody>\n } @else {\n <tbody>\n @for (row of data(); track rowKeyOf(row, $index); let ri = $index) {\n <tr\n [class]=\"rowClass(row, ri)\"\n [attr.data-selected]=\"isSelected(row, ri) ? 'true' : null\"\n [attr.tabindex]=\"isClickable(row, ri) ? 0 : null\"\n [style]=\"rowStyles(row, ri)\"\n (click)=\"onRowClick(row, ri, $event)\"\n (keydown)=\"onRowKeydown(row, ri, $event)\"\n >\n @if (selectable()) {\n <td\n class=\"ius-table__selcell\"\n [attr.data-pinned]=\"pinSide(selKey)\"\n [attr.data-pinned-edge]=\"pinEdge(selKey)\"\n [style.left]=\"pinLeft(selKey)\"\n [style.right]=\"pinRight(selKey)\"\n [style.box-shadow]=\"accentShadow(row, ri)\"\n (click)=\"$event.stopPropagation()\"\n >\n <ius-checkbox\n [checked]=\"isSelected(row, ri)\"\n (checkedChange)=\"toggleRow(rowKeyOf(row, ri), $event)\"\n size=\"small\"\n [disabled]=\"isDisabled(row, ri)\"\n [ariaLabel]=\"selectAriaLabel()\"\n />\n </td>\n }\n @for (c of cols(); track c.key; let ci = $index) {\n <td\n [attr.data-align]=\"alignOf(c)\"\n [attr.data-numeric]=\"c.numeric ? 'true' : null\"\n [attr.title]=\"cellTitle(row, c)\"\n [attr.data-pinned]=\"pinSide(c.key)\"\n [attr.data-pinned-edge]=\"pinEdge(c.key)\"\n [style.left]=\"pinLeft(c.key)\"\n [style.right]=\"pinRight(c.key)\"\n [style.box-shadow]=\"!selectable() && ci === 0 ? accentShadow(row, ri) : null\"\n >\n @if (c.render) {\n <ng-container *ngTemplateOutlet=\"c.render; context: cellContext(row, ri, c)\" />\n } @else if (isBlank(cellValue(row, c))) {\n <span class=\"ius-table__muted\">\u2014</span>\n } @else {\n {{ cellValue(row, c) }}\n }\n </td>\n }\n </tr>\n }\n </tbody>\n }\n\n <!-- \u2500\u2500 footer resumen \u2500\u2500 -->\n @if (showSummary()) {\n <tfoot>\n <tr>\n @if (selectable()) {\n <td class=\"ius-table__selcell\"></td>\n }\n @for (c of cols(); track c.key) {\n <td [attr.data-align]=\"alignOf(c)\">\n @if (summaryCell(c.key); as cell) {\n @if (cell.template) {\n <ng-container *ngTemplateOutlet=\"cell.template; context: { $implicit: cell }\" />\n } @else {\n {{ cell.value }}\n }\n }\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;min-height:0;min-width:0;max-width:100%;width:100%;font-family:var(--ius-font-body);box-sizing:border-box;--_t-py: var(--ius-space-sm);--_t-px: var(--ius-space-md);--_t-fs: var(--ius-fs-base);--_t-lh: var(--ius-lh-base);--_t-head-fs: var(--ius-fs-sm);--_t-head-lh: var(--ius-lh-sm);--_t-icon: var(--ius-icon-sm)}:host([data-size=small]){--_t-py: var(--ius-space-xs);--_t-px: var(--ius-space-sm);--_t-fs: var(--ius-fs-sm);--_t-lh: var(--ius-lh-sm)}@container style(--ius-density: small){:host(:not([data-size])){--_t-py: var(--ius-space-xs);--_t-px: var(--ius-space-sm);--_t-fs: var(--ius-fs-sm);--_t-lh: var(--ius-lh-sm)}}@container style(--ius-density: large){:host(:not([data-size])){--_t-py: var(--ius-space-md);--_t-px: var(--ius-space-md);--_t-fs: var(--ius-fs-base);--_t-lh: var(--ius-lh-base)}}:host([data-size=large]){--_t-py: var(--ius-space-md);--_t-px: var(--ius-space-md);--_t-fs: var(--ius-fs-base);--_t-lh: var(--ius-lh-base)}:host([data-bordered=true]){background:var(--ius-surface-card);border:1px solid var(--ius-stroke);border-radius:var(--ius-radius-lg);overflow:hidden}.ius-table-scroll{flex:1 1 auto;min-height:0;min-width:0;width:100%;overflow:auto}:host([data-bordered=true]) .ius-table-scroll{--_sb-track-margin: var(--ius-radius-lg);--_sb-track-margin-x: var(--ius-radius-lg)}.ius-table{border-collapse:separate;border-spacing:0;width:100%;font-variant-numeric:tabular-nums}.ius-table thead th{position:sticky;top:0;z-index:2;background:var(--ius-surface-card);color:var(--ius-text-tertiary);font-family:var(--ius-font-display);font-weight:var(--ius-fw-medium);font-size:var(--_t-head-fs);line-height:var(--_t-head-lh);letter-spacing:.01em;text-align:left;vertical-align:middle;white-space:nowrap;padding:var(--_t-py) var(--_t-px);border-bottom:1px solid var(--ius-stroke-strong);box-sizing:border-box}:host([data-sticky-header=false]) thead th{position:relative}.ius-table thead th[data-align=end]{text-align:right}.ius-table thead th[data-align=center]{text-align:center}.ius-table__hcell{display:inline-flex;align-items:center;gap:var(--ius-space-xxs);max-width:100%}.ius-table th[data-align=end] .ius-table__hcell{flex-direction:row-reverse}.ius-table th[data-align=center] .ius-table__hcell{justify-content:center}.ius-table__hlabel{overflow:hidden;text-overflow:ellipsis}.ius-table__sortbtn{appearance:none;border:0;background:transparent;margin:0;padding:0;display:inline-flex;align-items:center;gap:var(--ius-space-xxs);font:inherit;color:inherit;cursor:pointer;max-width:100%;border-radius:var(--ius-radius-sm);transition:color var(--ius-duration-fast) var(--ius-ease-standard);-webkit-user-select:none;user-select:none}.ius-table__sortbtn:hover{color:var(--ius-text-primary)}.ius-table__sortbtn:focus-visible{outline:none;box-shadow:var(--ius-focus-ring)}.ius-table th[data-sorted=true] .ius-table__sortbtn{color:var(--ius-text-primary);font-weight:var(--ius-fw-bold)}.ius-table__sorticon{font-size:var(--_t-icon);line-height:1;flex:0 0 auto;opacity:1;transition:opacity var(--ius-duration-fast) var(--ius-ease-standard),color var(--ius-duration-fast) var(--ius-ease-standard)}.ius-table__sortbtn .ius-table__sorticon{color:var(--ius-text-tertiary);opacity:.75}.ius-table__sortbtn:hover .ius-table__sorticon{opacity:1;color:var(--ius-text-secondary)}.ius-table th[data-sorted=true] .ius-table__sorticon{opacity:1;color:var(--ius-text-primary)}.ius-table__resizer{position:absolute;top:0;right:-4px;width:9px;height:100%;cursor:col-resize;z-index:4;touch-action:none;-webkit-user-select:none;user-select:none}.ius-table__resizer:after{content:\"\";position:absolute;top:18%;bottom:18%;right:4px;width:2px;border-radius:var(--ius-radius-pill);background:transparent;transition:background var(--ius-duration-fast) var(--ius-ease-standard)}.ius-table thead th:hover .ius-table__resizer:after{background:var(--ius-stroke-strong)}.ius-table__resizer:hover:after{background:var(--ius-primary-500)}:host([data-resizing=true]) .ius-table__resizer:after{background:var(--ius-primary-500)}.ius-table tbody td{padding:var(--_t-py) var(--_t-px);font-size:var(--_t-fs);line-height:var(--_t-lh);color:var(--ius-text-primary);vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-bottom:1px solid var(--ius-neutral-3);background:var(--ius-surface-card);box-sizing:border-box}.ius-table tbody tr:last-child td{border-bottom:0}.ius-table td[data-align=end]{text-align:right}.ius-table td[data-align=center]{text-align:center}.ius-table td[data-numeric=true]{font-variant-numeric:tabular-nums}.ius-table__muted{color:var(--ius-text-tertiary)}:host([data-col-dividers=true]) thead th:not(:last-child),:host([data-col-dividers=true]) tbody td:not(:last-child),:host([data-col-dividers=true]) tfoot td:not(:last-child){border-right:1px solid var(--ius-neutral-3)}:host([data-striped=true]) tbody tr:nth-child(2n) td{background:var(--ius-neutral-1)}:host([data-hover=true]) tbody tr:hover td{box-shadow:inset 0 1px 0 0 var(--ius-info-200),inset 0 -1px 0 0 var(--ius-info-200)}:host([data-clickable=true]) tbody tr{cursor:pointer}:host([data-clickable=true]) tbody tr:active td{background:var(--ius-info-100)}.ius-table tbody tr:focus-visible{outline:none}.ius-table tbody tr:focus-visible td{box-shadow:inset 0 0 0 2px var(--ius-stroke-focus)}.ius-table thead th.ius-table__selcell,.ius-table tbody td.ius-table__selcell,.ius-table tfoot td.ius-table__selcell{text-align:center;overflow:visible;text-overflow:clip}.ius-table__selcell>*{vertical-align:middle}.ius-table th[data-pinned],.ius-table td[data-pinned]{position:sticky;z-index:1}.ius-table thead th[data-pinned]{z-index:3}.ius-table th[data-pinned=end],.ius-table td[data-pinned=end]{box-shadow:-1px 0 0 0 var(--ius-stroke)}:host([data-scrolled-x=true]) th[data-pinned=start][data-pinned-edge=true],:host([data-scrolled-x=true]) td[data-pinned=start][data-pinned-edge=true]{box-shadow:1px 0 0 0 var(--ius-stroke),5px 0 7px -5px var(--ius-stroke-strong)}.ius-table tfoot td{position:sticky;bottom:0;z-index:2;padding:var(--_t-py) var(--_t-px);font-size:var(--_t-fs);line-height:var(--_t-lh);font-weight:var(--ius-fw-bold);color:var(--ius-text-primary);background:var(--ius-neutral-1);border-top:1px solid var(--ius-stroke-strong);font-variant-numeric:tabular-nums;box-sizing:border-box;white-space:nowrap}.ius-table tfoot td[data-align=end]{text-align:right}.ius-table tfoot td[data-align=center]{text-align:center}.ius-table__block{padding:var(--ius-space-2xl) var(--ius-space-lg);display:grid;place-items:center;box-sizing:border-box}.ius-table[data-empty=true]{height:100%}.ius-table[data-empty=true]>tbody{height:100%}.ius-table[data-empty=true]>tbody>tr>td{height:100%}.ius-table[data-empty=true] .ius-table__block{min-height:100%}.ius-table__skel-row td{border-bottom:1px solid var(--ius-neutral-3);background:var(--ius-surface-card)}.ius-table__skel{display:block;height:var(--_t-fs);border-radius:var(--ius-radius-sm);background:linear-gradient(90deg,var(--ius-neutral-2) 25%,var(--ius-neutral-3) 37%,var(--ius-neutral-2) 63%);background-size:400% 100%;animation:ius-table-shimmer 1.4s ease infinite}@keyframes ius-table-shimmer{0%{background-position:100% 50%}to{background-position:0 50%}}@media(prefers-reduced-motion:reduce){.ius-table__skel{animation:none}}\n"] }]
|
|
13758
|
+
}], ctorParameters: () => [], propDecorators: { scrollRef: [{ type: i0.ViewChild, args: ['scroller', { isSignal: true }] }], tableRef: [{ type: i0.ViewChild, args: ['tabla', { isSignal: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], rowKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowKey", required: false }] }], sortColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortColumn", required: false }] }], sortDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortDirection", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], selectedKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedKeys", required: false }] }], selectAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAriaLabel", required: false }] }], rowClickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowClickable", required: false }] }], isRowDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isRowDisabled", required: false }] }], getRowAccent: [{ type: i0.Input, args: [{ isSignal: true, alias: "getRowAccent", required: false }] }], rowClassName: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowClassName", required: false }] }], rowStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowStyle", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], columnDividers: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnDividers", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], skeletonRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonRows", required: false }] }], emptyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTemplate", required: false }] }], emptyTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTitle", required: false }] }], emptyDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyDescription", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], hover: [{ type: i0.Input, args: [{ isSignal: true, alias: "hover", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }] } });
|
|
13759
|
+
|
|
13287
13760
|
/*
|
|
13288
13761
|
* Public API de @litigiovirtual/ius-design-components v2.
|
|
13289
13762
|
* La librería se está reconstruyendo componente a componente desde las
|
|
@@ -13295,5 +13768,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
13295
13768
|
* Generated bundle index. Do not edit.
|
|
13296
13769
|
*/
|
|
13297
13770
|
|
|
13298
|
-
export { AccordionComponent, AccountItemComponent, AlertComponent, AppLayoutComponent, AvatarComponent, ButtonComponent, CaptchaFieldComponent, CardComponent, CarouselComponent, CheckboxComponent, ChipComponent, CircularProgressComponent, CodeFieldComponent, CountdownComponent, CountdownRingComponent, DescriptionListComponent, DividerComponent, DrawerComponent, DropdownComponent, EVENT_KINDS, EVENT_KIND_ICON, EleniaBubbleComponent, EleniaOrbComponent, EmptyStateComponent, FlexComponent, HeaderBarComponent, ILLUSTRATIONS, ILLUSTRATION_ALIAS, ILLUSTRATION_NAMES, IUS_FILTER_OPERATORS, IUS_TOAST_DEFAULT_DURATION, IUS_TOAST_DEFAULT_ICON, IconButtonComponent, IllustrationComponent, InsigniaComponent, IusAccountItemNameDirective, IusAccountItemSubtitleDirective, IusAccountItemTrailingDirective, IusAlertActionsDirective, IusAlertTrailingDirective, IusCardFooterDirective, IusCardHeaderDirective, IusDrawerFooterDirective, IusDrawerHeaderActionsDirective, IusDrawerTitleDirective, IusDropdownTriggerDirective, IusListCardLeadingDirective, IusListCardOverlineDirective, IusListCardParagraphDirective, IusListCardSubtitleDirective, IusListCardTitleDirective, IusListViewFiltersDirective, IusListViewFooterEndDirective, IusListViewFooterStartDirective, IusListViewHeaderEndDirective, IusListViewHeaderStartDirective, IusListViewToolbarDirective, IusMenuItemTrailingDirective, IusModalFooterDirective, IusPersonItemNameDirective, IusPersonItemTrailingDirective, IusSettingsNavFooterDirective, IusSettingsNavHeaderDirective, IusTagPrefixDirective, IusTagSuffixDirective, IusToastActionDirective, IusUserMenuFooterDirective, LinearProgressBarComponent, ListCardComponent, ListViewComponent, LoadingComponent, LoadingMarkComponent, MenuComponent, MenuItemComponent, ModalComponent, MultiTextFieldComponent, NavUserComponent, ORB_PERIODS, OauthButtonComponent, OptionItemComponent, PersonItemComponent, PersonPickerComponent, PlanUsageItemComponent, PopoverComponent, QueryBuilderComponent, STATUS_TONES, STATUS_VOCAB, STATUS_VOCABS, STATUS_VOCABS_PENDING, ScrollAreaComponent, SearchBarComponent, SectionHeaderComponent, SegmentGroupComponent, SegmentedControlComponent, SelectComponent, SettingsNavComponent, ShowMoreComponent, SplitterComponent, StatusChipComponent, StatusStateComponent, TabsComponent, TagComponent, TextAreaComponent, TextButtonComponent, TextComponent, TextFieldComponent, TimelineComponent, ToastComponent, ToastService, ToastViewportComponent, TooltipComponent, UserMenuComponent, WizardComponent, WizardController, WizardNavComponent, createWizard, eventKindOptions, iusSegColor, pose, poseIso, poseSpeaking, poseThinking, renderCubeSvg, resolveEventIcon, resolveIllustration, resolveStatus, statusOptions, statusOrder, statusToneVars, statusVocab, voiceEnv };
|
|
13771
|
+
export { AccordionComponent, AccountItemComponent, AlertComponent, AppLayoutComponent, AvatarComponent, ButtonComponent, CaptchaFieldComponent, CardComponent, CarouselComponent, CheckboxComponent, ChipComponent, CircularProgressComponent, CodeFieldComponent, CountdownComponent, CountdownRingComponent, DescriptionListComponent, DividerComponent, DrawerComponent, DropdownComponent, EVENT_KINDS, EVENT_KIND_ICON, EleniaBubbleComponent, EleniaOrbComponent, EmptyStateComponent, FlexComponent, HeaderBarComponent, ILLUSTRATIONS, ILLUSTRATION_ALIAS, ILLUSTRATION_NAMES, IUS_FILTER_OPERATORS, IUS_TOAST_DEFAULT_DURATION, IUS_TOAST_DEFAULT_ICON, IconButtonComponent, IllustrationComponent, InsigniaComponent, IusAccountItemNameDirective, IusAccountItemSubtitleDirective, IusAccountItemTrailingDirective, IusAlertActionsDirective, IusAlertTrailingDirective, IusCardFooterDirective, IusCardHeaderDirective, IusDrawerFooterDirective, IusDrawerHeaderActionsDirective, IusDrawerTitleDirective, IusDropdownTriggerDirective, IusListCardLeadingDirective, IusListCardOverlineDirective, IusListCardParagraphDirective, IusListCardSubtitleDirective, IusListCardTitleDirective, IusListViewFiltersDirective, IusListViewFooterEndDirective, IusListViewFooterStartDirective, IusListViewHeaderEndDirective, IusListViewHeaderStartDirective, IusListViewToolbarDirective, IusMenuItemTrailingDirective, IusModalFooterDirective, IusPersonItemNameDirective, IusPersonItemTrailingDirective, IusSettingsNavFooterDirective, IusSettingsNavHeaderDirective, IusTagPrefixDirective, IusTagSuffixDirective, IusToastActionDirective, IusUserMenuFooterDirective, LinearProgressBarComponent, ListCardComponent, ListViewComponent, LoadingComponent, LoadingMarkComponent, MenuComponent, MenuItemComponent, ModalComponent, MultiTextFieldComponent, NavUserComponent, ORB_PERIODS, OauthButtonComponent, OptionItemComponent, PersonItemComponent, PersonPickerComponent, PlanUsageItemComponent, PopoverComponent, QueryBuilderComponent, STATUS_TONES, STATUS_VOCAB, STATUS_VOCABS, STATUS_VOCABS_PENDING, ScrollAreaComponent, SearchBarComponent, SectionHeaderComponent, SegmentGroupComponent, SegmentedControlComponent, SelectComponent, SettingsNavComponent, ShowMoreComponent, SplitterComponent, StatusChipComponent, StatusStateComponent, TableComponent, TabsComponent, TagComponent, TextAreaComponent, TextButtonComponent, TextComponent, TextFieldComponent, TimelineComponent, ToastComponent, ToastService, ToastViewportComponent, TooltipComponent, UserMenuComponent, WizardComponent, WizardController, WizardNavComponent, createWizard, eventKindOptions, iusSegColor, pose, poseIso, poseSpeaking, poseThinking, renderCubeSvg, resolveEventIcon, resolveIllustration, resolveStatus, statusOptions, statusOrder, statusToneVars, statusVocab, voiceEnv };
|
|
13299
13772
|
//# sourceMappingURL=litigiovirtual-ius-design-components.mjs.map
|