@ngx-smz/ui-kit 21.9.0-next.9 → 21.10.0-next.10
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 +508 -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 +61 -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);
|
|
@@ -1890,12 +1944,16 @@ class SmzDialogComponent {
|
|
|
1890
1944
|
hidden = output();
|
|
1891
1945
|
panel = viewChild.required('panel');
|
|
1892
1946
|
templates = contentChildren(SmzTemplateDirective, ...(ngDevMode ? [{ debugName: "templates" }] : []));
|
|
1947
|
+
/** `header`: acoes extras na barra padrao (titulo, maximizar e fechar permanecem). `headerFull`: substitui a barra inteira. */
|
|
1893
1948
|
headerTemplate = computed(() => smzFindTemplate(this.templates(), 'header'), ...(ngDevMode ? [{ debugName: "headerTemplate" }] : []));
|
|
1949
|
+
headerFullTemplate = computed(() => smzFindTemplate(this.templates(), 'headerFull'), ...(ngDevMode ? [{ debugName: "headerFullTemplate" }] : []));
|
|
1894
1950
|
footerTemplate = computed(() => smzFindTemplate(this.templates(), 'footer'), ...(ngDevMode ? [{ debugName: "footerTemplate" }] : []));
|
|
1895
1951
|
overlay = inject(Overlay);
|
|
1896
1952
|
viewContainer = inject(ViewContainerRef);
|
|
1897
1953
|
host = inject(ElementRef);
|
|
1898
1954
|
overlayRef;
|
|
1955
|
+
/** `width`/`height`/`min-*`/`max-*` de `style` vao para o painel do overlay (relativos a viewport); o frame ocupa 100% dele. */
|
|
1956
|
+
sizing = computed(() => smzSplitDialogSize(this.style()), ...(ngDevMode ? [{ debugName: "sizing" }] : []));
|
|
1899
1957
|
dx = signal(0, ...(ngDevMode ? [{ debugName: "dx" }] : []));
|
|
1900
1958
|
dy = signal(0, ...(ngDevMode ? [{ debugName: "dy" }] : []));
|
|
1901
1959
|
constructor() {
|
|
@@ -1905,6 +1963,17 @@ class SmzDialogComponent {
|
|
|
1905
1963
|
else
|
|
1906
1964
|
this.dispose();
|
|
1907
1965
|
});
|
|
1966
|
+
effect(() => {
|
|
1967
|
+
const maximized = this.maximized();
|
|
1968
|
+
const pane = this.sizing().pane;
|
|
1969
|
+
// `updateSize` do CDK so MESCLA as chaves recebidas: ao restaurar, height/max-height/min-* do maximizado
|
|
1970
|
+
// (100vh, 0) sobrevivem se nao forem repostos explicitamente (vazio = remove o estilo inline).
|
|
1971
|
+
this.overlayRef?.updateSize(maximized
|
|
1972
|
+
? { width: '100vw', height: '100vh', maxWidth: '100vw', maxHeight: '100vh', minWidth: '0', minHeight: '0' }
|
|
1973
|
+
: { width: pane.width ?? '', height: pane.height ?? '', minWidth: pane.minWidth ?? '', minHeight: pane.minHeight ?? '', maxWidth: pane.maxWidth ?? '95vw', maxHeight: pane.maxHeight ?? '' });
|
|
1974
|
+
// A estrategia global alinha por tamanho (flush a 100vh/100vw); reaplica para voltar ao alinhamento do `position`.
|
|
1975
|
+
this.overlayRef?.updatePosition();
|
|
1976
|
+
});
|
|
1908
1977
|
effect(() => {
|
|
1909
1978
|
const position = this.position();
|
|
1910
1979
|
this.overlayRef?.updatePositionStrategy(this.strategyFor(position));
|
|
@@ -1965,6 +2034,7 @@ class SmzDialogComponent {
|
|
|
1965
2034
|
hasBackdrop: modal,
|
|
1966
2035
|
positionStrategy: this.strategyFor(this.position()),
|
|
1967
2036
|
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
2037
|
+
...(this.maximized() ? { width: '100vw', height: '100vh', maxWidth: '100vw', maxHeight: '100vh' } : { ...this.sizing().pane, maxWidth: this.sizing().pane.maxWidth ?? '95vw' }),
|
|
1968
2038
|
});
|
|
1969
2039
|
SmzZIndex.set('modal', this.overlayRef.hostElement, 1100 + this.baseZIndex());
|
|
1970
2040
|
if (this.overlayRef.backdropElement) {
|
|
@@ -1995,56 +2065,66 @@ class SmzDialogComponent {
|
|
|
1995
2065
|
this.overlayRef?.overlayElement.querySelector('[role="dialog"]')?.setAttribute('data-testid', testId);
|
|
1996
2066
|
}
|
|
1997
2067
|
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
|
-
@if (
|
|
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
|
-
|
|
2068
|
+
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: `
|
|
2069
|
+
<ng-template #panel>
|
|
2070
|
+
<div
|
|
2071
|
+
role="dialog"
|
|
2072
|
+
aria-modal="true"
|
|
2073
|
+
[attr.aria-label]="header() || null"
|
|
2074
|
+
class="pointer-events-auto flex flex-col border border-ui-line bg-ui-surface-2 font-ui text-ui-fg shadow-overlay"
|
|
2075
|
+
[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() ?? '')"
|
|
2076
|
+
[ngStyle]="maximized() ? null : sizing().rest"
|
|
2077
|
+
[style.width]="!maximized() && sizing().pane.width ? '100%' : null"
|
|
2078
|
+
[style.height]="!maximized() && sizing().pane.height ? '100%' : null"
|
|
2079
|
+
[style.transform]="maximized() || (dx() === 0 && dy() === 0) ? null : 'translate(' + dx() + 'px, ' + dy() + 'px)'"
|
|
2080
|
+
>
|
|
2081
|
+
@if (headerFullTemplate(); as fullTpl) {
|
|
2082
|
+
<div class="border-b border-ui-line px-4 py-3" [class.cursor-move]="draggable() && !maximized()" (pointerdown)="startDrag($event)">
|
|
2083
|
+
<ng-container [ngTemplateOutlet]="fullTpl" />
|
|
2084
|
+
</div>
|
|
2085
|
+
}
|
|
2086
|
+
@else if (header() || headerTemplate() || closable() || maximizable()) {
|
|
2087
|
+
<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)">
|
|
2088
|
+
@if (header()) {
|
|
2089
|
+
<span class="shrink-0 text-ui-lg font-medium">{{ header() }}</span>
|
|
2090
|
+
}
|
|
2091
|
+
<!-- smzTemplate="header": acoes extras ao lado do titulo; maximizar/restaurar e fechar continuam na barra. -->
|
|
2092
|
+
<div class="flex min-w-0 flex-1 items-center gap-2">
|
|
2093
|
+
@if (headerTemplate(); as headerTpl) {
|
|
2094
|
+
<ng-container [ngTemplateOutlet]="headerTpl" />
|
|
2095
|
+
}
|
|
2096
|
+
</div>
|
|
2097
|
+
<div class="flex shrink-0 items-center gap-1">
|
|
2098
|
+
@if (maximizable()) {
|
|
2099
|
+
<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()">
|
|
2100
|
+
<svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true">
|
|
2101
|
+
@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" /> }
|
|
2102
|
+
</svg>
|
|
2103
|
+
</button>
|
|
2104
|
+
}
|
|
2105
|
+
@if (closable()) {
|
|
2106
|
+
<button
|
|
2107
|
+
type="button"
|
|
2108
|
+
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"
|
|
2109
|
+
aria-label="Fechar"
|
|
2110
|
+
(click)="close()"
|
|
2111
|
+
>
|
|
2112
|
+
<svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true">
|
|
2113
|
+
<path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" />
|
|
2114
|
+
</svg>
|
|
2115
|
+
</button>
|
|
2116
|
+
}
|
|
2117
|
+
</div>
|
|
2118
|
+
</div>
|
|
2119
|
+
}
|
|
2120
|
+
<div class="min-h-0 flex-1 overflow-auto p-4"><ng-content /></div>
|
|
2121
|
+
@if (footerTemplate(); as footerTpl) {
|
|
2122
|
+
<div class="flex justify-end gap-2 border-t border-ui-line px-4 py-3">
|
|
2123
|
+
<ng-container [ngTemplateOutlet]="footerTpl" />
|
|
2124
|
+
</div>
|
|
2125
|
+
}
|
|
2126
|
+
</div>
|
|
2127
|
+
</ng-template>
|
|
2048
2128
|
`, 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
2129
|
}
|
|
2050
2130
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzDialogComponent, decorators: [{
|
|
@@ -2053,56 +2133,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2053
2133
|
selector: 'ui-dialog',
|
|
2054
2134
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2055
2135
|
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
|
-
@if (
|
|
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
|
-
|
|
2136
|
+
template: `
|
|
2137
|
+
<ng-template #panel>
|
|
2138
|
+
<div
|
|
2139
|
+
role="dialog"
|
|
2140
|
+
aria-modal="true"
|
|
2141
|
+
[attr.aria-label]="header() || null"
|
|
2142
|
+
class="pointer-events-auto flex flex-col border border-ui-line bg-ui-surface-2 font-ui text-ui-fg shadow-overlay"
|
|
2143
|
+
[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() ?? '')"
|
|
2144
|
+
[ngStyle]="maximized() ? null : sizing().rest"
|
|
2145
|
+
[style.width]="!maximized() && sizing().pane.width ? '100%' : null"
|
|
2146
|
+
[style.height]="!maximized() && sizing().pane.height ? '100%' : null"
|
|
2147
|
+
[style.transform]="maximized() || (dx() === 0 && dy() === 0) ? null : 'translate(' + dx() + 'px, ' + dy() + 'px)'"
|
|
2148
|
+
>
|
|
2149
|
+
@if (headerFullTemplate(); as fullTpl) {
|
|
2150
|
+
<div class="border-b border-ui-line px-4 py-3" [class.cursor-move]="draggable() && !maximized()" (pointerdown)="startDrag($event)">
|
|
2151
|
+
<ng-container [ngTemplateOutlet]="fullTpl" />
|
|
2152
|
+
</div>
|
|
2153
|
+
}
|
|
2154
|
+
@else if (header() || headerTemplate() || closable() || maximizable()) {
|
|
2155
|
+
<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)">
|
|
2156
|
+
@if (header()) {
|
|
2157
|
+
<span class="shrink-0 text-ui-lg font-medium">{{ header() }}</span>
|
|
2158
|
+
}
|
|
2159
|
+
<!-- smzTemplate="header": acoes extras ao lado do titulo; maximizar/restaurar e fechar continuam na barra. -->
|
|
2160
|
+
<div class="flex min-w-0 flex-1 items-center gap-2">
|
|
2161
|
+
@if (headerTemplate(); as headerTpl) {
|
|
2162
|
+
<ng-container [ngTemplateOutlet]="headerTpl" />
|
|
2163
|
+
}
|
|
2164
|
+
</div>
|
|
2165
|
+
<div class="flex shrink-0 items-center gap-1">
|
|
2166
|
+
@if (maximizable()) {
|
|
2167
|
+
<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()">
|
|
2168
|
+
<svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true">
|
|
2169
|
+
@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" /> }
|
|
2170
|
+
</svg>
|
|
2171
|
+
</button>
|
|
2172
|
+
}
|
|
2173
|
+
@if (closable()) {
|
|
2174
|
+
<button
|
|
2175
|
+
type="button"
|
|
2176
|
+
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"
|
|
2177
|
+
aria-label="Fechar"
|
|
2178
|
+
(click)="close()"
|
|
2179
|
+
>
|
|
2180
|
+
<svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true">
|
|
2181
|
+
<path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" />
|
|
2182
|
+
</svg>
|
|
2183
|
+
</button>
|
|
2184
|
+
}
|
|
2185
|
+
</div>
|
|
2186
|
+
</div>
|
|
2187
|
+
}
|
|
2188
|
+
<div class="min-h-0 flex-1 overflow-auto p-4"><ng-content /></div>
|
|
2189
|
+
@if (footerTemplate(); as footerTpl) {
|
|
2190
|
+
<div class="flex justify-end gap-2 border-t border-ui-line px-4 py-3">
|
|
2191
|
+
<ng-container [ngTemplateOutlet]="footerTpl" />
|
|
2192
|
+
</div>
|
|
2193
|
+
}
|
|
2194
|
+
</div>
|
|
2195
|
+
</ng-template>
|
|
2106
2196
|
`,
|
|
2107
2197
|
}]
|
|
2108
2198
|
}], 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 +2561,28 @@ class SmzToastContainerComponent {
|
|
|
2471
2561
|
const key = this.key();
|
|
2472
2562
|
return this.service.messages().filter((message) => (key ? message.key === key : !message.key));
|
|
2473
2563
|
}, ...(ngDevMode ? [{ debugName: "visibleMessages" }] : []));
|
|
2564
|
+
layer = viewChild('layer', ...(ngDevMode ? [{ debugName: "layer" }] : []));
|
|
2474
2565
|
constructor() {
|
|
2475
2566
|
effect(() => {
|
|
2476
2567
|
for (const message of this.visibleMessages())
|
|
2477
2568
|
this.schedule(message);
|
|
2478
2569
|
});
|
|
2570
|
+
// Abre a camada quando ha mensagens (reabrindo a cada mudanca para ficar acima de overlays abertos depois) e fecha quando nao ha.
|
|
2571
|
+
effect(() => {
|
|
2572
|
+
const count = this.visibleMessages().length;
|
|
2573
|
+
const element = this.layer()?.nativeElement;
|
|
2574
|
+
if (!element || typeof element.showPopover !== 'function')
|
|
2575
|
+
return;
|
|
2576
|
+
try {
|
|
2577
|
+
if (element.matches(':popover-open'))
|
|
2578
|
+
element.hidePopover?.();
|
|
2579
|
+
if (count > 0)
|
|
2580
|
+
element.showPopover();
|
|
2581
|
+
}
|
|
2582
|
+
catch {
|
|
2583
|
+
/* sem suporte: segue com z-index */
|
|
2584
|
+
}
|
|
2585
|
+
});
|
|
2479
2586
|
inject(DestroyRef).onDestroy(() => this.timers.forEach((timer) => clearTimeout(timer.handle)));
|
|
2480
2587
|
}
|
|
2481
2588
|
toneClasses(message) {
|
|
@@ -2515,7 +2622,9 @@ class SmzToastContainerComponent {
|
|
|
2515
2622
|
this.timers.delete(message.id);
|
|
2516
2623
|
}
|
|
2517
2624
|
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: `
|
|
2625
|
+
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: `
|
|
2626
|
+
<!-- Camada na top layer (Popover API): overlays do CDK (drawer/dialog) ficam la e z-index nao os supera. -->
|
|
2627
|
+
<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
2628
|
<div
|
|
2520
2629
|
class="pointer-events-none fixed z-[2000] flex w-80 max-w-[95vw] flex-col gap-2"
|
|
2521
2630
|
[class]="positionClasses()"
|
|
@@ -2558,6 +2667,7 @@ class SmzToastContainerComponent {
|
|
|
2558
2667
|
</div>
|
|
2559
2668
|
}
|
|
2560
2669
|
</div>
|
|
2670
|
+
</div>
|
|
2561
2671
|
`, 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
2672
|
}
|
|
2563
2673
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzToastContainerComponent, decorators: [{
|
|
@@ -2567,6 +2677,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2567
2677
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2568
2678
|
imports: [NgClass, NgStyle],
|
|
2569
2679
|
template: `
|
|
2680
|
+
<!-- Camada na top layer (Popover API): overlays do CDK (drawer/dialog) ficam la e z-index nao os supera. -->
|
|
2681
|
+
<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
2682
|
<div
|
|
2571
2683
|
class="pointer-events-none fixed z-[2000] flex w-80 max-w-[95vw] flex-col gap-2"
|
|
2572
2684
|
[class]="positionClasses()"
|
|
@@ -2609,9 +2721,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2609
2721
|
</div>
|
|
2610
2722
|
}
|
|
2611
2723
|
</div>
|
|
2724
|
+
</div>
|
|
2612
2725
|
`,
|
|
2613
2726
|
}]
|
|
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 }] }] } });
|
|
2727
|
+
}], 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
2728
|
|
|
2616
2729
|
/* eslint-disable max-len -- classes Tailwind nos templates */
|
|
2617
2730
|
const POSITIONS$1 = [
|
|
@@ -3176,6 +3289,10 @@ class SmzSelectComponent extends SmzValueAccessor {
|
|
|
3176
3289
|
dataKey: this.dataKey(),
|
|
3177
3290
|
}), ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
3178
3291
|
visibleOptions = computed(() => filterOptions(this.options() ?? [], this.filterText(), { ...this.config(), filterBy: this.filterBy(), mode: this.filterMatchMode() }), ...(ngDevMode ? [{ debugName: "visibleOptions" }] : []));
|
|
3292
|
+
/** Templates opcionais: `item` (linha da lista) e `selectedItem` (valor exibido no campo), como no `p-select`. */
|
|
3293
|
+
templates = contentChildren(SmzTemplateDirective, ...(ngDevMode ? [{ debugName: "templates" }] : []));
|
|
3294
|
+
itemTemplate = computed(() => smzFindTemplate(this.templates(), 'item'), ...(ngDevMode ? [{ debugName: "itemTemplate" }] : []));
|
|
3295
|
+
selectedItemTemplate = computed(() => smzFindTemplate(this.templates(), 'selectedItem'), ...(ngDevMode ? [{ debugName: "selectedItemTemplate" }] : []));
|
|
3179
3296
|
hasValue = computed(() => this.selectedOption() !== undefined, ...(ngDevMode ? [{ debugName: "hasValue" }] : []));
|
|
3180
3297
|
selectedOption = computed(() => {
|
|
3181
3298
|
const current = this.current();
|
|
@@ -3346,7 +3463,7 @@ class SmzSelectComponent extends SmzValueAccessor {
|
|
|
3346
3463
|
}
|
|
3347
3464
|
}
|
|
3348
3465
|
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: `
|
|
3466
|
+
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
3467
|
<button
|
|
3351
3468
|
#trigger
|
|
3352
3469
|
type="button"
|
|
@@ -3364,7 +3481,13 @@ class SmzSelectComponent extends SmzValueAccessor {
|
|
|
3364
3481
|
(keydown)="onKeydown($event)"
|
|
3365
3482
|
(blur)="onBlur()"
|
|
3366
3483
|
>
|
|
3367
|
-
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="!hasValue()">
|
|
3484
|
+
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="!hasValue()">
|
|
3485
|
+
@if (hasValue() && selectedItemTemplate(); as tpl) {
|
|
3486
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: selectedOption() }" />
|
|
3487
|
+
} @else {
|
|
3488
|
+
{{ displayLabel() }}
|
|
3489
|
+
}
|
|
3490
|
+
</span>
|
|
3368
3491
|
@if (showClear() && hasValue() && !isDisabled()) {
|
|
3369
3492
|
<span
|
|
3370
3493
|
role="button"
|
|
@@ -3413,7 +3536,11 @@ class SmzSelectComponent extends SmzValueAccessor {
|
|
|
3413
3536
|
(mouseenter)="activeIndex.set(index)"
|
|
3414
3537
|
(click)="select(option, $event)"
|
|
3415
3538
|
>
|
|
3416
|
-
|
|
3539
|
+
@if (itemTemplate(); as tpl) {
|
|
3540
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: option, index: index }" />
|
|
3541
|
+
} @else {
|
|
3542
|
+
{{ labelOf(option) }}
|
|
3543
|
+
}
|
|
3417
3544
|
</li>
|
|
3418
3545
|
}
|
|
3419
3546
|
@empty {
|
|
@@ -3422,14 +3549,14 @@ class SmzSelectComponent extends SmzValueAccessor {
|
|
|
3422
3549
|
</ul>
|
|
3423
3550
|
</div>
|
|
3424
3551
|
</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 });
|
|
3552
|
+
`, 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
3553
|
}
|
|
3427
3554
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzSelectComponent, decorators: [{
|
|
3428
3555
|
type: Component,
|
|
3429
3556
|
args: [{
|
|
3430
3557
|
selector: 'ui-select',
|
|
3431
3558
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3432
|
-
imports: [NgClass, SmzInputTextDirective],
|
|
3559
|
+
imports: [NgClass, NgTemplateOutlet, SmzInputTextDirective],
|
|
3433
3560
|
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzSelectComponent), multi: true }],
|
|
3434
3561
|
host: { class: 'block min-w-0' },
|
|
3435
3562
|
template: `
|
|
@@ -3450,7 +3577,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3450
3577
|
(keydown)="onKeydown($event)"
|
|
3451
3578
|
(blur)="onBlur()"
|
|
3452
3579
|
>
|
|
3453
|
-
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="!hasValue()">
|
|
3580
|
+
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="!hasValue()">
|
|
3581
|
+
@if (hasValue() && selectedItemTemplate(); as tpl) {
|
|
3582
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: selectedOption() }" />
|
|
3583
|
+
} @else {
|
|
3584
|
+
{{ displayLabel() }}
|
|
3585
|
+
}
|
|
3586
|
+
</span>
|
|
3454
3587
|
@if (showClear() && hasValue() && !isDisabled()) {
|
|
3455
3588
|
<span
|
|
3456
3589
|
role="button"
|
|
@@ -3499,7 +3632,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3499
3632
|
(mouseenter)="activeIndex.set(index)"
|
|
3500
3633
|
(click)="select(option, $event)"
|
|
3501
3634
|
>
|
|
3502
|
-
|
|
3635
|
+
@if (itemTemplate(); as tpl) {
|
|
3636
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: option, index: index }" />
|
|
3637
|
+
} @else {
|
|
3638
|
+
{{ labelOf(option) }}
|
|
3639
|
+
}
|
|
3503
3640
|
</li>
|
|
3504
3641
|
}
|
|
3505
3642
|
@empty {
|
|
@@ -3510,7 +3647,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3510
3647
|
</ng-template>
|
|
3511
3648
|
`,
|
|
3512
3649
|
}]
|
|
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 }] }] } });
|
|
3650
|
+
}], 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
3651
|
|
|
3515
3652
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-unsafe-return, max-len */
|
|
3516
3653
|
/* eslint-disable max-len -- classes Tailwind nos templates */
|
|
@@ -3559,6 +3696,10 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
|
|
|
3559
3696
|
dataKey: this.dataKey(),
|
|
3560
3697
|
}), ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
3561
3698
|
visibleOptions = computed(() => filterOptions(this.options() ?? [], this.filterText(), { ...this.config(), filterBy: this.filterBy(), mode: this.filterMatchMode() }), ...(ngDevMode ? [{ debugName: "visibleOptions" }] : []));
|
|
3699
|
+
/** Templates opcionais: `item` (linha da lista) e `selectedItems` (valor exibido no campo; `$implicit` = valores selecionados), como no `p-multiselect`. */
|
|
3700
|
+
templates = contentChildren(SmzTemplateDirective, ...(ngDevMode ? [{ debugName: "templates" }] : []));
|
|
3701
|
+
itemTemplate = computed(() => smzFindTemplate(this.templates(), 'item'), ...(ngDevMode ? [{ debugName: "itemTemplate" }] : []));
|
|
3702
|
+
selectedItemsTemplate = computed(() => smzFindTemplate(this.templates(), 'selectedItems'), ...(ngDevMode ? [{ debugName: "selectedItemsTemplate" }] : []));
|
|
3562
3703
|
selectedValues = computed(() => (Array.isArray(this.current()) ? this.current() : []), ...(ngDevMode ? [{ debugName: "selectedValues" }] : []));
|
|
3563
3704
|
selectedOptions = computed(() => (this.options() ?? []).filter((option) => this.selectedValues().some((value) => sameValue(optionValue(option, this.config()), value, this.dataKey()))), ...(ngDevMode ? [{ debugName: "selectedOptions" }] : []));
|
|
3564
3705
|
allSelected = computed(() => {
|
|
@@ -3701,7 +3842,7 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
|
|
|
3701
3842
|
this.touch();
|
|
3702
3843
|
}
|
|
3703
3844
|
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: `
|
|
3845
|
+
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
3846
|
<button
|
|
3706
3847
|
#trigger
|
|
3707
3848
|
type="button"
|
|
@@ -3717,7 +3858,13 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
|
|
|
3717
3858
|
(keydown)="onKeydown($event)"
|
|
3718
3859
|
(blur)="onBlur()"
|
|
3719
3860
|
>
|
|
3720
|
-
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="selectedOptions().length === 0">
|
|
3861
|
+
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="selectedOptions().length === 0">
|
|
3862
|
+
@if (selectedOptions().length > 0 && selectedItemsTemplate(); as tpl) {
|
|
3863
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: selectedValues(), options: selectedOptions() }" />
|
|
3864
|
+
} @else {
|
|
3865
|
+
{{ displayLabel() }}
|
|
3866
|
+
}
|
|
3867
|
+
</span>
|
|
3721
3868
|
@if (showClear() && selectedOptions().length > 0 && !isDisabled()) {
|
|
3722
3869
|
<span
|
|
3723
3870
|
role="button"
|
|
@@ -3787,7 +3934,13 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
|
|
|
3787
3934
|
<path d="M3 8.5l3.2 3L13 4.5" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" />
|
|
3788
3935
|
</svg>
|
|
3789
3936
|
</span>
|
|
3790
|
-
<span class="min-w-0 flex-1 truncate">
|
|
3937
|
+
<span class="min-w-0 flex-1 truncate">
|
|
3938
|
+
@if (itemTemplate(); as tpl) {
|
|
3939
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: option, index: index }" />
|
|
3940
|
+
} @else {
|
|
3941
|
+
{{ labelOf(option) }}
|
|
3942
|
+
}
|
|
3943
|
+
</span>
|
|
3791
3944
|
</li>
|
|
3792
3945
|
}
|
|
3793
3946
|
@empty {
|
|
@@ -3796,14 +3949,14 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
|
|
|
3796
3949
|
</ul>
|
|
3797
3950
|
</div>
|
|
3798
3951
|
</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 });
|
|
3952
|
+
`, 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
3953
|
}
|
|
3801
3954
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzMultiSelectComponent, decorators: [{
|
|
3802
3955
|
type: Component,
|
|
3803
3956
|
args: [{
|
|
3804
3957
|
selector: 'ui-multi-select',
|
|
3805
3958
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3806
|
-
imports: [NgClass, NgStyle, SmzInputTextDirective],
|
|
3959
|
+
imports: [NgClass, NgStyle, NgTemplateOutlet, SmzInputTextDirective],
|
|
3807
3960
|
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzMultiSelectComponent), multi: true }],
|
|
3808
3961
|
host: { class: 'block min-w-0' },
|
|
3809
3962
|
template: `
|
|
@@ -3822,7 +3975,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3822
3975
|
(keydown)="onKeydown($event)"
|
|
3823
3976
|
(blur)="onBlur()"
|
|
3824
3977
|
>
|
|
3825
|
-
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="selectedOptions().length === 0">
|
|
3978
|
+
<span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="selectedOptions().length === 0">
|
|
3979
|
+
@if (selectedOptions().length > 0 && selectedItemsTemplate(); as tpl) {
|
|
3980
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: selectedValues(), options: selectedOptions() }" />
|
|
3981
|
+
} @else {
|
|
3982
|
+
{{ displayLabel() }}
|
|
3983
|
+
}
|
|
3984
|
+
</span>
|
|
3826
3985
|
@if (showClear() && selectedOptions().length > 0 && !isDisabled()) {
|
|
3827
3986
|
<span
|
|
3828
3987
|
role="button"
|
|
@@ -3892,7 +4051,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3892
4051
|
<path d="M3 8.5l3.2 3L13 4.5" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" />
|
|
3893
4052
|
</svg>
|
|
3894
4053
|
</span>
|
|
3895
|
-
<span class="min-w-0 flex-1 truncate">
|
|
4054
|
+
<span class="min-w-0 flex-1 truncate">
|
|
4055
|
+
@if (itemTemplate(); as tpl) {
|
|
4056
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: option, index: index }" />
|
|
4057
|
+
} @else {
|
|
4058
|
+
{{ labelOf(option) }}
|
|
4059
|
+
}
|
|
4060
|
+
</span>
|
|
3896
4061
|
</li>
|
|
3897
4062
|
}
|
|
3898
4063
|
@empty {
|
|
@@ -3903,7 +4068,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3903
4068
|
</ng-template>
|
|
3904
4069
|
`,
|
|
3905
4070
|
}]
|
|
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 }] }] } });
|
|
4071
|
+
}], 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
4072
|
|
|
3908
4073
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-unsafe-return, max-len */
|
|
3909
4074
|
/* 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 +4613,7 @@ class SmzInputNumberComponent extends SmzValueAccessor {
|
|
|
4448
4613
|
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
4449
4614
|
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
4450
4615
|
inputId = input('', ...(ngDevMode ? [{ debugName: "inputId" }] : []));
|
|
4616
|
+
name = input('', ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
4451
4617
|
inputed = output();
|
|
4452
4618
|
keyDown = output();
|
|
4453
4619
|
blurred = output();
|
|
@@ -4584,7 +4750,7 @@ class SmzInputNumberComponent extends SmzValueAccessor {
|
|
|
4584
4750
|
return value;
|
|
4585
4751
|
}
|
|
4586
4752
|
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: `
|
|
4753
|
+
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
4754
|
<div class="relative flex w-full items-stretch">
|
|
4589
4755
|
<input
|
|
4590
4756
|
#field
|
|
@@ -4594,6 +4760,7 @@ class SmzInputNumberComponent extends SmzValueAccessor {
|
|
|
4594
4760
|
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
4761
|
[class.pr-14]="showButtons()"
|
|
4596
4762
|
[attr.id]="inputId() || null"
|
|
4763
|
+
[attr.name]="name() || null"
|
|
4597
4764
|
[attr.placeholder]="placeholder() || null"
|
|
4598
4765
|
[attr.aria-valuemin]="min()"
|
|
4599
4766
|
[attr.aria-valuemax]="max()"
|
|
@@ -4651,6 +4818,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
4651
4818
|
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
4819
|
[class.pr-14]="showButtons()"
|
|
4653
4820
|
[attr.id]="inputId() || null"
|
|
4821
|
+
[attr.name]="name() || null"
|
|
4654
4822
|
[attr.placeholder]="placeholder() || null"
|
|
4655
4823
|
[attr.aria-valuemin]="min()"
|
|
4656
4824
|
[attr.aria-valuemax]="max()"
|
|
@@ -4691,7 +4859,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
4691
4859
|
</div>
|
|
4692
4860
|
`,
|
|
4693
4861
|
}]
|
|
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 }] }] } });
|
|
4862
|
+
}], 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
4863
|
|
|
4696
4864
|
const pad = (value, length = 2) => String(value).padStart(length, '0');
|
|
4697
4865
|
const escapeRegExp = (text) => text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
@@ -5816,6 +5984,7 @@ class SmzInputMaskComponent extends SmzValueAccessor {
|
|
|
5816
5984
|
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
5817
5985
|
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
5818
5986
|
inputId = input('', ...(ngDevMode ? [{ debugName: "inputId" }] : []));
|
|
5987
|
+
name = input('', ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
5819
5988
|
/** Tipo do `<input>` nativo (`text`, `tel`, `password`...). */
|
|
5820
5989
|
type = input('text', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
5821
5990
|
inputed = output();
|
|
@@ -5865,9 +6034,13 @@ class SmzInputMaskComponent extends SmzValueAccessor {
|
|
|
5865
6034
|
}
|
|
5866
6035
|
return text;
|
|
5867
6036
|
}, ...(ngDevMode ? [{ debugName: "display" }] : []));
|
|
6037
|
+
/**
|
|
6038
|
+
* Aceita `number` alem de `string` (ex.: `FormControl` com `5`): o valor e convertido para texto antes de distribuir
|
|
6039
|
+
* nos slots, senao `text.length` e `undefined` e o campo abre vazio.
|
|
6040
|
+
*/
|
|
5868
6041
|
writeValue(value) {
|
|
5869
|
-
super.writeValue(value);
|
|
5870
|
-
this.entered.set(this.fitToSlots(value
|
|
6042
|
+
super.writeValue(value === null || value === undefined ? null : String(value));
|
|
6043
|
+
this.entered.set(this.fitToSlots(value === null || value === undefined ? '' : String(value)));
|
|
5871
6044
|
}
|
|
5872
6045
|
onFocus() {
|
|
5873
6046
|
this.focusedState.set(true);
|
|
@@ -5970,21 +6143,22 @@ class SmzInputMaskComponent extends SmzValueAccessor {
|
|
|
5970
6143
|
this.field().nativeElement.setSelectionRange(position, position);
|
|
5971
6144
|
}
|
|
5972
6145
|
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
|
-
|
|
6146
|
+
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: `
|
|
6147
|
+
<input
|
|
6148
|
+
#field
|
|
6149
|
+
[attr.type]="type()"
|
|
6150
|
+
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"
|
|
6151
|
+
[attr.id]="inputId() || null"
|
|
6152
|
+
[attr.name]="name() || null"
|
|
6153
|
+
[attr.placeholder]="placeholder() || null"
|
|
6154
|
+
[disabled]="isDisabled()"
|
|
6155
|
+
[readOnly]="readonly()"
|
|
6156
|
+
[value]="display()"
|
|
6157
|
+
(focus)="onFocus()"
|
|
6158
|
+
(input)="onInput($event)"
|
|
6159
|
+
(keydown)="onKeydown($event)"
|
|
6160
|
+
(blur)="onBlur($event)"
|
|
6161
|
+
/>
|
|
5988
6162
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5989
6163
|
}
|
|
5990
6164
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzInputMaskComponent, decorators: [{
|
|
@@ -5994,24 +6168,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
5994
6168
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5995
6169
|
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzInputMaskComponent), multi: true }],
|
|
5996
6170
|
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
|
-
|
|
6171
|
+
template: `
|
|
6172
|
+
<input
|
|
6173
|
+
#field
|
|
6174
|
+
[attr.type]="type()"
|
|
6175
|
+
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"
|
|
6176
|
+
[attr.id]="inputId() || null"
|
|
6177
|
+
[attr.name]="name() || null"
|
|
6178
|
+
[attr.placeholder]="placeholder() || null"
|
|
6179
|
+
[disabled]="isDisabled()"
|
|
6180
|
+
[readOnly]="readonly()"
|
|
6181
|
+
[value]="display()"
|
|
6182
|
+
(focus)="onFocus()"
|
|
6183
|
+
(input)="onInput($event)"
|
|
6184
|
+
(keydown)="onKeydown($event)"
|
|
6185
|
+
(blur)="onBlur($event)"
|
|
6186
|
+
/>
|
|
6012
6187
|
`,
|
|
6013
6188
|
}]
|
|
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 }] }] } });
|
|
6189
|
+
}], 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
6190
|
|
|
6016
6191
|
/* eslint-disable max-len -- classes Tailwind nos templates */
|
|
6017
6192
|
const DEFAULT_MEDIUM = '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})';
|
|
@@ -6484,6 +6659,11 @@ class SmzUiTimelineComponent {
|
|
|
6484
6659
|
contentTemplate = computed(() => smzFindTemplate(this.templates(), 'content'), ...(ngDevMode ? [{ debugName: "contentTemplate" }] : []));
|
|
6485
6660
|
oppositeTemplate = computed(() => smzFindTemplate(this.templates(), 'opposite'), ...(ngDevMode ? [{ debugName: "oppositeTemplate" }] : []));
|
|
6486
6661
|
horizontal = computed(() => this.layout() === 'horizontal' || this.align() === 'top' || this.align() === 'bottom', ...(ngDevMode ? [{ debugName: "horizontal" }] : []));
|
|
6662
|
+
/** No layout horizontal, o conteudo fica acima da linha em `top` e nos itens impares de `alternate`/`right`. */
|
|
6663
|
+
contentOnTop(index) {
|
|
6664
|
+
const align = this.align();
|
|
6665
|
+
return align === 'top' || align === 'right' || (align === 'alternate' && index % 2 === 1);
|
|
6666
|
+
}
|
|
6487
6667
|
rowReverse(index) {
|
|
6488
6668
|
const align = this.align();
|
|
6489
6669
|
return align === 'right' || (align === 'alternate' && index % 2 === 1);
|
|
@@ -6500,7 +6680,45 @@ class SmzUiTimelineComponent {
|
|
|
6500
6680
|
}
|
|
6501
6681
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzUiTimelineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6502
6682
|
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
|
-
|
|
6683
|
+
@if (horizontal()) {
|
|
6684
|
+
<!-- Nao usar a classe grid do Tailwind: o CSS legado do core (.grid, PrimeFlex) a sobrescreve com display:flex !important.
|
|
6685
|
+
Grade de 3 linhas (conteudo de cima / marcadores / conteudo de baixo) com subgrade por item: todos os marcadores ficam na mesma linha. -->
|
|
6686
|
+
<div style="display: grid; grid-template-rows: auto auto auto" [style.grid-template-columns]="'repeat(' + (value() ?? []).length + ', minmax(0, 1fr))'" [ngClass]="styleClass()">
|
|
6687
|
+
@for (event of value() ?? []; track $index; let index = $index; let first = $first; let last = $last) {
|
|
6688
|
+
<div class="tl-item min-w-0" style="display: grid; grid-row: span 3; grid-template-rows: subgrid">
|
|
6689
|
+
<div class="flex min-w-0 flex-col justify-end px-2 pb-2 text-center" style="grid-row: 1">
|
|
6690
|
+
@if (contentOnTop(index)) {
|
|
6691
|
+
@if (contentTemplate(); as content) {
|
|
6692
|
+
<ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6693
|
+
}
|
|
6694
|
+
} @else if (oppositeTemplate(); as opposite) {
|
|
6695
|
+
<ng-container [ngTemplateOutlet]="opposite" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6696
|
+
}
|
|
6697
|
+
</div>
|
|
6698
|
+
<div class="flex items-center" style="grid-row: 2">
|
|
6699
|
+
<span class="h-0.5 flex-1" [class]="first ? 'bg-transparent' : 'bg-ui-line'"></span>
|
|
6700
|
+
@if (markerTemplate(); as marker) {
|
|
6701
|
+
<ng-container [ngTemplateOutlet]="marker" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6702
|
+
}
|
|
6703
|
+
@else {
|
|
6704
|
+
<span class="block h-4 w-4 shrink-0 rounded-full border-2 border-ui-primary bg-ui-surface-1"></span>
|
|
6705
|
+
}
|
|
6706
|
+
<span class="h-0.5 flex-1" [class]="last ? 'bg-transparent' : 'bg-ui-line'"></span>
|
|
6707
|
+
</div>
|
|
6708
|
+
<div class="flex min-w-0 flex-col px-2 pt-2 text-center" style="grid-row: 3">
|
|
6709
|
+
@if (!contentOnTop(index)) {
|
|
6710
|
+
@if (contentTemplate(); as content) {
|
|
6711
|
+
<ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6712
|
+
}
|
|
6713
|
+
} @else if (oppositeTemplate(); as opposite) {
|
|
6714
|
+
<ng-container [ngTemplateOutlet]="opposite" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6715
|
+
}
|
|
6716
|
+
</div>
|
|
6717
|
+
</div>
|
|
6718
|
+
}
|
|
6719
|
+
</div>
|
|
6720
|
+
} @else {
|
|
6721
|
+
<div class="flex flex-col" [ngClass]="styleClass()">
|
|
6504
6722
|
@for (event of value() ?? []; track $index; let index = $index; let last = $last) {
|
|
6505
6723
|
<div class="flex min-w-0 flex-1" [class]="horizontal() ? 'flex-col' : (rowReverse(index) ? 'flex-row-reverse' : 'flex-row')">
|
|
6506
6724
|
<div class="flex-1" [class]="oppositeClass(index)">
|
|
@@ -6527,6 +6745,7 @@ class SmzUiTimelineComponent {
|
|
|
6527
6745
|
</div>
|
|
6528
6746
|
}
|
|
6529
6747
|
</div>
|
|
6748
|
+
}
|
|
6530
6749
|
`, 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
6750
|
}
|
|
6532
6751
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzUiTimelineComponent, decorators: [{
|
|
@@ -6537,7 +6756,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
6537
6756
|
imports: [NgClass, NgTemplateOutlet],
|
|
6538
6757
|
host: { class: 'block font-ui text-ui-fg' },
|
|
6539
6758
|
template: `
|
|
6540
|
-
|
|
6759
|
+
@if (horizontal()) {
|
|
6760
|
+
<!-- Nao usar a classe grid do Tailwind: o CSS legado do core (.grid, PrimeFlex) a sobrescreve com display:flex !important.
|
|
6761
|
+
Grade de 3 linhas (conteudo de cima / marcadores / conteudo de baixo) com subgrade por item: todos os marcadores ficam na mesma linha. -->
|
|
6762
|
+
<div style="display: grid; grid-template-rows: auto auto auto" [style.grid-template-columns]="'repeat(' + (value() ?? []).length + ', minmax(0, 1fr))'" [ngClass]="styleClass()">
|
|
6763
|
+
@for (event of value() ?? []; track $index; let index = $index; let first = $first; let last = $last) {
|
|
6764
|
+
<div class="tl-item min-w-0" style="display: grid; grid-row: span 3; grid-template-rows: subgrid">
|
|
6765
|
+
<div class="flex min-w-0 flex-col justify-end px-2 pb-2 text-center" style="grid-row: 1">
|
|
6766
|
+
@if (contentOnTop(index)) {
|
|
6767
|
+
@if (contentTemplate(); as content) {
|
|
6768
|
+
<ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6769
|
+
}
|
|
6770
|
+
} @else if (oppositeTemplate(); as opposite) {
|
|
6771
|
+
<ng-container [ngTemplateOutlet]="opposite" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6772
|
+
}
|
|
6773
|
+
</div>
|
|
6774
|
+
<div class="flex items-center" style="grid-row: 2">
|
|
6775
|
+
<span class="h-0.5 flex-1" [class]="first ? 'bg-transparent' : 'bg-ui-line'"></span>
|
|
6776
|
+
@if (markerTemplate(); as marker) {
|
|
6777
|
+
<ng-container [ngTemplateOutlet]="marker" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6778
|
+
}
|
|
6779
|
+
@else {
|
|
6780
|
+
<span class="block h-4 w-4 shrink-0 rounded-full border-2 border-ui-primary bg-ui-surface-1"></span>
|
|
6781
|
+
}
|
|
6782
|
+
<span class="h-0.5 flex-1" [class]="last ? 'bg-transparent' : 'bg-ui-line'"></span>
|
|
6783
|
+
</div>
|
|
6784
|
+
<div class="flex min-w-0 flex-col px-2 pt-2 text-center" style="grid-row: 3">
|
|
6785
|
+
@if (!contentOnTop(index)) {
|
|
6786
|
+
@if (contentTemplate(); as content) {
|
|
6787
|
+
<ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6788
|
+
}
|
|
6789
|
+
} @else if (oppositeTemplate(); as opposite) {
|
|
6790
|
+
<ng-container [ngTemplateOutlet]="opposite" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
|
|
6791
|
+
}
|
|
6792
|
+
</div>
|
|
6793
|
+
</div>
|
|
6794
|
+
}
|
|
6795
|
+
</div>
|
|
6796
|
+
} @else {
|
|
6797
|
+
<div class="flex flex-col" [ngClass]="styleClass()">
|
|
6541
6798
|
@for (event of value() ?? []; track $index; let index = $index; let last = $last) {
|
|
6542
6799
|
<div class="flex min-w-0 flex-1" [class]="horizontal() ? 'flex-col' : (rowReverse(index) ? 'flex-row-reverse' : 'flex-row')">
|
|
6543
6800
|
<div class="flex-1" [class]="oppositeClass(index)">
|
|
@@ -6564,6 +6821,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
6564
6821
|
</div>
|
|
6565
6822
|
}
|
|
6566
6823
|
</div>
|
|
6824
|
+
}
|
|
6567
6825
|
`,
|
|
6568
6826
|
}]
|
|
6569
6827
|
}], 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 +8486,11 @@ class SmzPanelComponent {
|
|
|
8228
8486
|
header = input('', ...(ngDevMode ? [{ debugName: "header" }] : []));
|
|
8229
8487
|
toggleable = input(false, { ...(ngDevMode ? { debugName: "toggleable" } : {}), transform: booleanAttribute });
|
|
8230
8488
|
collapsed = model(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
|
|
8489
|
+
/**
|
|
8490
|
+
* O que alterna o painel: `icon` (padrao; so o botao) ou `header` (o cabecalho inteiro, exceto elementos
|
|
8491
|
+
* interativos dentro dele, como botoes do template `icons`). Equivale ao `toggler` do `p-panel`.
|
|
8492
|
+
*/
|
|
8493
|
+
toggler = input('icon', ...(ngDevMode ? [{ debugName: "toggler" }] : []));
|
|
8231
8494
|
/** Antes de alternar (cancelavel nao: apenas notifica). */
|
|
8232
8495
|
beforeToggle = output();
|
|
8233
8496
|
afterToggle = output();
|
|
@@ -8236,6 +8499,28 @@ class SmzPanelComponent {
|
|
|
8236
8499
|
iconsTemplate = computed(() => smzFindTemplate(this.templates(), 'icons'), ...(ngDevMode ? [{ debugName: "iconsTemplate" }] : []));
|
|
8237
8500
|
footerTemplate = computed(() => smzFindTemplate(this.templates(), 'footer'), ...(ngDevMode ? [{ debugName: "footerTemplate" }] : []));
|
|
8238
8501
|
hasHeader = computed(() => !!this.header() || !!this.headerTemplate() || this.toggleable(), ...(ngDevMode ? [{ debugName: "hasHeader" }] : []));
|
|
8502
|
+
headerToggles = computed(() => this.toggleable() && this.toggler() === 'header', ...(ngDevMode ? [{ debugName: "headerToggles" }] : []));
|
|
8503
|
+
onIconClick(event) {
|
|
8504
|
+
// No modo `header` o clique no botao sobe ate o cabecalho, que ja alterna.
|
|
8505
|
+
if (!this.headerToggles())
|
|
8506
|
+
this.toggle(event);
|
|
8507
|
+
}
|
|
8508
|
+
onHeaderClick(event) {
|
|
8509
|
+
if (!this.headerToggles())
|
|
8510
|
+
return;
|
|
8511
|
+
const target = event.target;
|
|
8512
|
+
const interactive = target.closest('button, a, input, select, textarea, label, [role="button"], [role="menuitem"]');
|
|
8513
|
+
// Ignora controles do template `icons`; o botao-seta do proprio painel (e o cabecalho) alternam.
|
|
8514
|
+
if (interactive && !interactive.classList.contains('p-panel-header') && !interactive.hasAttribute('data-panel-toggle'))
|
|
8515
|
+
return;
|
|
8516
|
+
this.toggle(event);
|
|
8517
|
+
}
|
|
8518
|
+
onHeaderKey(event) {
|
|
8519
|
+
if (!this.headerToggles() || event.target !== event.currentTarget)
|
|
8520
|
+
return;
|
|
8521
|
+
event.preventDefault();
|
|
8522
|
+
this.toggle(event);
|
|
8523
|
+
}
|
|
8239
8524
|
toggle(event) {
|
|
8240
8525
|
const next = !this.collapsed();
|
|
8241
8526
|
this.beforeToggle.emit({ originalEvent: event, collapsed: next });
|
|
@@ -8243,16 +8528,25 @@ class SmzPanelComponent {
|
|
|
8243
8528
|
this.afterToggle.emit({ originalEvent: event, collapsed: next });
|
|
8244
8529
|
}
|
|
8245
8530
|
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: `
|
|
8531
|
+
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
8532
|
@if (hasHeader()) {
|
|
8248
|
-
<div
|
|
8533
|
+
<div
|
|
8534
|
+
class="p-panel-header flex items-center justify-between gap-2 border-b border-ui-line bg-ui-surface-1 px-4 py-3"
|
|
8535
|
+
[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' : ''"
|
|
8536
|
+
[attr.role]="headerToggles() ? 'button' : null"
|
|
8537
|
+
[attr.tabindex]="headerToggles() ? 0 : null"
|
|
8538
|
+
[attr.aria-expanded]="headerToggles() ? !collapsed() : null"
|
|
8539
|
+
(click)="onHeaderClick($event)"
|
|
8540
|
+
(keydown.enter)="onHeaderKey($event)"
|
|
8541
|
+
(keydown.space)="onHeaderKey($event)"
|
|
8542
|
+
>
|
|
8249
8543
|
<div class="min-w-0 flex-1 font-semibold">
|
|
8250
8544
|
@if (headerTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> } @else { {{ header() }} }
|
|
8251
8545
|
</div>
|
|
8252
8546
|
<div class="flex items-center gap-1">
|
|
8253
8547
|
@if (iconsTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> }
|
|
8254
8548
|
@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)="
|
|
8549
|
+
<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
8550
|
<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
8551
|
</button>
|
|
8258
8552
|
}
|
|
@@ -8276,14 +8570,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
8276
8570
|
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
8571
|
template: `
|
|
8278
8572
|
@if (hasHeader()) {
|
|
8279
|
-
<div
|
|
8573
|
+
<div
|
|
8574
|
+
class="p-panel-header flex items-center justify-between gap-2 border-b border-ui-line bg-ui-surface-1 px-4 py-3"
|
|
8575
|
+
[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' : ''"
|
|
8576
|
+
[attr.role]="headerToggles() ? 'button' : null"
|
|
8577
|
+
[attr.tabindex]="headerToggles() ? 0 : null"
|
|
8578
|
+
[attr.aria-expanded]="headerToggles() ? !collapsed() : null"
|
|
8579
|
+
(click)="onHeaderClick($event)"
|
|
8580
|
+
(keydown.enter)="onHeaderKey($event)"
|
|
8581
|
+
(keydown.space)="onHeaderKey($event)"
|
|
8582
|
+
>
|
|
8280
8583
|
<div class="min-w-0 flex-1 font-semibold">
|
|
8281
8584
|
@if (headerTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> } @else { {{ header() }} }
|
|
8282
8585
|
</div>
|
|
8283
8586
|
<div class="flex items-center gap-1">
|
|
8284
8587
|
@if (iconsTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> }
|
|
8285
8588
|
@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)="
|
|
8589
|
+
<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
8590
|
<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
8591
|
</button>
|
|
8289
8592
|
}
|
|
@@ -8298,7 +8601,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
8298
8601
|
}
|
|
8299
8602
|
`,
|
|
8300
8603
|
}]
|
|
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 }] }] } });
|
|
8604
|
+
}], 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
8605
|
|
|
8303
8606
|
/* eslint-disable max-len -- classes Tailwind nos templates */
|
|
8304
8607
|
/**
|
|
@@ -8533,7 +8836,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
8533
8836
|
const ROW_BASE = 'border-b border-ui-line transition-colors duration-ui';
|
|
8534
8837
|
/**
|
|
8535
8838
|
* Tabela em arvore. Substitui o `p-treeTable` do PrimeNG.
|
|
8536
|
-
* Os templates `header`, `body`, `caption`, `footer`, `emptymessage` e `summary` usam `smzTemplate`;
|
|
8839
|
+
* Os templates `colgroup`, `header`, `body`, `caption`, `footer`, `emptymessage` e `summary` usam `smzTemplate`;
|
|
8537
8840
|
* o `body` recebe `let-rowNode let-rowData="rowData" let-columns="columns"`.
|
|
8538
8841
|
*
|
|
8539
8842
|
* <ui-tree-table [value]="nodes" [columns]="cols" selectionMode="checkbox" [(selection)]="sel">
|
|
@@ -8577,6 +8880,8 @@ class SmzTreeTableComponent {
|
|
|
8577
8880
|
page = output();
|
|
8578
8881
|
templates = contentChildren(SmzTemplateDirective, ...(ngDevMode ? [{ debugName: "templates" }] : []));
|
|
8579
8882
|
headerTemplate = computed(() => smzFindTemplate(this.templates(), 'header'), ...(ngDevMode ? [{ debugName: "headerTemplate" }] : []));
|
|
8883
|
+
/** `<colgroup>` com as larguras das colunas (como no `p-treeTable`); quando existe, a tabela usa `table-layout: fixed`. */
|
|
8884
|
+
colgroupTemplate = computed(() => smzFindTemplate(this.templates(), 'colgroup'), ...(ngDevMode ? [{ debugName: "colgroupTemplate" }] : []));
|
|
8580
8885
|
bodyTemplate = computed(() => smzFindTemplate(this.templates(), 'body'), ...(ngDevMode ? [{ debugName: "bodyTemplate" }] : []));
|
|
8581
8886
|
captionTemplate = computed(() => smzFindTemplate(this.templates(), 'caption'), ...(ngDevMode ? [{ debugName: "captionTemplate" }] : []));
|
|
8582
8887
|
footerTemplate = computed(() => smzFindTemplate(this.templates(), 'footer'), ...(ngDevMode ? [{ debugName: "footerTemplate" }] : []));
|
|
@@ -8798,7 +9103,10 @@ class SmzTreeTableComponent {
|
|
|
8798
9103
|
<div class="border-b border-ui-line px-4 py-3"><ng-container [ngTemplateOutlet]="tpl" /></div>
|
|
8799
9104
|
}
|
|
8800
9105
|
<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() ?? ''">
|
|
9106
|
+
<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() ?? '')">
|
|
9107
|
+
@if (colgroupTemplate(); as tpl) {
|
|
9108
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" />
|
|
9109
|
+
}
|
|
8802
9110
|
<thead>
|
|
8803
9111
|
@if (headerTemplate(); as tpl) {
|
|
8804
9112
|
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" />
|
|
@@ -8847,7 +9155,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
8847
9155
|
<div class="border-b border-ui-line px-4 py-3"><ng-container [ngTemplateOutlet]="tpl" /></div>
|
|
8848
9156
|
}
|
|
8849
9157
|
<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() ?? ''">
|
|
9158
|
+
<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() ?? '')">
|
|
9159
|
+
@if (colgroupTemplate(); as tpl) {
|
|
9160
|
+
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" />
|
|
9161
|
+
}
|
|
8851
9162
|
<thead>
|
|
8852
9163
|
@if (headerTemplate(); as tpl) {
|
|
8853
9164
|
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" />
|
|
@@ -9007,17 +9318,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
9007
9318
|
class SmzTreeTableSortableColumnDirective {
|
|
9008
9319
|
table = inject(SmzTreeTableComponent);
|
|
9009
9320
|
field = input.required({ ...(ngDevMode ? { debugName: "field" } : {}), alias: 'smzTtSortableColumn' });
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
}
|
|
9321
|
+
/** Coluna ordenada agora (inclui o `sortField`/`sortOrder` iniciais da tabela, sem precisar de clique). */
|
|
9322
|
+
sorted = computed(() => this.table.sortField() === this.field(), ...(ngDevMode ? [{ debugName: "sorted" }] : []));
|
|
9323
|
+
classes = computed(() => 'cursor-pointer select-none ' + (this.sorted() ? 'bg-ui-primary/10 text-ui-primary' : ''), ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
9324
|
+
ariaSort = computed(() => (this.sorted() ? (this.table.sortOrder() === 1 ? 'ascending' : 'descending') : 'none'), ...(ngDevMode ? [{ debugName: "ariaSort" }] : []));
|
|
9013
9325
|
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: { "
|
|
9326
|
+
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
9327
|
}
|
|
9016
9328
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableSortableColumnDirective, decorators: [{
|
|
9017
9329
|
type: Directive,
|
|
9018
9330
|
args: [{
|
|
9019
9331
|
selector: 'th[smzTtSortableColumn]',
|
|
9020
|
-
host: {
|
|
9332
|
+
host: {
|
|
9333
|
+
'[class]': 'classes()',
|
|
9334
|
+
'[class.p-highlight]': 'sorted()',
|
|
9335
|
+
'(click)': 'table.sortBy(field())',
|
|
9336
|
+
'[attr.aria-sort]': 'ariaSort()',
|
|
9337
|
+
},
|
|
9021
9338
|
}]
|
|
9022
9339
|
}], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "smzTtSortableColumn", required: true }] }] } });
|
|
9023
9340
|
class SmzTreeTableSortIconComponent {
|
|
@@ -9027,10 +9344,10 @@ class SmzTreeTableSortIconComponent {
|
|
|
9027
9344
|
return this.table.sortField() === this.field() ? this.table.sortOrder() : 0;
|
|
9028
9345
|
}
|
|
9029
9346
|
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: `
|
|
9347
|
+
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
9348
|
<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" />
|
|
9349
|
+
<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" />
|
|
9350
|
+
<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
9351
|
</svg>
|
|
9035
9352
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9036
9353
|
}
|
|
@@ -9039,11 +9356,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
9039
9356
|
args: [{
|
|
9040
9357
|
selector: 'ui-tree-table-sort-icon',
|
|
9041
9358
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9042
|
-
host: { class: 'ml-1 inline-flex align-middle text-ui-fg-muted' },
|
|
9359
|
+
host: { class: 'ml-1 inline-flex align-middle text-ui-fg-muted', '[attr.data-sort-dir]': 'dir()' },
|
|
9043
9360
|
template: `
|
|
9044
9361
|
<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" />
|
|
9362
|
+
<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" />
|
|
9363
|
+
<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
9364
|
</svg>
|
|
9048
9365
|
`,
|
|
9049
9366
|
}]
|