@ngx-smz/ui-kit 21.9.0-next.1 → 21.9.0-next.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, input, booleanAttribute, computed, Directive, inject, TemplateRef, HostAttributeToken, ChangeDetectionStrategy, Component, ElementRef, output, forwardRef, Injector, DestroyRef, afterNextRender, Renderer2, effect, InjectionToken, viewChild, ViewContainerRef, Injectable, model, contentChildren, contentChild } from '@angular/core';
2
+ import { signal, input, booleanAttribute, computed, Directive, inject, TemplateRef, HostAttributeToken, ChangeDetectionStrategy, Component, ElementRef, afterEveryRender, output, forwardRef, Injector, DestroyRef, afterNextRender, Renderer2, effect, InjectionToken, viewChild, ViewContainerRef, Injectable, model, contentChildren, contentChild } from '@angular/core';
3
3
  import { Overlay } from '@angular/cdk/overlay';
4
4
  import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
5
5
  import * as i1 from '@angular/forms';
@@ -295,6 +295,9 @@ const buttonClasses = smzVariants({
295
295
  },
296
296
  defaults: { size: 'md', variant: 'solid', severity: 'primary', rounded: 'false', loading: 'false', iconOnly: 'false' },
297
297
  compound: [
298
+ { when: { iconOnly: 'true', size: 'sm' }, class: 'w-[var(--smz-control-h-sm)]' },
299
+ { when: { iconOnly: 'true', size: 'md' }, class: 'w-[var(--smz-control-h)]' },
300
+ { when: { iconOnly: 'true', size: 'lg' }, class: 'w-[var(--smz-control-h-lg)]' },
298
301
  { when: { variant: 'solid', severity: 'primary' }, class: 'bg-ui-primary text-ui-on-primary hover:bg-ui-primary-hover active:bg-ui-primary-active' },
299
302
  { when: { variant: 'solid', severity: 'secondary' }, class: 'bg-ui-surface-3 text-ui-fg hover:bg-ui-line active:bg-ui-line-strong' },
300
303
  { when: { variant: 'solid', severity: 'danger' }, class: 'bg-ui-danger text-ui-on-danger hover:bg-ui-danger-hover active:bg-ui-danger-active' },
@@ -606,22 +609,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
606
609
  }] });
607
610
 
608
611
  const base = 'w-full border bg-ui-surface-1 font-ui text-ui-fg placeholder:text-ui-fg-subtle transition-colors duration-ui ' +
609
- 'focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger';
612
+ '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';
610
613
  const invalidVariant = { true: 'border-ui-danger', false: 'border-ui-line-strong' };
611
614
  const inputClasses = smzVariants({
612
615
  base: `${base} rounded-control`,
613
616
  variants: {
614
617
  size: {
615
- sm: 'h-control-sm px-control-x-sm text-ui-sm',
616
- md: 'h-control px-control-x text-ui-md',
617
- lg: 'h-control-lg px-control-x-lg text-ui-lg',
618
+ sm: 'h-control-sm px-input-x-sm text-ui-sm',
619
+ md: 'h-control px-input-x text-ui-md',
620
+ lg: 'h-control-lg px-input-x-lg text-ui-lg',
618
621
  },
619
622
  invalid: invalidVariant,
620
623
  },
621
624
  defaults: { size: 'md', invalid: 'false' },
622
625
  });
623
626
  const textareaClasses = smzVariants({
624
- base: `${base} min-h-control rounded-control px-control-x py-2 text-ui-md`,
627
+ base: `${base} min-h-control rounded-control px-input-x py-2 text-ui-md`,
625
628
  variants: { invalid: invalidVariant },
626
629
  defaults: { invalid: 'false' },
627
630
  });
@@ -644,18 +647,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
644
647
  /** Area de texto. Substitui o `pTextarea` / `pInputTextarea` do PrimeNG. */
645
648
  class SmzTextareaDirective {
646
649
  invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : {}), transform: booleanAttribute });
650
+ /** Cresce com o conteudo (equivale ao `autoResize` do `pTextarea`). */
651
+ autoResize = input(false, { ...(ngDevMode ? { debugName: "autoResize" } : {}), transform: booleanAttribute });
652
+ el = inject(ElementRef);
653
+ constructor() {
654
+ afterEveryRender(() => this.resize());
655
+ }
656
+ resize() {
657
+ if (!this.autoResize())
658
+ return;
659
+ const textarea = this.el.nativeElement;
660
+ textarea.style.overflow = 'hidden';
661
+ textarea.style.height = 'auto';
662
+ textarea.style.height = `${textarea.scrollHeight}px`;
663
+ }
647
664
  staticClass = smzStaticHostClass();
648
665
  classes = computed(() => smzMergeClasses(textareaClasses({ invalid: String(this.invalid()) }), this.staticClass), ...(ngDevMode ? [{ debugName: "classes" }] : []));
649
666
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTextareaDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
650
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.1", type: SmzTextareaDirective, isStandalone: true, selector: "textarea[smzTextarea]", inputs: { invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.aria-invalid": "invalid() || null" } }, ngImport: i0 });
667
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.1", type: SmzTextareaDirective, isStandalone: true, selector: "textarea[smzTextarea]", inputs: { invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, autoResize: { classPropertyName: "autoResize", publicName: "autoResize", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "resize()" }, properties: { "class": "classes()", "attr.aria-invalid": "invalid() || null" } }, ngImport: i0 });
651
668
  }
652
669
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTextareaDirective, decorators: [{
653
670
  type: Directive,
654
671
  args: [{
655
672
  selector: 'textarea[smzTextarea]',
656
- host: { '[class]': 'classes()', '[attr.aria-invalid]': 'invalid() || null' },
673
+ host: { '[class]': 'classes()', '[attr.aria-invalid]': 'invalid() || null', '(input)': 'resize()' },
657
674
  }]
658
- }], propDecorators: { invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }] } });
675
+ }], ctorParameters: () => [], propDecorators: { invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], autoResize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoResize", required: false }] }] } });
659
676
 
660
677
  /**
661
678
  * Checkbox do ui-kit. Substitui o `p-checkbox` do PrimeNG.
@@ -665,6 +682,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
665
682
  */
666
683
  class SmzCheckboxComponent extends SmzValueAccessor {
667
684
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
685
+ inputId = input('', ...(ngDevMode ? [{ debugName: "inputId" }] : []));
668
686
  /** Valor deste item quando o modelo e um array (modo grupo). */
669
687
  value = input(undefined, ...(ngDevMode ? [{ debugName: "value" }] : []));
670
688
  /** Forca o modo booleano mesmo com `value` informado. Mantido por compatibilidade com o Prime. */
@@ -691,7 +709,7 @@ class SmzCheckboxComponent extends SmzValueAccessor {
691
709
  this.changed.emit({ checked: this.checked(), value: this.current() });
692
710
  }
693
711
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
694
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzCheckboxComponent, isStandalone: true, selector: "ui-checkbox", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, binary: { classPropertyName: "binary", publicName: "binary", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, host: { classAttribute: "inline-flex" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzCheckboxComponent), multi: true }], usesInheritance: true, ngImport: i0, template: `
712
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzCheckboxComponent, isStandalone: true, selector: "ui-checkbox", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, binary: { classPropertyName: "binary", publicName: "binary", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, host: { classAttribute: "inline-flex" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzCheckboxComponent), multi: true }], usesInheritance: true, ngImport: i0, template: `
695
713
  <label
696
714
  class="inline-flex items-center gap-2 font-ui text-ui-md text-ui-fg"
697
715
  [class]="isDisabled() ? 'cursor-not-allowed opacity-50' : 'cursor-pointer'"
