@ngx-smz/ui-kit 21.9.0-next.9 → 21.10.0-next.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/ngx-smz-ui-kit.mjs +490 -191
- package/fesm2022/ngx-smz-ui-kit.mjs.map +1 -1
- package/package.json +1 -1
- package/tailwind.preset.js +91 -85
- package/types/ngx-smz-ui-kit.d.ts +59 -8
|
@@ -173,17 +173,26 @@ const SINGLE_GROUPS = [
|
|
|
173
173
|
function tokensOf(value) {
|
|
174
174
|
return (value ?? '').split(/\s+/).filter(Boolean);
|
|
175
175
|
}
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
/**
|
|
177
|
+
* Utilitario de padding de verdade (`p-4`, `px-[3px]`, `pl-px`, `px-input-x`), e nao uma classe qualquer que
|
|
178
|
+
* so comeca com "p-" (`p-col-12`, `p-column-filter`, ...), que nao pode remover o padding base do componente.
|
|
179
|
+
*/
|
|
180
|
+
const PADDING_UTILITY = /^p([xytblrse]?)-(?:\d|\[|px$|auto$|input-|control-)/;
|
|
181
|
+
function isPadding(token, sides) {
|
|
182
|
+
const match = PADDING_UTILITY.exec(token);
|
|
183
|
+
return match !== null && sides.includes(`p${match[1]}`);
|
|
184
|
+
}
|
|
185
|
+
function hasPadding(tokens, sides) {
|
|
186
|
+
return tokens.some((token) => isPadding(token, sides));
|
|
178
187
|
}
|
|
179
188
|
/** Resolve o padding de um eixo (x ou y) quando o consumidor sobrescreve so um lado. */
|
|
180
189
|
function resolveAxis(token, axis, extra) {
|
|
181
|
-
const all =
|
|
182
|
-
const both =
|
|
183
|
-
const sides = axis === 'x' ? ['pl
|
|
184
|
-
const otherSides = axis === 'x' ? ['pr
|
|
185
|
-
const first =
|
|
186
|
-
const second =
|
|
190
|
+
const all = hasPadding(extra, ['p']);
|
|
191
|
+
const both = hasPadding(extra, [`p${axis}`]);
|
|
192
|
+
const sides = axis === 'x' ? ['pl', 'ps'] : ['pt'];
|
|
193
|
+
const otherSides = axis === 'x' ? ['pr', 'pe'] : ['pb'];
|
|
194
|
+
const first = hasPadding(extra, sides);
|
|
195
|
+
const second = hasPadding(extra, otherSides);
|
|
187
196
|
const value = token.slice(3);
|
|
188
197
|
if (all || both || (first && second))
|
|
189
198
|
return null;
|
|
@@ -1707,6 +1716,44 @@ class SmzDialogRef {
|
|
|
1707
1716
|
}
|
|
1708
1717
|
}
|
|
1709
1718
|
|
|
1719
|
+
const KEYS = {
|
|
1720
|
+
width: 'width',
|
|
1721
|
+
height: 'height',
|
|
1722
|
+
minWidth: 'minWidth',
|
|
1723
|
+
'min-width': 'minWidth',
|
|
1724
|
+
maxWidth: 'maxWidth',
|
|
1725
|
+
'max-width': 'maxWidth',
|
|
1726
|
+
minHeight: 'minHeight',
|
|
1727
|
+
'min-height': 'minHeight',
|
|
1728
|
+
maxHeight: 'maxHeight',
|
|
1729
|
+
'max-height': 'maxHeight',
|
|
1730
|
+
};
|
|
1731
|
+
/**
|
|
1732
|
+
* Separa os estilos de tamanho (`width`, `height`, `min-*`, `max-*`) do resto do `style`.
|
|
1733
|
+
*
|
|
1734
|
+
* Porcentagens so significam "porcentagem da tela" quando aplicadas ao painel do overlay (cujo pai ocupa a viewport);
|
|
1735
|
+
* dentro do frame elas seriam relativas ao painel, que tem largura "shrink-to-fit" (ex.: 60% de 531px).
|
|
1736
|
+
* O painel recebe o tamanho; o frame passa a ocupar 100% dele.
|
|
1737
|
+
*/
|
|
1738
|
+
function smzSplitDialogSize(style, extra) {
|
|
1739
|
+
const pane = { ...(extra ?? {}) };
|
|
1740
|
+
const rest = {};
|
|
1741
|
+
for (const [key, value] of Object.entries(style ?? {})) {
|
|
1742
|
+
if (value === null || value === undefined || value === '')
|
|
1743
|
+
continue;
|
|
1744
|
+
const target = KEYS[key];
|
|
1745
|
+
if (target)
|
|
1746
|
+
pane[target] = String(value);
|
|
1747
|
+
else
|
|
1748
|
+
rest[key] = value;
|
|
1749
|
+
}
|
|
1750
|
+
for (const key of Object.keys(pane)) {
|
|
1751
|
+
if (!pane[key])
|
|
1752
|
+
delete pane[key];
|
|
1753
|
+
}
|
|
1754
|
+
return { pane, rest };
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1710
1757
|
/* eslint-disable max-len -- classes Tailwind nos templates */
|
|
1711
1758
|
/** Componente que sera criado dentro do dialog. */
|
|
1712
1759
|
const SMZ_DIALOG_CONTENT = new InjectionToken('SMZ_DIALOG_CONTENT');
|
|
@@ -1714,6 +1761,8 @@ const SMZ_DIALOG_CONTENT = new InjectionToken('SMZ_DIALOG_CONTENT');
|
|
|
1714
1761
|
class SmzDialogFrameComponent {
|
|
1715
1762
|
config = inject(SmzDialogConfig);
|
|
1716
1763
|
ref = inject(SmzDialogRef);
|
|
1764
|
+
/** Tamanho vai para o painel do overlay (ver `smzSplitDialogSize`); o frame ocupa 100% dele. */
|
|
1765
|
+
size = smzSplitDialogSize(this.config.style, { width: this.config.width, height: this.config.height });
|
|
1717
1766
|
injector = inject(Injector);
|
|
1718
1767
|
contentType = inject(SMZ_DIALOG_CONTENT);
|
|
1719
1768
|
host = viewChild.required('content', { read: ViewContainerRef });
|
|
@@ -1723,16 +1772,16 @@ class SmzDialogFrameComponent {
|
|
|
1723
1772
|
});
|
|
1724
1773
|
}
|
|
1725
1774
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzDialogFrameComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1726
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzDialogFrameComponent, isStandalone: true, selector: "ui-dialog-frame", host: { classAttribute: "pointer-events-auto block" }, viewQueries: [{ propertyName: "host", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: `
|
|
1775
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzDialogFrameComponent, isStandalone: true, selector: "ui-dialog-frame", host: { properties: { "class.w-full": "!!size.pane.width", "class.h-full": "!!size.pane.height" }, classAttribute: "pointer-events-auto block" }, viewQueries: [{ propertyName: "host", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: `
|
|
1727
1776
|
<div
|
|
1728
1777
|
role="dialog"
|
|
1729
1778
|
aria-modal="true"
|
|
1730
1779
|
[attr.aria-label]="config.header || null"
|
|
1731
1780
|
class="flex max-h-[90vh] max-w-[95vw] flex-col rounded-overlay border border-ui-line bg-ui-surface-2 font-ui text-ui-fg shadow-overlay"
|
|
1732
1781
|
[class]="config.styleClass ?? ''"
|
|
1733
|
-
[style.width]="
|
|
1734
|
-
[style.height]="
|
|
1735
|
-
[ngStyle]="
|
|
1782
|
+
[style.width]="size.pane.width ? '100%' : null"
|
|
1783
|
+
[style.height]="size.pane.height ? '100%' : null"
|
|
1784
|
+
[ngStyle]="size.rest"
|
|
1736
1785
|
>
|
|
1737
1786
|
@if (config.showHeader !== false) {
|
|
1738
1787
|
<div class="flex items-center justify-between gap-4 border-b border-ui-line px-4 py-3">
|
|
@@ -1763,7 +1812,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1763
1812
|
selector: 'ui-dialog-frame',
|
|
1764
1813
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1765
1814
|
imports: [NgStyle],
|
|
1766
|
-
|
|
1815
|
+
// O painel do CDK e `display:flex`: o host e item flex e so ocupa o painel dimensionado se tiver largura/altura 100%.
|
|
1816
|
+
host: { class: 'pointer-events-auto block', '[class.w-full]': '!!size.pane.width', '[class.h-full]': '!!size.pane.height' },
|
|
1767
1817
|
template: `
|
|
1768
1818
|
<div
|
|
1769
1819
|
role="dialog"
|
|
@@ -1771,9 +1821,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1771
1821
|
[attr.aria-label]="config.header || null"
|
|
1772
1822
|
class="flex max-h-[90vh] max-w-[95vw] flex-col rounded-overlay border border-ui-line bg-ui-surface-2 font-ui text-ui-fg shadow-overlay"
|
|
1773
1823
|
[class]="config.styleClass ?? ''"
|
|
1774
|
-
[style.width]="
|
|
1775
|
-
[style.height]="
|
|
1776
|
-
[ngStyle]="
|
|
1824
|
+
[style.width]="size.pane.width ? '100%' : null"
|
|
1825
|
+
[style.height]="size.pane.height ? '100%' : null"
|
|
1826
|
+
[ngStyle]="size.rest"
|
|
1777
1827
|
>
|
|
1778
1828
|
@if (config.showHeader !== false) {
|
|
1779
1829
|
<div class="flex items-center justify-between gap-4 border-b border-ui-line px-4 py-3">
|
|
@@ -1814,10 +1864,14 @@ class SmzDialogService {
|
|
|
1814
1864
|
const resolved = Object.assign(new SmzDialogConfig(), config);
|
|
1815
1865
|
const ref = new SmzDialogRef();
|
|
1816
1866
|
const modal = resolved.modal !== false;
|
|
1867
|
+
// Porcentagens (ex.: `width: '60%'`) sao relativas a viewport quando aplicadas ao painel do overlay.
|
|
1868
|
+
const pane = smzSplitDialogSize(resolved.style, { width: resolved.width, height: resolved.height }).pane;
|
|
1817
1869
|
const overlayRef = this.overlay.create({
|
|
1818
1870
|
hasBackdrop: modal,
|
|
1819
1871
|
positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically(),
|
|
1820
1872
|
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
1873
|
+
...pane,
|
|
1874
|
+
maxWidth: pane.maxWidth ?? '95vw',
|
|
1821
1875
|
});
|
|
1822
1876
|
if (resolved.baseZIndex != null) {
|
|
1823
1877
|
overlayRef.hostElement.style.zIndex = String(resolved.baseZIndex + 1);
|
|
@@ -1896,6 +1950,8 @@ class SmzDialogComponent {
|
|
|
1896
1950
|
viewContainer = inject(ViewContainerRef);
|
|
1897
1951
|
host = inject(ElementRef);
|
|
1898
1952
|
overlayRef;
|
|
1953
|
+
/** `width`/`height`/`min-*`/`max-*` de `style` vao para o painel do overlay (relativos a viewport); o frame ocupa 100% dele. */
|
|
1954
|
+
sizing = computed(() => smzSplitDialogSize(this.style()), ...(ngDevMode ? [{ debugName: "sizing" }] : []));
|
|
1899
1955
|
dx = signal(0, ...(ngDevMode ? [{ debugName: "dx" }] : []));
|
|
1900
1956
|
dy = signal(0, ...(ngDevMode ? [{ debugName: "dy" }] : []));
|
|
1901
1957
|
constructor() {
|
|
@@ -1905,6 +1961,17 @@ class SmzDialogComponent {
|
|
|
1905
1961
|
else
|
|
1906
1962
|
this.dispose();
|
|
1907
1963
|
});
|
|
1964
|
+
effect(() => {
|
|
1965
|
+
const maximized = this.maximized();
|
|
1966
|
+
const pane = this.sizing().pane;
|
|
1967
|
+
// `updateSize` do CDK so MESCLA as chaves recebidas: ao restaurar, height/max-height/min-* do maximizado
|
|
1968
|
+
// (100vh, 0) sobrevivem se nao forem repostos explicitamente (vazio = remove o estilo inline).
|
|
1969
|
+
this.overlayRef?.updateSize(maximized
|
|
1970
|
+
? { width: '100vw', height: '100vh', maxWidth: '100vw', maxHeight: '100vh', minWidth: '0', minHeight: '0' }
|
|
1971
|
+
: { width: pane.width ?? '', height: pane.height ?? '', minWidth: pane.minWidth ?? '', minHeight: pane.minHeight ?? '', maxWidth: pane.maxWidth ?? '95vw', maxHeight: pane.maxHeight ?? '' });
|
|
1972
|
+
// A estrategia global alinha por tamanho (flush a 100vh/100vw); reaplica para voltar ao alinhamento do `position`.
|
|
1973
|
+
this.overlayRef?.updatePosition();
|
|
1974
|
+
});
|
|
1908
1975
|
effect(() => {
|
|
1909
1976
|
const position = this.position();
|
|
1910
1977
|
this.overlayRef?.updatePositionStrategy(this.strategyFor(position));
|
|
@@ -1965,6 +2032,7 @@ class SmzDialogComponent {
|
|
|
1965
2032
|
hasBackdrop: modal,
|
|
1966
2033
|
positionStrategy: this.strategyFor(this.position()),
|
|
1967
2034
|
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
2035
|
+
...(this.maximized() ? { width: '100vw', height: '100vh', maxWidth: '100vw', maxHeight: '100vh' } : { ...this.sizing().pane, maxWidth: this.sizing().pane.maxWidth ?? '95vw' }),
|
|
1968
2036
|
});
|
|
1969
2037
|
SmzZIndex.set('modal', this.overlayRef.hostElement, 1100 + this.baseZIndex());
|
|
1970
2038
|
if (this.overlayRef.backdropElement) {
|
|
@@ -1995,56 +2063,58 @@ class SmzDialogComponent {
|
|
|
1995
2063
|
this.overlayRef?.overlayElement.querySelector('[role="dialog"]')?.setAttribute('data-testid', testId);
|
|
1996
2064
|
}
|
|
1997
2065
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1998
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzDialogComponent, isStandalone: true, selector: "ui-dialog", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, dismissableMask: { classPropertyName: "dismissableMask", publicName: "dismissableMask", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: true, isRequired: false, transformFunction: null }, draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, maximizable: { classPropertyName: "maximizable", publicName: "maximizable", isSignal: true, isRequired: false, transformFunction: null }, maximized: { classPropertyName: "maximized", publicName: "maximized", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", maximized: "maximizedChange", shown: "shown", hidden: "hidden" }, queries: [{ propertyName: "templates", predicate: SmzTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1999
|
-
<ng-template #panel>
|
|
2000
|
-
<div
|
|
2001
|
-
role="dialog"
|
|
2002
|
-
aria-modal="true"
|
|
2003
|
-
[attr.aria-label]="header() || null"
|
|
2004
|
-
class="pointer-events-auto flex flex-col border border-ui-line bg-ui-surface-2 font-ui text-ui-fg shadow-overlay"
|
|
2005
|
-
[class]="(maximized() ? 'h-screen w-screen max-h-none max-w-none rounded-none ' : 'max-h-[90vh] max-w-[95vw] rounded-overlay ') + (resizable() && !maximized() ? 'resize overflow-auto ' : '') + (styleClass() ?? '')"
|
|
2006
|
-
[ngStyle]="maximized() ? null :
|
|
2007
|
-
[style.
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2066
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzDialogComponent, isStandalone: true, selector: "ui-dialog", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, dismissableMask: { classPropertyName: "dismissableMask", publicName: "dismissableMask", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: true, isRequired: false, transformFunction: null }, draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, maximizable: { classPropertyName: "maximizable", publicName: "maximizable", isSignal: true, isRequired: false, transformFunction: null }, maximized: { classPropertyName: "maximized", publicName: "maximized", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", maximized: "maximizedChange", shown: "shown", hidden: "hidden" }, queries: [{ propertyName: "templates", predicate: SmzTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2067
|
+
<ng-template #panel>
|
|
2068
|
+
<div
|
|
2069
|
+
role="dialog"
|
|
2070
|
+
aria-modal="true"
|
|
2071
|
+
[attr.aria-label]="header() || null"
|
|
2072
|
+
class="pointer-events-auto flex flex-col border border-ui-line bg-ui-surface-2 font-ui text-ui-fg shadow-overlay"
|
|
2073
|
+
[class]="(maximized() ? 'h-screen w-screen max-h-none max-w-none rounded-none ' : 'max-h-[90vh] max-w-[95vw] rounded-overlay ') + (resizable() && !maximized() ? 'resize overflow-auto ' : '') + (styleClass() ?? '')"
|
|
2074
|
+
[ngStyle]="maximized() ? null : sizing().rest"
|
|
2075
|
+
[style.width]="!maximized() && sizing().pane.width ? '100%' : null"
|
|
2076
|
+
[style.height]="!maximized() && sizing().pane.height ? '100%' : null"
|
|
2077
|
+
[style.transform]="maximized() || (dx() === 0 && dy() === 0) ? null : 'translate(' + dx() + 'px, ' + dy() + 'px)'"
|
|
2078
|
+
>
|
|
2079
|
+
@if (headerTemplate(); as headerTpl) {
|
|
2080
|
+
<div class="border-b border-ui-line px-4 py-3" [class.cursor-move]="draggable() && !maximized()" (pointerdown)="startDrag($event)">
|
|
2081
|
+
<ng-container [ngTemplateOutlet]="headerTpl" />
|
|
2082
|
+
</div>
|
|
2083
|
+
}
|
|
2084
|
+
@else if (header() || closable()) {
|
|
2085
|
+
<div class="flex items-center justify-between gap-4 border-b border-ui-line px-4 py-3" [class.cursor-move]="draggable() && !maximized()" (pointerdown)="startDrag($event)">
|
|
2086
|
+
<span class="text-ui-lg font-medium">{{ header() }}</span>
|
|
2087
|
+
<div class="flex items-center gap-1">
|
|
2088
|
+
@if (maximizable()) {
|
|
2089
|
+
<button type="button" class="inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full text-ui-fg-muted transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus" [attr.aria-label]="maximized() ? 'Restaurar' : 'Maximizar'" (click)="maximize()">
|
|
2090
|
+
<svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true">
|
|
2091
|
+
@if (maximized()) { <path d="M5 3h8v8M3 5h8v8H3z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" /> } @else { <rect x="3" y="3" width="10" height="10" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" /> }
|
|
2092
|
+
</svg>
|
|
2093
|
+
</button>
|
|
2094
|
+
}
|
|
2095
|
+
@if (closable()) {
|
|
2096
|
+
<button
|
|
2097
|
+
type="button"
|
|
2098
|
+
class="inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full text-ui-fg-muted transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus"
|
|
2099
|
+
aria-label="Fechar"
|
|
2100
|
+
(click)="close()"
|
|
2101
|
+
>
|
|
2102
|
+
<svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true">
|
|
2103
|
+
<path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" />
|
|
2104
|
+
</svg>
|
|
2105
|
+
</button>
|
|
2106
|
+
}
|
|
2107
|
+
</div>
|
|
2108
|
+
</div>
|
|
2109
|
+
}
|
|
2110
|
+
<div class="min-h-0 flex-1 overflow-auto p-4"><ng-content /></div>
|
|
2111
|
+
@if (footerTemplate(); as footerTpl) {
|
|
2112
|
+
<div class="flex justify-end gap-2 border-t border-ui-line px-4 py-3">
|
|
2113
|
+
<ng-container [ngTemplateOutlet]="footerTpl" />
|
|
2114
|
+
</div>
|
|
2115
|
+
}
|
|
2116
|
+
</div>
|
|
2117
|
+
</ng-template>
|
|
2048
2118
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2049
2119
|
}
|
|
2050
2120
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzDialogComponent, decorators: [{
|
|
@@ -2053,56 +2123,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2053
2123
|
selector: 'ui-dialog',
|
|
2054
2124
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2055
2125
|
imports: [NgStyle, NgTemplateOutlet],
|
|
2056
|
-
template: `
|
|
2057
|
-
<ng-template #panel>
|
|
2058
|
-
<div
|
|
2059
|
-
role="dialog"
|
|
2060
|
-
aria-modal="true"
|
|
2061
|
-
[attr.aria-label]="header() || null"
|
|
2062
|
-
class="pointer-events-auto flex flex-col border border-ui-line bg-ui-surface-2 font-ui text-ui-fg shadow-overlay"
|
|
2063
|
-
[class]="(maximized() ? 'h-screen w-screen max-h-none max-w-none rounded-none ' : 'max-h-[90vh] max-w-[95vw] rounded-overlay ') + (resizable() && !maximized() ? 'resize overflow-auto ' : '') + (styleClass() ?? '')"
|
|
2064
|
-
[ngStyle]="maximized() ? null :
|
|
2065
|
-
[style.
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2126
|
+
template: `
|
|
2127
|
+
<ng-template #panel>
|
|
2128
|
+
<div
|
|
2129
|
+
role="dialog"
|
|
2130
|
+
aria-modal="true"
|
|
2131
|
+
[attr.aria-label]="header() || null"
|
|
2132
|
+
class="pointer-events-auto flex flex-col border border-ui-line bg-ui-surface-2 font-ui text-ui-fg shadow-overlay"
|
|
2133
|
+
[class]="(maximized() ? 'h-screen w-screen max-h-none max-w-none rounded-none ' : 'max-h-[90vh] max-w-[95vw] rounded-overlay ') + (resizable() && !maximized() ? 'resize overflow-auto ' : '') + (styleClass() ?? '')"
|
|
2134
|
+
[ngStyle]="maximized() ? null : sizing().rest"
|
|
2135
|
+
[style.width]="!maximized() && sizing().pane.width ? '100%' : null"
|
|
2136
|
+
[style.height]="!maximized() && sizing().pane.height ? '100%' : null"
|
|
2137
|
+
[style.transform]="maximized() || (dx() === 0 && dy() === 0) ? null : 'translate(' + dx() + 'px, ' + dy() + 'px)'"
|
|
2138
|
+
>
|
|
2139
|
+
@if (headerTemplate(); as headerTpl) {
|
|
2140
|
+
<div class="border-b border-ui-line px-4 py-3" [class.cursor-move]="draggable() && !maximized()" (pointerdown)="startDrag($event)">
|
|
2141
|
+
<ng-container [ngTemplateOutlet]="headerTpl" />
|
|
2142
|
+
</div>
|
|
2143
|
+
}
|
|
2144
|
+
@else if (header() || closable()) {
|
|
2145
|
+
<div class="flex items-center justify-between gap-4 border-b border-ui-line px-4 py-3" [class.cursor-move]="draggable() && !maximized()" (pointerdown)="startDrag($event)">
|
|
2146
|
+
<span class="text-ui-lg font-medium">{{ header() }}</span>
|
|
2147
|
+
<div class="flex items-center gap-1">
|
|
2148
|
+
@if (maximizable()) {
|
|
2149
|
+
<button type="button" class="inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full text-ui-fg-muted transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus" [attr.aria-label]="maximized() ? 'Restaurar' : 'Maximizar'" (click)="maximize()">
|
|
2150
|
+
<svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true">
|
|
2151
|
+
@if (maximized()) { <path d="M5 3h8v8M3 5h8v8H3z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" /> } @else { <rect x="3" y="3" width="10" height="10" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" /> }
|
|
2152
|
+
</svg>
|
|
2153
|
+
</button>
|
|
2154
|
+
}
|
|
2155
|
+
@if (closable()) {
|
|
2156
|
+
<button
|
|
2157
|
+
type="button"
|
|
2158
|
+
class="inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full text-ui-fg-muted transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus"
|
|
2159
|
+
aria-label="Fechar"
|
|
2160
|
+
(click)="close()"
|
|
2161
|
+
>
|
|
2162
|
+
<svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true">
|
|
2163
|
+
<path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" />
|
|
2164
|
+
</svg>
|
|
2165
|
+
</button>
|
|
2166
|
+
}
|
|
2167
|
+
</div>
|
|
2168
|
+
</div>
|
|
2169
|
+
}
|
|
2170
|
+
<div class="min-h-0 flex-1 overflow-auto p-4"><ng-content /></div>
|
|
2171
|
+
@if (footerTemplate(); as footerTpl) {
|
|
2172
|
+
<div class="flex justify-end gap-2 border-t border-ui-line px-4 py-3">
|
|
2173
|
+
<ng-container [ngTemplateOutlet]="footerTpl" />
|
|
2174
|
+
</div>
|
|
2175
|
+
}
|
|
2176
|
+
</div>
|
|
2177
|
+
</ng-template>
|
|
2106
2178
|
`,
|
|
2107
2179
|
}]
|
|
2108
2180
|
}], ctorParameters: () => [], propDecorators: { visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], dismissableMask: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissableMask", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], baseZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseZIndex", required: false }] }], draggable: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggable", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], maximizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximizable", required: false }] }], maximized: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximized", required: false }] }, { type: i0.Output, args: ["maximizedChange"] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], shown: [{ type: i0.Output, args: ["shown"] }], hidden: [{ type: i0.Output, args: ["hidden"] }], panel: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SmzTemplateDirective), { isSignal: true }] }] } });
|
|
@@ -2471,11 +2543,28 @@ class SmzToastContainerComponent {
|
|
|
2471
2543
|
const key = this.key();
|
|
2472
2544
|
return this.service.messages().filter((message) => (key ? message.key === key : !message.key));
|
|
2473
2545
|
}, ...(ngDevMode ? [{ debugName: "visibleMessages" }] : []));
|
|
2546
|
+
layer = viewChild('layer', ...(ngDevMode ? [{ debugName: "layer" }] : []));
|
|
2474
2547
|
constructor() {
|
|
2475
2548
|
effect(() => {
|
|
2476
2549
|
for (const message of this.visibleMessages())
|
|
2477
2550
|
this.schedule(message);
|
|
2478
2551
|
});
|
|
2552
|
+
// Abre a camada quando ha mensagens (reabrindo a cada mudanca para ficar acima de overlays abertos depois) e fecha quando nao ha.
|
|
2553
|
+
effect(() => {
|
|
2554
|
+
const count = this.visibleMessages().length;
|
|
2555
|
+
const element = this.layer()?.nativeElement;
|
|
2556
|
+
if (!element || typeof element.showPopover !== 'function')
|
|
2557
|
+
return;
|
|
2558
|
+
try {
|
|
2559
|
+
if (element.matches(':popover-open'))
|
|
2560
|
+
element.hidePopover?.();
|
|
2561
|
+
if (count > 0)
|
|
2562
|
+
element.showPopover();
|
|
2563
|
+
}
|
|
2564
|
+
catch {
|
|
2565
|
+
/* sem suporte: segue com z-index */
|
|
2566
|
+
}
|
|
2567
|
+
});
|
|
2479
2568
|
inject(DestroyRef).onDestroy(() => this.timers.forEach((timer) => clearTimeout(timer.handle)));
|
|
2480
2569
|
}
|
|
2481
2570
|
toneClasses(message) {
|
|
@@ -2515,7 +2604,9 @@ class SmzToastContainerComponent {
|
|
|
2515
2604
|
this.timers.delete(message.id);
|
|
2516
2605
|
}
|
|
2517
2606
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzToastContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2518
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzToastContainerComponent, isStandalone: true, selector: "ui-toast", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, life: { classPropertyName: "life", publicName: "life", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
2607
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzToastContainerComponent, isStandalone: true, selector: "ui-toast", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, life: { classPropertyName: "life", publicName: "life", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "layer", first: true, predicate: ["layer"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2608
|
+
<!-- Camada na top layer (Popover API): overlays do CDK (drawer/dialog) ficam la e z-index nao os supera. -->
|
|
2609
|
+
<div #layer popover="manual" class="pointer-events-none fixed inset-0 m-0 h-full w-full overflow-visible border-0 bg-transparent p-0">
|
|
2519
2610
|
<div
|
|
2520
2611
|
class="pointer-events-none fixed z-[2000] flex w-80 max-w-[95vw] flex-col gap-2"
|
|
2521
2612
|
[class]="positionClasses()"
|
|
@@ -2558,6 +2649,7 @@ class SmzToastContainerComponent {
|
|
|
2558
2649
|
</div>
|
|
2559
2650
|
}
|
|
2560
2651
|
</div>
|
|
2652
|
+
</div>
|
|
2561
2653
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2562
2654
|
}
|
|
2563
2655
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzToastContainerComponent, decorators: [{
|
|
@@ -2567,6 +2659,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2567
2659
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2568
2660
|
imports: [NgClass, NgStyle],
|
|
2569
2661
|
template: `
|
|
2662
|
+
<!-- Camada na top layer (Popover API): overlays do CDK (drawer/dialog) ficam la e z-index nao os supera. -->
|
|
2663
|
+
<div #layer popover="manual" class="pointer-events-none fixed inset-0 m-0 h-full w-full overflow-visible border-0 bg-transparent p-0">
|
|
2570
2664
|
<div
|
|
2571
2665
|
class="pointer-events-none fixed z-[2000] flex w-80 max-w-[95vw] flex-col gap-2"
|
|
2572
2666
|
[class]="positionClasses()"
|
|
@@ -2609,9 +2703,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2609
2703
|
</div>
|
|
2610
2704
|
}
|
|
2611
2705
|
</div>
|
|
2706
|
+
</div>
|
|
2612
2707
|
`,
|
|
2613
2708
|
}]
|
|
2614
|
-
}], ctorParameters: () => [], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], life: [{ type: i0.Input, args: [{ isSignal: true, alias: "life", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }] } });
|
|
2709
|
+
}], ctorParameters: () => [], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], life: [{ type: i0.Input, args: [{ isSignal: true, alias: "life", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], layer: [{ type: i0.ViewChild, args: ['layer', { isSignal: true }] }] } });
|
|
2615
2710
|
|
|
2616
2711
|
/* eslint-disable max-len -- classes Tailwind nos templates */
|
|
2617
2712
|
const POSITIONS$1 = [
|
|
@@ -3176,6 +3271,10 @@ class SmzSelectComponent extends SmzValueAccessor {
|
|
|
3176
3271
|
dataKey: this.dataKey(),
|
|
3177
3272
|
}), ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
3178
3273
|
visibleOptions = computed(() => filterOptions(this.options() ?? [], this.filterText(), { ...this.config(), filterBy: this.filterBy(), mode: this.filterMatchMode() }), ...(ngDevMode ? [{ debugName: "visibleOptions" }] : []));
|
|
3274
|
+
/** Templates opcionais: `item` (linha da lista) e `selectedItem` (valor exibido no campo), como no `p-select`. */
|
|
3275
|
+
templates = contentChildren(SmzTemplateDirective, ...(ngDevMode ? [{ debugName: "templates" }] : []));
|
|
3276
|
+
itemTemplate = computed(() => smzFindTemplate(this.templates(), 'item'), ...(ngDevMode ? [{ debugName: "itemTemplate" }] : []));
|
|
3277
|
+
selectedItemTemplate = computed(() => smzFindTemplate(this.templates(), 'selectedItem'), ...(ngDevMode ? [{ debugName: "selectedItemTemplate" }] : []));
|
|
3179
3278
|
hasValue = computed(() => this.selectedOption() !== undefined, ...(ngDevMode ? [{ debugName: "hasValue" }] : []));
|
|
3180
3279
|
selectedOption = computed(() => {
|
|
3181
3280
|
const current = this.current();
|
|
@@ -3346,7 +3445,7 @@ class SmzSelectComponent extends SmzValueAccessor {
|
|
|
3346
3445
|
}
|
|
3347
3446
|
}
|
|
3348
3447
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3349
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzSelectComponent, isStandalone: true, selector: "ui-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, filterMatchMode: { classPropertyName: "filterMatchMode", publicName: "filterMatchMode", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed", showed: "showed", hidden: "hidden" }, host: { classAttribute: "block min-w-0" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzSelectComponent), multi: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
3448
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzSelectComponent, isStandalone: true, selector: "ui-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, filterMatchMode: { classPropertyName: "filterMatchMode", publicName: "filterMatchMode", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed", showed: "showed", hidden: "hidden" }, host: { classAttribute: "block min-w-0" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzSelectComponent), multi: true }], queries: [{ propertyName: "templates", predicate: SmzTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
3350
3449
|
<button
|
|
3351
3450
|
#trigger
|
|
3352
3451
|
type="button"
|
|
@@ -3364,7 +3463,13 @@ class SmzSelectComponent extends SmzValueAccessor {
|
|
|
3364
3463
|
(keydown)="onKeydown($event)"
|
|
3365
3464
|
(blur)="onBlur()"
|
|
3366
3465
|
>
|
|
3367
|
-
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="!hasValue()">
|
|
3466
|
+
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="!hasValue()">
|
|
3467
|
+
@if (hasValue() && selectedItemTemplate(); as tpl) {
|
|
3468
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: selectedOption() }" />
|
|
3469
|
+
} @else {
|
|
3470
|
+
{{ displayLabel() }}
|
|
3471
|
+
}
|
|
3472
|
+
</span>
|
|
3368
3473
|
@if (showClear() && hasValue() && !isDisabled()) {
|
|
3369
3474
|
<span
|
|
3370
3475
|
role="button"
|
|
@@ -3413,7 +3518,11 @@ class SmzSelectComponent extends SmzValueAccessor {
|
|
|
3413
3518
|
(mouseenter)="activeIndex.set(index)"
|
|
3414
3519
|
(click)="select(option, $event)"
|
|
3415
3520
|
>
|
|
3416
|
-
|
|
3521
|
+
@if (itemTemplate(); as tpl) {
|
|
3522
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: option, index: index }" />
|
|
3523
|
+
} @else {
|
|
3524
|
+
{{ labelOf(option) }}
|
|
3525
|
+
}
|
|
3417
3526
|
</li>
|
|
3418
3527
|
}
|
|
3419
3528
|
@empty {
|
|
@@ -3422,14 +3531,14 @@ class SmzSelectComponent extends SmzValueAccessor {
|
|
|
3422
3531
|
</ul>
|
|
3423
3532
|
</div>
|
|
3424
3533
|
</ng-template>
|
|
3425
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: SmzInputTextDirective, selector: "input[smzInputText]", inputs: ["size", "invalid"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3534
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SmzInputTextDirective, selector: "input[smzInputText]", inputs: ["size", "invalid"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3426
3535
|
}
|
|
3427
3536
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzSelectComponent, decorators: [{
|
|
3428
3537
|
type: Component,
|
|
3429
3538
|
args: [{
|
|
3430
3539
|
selector: 'ui-select',
|
|
3431
3540
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3432
|
-
imports: [NgClass, SmzInputTextDirective],
|
|
3541
|
+
imports: [NgClass, NgTemplateOutlet, SmzInputTextDirective],
|
|
3433
3542
|
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzSelectComponent), multi: true }],
|
|
3434
3543
|
host: { class: 'block min-w-0' },
|
|
3435
3544
|
template: `
|
|
@@ -3450,7 +3559,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3450
3559
|
(keydown)="onKeydown($event)"
|
|
3451
3560
|
(blur)="onBlur()"
|
|
3452
3561
|
>
|
|
3453
|
-
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="!hasValue()">
|
|
3562
|
+
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="!hasValue()">
|
|
3563
|
+
@if (hasValue() && selectedItemTemplate(); as tpl) {
|
|
3564
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: selectedOption() }" />
|
|
3565
|
+
} @else {
|
|
3566
|
+
{{ displayLabel() }}
|
|
3567
|
+
}
|
|
3568
|
+
</span>
|
|
3454
3569
|
@if (showClear() && hasValue() && !isDisabled()) {
|
|
3455
3570
|
<span
|
|
3456
3571
|
role="button"
|
|
@@ -3499,7 +3614,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3499
3614
|
(mouseenter)="activeIndex.set(index)"
|
|
3500
3615
|
(click)="select(option, $event)"
|
|
3501
3616
|
>
|
|
3502
|
-
|
|
3617
|
+
@if (itemTemplate(); as tpl) {
|
|
3618
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: option, index: index }" />
|
|
3619
|
+
} @else {
|
|
3620
|
+
{{ labelOf(option) }}
|
|
3621
|
+
}
|
|
3503
3622
|
</li>
|
|
3504
3623
|
}
|
|
3505
3624
|
@empty {
|
|
@@ -3510,7 +3629,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3510
3629
|
</ng-template>
|
|
3511
3630
|
`,
|
|
3512
3631
|
}]
|
|
3513
|
-
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], filterMatchMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMatchMode", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], emptyFilterMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterMessage", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }], showed: [{ type: i0.Output, args: ["showed"] }], hidden: [{ type: i0.Output, args: ["hidden"] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panel: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], filterInput: [{ type: i0.ViewChild, args: ['filterInput', { isSignal: true }] }] } });
|
|
3632
|
+
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], filterMatchMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMatchMode", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], emptyFilterMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterMessage", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }], showed: [{ type: i0.Output, args: ["showed"] }], hidden: [{ type: i0.Output, args: ["hidden"] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SmzTemplateDirective), { isSignal: true }] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panel: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], filterInput: [{ type: i0.ViewChild, args: ['filterInput', { isSignal: true }] }] } });
|
|
3514
3633
|
|
|
3515
3634
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-unsafe-return, max-len */
|
|
3516
3635
|
/* eslint-disable max-len -- classes Tailwind nos templates */
|
|
@@ -3559,6 +3678,10 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
|
|
|
3559
3678
|
dataKey: this.dataKey(),
|
|
3560
3679
|
}), ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
3561
3680
|
visibleOptions = computed(() => filterOptions(this.options() ?? [], this.filterText(), { ...this.config(), filterBy: this.filterBy(), mode: this.filterMatchMode() }), ...(ngDevMode ? [{ debugName: "visibleOptions" }] : []));
|
|
3681
|
+
/** Templates opcionais: `item` (linha da lista) e `selectedItems` (valor exibido no campo; `$implicit` = valores selecionados), como no `p-multiselect`. */
|
|
3682
|
+
templates = contentChildren(SmzTemplateDirective, ...(ngDevMode ? [{ debugName: "templates" }] : []));
|
|
3683
|
+
itemTemplate = computed(() => smzFindTemplate(this.templates(), 'item'), ...(ngDevMode ? [{ debugName: "itemTemplate" }] : []));
|
|
3684
|
+
selectedItemsTemplate = computed(() => smzFindTemplate(this.templates(), 'selectedItems'), ...(ngDevMode ? [{ debugName: "selectedItemsTemplate" }] : []));
|
|
3562
3685
|
selectedValues = computed(() => (Array.isArray(this.current()) ? this.current() : []), ...(ngDevMode ? [{ debugName: "selectedValues" }] : []));
|
|
3563
3686
|
selectedOptions = computed(() => (this.options() ?? []).filter((option) => this.selectedValues().some((value) => sameValue(optionValue(option, this.config()), value, this.dataKey()))), ...(ngDevMode ? [{ debugName: "selectedOptions" }] : []));
|
|
3564
3687
|
allSelected = computed(() => {
|
|
@@ -3701,7 +3824,7 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
|
|
|
3701
3824
|
this.touch();
|
|
3702
3825
|
}
|
|
3703
3826
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzMultiSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3704
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzMultiSelectComponent, isStandalone: true, selector: "ui-multi-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, filterMatchMode: { classPropertyName: "filterMatchMode", publicName: "filterMatchMode", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, showToggleAll: { classPropertyName: "showToggleAll", publicName: "showToggleAll", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedLabels: { classPropertyName: "maxSelectedLabels", publicName: "maxSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, selectedItemsLabel: { classPropertyName: "selectedItemsLabel", publicName: "selectedItemsLabel", isSignal: true, isRequired: false, transformFunction: null }, panelStyle: { classPropertyName: "panelStyle", publicName: "panelStyle", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, autofocusFilter: { classPropertyName: "autofocusFilter", publicName: "autofocusFilter", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed", panelHide: "panelHide", panelShow: "panelShow" }, host: { classAttribute: "block min-w-0" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzMultiSelectComponent), multi: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
3827
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzMultiSelectComponent, isStandalone: true, selector: "ui-multi-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, filterMatchMode: { classPropertyName: "filterMatchMode", publicName: "filterMatchMode", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, showToggleAll: { classPropertyName: "showToggleAll", publicName: "showToggleAll", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedLabels: { classPropertyName: "maxSelectedLabels", publicName: "maxSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, selectedItemsLabel: { classPropertyName: "selectedItemsLabel", publicName: "selectedItemsLabel", isSignal: true, isRequired: false, transformFunction: null }, panelStyle: { classPropertyName: "panelStyle", publicName: "panelStyle", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, autofocusFilter: { classPropertyName: "autofocusFilter", publicName: "autofocusFilter", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed", panelHide: "panelHide", panelShow: "panelShow" }, host: { classAttribute: "block min-w-0" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzMultiSelectComponent), multi: true }], queries: [{ propertyName: "templates", predicate: SmzTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
3705
3828
|
<button
|
|
3706
3829
|
#trigger
|
|
3707
3830
|
type="button"
|
|
@@ -3717,7 +3840,13 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
|
|
|
3717
3840
|
(keydown)="onKeydown($event)"
|
|
3718
3841
|
(blur)="onBlur()"
|
|
3719
3842
|
>
|
|
3720
|
-
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="selectedOptions().length === 0">
|
|
3843
|
+
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="selectedOptions().length === 0">
|
|
3844
|
+
@if (selectedOptions().length > 0 && selectedItemsTemplate(); as tpl) {
|
|
3845
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: selectedValues(), options: selectedOptions() }" />
|
|
3846
|
+
} @else {
|
|
3847
|
+
{{ displayLabel() }}
|
|
3848
|
+
}
|
|
3849
|
+
</span>
|
|
3721
3850
|
@if (showClear() && selectedOptions().length > 0 && !isDisabled()) {
|
|
3722
3851
|
<span
|
|
3723
3852
|
role="button"
|
|
@@ -3787,7 +3916,13 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
|
|
|
3787
3916
|
<path d="M3 8.5l3.2 3L13 4.5" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" />
|
|
3788
3917
|
</svg>
|
|
3789
3918
|
</span>
|
|
3790
|
-
<span class="min-w-0 flex-1 truncate">
|
|
3919
|
+
<span class="min-w-0 flex-1 truncate">
|
|
3920
|
+
@if (itemTemplate(); as tpl) {
|
|
3921
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: option, index: index }" />
|
|
3922
|
+
} @else {
|
|
3923
|
+
{{ labelOf(option) }}
|
|
3924
|
+
}
|
|
3925
|
+
</span>
|
|
3791
3926
|
</li>
|
|
3792
3927
|
}
|
|
3793
3928
|
@empty {
|
|
@@ -3796,14 +3931,14 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
|
|
|
3796
3931
|
</ul>
|
|
3797
3932
|
</div>
|
|
3798
3933
|
</ng-template>
|
|
3799
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: SmzInputTextDirective, selector: "input[smzInputText]", inputs: ["size", "invalid"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3934
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SmzInputTextDirective, selector: "input[smzInputText]", inputs: ["size", "invalid"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3800
3935
|
}
|
|
3801
3936
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzMultiSelectComponent, decorators: [{
|
|
3802
3937
|
type: Component,
|
|
3803
3938
|
args: [{
|
|
3804
3939
|
selector: 'ui-multi-select',
|
|
3805
3940
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3806
|
-
imports: [NgClass, NgStyle, SmzInputTextDirective],
|
|
3941
|
+
imports: [NgClass, NgStyle, NgTemplateOutlet, SmzInputTextDirective],
|
|
3807
3942
|
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzMultiSelectComponent), multi: true }],
|
|
3808
3943
|
host: { class: 'block min-w-0' },
|
|
3809
3944
|
template: `
|
|
@@ -3822,7 +3957,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3822
3957
|
(keydown)="onKeydown($event)"
|
|
3823
3958
|
(blur)="onBlur()"
|
|
3824
3959
|
>
|
|
3825
|
-
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="selectedOptions().length === 0">
|
|
3960
|
+
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="selectedOptions().length === 0">
|
|
3961
|
+
@if (selectedOptions().length > 0 && selectedItemsTemplate(); as tpl) {
|
|
3962
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: selectedValues(), options: selectedOptions() }" />
|
|
3963
|
+
} @else {
|
|
3964
|
+
{{ displayLabel() }}
|
|
3965
|
+
}
|
|
3966
|
+
</span>
|
|
3826
3967
|
@if (showClear() && selectedOptions().length > 0 && !isDisabled()) {
|
|
3827
3968
|
<span
|
|
3828
3969
|
role="button"
|
|
@@ -3892,7 +4033,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3892
4033
|
<path d="M3 8.5l3.2 3L13 4.5" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" />
|
|
3893
4034
|
</svg>
|
|
3894
4035
|
</span>
|
|
3895
|
-
<span class="min-w-0 flex-1 truncate">
|
|
4036
|
+
<span class="min-w-0 flex-1 truncate">
|
|
4037
|
+
@if (itemTemplate(); as tpl) {
|
|
4038
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: option, index: index }" />
|
|
4039
|
+
} @else {
|
|
4040
|
+
{{ labelOf(option) }}
|
|
4041
|
+
}
|
|
4042
|
+
</span>
|
|
3896
4043
|
</li>
|
|
3897
4044
|
}
|
|
3898
4045
|
@empty {
|
|
@@ -3903,7 +4050,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3903
4050
|
</ng-template>
|
|
3904
4051
|
`,
|
|
3905
4052
|
}]
|
|
3906
|
-
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], filterMatchMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMatchMode", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], showToggleAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToggleAll", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], emptyFilterMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterMessage", required: false }] }], maxSelectedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelectedLabels", required: false }] }], selectedItemsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItemsLabel", required: false }] }], panelStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyle", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], autofocusFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocusFilter", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }], panelHide: [{ type: i0.Output, args: ["panelHide"] }], panelShow: [{ type: i0.Output, args: ["panelShow"] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panel: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], filterInput: [{ type: i0.ViewChild, args: ['filterInput', { isSignal: true }] }] } });
|
|
4053
|
+
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], filterMatchMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMatchMode", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], showToggleAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToggleAll", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], emptyFilterMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterMessage", required: false }] }], maxSelectedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelectedLabels", required: false }] }], selectedItemsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItemsLabel", required: false }] }], panelStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyle", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], autofocusFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocusFilter", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }], panelHide: [{ type: i0.Output, args: ["panelHide"] }], panelShow: [{ type: i0.Output, args: ["panelShow"] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SmzTemplateDirective), { isSignal: true }] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panel: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], filterInput: [{ type: i0.ViewChild, args: ['filterInput', { isSignal: true }] }] } });
|
|
3907
4054
|
|
|
3908
4055
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-unsafe-return, max-len */
|
|
3909
4056
|
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument */
|
|
@@ -4448,6 +4595,7 @@ class SmzInputNumberComponent extends SmzValueAccessor {
|
|
|
4448
4595
|
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
4449
4596
|
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
4450
4597
|
inputId = input('', ...(ngDevMode ? [{ debugName: "inputId" }] : []));
|
|
4598
|
+
name = input('', ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
4451
4599
|
inputed = output();
|
|
4452
4600
|
keyDown = output();
|
|
4453
4601
|
blurred = output();
|
|
@@ -4584,7 +4732,7 @@ class SmzInputNumberComponent extends SmzValueAccessor {
|
|
|
4584
4732
|
return value;
|
|
4585
4733
|
}
|
|
4586
4734
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzInputNumberComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4587
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzInputNumberComponent, isStandalone: true, selector: "ui-input-number", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, localeMatcher: { classPropertyName: "localeMatcher", publicName: "localeMatcher", isSignal: true, isRequired: false, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null }, currencyDisplay: { classPropertyName: "currencyDisplay", publicName: "currencyDisplay", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, minFractionDigits: { classPropertyName: "minFractionDigits", publicName: "minFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, maxFractionDigits: { classPropertyName: "maxFractionDigits", publicName: "maxFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, showButtons: { classPropertyName: "showButtons", publicName: "showButtons", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, allowEmpty: { classPropertyName: "allowEmpty", publicName: "allowEmpty", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { inputed: "inputed", keyDown: "keyDown", blurred: "blurred", focused: "focused" }, host: { classAttribute: "flex min-w-0" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzInputNumberComponent), multi: true }], viewQueries: [{ propertyName: "field", first: true, predicate: ["field"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
4735
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzInputNumberComponent, isStandalone: true, selector: "ui-input-number", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, localeMatcher: { classPropertyName: "localeMatcher", publicName: "localeMatcher", isSignal: true, isRequired: false, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null }, currencyDisplay: { classPropertyName: "currencyDisplay", publicName: "currencyDisplay", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, minFractionDigits: { classPropertyName: "minFractionDigits", publicName: "minFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, maxFractionDigits: { classPropertyName: "maxFractionDigits", publicName: "maxFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, showButtons: { classPropertyName: "showButtons", publicName: "showButtons", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, allowEmpty: { classPropertyName: "allowEmpty", publicName: "allowEmpty", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { inputed: "inputed", keyDown: "keyDown", blurred: "blurred", focused: "focused" }, host: { classAttribute: "flex min-w-0" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzInputNumberComponent), multi: true }], viewQueries: [{ propertyName: "field", first: true, predicate: ["field"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
4588
4736
|
<div class="relative flex w-full items-stretch">
|
|
4589
4737
|
<input
|
|
4590
4738
|
#field
|
|
@@ -4594,6 +4742,7 @@ class SmzInputNumberComponent extends SmzValueAccessor {
|
|
|
4594
4742
|
class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
|
|
4595
4743
|
[class.pr-14]="showButtons()"
|
|
4596
4744
|
[attr.id]="inputId() || null"
|
|
4745
|
+
[attr.name]="name() || null"
|
|
4597
4746
|
[attr.placeholder]="placeholder() || null"
|
|
4598
4747
|
[attr.aria-valuemin]="min()"
|
|
4599
4748
|
[attr.aria-valuemax]="max()"
|
|
@@ -4651,6 +4800,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
4651
4800
|
class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
|
|
4652
4801
|
[class.pr-14]="showButtons()"
|
|
4653
4802
|
[attr.id]="inputId() || null"
|
|
4803
|
+
[attr.name]="name() || null"
|
|
4654
4804
|
[attr.placeholder]="placeholder() || null"
|
|
4655
4805
|
[attr.aria-valuemin]="min()"
|
|
4656
4806
|
[attr.aria-valuemax]="max()"
|
|
@@ -4691,7 +4841,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
4691
4841
|
</div>
|
|
4692
4842
|
`,
|
|
4693
4843
|
}]
|
|
4694
|
-
}], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], localeMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "localeMatcher", required: false }] }], currency: [{ type: i0.Input, args: [{ isSignal: true, alias: "currency", required: false }] }], currencyDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencyDisplay", required: false }] }], useGrouping: [{ type: i0.Input, args: [{ isSignal: true, alias: "useGrouping", required: false }] }], minFractionDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "minFractionDigits", required: false }] }], maxFractionDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFractionDigits", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], showButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButtons", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], allowEmpty: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowEmpty", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], inputed: [{ type: i0.Output, args: ["inputed"] }], keyDown: [{ type: i0.Output, args: ["keyDown"] }], blurred: [{ type: i0.Output, args: ["blurred"] }], focused: [{ type: i0.Output, args: ["focused"] }], field: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }] } });
|
|
4844
|
+
}], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], localeMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "localeMatcher", required: false }] }], currency: [{ type: i0.Input, args: [{ isSignal: true, alias: "currency", required: false }] }], currencyDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencyDisplay", required: false }] }], useGrouping: [{ type: i0.Input, args: [{ isSignal: true, alias: "useGrouping", required: false }] }], minFractionDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "minFractionDigits", required: false }] }], maxFractionDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFractionDigits", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], showButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButtons", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], allowEmpty: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowEmpty", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], inputed: [{ type: i0.Output, args: ["inputed"] }], keyDown: [{ type: i0.Output, args: ["keyDown"] }], blurred: [{ type: i0.Output, args: ["blurred"] }], focused: [{ type: i0.Output, args: ["focused"] }], field: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }] } });
|
|
4695
4845
|
|
|
4696
4846
|
const pad = (value, length = 2) => String(value).padStart(length, '0');
|
|
4697
4847
|
const escapeRegExp = (text) => text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
@@ -5816,6 +5966,7 @@ class SmzInputMaskComponent extends SmzValueAccessor {
|
|
|
5816
5966
|
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
5817
5967
|
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
5818
5968
|
inputId = input('', ...(ngDevMode ? [{ debugName: "inputId" }] : []));
|
|
5969
|
+
name = input('', ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
5819
5970
|
/** Tipo do `<input>` nativo (`text`, `tel`, `password`...). */
|
|
5820
5971
|
type = input('text', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
5821
5972
|
inputed = output();
|
|
@@ -5865,9 +6016,13 @@ class SmzInputMaskComponent extends SmzValueAccessor {
|
|
|
5865
6016
|
}
|
|
5866
6017
|
return text;
|
|
5867
6018
|
}, ...(ngDevMode ? [{ debugName: "display" }] : []));
|
|
6019
|
+
/**
|
|
6020
|
+
* Aceita `number` alem de `string` (ex.: `FormControl` com `5`): o valor e convertido para texto antes de distribuir
|
|
6021
|
+
* nos slots, senao `text.length` e `undefined` e o campo abre vazio.
|
|
6022
|
+
*/
|
|
5868
6023
|
writeValue(value) {
|
|
5869
|
-
super.writeValue(value);
|
|
5870
|
-
this.entered.set(this.fitToSlots(value
|
|
6024
|
+
super.writeValue(value === null || value === undefined ? null : String(value));
|
|
6025
|
+
this.entered.set(this.fitToSlots(value === null || value === undefined ? '' : String(value)));
|
|
5871
6026
|
}
|
|
5872
6027
|
onFocus() {
|
|
5873
6028
|
this.focusedState.set(true);
|
|
@@ -5970,21 +6125,22 @@ class SmzInputMaskComponent extends SmzValueAccessor {
|
|
|
5970
6125
|
this.field().nativeElement.setSelectionRange(position, position);
|
|
5971
6126
|
}
|
|
5972
6127
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzInputMaskComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5973
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.1", type: SmzInputMaskComponent, isStandalone: true, selector: "ui-input-mask", inputs: { mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null }, slotChar: { classPropertyName: "slotChar", publicName: "slotChar", isSignal: true, isRequired: false, transformFunction: null }, characterPattern: { classPropertyName: "characterPattern", publicName: "characterPattern", isSignal: true, isRequired: false, transformFunction: null }, unmask: { classPropertyName: "unmask", publicName: "unmask", isSignal: true, isRequired: false, transformFunction: null }, autoClear: { classPropertyName: "autoClear", publicName: "autoClear", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { inputed: "inputed", blurred: "blurred", completed: "completed" }, host: { classAttribute: "flex min-w-0" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzInputMaskComponent), multi: true }], viewQueries: [{ propertyName: "field", first: true, predicate: ["field"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
5974
|
-
<input
|
|
5975
|
-
#field
|
|
5976
|
-
[attr.type]="type()"
|
|
5977
|
-
class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger"
|
|
5978
|
-
[attr.id]="inputId() || null"
|
|
5979
|
-
[attr.
|
|
5980
|
-
[
|
|
5981
|
-
[
|
|
5982
|
-
[
|
|
5983
|
-
|
|
5984
|
-
(
|
|
5985
|
-
(
|
|
5986
|
-
(
|
|
5987
|
-
|
|
6128
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.1", type: SmzInputMaskComponent, isStandalone: true, selector: "ui-input-mask", inputs: { mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null }, slotChar: { classPropertyName: "slotChar", publicName: "slotChar", isSignal: true, isRequired: false, transformFunction: null }, characterPattern: { classPropertyName: "characterPattern", publicName: "characterPattern", isSignal: true, isRequired: false, transformFunction: null }, unmask: { classPropertyName: "unmask", publicName: "unmask", isSignal: true, isRequired: false, transformFunction: null }, autoClear: { classPropertyName: "autoClear", publicName: "autoClear", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { inputed: "inputed", blurred: "blurred", completed: "completed" }, host: { classAttribute: "flex min-w-0" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzInputMaskComponent), multi: true }], viewQueries: [{ propertyName: "field", first: true, predicate: ["field"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
6129
|
+
<input
|
|
6130
|
+
#field
|
|
6131
|
+
[attr.type]="type()"
|
|
6132
|
+
class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger"
|
|
6133
|
+
[attr.id]="inputId() || null"
|
|
6134
|
+
[attr.name]="name() || null"
|
|
6135
|
+
[attr.placeholder]="placeholder() || null"
|
|
6136
|
+
[disabled]="isDisabled()"
|
|
6137
|
+
[readOnly]="readonly()"
|
|
6138
|
+
[value]="display()"
|
|
6139
|
+
(focus)="onFocus()"
|
|
6140
|
+
(input)="onInput($event)"
|
|
6141
|
+
(keydown)="onKeydown($event)"
|
|
6142
|
+
(blur)="onBlur($event)"
|
|
6143
|
+
/>
|
|
5988
6144
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5989
6145
|
}
|
|
5990
6146
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzInputMaskComponent, decorators: [{
|
|
@@ -5994,24 +6150,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
5994
6150
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5995
6151
|
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzInputMaskComponent), multi: true }],
|
|
5996
6152
|
host: { class: 'flex min-w-0' },
|
|
5997
|
-
template: `
|
|
5998
|
-
<input
|
|
5999
|
-
#field
|
|
6000
|
-
[attr.type]="type()"
|
|
6001
|
-
class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger"
|
|
6002
|
-
[attr.id]="inputId() || null"
|
|
6003
|
-
[attr.
|
|
6004
|
-
[
|
|
6005
|
-
[
|
|
6006
|
-
[
|
|
6007
|
-
|
|
6008
|
-
(
|
|
6009
|
-
(
|
|
6010
|
-
(
|
|
6011
|
-
|
|
6153
|
+
template: `
|
|
6154
|
+
<input
|
|
6155
|
+
#field
|
|
6156
|
+
[attr.type]="type()"
|
|
6157
|
+
class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger"
|
|
6158
|
+
[attr.id]="inputId() || null"
|
|
6159
|
+
[attr.name]="name() || null"
|
|
6160
|
+
[attr.placeholder]="placeholder() || null"
|
|
6161
|
+
[disabled]="isDisabled()"
|
|
6162
|
+
[readOnly]="readonly()"
|
|
6163
|
+
[value]="display()"
|
|
6164
|
+
(focus)="onFocus()"
|
|
6165
|
+
(input)="onInput($event)"
|
|
6166
|
+
(keydown)="onKeydown($event)"
|
|
6167
|
+
(blur)="onBlur($event)"
|
|
6168
|
+
/>
|
|
6012
6169
|
`,
|
|
6013
6170
|
}]
|
|
6014
|
-
}], propDecorators: { mask: [{ type: i0.Input, args: [{ isSignal: true, alias: "mask", required: false }] }], slotChar: [{ type: i0.Input, args: [{ isSignal: true, alias: "slotChar", required: false }] }], characterPattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "characterPattern", required: false }] }], unmask: [{ type: i0.Input, args: [{ isSignal: true, alias: "unmask", required: false }] }], autoClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoClear", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], inputed: [{ type: i0.Output, args: ["inputed"] }], blurred: [{ type: i0.Output, args: ["blurred"] }], completed: [{ type: i0.Output, args: ["completed"] }], field: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }] } });
|
|
6171
|
+
}], propDecorators: { mask: [{ type: i0.Input, args: [{ isSignal: true, alias: "mask", required: false }] }], slotChar: [{ type: i0.Input, args: [{ isSignal: true, alias: "slotChar", required: false }] }], characterPattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "characterPattern", required: false }] }], unmask: [{ type: i0.Input, args: [{ isSignal: true, alias: "unmask", required: false }] }], autoClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoClear", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], inputed: [{ type: i0.Output, args: ["inputed"] }], blurred: [{ type: i0.Output, args: ["blurred"] }], completed: [{ type: i0.Output, args: ["completed"] }], field: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }] } });
|
|
6015
6172
|
|
|
6016
6173
|
/* eslint-disable max-len -- classes Tailwind nos templates */
|
|
6017
6174
|
const DEFAULT_MEDIUM = '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})';
|
|
@@ -6484,6 +6641,11 @@ class SmzUiTimelineComponent {
|
|
|
6484
6641
|
contentTemplate = computed(() => smzFindTemplate(this.templates(), 'content'), ...(ngDevMode ? [{ debugName: "contentTemplate" }] : []));
|
|
6485
6642
|
oppositeTemplate = computed(() => smzFindTemplate(this.templates(), 'opposite'), ...(ngDevMode ? [{ debugName: "oppositeTemplate" }] : []));
|
|
6486
6643
|
horizontal = computed(() => this.layout() === 'horizontal' || this.align() === 'top' || this.align() === 'bottom', ...(ngDevMode ? [{ debugName: "horizontal" }] : []));
|
|
6644
|
+
/** No layout horizontal, o conteudo fica acima da linha em `top` e nos itens impares de `alternate`/`right`. */
|
|
6645
|
+
contentOnTop(index) {
|
|
6646
|
+
const align = this.align();
|
|
6647
|
+
return align === 'top' || align === 'right' || (align === 'alternate' && index % 2 === 1);
|
|
6648
|
+
}
|
|
6487
6649
|
rowReverse(index) {
|
|
6488
6650
|
const align = this.align();
|
|
6489
6651
|
return align === 'right' || (align === 'alternate' && index % 2 === 1);
|
|
@@ -6500,7 +6662,45 @@ class SmzUiTimelineComponent {
|
|
|
6500
6662
|
}
|
|
6501
6663
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzUiTimelineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6502
6664
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzUiTimelineComponent, isStandalone: true, selector: "ui-timeline", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block font-ui text-ui-fg" }, queries: [{ propertyName: "templates", predicate: SmzTemplateDirective, isSignal: true }], ngImport: i0, template: `
|
|
6503
|
-
|
|
6665
|
+
@if (horizontal()) {
|
|
6666
|
+
<!-- Nao usar a classe grid do Tailwind: o CSS legado do core (.grid, PrimeFlex) a sobrescreve com display:flex !important.
|
|
6667
|
+
Grade de 3 linhas (conteudo de cima / marcadores / conteudo de baixo) com subgrade por item: todos os marcadores ficam na mesma linha. -->
|
|
6668
|
+
<div style="display: grid; grid-template-rows: auto auto auto" [style.grid-template-columns]="'repeat(' + (value() ?? []).length + ', minmax(0, 1fr))'" [ngClass]="styleClass()">
|
|
6669
|
+
@for (event of value() ?? []; track $index; let index = $index; let first = $first; let last = $last) {
|
|
6670
|
+
<div class="tl-item min-w-0" style="display: grid; grid-row: span 3; grid-template-rows: subgrid">
|
|
6671
|
+
<div class="flex min-w-0 flex-col justify-end px-2 pb-2 text-center" style="grid-row: 1">
|
|
6672
|
+
@if (contentOnTop(index)) {
|
|
6673
|
+
@if (contentTemplate(); as content) {
|
|
6674
|
+
<ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6675
|
+
}
|
|
6676
|
+
} @else if (oppositeTemplate(); as opposite) {
|
|
6677
|
+
<ng-container [ngTemplateOutlet]="opposite" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6678
|
+
}
|
|
6679
|
+
</div>
|
|
6680
|
+
<div class="flex items-center" style="grid-row: 2">
|
|
6681
|
+
<span class="h-0.5 flex-1" [class]="first ? 'bg-transparent' : 'bg-ui-line'"></span>
|
|
6682
|
+
@if (markerTemplate(); as marker) {
|
|
6683
|
+
<ng-container [ngTemplateOutlet]="marker" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6684
|
+
}
|
|
6685
|
+
@else {
|
|
6686
|
+
<span class="block h-4 w-4 shrink-0 rounded-full border-2 border-ui-primary bg-ui-surface-1"></span>
|
|
6687
|
+
}
|
|
6688
|
+
<span class="h-0.5 flex-1" [class]="last ? 'bg-transparent' : 'bg-ui-line'"></span>
|
|
6689
|
+
</div>
|
|
6690
|
+
<div class="flex min-w-0 flex-col px-2 pt-2 text-center" style="grid-row: 3">
|
|
6691
|
+
@if (!contentOnTop(index)) {
|
|
6692
|
+
@if (contentTemplate(); as content) {
|
|
6693
|
+
<ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6694
|
+
}
|
|
6695
|
+
} @else if (oppositeTemplate(); as opposite) {
|
|
6696
|
+
<ng-container [ngTemplateOutlet]="opposite" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6697
|
+
}
|
|
6698
|
+
</div>
|
|
6699
|
+
</div>
|
|
6700
|
+
}
|
|
6701
|
+
</div>
|
|
6702
|
+
} @else {
|
|
6703
|
+
<div class="flex flex-col" [ngClass]="styleClass()">
|
|
6504
6704
|
@for (event of value() ?? []; track $index; let index = $index; let last = $last) {
|
|
6505
6705
|
<div class="flex min-w-0 flex-1" [class]="horizontal() ? 'flex-col' : (rowReverse(index) ? 'flex-row-reverse' : 'flex-row')">
|
|
6506
6706
|
<div class="flex-1" [class]="oppositeClass(index)">
|
|
@@ -6527,6 +6727,7 @@ class SmzUiTimelineComponent {
|
|
|
6527
6727
|
</div>
|
|
6528
6728
|
}
|
|
6529
6729
|
</div>
|
|
6730
|
+
}
|
|
6530
6731
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6531
6732
|
}
|
|
6532
6733
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzUiTimelineComponent, decorators: [{
|
|
@@ -6537,7 +6738,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
6537
6738
|
imports: [NgClass, NgTemplateOutlet],
|
|
6538
6739
|
host: { class: 'block font-ui text-ui-fg' },
|
|
6539
6740
|
template: `
|
|
6540
|
-
|
|
6741
|
+
@if (horizontal()) {
|
|
6742
|
+
<!-- Nao usar a classe grid do Tailwind: o CSS legado do core (.grid, PrimeFlex) a sobrescreve com display:flex !important.
|
|
6743
|
+
Grade de 3 linhas (conteudo de cima / marcadores / conteudo de baixo) com subgrade por item: todos os marcadores ficam na mesma linha. -->
|
|
6744
|
+
<div style="display: grid; grid-template-rows: auto auto auto" [style.grid-template-columns]="'repeat(' + (value() ?? []).length + ', minmax(0, 1fr))'" [ngClass]="styleClass()">
|
|
6745
|
+
@for (event of value() ?? []; track $index; let index = $index; let first = $first; let last = $last) {
|
|
6746
|
+
<div class="tl-item min-w-0" style="display: grid; grid-row: span 3; grid-template-rows: subgrid">
|
|
6747
|
+
<div class="flex min-w-0 flex-col justify-end px-2 pb-2 text-center" style="grid-row: 1">
|
|
6748
|
+
@if (contentOnTop(index)) {
|
|
6749
|
+
@if (contentTemplate(); as content) {
|
|
6750
|
+
<ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6751
|
+
}
|
|
6752
|
+
} @else if (oppositeTemplate(); as opposite) {
|
|
6753
|
+
<ng-container [ngTemplateOutlet]="opposite" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6754
|
+
}
|
|
6755
|
+
</div>
|
|
6756
|
+
<div class="flex items-center" style="grid-row: 2">
|
|
6757
|
+
<span class="h-0.5 flex-1" [class]="first ? 'bg-transparent' : 'bg-ui-line'"></span>
|
|
6758
|
+
@if (markerTemplate(); as marker) {
|
|
6759
|
+
<ng-container [ngTemplateOutlet]="marker" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6760
|
+
}
|
|
6761
|
+
@else {
|
|
6762
|
+
<span class="block h-4 w-4 shrink-0 rounded-full border-2 border-ui-primary bg-ui-surface-1"></span>
|
|
6763
|
+
}
|
|
6764
|
+
<span class="h-0.5 flex-1" [class]="last ? 'bg-transparent' : 'bg-ui-line'"></span>
|
|
6765
|
+
</div>
|
|
6766
|
+
<div class="flex min-w-0 flex-col px-2 pt-2 text-center" style="grid-row: 3">
|
|
6767
|
+
@if (!contentOnTop(index)) {
|
|
6768
|
+
@if (contentTemplate(); as content) {
|
|
6769
|
+
<ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6770
|
+
}
|
|
6771
|
+
} @else if (oppositeTemplate(); as opposite) {
|
|
6772
|
+
<ng-container [ngTemplateOutlet]="opposite" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6773
|
+
}
|
|
6774
|
+
</div>
|
|
6775
|
+
</div>
|
|
6776
|
+
}
|
|
6777
|
+
</div>
|
|
6778
|
+
} @else {
|
|
6779
|
+
<div class="flex flex-col" [ngClass]="styleClass()">
|
|
6541
6780
|
@for (event of value() ?? []; track $index; let index = $index; let last = $last) {
|
|
6542
6781
|
<div class="flex min-w-0 flex-1" [class]="horizontal() ? 'flex-col' : (rowReverse(index) ? 'flex-row-reverse' : 'flex-row')">
|
|
6543
6782
|
<div class="flex-1" [class]="oppositeClass(index)">
|
|
@@ -6564,6 +6803,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
6564
6803
|
</div>
|
|
6565
6804
|
}
|
|
6566
6805
|
</div>
|
|
6806
|
+
}
|
|
6567
6807
|
`,
|
|
6568
6808
|
}]
|
|
6569
6809
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SmzTemplateDirective), { isSignal: true }] }] } });
|
|
@@ -8228,6 +8468,11 @@ class SmzPanelComponent {
|
|
|
8228
8468
|
header = input('', ...(ngDevMode ? [{ debugName: "header" }] : []));
|
|
8229
8469
|
toggleable = input(false, { ...(ngDevMode ? { debugName: "toggleable" } : {}), transform: booleanAttribute });
|
|
8230
8470
|
collapsed = model(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
|
|
8471
|
+
/**
|
|
8472
|
+
* O que alterna o painel: `icon` (padrao; so o botao) ou `header` (o cabecalho inteiro, exceto elementos
|
|
8473
|
+
* interativos dentro dele, como botoes do template `icons`). Equivale ao `toggler` do `p-panel`.
|
|
8474
|
+
*/
|
|
8475
|
+
toggler = input('icon', ...(ngDevMode ? [{ debugName: "toggler" }] : []));
|
|
8231
8476
|
/** Antes de alternar (cancelavel nao: apenas notifica). */
|
|
8232
8477
|
beforeToggle = output();
|
|
8233
8478
|
afterToggle = output();
|
|
@@ -8236,6 +8481,28 @@ class SmzPanelComponent {
|
|
|
8236
8481
|
iconsTemplate = computed(() => smzFindTemplate(this.templates(), 'icons'), ...(ngDevMode ? [{ debugName: "iconsTemplate" }] : []));
|
|
8237
8482
|
footerTemplate = computed(() => smzFindTemplate(this.templates(), 'footer'), ...(ngDevMode ? [{ debugName: "footerTemplate" }] : []));
|
|
8238
8483
|
hasHeader = computed(() => !!this.header() || !!this.headerTemplate() || this.toggleable(), ...(ngDevMode ? [{ debugName: "hasHeader" }] : []));
|
|
8484
|
+
headerToggles = computed(() => this.toggleable() && this.toggler() === 'header', ...(ngDevMode ? [{ debugName: "headerToggles" }] : []));
|
|
8485
|
+
onIconClick(event) {
|
|
8486
|
+
// No modo `header` o clique no botao sobe ate o cabecalho, que ja alterna.
|
|
8487
|
+
if (!this.headerToggles())
|
|
8488
|
+
this.toggle(event);
|
|
8489
|
+
}
|
|
8490
|
+
onHeaderClick(event) {
|
|
8491
|
+
if (!this.headerToggles())
|
|
8492
|
+
return;
|
|
8493
|
+
const target = event.target;
|
|
8494
|
+
const interactive = target.closest('button, a, input, select, textarea, label, [role="button"], [role="menuitem"]');
|
|
8495
|
+
// Ignora controles do template `icons`; o botao-seta do proprio painel (e o cabecalho) alternam.
|
|
8496
|
+
if (interactive && !interactive.classList.contains('p-panel-header') && !interactive.hasAttribute('data-panel-toggle'))
|
|
8497
|
+
return;
|
|
8498
|
+
this.toggle(event);
|
|
8499
|
+
}
|
|
8500
|
+
onHeaderKey(event) {
|
|
8501
|
+
if (!this.headerToggles() || event.target !== event.currentTarget)
|
|
8502
|
+
return;
|
|
8503
|
+
event.preventDefault();
|
|
8504
|
+
this.toggle(event);
|
|
8505
|
+
}
|
|
8239
8506
|
toggle(event) {
|
|
8240
8507
|
const next = !this.collapsed();
|
|
8241
8508
|
this.beforeToggle.emit({ originalEvent: event, collapsed: next });
|
|
@@ -8243,16 +8510,25 @@ class SmzPanelComponent {
|
|
|
8243
8510
|
this.afterToggle.emit({ originalEvent: event, collapsed: next });
|
|
8244
8511
|
}
|
|
8245
8512
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8246
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzPanelComponent, isStandalone: true, selector: "ui-panel", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, toggleable: { classPropertyName: "toggleable", publicName: "toggleable", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange", beforeToggle: "beforeToggle", afterToggle: "afterToggle" }, host: { classAttribute: "p-panel block overflow-hidden rounded-card border border-ui-line bg-ui-surface-1 font-ui text-ui-md text-ui-fg" }, queries: [{ propertyName: "templates", predicate: SmzTemplateDirective, isSignal: true }], ngImport: i0, template: `
|
|
8513
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzPanelComponent, isStandalone: true, selector: "ui-panel", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, toggleable: { classPropertyName: "toggleable", publicName: "toggleable", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, toggler: { classPropertyName: "toggler", publicName: "toggler", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange", beforeToggle: "beforeToggle", afterToggle: "afterToggle" }, host: { classAttribute: "p-panel block overflow-hidden rounded-card border border-ui-line bg-ui-surface-1 font-ui text-ui-md text-ui-fg" }, queries: [{ propertyName: "templates", predicate: SmzTemplateDirective, isSignal: true }], ngImport: i0, template: `
|
|
8247
8514
|
@if (hasHeader()) {
|
|
8248
|
-
<div
|
|
8515
|
+
<div
|
|
8516
|
+
class="p-panel-header flex items-center justify-between gap-2 border-b border-ui-line bg-ui-surface-1 px-4 py-3"
|
|
8517
|
+
[class]="headerToggles() ? 'cursor-pointer select-none hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ui-focus' : ''"
|
|
8518
|
+
[attr.role]="headerToggles() ? 'button' : null"
|
|
8519
|
+
[attr.tabindex]="headerToggles() ? 0 : null"
|
|
8520
|
+
[attr.aria-expanded]="headerToggles() ? !collapsed() : null"
|
|
8521
|
+
(click)="onHeaderClick($event)"
|
|
8522
|
+
(keydown.enter)="onHeaderKey($event)"
|
|
8523
|
+
(keydown.space)="onHeaderKey($event)"
|
|
8524
|
+
>
|
|
8249
8525
|
<div class="min-w-0 flex-1 font-semibold">
|
|
8250
8526
|
@if (headerTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> } @else { {{ header() }} }
|
|
8251
8527
|
</div>
|
|
8252
8528
|
<div class="flex items-center gap-1">
|
|
8253
8529
|
@if (iconsTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> }
|
|
8254
8530
|
@if (toggleable()) {
|
|
8255
|
-
<button type="button" class="inline-flex h-8 w-8 items-center justify-center rounded-full text-ui-fg-muted transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus" [attr.aria-expanded]="!collapsed()" [attr.aria-label]="collapsed() ? 'Expandir' : 'Recolher'" (click)="
|
|
8531
|
+
<button type="button" class="inline-flex h-8 w-8 items-center justify-center rounded-full text-ui-fg-muted transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus" data-panel-toggle [attr.aria-expanded]="!collapsed()" [attr.aria-label]="collapsed() ? 'Expandir' : 'Recolher'" [attr.tabindex]="headerToggles() ? -1 : null" (click)="onIconClick($event)">
|
|
8256
8532
|
<svg viewBox="0 0 16 16" class="h-4 w-4 transition-transform duration-ui" [class.rotate-180]="!collapsed()" fill="none" aria-hidden="true"><path d="M4 6l4 4 4-4" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>
|
|
8257
8533
|
</button>
|
|
8258
8534
|
}
|
|
@@ -8276,14 +8552,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
8276
8552
|
host: { class: 'p-panel block overflow-hidden rounded-card border border-ui-line bg-ui-surface-1 font-ui text-ui-md text-ui-fg' },
|
|
8277
8553
|
template: `
|
|
8278
8554
|
@if (hasHeader()) {
|
|
8279
|
-
<div
|
|
8555
|
+
<div
|
|
8556
|
+
class="p-panel-header flex items-center justify-between gap-2 border-b border-ui-line bg-ui-surface-1 px-4 py-3"
|
|
8557
|
+
[class]="headerToggles() ? 'cursor-pointer select-none hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ui-focus' : ''"
|
|
8558
|
+
[attr.role]="headerToggles() ? 'button' : null"
|
|
8559
|
+
[attr.tabindex]="headerToggles() ? 0 : null"
|
|
8560
|
+
[attr.aria-expanded]="headerToggles() ? !collapsed() : null"
|
|
8561
|
+
(click)="onHeaderClick($event)"
|
|
8562
|
+
(keydown.enter)="onHeaderKey($event)"
|
|
8563
|
+
(keydown.space)="onHeaderKey($event)"
|
|
8564
|
+
>
|
|
8280
8565
|
<div class="min-w-0 flex-1 font-semibold">
|
|
8281
8566
|
@if (headerTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> } @else { {{ header() }} }
|
|
8282
8567
|
</div>
|
|
8283
8568
|
<div class="flex items-center gap-1">
|
|
8284
8569
|
@if (iconsTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> }
|
|
8285
8570
|
@if (toggleable()) {
|
|
8286
|
-
<button type="button" class="inline-flex h-8 w-8 items-center justify-center rounded-full text-ui-fg-muted transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus" [attr.aria-expanded]="!collapsed()" [attr.aria-label]="collapsed() ? 'Expandir' : 'Recolher'" (click)="
|
|
8571
|
+
<button type="button" class="inline-flex h-8 w-8 items-center justify-center rounded-full text-ui-fg-muted transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus" data-panel-toggle [attr.aria-expanded]="!collapsed()" [attr.aria-label]="collapsed() ? 'Expandir' : 'Recolher'" [attr.tabindex]="headerToggles() ? -1 : null" (click)="onIconClick($event)">
|
|
8287
8572
|
<svg viewBox="0 0 16 16" class="h-4 w-4 transition-transform duration-ui" [class.rotate-180]="!collapsed()" fill="none" aria-hidden="true"><path d="M4 6l4 4 4-4" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>
|
|
8288
8573
|
</button>
|
|
8289
8574
|
}
|
|
@@ -8298,7 +8583,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
8298
8583
|
}
|
|
8299
8584
|
`,
|
|
8300
8585
|
}]
|
|
8301
|
-
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], toggleable: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleable", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], beforeToggle: [{ type: i0.Output, args: ["beforeToggle"] }], afterToggle: [{ type: i0.Output, args: ["afterToggle"] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SmzTemplateDirective), { isSignal: true }] }] } });
|
|
8586
|
+
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], toggleable: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleable", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], toggler: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggler", required: false }] }], beforeToggle: [{ type: i0.Output, args: ["beforeToggle"] }], afterToggle: [{ type: i0.Output, args: ["afterToggle"] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SmzTemplateDirective), { isSignal: true }] }] } });
|
|
8302
8587
|
|
|
8303
8588
|
/* eslint-disable max-len -- classes Tailwind nos templates */
|
|
8304
8589
|
/**
|
|
@@ -8533,7 +8818,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
8533
8818
|
const ROW_BASE = 'border-b border-ui-line transition-colors duration-ui';
|
|
8534
8819
|
/**
|
|
8535
8820
|
* Tabela em arvore. Substitui o `p-treeTable` do PrimeNG.
|
|
8536
|
-
* Os templates `header`, `body`, `caption`, `footer`, `emptymessage` e `summary` usam `smzTemplate`;
|
|
8821
|
+
* Os templates `colgroup`, `header`, `body`, `caption`, `footer`, `emptymessage` e `summary` usam `smzTemplate`;
|
|
8537
8822
|
* o `body` recebe `let-rowNode let-rowData="rowData" let-columns="columns"`.
|
|
8538
8823
|
*
|
|
8539
8824
|
* <ui-tree-table [value]="nodes" [columns]="cols" selectionMode="checkbox" [(selection)]="sel">
|
|
@@ -8577,6 +8862,8 @@ class SmzTreeTableComponent {
|
|
|
8577
8862
|
page = output();
|
|
8578
8863
|
templates = contentChildren(SmzTemplateDirective, ...(ngDevMode ? [{ debugName: "templates" }] : []));
|
|
8579
8864
|
headerTemplate = computed(() => smzFindTemplate(this.templates(), 'header'), ...(ngDevMode ? [{ debugName: "headerTemplate" }] : []));
|
|
8865
|
+
/** `<colgroup>` com as larguras das colunas (como no `p-treeTable`); quando existe, a tabela usa `table-layout: fixed`. */
|
|
8866
|
+
colgroupTemplate = computed(() => smzFindTemplate(this.templates(), 'colgroup'), ...(ngDevMode ? [{ debugName: "colgroupTemplate" }] : []));
|
|
8580
8867
|
bodyTemplate = computed(() => smzFindTemplate(this.templates(), 'body'), ...(ngDevMode ? [{ debugName: "bodyTemplate" }] : []));
|
|
8581
8868
|
captionTemplate = computed(() => smzFindTemplate(this.templates(), 'caption'), ...(ngDevMode ? [{ debugName: "captionTemplate" }] : []));
|
|
8582
8869
|
footerTemplate = computed(() => smzFindTemplate(this.templates(), 'footer'), ...(ngDevMode ? [{ debugName: "footerTemplate" }] : []));
|
|
@@ -8798,7 +9085,10 @@ class SmzTreeTableComponent {
|
|
|
8798
9085
|
<div class="border-b border-ui-line px-4 py-3"><ng-container [ngTemplateOutlet]="tpl" /></div>
|
|
8799
9086
|
}
|
|
8800
9087
|
<div class="relative overflow-auto" [style.max-height]="scrollable() ? scrollHeight() : null">
|
|
8801
|
-
<table class="w-full border-separate border-spacing-0 text-left [&_td]:border-b [&_td]:border-ui-line [&_td]:px-4 [&_td]:py-3 [&_th]:sticky [&_th]:top-0 [&_th]:border-b [&_th]:border-ui-line [&_th]:bg-ui-surface-1 [&_th]:px-4 [&_th]:py-3 [&_th]:font-semibold" [class]="tableStyleClass() ?? ''">
|
|
9088
|
+
<table class="w-full border-separate border-spacing-0 text-left [&_td]:border-b [&_td]:border-ui-line [&_td]:px-4 [&_td]:py-3 [&_th]:sticky [&_th]:top-0 [&_th]:border-b [&_th]:border-ui-line [&_th]:bg-ui-surface-1 [&_th]:px-4 [&_th]:py-3 [&_th]:font-semibold" [class]="(colgroupTemplate() ? 'table-fixed ' : '') + (tableStyleClass() ?? '')">
|
|
9089
|
+
@if (colgroupTemplate(); as tpl) {
|
|
9090
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" />
|
|
9091
|
+
}
|
|
8802
9092
|
<thead>
|
|
8803
9093
|
@if (headerTemplate(); as tpl) {
|
|
8804
9094
|
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" />
|
|
@@ -8847,7 +9137,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
8847
9137
|
<div class="border-b border-ui-line px-4 py-3"><ng-container [ngTemplateOutlet]="tpl" /></div>
|
|
8848
9138
|
}
|
|
8849
9139
|
<div class="relative overflow-auto" [style.max-height]="scrollable() ? scrollHeight() : null">
|
|
8850
|
-
<table class="w-full border-separate border-spacing-0 text-left [&_td]:border-b [&_td]:border-ui-line [&_td]:px-4 [&_td]:py-3 [&_th]:sticky [&_th]:top-0 [&_th]:border-b [&_th]:border-ui-line [&_th]:bg-ui-surface-1 [&_th]:px-4 [&_th]:py-3 [&_th]:font-semibold" [class]="tableStyleClass() ?? ''">
|
|
9140
|
+
<table class="w-full border-separate border-spacing-0 text-left [&_td]:border-b [&_td]:border-ui-line [&_td]:px-4 [&_td]:py-3 [&_th]:sticky [&_th]:top-0 [&_th]:border-b [&_th]:border-ui-line [&_th]:bg-ui-surface-1 [&_th]:px-4 [&_th]:py-3 [&_th]:font-semibold" [class]="(colgroupTemplate() ? 'table-fixed ' : '') + (tableStyleClass() ?? '')">
|
|
9141
|
+
@if (colgroupTemplate(); as tpl) {
|
|
9142
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" />
|
|
9143
|
+
}
|
|
8851
9144
|
<thead>
|
|
8852
9145
|
@if (headerTemplate(); as tpl) {
|
|
8853
9146
|
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" />
|
|
@@ -9007,17 +9300,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
9007
9300
|
class SmzTreeTableSortableColumnDirective {
|
|
9008
9301
|
table = inject(SmzTreeTableComponent);
|
|
9009
9302
|
field = input.required({ ...(ngDevMode ? { debugName: "field" } : {}), alias: 'smzTtSortableColumn' });
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
}
|
|
9303
|
+
/** Coluna ordenada agora (inclui o `sortField`/`sortOrder` iniciais da tabela, sem precisar de clique). */
|
|
9304
|
+
sorted = computed(() => this.table.sortField() === this.field(), ...(ngDevMode ? [{ debugName: "sorted" }] : []));
|
|
9305
|
+
classes = computed(() => 'cursor-pointer select-none ' + (this.sorted() ? 'bg-ui-primary/10 text-ui-primary' : ''), ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
9306
|
+
ariaSort = computed(() => (this.sorted() ? (this.table.sortOrder() === 1 ? 'ascending' : 'descending') : 'none'), ...(ngDevMode ? [{ debugName: "ariaSort" }] : []));
|
|
9013
9307
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableSortableColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9014
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.1", type: SmzTreeTableSortableColumnDirective, isStandalone: true, selector: "th[smzTtSortableColumn]", inputs: { field: { classPropertyName: "field", publicName: "smzTtSortableColumn", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "table.sortBy(field())" }, properties: { "
|
|
9308
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.1", type: SmzTreeTableSortableColumnDirective, isStandalone: true, selector: "th[smzTtSortableColumn]", inputs: { field: { classPropertyName: "field", publicName: "smzTtSortableColumn", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "table.sortBy(field())" }, properties: { "class": "classes()", "class.p-highlight": "sorted()", "attr.aria-sort": "ariaSort()" } }, ngImport: i0 });
|
|
9015
9309
|
}
|
|
9016
9310
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableSortableColumnDirective, decorators: [{
|
|
9017
9311
|
type: Directive,
|
|
9018
9312
|
args: [{
|
|
9019
9313
|
selector: 'th[smzTtSortableColumn]',
|
|
9020
|
-
host: {
|
|
9314
|
+
host: {
|
|
9315
|
+
'[class]': 'classes()',
|
|
9316
|
+
'[class.p-highlight]': 'sorted()',
|
|
9317
|
+
'(click)': 'table.sortBy(field())',
|
|
9318
|
+
'[attr.aria-sort]': 'ariaSort()',
|
|
9319
|
+
},
|
|
9021
9320
|
}]
|
|
9022
9321
|
}], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "smzTtSortableColumn", required: true }] }] } });
|
|
9023
9322
|
class SmzTreeTableSortIconComponent {
|
|
@@ -9027,10 +9326,10 @@ class SmzTreeTableSortIconComponent {
|
|
|
9027
9326
|
return this.table.sortField() === this.field() ? this.table.sortOrder() : 0;
|
|
9028
9327
|
}
|
|
9029
9328
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableSortIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9030
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: SmzTreeTableSortIconComponent, isStandalone: true, selector: "ui-tree-table-sort-icon", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "ml-1 inline-flex align-middle text-ui-fg-muted" }, ngImport: i0, template: `
|
|
9329
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: SmzTreeTableSortIconComponent, isStandalone: true, selector: "ui-tree-table-sort-icon", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "attr.data-sort-dir": "dir()" }, classAttribute: "ml-1 inline-flex align-middle text-ui-fg-muted" }, ngImport: i0, template: `
|
|
9031
9330
|
<svg viewBox="0 0 16 16" class="h-3.5 w-3.5" fill="none" aria-hidden="true">
|
|
9032
|
-
<path d="M5 6l3-3 3 3" [attr.stroke]="dir() === 1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
9033
|
-
<path d="M5 10l3 3 3-3" [attr.stroke]="dir() === -1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
9331
|
+
<path d="M5 6l3-3 3 3" [attr.stroke]="dir() === 1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" [attr.stroke-width]="dir() === 1 ? 2.25 : 1.5" [attr.opacity]="dir() === -1 ? 0.3 : 1" stroke-linecap="round" stroke-linejoin="round" />
|
|
9332
|
+
<path d="M5 10l3 3 3-3" [attr.stroke]="dir() === -1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" [attr.stroke-width]="dir() === -1 ? 2.25 : 1.5" [attr.opacity]="dir() === 1 ? 0.3 : 1" stroke-linecap="round" stroke-linejoin="round" />
|
|
9034
9333
|
</svg>
|
|
9035
9334
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9036
9335
|
}
|
|
@@ -9039,11 +9338,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
9039
9338
|
args: [{
|
|
9040
9339
|
selector: 'ui-tree-table-sort-icon',
|
|
9041
9340
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9042
|
-
host: { class: 'ml-1 inline-flex align-middle text-ui-fg-muted' },
|
|
9341
|
+
host: { class: 'ml-1 inline-flex align-middle text-ui-fg-muted', '[attr.data-sort-dir]': 'dir()' },
|
|
9043
9342
|
template: `
|
|
9044
9343
|
<svg viewBox="0 0 16 16" class="h-3.5 w-3.5" fill="none" aria-hidden="true">
|
|
9045
|
-
<path d="M5 6l3-3 3 3" [attr.stroke]="dir() === 1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
9046
|
-
<path d="M5 10l3 3 3-3" [attr.stroke]="dir() === -1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
9344
|
+
<path d="M5 6l3-3 3 3" [attr.stroke]="dir() === 1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" [attr.stroke-width]="dir() === 1 ? 2.25 : 1.5" [attr.opacity]="dir() === -1 ? 0.3 : 1" stroke-linecap="round" stroke-linejoin="round" />
|
|
9345
|
+
<path d="M5 10l3 3 3-3" [attr.stroke]="dir() === -1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" [attr.stroke-width]="dir() === -1 ? 2.25 : 1.5" [attr.opacity]="dir() === 1 ? 0.3 : 1" stroke-linecap="round" stroke-linejoin="round" />
|
|
9047
9346
|
</svg>
|
|
9048
9347
|
`,
|
|
9049
9348
|
}]
|