structra-ui 0.2.17 → 0.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "structra-ui",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "description": "Biblioteca de componentes Angular da StructraLab (UI reutilizável).",
5
5
  "homepage": "https://structralab.com/",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ChangeDetectorRef, Injector, DestroyRef, EventEmitter, OnChanges, OnInit, SimpleChanges, DoCheck, AfterViewInit, TemplateRef, OnDestroy, AfterContentInit, QueryList, Signal, ElementRef } from '@angular/core';
2
+ import { ChangeDetectorRef, Injector, DestroyRef, EventEmitter, OnChanges, OnInit, SimpleChanges, DoCheck, AfterViewInit, TemplateRef, OnDestroy, AfterContentInit, QueryList, Signal, Renderer2, ElementRef } from '@angular/core';
3
3
  import { ControlValueAccessor, AbstractControl, NgControl, ValidatorFn } from '@angular/forms';
4
4
  import { MatDatepicker } from '@angular/material/datepicker';
5
5
  import * as _angular_cdk_overlay from '@angular/cdk/overlay';
@@ -2808,6 +2808,7 @@ declare class ThemeDirective implements OnChanges {
2808
2808
  theme: StructraTheme | AppTheme;
2809
2809
  private readonly elementRef;
2810
2810
  private readonly renderer;
2811
+ private readonly themeService;
2811
2812
  private readonly themeTokenClasses;
2812
2813
  ngOnChanges(): void;
2813
2814
  static ɵfac: i0.ɵɵFactoryDeclaration<ThemeDirective, never>;
@@ -2826,6 +2827,12 @@ declare function getThemeClass(theme: StructraTheme | string): string;
2826
2827
  */
2827
2828
  declare function injectEffectiveThemeId(appTheme: Signal<StructraTheme | AppTheme | undefined | null>): Signal<AppThemeId>;
2828
2829
 
2830
+ /**
2831
+ * Remove classes de tema do host e, se `explicitTheme` estiver definido, aplica `.app-library-theme`
2832
+ * + `theme-*`. Caso contrário deixa o host sem paleta própria (herda do ancestral / wrapper).
2833
+ */
2834
+ declare function applyOptionalThemeHostClasses(renderer: Renderer2, element: HTMLElement, explicitTheme: StructraTheme | AppTheme | string | undefined | null): void;
2835
+
2829
2836
  /** Classes aplicadas ao painel CDK Dialog + tema da app. */
2830
2837
  declare function libDialogPanelClasses(theme: AppThemeService, extra?: string | string[]): string[];
2831
2838
 
@@ -3361,15 +3368,16 @@ declare const APP_SIDEBAR_NAV_REVEAL_TOTAL_MS: number;
3361
3368
  *
3362
3369
  * Use `exportAs: 'appShell'` e `toggleMobileNav` / `toggleSidebarCollapsed` a partir da topbar.
3363
3370
  *
3364
- * Tema no host: `[appTheme]="'purple'"` como no resto da lib; omitir = {@link AppThemeService}.
3371
+ * Tema no host opcional; sem ele, herda de ancestral com {@link ThemeDirective}.
3365
3372
  */
3366
3373
  declare class AppShellComponent implements OnInit {
3367
3374
  private readonly bp;
3368
3375
  private readonly cdr;
3369
3376
  private readonly destroyRef;
3377
+ private readonly hostEl;
3378
+ private readonly renderer;
3370
3379
  readonly appTheme: i0.InputSignal<"blue" | "green" | "purple" | "orange" | "white" | "gray" | "sepia" | "black" | AppTheme | undefined>;
3371
- readonly effectiveThemeId: i0.Signal<"blue" | "green" | "purple" | "orange" | "white" | "gray" | "sepia" | "black">;
3372
- protected readonly hostThemeClass: i0.Signal<string>;
3380
+ constructor();
3373
3381
  private readonly sidebarSlot?;
3374
3382
  /** Conteúdo lateral (obrigatório): `<ng-template appShellSidebar>...</ng-template>`. */
3375
3383
  get sidebarTemplate(): TemplateRef<unknown> | null;
@@ -3420,16 +3428,16 @@ declare class AppShellSidebarTemplateDirective {
3420
3428
  * Com `collapsed`, `app-menu-list` usa `compressText`: rótulos de grupo (ex. «Principal») ficam ocultos;
3421
3429
  * itens mostram só ícones com `title` / `aria-label` para acessibilidade.
3422
3430
  *
3423
- * Tema: use `[appTheme]="'purple'"` (ou outro id) no host igual ao `[appTheme]` da lib; sem input,
3424
- * segue {@link AppThemeService}.
3431
+ * Tema: `[appTheme]` opcional no host; sem ele, herda paleta de um ancestral com {@link ThemeDirective}
3432
+ * (ex.: `<div appTheme="purple">`). Com input explícito, aplica as classes no host.
3425
3433
  */
3426
3434
  declare class AppSidebarComponent<T extends string = string> implements OnChanges {
3427
3435
  private readonly cdr;
3428
3436
  private readonly destroyRef;
3429
- /** Igual a `[appTheme]` / {@link ThemeDirective}: paleta explícita; omitir = tema global. */
3437
+ private readonly hostEl;
3438
+ private readonly renderer;
3439
+ /** Igual a `[appTheme]` / {@link ThemeDirective}: paleta explícita no host; omitir = herdar / serviço. */
3430
3440
  readonly appTheme: i0.InputSignal<"blue" | "green" | "purple" | "orange" | "white" | "gray" | "sepia" | "black" | AppTheme | undefined>;
3431
- readonly effectiveThemeId: i0.Signal<"blue" | "green" | "purple" | "orange" | "white" | "gray" | "sepia" | "black">;
3432
- protected readonly hostThemeClass: i0.Signal<string>;
3433
3441
  items: readonly MenuNodeItem<T>[];
3434
3442
  menuId: string;
3435
3443
  /** Sincronizar com o item de navegação activo (realce persistente). */
@@ -3536,5 +3544,5 @@ declare class AppBreadcrumbComponent {
3536
3544
  static ɵcmp: i0.ɵɵComponentDeclaration<AppBreadcrumbComponent, "app-breadcrumb", never, { "items": { "alias": "items"; "required": true; }; }, {}, never, never, true, never>;
3537
3545
  }
3538
3546
 
3539
- export { ADAPTIVE_DATA_VIEW_MOBILE_QUERY, APP_SIDEBAR_LABEL_REVEAL_LAG_MS, APP_SIDEBAR_LAYOUT_DURATION_MS, APP_SIDEBAR_NAV_REVEAL_TOTAL_MS, APP_THEME_BASE_CLASS, APP_THEME_IDS, ActionMenuComponent, AdaptiveDataViewComponent, AlertComponent, AnchoredOverlayComponent, AppBreadcrumbComponent, AppDialogComponent, AppLibLightBlockScrollStrategy, AppShellComponent, AppShellSidebarTemplateDirective, AppShellSidebarToggleComponent, AppSidebarComponent, AppSidebarToolbarDirective, AppTheme, AppThemeService, AppTopbarComponent, AppUserMenuComponent, BR_ESTADOS_NOME_SIGLA, BaseFieldComponent, BaseFieldDirective, BooleanFieldDirective, ButtonComponent, ButtonRadius, ButtonSize, ButtonType, ButtonVariant, CardListComponent, CepFieldComponent, CheckboxFieldComponent, ConfirmDialogComponent, ConfirmDialogService, ContextMenuComponent, CpfCnpjFieldComponent, DashboardSectionComponent, DataCardComponent, DataGridComponent, DataListComponent, DataToolbarComponent, DateFieldComponent, DecimalFieldComponent, DetailsFieldComponent, DetailsViewComponent, DialogFooterDirective, DividerComponent, DrawerComponent, DrawerSide, DrawerSize, DropdownBaseComponent, DropdownMenuComponent, DropdownMultiOptionFieldBase, DropdownOptionFieldBase, DropdownSearchFieldComponent, EmptyStateComponent, FILE_PREVIEW_UNAVAILABLE_MESSAGE, FileUploadFieldComponent, FormActionsAlign, FormActionsComponent, FormColComponent, FormGroupComponent, FormGroupVariant, FormLayoutGap, FormRowAlign, FormRowComponent, FormRowJustify, FormSectionAlign, FormSectionComponent, FormSectionRadius, FormSectionVariant, FormTabComponent, FormTabsComponent, ImagePreviewPanelComponent, InputMaskFieldComponent, IntegerFieldComponent, LAYOUT_STACK_SIDE_BY_SIDE, LAYOUT_STACK_STACKED, LayoutStackAlign, LayoutStackComponent, LayoutStackDirection, LayoutStackItemAlign, LibDialogSize, ListItemComponent, LoadingDialogComponent, LoadingDialogService, MaskedTextFieldBase, MenuDividerComponent, MenuDropdownPlacement, MenuGroupComponent, MenuListComponent, MultiselectFieldComponent, NgControlFieldDirective, OverlayPlacement, PDF_IFRAME_VIEWER_HASH, PasswordFieldComponent, PhoneFieldComponent, PopoverBodyTemplateDirective, PopoverComponent, PopoverFooterTemplateDirective, PopoverTriggerDirective, STRUCTRA_THEME_IDS, STRUCTRA_UI, SelectFieldComponent, SkeletonBlockComponent, SkeletonCardComponent, SkeletonFieldShellComponent, SkeletonListComponent, SkeletonTableComponent, SkeletonTextComponent, StatCardComponent, StatusBadgeComponent, SwitchFieldComponent, TableEmptyStateComponent, TableToolbarComponent, TextFieldComponent, TextareaFieldComponent, ThemeDirective, ToastHostComponent, ToastService, TooltipComponent, TooltipPanelTemplateDirective, ValidationSummaryComponent, anchoredOverlayPositions, appendPdfIframeViewerParams, applyPickedCalendarDate, buildDecimalBrDisplay, buildDecimalBrParseString, buildEmptyStateOverlayHtml, caretIndexFromIntegerDigitCount, caretIndexFromSemantic, cepMaskCompleteValidator, cpfCnpjMaskCompleteValidator, escapeHtml, extractDecimalBrParts, fileIsLikelyImage, fileMatchesAccept, fixedDigitsMaskCompleteValidator, formatAcceptForDisplay, formatDateTimePtBr, formatDecimalBr, formatFileSizeBytes, formatIntegerThousandsBr, formatMaskDigits, formatUiFieldDateValue, getFilePreviewKind, getThemeClass, getThemeClassList, getThemeTokenClass, injectEffectiveThemeId, libDialogPanelClasses, mapEstadosToOptions, maskDigitCount, normalizeFormDateValue, normalizeStructraTheme, parseDecimalBr, parseIntegerString, parseUiFieldDateValue, phoneBrMaskCompleteValidator, resolveControlAtPath, sanitizeDecimalBrInput, sanitizeIntegerDigits, sectionHasVisibleInvalid, semanticCaretAt, semanticIntegerDigitCountLeft, stripToDigits, subscribeMarkForCheckOnInvalidUiRefresh, subtreeHasVisibleInvalid };
3547
+ export { ADAPTIVE_DATA_VIEW_MOBILE_QUERY, APP_SIDEBAR_LABEL_REVEAL_LAG_MS, APP_SIDEBAR_LAYOUT_DURATION_MS, APP_SIDEBAR_NAV_REVEAL_TOTAL_MS, APP_THEME_BASE_CLASS, APP_THEME_IDS, ActionMenuComponent, AdaptiveDataViewComponent, AlertComponent, AnchoredOverlayComponent, AppBreadcrumbComponent, AppDialogComponent, AppLibLightBlockScrollStrategy, AppShellComponent, AppShellSidebarTemplateDirective, AppShellSidebarToggleComponent, AppSidebarComponent, AppSidebarToolbarDirective, AppTheme, AppThemeService, AppTopbarComponent, AppUserMenuComponent, BR_ESTADOS_NOME_SIGLA, BaseFieldComponent, BaseFieldDirective, BooleanFieldDirective, ButtonComponent, ButtonRadius, ButtonSize, ButtonType, ButtonVariant, CardListComponent, CepFieldComponent, CheckboxFieldComponent, ConfirmDialogComponent, ConfirmDialogService, ContextMenuComponent, CpfCnpjFieldComponent, DashboardSectionComponent, DataCardComponent, DataGridComponent, DataListComponent, DataToolbarComponent, DateFieldComponent, DecimalFieldComponent, DetailsFieldComponent, DetailsViewComponent, DialogFooterDirective, DividerComponent, DrawerComponent, DrawerSide, DrawerSize, DropdownBaseComponent, DropdownMenuComponent, DropdownMultiOptionFieldBase, DropdownOptionFieldBase, DropdownSearchFieldComponent, EmptyStateComponent, FILE_PREVIEW_UNAVAILABLE_MESSAGE, FileUploadFieldComponent, FormActionsAlign, FormActionsComponent, FormColComponent, FormGroupComponent, FormGroupVariant, FormLayoutGap, FormRowAlign, FormRowComponent, FormRowJustify, FormSectionAlign, FormSectionComponent, FormSectionRadius, FormSectionVariant, FormTabComponent, FormTabsComponent, ImagePreviewPanelComponent, InputMaskFieldComponent, IntegerFieldComponent, LAYOUT_STACK_SIDE_BY_SIDE, LAYOUT_STACK_STACKED, LayoutStackAlign, LayoutStackComponent, LayoutStackDirection, LayoutStackItemAlign, LibDialogSize, ListItemComponent, LoadingDialogComponent, LoadingDialogService, MaskedTextFieldBase, MenuDividerComponent, MenuDropdownPlacement, MenuGroupComponent, MenuListComponent, MultiselectFieldComponent, NgControlFieldDirective, OverlayPlacement, PDF_IFRAME_VIEWER_HASH, PasswordFieldComponent, PhoneFieldComponent, PopoverBodyTemplateDirective, PopoverComponent, PopoverFooterTemplateDirective, PopoverTriggerDirective, STRUCTRA_THEME_IDS, STRUCTRA_UI, SelectFieldComponent, SkeletonBlockComponent, SkeletonCardComponent, SkeletonFieldShellComponent, SkeletonListComponent, SkeletonTableComponent, SkeletonTextComponent, StatCardComponent, StatusBadgeComponent, SwitchFieldComponent, TableEmptyStateComponent, TableToolbarComponent, TextFieldComponent, TextareaFieldComponent, ThemeDirective, ToastHostComponent, ToastService, TooltipComponent, TooltipPanelTemplateDirective, ValidationSummaryComponent, anchoredOverlayPositions, appendPdfIframeViewerParams, applyOptionalThemeHostClasses, applyPickedCalendarDate, buildDecimalBrDisplay, buildDecimalBrParseString, buildEmptyStateOverlayHtml, caretIndexFromIntegerDigitCount, caretIndexFromSemantic, cepMaskCompleteValidator, cpfCnpjMaskCompleteValidator, escapeHtml, extractDecimalBrParts, fileIsLikelyImage, fileMatchesAccept, fixedDigitsMaskCompleteValidator, formatAcceptForDisplay, formatDateTimePtBr, formatDecimalBr, formatFileSizeBytes, formatIntegerThousandsBr, formatMaskDigits, formatUiFieldDateValue, getFilePreviewKind, getThemeClass, getThemeClassList, getThemeTokenClass, injectEffectiveThemeId, libDialogPanelClasses, mapEstadosToOptions, maskDigitCount, normalizeFormDateValue, normalizeStructraTheme, parseDecimalBr, parseIntegerString, parseUiFieldDateValue, phoneBrMaskCompleteValidator, resolveControlAtPath, sanitizeDecimalBrInput, sanitizeIntegerDigits, sectionHasVisibleInvalid, semanticCaretAt, semanticIntegerDigitCountLeft, stripToDigits, subscribeMarkForCheckOnInvalidUiRefresh, subtreeHasVisibleInvalid };
3540
3548
  export type { AdaptiveDataViewMode, AlertType, AppThemeId, AppThemeOption, BreadcrumbItem, CardItemView, CardListDataMode, CardListMapFn, ConfirmDialogData, ConfirmDialogVariant, DataGridColumn, DataGridPaginationChangeEvent, DetailsViewItem, DropdownListBindings, DropdownSearchPageRequested, FieldCommonInputs, FilePreviewKind, FormTabsVariant, LoadingDialogData, MenuItemAction, MenuItemDivider, MenuItemGroup, MenuItemKind, MenuItemSubmenu, MenuLeafItem, MenuNodeItem, SelectPageRequested, SkeletonFieldShellVariant, StatCardDeltaTone, StatusBadgeSize, StatusBadgeVariant, StructraTheme, ToastInstance, ToastShowOptions, ToastType, ToastVerticalPosition, UiSelectOption, ValidationSummaryItem, ValidationSummaryVariant };