@@ -699,6 +717,7 @@ class SmzCheckboxComponent extends SmzValueAccessor {
699
717
  <input
700
718
  type="checkbox"
701
719
  class="peer sr-only"
720
+ [attr.id]="inputId() || null"
702
721
  [name]="name()"
703
722
  [checked]="checked()"
704
723
  [disabled]="isDisabled()"
@@ -737,6 +756,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
737
756
  <input
738
757
  type="checkbox"
739
758
  class="peer sr-only"
759
+ [attr.id]="inputId() || null"
740
760
  [name]="name()"
741
761
  [checked]="checked()"
742
762
  [disabled]="isDisabled()"
@@ -760,7 +780,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
760
780
  </label>
761
781
  `,
762
782
  }]
763
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], binary: [{ type: i0.Input, args: [{ isSignal: true, alias: "binary", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }] } });
783
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], binary: [{ type: i0.Input, args: [{ isSignal: true, alias: "binary", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }] } });
764
784
 
765
785
  /**
766
786
  * Radio do ui-kit. Substitui o `p-radiobutton` do PrimeNG.
@@ -1687,6 +1707,44 @@ class SmzDialogRef {
1687
1707
  }
1688
1708
  }
1689
1709
 
1710
+ const KEYS = {
1711
+ width: 'width',
1712
+ height: 'height',
1713
+ minWidth: 'minWidth',
1714
+ 'min-width': 'minWidth',
1715
+ maxWidth: 'maxWidth',
1716
+ 'max-width': 'maxWidth',
1717
+ minHeight: 'minHeight',
1718
+ 'min-height': 'minHeight',
1719
+ maxHeight: 'maxHeight',
1720
+ 'max-height': 'maxHeight',
1721
+ };
1722
+ /**
1723
+ * Separa os estilos de tamanho (`width`, `height`, `min-*`, `max-*`) do resto do `style`.
1724
+ *
1725
+ * Porcentagens so significam "porcentagem da tela" quando aplicadas ao painel do overlay (cujo pai ocupa a viewport);
1726
+ * dentro do frame elas seriam relativas ao painel, que tem largura "shrink-to-fit" (ex.: 60% de 531px).
1727
+ * O painel recebe o tamanho; o frame passa a ocupar 100% dele.
1728
+ */
1729
+ function smzSplitDialogSize(style, extra) {
1730
+ const pane = { ...(extra ?? {}) };
1731
+ const rest = {};
1732
+ for (const [key, value] of Object.entries(style ?? {})) {
1733
+ if (value === null || value === undefined || value === '')
1734
+ continue;
1735
+ const target = KEYS[key];
1736
+ if (target)
1737
+ pane[target] = String(value);
1738
+ else
1739
+ rest[key] = value;
1740
+ }
1741
+ for (const key of Object.keys(pane)) {
1742
+ if (!pane[key])
1743
+ delete pane[key];
1744
+ }
1745
+ return { pane, rest };
1746
+ }
1747
+
1690
1748
  /* eslint-disable max-len -- classes Tailwind nos templates */
1691
1749
  /** Componente que sera criado dentro do dialog. */
1692
1750
  const SMZ_DIALOG_CONTENT = new InjectionToken('SMZ_DIALOG_CONTENT');
@@ -1694,6 +1752,8 @@ const SMZ_DIALOG_CONTENT = new InjectionToken('SMZ_DIALOG_CONTENT');
1694
1752
  class SmzDialogFrameComponent {
1695
1753
  config = inject(SmzDialogConfig);
1696
1754
  ref = inject(SmzDialogRef);
1755
+ /** Tamanho vai para o painel do overlay (ver `smzSplitDialogSize`); o frame ocupa 100% dele. */
1756
+ size = smzSplitDialogSize(this.config.style, { width: this.config.width, height: this.config.height });
1697
1757
  injector = inject(Injector);
1698
1758
  contentType = inject(SMZ_DIALOG_CONTENT);
1699
1759
  host = viewChild.required('content', { read: ViewContainerRef });
@@ -1703,16 +1763,16 @@ class SmzDialogFrameComponent {
1703
1763
  });
1704
1764
  }
1705
1765
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzDialogFrameComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1706
- 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: `
1766
+ 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: `
1707
1767
  <div
1708
1768
  role="dialog"
1709
1769
  aria-modal="true"
1710
1770
  [attr.aria-label]="config.header || null"
1711
1771
  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"
1712
1772
  [class]="config.styleClass ?? ''"
1713
- [style.width]="config.width ?? null"
1714
- [style.height]="config.height ?? null"
1715
- [ngStyle]="config.style"
1773
+ [style.width]="size.pane.width ? '100%' : null"
1774
+ [style.height]="size.pane.height ? '100%' : null"
1775
+ [ngStyle]="size.rest"
1716
1776
  >
1717
1777
  @if (config.showHeader !== false) {
1718
1778
  <div class="flex items-center justify-between gap-4 border-b border-ui-line px-4 py-3">
@@ -1743,7 +1803,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1743
1803
  selector: 'ui-dialog-frame',
1744
1804
  changeDetection: ChangeDetectionStrategy.OnPush,
1745
1805
  imports: [NgStyle],
1746
- host: { class: 'pointer-events-auto block' },
1806
+ // O painel do CDK e `display:flex`: o host e item flex e so ocupa o painel dimensionado se tiver largura/altura 100%.
1807
+ host: { class: 'pointer-events-auto block', '[class.w-full]': '!!size.pane.width', '[class.h-full]': '!!size.pane.height' },
1747
1808
  template: `
1748
1809
  <div
1749
1810
  role="dialog"
@@ -1751,9 +1812,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1751
1812
  [attr.aria-label]="config.header || null"
1752
1813
  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"
1753
1814
  [class]="config.styleClass ?? ''"
1754
- [style.width]="config.width ?? null"
1755
- [style.height]="config.height ?? null"
1756
- [ngStyle]="config.style"
1815
+ [style.width]="size.pane.width ? '100%' : null"
1816
+ [style.height]="size.pane.height ? '100%' : null"
1817
+ [ngStyle]="size.rest"
1757
1818
  >
1758
1819
  @if (config.showHeader !== false) {
1759
1820
  <div class="flex items-center justify-between gap-4 border-b border-ui-line px-4 py-3">
@@ -1794,10 +1855,14 @@ class SmzDialogService {
1794
1855
  const resolved = Object.assign(new SmzDialogConfig(), config);
1795
1856
  const ref = new SmzDialogRef();
1796
1857
  const modal = resolved.modal !== false;
1858
+ // Porcentagens (ex.: `width: '60%'`) sao relativas a viewport quando aplicadas ao painel do overlay.
1859
+ const pane = smzSplitDialogSize(resolved.style, { width: resolved.width, height: resolved.height }).pane;
1797
1860
  const overlayRef = this.overlay.create({
1798
1861
  hasBackdrop: modal,
1799
1862
  positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically(),
1800
1863
  scrollStrategy: this.overlay.scrollStrategies.block(),
1864
+ ...pane,
1865
+ maxWidth: pane.maxWidth ?? '95vw',
1801
1866
  });
1802
1867
  if (resolved.baseZIndex != null) {
1803
1868
  overlayRef.hostElement.style.zIndex = String(resolved.baseZIndex + 1);
@@ -1857,6 +1922,15 @@ class SmzDialogComponent {
1857
1922
  style = input(null, ...(ngDevMode ? [{ debugName: "style" }] : []));
1858
1923
  styleClass = input('', ...(ngDevMode ? [{ debugName: "styleClass" }] : []));
1859
1924
  baseZIndex = input(0, ...(ngDevMode ? [{ debugName: "baseZIndex" }] : []));
1925
+ /** Permite arrastar pelo cabecalho. */
1926
+ draggable = input(false, { ...(ngDevMode ? { debugName: "draggable" } : {}), transform: booleanAttribute });
1927
+ /** Mostra a alca nativa de redimensionar no canto inferior direito. */
1928
+ resizable = input(false, { ...(ngDevMode ? { debugName: "resizable" } : {}), transform: booleanAttribute });
1929
+ /** Mostra o botao de maximizar no cabecalho padrao (com `smzTemplate="header"` use `maximize()`). */
1930
+ maximizable = input(false, { ...(ngDevMode ? { debugName: "maximizable" } : {}), transform: booleanAttribute });
1931
+ maximized = model(false, ...(ngDevMode ? [{ debugName: "maximized" }] : []));
1932
+ /** Posicao na tela (como o `position` do `p-dialog`). */
1933
+ position = input('center', ...(ngDevMode ? [{ debugName: "position" }] : []));
1860
1934
  shown = output();
1861
1935
  hidden = output();
1862
1936
  panel = viewChild.required('panel');
@@ -1867,6 +1941,10 @@ class SmzDialogComponent {
1867
1941
  viewContainer = inject(ViewContainerRef);
1868
1942
  host = inject(ElementRef);
1869
1943
  overlayRef;
1944
+ /** `width`/`height`/`min-*`/`max-*` de `style` vao para o painel do overlay (relativos a viewport); o frame ocupa 100% dele. */
1945
+ sizing = computed(() => smzSplitDialogSize(this.style()), ...(ngDevMode ? [{ debugName: "sizing" }] : []));
1946
+ dx = signal(0, ...(ngDevMode ? [{ debugName: "dx" }] : []));
1947
+ dy = signal(0, ...(ngDevMode ? [{ debugName: "dy" }] : []));
1870
1948
  constructor() {
1871
1949
  effect(() => {
1872
1950
  if (this.visible())
@@ -1874,6 +1952,56 @@ class SmzDialogComponent {
1874
1952
  else
1875
1953
  this.dispose();
1876
1954
  });
1955
+ effect(() => {
1956
+ const maximized = this.maximized();
1957
+ const pane = this.sizing().pane;
1958
+ this.overlayRef?.updateSize(maximized ? { width: '100vw', height: '100vh', maxWidth: '100vw', maxHeight: '100vh', minWidth: '0', minHeight: '0' } : { ...pane, maxWidth: pane.maxWidth ?? '95vw' });
1959
+ });
1960
+ effect(() => {
1961
+ const position = this.position();
1962
+ this.overlayRef?.updatePositionStrategy(this.strategyFor(position));
1963
+ });
1964
+ }
1965
+ /** Alterna entre maximizado e normal. */
1966
+ maximize() {
1967
+ this.maximized.update((value) => !value);
1968
+ this.dx.set(0);
1969
+ this.dy.set(0);
1970
+ }
1971
+ startDrag(event) {
1972
+ if (!this.draggable() || this.maximized() || event.target.closest('button'))
1973
+ return;
1974
+ event.preventDefault();
1975
+ const startX = event.clientX - this.dx();
1976
+ const startY = event.clientY - this.dy();
1977
+ const move = (e) => {
1978
+ this.dx.set(e.clientX - startX);
1979
+ this.dy.set(e.clientY - startY);
1980
+ };
1981
+ const up = () => {
1982
+ document.removeEventListener('pointermove', move);
1983
+ document.removeEventListener('pointerup', up);
1984
+ };
1985
+ document.addEventListener('pointermove', move);
1986
+ document.addEventListener('pointerup', up);
1987
+ }
1988
+ strategyFor(position) {
1989
+ const strategy = this.overlay.position().global();
1990
+ const horizontal = position.includes('left') ? 'left' : position.includes('right') ? 'right' : 'center';
1991
+ const vertical = position.startsWith('top') ? 'top' : position.startsWith('bottom') ? 'bottom' : position === 'left' || position === 'right' || position === 'center' ? 'center' : 'center';
1992
+ if (horizontal === 'left')
1993
+ strategy.left('0');
1994
+ else if (horizontal === 'right')
1995
+ strategy.right('0');
1996
+ else
1997
+ strategy.centerHorizontally();
1998
+ if (vertical === 'top')
1999
+ strategy.top('0');
2000
+ else if (vertical === 'bottom')
2001
+ strategy.bottom('0');
2002
+ else
2003
+ strategy.centerVertically();
2004
+ return strategy;
1877
2005
  }
1878
2006
  close() {
1879
2007
  this.visible.set(false);
@@ -1887,8 +2015,9 @@ class SmzDialogComponent {
1887
2015
  const modal = this.modal();
1888
2016
  this.overlayRef = this.overlay.create({
1889
2017
  hasBackdrop: modal,
1890
- positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically(),
2018
+ positionStrategy: this.strategyFor(this.position()),
1891
2019
  scrollStrategy: this.overlay.scrollStrategies.block(),
2020
+ ...(this.maximized() ? { width: '100vw', height: '100vh', maxWidth: '100vw', maxHeight: '100vh' } : { ...this.sizing().pane, maxWidth: this.sizing().pane.maxWidth ?? '95vw' }),
1892
2021
  });
1893
2022
  SmzZIndex.set('modal', this.overlayRef.hostElement, 1100 + this.baseZIndex());
1894
2023
  if (this.overlayRef.backdropElement) {
@@ -1919,24 +2048,35 @@ class SmzDialogComponent {
1919
2048
  this.overlayRef?.overlayElement.querySelector('[role="dialog"]')?.setAttribute('data-testid', testId);
1920
2049
  }
1921
2050
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1922
- 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 } }, outputs: { visible: "visibleChange", 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: `
2051
+ 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: `
1923
2052
  <ng-template #panel>
1924
2053
  <div
1925
2054
  role="dialog"
1926
2055
  aria-modal="true"
1927
2056
  [attr.aria-label]="header() || null"
1928
- class="pointer-events-auto 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"
1929
- [class]="styleClass() ?? ''"
1930
- [ngStyle]="style()"
2057
+ class="pointer-events-auto flex flex-col border border-ui-line bg-ui-surface-2 font-ui text-ui-fg shadow-overlay"
2058
+ [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() ?? '')"
2059
+ [ngStyle]="maximized() ? null : sizing().rest"
2060
+ [style.width]="!maximized() && sizing().pane.width ? '100%' : null"
2061
+ [style.height]="!maximized() && sizing().pane.height ? '100%' : null"
2062
+ [style.transform]="maximized() || (dx() === 0 && dy() === 0) ? null : 'translate(' + dx() + 'px, ' + dy() + 'px)'"
1931
2063
  >
1932
2064
  @if (headerTemplate(); as headerTpl) {
1933
- <div class="border-b border-ui-line px-4 py-3">
2065
+ <div class="border-b border-ui-line px-4 py-3" [class.cursor-move]="draggable() && !maximized()" (pointerdown)="startDrag($event)">
1934
2066
  <ng-container [ngTemplateOutlet]="headerTpl" />
1935
2067
  </div>
1936
2068
  }
1937
2069
  @else if (header() || closable()) {
1938
- <div class="flex items-center justify-between gap-4 border-b border-ui-line px-4 py-3">
2070
+ <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)">
1939
2071
  <span class="text-ui-lg font-medium">{{ header() }}</span>
2072
+ <div class="flex items-center gap-1">
2073
+ @if (maximizable()) {
2074
+ <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()">
2075
+ <svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true">
2076
+ @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" /> }
2077
+ </svg>
2078
+ </button>
2079
+ }
1940
2080
  @if (closable()) {
1941
2081
  <button
1942
2082
  type="button"
@@ -1949,6 +2089,7 @@ class SmzDialogComponent {
1949
2089
  </svg>
1950
2090
  </button>
1951
2091
  }
2092
+ </div>
1952
2093
  </div>
1953
2094
  }
1954
2095
  <div class="min-h-0 flex-1 overflow-auto p-4"><ng-content /></div>
@@ -1973,18 +2114,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1973
2114
  role="dialog"
1974
2115
  aria-modal="true"
1975
2116
  [attr.aria-label]="header() || null"
1976
- class="pointer-events-auto 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"
1977
- [class]="styleClass() ?? ''"
1978
- [ngStyle]="style()"
2117
+ class="pointer-events-auto flex flex-col border border-ui-line bg-ui-surface-2 font-ui text-ui-fg shadow-overlay"
2118
+ [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() ?? '')"
2119
+ [ngStyle]="maximized() ? null : sizing().rest"
2120
+ [style.width]="!maximized() && sizing().pane.width ? '100%' : null"
2121
+ [style.height]="!maximized() && sizing().pane.height ? '100%' : null"
2122
+ [style.transform]="maximized() || (dx() === 0 && dy() === 0) ? null : 'translate(' + dx() + 'px, ' + dy() + 'px)'"
1979
2123
  >
1980
2124
  @if (headerTemplate(); as headerTpl) {
1981
- <div class="border-b border-ui-line px-4 py-3">
2125
+ <div class="border-b border-ui-line px-4 py-3" [class.cursor-move]="draggable() && !maximized()" (pointerdown)="startDrag($event)">
1982
2126
  <ng-container [ngTemplateOutlet]="headerTpl" />
1983
2127
  </div>
1984
2128
  }
1985
2129
  @else if (header() || closable()) {
1986
- <div class="flex items-center justify-between gap-4 border-b border-ui-line px-4 py-3">
2130
+ <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)">
1987
2131
  <span class="text-ui-lg font-medium">{{ header() }}</span>
2132
+ <div class="flex items-center gap-1">
2133
+ @if (maximizable()) {
2134
+ <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()">
2135
+ <svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true">
2136
+ @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" /> }
2137
+ </svg>
2138
+ </button>
2139
+ }
1988
2140
  @if (closable()) {
1989
2141
  <button
1990
2142
  type="button"
@@ -1997,6 +2149,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1997
2149
  </svg>
1998
2150
  </button>
1999
2151
  }
2152
+ </div>
2000
2153
  </div>
2001
2154
  }
2002
2155
  <div class="min-h-0 flex-1 overflow-auto p-4"><ng-content /></div>
@@ -2009,7 +2162,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
2009
2162
  </ng-template>
2010
2163
  `,
2011
2164
  }]
2012
- }], 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 }] }], 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 }] }] } });
2165
+ }], 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 }] }] } });
2013
2166
 
2014
2167
  const POSITIONS$2 = [
2015
2168
  { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 8 },
@@ -2973,12 +3126,28 @@ class SmzAnchoredPanel {
2973
3126
  }
2974
3127
 
2975
3128
  /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return, @typescript-eslint/explicit-module-boundary-types */
3129
+ /**
3130
+ * Texto da opcao. Sem `optionLabel`, opcoes-objeto com `label` usam esse campo (como o `p-select` do PrimeNG);
3131
+ * primitivos sao usados como estao.
3132
+ */
2976
3133
  function optionLabel(option, config) {
2977
- const value = config.optionLabel ? SmzObjectUtils.resolveFieldData(option, config.optionLabel) : option;
3134
+ let value = option;
3135
+ if (config.optionLabel)
3136
+ value = SmzObjectUtils.resolveFieldData(option, config.optionLabel);
3137
+ else if (option !== null && typeof option === 'object' && option.label !== undefined)
3138
+ value = option.label;
2978
3139
  return value === null || value === undefined ? '' : String(value);
2979
3140
  }
3141
+ /**
3142
+ * Valor da opcao. Sem `optionValue` (e sem `optionLabel`), opcoes-objeto com `value` usam esse campo
3143
+ * (como o `p-select` do PrimeNG); caso contrario o proprio objeto e o valor.
3144
+ */
2980
3145
  function optionValue(option, config) {
2981
- return config.optionValue ? SmzObjectUtils.resolveFieldData(option, config.optionValue) : option;
3146
+ if (config.optionValue)
3147
+ return SmzObjectUtils.resolveFieldData(option, config.optionValue);
3148
+ if (!config.optionLabel && option !== null && typeof option === 'object' && option.value !== undefined)
3149
+ return option.value;
3150
+ return option;
2982
3151
  }
2983
3152
  function optionDisabled(option, config) {
2984
3153
  return config.optionDisabled ? !!SmzObjectUtils.resolveFieldData(option, config.optionDisabled) : false;
@@ -3064,6 +3233,10 @@ class SmzSelectComponent extends SmzValueAccessor {
3064
3233
  dataKey: this.dataKey(),
3065
3234
  }), ...(ngDevMode ? [{ debugName: "config" }] : []));
3066
3235
  visibleOptions = computed(() => filterOptions(this.options() ?? [], this.filterText(), { ...this.config(), filterBy: this.filterBy(), mode: this.filterMatchMode() }), ...(ngDevMode ? [{ debugName: "visibleOptions" }] : []));
3236
+ /** Templates opcionais: `item` (linha da lista) e `selectedItem` (valor exibido no campo), como no `p-select`. */
3237
+ templates = contentChildren(SmzTemplateDirective, ...(ngDevMode ? [{ debugName: "templates" }] : []));
3238
+ itemTemplate = computed(() => smzFindTemplate(this.templates(), 'item'), ...(ngDevMode ? [{ debugName: "itemTemplate" }] : []));
3239
+ selectedItemTemplate = computed(() => smzFindTemplate(this.templates(), 'selectedItem'), ...(ngDevMode ? [{ debugName: "selectedItemTemplate" }] : []));
3067
3240
  hasValue = computed(() => this.selectedOption() !== undefined, ...(ngDevMode ? [{ debugName: "hasValue" }] : []));
3068
3241
  selectedOption = computed(() => {
3069
3242
  const current = this.current();
@@ -3234,13 +3407,13 @@ class SmzSelectComponent extends SmzValueAccessor {
3234
3407
  }
3235
3408
  }
3236
3409
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3237
- 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: `
3410
+ 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: `
3238
3411
  <button
3239
3412
  #trigger
3240
3413
  type="button"
3241
3414
  role="combobox"
3242
3415
  aria-haspopup="listbox"
3243
- class="flex h-control w-full cursor-pointer items-center gap-2 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x text-left font-ui text-ui-md text-ui-fg transition-colors duration-ui focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
3416
+ class="flex h-control w-full cursor-pointer items-center gap-2 rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x text-left font-ui text-ui-md text-ui-fg transition-colors duration-ui focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
3244
3417
  [ngClass]="styleClass()"
3245
3418
  [id]="inputId() || null"
3246
3419
  [attr.aria-expanded]="open()"
@@ -3252,7 +3425,13 @@ class SmzSelectComponent extends SmzValueAccessor {
3252
3425
  (keydown)="onKeydown($event)"
3253
3426
  (blur)="onBlur()"
3254
3427
  >
3255
- <span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="!hasValue()">{{ displayLabel() }}</span>
3428
+ <span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="!hasValue()">
3429
+ @if (hasValue() && selectedItemTemplate(); as tpl) {
3430
+ <ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: selectedOption() }" />
3431
+ } @else {
3432
+ {{ displayLabel() }}
3433
+ }
3434
+ </span>
3256
3435
  @if (showClear() && hasValue() && !isDisabled()) {
3257
3436
  <span
3258
3437
  role="button"
@@ -3301,7 +3480,11 @@ class SmzSelectComponent extends SmzValueAccessor {
3301
3480
  (mouseenter)="activeIndex.set(index)"
3302
3481
  (click)="select(option, $event)"
3303
3482
  >
3304
- {{ labelOf(option) }}
3483
+ @if (itemTemplate(); as tpl) {
3484
+ <ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: option, index: index }" />
3485
+ } @else {
3486
+ {{ labelOf(option) }}
3487
+ }
3305
3488
  </li>
3306
3489
  }
3307
3490
  @empty {
@@ -3310,14 +3493,14 @@ class SmzSelectComponent extends SmzValueAccessor {
3310
3493
  </ul>
3311
3494
  </div>
3312
3495
  </ng-template>
3313
- `, 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 });
3496
+ `, 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 });
3314
3497
  }
3315
3498
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzSelectComponent, decorators: [{
3316
3499
  type: Component,
3317
3500
  args: [{
3318
3501
  selector: 'ui-select',
3319
3502
  changeDetection: ChangeDetectionStrategy.OnPush,
3320
- imports: [NgClass, SmzInputTextDirective],
3503
+ imports: [NgClass, NgTemplateOutlet, SmzInputTextDirective],
3321
3504
  providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzSelectComponent), multi: true }],
3322
3505
  host: { class: 'block min-w-0' },
3323
3506
  template: `
@@ -3326,7 +3509,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3326
3509
  type="button"
3327
3510
  role="combobox"
3328
3511
  aria-haspopup="listbox"
3329
- class="flex h-control w-full cursor-pointer items-center gap-2 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x text-left font-ui text-ui-md text-ui-fg transition-colors duration-ui focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
3512
+ class="flex h-control w-full cursor-pointer items-center gap-2 rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x text-left font-ui text-ui-md text-ui-fg transition-colors duration-ui focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
3330
3513
  [ngClass]="styleClass()"
3331
3514
  [id]="inputId() || null"
3332
3515
  [attr.aria-expanded]="open()"
@@ -3338,7 +3521,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3338
3521
  (keydown)="onKeydown($event)"
3339
3522
  (blur)="onBlur()"
3340
3523
  >
3341
- <span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="!hasValue()">{{ displayLabel() }}</span>
3524
+ <span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="!hasValue()">
3525
+ @if (hasValue() && selectedItemTemplate(); as tpl) {
3526
+ <ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: selectedOption() }" />
3527
+ } @else {
3528
+ {{ displayLabel() }}
3529
+ }
3530
+ </span>
3342
3531
  @if (showClear() && hasValue() && !isDisabled()) {
3343
3532
  <span
3344
3533
  role="button"
@@ -3387,7 +3576,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3387
3576
  (mouseenter)="activeIndex.set(index)"
3388
3577
  (click)="select(option, $event)"
3389
3578
  >
3390
- {{ labelOf(option) }}
3579
+ @if (itemTemplate(); as tpl) {
3580
+ <ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: option, index: index }" />
3581
+ } @else {
3582
+ {{ labelOf(option) }}
3583
+ }
3391
3584
  </li>
3392
3585
  }
3393
3586
  @empty {
@@ -3398,7 +3591,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3398
3591
  </ng-template>
3399
3592
  `,
3400
3593
  }]
3401
- }], 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 }] }] } });
3594
+ }], 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 }] }] } });
3402
3595
 
3403
3596
  /* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-unsafe-return, max-len */
3404
3597
  /* eslint-disable max-len -- classes Tailwind nos templates */
@@ -3447,6 +3640,10 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
3447
3640
  dataKey: this.dataKey(),
3448
3641
  }), ...(ngDevMode ? [{ debugName: "config" }] : []));
3449
3642
  visibleOptions = computed(() => filterOptions(this.options() ?? [], this.filterText(), { ...this.config(), filterBy: this.filterBy(), mode: this.filterMatchMode() }), ...(ngDevMode ? [{ debugName: "visibleOptions" }] : []));
3643
+ /** Templates opcionais: `item` (linha da lista) e `selectedItems` (valor exibido no campo; `$implicit` = valores selecionados), como no `p-multiselect`. */
3644
+ templates = contentChildren(SmzTemplateDirective, ...(ngDevMode ? [{ debugName: "templates" }] : []));
3645
+ itemTemplate = computed(() => smzFindTemplate(this.templates(), 'item'), ...(ngDevMode ? [{ debugName: "itemTemplate" }] : []));
3646
+ selectedItemsTemplate = computed(() => smzFindTemplate(this.templates(), 'selectedItems'), ...(ngDevMode ? [{ debugName: "selectedItemsTemplate" }] : []));
3450
3647
  selectedValues = computed(() => (Array.isArray(this.current()) ? this.current() : []), ...(ngDevMode ? [{ debugName: "selectedValues" }] : []));
3451
3648
  selectedOptions = computed(() => (this.options() ?? []).filter((option) => this.selectedValues().some((value) => sameValue(optionValue(option, this.config()), value, this.dataKey()))), ...(ngDevMode ? [{ debugName: "selectedOptions" }] : []));
3452
3649
  allSelected = computed(() => {
@@ -3481,7 +3678,9 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
3481
3678
  optionRowClass(option, index) {
3482
3679
  if (optionDisabled(option, this.config()))
3483
3680
  return 'opacity-50 cursor-not-allowed';
3484
- return this.activeIndex() === index ? 'bg-ui-surface-3' : '';
3681
+ if (this.activeIndex() === index)
3682
+ return 'bg-ui-surface-3';
3683
+ return this.selectedValues().length > 0 && this.isSelected(option) ? 'bg-ui-primary/10' : '';
3485
3684
  }
3486
3685
  toggle() {
3487
3686
  if (this.open())
@@ -3587,13 +3786,13 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
3587
3786
  this.touch();
3588
3787
  }
3589
3788
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzMultiSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3590
- 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: `
3789
+ 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: `
3591
3790
  <button
3592
3791
  #trigger
3593
3792
  type="button"
3594
3793
  role="combobox"
3595
3794
  aria-haspopup="listbox"
3596
- class="flex h-control w-full cursor-pointer items-center gap-2 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x text-left font-ui text-ui-md text-ui-fg transition-colors duration-ui focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
3795
+ class="flex h-control w-full cursor-pointer items-center gap-2 rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x text-left font-ui text-ui-md text-ui-fg transition-colors duration-ui focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
3597
3796
  [ngClass]="styleClass()"
3598
3797
  [id]="inputId() || null"
3599
3798
  [attr.aria-expanded]="open()"
@@ -3603,7 +3802,13 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
3603
3802
  (keydown)="onKeydown($event)"
3604
3803
  (blur)="onBlur()"
3605
3804
  >
3606
- <span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="selectedOptions().length === 0">{{ displayLabel() }}</span>
3805
+ <span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="selectedOptions().length === 0">
3806
+ @if (selectedOptions().length > 0 && selectedItemsTemplate(); as tpl) {
3807
+ <ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: selectedValues(), options: selectedOptions() }" />
3808
+ } @else {
3809
+ {{ displayLabel() }}
3810
+ }
3811
+ </span>
3607
3812
  @if (showClear() && selectedOptions().length > 0 && !isDisabled()) {
3608
3813
  <span
3609
3814
  role="button"
@@ -3673,7 +3878,13 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
3673
3878
  <path d="M3 8.5l3.2 3L13 4.5" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" />
3674
3879
  </svg>
3675
3880
  </span>
3676
- <span class="min-w-0 flex-1 truncate">{{ labelOf(option) }}</span>
3881
+ <span class="min-w-0 flex-1 truncate">
3882
+ @if (itemTemplate(); as tpl) {
3883
+ <ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: option, index: index }" />
3884
+ } @else {
3885
+ {{ labelOf(option) }}
3886
+ }
3887
+ </span>
3677
3888
  </li>
3678
3889
  }
3679
3890
  @empty {
@@ -3682,14 +3893,14 @@ class SmzMultiSelectComponent extends SmzValueAccessor {
3682
3893
  </ul>
3683
3894
  </div>
3684
3895
  </ng-template>
3685
- `, 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 });
3896
+ `, 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 });
3686
3897
  }
3687
3898
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzMultiSelectComponent, decorators: [{
3688
3899
  type: Component,
3689
3900
  args: [{
3690
3901
  selector: 'ui-multi-select',
3691
3902
  changeDetection: ChangeDetectionStrategy.OnPush,
3692
- imports: [NgClass, NgStyle, SmzInputTextDirective],
3903
+ imports: [NgClass, NgStyle, NgTemplateOutlet, SmzInputTextDirective],
3693
3904
  providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzMultiSelectComponent), multi: true }],
3694
3905
  host: { class: 'block min-w-0' },
3695
3906
  template: `
@@ -3698,7 +3909,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3698
3909
  type="button"
3699
3910
  role="combobox"
3700
3911
  aria-haspopup="listbox"
3701
- class="flex h-control w-full cursor-pointer items-center gap-2 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x text-left font-ui text-ui-md text-ui-fg transition-colors duration-ui focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
3912
+ class="flex h-control w-full cursor-pointer items-center gap-2 rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x text-left font-ui text-ui-md text-ui-fg transition-colors duration-ui focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
3702
3913
  [ngClass]="styleClass()"
3703
3914
  [id]="inputId() || null"
3704
3915
  [attr.aria-expanded]="open()"
@@ -3708,7 +3919,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3708
3919
  (keydown)="onKeydown($event)"
3709
3920
  (blur)="onBlur()"
3710
3921
  >
3711
- <span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="selectedOptions().length === 0">{{ displayLabel() }}</span>
3922
+ <span class="min-w-0 flex-1 truncate" [class.text-ui-fg-subtle]="selectedOptions().length === 0">
3923
+ @if (selectedOptions().length > 0 && selectedItemsTemplate(); as tpl) {
3924
+ <ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: selectedValues(), options: selectedOptions() }" />
3925
+ } @else {
3926
+ {{ displayLabel() }}
3927
+ }
3928
+ </span>
3712
3929
  @if (showClear() && selectedOptions().length > 0 && !isDisabled()) {
3713
3930
  <span
3714
3931
  role="button"
@@ -3778,7 +3995,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3778
3995
  <path d="M3 8.5l3.2 3L13 4.5" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" />
3779
3996
  </svg>
3780
3997
  </span>
3781
- <span class="min-w-0 flex-1 truncate">{{ labelOf(option) }}</span>
3998
+ <span class="min-w-0 flex-1 truncate">
3999
+ @if (itemTemplate(); as tpl) {
4000
+ <ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: option, index: index }" />
4001
+ } @else {
4002
+ {{ labelOf(option) }}
4003
+ }
4004
+ </span>
3782
4005
  </li>
3783
4006
  }
3784
4007
  @empty {
@@ -3789,7 +4012,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3789
4012
  </ng-template>
3790
4013
  `,
3791
4014
  }]
3792
- }], 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 }] }] } });
4015
+ }], 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 }] }] } });
3793
4016
 
3794
4017
  /* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-unsafe-return, max-len */
3795
4018
  /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument */
@@ -3811,9 +4034,11 @@ class SmzSelectButtonComponent extends SmzValueAccessor {
3811
4034
  /** Aceito por compatibilidade com o `p-selectbutton`; sem efeito. */
3812
4035
  appendTo = input(undefined, ...(ngDevMode ? [{ debugName: "appendTo" }] : []));
3813
4036
  changed = output();
4037
+ /** Sem `optionLabel`/`optionValue`, opcoes-objeto com `label`/`value` sao lidas automaticamente (como no PrimeNG). */
4038
+ sample = computed(() => (this.options() ?? [])[0], ...(ngDevMode ? [{ debugName: "sample" }] : []));
3814
4039
  config = computed(() => ({
3815
- optionLabel: this.optionLabel(),
3816
- optionValue: this.optionValue(),
4040
+ optionLabel: this.optionLabel() ?? (typeof this.sample() === 'object' && this.sample() !== null && 'label' in this.sample() ? 'label' : null),
4041
+ optionValue: this.optionValue() ?? (typeof this.sample() === 'object' && this.sample() !== null && 'value' in this.sample() ? 'value' : null),
3817
4042
  optionDisabled: this.optionDisabled(),
3818
4043
  dataKey: this.dataKey(),
3819
4044
  }), ...(ngDevMode ? [{ debugName: "config" }] : []));
@@ -3834,8 +4059,8 @@ class SmzSelectButtonComponent extends SmzValueAccessor {
3834
4059
  : sameValue(value, current, this.dataKey());
3835
4060
  }
3836
4061
  buttonClasses(option) {
3837
- const size = this.size() === 'small' ? 'h-control-sm text-ui-sm' : this.size() === 'large' ? 'h-control-lg text-ui-lg' : 'h-control';
3838
- const tone = this.isSelected(option) ? 'bg-ui-primary text-ui-on-primary' : 'bg-ui-surface-1 text-ui-fg hover:bg-ui-surface-3';
4062
+ const size = this.size() === 'small' ? 'h-[calc(var(--smz-control-h-sm)-0.5rem)] text-ui-sm' : this.size() === 'large' ? 'h-[calc(var(--smz-control-h-lg)-0.5rem)] text-ui-lg' : 'h-[calc(var(--smz-control-h)-0.5rem)]';
4063
+ const tone = this.isSelected(option) ? 'bg-ui-surface-1 text-ui-fg shadow-card' : 'text-ui-fg-muted hover:text-ui-fg';
3839
4064
  return `${size} ${tone}`;
3840
4065
  }
3841
4066
  toggle(option, event) {
@@ -3858,11 +4083,11 @@ class SmzSelectButtonComponent extends SmzValueAccessor {
3858
4083
  }
3859
4084
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzSelectButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3860
4085
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzSelectButtonComponent, isStandalone: true, selector: "ui-select-button", 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 }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, allowEmpty: { classPropertyName: "allowEmpty", publicName: "allowEmpty", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, host: { classAttribute: "inline-flex" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzSelectButtonComponent), multi: true }], usesInheritance: true, ngImport: i0, template: `
3861
- <div role="group" class="inline-flex overflow-hidden rounded-control border border-ui-line-strong" [ngClass]="styleClass()">
4086
+ <div role="group" class="inline-flex gap-1 rounded-control bg-ui-surface-3 p-1" [ngClass]="styleClass()">
3862
4087
  @for (option of options(); track $index) {
3863
4088
  <button
3864
4089
  type="button"
3865
- class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap border-l border-ui-line-strong px-control-x font-ui text-ui-md transition-colors duration-ui first:border-l-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
4090
+ class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-control px-control-x font-ui text-ui-md font-medium transition-colors duration-ui focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
3866
4091
  [class]="buttonClasses(option)"
3867
4092
  [attr.aria-pressed]="isSelected(option)"
3868
4093
  [disabled]="isDisabled() || isOptionDisabled(option)"
@@ -3887,11 +4112,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3887
4112
  providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzSelectButtonComponent), multi: true }],
