@akcelik/strct 0.30.0 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/akcelik-strct.mjs +363 -41
- package/fesm2022/akcelik-strct.mjs.map +1 -1
- package/package.json +1 -1
- package/types/akcelik-strct.d.ts +88 -2
|
@@ -642,7 +642,7 @@ class StrctIcon {
|
|
|
642
642
|
</svg>
|
|
643
643
|
}
|
|
644
644
|
</span>
|
|
645
|
-
}`, isInline: true, styles: [".strct-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;line-height:0}.strct-icon__raw{display:inline-flex}.strct-icon__raw>svg{width:100%;height:100%;display:block}.strct-icon__badge{position:absolute;
|
|
645
|
+
}`, isInline: true, styles: [".strct-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;line-height:0}.strct-icon__raw{display:inline-flex}.strct-icon__raw>svg{width:100%;height:100%;display:block}.strct-icon__badge{position:absolute;inset-inline-end:-3px;bottom:-3px;width:50%;height:50%;min-width:8px;min-height:8px;max-width:12px;max-height:12px;border-radius:50%;box-shadow:0 0 0 1.5px var(--bg-1)}.strct-icon__badge--success,.strct-icon__badge--critical,.strct-icon__badge--info,.strct-icon__badge--off,.strct-icon__badge--paused,.strct-icon__badge--running{display:flex;align-items:center;justify-content:center;font-size:clamp(6px,68%,10px);font-weight:800;line-height:1;color:var(--inv)}.strct-icon__badge--success{background:var(--success)}.strct-icon__badge--success:before{content:\"\\2713\"}.strct-icon__badge--warning{background:var(--warning);border-radius:1px;clip-path:polygon(50% 10%,92% 90%,8% 90%);box-shadow:none;filter:drop-shadow(0 0 1.5px var(--bg-1));inset-inline-end:-2px;bottom:-2px;width:60%;height:60%;min-width:11px;min-height:11px;max-width:18px;max-height:18px;display:flex;align-items:center;justify-content:center;font-size:clamp(6px,70%,10px);font-weight:800;color:var(--inv);line-height:1}.strct-icon__badge--warning:before{content:\"!\"}.strct-icon__badge--critical{background:var(--critical);border-radius:1px;clip-path:polygon(50% 0%,100% 50%,50% 100%,0% 50%);box-shadow:none;filter:drop-shadow(0 0 1.5px var(--bg-1));width:58%;height:58%;min-width:10px;min-height:10px;max-width:15px;max-height:15px;font-size:clamp(6px,56%,9px)}.strct-icon__badge--critical:before{content:\"\\d7\"}.strct-icon__badge--running{background:var(--success)}.strct-icon__badge--running:before{content:\"\";width:46%;height:46%;min-width:4px;min-height:4px;background:var(--inv);clip-path:polygon(15% 2%,100% 50%,15% 98%);transform:translate(9%)}.strct-icon__badge--paused{background:var(--warning)}.strct-icon__badge--paused:before{content:\"\";width:1.6px;height:42%;min-height:4px;background:var(--inv);box-shadow:2.6px 0 0 var(--inv);transform:translate(-1.3px)}.strct-icon__badge--off{background:var(--t3)}.strct-icon__badge--off:before{content:\"\";width:40%;height:40%;min-width:3.5px;min-height:3.5px;background:var(--inv);border-radius:1px}.strct-icon__badge--info{background:var(--acc)}.strct-icon__badge--info:before{content:\"i\"}.strct-icon__badge--maintenance{background:var(--warning);inset-inline-end:-2px;bottom:-2px;width:58%;height:58%;min-width:10px;min-height:10px;max-width:16px;max-height:16px;display:flex;align-items:center;justify-content:center;padding:1px;box-shadow:0 0 0 1.5px var(--bg-1)}.strct-icon__badge--maintenance svg{width:84%;height:84%;color:var(--inv)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
646
646
|
}
|
|
647
647
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: StrctIcon, decorators: [{
|
|
648
648
|
type: Component,
|
|
@@ -686,7 +686,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
686
686
|
</svg>
|
|
687
687
|
}
|
|
688
688
|
</span>
|
|
689
|
-
}`, host: { class: 'strct-icon' }, styles: [".strct-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;line-height:0}.strct-icon__raw{display:inline-flex}.strct-icon__raw>svg{width:100%;height:100%;display:block}.strct-icon__badge{position:absolute;
|
|
689
|
+
}`, host: { class: 'strct-icon' }, styles: [".strct-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;line-height:0}.strct-icon__raw{display:inline-flex}.strct-icon__raw>svg{width:100%;height:100%;display:block}.strct-icon__badge{position:absolute;inset-inline-end:-3px;bottom:-3px;width:50%;height:50%;min-width:8px;min-height:8px;max-width:12px;max-height:12px;border-radius:50%;box-shadow:0 0 0 1.5px var(--bg-1)}.strct-icon__badge--success,.strct-icon__badge--critical,.strct-icon__badge--info,.strct-icon__badge--off,.strct-icon__badge--paused,.strct-icon__badge--running{display:flex;align-items:center;justify-content:center;font-size:clamp(6px,68%,10px);font-weight:800;line-height:1;color:var(--inv)}.strct-icon__badge--success{background:var(--success)}.strct-icon__badge--success:before{content:\"\\2713\"}.strct-icon__badge--warning{background:var(--warning);border-radius:1px;clip-path:polygon(50% 10%,92% 90%,8% 90%);box-shadow:none;filter:drop-shadow(0 0 1.5px var(--bg-1));inset-inline-end:-2px;bottom:-2px;width:60%;height:60%;min-width:11px;min-height:11px;max-width:18px;max-height:18px;display:flex;align-items:center;justify-content:center;font-size:clamp(6px,70%,10px);font-weight:800;color:var(--inv);line-height:1}.strct-icon__badge--warning:before{content:\"!\"}.strct-icon__badge--critical{background:var(--critical);border-radius:1px;clip-path:polygon(50% 0%,100% 50%,50% 100%,0% 50%);box-shadow:none;filter:drop-shadow(0 0 1.5px var(--bg-1));width:58%;height:58%;min-width:10px;min-height:10px;max-width:15px;max-height:15px;font-size:clamp(6px,56%,9px)}.strct-icon__badge--critical:before{content:\"\\d7\"}.strct-icon__badge--running{background:var(--success)}.strct-icon__badge--running:before{content:\"\";width:46%;height:46%;min-width:4px;min-height:4px;background:var(--inv);clip-path:polygon(15% 2%,100% 50%,15% 98%);transform:translate(9%)}.strct-icon__badge--paused{background:var(--warning)}.strct-icon__badge--paused:before{content:\"\";width:1.6px;height:42%;min-height:4px;background:var(--inv);box-shadow:2.6px 0 0 var(--inv);transform:translate(-1.3px)}.strct-icon__badge--off{background:var(--t3)}.strct-icon__badge--off:before{content:\"\";width:40%;height:40%;min-width:3.5px;min-height:3.5px;background:var(--inv);border-radius:1px}.strct-icon__badge--info{background:var(--acc)}.strct-icon__badge--info:before{content:\"i\"}.strct-icon__badge--maintenance{background:var(--warning);inset-inline-end:-2px;bottom:-2px;width:58%;height:58%;min-width:10px;min-height:10px;max-width:16px;max-height:16px;display:flex;align-items:center;justify-content:center;padding:1px;box-shadow:0 0 0 1.5px var(--bg-1)}.strct-icon__badge--maintenance svg{width:84%;height:84%;color:var(--inv)}\n"] }]
|
|
690
690
|
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }], badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
691
691
|
|
|
692
692
|
/** Palette dots + light/dark pill, wired to {@link StrctThemeService}. */
|
|
@@ -966,7 +966,7 @@ class StrctVerticalNav {
|
|
|
966
966
|
></div>
|
|
967
967
|
}
|
|
968
968
|
<ng-content />
|
|
969
|
-
`, isInline: true, styles: [".strct-vnav{display:flex;flex-direction:column;width:264px;flex-shrink:0;background:var(--bg-1);border-inline-end:1px solid var(--b2);overflow:hidden}@media(max-width:768px){.strct-vnav{position:fixed;top:0;
|
|
969
|
+
`, isInline: true, styles: [".strct-vnav{display:flex;flex-direction:column;width:264px;flex-shrink:0;background:var(--bg-1);border-inline-end:1px solid var(--b2);overflow:hidden}@media(max-width:768px){.strct-vnav{position:fixed;top:0;inset-inline-start:0;bottom:0;z-index:300;transform:translate(-100%);transition:transform .2s ease}[dir=rtl] .strct-vnav{transform:translate(100%)}.strct-vnav--open,[dir=rtl] .strct-vnav--open{transform:translate(0)}.strct-vnav__backdrop{position:fixed;inset:0;z-index:299;background:#00000080;animation:strct-vnav-backdrop-in .2s ease}}@media(min-width:769px){.strct-vnav__backdrop{display:none}}@keyframes strct-vnav-backdrop-in{0%{opacity:0}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
970
970
|
}
|
|
971
971
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: StrctVerticalNav, decorators: [{
|
|
972
972
|
type: Component,
|
|
@@ -986,7 +986,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
986
986
|
`, host: {
|
|
987
987
|
class: 'strct-vnav',
|
|
988
988
|
'[class.strct-vnav--open]': 'shell.mobileNavOpen()',
|
|
989
|
-
}, styles: [".strct-vnav{display:flex;flex-direction:column;width:264px;flex-shrink:0;background:var(--bg-1);border-inline-end:1px solid var(--b2);overflow:hidden}@media(max-width:768px){.strct-vnav{position:fixed;top:0;
|
|
989
|
+
}, styles: [".strct-vnav{display:flex;flex-direction:column;width:264px;flex-shrink:0;background:var(--bg-1);border-inline-end:1px solid var(--b2);overflow:hidden}@media(max-width:768px){.strct-vnav{position:fixed;top:0;inset-inline-start:0;bottom:0;z-index:300;transform:translate(-100%);transition:transform .2s ease}[dir=rtl] .strct-vnav{transform:translate(100%)}.strct-vnav--open,[dir=rtl] .strct-vnav--open{transform:translate(0)}.strct-vnav__backdrop{position:fixed;inset:0;z-index:299;background:#00000080;animation:strct-vnav-backdrop-in .2s ease}}@media(min-width:769px){.strct-vnav__backdrop{display:none}}@keyframes strct-vnav-backdrop-in{0%{opacity:0}}\n"] }]
|
|
990
990
|
}] });
|
|
991
991
|
/** Horizontal strip of icon tabs (e.g. section switcher at the top of a sidebar). */
|
|
992
992
|
class StrctNav {
|
|
@@ -1167,7 +1167,7 @@ class StrctRail {
|
|
|
1167
1167
|
}
|
|
1168
1168
|
</button>
|
|
1169
1169
|
}
|
|
1170
|
-
`, isInline: true, styles: [".strct-rail{display:flex;flex-direction:column;width:232px;flex-shrink:0;background:var(--bg-1);border-inline-end:1px solid var(--b2);overflow:hidden;transition:width .16s ease}.strct-rail--collapsed{width:60px}.strct-rail__nav{flex:1;min-height:0;display:flex;flex-direction:column;padding:8px}.strct-rail__group{display:flex;flex-direction:column;gap:2px}.strct-rail__group--top{flex:1;min-height:0;overflow-y:auto}.strct-rail__group--bottom{margin-top:8px;padding-top:8px;border-top:1px solid var(--b1)}.strct-rail__item{position:relative;display:flex;align-items:center;gap:11px;width:100%;box-sizing:border-box;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:var(--t2);cursor:pointer;font-size:13.5px;font-family:var(--font);text-align:start;text-decoration:none;white-space:nowrap;transition:background .14s ease,color .14s ease}.strct-rail--collapsed .strct-rail__item{justify-content:center;padding:8px}.strct-rail__item:hover:not(:disabled){background:var(--bg-3);color:var(--t1)}.strct-rail__item--active{background:var(--acc-m);color:var(--acc)}.strct-rail__item--active .strct-rail__icon{color:var(--acc)}.strct-rail__item:disabled{opacity:.5;cursor:not-allowed}.strct-rail__item:focus-visible{outline:2px solid var(--acc50);outline-offset:-2px}.strct-rail__icon{flex-shrink:0}.strct-rail__label{flex:1;overflow:hidden;text-overflow:ellipsis}.strct-rail__badge{flex-shrink:0;min-width:18px;height:18px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;line-height:1;border-radius:9px;font-variant-numeric:tabular-nums}.strct-rail__badge--dot{position:absolute;top:5px;
|
|
1170
|
+
`, isInline: true, styles: [".strct-rail{display:flex;flex-direction:column;width:232px;flex-shrink:0;background:var(--bg-1);border-inline-end:1px solid var(--b2);overflow:hidden;transition:width .16s ease}.strct-rail--collapsed{width:60px}.strct-rail__nav{flex:1;min-height:0;display:flex;flex-direction:column;padding:8px}.strct-rail__group{display:flex;flex-direction:column;gap:2px}.strct-rail__group--top{flex:1;min-height:0;overflow-y:auto}.strct-rail__group--bottom{margin-top:8px;padding-top:8px;border-top:1px solid var(--b1)}.strct-rail__item{position:relative;display:flex;align-items:center;gap:11px;width:100%;box-sizing:border-box;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:var(--t2);cursor:pointer;font-size:13.5px;font-family:var(--font);text-align:start;text-decoration:none;white-space:nowrap;transition:background .14s ease,color .14s ease}.strct-rail--collapsed .strct-rail__item{justify-content:center;padding:8px}.strct-rail__item:hover:not(:disabled){background:var(--bg-3);color:var(--t1)}.strct-rail__item--active{background:var(--acc-m);color:var(--acc)}.strct-rail__item--active .strct-rail__icon{color:var(--acc)}.strct-rail__item:disabled{opacity:.5;cursor:not-allowed}.strct-rail__item:focus-visible{outline:2px solid var(--acc50);outline-offset:-2px}.strct-rail__icon{flex-shrink:0}.strct-rail__label{flex:1;overflow:hidden;text-overflow:ellipsis}.strct-rail__badge{flex-shrink:0;min-width:18px;height:18px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;line-height:1;border-radius:9px;font-variant-numeric:tabular-nums}.strct-rail__badge--dot{position:absolute;top:5px;inset-inline-end:7px;min-width:8px;width:8px;height:8px;padding:0;border-radius:50%}.strct-rail__badge--accent{background:var(--acc-m);color:var(--acc)}.strct-rail__badge--success{background:var(--success-bg);color:var(--success)}.strct-rail__badge--warning{background:var(--warning-bg);color:var(--warning)}.strct-rail__badge--critical{background:var(--critical-bg);color:var(--critical)}.strct-rail__badge--dot.strct-rail__badge--accent{background:var(--acc)}.strct-rail__badge--dot.strct-rail__badge--success{background:var(--success)}.strct-rail__badge--dot.strct-rail__badge--warning{background:var(--warning)}.strct-rail__badge--dot.strct-rail__badge--critical{background:var(--critical)}.strct-rail__trailing{flex-shrink:0;color:var(--t3)}.strct-rail__dot{flex-shrink:0;width:7px;height:7px;border-radius:50%}.strct-rail--collapsed .strct-rail__dot{position:absolute;top:5px;inset-inline-end:7px}.strct-rail__dot--accent{background:var(--acc)}.strct-rail__dot--success{background:var(--success)}.strct-rail__dot--warning{background:var(--warning)}.strct-rail__dot--critical{background:var(--critical)}.strct-rail__toggle{display:flex;align-items:center;gap:10px;padding:9px 14px;border:0;border-top:1px solid var(--b1);background:transparent;color:var(--t3);cursor:pointer;font-size:12.5px;font-family:var(--font)}.strct-rail--collapsed .strct-rail__toggle{justify-content:center;padding:9px}.strct-rail__toggle:hover{color:var(--t1);background:var(--bg-3)}.strct-rail__toggle-icon{transition:transform .16s ease}.strct-rail:not(.strct-rail--collapsed) .strct-rail__toggle-icon{transform:rotate(180deg)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: StrctIcon, selector: "strct-icon", inputs: ["name", "size", "strokeWidth", "badge", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1171
1171
|
}
|
|
1172
1172
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: StrctRail, decorators: [{
|
|
1173
1173
|
type: Component,
|
|
@@ -1273,7 +1273,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
1273
1273
|
`, host: {
|
|
1274
1274
|
class: 'strct-rail',
|
|
1275
1275
|
'[class.strct-rail--collapsed]': 'collapsed()',
|
|
1276
|
-
}, styles: [".strct-rail{display:flex;flex-direction:column;width:232px;flex-shrink:0;background:var(--bg-1);border-inline-end:1px solid var(--b2);overflow:hidden;transition:width .16s ease}.strct-rail--collapsed{width:60px}.strct-rail__nav{flex:1;min-height:0;display:flex;flex-direction:column;padding:8px}.strct-rail__group{display:flex;flex-direction:column;gap:2px}.strct-rail__group--top{flex:1;min-height:0;overflow-y:auto}.strct-rail__group--bottom{margin-top:8px;padding-top:8px;border-top:1px solid var(--b1)}.strct-rail__item{position:relative;display:flex;align-items:center;gap:11px;width:100%;box-sizing:border-box;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:var(--t2);cursor:pointer;font-size:13.5px;font-family:var(--font);text-align:start;text-decoration:none;white-space:nowrap;transition:background .14s ease,color .14s ease}.strct-rail--collapsed .strct-rail__item{justify-content:center;padding:8px}.strct-rail__item:hover:not(:disabled){background:var(--bg-3);color:var(--t1)}.strct-rail__item--active{background:var(--acc-m);color:var(--acc)}.strct-rail__item--active .strct-rail__icon{color:var(--acc)}.strct-rail__item:disabled{opacity:.5;cursor:not-allowed}.strct-rail__item:focus-visible{outline:2px solid var(--acc50);outline-offset:-2px}.strct-rail__icon{flex-shrink:0}.strct-rail__label{flex:1;overflow:hidden;text-overflow:ellipsis}.strct-rail__badge{flex-shrink:0;min-width:18px;height:18px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;line-height:1;border-radius:9px;font-variant-numeric:tabular-nums}.strct-rail__badge--dot{position:absolute;top:5px;
|
|
1276
|
+
}, styles: [".strct-rail{display:flex;flex-direction:column;width:232px;flex-shrink:0;background:var(--bg-1);border-inline-end:1px solid var(--b2);overflow:hidden;transition:width .16s ease}.strct-rail--collapsed{width:60px}.strct-rail__nav{flex:1;min-height:0;display:flex;flex-direction:column;padding:8px}.strct-rail__group{display:flex;flex-direction:column;gap:2px}.strct-rail__group--top{flex:1;min-height:0;overflow-y:auto}.strct-rail__group--bottom{margin-top:8px;padding-top:8px;border-top:1px solid var(--b1)}.strct-rail__item{position:relative;display:flex;align-items:center;gap:11px;width:100%;box-sizing:border-box;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:var(--t2);cursor:pointer;font-size:13.5px;font-family:var(--font);text-align:start;text-decoration:none;white-space:nowrap;transition:background .14s ease,color .14s ease}.strct-rail--collapsed .strct-rail__item{justify-content:center;padding:8px}.strct-rail__item:hover:not(:disabled){background:var(--bg-3);color:var(--t1)}.strct-rail__item--active{background:var(--acc-m);color:var(--acc)}.strct-rail__item--active .strct-rail__icon{color:var(--acc)}.strct-rail__item:disabled{opacity:.5;cursor:not-allowed}.strct-rail__item:focus-visible{outline:2px solid var(--acc50);outline-offset:-2px}.strct-rail__icon{flex-shrink:0}.strct-rail__label{flex:1;overflow:hidden;text-overflow:ellipsis}.strct-rail__badge{flex-shrink:0;min-width:18px;height:18px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;line-height:1;border-radius:9px;font-variant-numeric:tabular-nums}.strct-rail__badge--dot{position:absolute;top:5px;inset-inline-end:7px;min-width:8px;width:8px;height:8px;padding:0;border-radius:50%}.strct-rail__badge--accent{background:var(--acc-m);color:var(--acc)}.strct-rail__badge--success{background:var(--success-bg);color:var(--success)}.strct-rail__badge--warning{background:var(--warning-bg);color:var(--warning)}.strct-rail__badge--critical{background:var(--critical-bg);color:var(--critical)}.strct-rail__badge--dot.strct-rail__badge--accent{background:var(--acc)}.strct-rail__badge--dot.strct-rail__badge--success{background:var(--success)}.strct-rail__badge--dot.strct-rail__badge--warning{background:var(--warning)}.strct-rail__badge--dot.strct-rail__badge--critical{background:var(--critical)}.strct-rail__trailing{flex-shrink:0;color:var(--t3)}.strct-rail__dot{flex-shrink:0;width:7px;height:7px;border-radius:50%}.strct-rail--collapsed .strct-rail__dot{position:absolute;top:5px;inset-inline-end:7px}.strct-rail__dot--accent{background:var(--acc)}.strct-rail__dot--success{background:var(--success)}.strct-rail__dot--warning{background:var(--warning)}.strct-rail__dot--critical{background:var(--critical)}.strct-rail__toggle{display:flex;align-items:center;gap:10px;padding:9px 14px;border:0;border-top:1px solid var(--b1);background:transparent;color:var(--t3);cursor:pointer;font-size:12.5px;font-family:var(--font)}.strct-rail--collapsed .strct-rail__toggle{justify-content:center;padding:9px}.strct-rail__toggle:hover{color:var(--t1);background:var(--bg-3)}.strct-rail__toggle-icon{transition:transform .16s ease}.strct-rail:not(.strct-rail--collapsed) .strct-rail__toggle-icon{transform:rotate(180deg)}\n"] }]
|
|
1277
1277
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], activeId: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeId", required: false }] }, { type: i0.Output, args: ["activeIdChange"] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], select: [{ type: i0.Output, args: ["select"] }] } });
|
|
1278
1278
|
|
|
1279
1279
|
/**
|
|
@@ -3206,7 +3206,7 @@ class StrctDrawer {
|
|
|
3206
3206
|
}
|
|
3207
3207
|
</aside>
|
|
3208
3208
|
}
|
|
3209
|
-
`, isInline: true, styles: [".strct-drawer__backdrop{position:fixed;inset:0;z-index:1100;background:#00000070;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);animation:strct-drawer-fade .16s ease}.strct-drawer__backdrop--bare{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}.strct-drawer{position:fixed;z-index:1101;display:flex;flex-direction:column;background:var(--bg-1);box-shadow:var(--shh)}.strct-drawer--start,.strct-drawer--end{top:0;bottom:0;border-radius:0}.strct-drawer--start{
|
|
3209
|
+
`, isInline: true, styles: [".strct-drawer__backdrop{position:fixed;inset:0;z-index:1100;background:#00000070;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);animation:strct-drawer-fade .16s ease}.strct-drawer__backdrop--bare{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}.strct-drawer{position:fixed;z-index:1101;display:flex;flex-direction:column;background:var(--bg-1);box-shadow:var(--shh)}.strct-drawer--start,.strct-drawer--end{top:0;bottom:0;border-radius:0}.strct-drawer--start{inset-inline-start:0;border-inline-end:1px solid var(--b2);animation:strct-drawer-in-start .18s ease}.strct-drawer--end{inset-inline-end:0;border-inline-start:1px solid var(--b2);animation:strct-drawer-in-end .18s ease}[dir=rtl] .strct-drawer--start{animation-name:strct-drawer-in-end}[dir=rtl] .strct-drawer--end{animation-name:strct-drawer-in-start}.strct-drawer--top,.strct-drawer--bottom{left:0;right:0}.strct-drawer--top{top:0;border-bottom:1px solid var(--b2);animation:strct-drawer-in-top .18s ease}.strct-drawer--bottom{bottom:0;border-top:1px solid var(--b2);animation:strct-drawer-in-bottom .18s ease}.strct-drawer--start.strct-drawer--sm,.strct-drawer--end.strct-drawer--sm{width:300px}.strct-drawer--start.strct-drawer--md,.strct-drawer--end.strct-drawer--md{width:420px}.strct-drawer--start.strct-drawer--lg,.strct-drawer--end.strct-drawer--lg{width:600px}.strct-drawer--top.strct-drawer--sm,.strct-drawer--bottom.strct-drawer--sm{height:220px}.strct-drawer--top.strct-drawer--md,.strct-drawer--bottom.strct-drawer--md{height:340px}.strct-drawer--top.strct-drawer--lg,.strct-drawer--bottom.strct-drawer--lg{height:480px}.strct-drawer{max-width:100vw;max-height:100vh}.strct-drawer__head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--b1);flex-shrink:0}.strct-drawer__title{font-size:15px;font-weight:600;color:var(--t1)}.strct-drawer__close{display:inline-flex;padding:4px;border:0;border-radius:5px;background:transparent;color:var(--t3);cursor:pointer;transition:color .14s ease,background .14s ease}.strct-drawer__close:hover{color:var(--t1);background:var(--bg-3)}.strct-drawer__body{flex:1;min-height:0;overflow-y:auto;padding:16px 18px;font-size:13px;color:var(--t1)}.strct-drawer__foot{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 18px;border-top:1px solid var(--b1);flex-shrink:0}@keyframes strct-drawer-fade{0%{opacity:0}}@keyframes strct-drawer-in-start{0%{transform:translate(-100%)}}@keyframes strct-drawer-in-end{0%{transform:translate(100%)}}@keyframes strct-drawer-in-top{0%{transform:translateY(-100%)}}@keyframes strct-drawer-in-bottom{0%{transform:translateY(100%)}}@media(prefers-reduced-motion:reduce){.strct-drawer__backdrop,.strct-drawer{animation:none}}\n"], dependencies: [{ kind: "component", type: StrctIcon, selector: "strct-icon", inputs: ["name", "size", "strokeWidth", "badge", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3210
3210
|
}
|
|
3211
3211
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: StrctDrawer, decorators: [{
|
|
3212
3212
|
type: Component,
|
|
@@ -3246,7 +3246,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
3246
3246
|
}
|
|
3247
3247
|
</aside>
|
|
3248
3248
|
}
|
|
3249
|
-
`, host: { class: 'strct-drawer-host' }, styles: [".strct-drawer__backdrop{position:fixed;inset:0;z-index:1100;background:#00000070;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);animation:strct-drawer-fade .16s ease}.strct-drawer__backdrop--bare{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}.strct-drawer{position:fixed;z-index:1101;display:flex;flex-direction:column;background:var(--bg-1);box-shadow:var(--shh)}.strct-drawer--start,.strct-drawer--end{top:0;bottom:0;border-radius:0}.strct-drawer--start{
|
|
3249
|
+
`, host: { class: 'strct-drawer-host' }, styles: [".strct-drawer__backdrop{position:fixed;inset:0;z-index:1100;background:#00000070;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);animation:strct-drawer-fade .16s ease}.strct-drawer__backdrop--bare{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}.strct-drawer{position:fixed;z-index:1101;display:flex;flex-direction:column;background:var(--bg-1);box-shadow:var(--shh)}.strct-drawer--start,.strct-drawer--end{top:0;bottom:0;border-radius:0}.strct-drawer--start{inset-inline-start:0;border-inline-end:1px solid var(--b2);animation:strct-drawer-in-start .18s ease}.strct-drawer--end{inset-inline-end:0;border-inline-start:1px solid var(--b2);animation:strct-drawer-in-end .18s ease}[dir=rtl] .strct-drawer--start{animation-name:strct-drawer-in-end}[dir=rtl] .strct-drawer--end{animation-name:strct-drawer-in-start}.strct-drawer--top,.strct-drawer--bottom{left:0;right:0}.strct-drawer--top{top:0;border-bottom:1px solid var(--b2);animation:strct-drawer-in-top .18s ease}.strct-drawer--bottom{bottom:0;border-top:1px solid var(--b2);animation:strct-drawer-in-bottom .18s ease}.strct-drawer--start.strct-drawer--sm,.strct-drawer--end.strct-drawer--sm{width:300px}.strct-drawer--start.strct-drawer--md,.strct-drawer--end.strct-drawer--md{width:420px}.strct-drawer--start.strct-drawer--lg,.strct-drawer--end.strct-drawer--lg{width:600px}.strct-drawer--top.strct-drawer--sm,.strct-drawer--bottom.strct-drawer--sm{height:220px}.strct-drawer--top.strct-drawer--md,.strct-drawer--bottom.strct-drawer--md{height:340px}.strct-drawer--top.strct-drawer--lg,.strct-drawer--bottom.strct-drawer--lg{height:480px}.strct-drawer{max-width:100vw;max-height:100vh}.strct-drawer__head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--b1);flex-shrink:0}.strct-drawer__title{font-size:15px;font-weight:600;color:var(--t1)}.strct-drawer__close{display:inline-flex;padding:4px;border:0;border-radius:5px;background:transparent;color:var(--t3);cursor:pointer;transition:color .14s ease,background .14s ease}.strct-drawer__close:hover{color:var(--t1);background:var(--bg-3)}.strct-drawer__body{flex:1;min-height:0;overflow-y:auto;padding:16px 18px;font-size:13px;color:var(--t1)}.strct-drawer__foot{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 18px;border-top:1px solid var(--b1);flex-shrink:0}@keyframes strct-drawer-fade{0%{opacity:0}}@keyframes strct-drawer-in-start{0%{transform:translate(-100%)}}@keyframes strct-drawer-in-end{0%{transform:translate(100%)}}@keyframes strct-drawer-in-top{0%{transform:translateY(-100%)}}@keyframes strct-drawer-in-bottom{0%{transform:translateY(100%)}}@media(prefers-reduced-motion:reduce){.strct-drawer__backdrop,.strct-drawer{animation:none}}\n"] }]
|
|
3250
3250
|
}], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissable", required: false }] }], footerDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrctDrawerFooter), { isSignal: true }] }] } });
|
|
3251
3251
|
|
|
3252
3252
|
/**
|
|
@@ -4762,7 +4762,7 @@ class StrctToggle {
|
|
|
4762
4762
|
<span class="strct-tg__track"><span class="strct-tg__thumb"></span></span>
|
|
4763
4763
|
<span class="strct-tg__label"><ng-content /></span>
|
|
4764
4764
|
</label>
|
|
4765
|
-
`, isInline: true, styles: [".strct-tg{display:inline-flex;align-items:center;gap:9px;cursor:pointer;font-size:13px;color:var(--t1);-webkit-user-select:none;user-select:none}.strct-tg--disabled{opacity:.5;cursor:not-allowed}.strct-tg__native{position:absolute;opacity:0;width:0;height:0}.strct-tg__track{position:relative;width:34px;height:19px;border-radius:11px;flex-shrink:0;background:var(--bg-3);border:1px solid var(--b3);transition:background .16s ease,border-color .16s ease}.strct-tg__thumb{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:50%;background:var(--t2);transition:transform .16s ease,background .16s ease}.strct-tg__native:checked+.strct-tg__track{background:var(--acc);border-color:transparent}.strct-tg__native:checked+.strct-tg__track .strct-tg__thumb{transform:translate(15px);background:var(--inv)}.strct-tg__native:focus-visible+.strct-tg__track{box-shadow:0 0 0 3px var(--acc18)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4765
|
+
`, isInline: true, styles: [".strct-tg{display:inline-flex;align-items:center;gap:9px;cursor:pointer;font-size:13px;color:var(--t1);-webkit-user-select:none;user-select:none}.strct-tg--disabled{opacity:.5;cursor:not-allowed}.strct-tg__native{position:absolute;opacity:0;width:0;height:0}.strct-tg__track{position:relative;width:34px;height:19px;border-radius:11px;flex-shrink:0;background:var(--bg-3);border:1px solid var(--b3);transition:background .16s ease,border-color .16s ease}.strct-tg__thumb{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:50%;background:var(--t2);transition:transform .16s ease,background .16s ease}.strct-tg__native:checked+.strct-tg__track{background:var(--acc);border-color:transparent}.strct-tg__native:checked+.strct-tg__track .strct-tg__thumb{transform:translate(15px);background:var(--inv)}:host-context([dir=\"rtl\"]) .strct-tg__native:checked+.strct-tg__track .strct-tg__thumb{transform:translate(-15px)}.strct-tg__native:focus-visible+.strct-tg__track{box-shadow:0 0 0 3px var(--acc18)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4766
4766
|
}
|
|
4767
4767
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: StrctToggle, decorators: [{
|
|
4768
4768
|
type: Component,
|
|
@@ -4782,7 +4782,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
4782
4782
|
<span class="strct-tg__track"><span class="strct-tg__thumb"></span></span>
|
|
4783
4783
|
<span class="strct-tg__label"><ng-content /></span>
|
|
4784
4784
|
</label>
|
|
4785
|
-
`, styles: [".strct-tg{display:inline-flex;align-items:center;gap:9px;cursor:pointer;font-size:13px;color:var(--t1);-webkit-user-select:none;user-select:none}.strct-tg--disabled{opacity:.5;cursor:not-allowed}.strct-tg__native{position:absolute;opacity:0;width:0;height:0}.strct-tg__track{position:relative;width:34px;height:19px;border-radius:11px;flex-shrink:0;background:var(--bg-3);border:1px solid var(--b3);transition:background .16s ease,border-color .16s ease}.strct-tg__thumb{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:50%;background:var(--t2);transition:transform .16s ease,background .16s ease}.strct-tg__native:checked+.strct-tg__track{background:var(--acc);border-color:transparent}.strct-tg__native:checked+.strct-tg__track .strct-tg__thumb{transform:translate(15px);background:var(--inv)}.strct-tg__native:focus-visible+.strct-tg__track{box-shadow:0 0 0 3px var(--acc18)}\n"] }]
|
|
4785
|
+
`, styles: [".strct-tg{display:inline-flex;align-items:center;gap:9px;cursor:pointer;font-size:13px;color:var(--t1);-webkit-user-select:none;user-select:none}.strct-tg--disabled{opacity:.5;cursor:not-allowed}.strct-tg__native{position:absolute;opacity:0;width:0;height:0}.strct-tg__track{position:relative;width:34px;height:19px;border-radius:11px;flex-shrink:0;background:var(--bg-3);border:1px solid var(--b3);transition:background .16s ease,border-color .16s ease}.strct-tg__thumb{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:50%;background:var(--t2);transition:transform .16s ease,background .16s ease}.strct-tg__native:checked+.strct-tg__track{background:var(--acc);border-color:transparent}.strct-tg__native:checked+.strct-tg__track .strct-tg__thumb{transform:translate(15px);background:var(--inv)}:host-context([dir=\"rtl\"]) .strct-tg__native:checked+.strct-tg__track .strct-tg__thumb{transform:translate(-15px)}.strct-tg__native:focus-visible+.strct-tg__track{box-shadow:0 0 0 3px var(--acc18)}\n"] }]
|
|
4786
4786
|
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
4787
4787
|
|
|
4788
4788
|
let groupCounter = 0;
|
|
@@ -7386,6 +7386,10 @@ const DG_LABELS = {
|
|
|
7386
7386
|
refresh: 'Refresh data',
|
|
7387
7387
|
actions: 'Actions',
|
|
7388
7388
|
};
|
|
7389
|
+
/** Utility-column widths used when sticky columns are active (px). */
|
|
7390
|
+
const UTIL_W = { detail: 36, expand: 36, sel: 40 };
|
|
7391
|
+
/** Fallback width for a sticky column without an explicit px width. */
|
|
7392
|
+
const STICKY_FALLBACK_W = 120;
|
|
7389
7393
|
/**
|
|
7390
7394
|
* Marks the expandable-row detail template. The row is the template's implicit
|
|
7391
7395
|
* context: `<ng-template strctRowDetail let-row> … {{ row['name'] }} … </ng-template>`.
|
|
@@ -7472,12 +7476,42 @@ class StrctDatagrid {
|
|
|
7472
7476
|
labels = input({}, ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
|
|
7473
7477
|
/** Effective labels (defaults + overrides). */
|
|
7474
7478
|
L = computed(() => ({ ...DG_LABELS, ...this.labels() }), ...(ngDevMode ? [{ debugName: "L" }] : /* istanbul ignore next */ []));
|
|
7479
|
+
/**
|
|
7480
|
+
* Virtual scrolling for large data sets: only the rows inside the viewport
|
|
7481
|
+
* (plus a small overscan) are in the DOM — 20k+ rows stay smooth. The scroll
|
|
7482
|
+
* area gets `viewportHeight` and a sticky header. Assumes uniform
|
|
7483
|
+
* `rowHeight`; combine with `expandable` is unsupported.
|
|
7484
|
+
*/
|
|
7485
|
+
virtual = input(false, { ...(ngDevMode ? { debugName: "virtual" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
7486
|
+
/** Scroll viewport height in px (virtual mode). */
|
|
7487
|
+
viewportHeight = input(360, ...(ngDevMode ? [{ debugName: "viewportHeight" }] : /* istanbul ignore next */ []));
|
|
7488
|
+
/** Uniform row height in px (virtual mode; tune when `compact`). */
|
|
7489
|
+
rowHeight = input(38, ...(ngDevMode ? [{ debugName: "rowHeight" }] : /* istanbul ignore next */ []));
|
|
7490
|
+
/**
|
|
7491
|
+
* Server-side mode: the grid never sorts or slices `rows` itself — it shows
|
|
7492
|
+
* them as given and emits `(lazyLoad)` with `{ page, pageSize, sortKey,
|
|
7493
|
+
* sortDir }` whenever the user pages or sorts (and once on init). Provide
|
|
7494
|
+
* `total` so the pager and count reflect the full server-side set.
|
|
7495
|
+
*/
|
|
7496
|
+
lazy = input(false, { ...(ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
7497
|
+
/** Total row count on the server (lazy mode). */
|
|
7498
|
+
total = input(null, ...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
7499
|
+
/**
|
|
7500
|
+
* Persist the user's column widths + hidden columns under this key in
|
|
7501
|
+
* localStorage (`strct-dg:<key>`), restoring them on init. For full control
|
|
7502
|
+
* use the two-way `columnState` instead (both may be combined).
|
|
7503
|
+
*/
|
|
7504
|
+
stateKey = input(null, ...(ngDevMode ? [{ debugName: "stateKey" }] : /* istanbul ignore next */ []));
|
|
7505
|
+
/** User column preferences (two-way): widths from resize, hidden from the chooser. */
|
|
7506
|
+
columnState = model(null, ...(ngDevMode ? [{ debugName: "columnState" }] : /* istanbul ignore next */ []));
|
|
7475
7507
|
/** Emitted when the selection changes. */
|
|
7476
7508
|
selectionChange = output();
|
|
7477
7509
|
/** Emitted when the refresh button is clicked. */
|
|
7478
7510
|
syncChange = output();
|
|
7479
7511
|
/** Emitted when a row's action-menu item is chosen. */
|
|
7480
7512
|
rowAction = output();
|
|
7513
|
+
/** Server-side data request (lazy mode): load this page / sort and set `rows`. */
|
|
7514
|
+
lazyLoad = output();
|
|
7481
7515
|
menu = inject(StrctMenuService);
|
|
7482
7516
|
detailDef = contentChild(StrctRowDetailDef, ...(ngDevMode ? [{ debugName: "detailDef" }] : /* istanbul ignore next */ []));
|
|
7483
7517
|
actionBarDef = contentChild(StrctDatagridActionBar, ...(ngDevMode ? [{ debugName: "actionBarDef" }] : /* istanbul ignore next */ []));
|
|
@@ -7549,6 +7583,9 @@ class StrctDatagrid {
|
|
|
7549
7583
|
return this.columns().filter((c) => !hidden.has(c.key));
|
|
7550
7584
|
}, ...(ngDevMode ? [{ debugName: "visibleColumns" }] : /* istanbul ignore next */ []));
|
|
7551
7585
|
sorted = computed(() => {
|
|
7586
|
+
// Server-side mode: rows arrive already ordered / sliced — never touch them.
|
|
7587
|
+
if (this.lazy())
|
|
7588
|
+
return this.rows();
|
|
7552
7589
|
const { key, dir } = this.sort();
|
|
7553
7590
|
const data = [...this.rows()];
|
|
7554
7591
|
if (!key)
|
|
@@ -7558,11 +7595,87 @@ class StrctDatagrid {
|
|
|
7558
7595
|
}, ...(ngDevMode ? [{ debugName: "sorted" }] : /* istanbul ignore next */ []));
|
|
7559
7596
|
paged = computed(() => {
|
|
7560
7597
|
const size = this.pageSize();
|
|
7561
|
-
if (size <= 0)
|
|
7598
|
+
if (this.lazy() || size <= 0)
|
|
7562
7599
|
return this.sorted();
|
|
7563
7600
|
const start = (this.page() - 1) * size;
|
|
7564
7601
|
return this.sorted().slice(start, start + size);
|
|
7565
7602
|
}, ...(ngDevMode ? [{ debugName: "paged" }] : /* istanbul ignore next */ []));
|
|
7603
|
+
/** Full count for the pager / footer (server total in lazy mode). */
|
|
7604
|
+
totalCount = computed(() => this.lazy() ? (this.total() ?? this.rows().length) : this.sorted().length, ...(ngDevMode ? [{ debugName: "totalCount" }] : /* istanbul ignore next */ []));
|
|
7605
|
+
// ── Virtual scrolling ──────────────────────────────────────────
|
|
7606
|
+
scrollTop = signal(0, ...(ngDevMode ? [{ debugName: "scrollTop" }] : /* istanbul ignore next */ []));
|
|
7607
|
+
onScroll(event) {
|
|
7608
|
+
this.scrollTop.set(event.target.scrollTop);
|
|
7609
|
+
}
|
|
7610
|
+
/** Visible index window incl. overscan (virtual mode). */
|
|
7611
|
+
vRange = computed(() => {
|
|
7612
|
+
const rh = Math.max(1, this.rowHeight());
|
|
7613
|
+
const n = this.sorted().length;
|
|
7614
|
+
const start = Math.max(0, Math.floor(this.scrollTop() / rh) - 6);
|
|
7615
|
+
const count = Math.ceil(this.viewportHeight() / rh) + 12;
|
|
7616
|
+
return { start, end: Math.min(n, start + count) };
|
|
7617
|
+
}, ...(ngDevMode ? [{ debugName: "vRange" }] : /* istanbul ignore next */ []));
|
|
7618
|
+
/** The rows actually rendered: the virtual window, or the current page. */
|
|
7619
|
+
renderRows = computed(() => this.virtual() ? this.sorted().slice(this.vRange().start, this.vRange().end) : this.paged(), ...(ngDevMode ? [{ debugName: "renderRows" }] : /* istanbul ignore next */ []));
|
|
7620
|
+
topPad = computed(() => this.virtual() ? this.vRange().start * this.rowHeight() : 0, ...(ngDevMode ? [{ debugName: "topPad" }] : /* istanbul ignore next */ []));
|
|
7621
|
+
bottomPad = computed(() => this.virtual() ? Math.max(0, (this.sorted().length - this.vRange().end) * this.rowHeight()) : 0, ...(ngDevMode ? [{ debugName: "bottomPad" }] : /* istanbul ignore next */ []));
|
|
7622
|
+
// ── Sticky (frozen) columns ────────────────────────────────────
|
|
7623
|
+
stickyActive = computed(() => !this.paneOpen() && this.visibleColumns().some((c) => c.sticky), ...(ngDevMode ? [{ debugName: "stickyActive" }] : /* istanbul ignore next */ []));
|
|
7624
|
+
/** Total width of the frozen utility columns (detail / expand / select). */
|
|
7625
|
+
utilityWidth = computed(() => (this.canDetail() ? UTIL_W.detail : 0) +
|
|
7626
|
+
(this.canExpand() ? UTIL_W.expand : 0) +
|
|
7627
|
+
(this.selectable() ? UTIL_W.sel : 0), ...(ngDevMode ? [{ debugName: "utilityWidth" }] : /* istanbul ignore next */ []));
|
|
7628
|
+
/** Left offset of a frozen utility column, or null when sticky is off. */
|
|
7629
|
+
utilLeft(which) {
|
|
7630
|
+
if (!this.stickyActive())
|
|
7631
|
+
return null;
|
|
7632
|
+
let x = 0;
|
|
7633
|
+
if (which === 'detail')
|
|
7634
|
+
return x;
|
|
7635
|
+
if (this.canDetail())
|
|
7636
|
+
x += UTIL_W.detail;
|
|
7637
|
+
if (which === 'expand')
|
|
7638
|
+
return x;
|
|
7639
|
+
if (this.canExpand())
|
|
7640
|
+
x += UTIL_W.expand;
|
|
7641
|
+
return x;
|
|
7642
|
+
}
|
|
7643
|
+
/** Effective px width of a column (resize override → declared px → fallback). */
|
|
7644
|
+
colPx(col) {
|
|
7645
|
+
const resized = this.columnWidths().get(col.key);
|
|
7646
|
+
if (resized != null)
|
|
7647
|
+
return resized;
|
|
7648
|
+
const m = /^(\d+(?:\.\d+)?)px$/.exec(col.width ?? '');
|
|
7649
|
+
return m ? parseFloat(m[1]) : STICKY_FALLBACK_W;
|
|
7650
|
+
}
|
|
7651
|
+
/** key → left px for sticky data columns. */
|
|
7652
|
+
stickyOffsets = computed(() => {
|
|
7653
|
+
const map = new Map();
|
|
7654
|
+
if (!this.stickyActive())
|
|
7655
|
+
return map;
|
|
7656
|
+
let x = this.utilityWidth();
|
|
7657
|
+
for (const col of this.visibleColumns()) {
|
|
7658
|
+
if (!col.sticky)
|
|
7659
|
+
continue;
|
|
7660
|
+
map.set(col.key, x);
|
|
7661
|
+
x += this.colPx(col);
|
|
7662
|
+
}
|
|
7663
|
+
return map;
|
|
7664
|
+
}, ...(ngDevMode ? [{ debugName: "stickyOffsets" }] : /* istanbul ignore next */ []));
|
|
7665
|
+
stickyLeft(key) {
|
|
7666
|
+
return this.stickyOffsets().get(key) ?? null;
|
|
7667
|
+
}
|
|
7668
|
+
isSticky(col) {
|
|
7669
|
+
return !!col.sticky && this.stickyActive();
|
|
7670
|
+
}
|
|
7671
|
+
/** The last frozen column carries the edge shadow. */
|
|
7672
|
+
lastStickyKey = computed(() => {
|
|
7673
|
+
let last = null;
|
|
7674
|
+
for (const col of this.visibleColumns())
|
|
7675
|
+
if (col.sticky)
|
|
7676
|
+
last = col.key;
|
|
7677
|
+
return this.stickyActive() ? last : null;
|
|
7678
|
+
}, ...(ngDevMode ? [{ debugName: "lastStickyKey" }] : /* istanbul ignore next */ []));
|
|
7566
7679
|
allPageSelected = computed(() => {
|
|
7567
7680
|
const rows = this.paged();
|
|
7568
7681
|
return rows.length > 0 && rows.every((r) => this.selected().has(this.idOf(r)));
|
|
@@ -7581,13 +7694,18 @@ class StrctDatagrid {
|
|
|
7581
7694
|
cellTemplate(key) {
|
|
7582
7695
|
return this.cellMap().get(key) ?? null;
|
|
7583
7696
|
}
|
|
7697
|
+
/** Last emitted lazy request (dedupe key). */
|
|
7698
|
+
lastLazyKey = '';
|
|
7699
|
+
/** Last serialized column state pushed outward (loop guard). */
|
|
7700
|
+
lastStateKey = '';
|
|
7584
7701
|
constructor() {
|
|
7585
|
-
// Keep the page in range when the data set shrinks.
|
|
7702
|
+
// Keep the page in range when the data set shrinks (server total in lazy mode).
|
|
7586
7703
|
effect(() => {
|
|
7587
7704
|
const size = this.pageSize();
|
|
7588
7705
|
if (size <= 0)
|
|
7589
7706
|
return;
|
|
7590
|
-
const
|
|
7707
|
+
const count = this.totalCount();
|
|
7708
|
+
const pageCount = Math.max(1, Math.ceil(count / size));
|
|
7591
7709
|
if (this.page() > pageCount)
|
|
7592
7710
|
this.page.set(pageCount);
|
|
7593
7711
|
});
|
|
@@ -7599,6 +7717,106 @@ class StrctDatagrid {
|
|
|
7599
7717
|
return;
|
|
7600
7718
|
untracked(() => this.selected.set(new Set(init)));
|
|
7601
7719
|
});
|
|
7720
|
+
// Server-side mode: announce what to load whenever page / sort / pageSize
|
|
7721
|
+
// change (and once on init, so the consumer fetches the first page).
|
|
7722
|
+
effect(() => {
|
|
7723
|
+
if (!this.lazy())
|
|
7724
|
+
return;
|
|
7725
|
+
const state = {
|
|
7726
|
+
page: this.page(),
|
|
7727
|
+
pageSize: this.pageSize(),
|
|
7728
|
+
sortKey: this.sort().key,
|
|
7729
|
+
sortDir: this.sort().dir,
|
|
7730
|
+
};
|
|
7731
|
+
const key = JSON.stringify(state);
|
|
7732
|
+
untracked(() => {
|
|
7733
|
+
if (key === this.lastLazyKey)
|
|
7734
|
+
return;
|
|
7735
|
+
this.lastLazyKey = key;
|
|
7736
|
+
this.lazyLoad.emit(state);
|
|
7737
|
+
});
|
|
7738
|
+
});
|
|
7739
|
+
// Restore persisted column preferences once, before the first render.
|
|
7740
|
+
const persisted = this.readPersistedState();
|
|
7741
|
+
if (persisted)
|
|
7742
|
+
this.applyColumnState(persisted);
|
|
7743
|
+
// Apply externally-driven columnState.
|
|
7744
|
+
effect(() => {
|
|
7745
|
+
const st = this.columnState();
|
|
7746
|
+
untracked(() => {
|
|
7747
|
+
if (!st || JSON.stringify(st) === this.lastStateKey)
|
|
7748
|
+
return;
|
|
7749
|
+
this.lastStateKey = JSON.stringify(st);
|
|
7750
|
+
this.applyColumnState(st);
|
|
7751
|
+
});
|
|
7752
|
+
});
|
|
7753
|
+
// Push user changes (resize / chooser) outward + persist under stateKey.
|
|
7754
|
+
effect(() => {
|
|
7755
|
+
const widths = Object.fromEntries(this.columnWidths());
|
|
7756
|
+
const hidden = [...this.hiddenColumns()];
|
|
7757
|
+
const st = { widths, hidden };
|
|
7758
|
+
const key = JSON.stringify(st);
|
|
7759
|
+
untracked(() => {
|
|
7760
|
+
if (key === this.lastStateKey)
|
|
7761
|
+
return;
|
|
7762
|
+
this.lastStateKey = key;
|
|
7763
|
+
this.columnState.set(st);
|
|
7764
|
+
const sk = this.stateKey();
|
|
7765
|
+
if (sk && typeof localStorage !== 'undefined') {
|
|
7766
|
+
try {
|
|
7767
|
+
localStorage.setItem(`strct-dg:${sk}`, key);
|
|
7768
|
+
}
|
|
7769
|
+
catch {
|
|
7770
|
+
/* storage full / denied — persistence is best-effort */
|
|
7771
|
+
}
|
|
7772
|
+
}
|
|
7773
|
+
});
|
|
7774
|
+
});
|
|
7775
|
+
}
|
|
7776
|
+
readPersistedState() {
|
|
7777
|
+
const sk = this.stateKey();
|
|
7778
|
+
if (!sk || typeof localStorage === 'undefined')
|
|
7779
|
+
return null;
|
|
7780
|
+
try {
|
|
7781
|
+
const raw = localStorage.getItem(`strct-dg:${sk}`);
|
|
7782
|
+
return raw ? JSON.parse(raw) : null;
|
|
7783
|
+
}
|
|
7784
|
+
catch {
|
|
7785
|
+
return null;
|
|
7786
|
+
}
|
|
7787
|
+
}
|
|
7788
|
+
applyColumnState(st) {
|
|
7789
|
+
this.columnWidths.set(new Map(Object.entries(st.widths ?? {}).map(([k, v]) => [k, Number(v)])));
|
|
7790
|
+
this.hiddenColumns.set(new Set(st.hidden ?? []));
|
|
7791
|
+
}
|
|
7792
|
+
/**
|
|
7793
|
+
* The grid as CSV: header labels + every non-hidden column, all rows in the
|
|
7794
|
+
* current order (client mode: the full sorted set, not just the page).
|
|
7795
|
+
*/
|
|
7796
|
+
toCSV() {
|
|
7797
|
+
const hidden = this.hiddenColumns();
|
|
7798
|
+
const cols = this.columns().filter((c) => !hidden.has(c.key));
|
|
7799
|
+
const esc = (v) => {
|
|
7800
|
+
const s = v == null ? '' : String(v);
|
|
7801
|
+
return /[",\n;]/.test(s) ? `"${s.replace(/"/g, '""')}"` : s;
|
|
7802
|
+
};
|
|
7803
|
+
const data = this.lazy() ? this.rows() : this.sorted();
|
|
7804
|
+
return [
|
|
7805
|
+
cols.map((c) => esc(c.label)).join(','),
|
|
7806
|
+
...data.map((r) => cols.map((c) => esc(r[c.key])).join(',')),
|
|
7807
|
+
].join('\n');
|
|
7808
|
+
}
|
|
7809
|
+
/** Download the grid as a CSV file. */
|
|
7810
|
+
downloadCSV(filename = 'datagrid.csv') {
|
|
7811
|
+
if (typeof document === 'undefined')
|
|
7812
|
+
return;
|
|
7813
|
+
const blob = new Blob(['\uFEFF' + this.toCSV()], { type: 'text/csv;charset=utf-8' });
|
|
7814
|
+
const url = URL.createObjectURL(blob);
|
|
7815
|
+
const a = document.createElement('a');
|
|
7816
|
+
a.href = url;
|
|
7817
|
+
a.download = filename;
|
|
7818
|
+
a.click();
|
|
7819
|
+
URL.revokeObjectURL(url);
|
|
7602
7820
|
}
|
|
7603
7821
|
colspan() {
|
|
7604
7822
|
return (this.visibleColumns().length +
|
|
@@ -7726,24 +7944,43 @@ class StrctDatagrid {
|
|
|
7726
7944
|
return String(a ?? '').localeCompare(String(b ?? ''), undefined, { numeric: true });
|
|
7727
7945
|
}
|
|
7728
7946
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: StrctDatagrid, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7729
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: StrctDatagrid, isStandalone: true, selector: "strct-datagrid", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: true, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, expandable: { classPropertyName: "expandable", publicName: "expandable", isSignal: true, isRequired: false, transformFunction: null }, detailPane: { classPropertyName: "detailPane", publicName: "detailPane", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, singleLine: { classPropertyName: "singleLine", publicName: "singleLine", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, columnChooser: { classPropertyName: "columnChooser", publicName: "columnChooser", isSignal: true, isRequired: false, transformFunction: null }, sync: { classPropertyName: "sync", publicName: "sync", isSignal: true, isRequired: false, transformFunction: null }, footerActionsDisabled: { classPropertyName: "footerActionsDisabled", publicName: "footerActionsDisabled", isSignal: true, isRequired: false, transformFunction: null }, rowId: { classPropertyName: "rowId", publicName: "rowId", isSignal: true, isRequired: false, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, initialSelection: { classPropertyName: "initialSelection", publicName: "initialSelection", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectionChange: "selectionChange", syncChange: "syncChange", rowAction: "rowAction" }, host: { properties: { "class.strct-dg-host--compact": "compact()", "class.strct-dg-host--singleline": "singleLine()" }, classAttribute: "strct-dg-host" }, queries: [{ propertyName: "detailDef", first: true, predicate: StrctRowDetailDef, descendants: true, isSignal: true }, { propertyName: "actionBarDef", first: true, predicate: StrctDatagridActionBar, descendants: true, isSignal: true }, { propertyName: "cellDefs", predicate: StrctCellDef, isSignal: true }], ngImport: i0, template: `
|
|
7947
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: StrctDatagrid, isStandalone: true, selector: "strct-datagrid", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: true, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, expandable: { classPropertyName: "expandable", publicName: "expandable", isSignal: true, isRequired: false, transformFunction: null }, detailPane: { classPropertyName: "detailPane", publicName: "detailPane", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, singleLine: { classPropertyName: "singleLine", publicName: "singleLine", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, columnChooser: { classPropertyName: "columnChooser", publicName: "columnChooser", isSignal: true, isRequired: false, transformFunction: null }, sync: { classPropertyName: "sync", publicName: "sync", isSignal: true, isRequired: false, transformFunction: null }, footerActionsDisabled: { classPropertyName: "footerActionsDisabled", publicName: "footerActionsDisabled", isSignal: true, isRequired: false, transformFunction: null }, rowId: { classPropertyName: "rowId", publicName: "rowId", isSignal: true, isRequired: false, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, initialSelection: { classPropertyName: "initialSelection", publicName: "initialSelection", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, virtual: { classPropertyName: "virtual", publicName: "virtual", isSignal: true, isRequired: false, transformFunction: null }, viewportHeight: { classPropertyName: "viewportHeight", publicName: "viewportHeight", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, stateKey: { classPropertyName: "stateKey", publicName: "stateKey", isSignal: true, isRequired: false, transformFunction: null }, columnState: { classPropertyName: "columnState", publicName: "columnState", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnState: "columnStateChange", selectionChange: "selectionChange", syncChange: "syncChange", rowAction: "rowAction", lazyLoad: "lazyLoad" }, host: { properties: { "class.strct-dg-host--compact": "compact()", "class.strct-dg-host--singleline": "singleLine()", "class.strct-dg-host--virtual": "virtual()", "class.strct-dg-host--sticky": "stickyActive()" }, classAttribute: "strct-dg-host" }, queries: [{ propertyName: "detailDef", first: true, predicate: StrctRowDetailDef, descendants: true, isSignal: true }, { propertyName: "actionBarDef", first: true, predicate: StrctDatagridActionBar, descendants: true, isSignal: true }, { propertyName: "cellDefs", predicate: StrctCellDef, isSignal: true }], ngImport: i0, template: `
|
|
7730
7948
|
@if (actionBarDef()) {
|
|
7731
7949
|
<div class="strct-dg__toolbar"><ng-content select="[strctDatagridActionBar]" /></div>
|
|
7732
7950
|
}
|
|
7733
7951
|
|
|
7734
7952
|
<div class="strct-dg__layout" [class.strct-dg__layout--paned]="paneOpen()">
|
|
7735
|
-
<div
|
|
7953
|
+
<div
|
|
7954
|
+
class="strct-dg__scroll"
|
|
7955
|
+
tabindex="0"
|
|
7956
|
+
role="region"
|
|
7957
|
+
[attr.aria-label]="L().rows"
|
|
7958
|
+
[style.max-height.px]="virtual() ? viewportHeight() : null"
|
|
7959
|
+
(scroll)="virtual() && onScroll($event)"
|
|
7960
|
+
>
|
|
7736
7961
|
<table class="strct-dg">
|
|
7737
7962
|
<thead>
|
|
7738
7963
|
<tr>
|
|
7739
7964
|
@if (canDetail()) {
|
|
7740
|
-
<th
|
|
7965
|
+
<th
|
|
7966
|
+
class="strct-dg__expandcol"
|
|
7967
|
+
[class.strct-dg__cell--sticky]="stickyActive()"
|
|
7968
|
+
[style.left.px]="utilLeft('detail')"
|
|
7969
|
+
></th>
|
|
7741
7970
|
}
|
|
7742
7971
|
@if (canExpand()) {
|
|
7743
|
-
<th
|
|
7972
|
+
<th
|
|
7973
|
+
class="strct-dg__expandcol"
|
|
7974
|
+
[class.strct-dg__cell--sticky]="stickyActive()"
|
|
7975
|
+
[style.left.px]="utilLeft('expand')"
|
|
7976
|
+
></th>
|
|
7744
7977
|
}
|
|
7745
7978
|
@if (selectable()) {
|
|
7746
|
-
<th
|
|
7979
|
+
<th
|
|
7980
|
+
class="strct-dg__sel"
|
|
7981
|
+
[class.strct-dg__cell--sticky]="stickyActive()"
|
|
7982
|
+
[style.left.px]="utilLeft('sel')"
|
|
7983
|
+
>
|
|
7747
7984
|
<strct-checkbox
|
|
7748
7985
|
[ariaLabel]="L().selectAll"
|
|
7749
7986
|
[checked]="allPageSelected()"
|
|
@@ -7757,6 +7994,9 @@ class StrctDatagrid {
|
|
|
7757
7994
|
[style.text-align]="col.align ?? 'start'"
|
|
7758
7995
|
[style.width]="colWidth(col.key) ?? col.width ?? null"
|
|
7759
7996
|
[class.strct-dg__th--sortable]="col.sortable"
|
|
7997
|
+
[class.strct-dg__cell--sticky]="isSticky(col)"
|
|
7998
|
+
[class.strct-dg__cell--sticky-last]="col.key === lastStickyKey()"
|
|
7999
|
+
[style.left.px]="stickyLeft(col.key)"
|
|
7760
8000
|
[attr.tabindex]="col.sortable ? 0 : null"
|
|
7761
8001
|
[attr.aria-sort]="col.sortable ? ariaSort(col.key) : null"
|
|
7762
8002
|
(click)="col.sortable && sortBy(col.key)"
|
|
@@ -7810,13 +8050,22 @@ class StrctDatagrid {
|
|
|
7810
8050
|
</tr>
|
|
7811
8051
|
}
|
|
7812
8052
|
} @else {
|
|
7813
|
-
@
|
|
8053
|
+
@if (virtual() && topPad() > 0) {
|
|
8054
|
+
<tr class="strct-dg__vspacer" aria-hidden="true">
|
|
8055
|
+
<td [attr.colspan]="colspan()" [style.height.px]="topPad()"></td>
|
|
8056
|
+
</tr>
|
|
8057
|
+
}
|
|
8058
|
+
@for (row of renderRows(); track rowKey(row)) {
|
|
7814
8059
|
<tr
|
|
7815
8060
|
[class.strct-dg__row--selected]="isSelected(row)"
|
|
7816
8061
|
[class.strct-dg__row--active]="paneOpen() && row === activeRow()"
|
|
7817
8062
|
>
|
|
7818
8063
|
@if (canDetail()) {
|
|
7819
|
-
<td
|
|
8064
|
+
<td
|
|
8065
|
+
class="strct-dg__expandcell"
|
|
8066
|
+
[class.strct-dg__cell--sticky]="stickyActive()"
|
|
8067
|
+
[style.left.px]="utilLeft('detail')"
|
|
8068
|
+
>
|
|
7820
8069
|
<button
|
|
7821
8070
|
type="button"
|
|
7822
8071
|
class="strct-dg__detailbtn"
|
|
@@ -7830,7 +8079,11 @@ class StrctDatagrid {
|
|
|
7830
8079
|
</td>
|
|
7831
8080
|
}
|
|
7832
8081
|
@if (canExpand()) {
|
|
7833
|
-
<td
|
|
8082
|
+
<td
|
|
8083
|
+
class="strct-dg__expandcell"
|
|
8084
|
+
[class.strct-dg__cell--sticky]="stickyActive()"
|
|
8085
|
+
[style.left.px]="utilLeft('expand')"
|
|
8086
|
+
>
|
|
7834
8087
|
<button
|
|
7835
8088
|
type="button"
|
|
7836
8089
|
class="strct-dg__expandbtn"
|
|
@@ -7844,7 +8097,11 @@ class StrctDatagrid {
|
|
|
7844
8097
|
</td>
|
|
7845
8098
|
}
|
|
7846
8099
|
@if (selectable()) {
|
|
7847
|
-
<td
|
|
8100
|
+
<td
|
|
8101
|
+
class="strct-dg__sel"
|
|
8102
|
+
[class.strct-dg__cell--sticky]="stickyActive()"
|
|
8103
|
+
[style.left.px]="utilLeft('sel')"
|
|
8104
|
+
>
|
|
7848
8105
|
<strct-checkbox
|
|
7849
8106
|
[ariaLabel]="L().selectRow"
|
|
7850
8107
|
[checked]="isSelected(row)"
|
|
@@ -7853,7 +8110,12 @@ class StrctDatagrid {
|
|
|
7853
8110
|
</td>
|
|
7854
8111
|
}
|
|
7855
8112
|
@for (col of visibleColumns(); track col.key) {
|
|
7856
|
-
<td
|
|
8113
|
+
<td
|
|
8114
|
+
[style.text-align]="col.align ?? 'start'"
|
|
8115
|
+
[class.strct-dg__cell--sticky]="isSticky(col)"
|
|
8116
|
+
[class.strct-dg__cell--sticky-last]="col.key === lastStickyKey()"
|
|
8117
|
+
[style.left.px]="stickyLeft(col.key)"
|
|
8118
|
+
>
|
|
7857
8119
|
@if (cellTemplate(col.key); as tpl) {
|
|
7858
8120
|
<ng-container
|
|
7859
8121
|
[ngTemplateOutlet]="tpl"
|
|
@@ -7898,6 +8160,11 @@ class StrctDatagrid {
|
|
|
7898
8160
|
<td class="strct-dg__empty" [attr.colspan]="colspan()">{{ emptyText() }}</td>
|
|
7899
8161
|
</tr>
|
|
7900
8162
|
}
|
|
8163
|
+
@if (virtual() && bottomPad() > 0) {
|
|
8164
|
+
<tr class="strct-dg__vspacer" aria-hidden="true">
|
|
8165
|
+
<td [attr.colspan]="colspan()" [style.height.px]="bottomPad()"></td>
|
|
8166
|
+
</tr>
|
|
8167
|
+
}
|
|
7901
8168
|
}
|
|
7902
8169
|
</tbody>
|
|
7903
8170
|
</table>
|
|
@@ -7926,7 +8193,7 @@ class StrctDatagrid {
|
|
|
7926
8193
|
}
|
|
7927
8194
|
</div>
|
|
7928
8195
|
|
|
7929
|
-
@if (pageSize() > 0 && !loading()) {
|
|
8196
|
+
@if ((pageSize() > 0 || virtual()) && !loading()) {
|
|
7930
8197
|
<div class="strct-dg__foot">
|
|
7931
8198
|
<div class="strct-dg__foot-left">
|
|
7932
8199
|
@if (columnChooser() || sync()) {
|
|
@@ -7972,7 +8239,7 @@ class StrctDatagrid {
|
|
|
7972
8239
|
</div>
|
|
7973
8240
|
}
|
|
7974
8241
|
<span class="strct-dg__count">
|
|
7975
|
-
{{
|
|
8242
|
+
{{ totalCount() }} {{ totalCount() === 1 ? L().row : L().rows }}
|
|
7976
8243
|
@if (selectedCount()) {
|
|
7977
8244
|
<span class="strct-dg__count-sep">|</span>
|
|
7978
8245
|
<span class="strct-dg__count-sel">{{ selectedCount() }} {{ L().selected }}</span>
|
|
@@ -7980,11 +8247,13 @@ class StrctDatagrid {
|
|
|
7980
8247
|
</span>
|
|
7981
8248
|
</div>
|
|
7982
8249
|
<div class="strct-dg__foot-right">
|
|
7983
|
-
|
|
8250
|
+
@if (pageSize() > 0) {
|
|
8251
|
+
<strct-pagination [total]="totalCount()" [pageSize]="pageSize()" [(page)]="page" />
|
|
8252
|
+
}
|
|
7984
8253
|
</div>
|
|
7985
8254
|
</div>
|
|
7986
8255
|
}
|
|
7987
|
-
`, isInline: true, styles: [".strct-dg-host{display:block;border:1px solid var(--b2);border-radius:10px;background:var(--bg-2);box-shadow:var(--shadow-rest)}.strct-dg__scroll{flex:1 1 auto;min-width:0;overflow-x:auto;-webkit-overflow-scrolling:touch}.strct-dg{width:100%;border-collapse:collapse;font-size:13px;overflow:hidden;background:var(--bg-2)}.strct-dg-host:not(:has(.strct-dg__toolbar)) .strct-dg{border-start-start-radius:9px;border-start-end-radius:9px}.strct-dg-host:not(:has(.strct-dg__foot)) .strct-dg{border-end-start-radius:9px;border-end-end-radius:9px}.strct-dg th,.strct-dg td{padding:9px 13px;text-align:start;border-bottom:1px solid var(--b1)}.strct-dg tbody td{background:var(--bg-1)}[data-theme=dark] .strct-dg tbody td{background:var(--bg-3)}.strct-dg-host--compact .strct-dg th,.strct-dg-host--compact .strct-dg td{padding:5px 11px}.strct-dg-host--singleline .strct-dg tbody tr:not(.strct-dg__detailrow)>td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:360px}.strct-dg th{position:relative;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:var(--t2);background:var(--bg-2);white-space:nowrap;-webkit-user-select:none;user-select:none}.strct-dg__th--sortable{cursor:pointer}.strct-dg__th--sortable:hover{color:var(--t1)}.strct-dg__th--sortable:focus-visible{outline:2px solid var(--acc50);outline-offset:-2px}.strct-dg__hd{display:inline-flex;align-items:center;gap:5px}.strct-dg__sorticon{color:var(--t3)}.strct-dg__th--sortable:hover .strct-dg__sorticon{color:var(--acc)}.strct-dg__resize{position:absolute;
|
|
8256
|
+
`, isInline: true, styles: [".strct-dg-host{display:block;border:1px solid var(--b2);border-radius:10px;background:var(--bg-2);box-shadow:var(--shadow-rest)}.strct-dg__scroll{flex:1 1 auto;min-width:0;overflow-x:auto;-webkit-overflow-scrolling:touch}.strct-dg-host--virtual .strct-dg__scroll{overflow-y:auto}.strct-dg-host--virtual .strct-dg thead th{position:sticky;top:0;z-index:5}.strct-dg__vspacer td{padding:0;border:0;background:transparent}.strct-dg-host--sticky .strct-dg,.strct-dg-host--virtual .strct-dg{border-collapse:separate;border-spacing:0;overflow:visible;border-radius:0}.strct-dg-host--sticky .strct-dg{width:max-content;min-width:100%}.strct-dg .strct-dg__cell--sticky{position:sticky;z-index:3}.strct-dg thead th.strct-dg__cell--sticky{z-index:6}.strct-dg .strct-dg__cell--sticky-last:after{content:\"\";position:absolute;top:0;bottom:0;right:-1px;width:7px;pointer-events:none;background:linear-gradient(90deg,rgba(0,0,0,.14),transparent)}.strct-dg-host--sticky .strct-dg__expandcol,.strct-dg-host--sticky .strct-dg__expandcell{width:36px;min-width:36px;max-width:36px;box-sizing:border-box}.strct-dg-host--sticky .strct-dg__sel{width:40px;min-width:40px;max-width:40px;box-sizing:border-box}.strct-dg-host--sticky tbody .strct-dg__cell--sticky{background:var(--bg-1)}[data-theme=dark] .strct-dg-host--sticky tbody .strct-dg__cell--sticky{background:var(--bg-3)}.strct-dg-host--sticky tbody tr:hover .strct-dg__cell--sticky{background:linear-gradient(var(--acc-s),var(--acc-s)) var(--bg-1)}[data-theme=dark] .strct-dg-host--sticky tbody tr:hover .strct-dg__cell--sticky{background:linear-gradient(var(--acc-s),var(--acc-s)) var(--bg-3)}.strct-dg-host--sticky tbody .strct-dg__row--selected .strct-dg__cell--sticky{background:linear-gradient(var(--acc-m),var(--acc-m)) var(--bg-1)}[data-theme=dark] .strct-dg-host--sticky tbody .strct-dg__row--selected .strct-dg__cell--sticky{background:linear-gradient(var(--acc-m),var(--acc-m)) var(--bg-3)}.strct-dg{width:100%;border-collapse:collapse;font-size:13px;overflow:hidden;background:var(--bg-2)}.strct-dg-host:not(:has(.strct-dg__toolbar)) .strct-dg{border-start-start-radius:9px;border-start-end-radius:9px}.strct-dg-host:not(:has(.strct-dg__foot)) .strct-dg{border-end-start-radius:9px;border-end-end-radius:9px}.strct-dg th,.strct-dg td{padding:9px 13px;text-align:start;border-bottom:1px solid var(--b1)}.strct-dg tbody td{background:var(--bg-1)}[data-theme=dark] .strct-dg tbody td{background:var(--bg-3)}.strct-dg-host--compact .strct-dg th,.strct-dg-host--compact .strct-dg td{padding:5px 11px}.strct-dg-host--singleline .strct-dg tbody tr:not(.strct-dg__detailrow)>td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:360px}.strct-dg th{position:relative;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:var(--t2);background:var(--bg-2);white-space:nowrap;-webkit-user-select:none;user-select:none}.strct-dg__th--sortable{cursor:pointer}.strct-dg__th--sortable:hover{color:var(--t1)}.strct-dg__th--sortable:focus-visible{outline:2px solid var(--acc50);outline-offset:-2px}.strct-dg__hd{display:inline-flex;align-items:center;gap:5px}.strct-dg__sorticon{color:var(--t3)}.strct-dg__th--sortable:hover .strct-dg__sorticon{color:var(--acc)}.strct-dg__resize{position:absolute;inset-inline-end:0;top:0;bottom:0;width:4px;cursor:col-resize;background:transparent;z-index:2}.strct-dg__resize:hover{background:var(--acc)}.strct-dg td{color:var(--t1)}.strct-dg tbody tr:last-child td{border-bottom:0}.strct-dg tbody tr:not(.strct-dg__detailrow):hover td{background:var(--acc-s)}.strct-dg__row--selected td{background:var(--acc-m)}.strct-dg__sel{width:1%;white-space:nowrap}.strct-dg__sel input{accent-color:var(--acc);width:15px;height:15px;cursor:pointer}.strct-dg__expandcol,.strct-dg__expandcell{width:1%;white-space:nowrap}.strct-dg__actioncol,.strct-dg__actioncell{width:1%;white-space:nowrap;text-align:end}.strct-dg__kebab{display:inline-flex;padding:4px;border:0;border-radius:5px;background:transparent;color:var(--t3);cursor:pointer;transition:color .14s ease,background .14s ease}.strct-dg__kebab:hover{color:var(--t1);background:var(--bg-3)}.strct-dg__expandbtn{display:inline-flex;padding:3px;border:0;border-radius:4px;background:transparent;color:var(--t3);cursor:pointer;transition:transform .15s ease,color .15s ease}.strct-dg__expandbtn:hover{color:var(--t1);background:var(--bg-3)}.strct-dg__expandbtn--open{transform:rotate(90deg);color:var(--acc)}.strct-dg__detailbtn{display:inline-flex;padding:3px;border:0;border-radius:4px;background:transparent;color:var(--t3);cursor:pointer;transition:color .14s ease,background .14s ease}.strct-dg__detailbtn:hover{color:var(--acc);background:var(--bg-3)}.strct-dg__detailbtn--active{color:var(--acc);background:var(--acc-m)}.strct-dg__detailrow td{background:var(--bg-2);padding:0}.strct-dg__detail{padding:14px 16px;font-size:13px;color:var(--t2)}.strct-dg__layout{display:flex;align-items:flex-start;min-width:0}.strct-dg__layout--paned{gap:0}.strct-dg__layout--paned .strct-dg__scroll{flex:0 0 auto;width:260px;min-width:260px;max-width:260px}.strct-dg__layout--paned .strct-dg{width:260px;min-width:260px;max-width:260px;flex-shrink:0;border-top-right-radius:0;border-bottom-right-radius:0}.strct-dg__row--clickable{cursor:pointer}.strct-dg__row--active td{background:var(--acc-m)}.strct-dg__layout--paned .strct-dg__row--active td:last-child{position:relative;padding-inline-end:26px}.strct-dg__layout--paned .strct-dg__row--active td:last-child:after{content:\"\";position:absolute;right:11px;top:50%;width:6px;height:6px;border-top:1.6px solid var(--acc);border-inline-end:1.6px solid var(--acc);transform:translateY(-50%) rotate(45deg)}.strct-dg__pane{flex:1;min-width:0;align-self:stretch;background:var(--bg-1);border:1px solid var(--b2);border-inline-start:2px solid var(--acc);border-radius:0 8px 8px 0;overflow:hidden;animation:strct-dg-pane-in .14s ease}.strct-dg__pane-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 14px;border-bottom:1px solid var(--b1);font-size:13px;font-weight:600;color:var(--t1)}.strct-dg__pane-close{display:inline-flex;padding:3px;border:0;border-radius:4px;background:transparent;color:var(--t3);cursor:pointer}.strct-dg__pane-close:hover{color:var(--t1);background:var(--bg-3)}.strct-dg__pane-body{padding:14px 16px;font-size:13px;color:var(--t2)}@keyframes strct-dg-pane-in{0%{opacity:0;transform:translate(8px)}}@keyframes strct-skeleton-pulse{0%,to{opacity:.4}50%{opacity:.7}}.strct-dg__skeleton-block{height:12px;background:var(--bg-3);border-radius:var(--radius-sm);animation:strct-skeleton-pulse 1.4s ease infinite}.strct-dg__skeleton-row td{border-bottom:1px solid var(--b1)}.strct-dg__empty{text-align:center;color:var(--t3);padding:22px}.strct-dg__toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px 14px;border-bottom:1px solid var(--b2)}.strct-dg__foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 14px;border-top:1px solid var(--b2);flex-wrap:wrap}.strct-dg__foot-left,.strct-dg__foot-right{display:flex;align-items:center;gap:12px}.strct-dg__actions{position:relative}.strct-dg__chooser-menu{position:absolute;bottom:calc(100% + 6px);left:0;z-index:10;min-width:180px;background:var(--bg-1);border:1px solid var(--b2);border-radius:8px;box-shadow:var(--shadow-pop);padding:6px;display:flex;flex-direction:column;gap:2px}.strct-dg__chooser-menu--right{inset-inline-start:auto;inset-inline-end:0}.strct-dg__chooser-item{display:flex;align-items:center;gap:8px;padding:5px 8px;border-radius:6px;cursor:pointer;font-size:12px;color:var(--t1);transition:background .1s ease;-webkit-user-select:none;user-select:none}.strct-dg__chooser-item:hover{background:var(--bg-3)}.strct-dg__count{font-size:12px;color:var(--t2)}.strct-dg__count-sep{margin:0 8px;color:var(--b2)}.strct-dg__count-sel{color:var(--acc)}\n"], dependencies: [{ kind: "component", type: StrctIcon, selector: "strct-icon", inputs: ["name", "size", "strokeWidth", "badge", "ariaLabel"] }, { kind: "component", type: StrctPagination, selector: "strct-pagination", inputs: ["prevLabel", "nextLabel", "regionLabel", "total", "pageSize", "page"], outputs: ["pageChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: StrctCheckbox, selector: "strct-checkbox", inputs: ["checked", "isDisabled", "disabled", "indeterminate", "ariaLabel"], outputs: ["checkedChange", "isDisabledChange"] }, { kind: "component", type: StrctButton, selector: "button[strct-button], a[strct-button]", inputs: ["variant", "size", "solid", "block", "iconOnly"] }, { kind: "component", type: StrctButtonGroup, selector: "strct-button-group" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
7988
8257
|
}
|
|
7989
8258
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: StrctDatagrid, decorators: [{
|
|
7990
8259
|
type: Component,
|
|
@@ -8001,18 +8270,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8001
8270
|
}
|
|
8002
8271
|
|
|
8003
8272
|
<div class="strct-dg__layout" [class.strct-dg__layout--paned]="paneOpen()">
|
|
8004
|
-
<div
|
|
8273
|
+
<div
|
|
8274
|
+
class="strct-dg__scroll"
|
|
8275
|
+
tabindex="0"
|
|
8276
|
+
role="region"
|
|
8277
|
+
[attr.aria-label]="L().rows"
|
|
8278
|
+
[style.max-height.px]="virtual() ? viewportHeight() : null"
|
|
8279
|
+
(scroll)="virtual() && onScroll($event)"
|
|
8280
|
+
>
|
|
8005
8281
|
<table class="strct-dg">
|
|
8006
8282
|
<thead>
|
|
8007
8283
|
<tr>
|
|
8008
8284
|
@if (canDetail()) {
|
|
8009
|
-
<th
|
|
8285
|
+
<th
|
|
8286
|
+
class="strct-dg__expandcol"
|
|
8287
|
+
[class.strct-dg__cell--sticky]="stickyActive()"
|
|
8288
|
+
[style.left.px]="utilLeft('detail')"
|
|
8289
|
+
></th>
|
|
8010
8290
|
}
|
|
8011
8291
|
@if (canExpand()) {
|
|
8012
|
-
<th
|
|
8292
|
+
<th
|
|
8293
|
+
class="strct-dg__expandcol"
|
|
8294
|
+
[class.strct-dg__cell--sticky]="stickyActive()"
|
|
8295
|
+
[style.left.px]="utilLeft('expand')"
|
|
8296
|
+
></th>
|
|
8013
8297
|
}
|
|
8014
8298
|
@if (selectable()) {
|
|
8015
|
-
<th
|
|
8299
|
+
<th
|
|
8300
|
+
class="strct-dg__sel"
|
|
8301
|
+
[class.strct-dg__cell--sticky]="stickyActive()"
|
|
8302
|
+
[style.left.px]="utilLeft('sel')"
|
|
8303
|
+
>
|
|
8016
8304
|
<strct-checkbox
|
|
8017
8305
|
[ariaLabel]="L().selectAll"
|
|
8018
8306
|
[checked]="allPageSelected()"
|
|
@@ -8026,6 +8314,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8026
8314
|
[style.text-align]="col.align ?? 'start'"
|
|
8027
8315
|
[style.width]="colWidth(col.key) ?? col.width ?? null"
|
|
8028
8316
|
[class.strct-dg__th--sortable]="col.sortable"
|
|
8317
|
+
[class.strct-dg__cell--sticky]="isSticky(col)"
|
|
8318
|
+
[class.strct-dg__cell--sticky-last]="col.key === lastStickyKey()"
|
|
8319
|
+
[style.left.px]="stickyLeft(col.key)"
|
|
8029
8320
|
[attr.tabindex]="col.sortable ? 0 : null"
|
|
8030
8321
|
[attr.aria-sort]="col.sortable ? ariaSort(col.key) : null"
|
|
8031
8322
|
(click)="col.sortable && sortBy(col.key)"
|
|
@@ -8079,13 +8370,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8079
8370
|
</tr>
|
|
8080
8371
|
}
|
|
8081
8372
|
} @else {
|
|
8082
|
-
@
|
|
8373
|
+
@if (virtual() && topPad() > 0) {
|
|
8374
|
+
<tr class="strct-dg__vspacer" aria-hidden="true">
|
|
8375
|
+
<td [attr.colspan]="colspan()" [style.height.px]="topPad()"></td>
|
|
8376
|
+
</tr>
|
|
8377
|
+
}
|
|
8378
|
+
@for (row of renderRows(); track rowKey(row)) {
|
|
8083
8379
|
<tr
|
|
8084
8380
|
[class.strct-dg__row--selected]="isSelected(row)"
|
|
8085
8381
|
[class.strct-dg__row--active]="paneOpen() && row === activeRow()"
|
|
8086
8382
|
>
|
|
8087
8383
|
@if (canDetail()) {
|
|
8088
|
-
<td
|
|
8384
|
+
<td
|
|
8385
|
+
class="strct-dg__expandcell"
|
|
8386
|
+
[class.strct-dg__cell--sticky]="stickyActive()"
|
|
8387
|
+
[style.left.px]="utilLeft('detail')"
|
|
8388
|
+
>
|
|
8089
8389
|
<button
|
|
8090
8390
|
type="button"
|
|
8091
8391
|
class="strct-dg__detailbtn"
|
|
@@ -8099,7 +8399,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8099
8399
|
</td>
|
|
8100
8400
|
}
|
|
8101
8401
|
@if (canExpand()) {
|
|
8102
|
-
<td
|
|
8402
|
+
<td
|
|
8403
|
+
class="strct-dg__expandcell"
|
|
8404
|
+
[class.strct-dg__cell--sticky]="stickyActive()"
|
|
8405
|
+
[style.left.px]="utilLeft('expand')"
|
|
8406
|
+
>
|
|
8103
8407
|
<button
|
|
8104
8408
|
type="button"
|
|
8105
8409
|
class="strct-dg__expandbtn"
|
|
@@ -8113,7 +8417,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8113
8417
|
</td>
|
|
8114
8418
|
}
|
|
8115
8419
|
@if (selectable()) {
|
|
8116
|
-
<td
|
|
8420
|
+
<td
|
|
8421
|
+
class="strct-dg__sel"
|
|
8422
|
+
[class.strct-dg__cell--sticky]="stickyActive()"
|
|
8423
|
+
[style.left.px]="utilLeft('sel')"
|
|
8424
|
+
>
|
|
8117
8425
|
<strct-checkbox
|
|
8118
8426
|
[ariaLabel]="L().selectRow"
|
|
8119
8427
|
[checked]="isSelected(row)"
|
|
@@ -8122,7 +8430,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8122
8430
|
</td>
|
|
8123
8431
|
}
|
|
8124
8432
|
@for (col of visibleColumns(); track col.key) {
|
|
8125
|
-
<td
|
|
8433
|
+
<td
|
|
8434
|
+
[style.text-align]="col.align ?? 'start'"
|
|
8435
|
+
[class.strct-dg__cell--sticky]="isSticky(col)"
|
|
8436
|
+
[class.strct-dg__cell--sticky-last]="col.key === lastStickyKey()"
|
|
8437
|
+
[style.left.px]="stickyLeft(col.key)"
|
|
8438
|
+
>
|
|
8126
8439
|
@if (cellTemplate(col.key); as tpl) {
|
|
8127
8440
|
<ng-container
|
|
8128
8441
|
[ngTemplateOutlet]="tpl"
|
|
@@ -8167,6 +8480,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8167
8480
|
<td class="strct-dg__empty" [attr.colspan]="colspan()">{{ emptyText() }}</td>
|
|
8168
8481
|
</tr>
|
|
8169
8482
|
}
|
|
8483
|
+
@if (virtual() && bottomPad() > 0) {
|
|
8484
|
+
<tr class="strct-dg__vspacer" aria-hidden="true">
|
|
8485
|
+
<td [attr.colspan]="colspan()" [style.height.px]="bottomPad()"></td>
|
|
8486
|
+
</tr>
|
|
8487
|
+
}
|
|
8170
8488
|
}
|
|
8171
8489
|
</tbody>
|
|
8172
8490
|
</table>
|
|
@@ -8195,7 +8513,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8195
8513
|
}
|
|
8196
8514
|
</div>
|
|
8197
8515
|
|
|
8198
|
-
@if (pageSize() > 0 && !loading()) {
|
|
8516
|
+
@if ((pageSize() > 0 || virtual()) && !loading()) {
|
|
8199
8517
|
<div class="strct-dg__foot">
|
|
8200
8518
|
<div class="strct-dg__foot-left">
|
|
8201
8519
|
@if (columnChooser() || sync()) {
|
|
@@ -8241,7 +8559,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8241
8559
|
</div>
|
|
8242
8560
|
}
|
|
8243
8561
|
<span class="strct-dg__count">
|
|
8244
|
-
{{
|
|
8562
|
+
{{ totalCount() }} {{ totalCount() === 1 ? L().row : L().rows }}
|
|
8245
8563
|
@if (selectedCount()) {
|
|
8246
8564
|
<span class="strct-dg__count-sep">|</span>
|
|
8247
8565
|
<span class="strct-dg__count-sel">{{ selectedCount() }} {{ L().selected }}</span>
|
|
@@ -8249,7 +8567,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8249
8567
|
</span>
|
|
8250
8568
|
</div>
|
|
8251
8569
|
<div class="strct-dg__foot-right">
|
|
8252
|
-
|
|
8570
|
+
@if (pageSize() > 0) {
|
|
8571
|
+
<strct-pagination [total]="totalCount()" [pageSize]="pageSize()" [(page)]="page" />
|
|
8572
|
+
}
|
|
8253
8573
|
</div>
|
|
8254
8574
|
</div>
|
|
8255
8575
|
}
|
|
@@ -8257,8 +8577,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8257
8577
|
class: 'strct-dg-host',
|
|
8258
8578
|
'[class.strct-dg-host--compact]': 'compact()',
|
|
8259
8579
|
'[class.strct-dg-host--singleline]': 'singleLine()',
|
|
8260
|
-
|
|
8261
|
-
|
|
8580
|
+
'[class.strct-dg-host--virtual]': 'virtual()',
|
|
8581
|
+
'[class.strct-dg-host--sticky]': 'stickyActive()',
|
|
8582
|
+
}, styles: [".strct-dg-host{display:block;border:1px solid var(--b2);border-radius:10px;background:var(--bg-2);box-shadow:var(--shadow-rest)}.strct-dg__scroll{flex:1 1 auto;min-width:0;overflow-x:auto;-webkit-overflow-scrolling:touch}.strct-dg-host--virtual .strct-dg__scroll{overflow-y:auto}.strct-dg-host--virtual .strct-dg thead th{position:sticky;top:0;z-index:5}.strct-dg__vspacer td{padding:0;border:0;background:transparent}.strct-dg-host--sticky .strct-dg,.strct-dg-host--virtual .strct-dg{border-collapse:separate;border-spacing:0;overflow:visible;border-radius:0}.strct-dg-host--sticky .strct-dg{width:max-content;min-width:100%}.strct-dg .strct-dg__cell--sticky{position:sticky;z-index:3}.strct-dg thead th.strct-dg__cell--sticky{z-index:6}.strct-dg .strct-dg__cell--sticky-last:after{content:\"\";position:absolute;top:0;bottom:0;right:-1px;width:7px;pointer-events:none;background:linear-gradient(90deg,rgba(0,0,0,.14),transparent)}.strct-dg-host--sticky .strct-dg__expandcol,.strct-dg-host--sticky .strct-dg__expandcell{width:36px;min-width:36px;max-width:36px;box-sizing:border-box}.strct-dg-host--sticky .strct-dg__sel{width:40px;min-width:40px;max-width:40px;box-sizing:border-box}.strct-dg-host--sticky tbody .strct-dg__cell--sticky{background:var(--bg-1)}[data-theme=dark] .strct-dg-host--sticky tbody .strct-dg__cell--sticky{background:var(--bg-3)}.strct-dg-host--sticky tbody tr:hover .strct-dg__cell--sticky{background:linear-gradient(var(--acc-s),var(--acc-s)) var(--bg-1)}[data-theme=dark] .strct-dg-host--sticky tbody tr:hover .strct-dg__cell--sticky{background:linear-gradient(var(--acc-s),var(--acc-s)) var(--bg-3)}.strct-dg-host--sticky tbody .strct-dg__row--selected .strct-dg__cell--sticky{background:linear-gradient(var(--acc-m),var(--acc-m)) var(--bg-1)}[data-theme=dark] .strct-dg-host--sticky tbody .strct-dg__row--selected .strct-dg__cell--sticky{background:linear-gradient(var(--acc-m),var(--acc-m)) var(--bg-3)}.strct-dg{width:100%;border-collapse:collapse;font-size:13px;overflow:hidden;background:var(--bg-2)}.strct-dg-host:not(:has(.strct-dg__toolbar)) .strct-dg{border-start-start-radius:9px;border-start-end-radius:9px}.strct-dg-host:not(:has(.strct-dg__foot)) .strct-dg{border-end-start-radius:9px;border-end-end-radius:9px}.strct-dg th,.strct-dg td{padding:9px 13px;text-align:start;border-bottom:1px solid var(--b1)}.strct-dg tbody td{background:var(--bg-1)}[data-theme=dark] .strct-dg tbody td{background:var(--bg-3)}.strct-dg-host--compact .strct-dg th,.strct-dg-host--compact .strct-dg td{padding:5px 11px}.strct-dg-host--singleline .strct-dg tbody tr:not(.strct-dg__detailrow)>td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:360px}.strct-dg th{position:relative;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:var(--t2);background:var(--bg-2);white-space:nowrap;-webkit-user-select:none;user-select:none}.strct-dg__th--sortable{cursor:pointer}.strct-dg__th--sortable:hover{color:var(--t1)}.strct-dg__th--sortable:focus-visible{outline:2px solid var(--acc50);outline-offset:-2px}.strct-dg__hd{display:inline-flex;align-items:center;gap:5px}.strct-dg__sorticon{color:var(--t3)}.strct-dg__th--sortable:hover .strct-dg__sorticon{color:var(--acc)}.strct-dg__resize{position:absolute;inset-inline-end:0;top:0;bottom:0;width:4px;cursor:col-resize;background:transparent;z-index:2}.strct-dg__resize:hover{background:var(--acc)}.strct-dg td{color:var(--t1)}.strct-dg tbody tr:last-child td{border-bottom:0}.strct-dg tbody tr:not(.strct-dg__detailrow):hover td{background:var(--acc-s)}.strct-dg__row--selected td{background:var(--acc-m)}.strct-dg__sel{width:1%;white-space:nowrap}.strct-dg__sel input{accent-color:var(--acc);width:15px;height:15px;cursor:pointer}.strct-dg__expandcol,.strct-dg__expandcell{width:1%;white-space:nowrap}.strct-dg__actioncol,.strct-dg__actioncell{width:1%;white-space:nowrap;text-align:end}.strct-dg__kebab{display:inline-flex;padding:4px;border:0;border-radius:5px;background:transparent;color:var(--t3);cursor:pointer;transition:color .14s ease,background .14s ease}.strct-dg__kebab:hover{color:var(--t1);background:var(--bg-3)}.strct-dg__expandbtn{display:inline-flex;padding:3px;border:0;border-radius:4px;background:transparent;color:var(--t3);cursor:pointer;transition:transform .15s ease,color .15s ease}.strct-dg__expandbtn:hover{color:var(--t1);background:var(--bg-3)}.strct-dg__expandbtn--open{transform:rotate(90deg);color:var(--acc)}.strct-dg__detailbtn{display:inline-flex;padding:3px;border:0;border-radius:4px;background:transparent;color:var(--t3);cursor:pointer;transition:color .14s ease,background .14s ease}.strct-dg__detailbtn:hover{color:var(--acc);background:var(--bg-3)}.strct-dg__detailbtn--active{color:var(--acc);background:var(--acc-m)}.strct-dg__detailrow td{background:var(--bg-2);padding:0}.strct-dg__detail{padding:14px 16px;font-size:13px;color:var(--t2)}.strct-dg__layout{display:flex;align-items:flex-start;min-width:0}.strct-dg__layout--paned{gap:0}.strct-dg__layout--paned .strct-dg__scroll{flex:0 0 auto;width:260px;min-width:260px;max-width:260px}.strct-dg__layout--paned .strct-dg{width:260px;min-width:260px;max-width:260px;flex-shrink:0;border-top-right-radius:0;border-bottom-right-radius:0}.strct-dg__row--clickable{cursor:pointer}.strct-dg__row--active td{background:var(--acc-m)}.strct-dg__layout--paned .strct-dg__row--active td:last-child{position:relative;padding-inline-end:26px}.strct-dg__layout--paned .strct-dg__row--active td:last-child:after{content:\"\";position:absolute;right:11px;top:50%;width:6px;height:6px;border-top:1.6px solid var(--acc);border-inline-end:1.6px solid var(--acc);transform:translateY(-50%) rotate(45deg)}.strct-dg__pane{flex:1;min-width:0;align-self:stretch;background:var(--bg-1);border:1px solid var(--b2);border-inline-start:2px solid var(--acc);border-radius:0 8px 8px 0;overflow:hidden;animation:strct-dg-pane-in .14s ease}.strct-dg__pane-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 14px;border-bottom:1px solid var(--b1);font-size:13px;font-weight:600;color:var(--t1)}.strct-dg__pane-close{display:inline-flex;padding:3px;border:0;border-radius:4px;background:transparent;color:var(--t3);cursor:pointer}.strct-dg__pane-close:hover{color:var(--t1);background:var(--bg-3)}.strct-dg__pane-body{padding:14px 16px;font-size:13px;color:var(--t2)}@keyframes strct-dg-pane-in{0%{opacity:0;transform:translate(8px)}}@keyframes strct-skeleton-pulse{0%,to{opacity:.4}50%{opacity:.7}}.strct-dg__skeleton-block{height:12px;background:var(--bg-3);border-radius:var(--radius-sm);animation:strct-skeleton-pulse 1.4s ease infinite}.strct-dg__skeleton-row td{border-bottom:1px solid var(--b1)}.strct-dg__empty{text-align:center;color:var(--t3);padding:22px}.strct-dg__toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px 14px;border-bottom:1px solid var(--b2)}.strct-dg__foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 14px;border-top:1px solid var(--b2);flex-wrap:wrap}.strct-dg__foot-left,.strct-dg__foot-right{display:flex;align-items:center;gap:12px}.strct-dg__actions{position:relative}.strct-dg__chooser-menu{position:absolute;bottom:calc(100% + 6px);left:0;z-index:10;min-width:180px;background:var(--bg-1);border:1px solid var(--b2);border-radius:8px;box-shadow:var(--shadow-pop);padding:6px;display:flex;flex-direction:column;gap:2px}.strct-dg__chooser-menu--right{inset-inline-start:auto;inset-inline-end:0}.strct-dg__chooser-item{display:flex;align-items:center;gap:8px;padding:5px 8px;border-radius:6px;cursor:pointer;font-size:12px;color:var(--t1);transition:background .1s ease;-webkit-user-select:none;user-select:none}.strct-dg__chooser-item:hover{background:var(--bg-3)}.strct-dg__count{font-size:12px;color:var(--t2)}.strct-dg__count-sep{margin:0 8px;color:var(--b2)}.strct-dg__count-sel{color:var(--acc)}\n"] }]
|
|
8583
|
+
}], ctorParameters: () => [], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: true }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], expandable: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandable", required: false }] }], detailPane: [{ type: i0.Input, args: [{ isSignal: true, alias: "detailPane", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], singleLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "singleLine", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], columnChooser: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnChooser", required: false }] }], sync: [{ type: i0.Input, args: [{ isSignal: true, alias: "sync", required: false }] }], footerActionsDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerActionsDisabled", required: false }] }], rowId: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowId", required: false }] }], rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], initialSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialSelection", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], virtual: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtual", required: false }] }], viewportHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewportHeight", required: false }] }], rowHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowHeight", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], stateKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "stateKey", required: false }] }], columnState: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnState", required: false }] }, { type: i0.Output, args: ["columnStateChange"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], syncChange: [{ type: i0.Output, args: ["syncChange"] }], rowAction: [{ type: i0.Output, args: ["rowAction"] }], lazyLoad: [{ type: i0.Output, args: ["lazyLoad"] }], detailDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrctRowDetailDef), { isSignal: true }] }], actionBarDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrctDatagridActionBar), { isSignal: true }] }], cellDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrctCellDef), { isSignal: true }] }] } });
|
|
8262
8584
|
|
|
8263
8585
|
/** Vertical timeline container. Wraps `<strct-timeline-item>` children. */
|
|
8264
8586
|
class StrctTimeline {
|