3888
4113
  host: { class: 'inline-flex' },
3889
4114
  template: `
3890
- <div role="group" class="inline-flex overflow-hidden rounded-control border border-ui-line-strong" [ngClass]="styleClass()">
4115
+ <div role="group" class="inline-flex gap-1 rounded-control bg-ui-surface-3 p-1" [ngClass]="styleClass()">
3891
4116
  @for (option of options(); track $index) {
3892
4117
  <button
3893
4118
  type="button"
3894
- class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap border-l border-ui-line-strong px-control-x font-ui text-ui-md transition-colors duration-ui first:border-l-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
4119
+ class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-control px-control-x font-ui text-ui-md font-medium transition-colors duration-ui focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
3895
4120
  [class]="buttonClasses(option)"
3896
4121
  [attr.aria-pressed]="isSelected(option)"
3897
4122
  [disabled]="isDisabled() || isOptionDisabled(option)"
@@ -4167,14 +4392,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
4167
4392
  /** Complemento de um `ui-input-group`. Substitui o `p-inputgroupaddon` do PrimeNG. */
4168
4393
  class SmzInputGroupAddonComponent {
4169
4394
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzInputGroupAddonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4170
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: SmzInputGroupAddonComponent, isStandalone: true, selector: "ui-input-group-addon", host: { classAttribute: "inline-flex items-center rounded-control border border-ui-line-strong bg-ui-surface-3 px-control-x-sm font-ui text-ui-md text-ui-fg-muted" }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4395
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: SmzInputGroupAddonComponent, isStandalone: true, selector: "ui-input-group-addon", host: { classAttribute: "inline-flex items-center rounded-control border border-ui-line-strong bg-ui-surface-3 px-input-x-sm font-ui text-ui-md text-ui-fg-muted" }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4171
4396
  }
4172
4397
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzInputGroupAddonComponent, decorators: [{
4173
4398
  type: Component,
4174
4399
  args: [{
4175
4400
  selector: 'ui-input-group-addon',
4176
4401
  changeDetection: ChangeDetectionStrategy.OnPush,
4177
- host: { class: 'inline-flex items-center rounded-control border border-ui-line-strong bg-ui-surface-3 px-control-x-sm font-ui text-ui-md text-ui-fg-muted' },
4402
+ host: { class: 'inline-flex items-center rounded-control border border-ui-line-strong bg-ui-surface-3 px-input-x-sm font-ui text-ui-md text-ui-fg-muted' },
4178
4403
  template: '<ng-content />',
4179
4404
  }]
4180
4405
  }] });
@@ -4475,7 +4700,7 @@ class SmzInputNumberComponent extends SmzValueAccessor {
4475
4700
  type="text"
4476
4701
  inputmode="decimal"
4477
4702
  autocomplete="off"
4478
- class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
4703
+ 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"
4479
4704
  [class.pr-14]="showButtons()"
4480
4705
  [attr.id]="inputId() || null"
4481
4706
  [attr.placeholder]="placeholder() || null"
@@ -4532,7 +4757,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
4532
4757
  type="text"
4533
4758
  inputmode="decimal"
4534
4759
  autocomplete="off"
4535
- class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
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"
4536
4761
  [class.pr-14]="showButtons()"
4537
4762
  [attr.id]="inputId() || null"
4538
4763
  [attr.placeholder]="placeholder() || null"
@@ -4810,10 +5035,15 @@ class SmzDatePickerComponent extends SmzValueAccessor {
4810
5035
  fieldRef = viewChild.required('field');
4811
5036
  panel = viewChild.required('panel');
4812
5037
  anchored = new SmzAnchoredPanel(this.overlay, this.viewContainer);
5038
+ /**
5039
+ * Aceita `Date`, string (ISO ou parseavel) e numero (timestamp), como o `p-datepicker`.
5040
+ * Valores invalidos viram `null` em vez de lancar. O modelo do formulario so muda quando o usuario escolhe uma data.
5041
+ */
4813
5042
  writeValue(value) {
4814
- super.writeValue(value);
5043
+ const coerced = coerceDateValue(value);
5044
+ super.writeValue(coerced);
4815
5045
  this.typed.set(null);
4816
- this.syncViewTo(value);
5046
+ this.syncViewTo(coerced);
4817
5047
  }
4818
5048
  ngOnDestroy() {
4819
5049
  this.anchored.close();
@@ -5088,7 +5318,7 @@ class SmzDatePickerComponent extends SmzValueAccessor {
5088
5318
  #field
5089
5319
  type="text"
5090
5320
  autocomplete="off"
5091
- class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger"
5321
+ 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"
5092
5322
  [class.pr-10]="showIcon()"
5093
5323
  [attr.id]="inputId() || null"
5094
5324
  [attr.placeholder]="placeholder() || null"
@@ -5228,7 +5458,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
5228
5458
  #field
5229
5459
  type="text"
5230
5460
  autocomplete="off"
5231
- class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger"
5461
+ 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"
5232
5462
  [class.pr-10]="showIcon()"
5233
5463
  [attr.id]="inputId() || null"
5234
5464
  [attr.placeholder]="placeholder() || null"
@@ -5355,6 +5585,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
5355
5585
  `,
5356
5586
  }]
5357
5587
  }], propDecorators: { selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], showTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTime", required: false }] }], timeOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeOnly", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeconds", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], showButtonBar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButtonBar", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], showOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOnFocus", required: false }] }], keepInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepInvalid", required: false }] }], readonlyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonlyInput", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], touchUI: [{ type: i0.Input, args: [{ isSignal: true, alias: "touchUI", required: false }] }], focusTrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusTrap", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], cleared: [{ type: i0.Output, args: ["cleared"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], blurred: [{ type: i0.Output, args: ["blurred"] }], anchorRef: [{ type: i0.ViewChild, args: ['anchor', { isSignal: true }] }], fieldRef: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], panel: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
5588
+ function toDate(value) {
5589
+ if (value instanceof Date)
5590
+ return Number.isNaN(value.getTime()) ? null : value;
5591
+ if (typeof value === 'string' || typeof value === 'number') {
5592
+ if (value === '')
5593
+ return null;
5594
+ const date = new Date(value);
5595
+ return Number.isNaN(date.getTime()) ? null : date;
5596
+ }
5597
+ return null;
5598
+ }
5599
+ function coerceDateValue(value) {
5600
+ if (Array.isArray(value)) {
5601
+ const dates = value.map(toDate).filter((date) => date !== null);
5602
+ return dates.length > 0 ? dates : null;
5603
+ }
5604
+ return toDate(value);
5605
+ }
5358
5606
 
5359
5607
  /* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-unsafe-return, max-len */
5360
5608
  /* eslint-disable max-len -- classes Tailwind nos templates */
@@ -5532,7 +5780,7 @@ class SmzAutoCompleteComponent extends SmzValueAccessor {
5532
5780
  role="combobox"
5533
5781
  autocomplete="off"
5534
5782
  aria-autocomplete="list"
5535
- class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger"
5783
+ 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"
5536
5784
  [class]="dropdown() ? 'pr-10' : ''"
5537
5785
  [attr.id]="inputId() || null"
5538
5786
  [attr.placeholder]="placeholder() || null"
@@ -5603,7 +5851,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
5603
5851
  role="combobox"
5604
5852
  autocomplete="off"
5605
5853
  aria-autocomplete="list"
5606
- class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger"
5854
+ 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"
5607
5855
  [class]="dropdown() ? 'pr-10' : ''"
5608
5856
  [attr.id]="inputId() || null"
5609
5857
  [attr.placeholder]="placeholder() || null"
@@ -5677,6 +5925,8 @@ class SmzInputMaskComponent extends SmzValueAccessor {
5677
5925
  placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
5678
5926
  readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
5679
5927
  inputId = input('', ...(ngDevMode ? [{ debugName: "inputId" }] : []));
5928
+ /** Tipo do `<input>` nativo (`text`, `tel`, `password`...). */
5929
+ type = input('text', ...(ngDevMode ? [{ debugName: "type" }] : []));
5680
5930
  inputed = output();
5681
5931
  blurred = output();
5682
5932
  completed = output();
@@ -5726,7 +5976,7 @@ class SmzInputMaskComponent extends SmzValueAccessor {
5726
5976
  }, ...(ngDevMode ? [{ debugName: "display" }] : []));
5727
5977
  writeValue(value) {
5728
5978
  super.writeValue(value);
5729
- this.entered.set(this.unmask() ? this.fitToSlots(value ?? '') : this.fitToSlots(value ?? ''));
5979
+ this.entered.set(this.fitToSlots(value ?? ''));
5730
5980
  }
5731
5981
  onFocus() {
5732
5982
  this.focusedState.set(true);
@@ -5771,6 +6021,10 @@ class SmzInputMaskComponent extends SmzValueAccessor {
5771
6021
  setTimeout(() => this.moveCaret(focusSlot));
5772
6022
  }
5773
6023
  }
6024
+ /**
6025
+ * Sem `maxlength` no `<input>`: numa mascara fixa o texto exibido ja tem o tamanho maximo (ex.: "5__.___.___-__"),
6026
+ * e o navegador bloquearia a insercao de qualquer caractere novo. `fitToSlots` descarta o que nao cabe.
6027
+ */
5774
6028
  onInput(event) {
5775
6029
  const element = event.target;
5776
6030
  const entered = this.fitToSlots(element.value);
@@ -5825,14 +6079,13 @@ class SmzInputMaskComponent extends SmzValueAccessor {
5825
6079
  this.field().nativeElement.setSelectionRange(position, position);
5826
6080
  }
5827
6081
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzInputMaskComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5828
- 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 } }, 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: `
6082
+ 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: `
5829
6083
  <input
5830
6084
  #field
5831
- type="text"
5832
- class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger"
6085
+ [attr.type]="type()"
6086
+ 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"
5833
6087
  [attr.id]="inputId() || null"
5834
6088
  [attr.placeholder]="placeholder() || null"
5835
- [attr.maxlength]="parsed().literals.length"
5836
6089
  [disabled]="isDisabled()"
5837
6090
  [readOnly]="readonly()"
5838
6091
  [value]="display()"
@@ -5853,11 +6106,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
5853
6106
  template: `
5854
6107
  <input
5855
6108
  #field
5856
- type="text"
5857
- class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger"
6109
+ [attr.type]="type()"
6110
+ 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"
5858
6111
  [attr.id]="inputId() || null"
5859
6112
  [attr.placeholder]="placeholder() || null"
5860
- [attr.maxlength]="parsed().literals.length"
5861
6113
  [disabled]="isDisabled()"
5862
6114
  [readOnly]="readonly()"
5863
6115
  [value]="display()"
@@ -5868,7 +6120,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
5868
6120
  />
5869
6121
  `,
5870
6122
  }]
5871
- }], 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 }] }], 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 }] }] } });
6123
+ }], 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 }] }] } });
5872
6124
 
5873
6125
  /* eslint-disable max-len -- classes Tailwind nos templates */
5874
6126
  const DEFAULT_MEDIUM = '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})';
@@ -5922,7 +6174,7 @@ class SmzPasswordComponent extends SmzValueAccessor {
5922
6174
  <input
5923
6175
  [type]="visible() ? 'text' : 'password'"
5924
6176
  autocomplete="off"
5925
- class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger"
6177
+ 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"
5926
6178
  [class.pr-10]="toggleMask()"
5927
6179
  [attr.id]="inputId() || null"
5928
6180
  [attr.placeholder]="placeholder() || null"
@@ -5975,7 +6227,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
5975
6227
  <input
5976
6228
  [type]="visible() ? 'text' : 'password'"
5977
6229
  autocomplete="off"
5978
- class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger"
6230
+ 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"
5979
6231
  [class.pr-10]="toggleMask()"
5980
6232
  [attr.id]="inputId() || null"
5981
6233
  [attr.placeholder]="placeholder() || null"
@@ -6028,15 +6280,19 @@ class SmzColorPickerComponent extends SmzValueAccessor {
6028
6280
  inputId = input('', ...(ngDevMode ? [{ debugName: "inputId" }] : []));
6029
6281
  /** Aceito por compatibilidade com o `p-colorpicker`; sem efeito. */
6030
6282
  appendTo = input(undefined, ...(ngDevMode ? [{ debugName: "appendTo" }] : []));
6283
+ /** Emitido quando o usuario escolhe uma cor (equivale ao `onChange` do `p-colorpicker`). */
6284
+ changed = output();
6031
6285
  hex = computed(() => {
6032
6286
  const raw = (this.current() ?? '').replace('#', '');
6033
6287
  return /^[0-9a-fA-F]{6}$/.test(raw) ? `#${raw.toLowerCase()}` : '#000000';
6034
6288
  }, ...(ngDevMode ? [{ debugName: "hex" }] : []));
6035
6289
  onInput(event) {
6036
- this.commit(event.target.value.replace('#', ''));
6290
+ const value = event.target.value.replace('#', '');
6291
+ this.commit(value);
6292
+ this.changed.emit({ originalEvent: event, value });
6037
6293
  }
6038
6294
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzColorPickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6039
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: SmzColorPickerComponent, isStandalone: true, selector: "ui-color-picker", inputs: { inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "inline-flex" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzColorPickerComponent), multi: true }], usesInheritance: true, ngImport: i0, template: `
6295
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: SmzColorPickerComponent, isStandalone: true, selector: "ui-color-picker", inputs: { inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, host: { classAttribute: "inline-flex" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SmzColorPickerComponent), multi: true }], usesInheritance: true, ngImport: i0, template: `
6040
6296
  <input
6041
6297
  type="color"
6042
6298
  class="h-control w-12 cursor-pointer rounded-control border border-ui-line-strong bg-ui-surface-1 p-1 focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
@@ -6067,7 +6323,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
6067
6323
  />
6068
6324
  `,
6069
6325
  }]
6070
- }], propDecorators: { inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }] } });
6326
+ }], propDecorators: { inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }] } });
6071
6327
 
6072
6328
  /* eslint-disable max-len -- classes Tailwind nos templates */
6073
6329
  /**
@@ -6218,12 +6474,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
6218
6474
  class SmzAccordionComponent {
6219
6475
  value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
6220
6476
  multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : {}), transform: booleanAttribute });
6477
+ /** Um painel foi aberto (equivale ao `onOpen` do `p-accordion`). */
6478
+ opened = output();
6479
+ /** Um painel foi fechado (equivale ao `onClose`). */
6480
+ closed = output();
6481
+ /** Aceito por compatibilidade com o `p-accordion`; sem efeito. */
6482
+ transitionOptions = input(null, ...(ngDevMode ? [{ debugName: "transitionOptions" }] : []));
6221
6483
  isOpen(value) {
6222
6484
  const current = this.value();
6223
6485
  return Array.isArray(current) ? current.includes(value) : current === value;
6224
6486
  }
6225
6487
  toggle(value) {
6226
6488
  const open = this.isOpen(value);
6489
+ (open ? this.closed : this.opened).emit({ value });
6227
6490
  if (this.multiple()) {
6228
6491
  const current = Array.isArray(this.value()) ? this.value() : this.value() === null ? [] : [this.value()];
6229
6492
  this.value.set(open ? current.filter((entry) => entry !== value) : [...current, value]);
@@ -6233,7 +6496,7 @@ class SmzAccordionComponent {
6233
6496
  }
6234
6497
  }
6235
6498
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6236
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: SmzAccordionComponent, isStandalone: true, selector: "ui-accordion", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { classAttribute: "block overflow-hidden rounded-control border border-ui-line font-ui text-ui-fg" }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6499
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: SmzAccordionComponent, isStandalone: true, selector: "ui-accordion", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, transitionOptions: { classPropertyName: "transitionOptions", publicName: "transitionOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", opened: "opened", closed: "closed" }, host: { classAttribute: "block overflow-hidden rounded-control border border-ui-line font-ui text-ui-fg" }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6237
6500
  }
6238
6501
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzAccordionComponent, decorators: [{
6239
6502
  type: Component,
@@ -6243,7 +6506,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
6243
6506
  host: { class: 'block overflow-hidden rounded-control border border-ui-line font-ui text-ui-fg' },
6244
6507
  template: '<ng-content />',
6245
6508
  }]
6246
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }] } });
6509
+ }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], transitionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "transitionOptions", required: false }] }] } });
6247
6510
  class SmzAccordionPanelComponent {
6248
6511
  value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
6249
6512
  accordion = inject(SmzAccordionComponent);
@@ -6330,6 +6593,11 @@ class SmzUiTimelineComponent {
6330
6593
  contentTemplate = computed(() => smzFindTemplate(this.templates(), 'content'), ...(ngDevMode ? [{ debugName: "contentTemplate" }] : []));
6331
6594
  oppositeTemplate = computed(() => smzFindTemplate(this.templates(), 'opposite'), ...(ngDevMode ? [{ debugName: "oppositeTemplate" }] : []));
6332
6595
  horizontal = computed(() => this.layout() === 'horizontal' || this.align() === 'top' || this.align() === 'bottom', ...(ngDevMode ? [{ debugName: "horizontal" }] : []));
6596
+ /** No layout horizontal, o conteudo fica acima da linha em `top` e nos itens impares de `alternate`/`right`. */
6597
+ contentOnTop(index) {
6598
+ const align = this.align();
6599
+ return align === 'top' || align === 'right' || (align === 'alternate' && index % 2 === 1);
6600
+ }
6333
6601
  rowReverse(index) {
6334
6602
  const align = this.align();
6335
6603
  return align === 'right' || (align === 'alternate' && index % 2 === 1);
@@ -6346,7 +6614,45 @@ class SmzUiTimelineComponent {
6346
6614
  }
6347
6615
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzUiTimelineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6348
6616
  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: `
6349
- <div class="flex" [class]="horizontal() ? 'flex-row' : 'flex-col'" [ngClass]="styleClass()">
6617
+ @if (horizontal()) {
6618
+ <!-- Nao usar a classe grid do Tailwind: o CSS legado do core (.grid, PrimeFlex) a sobrescreve com display:flex !important.
6619
+ Grade de 3 linhas (conteudo de cima / marcadores / conteudo de baixo) com subgrade por item: todos os marcadores ficam na mesma linha. -->
6620
+ <div style="display: grid; grid-template-rows: auto auto auto" [style.grid-template-columns]="'repeat(' + (value() ?? []).length + ', minmax(0, 1fr))'" [ngClass]="styleClass()">
6621
+ @for (event of value() ?? []; track $index; let index = $index; let first = $first; let last = $last) {
6622
+ <div class="tl-item min-w-0" style="display: grid; grid-row: span 3; grid-template-rows: subgrid">
6623
+ <div class="flex min-w-0 flex-col justify-end px-2 pb-2 text-center" style="grid-row: 1">
6624
+ @if (contentOnTop(index)) {
6625
+ @if (contentTemplate(); as content) {
6626
+ <ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
6627
+ }
6628
+ } @else if (oppositeTemplate(); as opposite) {
6629
+ <ng-container [ngTemplateOutlet]="opposite" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
6630
+ }
6631
+ </div>
6632
+ <div class="flex items-center" style="grid-row: 2">
6633
+ <span class="h-0.5 flex-1" [class]="first ? 'bg-transparent' : 'bg-ui-line'"></span>
6634
+ @if (markerTemplate(); as marker) {
6635
+ <ng-container [ngTemplateOutlet]="marker" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
6636
+ }
6637
+ @else {
6638
+ <span class="block h-4 w-4 shrink-0 rounded-full border-2 border-ui-primary bg-ui-surface-1"></span>
6639
+ }
6640
+ <span class="h-0.5 flex-1" [class]="last ? 'bg-transparent' : 'bg-ui-line'"></span>
6641
+ </div>
6642
+ <div class="flex min-w-0 flex-col px-2 pt-2 text-center" style="grid-row: 3">
6643
+ @if (!contentOnTop(index)) {
6644
+ @if (contentTemplate(); as content) {
6645
+ <ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
6646
+ }
6647
+ } @else if (oppositeTemplate(); as opposite) {
6648
+ <ng-container [ngTemplateOutlet]="opposite" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
6649
+ }
6650
+ </div>
6651
+ </div>
6652
+ }
6653
+ </div>
6654
+ } @else {
6655
+ <div class="flex flex-col" [ngClass]="styleClass()">
6350
6656
  @for (event of value() ?? []; track $index; let index = $index; let last = $last) {
6351
6657
  <div class="flex min-w-0 flex-1" [class]="horizontal() ? 'flex-col' : (rowReverse(index) ? 'flex-row-reverse' : 'flex-row')">
6352
6658
  <div class="flex-1" [class]="oppositeClass(index)">
@@ -6373,6 +6679,7 @@ class SmzUiTimelineComponent {
6373
6679
  </div>
6374
6680
  }
6375
6681
  </div>
6682
+ }
6376
6683
  `, 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 });
6377
6684
  }
6378
6685
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzUiTimelineComponent, decorators: [{
@@ -6383,7 +6690,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
6383
6690
  imports: [NgClass, NgTemplateOutlet],
6384
6691
  host: { class: 'block font-ui text-ui-fg' },
6385
6692
  template: `
6386
- <div class="flex" [class]="horizontal() ? 'flex-row' : 'flex-col'" [ngClass]="styleClass()">
6693
+ @if (horizontal()) {
6694
+ <!-- Nao usar a classe grid do Tailwind: o CSS legado do core (.grid, PrimeFlex) a sobrescreve com display:flex !important.
6695
+ Grade de 3 linhas (conteudo de cima / marcadores / conteudo de baixo) com subgrade por item: todos os marcadores ficam na mesma linha. -->
6696
+ <div style="display: grid; grid-template-rows: auto auto auto" [style.grid-template-columns]="'repeat(' + (value() ?? []).length + ', minmax(0, 1fr))'" [ngClass]="styleClass()">
6697
+ @for (event of value() ?? []; track $index; let index = $index; let first = $first; let last = $last) {
6698
+ <div class="tl-item min-w-0" style="display: grid; grid-row: span 3; grid-template-rows: subgrid">
6699
+ <div class="flex min-w-0 flex-col justify-end px-2 pb-2 text-center" style="grid-row: 1">
6700
+ @if (contentOnTop(index)) {
6701
+ @if (contentTemplate(); as content) {
6702
+ <ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
6703
+ }
6704
+ } @else if (oppositeTemplate(); as opposite) {
6705
+ <ng-container [ngTemplateOutlet]="opposite" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
6706
+ }
6707
+ </div>
6708
+ <div class="flex items-center" style="grid-row: 2">
6709
+ <span class="h-0.5 flex-1" [class]="first ? 'bg-transparent' : 'bg-ui-line'"></span>
6710
+ @if (markerTemplate(); as marker) {
6711
+ <ng-container [ngTemplateOutlet]="marker" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
6712
+ }
6713
+ @else {
6714
+ <span class="block h-4 w-4 shrink-0 rounded-full border-2 border-ui-primary bg-ui-surface-1"></span>
6715
+ }
6716
+ <span class="h-0.5 flex-1" [class]="last ? 'bg-transparent' : 'bg-ui-line'"></span>
6717
+ </div>
6718
+ <div class="flex min-w-0 flex-col px-2 pt-2 text-center" style="grid-row: 3">
6719
+ @if (!contentOnTop(index)) {
6720
+ @if (contentTemplate(); as content) {
6721
+ <ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
6722
+ }
6723
+ } @else if (oppositeTemplate(); as opposite) {
6724
+ <ng-container [ngTemplateOutlet]="opposite" [ngTemplateOutletContext]="{ $implicit: event, index: index }" />
6725
+ }
6726
+ </div>
6727
+ </div>
6728
+ }
6729
+ </div>
6730
+ } @else {
6731
+ <div class="flex flex-col" [ngClass]="styleClass()">
6387
6732
  @for (event of value() ?? []; track $index; let index = $index; let last = $last) {
6388
6733
  <div class="flex min-w-0 flex-1" [class]="horizontal() ? 'flex-col' : (rowReverse(index) ? 'flex-row-reverse' : 'flex-row')">
6389
6734
  <div class="flex-1" [class]="oppositeClass(index)">
@@ -6410,6 +6755,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
6410
6755
  </div>
6411
6756
  }
6412
6757
  </div>
6758
+ }
6413
6759
  `,
6414
6760
  }]
6415
6761
  }], 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 }] }] } });
@@ -6553,6 +6899,8 @@ class SmzPaginatorComponent {
6553
6899
  isLast = computed(() => this.page() >= this.pageCount() - 1, ...(ngDevMode ? [{ debugName: "isLast" }] : []));
6554
6900
  visible = computed(() => this.alwaysShow() || this.pageCount() > 1, ...(ngDevMode ? [{ debugName: "visible" }] : []));
6555
6901
  links = computed(() => {
6902
+ if (this.totalRecords() <= 0)
6903
+ return [];
6556
6904
  const size = Math.min(this.pageLinkSize(), this.pageCount());
6557
6905
  const start = Math.max(0, Math.min(this.page() - Math.floor(size / 2), this.pageCount() - size));
6558
6906
  return Array.from({ length: size }, (_, index) => start + index + 1);
@@ -6591,17 +6939,17 @@ class SmzPaginatorComponent {
6591
6939
  @if (showCurrentPageReport()) {
6592
6940
  <span class="mr-2 text-ui-fg-muted">{{ report() }}</span>
6593
6941
  }
6594
- <button type="button" class="inline-flex h-8 min-w-8 cursor-pointer items-center justify-center rounded-control px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Primeira pagina" [disabled]="isFirst()" (click)="goTo(0)">
6942
+ <button type="button" class="inline-flex h-control-lg min-w-control-lg cursor-pointer items-center justify-center rounded-full px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Primeira pagina" [disabled]="isFirst()" (click)="goTo(0)">
6595
6943
  <svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true"><path d="M8 4L4 8l4 4M12 4L8 8l4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /></svg>
6596
6944
  </button>
6597
- <button type="button" class="inline-flex h-8 min-w-8 cursor-pointer items-center justify-center rounded-control px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Pagina anterior" [disabled]="isFirst()" (click)="goTo(page() - 1)">
6945
+ <button type="button" class="inline-flex h-control-lg min-w-control-lg cursor-pointer items-center justify-center rounded-full px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Pagina anterior" [disabled]="isFirst()" (click)="goTo(page() - 1)">
6598
6946
  <svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true"><path d="M10 4L6 8l4 4" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>
6599
6947
  </button>
6600
- @if (showPageLinks()) {
6948
+ @if (showPageLinks() && totalRecords() > 0) {
6601
6949
  @for (link of links(); track link) {
6602
6950
  <button
6603
6951
  type="button"
6604
- class="inline-flex h-8 min-w-8 cursor-pointer items-center justify-center rounded-control px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent"
6952
+ class="inline-flex h-control-lg min-w-control-lg cursor-pointer items-center justify-center rounded-full px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent"
6605
6953
  [class]="link === page() + 1 ? 'smz-paginator-page-selected bg-ui-primary/10 font-medium text-ui-primary' : ''"
6606
6954
  [attr.aria-current]="link === page() + 1 ? 'page' : null"
6607
6955
  (click)="goTo(link - 1)"
@@ -6610,10 +6958,10 @@ class SmzPaginatorComponent {
6610
6958
  </button>
6611
6959
  }
6612
6960
  }
6613
- <button type="button" class="inline-flex h-8 min-w-8 cursor-pointer items-center justify-center rounded-control px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Proxima pagina" [disabled]="isLast()" (click)="goTo(page() + 1)">
6961
+ <button type="button" class="inline-flex h-control-lg min-w-control-lg cursor-pointer items-center justify-center rounded-full px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Proxima pagina" [disabled]="isLast()" (click)="goTo(page() + 1)">
6614
6962
  <svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true"><path d="M6 4l4 4-4 4" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>
6615
6963
  </button>
6616
- <button type="button" class="inline-flex h-8 min-w-8 cursor-pointer items-center justify-center rounded-control px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Ultima pagina" [disabled]="isLast()" (click)="goTo(pageCount() - 1)">
6964
+ <button type="button" class="inline-flex h-control-lg min-w-control-lg cursor-pointer items-center justify-center rounded-full px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Ultima pagina" [disabled]="isLast()" (click)="goTo(pageCount() - 1)">
6617
6965
  <svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true"><path d="M4 4l4 4-4 4M8 4l4 4-4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /></svg>
6618
6966
  </button>
6619
6967
  @if (rowsPerPageOptions() && rowsPerPageOptions()!.length > 0) {
@@ -6636,17 +6984,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
6636
6984
  @if (showCurrentPageReport()) {
6637
6985
  <span class="mr-2 text-ui-fg-muted">{{ report() }}</span>
6638
6986
  }
6639
- <button type="button" class="inline-flex h-8 min-w-8 cursor-pointer items-center justify-center rounded-control px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Primeira pagina" [disabled]="isFirst()" (click)="goTo(0)">
6987
+ <button type="button" class="inline-flex h-control-lg min-w-control-lg cursor-pointer items-center justify-center rounded-full px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Primeira pagina" [disabled]="isFirst()" (click)="goTo(0)">
6640
6988
  <svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true"><path d="M8 4L4 8l4 4M12 4L8 8l4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /></svg>
6641
6989
  </button>
6642
- <button type="button" class="inline-flex h-8 min-w-8 cursor-pointer items-center justify-center rounded-control px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Pagina anterior" [disabled]="isFirst()" (click)="goTo(page() - 1)">
6990
+ <button type="button" class="inline-flex h-control-lg min-w-control-lg cursor-pointer items-center justify-center rounded-full px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Pagina anterior" [disabled]="isFirst()" (click)="goTo(page() - 1)">
6643
6991
  <svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true"><path d="M10 4L6 8l4 4" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>
6644
6992
  </button>
6645
- @if (showPageLinks()) {
6993
+ @if (showPageLinks() && totalRecords() > 0) {
6646
6994
  @for (link of links(); track link) {
6647
6995
  <button
6648
6996
  type="button"
6649
- class="inline-flex h-8 min-w-8 cursor-pointer items-center justify-center rounded-control px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent"
6997
+ class="inline-flex h-control-lg min-w-control-lg cursor-pointer items-center justify-center rounded-full px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent"
6650
6998
  [class]="link === page() + 1 ? 'smz-paginator-page-selected bg-ui-primary/10 font-medium text-ui-primary' : ''"
6651
6999
  [attr.aria-current]="link === page() + 1 ? 'page' : null"
6652
7000
  (click)="goTo(link - 1)"
@@ -6655,10 +7003,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
6655
7003
  </button>
6656
7004
  }
6657
7005
  }
6658
- <button type="button" class="inline-flex h-8 min-w-8 cursor-pointer items-center justify-center rounded-control px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Proxima pagina" [disabled]="isLast()" (click)="goTo(page() + 1)">
7006
+ <button type="button" class="inline-flex h-control-lg min-w-control-lg cursor-pointer items-center justify-center rounded-full px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Proxima pagina" [disabled]="isLast()" (click)="goTo(page() + 1)">
6659
7007
  <svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true"><path d="M6 4l4 4-4 4" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>
6660
7008
  </button>
6661
- <button type="button" class="inline-flex h-8 min-w-8 cursor-pointer items-center justify-center rounded-control px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Ultima pagina" [disabled]="isLast()" (click)="goTo(pageCount() - 1)">
7009
+ <button type="button" class="inline-flex h-control-lg min-w-control-lg cursor-pointer items-center justify-center rounded-full px-2 font-ui text-ui-sm text-ui-fg transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent" aria-label="Ultima pagina" [disabled]="isLast()" (click)="goTo(pageCount() - 1)">
6662
7010
  <svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true"><path d="M4 4l4 4-4 4M8 4l4 4-4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /></svg>
6663
7011
  </button>
6664
7012
  @if (rowsPerPageOptions() && rowsPerPageOptions()!.length > 0) {
@@ -7848,7 +8196,7 @@ class SmzTreeSelectComponent extends SmzValueAccessor {
7848
8196
  type="button"
7849
8197
  role="combobox"
7850
8198
  aria-haspopup="tree"
7851
- class="flex h-control w-full cursor-pointer items-center gap-2 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x text-left font-ui text-ui-md text-ui-fg transition-colors duration-ui focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
8199
+ class="flex h-control w-full cursor-pointer items-center gap-2 rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x text-left font-ui text-ui-md text-ui-fg transition-colors duration-ui focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
7852
8200
  [ngClass]="[containerStyleClass() ?? '', styleClass() ?? '']"
7853
8201
  [attr.aria-expanded]="open()"
7854
8202
  [disabled]="isDisabled()"
@@ -7869,7 +8217,7 @@ class SmzTreeSelectComponent extends SmzValueAccessor {
7869
8217
  <div class="max-h-80 overflow-auto rounded-overlay border border-ui-line bg-ui-surface-2 p-1 font-ui text-ui-md text-ui-fg shadow-overlay">
7870
8218
  @if (filter()) {
7871
8219
  <div class="p-1">
7872
- <input type="text" class="h-control-sm w-full rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x-sm text-ui-sm focus:outline-none focus:ring-2 focus:ring-ui-focus" [placeholder]="filterPlaceholder() ?? ''" (input)="tree._filter($any($event.target).value)" />
8220
+ <input type="text" class="h-control-sm w-full rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x-sm text-ui-sm focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus" [placeholder]="filterPlaceholder() ?? ''" (input)="tree._filter($any($event.target).value)" />
7873
8221
  </div>
7874
8222
  }
7875
8223
  <ui-tree
@@ -7901,7 +8249,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
7901
8249
  type="button"
7902
8250
  role="combobox"
7903
8251
  aria-haspopup="tree"
7904
- class="flex h-control w-full cursor-pointer items-center gap-2 rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x text-left font-ui text-ui-md text-ui-fg transition-colors duration-ui focus:outline-none focus:ring-2 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
8252
+ class="flex h-control w-full cursor-pointer items-center gap-2 rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x text-left font-ui text-ui-md text-ui-fg transition-colors duration-ui focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50"
7905
8253
  [ngClass]="[containerStyleClass() ?? '', styleClass() ?? '']"
7906
8254
  [attr.aria-expanded]="open()"
7907
8255
  [disabled]="isDisabled()"
@@ -7922,7 +8270,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
7922
8270
  <div class="max-h-80 overflow-auto rounded-overlay border border-ui-line bg-ui-surface-2 p-1 font-ui text-ui-md text-ui-fg shadow-overlay">
7923
8271
  @if (filter()) {
7924
8272
  <div class="p-1">
7925
- <input type="text" class="h-control-sm w-full rounded-control border border-ui-line-strong bg-ui-surface-1 px-control-x-sm text-ui-sm focus:outline-none focus:ring-2 focus:ring-ui-focus" [placeholder]="filterPlaceholder() ?? ''" (input)="tree._filter($any($event.target).value)" />
8273
+ <input type="text" class="h-control-sm w-full rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x-sm text-ui-sm focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus" [placeholder]="filterPlaceholder() ?? ''" (input)="tree._filter($any($event.target).value)" />
7926
8274
  </div>
7927
8275
  }
7928
8276
  <ui-tree
@@ -7991,9 +8339,1197 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
7991
8339
  args: [{ providedIn: 'root' }]
7992
8340
  }] });
7993
8341
 
8342
+ /* eslint-disable max-len -- classes Tailwind nos templates */
8343
+ /**
8344
+ * Card. Substitui o `p-card` do PrimeNG.
8345
+ * O conteudo padrao vai no corpo; `header`, `title`, `subtitle` e `footer` podem ser strings ou templates.
8346
+ *
8347
+ * <ui-card header="Titulo" subheader="Sub">conteudo<ng-template smzTemplate="footer">...</ng-template></ui-card>
8348
+ */
8349
+ class SmzCardComponent {
8350
+ /** Titulo em texto (equivale ao slot `title`). */
8351
+ header = input('', ...(ngDevMode ? [{ debugName: "header" }] : []));
8352
+ /** Subtitulo em texto (equivale ao slot `subtitle`). */
8353
+ subheader = input('', ...(ngDevMode ? [{ debugName: "subheader" }] : []));
8354
+ templates = contentChildren(SmzTemplateDirective, ...(ngDevMode ? [{ debugName: "templates" }] : []));
8355
+ headerTemplate = computed(() => smzFindTemplate(this.templates(), 'header'), ...(ngDevMode ? [{ debugName: "headerTemplate" }] : []));
8356
+ titleTemplate = computed(() => smzFindTemplate(this.templates(), 'title'), ...(ngDevMode ? [{ debugName: "titleTemplate" }] : []));
8357
+ subtitleTemplate = computed(() => smzFindTemplate(this.templates(), 'subtitle'), ...(ngDevMode ? [{ debugName: "subtitleTemplate" }] : []));
8358
+ footerTemplate = computed(() => smzFindTemplate(this.templates(), 'footer'), ...(ngDevMode ? [{ debugName: "footerTemplate" }] : []));
8359
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8360
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzCardComponent, isStandalone: true, selector: "ui-card", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, subheader: { classPropertyName: "subheader", publicName: "subheader", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "p-card flex flex-col overflow-hidden rounded-card bg-ui-surface-1 font-ui text-ui-md text-ui-fg shadow-card" }, queries: [{ propertyName: "templates", predicate: SmzTemplateDirective, isSignal: true }], ngImport: i0, template: `
8361
+ @if (headerTemplate(); as tpl) {
8362
+ <div class="p-card-header"><ng-container [ngTemplateOutlet]="tpl" /></div>
8363
+ }
8364
+ <div class="p-card-body flex flex-1 flex-col gap-2 p-5">
8365
+ @if (titleTemplate() || header()) {
8366
+ <div class="p-card-title text-ui-xl font-semibold">
8367
+ @if (titleTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> } @else { {{ header() }} }
8368
+ </div>
8369
+ }
8370
+ @if (subtitleTemplate() || subheader()) {
8371
+ <div class="p-card-subtitle text-ui-fg-muted">
8372
+ @if (subtitleTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> } @else { {{ subheader() }} }
8373
+ </div>
8374
+ }
8375
+ <div class="p-card-content flex-1"><ng-content /></div>
8376
+ @if (footerTemplate(); as tpl) {
8377
+ <div class="p-card-footer"><ng-container [ngTemplateOutlet]="tpl" /></div>
8378
+ }
8379
+ </div>
8380
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8381
+ }
8382
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzCardComponent, decorators: [{
8383
+ type: Component,
8384
+ args: [{
8385
+ selector: 'ui-card',
8386
+ changeDetection: ChangeDetectionStrategy.OnPush,
8387
+ imports: [NgTemplateOutlet],
8388
+ host: { class: 'p-card flex flex-col overflow-hidden rounded-card bg-ui-surface-1 font-ui text-ui-md text-ui-fg shadow-card' },
8389
+ template: `
8390
+ @if (headerTemplate(); as tpl) {
8391
+ <div class="p-card-header"><ng-container [ngTemplateOutlet]="tpl" /></div>
8392
+ }
8393
+ <div class="p-card-body flex flex-1 flex-col gap-2 p-5">
8394
+ @if (titleTemplate() || header()) {
8395
+ <div class="p-card-title text-ui-xl font-semibold">
8396
+ @if (titleTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> } @else { {{ header() }} }
8397
+ </div>
8398
+ }
8399
+ @if (subtitleTemplate() || subheader()) {
8400
+ <div class="p-card-subtitle text-ui-fg-muted">
8401
+ @if (subtitleTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> } @else { {{ subheader() }} }
8402
+ </div>
8403
+ }
8404
+ <div class="p-card-content flex-1"><ng-content /></div>
8405
+ @if (footerTemplate(); as tpl) {
8406
+ <div class="p-card-footer"><ng-container [ngTemplateOutlet]="tpl" /></div>
8407
+ }
8408
+ </div>
8409
+ `,
8410
+ }]
8411
+ }], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], subheader: [{ type: i0.Input, args: [{ isSignal: true, alias: "subheader", required: false }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SmzTemplateDirective), { isSignal: true }] }] } });
8412
+
8413
+ /* eslint-disable max-len -- classes Tailwind nos templates */
8414
+ /**
8415
+ * Painel com cabecalho, recolhimento opcional e rodape. Substitui o `p-panel` do PrimeNG.
8416
+ *
8417
+ * <ui-panel header="Filtros" [toggleable]="true" [(collapsed)]="fechado">conteudo</ui-panel>
8418
+ */
8419
+ class SmzPanelComponent {
8420
+ header = input('', ...(ngDevMode ? [{ debugName: "header" }] : []));
8421
+ toggleable = input(false, { ...(ngDevMode ? { debugName: "toggleable" } : {}), transform: booleanAttribute });
8422
+ collapsed = model(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
8423
+ /**
8424
+ * O que alterna o painel: `icon` (padrao; so o botao) ou `header` (o cabecalho inteiro, exceto elementos
8425
+ * interativos dentro dele, como botoes do template `icons`). Equivale ao `toggler` do `p-panel`.
8426
+ */
8427
+ toggler = input('icon', ...(ngDevMode ? [{ debugName: "toggler" }] : []));
8428
+ /** Antes de alternar (cancelavel nao: apenas notifica). */
8429
+ beforeToggle = output();
8430
+ afterToggle = output();
8431
+ templates = contentChildren(SmzTemplateDirective, ...(ngDevMode ? [{ debugName: "templates" }] : []));
8432
+ headerTemplate = computed(() => smzFindTemplate(this.templates(), 'header'), ...(ngDevMode ? [{ debugName: "headerTemplate" }] : []));
8433
+ iconsTemplate = computed(() => smzFindTemplate(this.templates(), 'icons'), ...(ngDevMode ? [{ debugName: "iconsTemplate" }] : []));
8434
+ footerTemplate = computed(() => smzFindTemplate(this.templates(), 'footer'), ...(ngDevMode ? [{ debugName: "footerTemplate" }] : []));
8435
+ hasHeader = computed(() => !!this.header() || !!this.headerTemplate() || this.toggleable(), ...(ngDevMode ? [{ debugName: "hasHeader" }] : []));
8436
+ headerToggles = computed(() => this.toggleable() && this.toggler() === 'header', ...(ngDevMode ? [{ debugName: "headerToggles" }] : []));
8437
+ onIconClick(event) {
8438
+ // No modo `header` o clique no botao sobe ate o cabecalho, que ja alterna.
8439
+ if (!this.headerToggles())
8440
+ this.toggle(event);
8441
+ }
8442
+ onHeaderClick(event) {
8443
+ if (!this.headerToggles())
8444
+ return;
8445
+ const target = event.target;
8446
+ const interactive = target.closest('button, a, input, select, textarea, label, [role="button"], [role="menuitem"]');
8447
+ // Ignora controles do template `icons`; o botao-seta do proprio painel (e o cabecalho) alternam.
8448
+ if (interactive && !interactive.classList.contains('p-panel-header') && !interactive.hasAttribute('data-panel-toggle'))
8449
+ return;
8450
+ this.toggle(event);
8451
+ }
8452
+ onHeaderKey(event) {
8453
+ if (!this.headerToggles() || event.target !== event.currentTarget)
8454
+ return;
8455
+ event.preventDefault();
8456
+ this.toggle(event);
8457
+ }
8458
+ toggle(event) {
8459
+ const next = !this.collapsed();
8460
+ this.beforeToggle.emit({ originalEvent: event, collapsed: next });
8461
+ this.collapsed.set(next);
8462
+ this.afterToggle.emit({ originalEvent: event, collapsed: next });
8463
+ }
8464
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8465
+ 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: `
8466
+ @if (hasHeader()) {
8467
+ <div
8468
+ class="p-panel-header flex items-center justify-between gap-2 border-b border-ui-line bg-ui-surface-1 px-4 py-3"
8469
+ [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' : ''"
8470
+ [attr.role]="headerToggles() ? 'button' : null"
8471
+ [attr.tabindex]="headerToggles() ? 0 : null"
8472
+ [attr.aria-expanded]="headerToggles() ? !collapsed() : null"
8473
+ (click)="onHeaderClick($event)"
8474
+ (keydown.enter)="onHeaderKey($event)"
8475
+ (keydown.space)="onHeaderKey($event)"
8476
+ >
8477
+ <div class="min-w-0 flex-1 font-semibold">
8478
+ @if (headerTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> } @else { {{ header() }} }
8479
+ </div>
8480
+ <div class="flex items-center gap-1">
8481
+ @if (iconsTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> }
8482
+ @if (toggleable()) {
8483
+ <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)">
8484
+ <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>
8485
+ </button>
8486
+ }
8487
+ </div>
8488
+ </div>
8489
+ }
8490
+ @if (!collapsed()) {
8491
+ <div class="p-panel-content p-4"><ng-content /></div>
8492
+ @if (footerTemplate(); as tpl) {
8493
+ <div class="p-panel-footer border-t border-ui-line px-4 py-3"><ng-container [ngTemplateOutlet]="tpl" /></div>
8494
+ }
8495
+ }
8496
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8497
+ }
8498
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzPanelComponent, decorators: [{
8499
+ type: Component,
8500
+ args: [{
8501
+ selector: 'ui-panel',
8502
+ changeDetection: ChangeDetectionStrategy.OnPush,
8503
+ imports: [NgTemplateOutlet],
8504
+ 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' },
8505
+ template: `
8506
+ @if (hasHeader()) {
8507
+ <div
8508
+ class="p-panel-header flex items-center justify-between gap-2 border-b border-ui-line bg-ui-surface-1 px-4 py-3"
8509
+ [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' : ''"
8510
+ [attr.role]="headerToggles() ? 'button' : null"
8511
+ [attr.tabindex]="headerToggles() ? 0 : null"
8512
+ [attr.aria-expanded]="headerToggles() ? !collapsed() : null"
8513
+ (click)="onHeaderClick($event)"
8514
+ (keydown.enter)="onHeaderKey($event)"
8515
+ (keydown.space)="onHeaderKey($event)"
8516
+ >
8517
+ <div class="min-w-0 flex-1 font-semibold">
8518
+ @if (headerTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> } @else { {{ header() }} }
8519
+ </div>
8520
+ <div class="flex items-center gap-1">
8521
+ @if (iconsTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" /> }
8522
+ @if (toggleable()) {
8523
+ <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)">
8524
+ <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>
8525
+ </button>
8526
+ }
8527
+ </div>
8528
+ </div>
8529
+ }
8530
+ @if (!collapsed()) {
8531
+ <div class="p-panel-content p-4"><ng-content /></div>
8532
+ @if (footerTemplate(); as tpl) {
8533
+ <div class="p-panel-footer border-t border-ui-line px-4 py-3"><ng-container [ngTemplateOutlet]="tpl" /></div>
8534
+ }
8535
+ }
8536
+ `,
8537
+ }]
8538
+ }], 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 }] }] } });
8539
+
8540
+ /* eslint-disable max-len -- classes Tailwind nos templates */
8541
+ /**
8542
+ * Indicador de carregamento circular. Substitui o `p-progressspinner` do PrimeNG.
8543
+ * O tamanho vem das classes do host (ex.: `class="h-12 w-12"`); a cor, de `text-ui-primary` (herdavel).
8544
+ *
8545
+ * <ui-progress-spinner class="h-12 w-12" strokeWidth="4" />
8546
+ */
8547
+ class SmzProgressSpinnerComponent {
8548
+ strokeWidth = input(4, ...(ngDevMode ? [{ debugName: "strokeWidth" }] : []));
8549
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzProgressSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8550
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: SmzProgressSpinnerComponent, isStandalone: true, selector: "ui-progress-spinner", inputs: { strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "progressbar", "aria-busy": "true" }, classAttribute: "inline-block h-10 w-10 text-ui-primary" }, ngImport: i0, template: `
8551
+ <svg viewBox="0 0 50 50" class="h-full w-full animate-spin" fill="none" aria-hidden="true">
8552
+ <circle cx="25" cy="25" r="20" stroke="currentColor" [attr.stroke-width]="strokeWidth()" stroke-linecap="round" stroke-dasharray="90 150" />
8553
+ </svg>
8554
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
8555
+ }
8556
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzProgressSpinnerComponent, decorators: [{
8557
+ type: Component,
8558
+ args: [{
8559
+ selector: 'ui-progress-spinner',
8560
+ changeDetection: ChangeDetectionStrategy.OnPush,
8561
+ host: { class: 'inline-block h-10 w-10 text-ui-primary', role: 'progressbar', 'aria-busy': 'true' },
8562
+ template: `
8563
+ <svg viewBox="0 0 50 50" class="h-full w-full animate-spin" fill="none" aria-hidden="true">
8564
+ <circle cx="25" cy="25" r="20" stroke="currentColor" [attr.stroke-width]="strokeWidth()" stroke-linecap="round" stroke-dasharray="90 150" />
8565
+ </svg>
8566
+ `,
8567
+ }]
8568
+ }], propDecorators: { strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }] } });
8569
+
8570
+ /* eslint-disable max-len -- classes Tailwind nos templates */
8571
+ const BASE = 'relative block [&_label]:pointer-events-none [&_label]:absolute [&_label]:left-3 [&_label]:z-10 [&_label]:text-ui-fg-subtle [&_label]:transition-all [&_label]:duration-ui';
8572
+ const RESTING = '[&_label]:top-1/2 [&_label]:-translate-y-1/2 [&_label]:text-ui-md';
8573
+ const FLOATED = {
8574
+ over: '[&_label]:-top-5 [&_label]:left-0 [&_label]:translate-y-0 [&_label]:text-ui-xs [&_label]:text-ui-fg-muted',
8575
+ on: '[&_label]:top-0 [&_label]:left-2 [&_label]:-translate-y-1/2 [&_label]:bg-ui-surface-1 [&_label]:px-1 [&_label]:text-ui-xs [&_label]:text-ui-fg-muted',
8576
+ in: '[&_label]:top-1.5 [&_label]:translate-y-0 [&_label]:text-ui-xs [&_label]:text-ui-fg-muted',
8577
+ };
8578
+ const IN_PADDING = '[&_input]:pt-4 [&_textarea]:pt-5 [&_[role=combobox]]:pt-4';
8579
+ /**
8580
+ * Rotulo flutuante. Substitui o `p-floatlabel` do PrimeNG.
8581
+ * O `<label>` projetado flutua quando o controle recebe foco ou tem valor
8582
+ * (detectado em `input`/`textarea` e em selects do kit; use `[filled]` para forcar).
8583
+ *
8584
+ * <ui-float-label variant="on"><input smzInputText id="n" /><label for="n">Nome</label></ui-float-label>
8585
+ */
8586
+ class SmzFloatLabelComponent {
8587
+ variant = input('over', ...(ngDevMode ? [{ debugName: "variant" }] : []));
8588
+ /** Forca o estado "preenchido" quando a deteccao automatica nao se aplica. */
8589
+ filled = input(null, ...(ngDevMode ? [{ debugName: "filled" }] : []));
8590
+ focused = signal(false, ...(ngDevMode ? [{ debugName: "focused" }] : []));
8591
+ detected = signal(false, ...(ngDevMode ? [{ debugName: "detected" }] : []));
8592
+ host = inject(ElementRef);
8593
+ floated = computed(() => this.focused() || (this.filled() ?? this.detected()), ...(ngDevMode ? [{ debugName: "floated" }] : []));
8594
+ classes = computed(() => {
8595
+ const variant = this.variant();
8596
+ return [BASE, this.floated() ? FLOATED[variant] : RESTING, variant === 'in' ? IN_PADDING : ''].join(' ');
8597
+ }, ...(ngDevMode ? [{ debugName: "classes" }] : []));
8598
+ constructor() {
8599
+ afterEveryRender(() => this.check());
8600
+ }
8601
+ check() {
8602
+ {
8603
+ const root = this.host.nativeElement;
8604
+ const field = root.querySelector('input:not([type=checkbox]):not([type=radio]), textarea');
8605
+ const combo = root.querySelector('[role=combobox]');
8606
+ let filled = false;
8607
+ if (field && field.value !== '')
8608
+ filled = true;
8609
+ else if (combo && !field)
8610
+ filled = !combo.querySelector('.text-ui-fg-subtle') && (combo.textContent ?? '').trim() !== '';
8611
+ if (filled !== this.detected())
8612
+ this.detected.set(filled);
8613
+ }
8614
+ }
8615
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzFloatLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8616
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: SmzFloatLabelComponent, isStandalone: true, selector: "ui-float-label", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, filled: { classPropertyName: "filled", publicName: "filled", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focusin": "focused.set(true)", "focusout": "focused.set(false); check()", "input": "check()", "change": "check()" }, properties: { "class": "classes()" } }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
8617
+ }
8618
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzFloatLabelComponent, decorators: [{
8619
+ type: Component,
8620
+ args: [{
8621
+ selector: 'ui-float-label',
8622
+ changeDetection: ChangeDetectionStrategy.OnPush,
8623
+ host: {
8624
+ '[class]': 'classes()',
8625
+ '(focusin)': 'focused.set(true)',
8626
+ '(focusout)': 'focused.set(false); check()',
8627
+ '(input)': 'check()',
8628
+ '(change)': 'check()',
8629
+ },
8630
+ template: '<ng-content />',
8631
+ }]
8632
+ }], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], filled: [{ type: i0.Input, args: [{ isSignal: true, alias: "filled", required: false }] }] } });
8633
+
8634
+ /* eslint-disable max-len -- classes Tailwind nos templates */
8635
+ /** Painel de um `ui-splitter`. O conteudo e projetado dentro da area do painel. */
8636
+ class SmzSplitterPanelComponent {
8637
+ content = viewChild.required(TemplateRef);
8638
+ /** Tamanho inicial em % (sobrescreve `panelSizes` do splitter). */
8639
+ size = input(null, ...(ngDevMode ? [{ debugName: "size" }] : []));
8640
+ minSize = input(null, ...(ngDevMode ? [{ debugName: "minSize" }] : []));
8641
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzSplitterPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8642
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.1", type: SmzSplitterPanelComponent, isStandalone: true, selector: "ui-splitter-panel", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, minSize: { classPropertyName: "minSize", publicName: "minSize", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: '<ng-template><ng-content /></ng-template>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
8643
+ }
8644
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzSplitterPanelComponent, decorators: [{
8645
+ type: Component,
8646
+ args: [{
8647
+ selector: 'ui-splitter-panel',
8648
+ changeDetection: ChangeDetectionStrategy.OnPush,
8649
+ template: '<ng-template><ng-content /></ng-template>',
8650
+ }]
8651
+ }], propDecorators: { content: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], minSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSize", required: false }] }] } });
8652
+ /**
8653
+ * Divisor redimensionavel. Substitui o `p-splitter` / `p-splitterPanel` do PrimeNG.
8654
+ *
8655
+ * <ui-splitter layout="horizontal" [panelSizes]="[30, 70]" [minSizes]="[10, 20]">
8656
+ * <ui-splitter-panel>A</ui-splitter-panel><ui-splitter-panel>B</ui-splitter-panel>
8657
+ * </ui-splitter>
8658
+ */
8659
+ class SmzSplitterComponent {
8660
+ layout = input('horizontal', ...(ngDevMode ? [{ debugName: "layout" }] : []));
8661
+ panelSizes = input(null, ...(ngDevMode ? [{ debugName: "panelSizes" }] : []));
8662
+ minSizes = input(null, ...(ngDevMode ? [{ debugName: "minSizes" }] : []));
8663
+ resizeEnd = output();
8664
+ panels = contentChildren(SmzSplitterPanelComponent, ...(ngDevMode ? [{ debugName: "panels" }] : []));
8665
+ root = viewChild.required('root');
8666
+ overrides = signal(null, ...(ngDevMode ? [{ debugName: "overrides" }] : []));
8667
+ sizes = computed(() => {
8668
+ const override = this.overrides();
8669
+ if (override && override.length === this.panels().length)
8670
+ return override;
8671
+ const panels = this.panels();
8672
+ const base = this.panelSizes() ?? [];
8673
+ const explicit = panels.map((panel, i) => panel.size() ?? base[i] ?? null);
8674
+ const known = explicit.reduce((sum, size) => sum + (size ?? 0), 0);
8675
+ const free = explicit.filter((size) => size === null).length;
8676
+ const share = free > 0 ? Math.max(0, 100 - known) / free : 0;
8677
+ return explicit.map((size) => size ?? share);
8678
+ }, ...(ngDevMode ? [{ debugName: "sizes" }] : []));
8679
+ min(index) {
8680
+ return this.panels()[index]?.minSize() ?? this.minSizes()?.[index] ?? 0;
8681
+ }
8682
+ startDrag(event, index) {
8683
+ event.preventDefault();
8684
+ const rect = this.root().nativeElement.getBoundingClientRect();
8685
+ const total = this.layout() === 'horizontal' ? rect.width : rect.height;
8686
+ const start = this.layout() === 'horizontal' ? event.clientX : event.clientY;
8687
+ const initial = [...this.sizes()];
8688
+ const move = (e) => {
8689
+ const delta = (((this.layout() === 'horizontal' ? e.clientX : e.clientY) - start) / total) * 100;
8690
+ this.resize(initial, index, delta);
8691
+ };
8692
+ const up = () => {
8693
+ document.removeEventListener('pointermove', move);
8694
+ document.removeEventListener('pointerup', up);
8695
+ this.resizeEnd.emit({ sizes: this.sizes() });
8696
+ };
8697
+ document.addEventListener('pointermove', move);
8698
+ document.addEventListener('pointerup', up);
8699
+ }
8700
+ onKey(event, index) {
8701
+ const keys = this.layout() === 'horizontal' ? { dec: 'ArrowLeft', inc: 'ArrowRight' } : { dec: 'ArrowUp', inc: 'ArrowDown' };
8702
+ if (event.key !== keys.dec && event.key !== keys.inc)
8703
+ return;
8704
+ event.preventDefault();
8705
+ this.resize([...this.sizes()], index, event.key === keys.inc ? 2 : -2);
8706
+ this.resizeEnd.emit({ sizes: this.sizes() });
8707
+ }
8708
+ resize(initial, index, delta) {
8709
+ const pair = initial[index] + initial[index + 1];
8710
+ const next = Math.min(Math.max(initial[index] + delta, this.min(index)), pair - this.min(index + 1));
8711
+ const sizes = [...initial];
8712
+ sizes[index] = next;
8713
+ sizes[index + 1] = pair - next;
8714
+ this.overrides.set(sizes);
8715
+ }
8716
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzSplitterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8717
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzSplitterComponent, isStandalone: true, selector: "ui-splitter", inputs: { layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, panelSizes: { classPropertyName: "panelSizes", publicName: "panelSizes", isSignal: true, isRequired: false, transformFunction: null }, minSizes: { classPropertyName: "minSizes", publicName: "minSizes", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { resizeEnd: "resizeEnd" }, host: { classAttribute: "block h-full w-full overflow-hidden rounded-control border border-ui-line bg-ui-surface-1 font-ui text-ui-md text-ui-fg" }, queries: [{ propertyName: "panels", predicate: SmzSplitterPanelComponent, isSignal: true }], viewQueries: [{ propertyName: "root", first: true, predicate: ["root"], descendants: true, isSignal: true }], ngImport: i0, template: `
8718
+ <div #root class="flex h-full w-full" [class.flex-col]="layout() === 'vertical'">
8719
+ @for (panel of panels(); track $index; let i = $index) {
8720
+ <div class="min-h-0 min-w-0 overflow-auto" [style.flex]="'0 0 ' + sizes()[i] + '%'" [style.width]="layout() === 'horizontal' ? sizes()[i] + '%' : null" [style.height]="layout() === 'vertical' ? sizes()[i] + '%' : null">
8721
+ <ng-container [ngTemplateOutlet]="panel.content()" />
8722
+ </div>
8723
+ @if (i < panels().length - 1) {
8724
+ <div
8725
+ role="separator"
8726
+ tabindex="0"
8727
+ class="shrink-0 bg-ui-line transition-colors duration-ui hover:bg-ui-primary focus-visible:bg-ui-primary focus-visible:outline-none"
8728
+ [class]="layout() === 'horizontal' ? 'w-1 cursor-col-resize' : 'h-1 cursor-row-resize'"
8729
+ [attr.aria-orientation]="layout() === 'horizontal' ? 'vertical' : 'horizontal'"
8730
+ (pointerdown)="startDrag($event, i)"
8731
+ (keydown)="onKey($event, i)"
8732
+ ></div>
8733
+ }
8734
+ }
8735
+ </div>
8736
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8737
+ }
8738
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzSplitterComponent, decorators: [{
8739
+ type: Component,
8740
+ args: [{
8741
+ selector: 'ui-splitter',
8742
+ changeDetection: ChangeDetectionStrategy.OnPush,
8743
+ imports: [NgTemplateOutlet],
8744
+ host: { class: 'block h-full w-full overflow-hidden rounded-control border border-ui-line bg-ui-surface-1 font-ui text-ui-md text-ui-fg' },
8745
+ template: `
8746
+ <div #root class="flex h-full w-full" [class.flex-col]="layout() === 'vertical'">
8747
+ @for (panel of panels(); track $index; let i = $index) {
8748
+ <div class="min-h-0 min-w-0 overflow-auto" [style.flex]="'0 0 ' + sizes()[i] + '%'" [style.width]="layout() === 'horizontal' ? sizes()[i] + '%' : null" [style.height]="layout() === 'vertical' ? sizes()[i] + '%' : null">
8749
+ <ng-container [ngTemplateOutlet]="panel.content()" />
8750
+ </div>
8751
+ @if (i < panels().length - 1) {
8752
+ <div
8753
+ role="separator"
8754
+ tabindex="0"
8755
+ class="shrink-0 bg-ui-line transition-colors duration-ui hover:bg-ui-primary focus-visible:bg-ui-primary focus-visible:outline-none"
8756
+ [class]="layout() === 'horizontal' ? 'w-1 cursor-col-resize' : 'h-1 cursor-row-resize'"
8757
+ [attr.aria-orientation]="layout() === 'horizontal' ? 'vertical' : 'horizontal'"
8758
+ (pointerdown)="startDrag($event, i)"
8759
+ (keydown)="onKey($event, i)"
8760
+ ></div>
8761
+ }
8762
+ }
8763
+ </div>
8764
+ `,
8765
+ }]
8766
+ }], propDecorators: { layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], panelSizes: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelSizes", required: false }] }], minSizes: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSizes", required: false }] }], resizeEnd: [{ type: i0.Output, args: ["resizeEnd"] }], panels: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SmzSplitterPanelComponent), { isSignal: true }] }], root: [{ type: i0.ViewChild, args: ['root', { isSignal: true }] }] } });
8767
+
8768
+ /* eslint-disable max-len -- classes Tailwind nos templates */
8769
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument, @typescript-eslint/explicit-module-boundary-types */
8770
+ const ROW_BASE = 'border-b border-ui-line transition-colors duration-ui';
8771
+ /**
8772
+ * Tabela em arvore. Substitui o `p-treeTable` do PrimeNG.
8773
+ * Os templates `colgroup`, `header`, `body`, `caption`, `footer`, `emptymessage` e `summary` usam `smzTemplate`;
8774
+ * o `body` recebe `let-rowNode let-rowData="rowData" let-columns="columns"`.
8775
+ *
8776
+ * <ui-tree-table [value]="nodes" [columns]="cols" selectionMode="checkbox" [(selection)]="sel">
8777
+ * <ng-template smzTemplate="header" let-columns><tr><th *ngFor="let c of columns">{{ c.header }}</th></tr></ng-template>
8778
+ * <ng-template smzTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
8779
+ * <tr [smzTtRow]="rowNode"><td><ui-tree-table-toggler [rowNode]="rowNode" />{{ rowData.name }}</td></tr>
8780
+ * </ng-template>
8781
+ * </ui-tree-table>
8782
+ */
8783
+ class SmzTreeTableComponent {
8784
+ value = input([], ...(ngDevMode ? [{ debugName: "value" }] : []));
8785
+ columns = input([], ...(ngDevMode ? [{ debugName: "columns" }] : []));
8786
+ selectionMode = input(null, ...(ngDevMode ? [{ debugName: "selectionMode" }] : []));
8787
+ selection = model(null, ...(ngDevMode ? [{ debugName: "selection" }] : []));
8788
+ propagateSelectionUp = input(true, { ...(ngDevMode ? { debugName: "propagateSelectionUp" } : {}), transform: booleanAttribute });
8789
+ propagateSelectionDown = input(true, { ...(ngDevMode ? { debugName: "propagateSelectionDown" } : {}), transform: booleanAttribute });
8790
+ loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : {}), transform: booleanAttribute });
8791
+ scrollable = input(false, { ...(ngDevMode ? { debugName: "scrollable" } : {}), transform: booleanAttribute });
8792
+ scrollHeight = input(null, ...(ngDevMode ? [{ debugName: "scrollHeight" }] : []));
8793
+ emptyMessage = input('', ...(ngDevMode ? [{ debugName: "emptyMessage" }] : []));
8794
+ tableStyleClass = input('', ...(ngDevMode ? [{ debugName: "tableStyleClass" }] : []));
8795
+ paginator = input(false, { ...(ngDevMode ? { debugName: "paginator" } : {}), transform: booleanAttribute });
8796
+ rows = model(10, ...(ngDevMode ? [{ debugName: "rows" }] : []));
8797
+ first = model(0, ...(ngDevMode ? [{ debugName: "first" }] : []));
8798
+ rowsPerPageOptions = input(null, ...(ngDevMode ? [{ debugName: "rowsPerPageOptions" }] : []));
8799
+ sortField = model(null, ...(ngDevMode ? [{ debugName: "sortField" }] : []));
8800
+ sortOrder = model(1, ...(ngDevMode ? [{ debugName: "sortOrder" }] : []));
8801
+ /** Destaca a linha sob o cursor (padrao: ligado). */
8802
+ rowHover = input(true, { ...(ngDevMode ? { debugName: "rowHover" } : {}), transform: booleanAttribute });
8803
+ showCurrentPageReport = input(false, { ...(ngDevMode ? { debugName: "showCurrentPageReport" } : {}), transform: booleanAttribute });
8804
+ currentPageReportTemplate = input('Mostrando {first} a {last} de {totalRecords}', ...(ngDevMode ? [{ debugName: "currentPageReportTemplate" }] : []));
8805
+ /** Campos (de `node.data`) consultados pelo filtro global. */
8806
+ globalFilterFields = input(null, ...(ngDevMode ? [{ debugName: "globalFilterFields" }] : []));
8807
+ /** `lenient`: um no que casa mantem toda a sua subarvore; `strict`: so os nos que casam (e seus ancestrais). */
8808
+ filterMode = input('lenient', ...(ngDevMode ? [{ debugName: "filterMode" }] : []));
8809
+ nodeSelect = output();
8810
+ nodeUnselect = output();
8811
+ nodeExpand = output();
8812
+ nodeCollapse = output();
8813
+ sorted = output();
8814
+ page = output();
8815
+ templates = contentChildren(SmzTemplateDirective, ...(ngDevMode ? [{ debugName: "templates" }] : []));
8816
+ headerTemplate = computed(() => smzFindTemplate(this.templates(), 'header'), ...(ngDevMode ? [{ debugName: "headerTemplate" }] : []));
8817
+ /** `<colgroup>` com as larguras das colunas (como no `p-treeTable`); quando existe, a tabela usa `table-layout: fixed`. */
8818
+ colgroupTemplate = computed(() => smzFindTemplate(this.templates(), 'colgroup'), ...(ngDevMode ? [{ debugName: "colgroupTemplate" }] : []));
8819
+ bodyTemplate = computed(() => smzFindTemplate(this.templates(), 'body'), ...(ngDevMode ? [{ debugName: "bodyTemplate" }] : []));
8820
+ captionTemplate = computed(() => smzFindTemplate(this.templates(), 'caption'), ...(ngDevMode ? [{ debugName: "captionTemplate" }] : []));
8821
+ footerTemplate = computed(() => smzFindTemplate(this.templates(), 'footer'), ...(ngDevMode ? [{ debugName: "footerTemplate" }] : []));
8822
+ emptyTemplate = computed(() => smzFindTemplate(this.templates(), 'emptymessage'), ...(ngDevMode ? [{ debugName: "emptyTemplate" }] : []));
8823
+ summaryTemplate = computed(() => smzFindTemplate(this.templates(), 'summary'), ...(ngDevMode ? [{ debugName: "summaryTemplate" }] : []));
8824
+ /** Os nos sao mutaveis (`expanded`, `partialSelected`); este contador forca o recalculo das linhas. */
8825
+ version = signal(0, ...(ngDevMode ? [{ debugName: "version" }] : []));
8826
+ filterService = inject(SmzFilterService);
8827
+ globalFilter = signal(null, ...(ngDevMode ? [{ debugName: "globalFilter" }] : []));
8828
+ columnFilters = signal({}, ...(ngDevMode ? [{ debugName: "columnFilters" }] : []));
8829
+ /** Nos raiz que passam nos filtros (global e por coluna), ou `null` quando nao ha filtro ativo. */
8830
+ get filteredNodes() {
8831
+ return this.visibility()?.roots ?? null;
8832
+ }
8833
+ /** Visibilidade calculada dos filtros: quais nos aparecem e quais ancestrais expandir. */
8834
+ visibility = computed(() => {
8835
+ this.version();
8836
+ const global = this.globalFilter();
8837
+ const columns = this.columnFilters();
8838
+ const active = Object.entries(columns).filter(([, filter]) => filter.value !== null && filter.value !== undefined && filter.value !== '');
8839
+ if (!global?.value && active.length === 0)
8840
+ return null;
8841
+ const matches = (node) => {
8842
+ for (const [field, filter] of active) {
8843
+ const test = this.filterService.filters[filter.matchMode] ?? this.filterService.filters['contains'];
8844
+ if (!test(SmzObjectUtils.resolveFieldData(node.data, field), filter.value))
8845
+ return false;
8846
+ }
8847
+ if (global?.value) {
8848
+ const test = this.filterService.filters[global.matchMode] ?? this.filterService.filters['contains'];
8849
+ const fields = this.globalFilterFields() ?? Object.keys(node.data ?? {});
8850
+ if (!fields.some((field) => test(SmzObjectUtils.resolveFieldData(node.data, field), global.value)))
8851
+ return false;
8852
+ }
8853
+ return true;
8854
+ };
8855
+ const visible = new Set();
8856
+ const expand = new Set();
8857
+ const lenient = this.filterMode() === 'lenient';
8858
+ const mark = (node, forced) => {
8859
+ const self = matches(node);
8860
+ let anyChild = false;
8861
+ for (const child of node.children ?? []) {
8862
+ if (mark(child, forced || (lenient && self)))
8863
+ anyChild = true;
8864
+ }
8865
+ const show = self || anyChild || forced;
8866
+ if (show)
8867
+ visible.add(node);
8868
+ if (anyChild && !self)
8869
+ expand.add(node);
8870
+ return self || anyChild;
8871
+ };
8872
+ const roots = (this.value() ?? []).filter((node) => mark(node, false));
8873
+ return { roots, visible, expand };
8874
+ }, ...(ngDevMode ? [{ debugName: "visibility" }] : []));
8875
+ rootCount = computed(() => this.visibility()?.roots.length ?? (this.value() ?? []).length, ...(ngDevMode ? [{ debugName: "rootCount" }] : []));
8876
+ flatRows = computed(() => {
8877
+ this.version();
8878
+ const field = this.sortField();
8879
+ const order = this.sortOrder();
8880
+ const filter = this.visibility();
8881
+ const out = [];
8882
+ const sort = (nodes) => field ? [...nodes].sort((a, b) => order * compareValues(SmzObjectUtils.resolveFieldData(a.data, field), SmzObjectUtils.resolveFieldData(b.data, field))) : nodes;
8883
+ const walk = (nodes, parent, level) => {
8884
+ for (const node of sort(nodes)) {
8885
+ if (filter && !filter.visible.has(node))
8886
+ continue;
8887
+ out.push({ node, parent, level });
8888
+ if ((node.expanded || filter?.expand.has(node)) && node.children?.length)
8889
+ walk(node.children, node, level + 1);
8890
+ }
8891
+ };
8892
+ walk(this.value() ?? [], null, 0);
8893
+ return out;
8894
+ }, ...(ngDevMode ? [{ debugName: "flatRows" }] : []));
8895
+ /** Linhas visiveis; com paginador, a pagina atual e calculada sobre os nos raiz. */
8896
+ pageRows = computed(() => {
8897
+ const all = this.flatRows();
8898
+ if (!this.paginator())
8899
+ return all;
8900
+ const roots = all.filter((row) => row.level === 0);
8901
+ const pageRoots = new Set(roots.slice(this.first(), this.first() + this.rows()).map((row) => row.node));
8902
+ let include = false;
8903
+ return all.filter((row) => {
8904
+ if (row.level === 0)
8905
+ include = pageRoots.has(row.node);
8906
+ return include;
8907
+ });
8908
+ }, ...(ngDevMode ? [{ debugName: "pageRows" }] : []));
8909
+ /** Filtro global (equivale a `filterGlobal` do `p-treeTable`). */
8910
+ filterGlobal(value, matchMode = 'contains') {
8911
+ this.globalFilter.set(value ? { value, matchMode } : null);
8912
+ this.first.set(0);
8913
+ }
8914
+ /** Filtro de uma coluna (campo de `node.data`). Valor vazio remove o filtro. */
8915
+ filter(value, field, matchMode = 'contains') {
8916
+ this.columnFilters.update((current) => ({ ...current, [field]: { value, matchMode } }));
8917
+ this.first.set(0);
8918
+ }
8919
+ /** Limpa filtros, ordenacao e volta para a primeira pagina (equivale a `clear()` do `p-treeTable`). */
8920
+ clear() {
8921
+ this.globalFilter.set(null);
8922
+ this.columnFilters.set({});
8923
+ this.sortField.set(null);
8924
+ this.sortOrder.set(1);
8925
+ this.first.set(0);
8926
+ }
8927
+ refresh() {
8928
+ this.version.update((v) => v + 1);
8929
+ }
8930
+ toggleNode(rowNode, event) {
8931
+ const node = rowNode.node;
8932
+ node.expanded = !node.expanded;
8933
+ (node.expanded ? this.nodeExpand : this.nodeCollapse).emit({ node, originalEvent: event });
8934
+ this.refresh();
8935
+ }
8936
+ sortBy(field) {
8937
+ const order = this.sortField() === field && this.sortOrder() === 1 ? -1 : 1;
8938
+ this.sortField.set(field);
8939
+ this.sortOrder.set(order);
8940
+ this.sorted.emit({ field, order });
8941
+ }
8942
+ isSelected(node) {
8943
+ const selection = this.selection();
8944
+ return Array.isArray(selection) ? selection.includes(node) : selection === node;
8945
+ }
8946
+ selectionState(node) {
8947
+ if (this.isSelected(node))
8948
+ return 'checked';
8949
+ return node.partialSelected ? 'partial' : 'unchecked';
8950
+ }
8951
+ onRowClick(rowNode, event) {
8952
+ const mode = this.selectionMode();
8953
+ const node = rowNode.node;
8954
+ if (!mode || node.selectable === false)
8955
+ return;
8956
+ if (mode === 'checkbox')
8957
+ return; // selecao so pelo checkbox
8958
+ const selected = this.isSelected(node);
8959
+ if (mode === 'single') {
8960
+ this.selection.set(selected ? null : node);
8961
+ }
8962
+ else {
8963
+ const current = Array.isArray(this.selection()) ? this.selection() : [];
8964
+ this.selection.set(selected ? current.filter((entry) => entry !== node) : [...current, node]);
8965
+ }
8966
+ (selected ? this.nodeUnselect : this.nodeSelect).emit({ node, originalEvent: event });
8967
+ }
8968
+ toggleCheckbox(rowNode, event) {
8969
+ const node = rowNode.node;
8970
+ const selected = this.isSelected(node);
8971
+ const set = new Set(Array.isArray(this.selection()) ? this.selection() : []);
8972
+ const apply = (target, value) => {
8973
+ if (value)
8974
+ set.add(target);
8975
+ else
8976
+ set.delete(target);
8977
+ target.partialSelected = false;
8978
+ if (this.propagateSelectionDown())
8979
+ target.children?.forEach((child) => apply(child, value));
8980
+ };
8981
+ apply(node, !selected);
8982
+ if (this.propagateSelectionUp()) {
8983
+ for (let parent = rowNode.parent; parent; parent = this.findParent(parent)) {
8984
+ const children = parent.children ?? [];
8985
+ const all = children.every((child) => set.has(child));
8986
+ const some = children.some((child) => set.has(child) || child.partialSelected);
8987
+ if (all)
8988
+ set.add(parent);
8989
+ else
8990
+ set.delete(parent);
8991
+ parent.partialSelected = !all && some;
8992
+ }
8993
+ }
8994
+ this.selection.set([...set]);
8995
+ (selected ? this.nodeUnselect : this.nodeSelect).emit({ node, originalEvent: event });
8996
+ this.refresh();
8997
+ }
8998
+ /** Marca/desmarca todos os nos (checkbox do cabecalho). */
8999
+ toggleAll(checked) {
9000
+ const set = new Set();
9001
+ const walk = (nodes) => {
9002
+ for (const node of nodes) {
9003
+ node.partialSelected = false;
9004
+ if (checked && node.selectable !== false)
9005
+ set.add(node);
9006
+ walk(node.children ?? []);
9007
+ }
9008
+ };
9009
+ walk(this.value() ?? []);
9010
+ this.selection.set([...set]);
9011
+ this.refresh();
9012
+ }
9013
+ allSelected() {
9014
+ const total = this.countNodes(this.value() ?? []);
9015
+ const selection = this.selection();
9016
+ return total > 0 && Array.isArray(selection) && selection.length >= total;
9017
+ }
9018
+ countNodes(nodes) {
9019
+ return nodes.reduce((sum, node) => sum + 1 + this.countNodes(node.children ?? []), 0);
9020
+ }
9021
+ findParent(node) {
9022
+ const search = (nodes, parent) => {
9023
+ for (const candidate of nodes) {
9024
+ if (candidate === node)
9025
+ return parent;
9026
+ const found = search(candidate.children ?? [], candidate);
9027
+ if (found !== undefined)
9028
+ return found;
9029
+ }
9030
+ return undefined;
9031
+ };
9032
+ return search(this.value() ?? [], null) ?? null;
9033
+ }
9034
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9035
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzTreeTableComponent, isStandalone: true, selector: "ui-tree-table", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, propagateSelectionUp: { classPropertyName: "propagateSelectionUp", publicName: "propagateSelectionUp", isSignal: true, isRequired: false, transformFunction: null }, propagateSelectionDown: { classPropertyName: "propagateSelectionDown", publicName: "propagateSelectionDown", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, tableStyleClass: { classPropertyName: "tableStyleClass", publicName: "tableStyleClass", isSignal: true, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, first: { classPropertyName: "first", publicName: "first", isSignal: true, isRequired: false, transformFunction: null }, rowsPerPageOptions: { classPropertyName: "rowsPerPageOptions", publicName: "rowsPerPageOptions", isSignal: true, isRequired: false, transformFunction: null }, sortField: { classPropertyName: "sortField", publicName: "sortField", isSignal: true, isRequired: false, transformFunction: null }, sortOrder: { classPropertyName: "sortOrder", publicName: "sortOrder", isSignal: true, isRequired: false, transformFunction: null }, rowHover: { classPropertyName: "rowHover", publicName: "rowHover", isSignal: true, isRequired: false, transformFunction: null }, showCurrentPageReport: { classPropertyName: "showCurrentPageReport", publicName: "showCurrentPageReport", isSignal: true, isRequired: false, transformFunction: null }, currentPageReportTemplate: { classPropertyName: "currentPageReportTemplate", publicName: "currentPageReportTemplate", isSignal: true, isRequired: false, transformFunction: null }, globalFilterFields: { classPropertyName: "globalFilterFields", publicName: "globalFilterFields", isSignal: true, isRequired: false, transformFunction: null }, filterMode: { classPropertyName: "filterMode", publicName: "filterMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selection: "selectionChange", rows: "rowsChange", first: "firstChange", sortField: "sortFieldChange", sortOrder: "sortOrderChange", nodeSelect: "nodeSelect", nodeUnselect: "nodeUnselect", nodeExpand: "nodeExpand", nodeCollapse: "nodeCollapse", sorted: "sorted", page: "page" }, host: { classAttribute: "block overflow-hidden rounded-control 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: `
9036
+ @if (captionTemplate(); as tpl) {
9037
+ <div class="border-b border-ui-line px-4 py-3"><ng-container [ngTemplateOutlet]="tpl" /></div>
9038
+ }
9039
+ <div class="relative overflow-auto" [style.max-height]="scrollable() ? scrollHeight() : null">
9040
+ <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() ?? '')">
9041
+ @if (colgroupTemplate(); as tpl) {
9042
+ <ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" />
9043
+ }
9044
+ <thead>
9045
+ @if (headerTemplate(); as tpl) {
9046
+ <ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" />
9047
+ }
9048
+ </thead>
9049
+ <tbody>
9050
+ @for (row of pageRows(); track row.node.key ?? row.node) {
9051
+ <ng-container [ngTemplateOutlet]="bodyTemplate() ?? null" [ngTemplateOutletContext]="{ $implicit: row, rowNode: row, node: row.node, rowData: row.node.data, columns: columns() }" />
9052
+ } @empty {
9053
+ @if (!loading()) {
9054
+ <tr>
9055
+ <td [attr.colspan]="columns().length || 1" class="px-4 py-6 text-center text-ui-fg-muted">
9056
+ @if (emptyTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" /> } @else { {{ emptyMessage() }} }
9057
+ </td>
9058
+ </tr>
9059
+ }
9060
+ }
9061
+ </tbody>
9062
+ @if (footerTemplate(); as tpl) {
9063
+ <tfoot><ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" /></tfoot>
9064
+ }
9065
+ </table>
9066
+ @if (loading()) {
9067
+ <div class="absolute inset-0 flex items-center justify-center bg-ui-surface-1/60 text-ui-primary" role="status">
9068
+ <svg viewBox="0 0 50 50" class="h-8 w-8 animate-spin" fill="none" aria-hidden="true"><circle cx="25" cy="25" r="20" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-dasharray="90 150" /></svg>
9069
+ </div>
9070
+ }
9071
+ </div>
9072
+ @if (paginator()) {
9073
+ <ui-paginator class="border-t border-ui-line" [first]="first()" [rows]="rows()" [totalRecords]="rootCount()" [rowsPerPageOptions]="rowsPerPageOptions()" [showCurrentPageReport]="showCurrentPageReport()" [currentPageReportTemplate]="currentPageReportTemplate()" (firstChange)="first.set($event)" (rowsChange)="rows.set($event)" (pageChanged)="page.emit($event)" />
9074
+ }
9075
+ @if (summaryTemplate(); as tpl) {
9076
+ <div class="border-t border-ui-line px-4 py-3"><ng-container [ngTemplateOutlet]="tpl" /></div>
9077
+ }
9078
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SmzPaginatorComponent, selector: "ui-paginator", inputs: ["first", "rows", "totalRecords", "pageLinkSize", "rowsPerPageOptions", "showCurrentPageReport", "currentPageReportTemplate", "alwaysShow", "showPageLinks", "styleClass", "dropdownAppendTo", "showFirstLastIcon"], outputs: ["firstChange", "rowsChange", "pageChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9079
+ }
9080
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableComponent, decorators: [{
9081
+ type: Component,
9082
+ args: [{
9083
+ selector: 'ui-tree-table',
9084
+ changeDetection: ChangeDetectionStrategy.OnPush,
9085
+ imports: [NgTemplateOutlet, SmzPaginatorComponent],
9086
+ host: { class: 'block overflow-hidden rounded-control border border-ui-line bg-ui-surface-1 font-ui text-ui-md text-ui-fg' },
9087
+ template: `
9088
+ @if (captionTemplate(); as tpl) {
9089
+ <div class="border-b border-ui-line px-4 py-3"><ng-container [ngTemplateOutlet]="tpl" /></div>
9090
+ }
9091
+ <div class="relative overflow-auto" [style.max-height]="scrollable() ? scrollHeight() : null">
9092
+ <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() ?? '')">
9093
+ @if (colgroupTemplate(); as tpl) {
9094
+ <ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" />
9095
+ }
9096
+ <thead>
9097
+ @if (headerTemplate(); as tpl) {
9098
+ <ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" />
9099
+ }
9100
+ </thead>
9101
+ <tbody>
9102
+ @for (row of pageRows(); track row.node.key ?? row.node) {
9103
+ <ng-container [ngTemplateOutlet]="bodyTemplate() ?? null" [ngTemplateOutletContext]="{ $implicit: row, rowNode: row, node: row.node, rowData: row.node.data, columns: columns() }" />
9104
+ } @empty {
9105
+ @if (!loading()) {
9106
+ <tr>
9107
+ <td [attr.colspan]="columns().length || 1" class="px-4 py-6 text-center text-ui-fg-muted">
9108
+ @if (emptyTemplate(); as tpl) { <ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" /> } @else { {{ emptyMessage() }} }
9109
+ </td>
9110
+ </tr>
9111
+ }
9112
+ }
9113
+ </tbody>
9114
+ @if (footerTemplate(); as tpl) {
9115
+ <tfoot><ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletContext]="{ $implicit: columns() }" /></tfoot>
9116
+ }
9117
+ </table>
9118
+ @if (loading()) {
9119
+ <div class="absolute inset-0 flex items-center justify-center bg-ui-surface-1/60 text-ui-primary" role="status">
9120
+ <svg viewBox="0 0 50 50" class="h-8 w-8 animate-spin" fill="none" aria-hidden="true"><circle cx="25" cy="25" r="20" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-dasharray="90 150" /></svg>
9121
+ </div>
9122
+ }
9123
+ </div>
9124
+ @if (paginator()) {
9125
+ <ui-paginator class="border-t border-ui-line" [first]="first()" [rows]="rows()" [totalRecords]="rootCount()" [rowsPerPageOptions]="rowsPerPageOptions()" [showCurrentPageReport]="showCurrentPageReport()" [currentPageReportTemplate]="currentPageReportTemplate()" (firstChange)="first.set($event)" (rowsChange)="rows.set($event)" (pageChanged)="page.emit($event)" />
9126
+ }
9127
+ @if (summaryTemplate(); as tpl) {
9128
+ <div class="border-t border-ui-line px-4 py-3"><ng-container [ngTemplateOutlet]="tpl" /></div>
9129
+ }
9130
+ `,
9131
+ }]
9132
+ }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], propagateSelectionUp: [{ type: i0.Input, args: [{ isSignal: true, alias: "propagateSelectionUp", required: false }] }], propagateSelectionDown: [{ type: i0.Input, args: [{ isSignal: true, alias: "propagateSelectionDown", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], scrollable: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollable", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], tableStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableStyleClass", required: false }] }], paginator: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginator", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }, { type: i0.Output, args: ["rowsChange"] }], first: [{ type: i0.Input, args: [{ isSignal: true, alias: "first", required: false }] }, { type: i0.Output, args: ["firstChange"] }], rowsPerPageOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowsPerPageOptions", required: false }] }], sortField: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortField", required: false }] }, { type: i0.Output, args: ["sortFieldChange"] }], sortOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortOrder", required: false }] }, { type: i0.Output, args: ["sortOrderChange"] }], rowHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowHover", required: false }] }], showCurrentPageReport: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCurrentPageReport", required: false }] }], currentPageReportTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPageReportTemplate", required: false }] }], globalFilterFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "globalFilterFields", required: false }] }], filterMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMode", required: false }] }], nodeSelect: [{ type: i0.Output, args: ["nodeSelect"] }], nodeUnselect: [{ type: i0.Output, args: ["nodeUnselect"] }], nodeExpand: [{ type: i0.Output, args: ["nodeExpand"] }], nodeCollapse: [{ type: i0.Output, args: ["nodeCollapse"] }], sorted: [{ type: i0.Output, args: ["sorted"] }], page: [{ type: i0.Output, args: ["page"] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SmzTemplateDirective), { isSignal: true }] }] } });
9133
+ function compareValues(a, b) {
9134
+ if (a == null && b == null)
9135
+ return 0;
9136
+ if (a == null)
9137
+ return -1;
9138
+ if (b == null)
9139
+ return 1;
9140
+ if (typeof a === 'string' && typeof b === 'string')
9141
+ return a.localeCompare(b);
9142
+ return a < b ? -1 : a > b ? 1 : 0;
9143
+ }
9144
+ /** Linha do corpo: `<tr [smzTtRow]="rowNode">`. Cuida de estilo, aria e selecao por clique. */
9145
+ class SmzTreeTableRowDirective {
9146
+ table = inject(SmzTreeTableComponent);
9147
+ rowNode = input.required({ ...(ngDevMode ? { debugName: "rowNode" } : {}), alias: 'smzTtRow' });
9148
+ classes = computed(() => {
9149
+ const mode = this.table.selectionMode();
9150
+ const selected = this.table.isSelected(this.rowNode().node);
9151
+ const hover = this.table.rowHover() ? 'hover:bg-ui-surface-3' : '';
9152
+ const interactive = mode && mode !== 'checkbox' ? `cursor-pointer ${hover}` : hover;
9153
+ return `${ROW_BASE} ${interactive} ${selected && mode !== 'checkbox' ? 'bg-ui-primary/10' : ''}`;
9154
+ }, ...(ngDevMode ? [{ debugName: "classes" }] : []));
9155
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableRowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
9156
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.1", type: SmzTreeTableRowDirective, isStandalone: true, selector: "tr[smzTtRow]", inputs: { rowNode: { classPropertyName: "rowNode", publicName: "smzTtRow", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "table.onRowClick(rowNode(), $event)" }, properties: { "class": "classes()", "attr.aria-level": "rowNode().level + 1", "attr.aria-expanded": "rowNode().node.children?.length ? !!rowNode().node.expanded : null", "attr.aria-selected": "table.selectionMode() ? table.isSelected(rowNode().node) : null" } }, ngImport: i0 });
9157
+ }
9158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableRowDirective, decorators: [{
9159
+ type: Directive,
9160
+ args: [{
9161
+ selector: 'tr[smzTtRow]',
9162
+ host: {
9163
+ '[class]': 'classes()',
9164
+ '[attr.aria-level]': 'rowNode().level + 1',
9165
+ '[attr.aria-expanded]': 'rowNode().node.children?.length ? !!rowNode().node.expanded : null',
9166
+ '[attr.aria-selected]': 'table.selectionMode() ? table.isSelected(rowNode().node) : null',
9167
+ '(click)': 'table.onRowClick(rowNode(), $event)',
9168
+ },
9169
+ }]
9170
+ }], propDecorators: { rowNode: [{ type: i0.Input, args: [{ isSignal: true, alias: "smzTtRow", required: true }] }] } });
9171
+ /** Seta de expandir/recolher com recuo por nivel: `<ui-tree-table-toggler [rowNode]="rowNode" />`. */
9172
+ class SmzTreeTableTogglerComponent {
9173
+ table = inject(SmzTreeTableComponent);
9174
+ rowNode = input.required(...(ngDevMode ? [{ debugName: "rowNode" }] : []));
9175
+ hasChildren() {
9176
+ const node = this.rowNode().node;
9177
+ return !node.leaf && (node.children?.length ?? 0) > 0;
9178
+ }
9179
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableTogglerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9180
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: SmzTreeTableTogglerComponent, isStandalone: true, selector: "ui-tree-table-toggler", inputs: { rowNode: { classPropertyName: "rowNode", publicName: "rowNode", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "style.padding-left.rem": "rowNode().level * 1.5" }, classAttribute: "inline-flex items-center align-middle" }, ngImport: i0, template: `
9181
+ <button type="button" class="inline-flex h-6 w-6 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" [class.invisible]="!hasChildren()" [attr.aria-label]="rowNode().node.expanded ? 'Recolher' : 'Expandir'" (click)="$event.stopPropagation(); table.toggleNode(rowNode(), $event)">
9182
+ <svg viewBox="0 0 16 16" class="h-4 w-4 transition-transform duration-ui" [class.rotate-90]="rowNode().node.expanded" fill="none" aria-hidden="true"><path d="M6 4l4 4-4 4" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>
9183
+ </button>
9184
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
9185
+ }
9186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableTogglerComponent, decorators: [{
9187
+ type: Component,
9188
+ args: [{
9189
+ selector: 'ui-tree-table-toggler',
9190
+ changeDetection: ChangeDetectionStrategy.OnPush,
9191
+ host: { class: 'inline-flex items-center align-middle', '[style.padding-left.rem]': 'rowNode().level * 1.5' },
9192
+ template: `
9193
+ <button type="button" class="inline-flex h-6 w-6 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" [class.invisible]="!hasChildren()" [attr.aria-label]="rowNode().node.expanded ? 'Recolher' : 'Expandir'" (click)="$event.stopPropagation(); table.toggleNode(rowNode(), $event)">
9194
+ <svg viewBox="0 0 16 16" class="h-4 w-4 transition-transform duration-ui" [class.rotate-90]="rowNode().node.expanded" fill="none" aria-hidden="true"><path d="M6 4l4 4-4 4" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>
9195
+ </button>
9196
+ `,
9197
+ }]
9198
+ }], propDecorators: { rowNode: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowNode", required: true }] }] } });
9199
+ /** Checkbox de selecao da linha (modo `checkbox`): `<ui-tree-table-checkbox [value]="rowNode" />`. */
9200
+ class SmzTreeTableCheckboxComponent {
9201
+ table = inject(SmzTreeTableComponent);
9202
+ value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
9203
+ state() {
9204
+ return this.table.selectionState(this.value().node);
9205
+ }
9206
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9207
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzTreeTableCheckboxComponent, isStandalone: true, selector: "ui-tree-table-checkbox", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "inline-flex align-middle" }, ngImport: i0, template: `
9208
+ <button type="button" role="checkbox" [attr.aria-checked]="state() === 'partial' ? 'mixed' : state() === 'checked'" class="inline-flex h-5 w-5 items-center justify-center rounded border transition-colors duration-ui focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus" [class]="state() === 'unchecked' ? 'border-ui-line-strong bg-ui-surface-1' : 'border-ui-primary bg-ui-primary text-ui-on-primary'" (click)="$event.stopPropagation(); table.toggleCheckbox(value(), $event)">
9209
+ @if (state() === 'checked') { <svg viewBox="0 0 16 16" class="h-3 w-3" fill="none" aria-hidden="true"><path d="M3.5 8.5l3 3 6-6.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></svg> }
9210
+ @else if (state() === 'partial') { <svg viewBox="0 0 16 16" class="h-3 w-3" fill="none" aria-hidden="true"><path d="M4 8h8" stroke="currentColor" stroke-width="2" stroke-linecap="round" /></svg> }
9211
+ </button>
9212
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
9213
+ }
9214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableCheckboxComponent, decorators: [{
9215
+ type: Component,
9216
+ args: [{
9217
+ selector: 'ui-tree-table-checkbox',
9218
+ changeDetection: ChangeDetectionStrategy.OnPush,
9219
+ host: { class: 'inline-flex align-middle' },
9220
+ template: `
9221
+ <button type="button" role="checkbox" [attr.aria-checked]="state() === 'partial' ? 'mixed' : state() === 'checked'" class="inline-flex h-5 w-5 items-center justify-center rounded border transition-colors duration-ui focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus" [class]="state() === 'unchecked' ? 'border-ui-line-strong bg-ui-surface-1' : 'border-ui-primary bg-ui-primary text-ui-on-primary'" (click)="$event.stopPropagation(); table.toggleCheckbox(value(), $event)">
9222
+ @if (state() === 'checked') { <svg viewBox="0 0 16 16" class="h-3 w-3" fill="none" aria-hidden="true"><path d="M3.5 8.5l3 3 6-6.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></svg> }
9223
+ @else if (state() === 'partial') { <svg viewBox="0 0 16 16" class="h-3 w-3" fill="none" aria-hidden="true"><path d="M4 8h8" stroke="currentColor" stroke-width="2" stroke-linecap="round" /></svg> }
9224
+ </button>
9225
+ `,
9226
+ }]
9227
+ }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }] } });
9228
+ /** Checkbox do cabecalho: seleciona/limpa todos os nos. */
9229
+ class SmzTreeTableHeaderCheckboxComponent {
9230
+ table = inject(SmzTreeTableComponent);
9231
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableHeaderCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9232
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzTreeTableHeaderCheckboxComponent, isStandalone: true, selector: "ui-tree-table-header-checkbox", host: { classAttribute: "inline-flex align-middle" }, ngImport: i0, template: `
9233
+ <button type="button" role="checkbox" [attr.aria-checked]="table.allSelected()" class="inline-flex h-5 w-5 items-center justify-center rounded border transition-colors duration-ui focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus" [class]="table.allSelected() ? 'border-ui-primary bg-ui-primary text-ui-on-primary' : 'border-ui-line-strong bg-ui-surface-1'" (click)="table.toggleAll(!table.allSelected())">
9234
+ @if (table.allSelected()) { <svg viewBox="0 0 16 16" class="h-3 w-3" fill="none" aria-hidden="true"><path d="M3.5 8.5l3 3 6-6.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></svg> }
9235
+ </button>
9236
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
9237
+ }
9238
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableHeaderCheckboxComponent, decorators: [{
9239
+ type: Component,
9240
+ args: [{
9241
+ selector: 'ui-tree-table-header-checkbox',
9242
+ changeDetection: ChangeDetectionStrategy.OnPush,
9243
+ host: { class: 'inline-flex align-middle' },
9244
+ template: `
9245
+ <button type="button" role="checkbox" [attr.aria-checked]="table.allSelected()" class="inline-flex h-5 w-5 items-center justify-center rounded border transition-colors duration-ui focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus" [class]="table.allSelected() ? 'border-ui-primary bg-ui-primary text-ui-on-primary' : 'border-ui-line-strong bg-ui-surface-1'" (click)="table.toggleAll(!table.allSelected())">
9246
+ @if (table.allSelected()) { <svg viewBox="0 0 16 16" class="h-3 w-3" fill="none" aria-hidden="true"><path d="M3.5 8.5l3 3 6-6.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></svg> }
9247
+ </button>
9248
+ `,
9249
+ }]
9250
+ }] });
9251
+ /** Cabecalho ordenavel: `<th [smzTtSortableColumn]="'nome'">Nome <ui-tree-table-sort-icon field="nome" /></th>`. */
9252
+ class SmzTreeTableSortableColumnDirective {
9253
+ table = inject(SmzTreeTableComponent);
9254
+ field = input.required({ ...(ngDevMode ? { debugName: "field" } : {}), alias: 'smzTtSortableColumn' });
9255
+ ariaSort() {
9256
+ return this.table.sortField() === this.field() ? (this.table.sortOrder() === 1 ? 'ascending' : 'descending') : 'none';
9257
+ }
9258
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableSortableColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
9259
+ 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: { "attr.aria-sort": "ariaSort()" }, classAttribute: "cursor-pointer select-none" }, ngImport: i0 });
9260
+ }
9261
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableSortableColumnDirective, decorators: [{
9262
+ type: Directive,
9263
+ args: [{
9264
+ selector: 'th[smzTtSortableColumn]',
9265
+ host: { class: 'cursor-pointer select-none', '(click)': 'table.sortBy(field())', '[attr.aria-sort]': 'ariaSort()' },
9266
+ }]
9267
+ }], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "smzTtSortableColumn", required: true }] }] } });
9268
+ class SmzTreeTableSortIconComponent {
9269
+ table = inject(SmzTreeTableComponent);
9270
+ field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
9271
+ dir() {
9272
+ return this.table.sortField() === this.field() ? this.table.sortOrder() : 0;
9273
+ }
9274
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableSortIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9275
+ 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: `
9276
+ <svg viewBox="0 0 16 16" class="h-3.5 w-3.5" fill="none" aria-hidden="true">
9277
+ <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" />
9278
+ <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" />
9279
+ </svg>
9280
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
9281
+ }
9282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableSortIconComponent, decorators: [{
9283
+ type: Component,
9284
+ args: [{
9285
+ selector: 'ui-tree-table-sort-icon',
9286
+ changeDetection: ChangeDetectionStrategy.OnPush,
9287
+ host: { class: 'ml-1 inline-flex align-middle text-ui-fg-muted' },
9288
+ template: `
9289
+ <svg viewBox="0 0 16 16" class="h-3.5 w-3.5" fill="none" aria-hidden="true">
9290
+ <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" />
9291
+ <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" />
9292
+ </svg>
9293
+ `,
9294
+ }]
9295
+ }], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }] } });
9296
+ const SMZ_TREE_TABLE = [
9297
+ SmzTreeTableComponent,
9298
+ SmzTreeTableRowDirective,
9299
+ SmzTreeTableTogglerComponent,
9300
+ SmzTreeTableCheckboxComponent,
9301
+ SmzTreeTableHeaderCheckboxComponent,
9302
+ SmzTreeTableSortableColumnDirective,
9303
+ SmzTreeTableSortIconComponent,
9304
+ SmzTemplateDirective,
9305
+ ];
9306
+
9307
+ /* eslint-disable max-len -- classes Tailwind nos templates */
9308
+ class SmzConfirmContentComponent {
9309
+ options = inject(SmzDialogConfig).data;
9310
+ ref = inject((SmzDialogRef));
9311
+ close(accepted) {
9312
+ this.ref.close(accepted);
9313
+ }
9314
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzConfirmContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9315
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzConfirmContentComponent, isStandalone: true, selector: "ui-confirm-content", ngImport: i0, template: `
9316
+ <div class="flex items-start gap-3 font-ui text-ui-md text-ui-fg">
9317
+ @if (options.icon) {
9318
+ <i [class]="options.icon + ' mt-0.5 text-ui-xl text-ui-warning'" aria-hidden="true"></i>
9319
+ }
9320
+ <p class="m-0 flex-1">{{ options.message }}</p>
9321
+ </div>
9322
+ <div class="mt-5 flex justify-end gap-2">
9323
+ @if (options.rejectVisible !== false) {
9324
+ <button smzButton type="button" severity="secondary" variant="outlined" [label]="options.rejectLabel ?? 'Não'" (click)="close(false)"></button>
9325
+ }
9326
+ @if (options.acceptVisible !== false) {
9327
+ <button smzButton type="button" [severity]="options.acceptSeverity ?? 'primary'" [label]="options.acceptLabel ?? 'Sim'" (click)="close(true)"></button>
9328
+ }
9329
+ </div>
9330
+ `, isInline: true, dependencies: [{ kind: "component", type: SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9331
+ }
9332
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzConfirmContentComponent, decorators: [{
9333
+ type: Component,
9334
+ args: [{
9335
+ selector: 'ui-confirm-content',
9336
+ changeDetection: ChangeDetectionStrategy.OnPush,
9337
+ imports: [SmzButtonComponent],
9338
+ template: `
9339
+ <div class="flex items-start gap-3 font-ui text-ui-md text-ui-fg">
9340
+ @if (options.icon) {
9341
+ <i [class]="options.icon + ' mt-0.5 text-ui-xl text-ui-warning'" aria-hidden="true"></i>
9342
+ }
9343
+ <p class="m-0 flex-1">{{ options.message }}</p>
9344
+ </div>
9345
+ <div class="mt-5 flex justify-end gap-2">
9346
+ @if (options.rejectVisible !== false) {
9347
+ <button smzButton type="button" severity="secondary" variant="outlined" [label]="options.rejectLabel ?? 'Não'" (click)="close(false)"></button>
9348
+ }
9349
+ @if (options.acceptVisible !== false) {
9350
+ <button smzButton type="button" [severity]="options.acceptSeverity ?? 'primary'" [label]="options.acceptLabel ?? 'Sim'" (click)="close(true)"></button>
9351
+ }
9352
+ </div>
9353
+ `,
9354
+ }]
9355
+ }] });
9356
+ /**
9357
+ * Confirmacao modal. Substitui o `ConfirmationService` + `<p-confirmdialog>` do PrimeNG
9358
+ * (nao ha componente a declarar no template).
9359
+ *
9360
+ * confirm.confirm({ message: 'Excluir?', header: 'Confirmacao', icon: 'fa-solid fa-triangle-exclamation', accept: () => ..., reject: () => ... });
9361
+ */
9362
+ class SmzConfirmationService {
9363
+ dialogs = inject(SmzDialogService);
9364
+ confirm(confirmation) {
9365
+ const ref = this.dialogs.open(SmzConfirmContentComponent, {
9366
+ header: confirmation.header ?? 'Confirmação',
9367
+ width: confirmation.width ?? '28rem',
9368
+ closeOnEscape: confirmation.closeOnEscape ?? true,
9369
+ data: confirmation,
9370
+ });
9371
+ ref.onClose.subscribe((accepted) => {
9372
+ if (accepted === true)
9373
+ confirmation.accept?.();
9374
+ else
9375
+ confirmation.reject?.();
9376
+ });
9377
+ return ref;
9378
+ }
9379
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzConfirmationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9380
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzConfirmationService, providedIn: 'root' });
9381
+ }
9382
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzConfirmationService, decorators: [{
9383
+ type: Injectable,
9384
+ args: [{ providedIn: 'root' }]
9385
+ }] });
9386
+
9387
+ /* eslint-disable max-len -- classes Tailwind nos templates */
9388
+ /**
9389
+ * Selecao de arquivos com area de arrastar e soltar e lista de escolhidos.
9390
+ * Substitui o `p-fileupload` (modo `basic`/`advanced` sem envio automatico): o envio ao servidor
9391
+ * fica a cargo do app (ex.: `HttpClient` no handler de `(selected)`).
9392
+ *
9393
+ * <ui-file-upload accept="image/*" [multiple]="true" [maxFileSize]="1000000" (selected)="enviar($event.files)" />
9394
+ */
9395
+ class SmzFileUploadComponent {
9396
+ accept = input('', ...(ngDevMode ? [{ debugName: "accept" }] : []));
9397
+ multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : {}), transform: booleanAttribute });
9398
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
9399
+ /** Tamanho maximo por arquivo, em bytes. */
9400
+ maxFileSize = input(null, ...(ngDevMode ? [{ debugName: "maxFileSize" }] : []));
9401
+ chooseLabel = input('Escolher arquivo', ...(ngDevMode ? [{ debugName: "chooseLabel" }] : []));
9402
+ dropLabel = input('ou arraste aqui', ...(ngDevMode ? [{ debugName: "dropLabel" }] : []));
9403
+ selected = output();
9404
+ removed = output();
9405
+ rejected = output();
9406
+ files = signal([], ...(ngDevMode ? [{ debugName: "files" }] : []));
9407
+ dragging = signal(false, ...(ngDevMode ? [{ debugName: "dragging" }] : []));
9408
+ fileInput = viewChild.required('picker');
9409
+ /** Limpa a lista (equivale a `clear()` do `p-fileupload`). */
9410
+ clear() {
9411
+ this.files.set([]);
9412
+ this.fileInput().nativeElement.value = '';
9413
+ }
9414
+ onPick(event) {
9415
+ const target = event.target;
9416
+ this.add(Array.from(target.files ?? []), event);
9417
+ target.value = '';
9418
+ }
9419
+ onDragOver(event) {
9420
+ if (this.disabled())
9421
+ return;
9422
+ event.preventDefault();
9423
+ this.dragging.set(true);
9424
+ }
9425
+ onDrop(event) {
9426
+ event.preventDefault();
9427
+ this.dragging.set(false);
9428
+ if (this.disabled())
9429
+ return;
9430
+ this.add(Array.from(event.dataTransfer?.files ?? []), event);
9431
+ }
9432
+ remove(file) {
9433
+ this.files.update((list) => list.filter((entry) => entry !== file));
9434
+ this.removed.emit({ file });
9435
+ }
9436
+ size(file) {
9437
+ return file.size < 1024 * 1024 ? `${Math.max(1, Math.round(file.size / 1024))} KB` : `${(file.size / 1024 / 1024).toFixed(1)} MB`;
9438
+ }
9439
+ add(incoming, event) {
9440
+ const accepted = [];
9441
+ for (const file of incoming) {
9442
+ if (!this.matchesAccept(file))
9443
+ this.rejected.emit({ file, reason: 'type' });
9444
+ else if (this.maxFileSize() != null && file.size > this.maxFileSize())
9445
+ this.rejected.emit({ file, reason: 'size' });
9446
+ else
9447
+ accepted.push(file);
9448
+ }
9449
+ if (accepted.length === 0)
9450
+ return;
9451
+ const next = this.multiple() ? [...this.files(), ...accepted] : [accepted[0]];
9452
+ this.files.set(next);
9453
+ this.selected.emit({ files: next, originalEvent: event });
9454
+ }
9455
+ matchesAccept(file) {
9456
+ const accept = (this.accept() ?? '').trim();
9457
+ if (!accept)
9458
+ return true;
9459
+ return accept.split(',').map((rule) => rule.trim().toLowerCase()).some((rule) => {
9460
+ if (rule.startsWith('.'))
9461
+ return file.name.toLowerCase().endsWith(rule);
9462
+ if (rule.endsWith('/*'))
9463
+ return file.type.toLowerCase().startsWith(rule.slice(0, -1));
9464
+ return file.type.toLowerCase() === rule;
9465
+ });
9466
+ }
9467
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9468
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzFileUploadComponent, isStandalone: true, selector: "ui-file-upload", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, chooseLabel: { classPropertyName: "chooseLabel", publicName: "chooseLabel", isSignal: true, isRequired: false, transformFunction: null }, dropLabel: { classPropertyName: "dropLabel", publicName: "dropLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected", removed: "removed", rejected: "rejected" }, host: { classAttribute: "block font-ui text-ui-md text-ui-fg" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["picker"], descendants: true, isSignal: true }], ngImport: i0, template: `
9469
+ <input #picker type="file" class="sr-only" [accept]="accept() ?? ''" [multiple]="multiple()" [disabled]="disabled()" (change)="onPick($event)" />
9470
+ <div
9471
+ class="flex flex-col items-center justify-center gap-2 rounded-card border-2 border-dashed p-6 text-center transition-colors duration-ui"
9472
+ [class]="dragging() ? 'border-ui-primary bg-ui-primary/10' : 'border-ui-line-strong bg-ui-surface-1'"
9473
+ [class.opacity-50]="disabled()"
9474
+ (dragover)="onDragOver($event)"
9475
+ (dragleave)="dragging.set(false)"
9476
+ (drop)="onDrop($event)"
9477
+ >
9478
+ <button type="button" class="rounded-control border border-ui-line-strong px-control-x py-2 font-medium transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:pointer-events-none" [disabled]="disabled()" (click)="picker.click()">{{ chooseLabel() }}</button>
9479
+ <span class="text-ui-sm text-ui-fg-muted">{{ dropLabel() }}</span>
9480
+ </div>
9481
+ @if (files().length > 0) {
9482
+ <ul class="m-0 mt-3 flex list-none flex-col gap-2 p-0">
9483
+ @for (file of files(); track file) {
9484
+ <li class="flex items-center justify-between gap-2 rounded-control border border-ui-line px-3 py-2">
9485
+ <span class="min-w-0 flex-1 truncate">{{ file.name }} <span class="text-ui-sm text-ui-fg-muted">({{ size(file) }})</span></span>
9486
+ <button type="button" class="inline-flex h-6 w-6 items-center justify-center rounded-full text-ui-fg-muted hover:bg-ui-surface-3" aria-label="Remover" (click)="remove(file)">
9487
+ <svg viewBox="0 0 16 16" class="h-3 w-3" fill="none" aria-hidden="true"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" /></svg>
9488
+ </button>
9489
+ </li>
9490
+ }
9491
+ </ul>
9492
+ }
9493
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
9494
+ }
9495
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzFileUploadComponent, decorators: [{
9496
+ type: Component,
9497
+ args: [{
9498
+ selector: 'ui-file-upload',
9499
+ changeDetection: ChangeDetectionStrategy.OnPush,
9500
+ host: { class: 'block font-ui text-ui-md text-ui-fg' },
9501
+ template: `
9502
+ <input #picker type="file" class="sr-only" [accept]="accept() ?? ''" [multiple]="multiple()" [disabled]="disabled()" (change)="onPick($event)" />
9503
+ <div
9504
+ class="flex flex-col items-center justify-center gap-2 rounded-card border-2 border-dashed p-6 text-center transition-colors duration-ui"
9505
+ [class]="dragging() ? 'border-ui-primary bg-ui-primary/10' : 'border-ui-line-strong bg-ui-surface-1'"
9506
+ [class.opacity-50]="disabled()"
9507
+ (dragover)="onDragOver($event)"
9508
+ (dragleave)="dragging.set(false)"
9509
+ (drop)="onDrop($event)"
9510
+ >
9511
+ <button type="button" class="rounded-control border border-ui-line-strong px-control-x py-2 font-medium transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus disabled:pointer-events-none" [disabled]="disabled()" (click)="picker.click()">{{ chooseLabel() }}</button>
9512
+ <span class="text-ui-sm text-ui-fg-muted">{{ dropLabel() }}</span>
9513
+ </div>
9514
+ @if (files().length > 0) {
9515
+ <ul class="m-0 mt-3 flex list-none flex-col gap-2 p-0">
9516
+ @for (file of files(); track file) {
9517
+ <li class="flex items-center justify-between gap-2 rounded-control border border-ui-line px-3 py-2">
9518
+ <span class="min-w-0 flex-1 truncate">{{ file.name }} <span class="text-ui-sm text-ui-fg-muted">({{ size(file) }})</span></span>
9519
+ <button type="button" class="inline-flex h-6 w-6 items-center justify-center rounded-full text-ui-fg-muted hover:bg-ui-surface-3" aria-label="Remover" (click)="remove(file)">
9520
+ <svg viewBox="0 0 16 16" class="h-3 w-3" fill="none" aria-hidden="true"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" /></svg>
9521
+ </button>
9522
+ </li>
9523
+ }
9524
+ </ul>
9525
+ }
9526
+ `,
9527
+ }]
9528
+ }], propDecorators: { accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], maxFileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFileSize", required: false }] }], chooseLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "chooseLabel", required: false }] }], dropLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropLabel", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], removed: [{ type: i0.Output, args: ["removed"] }], rejected: [{ type: i0.Output, args: ["rejected"] }], fileInput: [{ type: i0.ViewChild, args: ['picker', { isSignal: true }] }] } });
9529
+
7994
9530
  /**
7995
9531
  * Generated bundle index. Do not edit.
7996
9532
  */
7997
9533
 
7998
- export { SMZ_DIALOG_CONTENT, SMZ_SOFT_TONE, SMZ_SOLID_TONE, SmzAccordionComponent, SmzAccordionContentComponent, SmzAccordionHeaderComponent, SmzAccordionPanelComponent, SmzAnchoredPanel, SmzAutoCompleteComponent, SmzAutoFocusDirective, SmzBadgeComponent, SmzBadgeDirective, SmzBlockUiComponent, SmzButtonComponent, SmzCheckboxComponent, SmzColorPickerComponent, SmzConnectedOverlayScrollHandler, SmzDataViewComponent, SmzDatePickerComponent, SmzDialogComponent, SmzDialogConfig, SmzDialogFrameComponent, SmzDialogRef, SmzDialogService, SmzDividerComponent, SmzDomHandler, SmzDrawerComponent, SmzFilterMatchMode, SmzFilterOperator, SmzFilterService, SmzIconComponent, SmzIconFieldComponent, SmzInputGroupAddonComponent, SmzInputGroupComponent, SmzInputIconComponent, SmzInputMaskComponent, SmzInputNumberComponent, SmzInputTextDirective, SmzListboxComponent, SmzLocaleService, SmzMenuListComponent, SmzMessageComponent, SmzMessageService, SmzMultiSelectComponent, SmzObjectUtils, SmzPaginatorComponent, SmzPasswordComponent, SmzPickListComponent, SmzPopoverComponent, SmzProgressBarComponent, SmzRadioButtonComponent, SmzRippleDirective, SmzSelectButtonComponent, SmzSelectComponent, SmzSkeletonComponent, SmzStyleClassDirective, SmzTabComponent, SmzTabListComponent, SmzTabPanelComponent, SmzTabPanelsComponent, SmzTabsComponent, SmzTagComponent, SmzTemplateDirective, SmzTextareaDirective, SmzThemeService, SmzToastContainerComponent, SmzToggleSwitchComponent, SmzToolbarComponent, SmzTooltipComponent, SmzTooltipDirective, SmzTranslationKeys, SmzTreeSelectComponent, SmzUiTimelineComponent, SmzUiTreeComponent, SmzValueAccessor, SmzZIndex, filterOptions, optionDisabled, optionLabel, optionValue, sameValue, smzCalendarStart, smzCx, smzFindTemplate, smzFormatDate, smzMergeClasses, smzNormalizeSeverity, smzNormalizeStyleClass, smzParseButtonStyleClass, smzParseDate, smzSameDay, smzStartOfDay, smzStaticHostClass, smzTwoDigits, smzUniqueId, smzVariants };
9534
+ export { SMZ_DIALOG_CONTENT, SMZ_SOFT_TONE, SMZ_SOLID_TONE, SMZ_TREE_TABLE, SmzAccordionComponent, SmzAccordionContentComponent, SmzAccordionHeaderComponent, SmzAccordionPanelComponent, SmzAnchoredPanel, SmzAutoCompleteComponent, SmzAutoFocusDirective, SmzBadgeComponent, SmzBadgeDirective, SmzBlockUiComponent, SmzButtonComponent, SmzCardComponent, SmzCheckboxComponent, SmzColorPickerComponent, SmzConfirmContentComponent, SmzConfirmationService, SmzConnectedOverlayScrollHandler, SmzDataViewComponent, SmzDatePickerComponent, SmzDialogComponent, SmzDialogConfig, SmzDialogFrameComponent, SmzDialogRef, SmzDialogService, SmzDividerComponent, SmzDomHandler, SmzDrawerComponent, SmzFileUploadComponent, SmzFilterMatchMode, SmzFilterOperator, SmzFilterService, SmzFloatLabelComponent, SmzIconComponent, SmzIconFieldComponent, SmzInputGroupAddonComponent, SmzInputGroupComponent, SmzInputIconComponent, SmzInputMaskComponent, SmzInputNumberComponent, SmzInputTextDirective, SmzListboxComponent, SmzLocaleService, SmzMenuListComponent, SmzMessageComponent, SmzMessageService, SmzMultiSelectComponent, SmzObjectUtils, SmzPaginatorComponent, SmzPanelComponent, SmzPasswordComponent, SmzPickListComponent, SmzPopoverComponent, SmzProgressBarComponent, SmzProgressSpinnerComponent, SmzRadioButtonComponent, SmzRippleDirective, SmzSelectButtonComponent, SmzSelectComponent, SmzSkeletonComponent, SmzSplitterComponent, SmzSplitterPanelComponent, SmzStyleClassDirective, SmzTabComponent, SmzTabListComponent, SmzTabPanelComponent, SmzTabPanelsComponent, SmzTabsComponent, SmzTagComponent, SmzTemplateDirective, SmzTextareaDirective, SmzThemeService, SmzToastContainerComponent, SmzToggleSwitchComponent, SmzToolbarComponent, SmzTooltipComponent, SmzTooltipDirective, SmzTranslationKeys, SmzTreeSelectComponent, SmzTreeTableCheckboxComponent, SmzTreeTableComponent, SmzTreeTableHeaderCheckboxComponent, SmzTreeTableRowDirective, SmzTreeTableSortIconComponent, SmzTreeTableSortableColumnDirective, SmzTreeTableTogglerComponent, SmzUiTimelineComponent, SmzUiTreeComponent, SmzValueAccessor, SmzZIndex, filterOptions, optionDisabled, optionLabel, optionValue, sameValue, smzCalendarStart, smzCx, smzFindTemplate, smzFormatDate, smzMergeClasses, smzNormalizeSeverity, smzNormalizeStyleClass, smzParseButtonStyleClass, smzParseDate, smzSameDay, smzStartOfDay, smzStaticHostClass, smzTwoDigits, smzUniqueId, smzVariants };
7999
9535
  //# sourceMappingURL=ngx-smz-ui-kit.mjs.map