yukit-web 0.1.4 → 0.2.0

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,7 +1,7 @@
1
1
  {
2
2
  "name": "yukit-web",
3
3
  "description": "Angular UI component library for Yurest web applications.",
4
- "version": "0.1.4",
4
+ "version": "0.2.0",
5
5
  "author": {
6
6
  "name": "Yurest Solutions",
7
7
  "email": "develop@yurest.com"
@@ -1,6 +1,6 @@
1
1
  import { ClassValue } from 'clsx';
2
2
  import * as _angular_core from '@angular/core';
3
- import { ModelSignal, Type, Provider, InputSignal, InputSignalWithTransform, TemplateRef, WritableSignal, Signal, OnInit } from '@angular/core';
3
+ import { ModelSignal, Type, Provider, InputSignal, InputSignalWithTransform, TemplateRef, WritableSignal, Signal, OnInit, ElementRef } from '@angular/core';
4
4
  import { ControlValueAccessor } from '@angular/forms';
5
5
  import { SortingState, PaginationState, columnFilteringFeature, columnVisibilityFeature, rowPaginationFeature, rowSelectionFeature, rowSortingFeature, RowData, ColumnDef, ColumnFiltersState, ColumnVisibilityState, RowSelectionState } from '@tanstack/table-core';
6
6
  import { ButtonVariants } from 'yukit-web/helm/button';
@@ -316,6 +316,7 @@ declare class YuwComboboxComponent<TData = unknown> extends YuwValueAccessorBase
316
316
  protected readonly _selectedValues: _angular_core.Signal<Set<string>>;
317
317
  protected readonly _singleValue: _angular_core.Signal<string | undefined>;
318
318
  protected readonly _triggerClass: _angular_core.Signal<string>;
319
+ close(): void;
319
320
  constructor();
320
321
  /**
321
322
  * Focuses the field and opens its option list. For a combobox living inside a popover or sheet:
@@ -483,6 +484,7 @@ interface YuwButtonGroupItemDto {
483
484
  target?: string;
484
485
  type?: 'button' | 'submit' | 'reset';
485
486
  ariaLabel?: string;
487
+ tooltip?: string;
486
488
  yuwDropdownMenuTrigger?: TemplateRef<unknown>;
487
489
  }
488
490
  /** What `<yuw-button-group>` emits from `buttonClicked`. */
@@ -574,6 +576,7 @@ declare class YuwButtonGroupComponent {
574
576
  href?: string;
575
577
  target?: string;
576
578
  ariaLabel?: string;
579
+ tooltip?: string;
577
580
  yuwDropdownMenuTrigger?: _angular_core.TemplateRef<unknown>;
578
581
  }[]>;
579
582
  protected onClick(entry: YuwButtonGroupItemDto, event: MouseEvent): void;
@@ -1912,6 +1915,38 @@ interface YuwFilterGroupDto {
1912
1915
  }
1913
1916
  /** Selection keyed by `YuwFilterGroupDto.id`: a string for `single` groups, an array for `multiple`. */
1914
1917
  type YuwFilterSelection = Readonly<Record<string, string | readonly string[]>>;
1918
+ /** A named selection the user saved; `id` is assigned by the consumer that persists it. */
1919
+ interface YuwFilterSetDto {
1920
+ readonly id: string;
1921
+ readonly name: string;
1922
+ readonly selection: YuwFilterSelection;
1923
+ }
1924
+ /** Payload of `setSaved`: the name the user typed and the selection applied at that moment. */
1925
+ interface YuwFilterSetSaveDto {
1926
+ readonly name: string;
1927
+ readonly selection: YuwFilterSelection;
1928
+ }
1929
+ /** Payload of `setRenamed`. */
1930
+ interface YuwFilterSetRenameDto {
1931
+ readonly id: string;
1932
+ readonly name: string;
1933
+ }
1934
+ /** Texts of the saved-sets control and its dialog; the consumer translates them. */
1935
+ interface YuwFilterSetLabels {
1936
+ readonly save: string;
1937
+ readonly select: string;
1938
+ readonly none: string;
1939
+ readonly edit: string;
1940
+ readonly delete: string;
1941
+ readonly saveTitle: string;
1942
+ readonly renameTitle: string;
1943
+ readonly deleteTitle: string;
1944
+ readonly deleteMessage: (name: string) => string;
1945
+ readonly nameLabel: string;
1946
+ readonly confirm: string;
1947
+ readonly cancel: string;
1948
+ readonly close: string;
1949
+ }
1915
1950
  interface YuwListToolbarFilterLabels {
1916
1951
  readonly title: string;
1917
1952
  readonly clearAll: string;
@@ -1920,6 +1955,7 @@ interface YuwListToolbarFilterLabels {
1920
1955
  readonly clear: string;
1921
1956
  readonly pending: string;
1922
1957
  readonly selected: (count: number) => string;
1958
+ readonly sets?: YuwFilterSetLabels;
1923
1959
  }
1924
1960
  interface YuwListToolbarSearchLabels {
1925
1961
  readonly expand: string;
@@ -1944,12 +1980,14 @@ interface YuwListToolbarLabels {
1944
1980
  * trailing one, and projected content after them.
1945
1981
  *
1946
1982
  * Each control renders only when its input is set: `filterGroups`, `searchPlaceholder`,
1947
- * `showExport`, `hideableColumns`. `labels` holds every text and the consumer translates it;
1983
+ * `showExport`, `hideableColumns`. Saved filter sets need `filterSets` and `labels.filters.sets`;
1984
+ * the toolbar emits `setSaved`, `setRenamed` and `setDeleted` and the consumer persists them. `labels` holds every text and the consumer translates it;
1948
1985
  * `idleColor` is the filter trigger tone while nothing is applied.
1949
1986
  */
1950
1987
  declare class YuwListToolbarComponent {
1951
1988
  readonly filterGroups: _angular_core.InputSignal<readonly YuwFilterGroupDto[] | undefined>;
1952
1989
  readonly filtersDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
1990
+ readonly filterSets: _angular_core.InputSignal<readonly YuwFilterSetDto[] | undefined>;
1953
1991
  readonly hiddenColumns: _angular_core.ModelSignal<string[]>;
1954
1992
  readonly hideableColumns: _angular_core.InputSignal<YuwComboboxOptionDto<unknown>[] | undefined>;
1955
1993
  readonly idleColor: _angular_core.InputSignal<YuwColorDto>;
@@ -1960,9 +1998,12 @@ declare class YuwListToolbarComponent {
1960
1998
  readonly showExport: _angular_core.InputSignalWithTransform<boolean, unknown>;
1961
1999
  readonly exported: _angular_core.OutputEmitterRef<MouseEvent>;
1962
2000
  readonly searched: _angular_core.OutputEmitterRef<string>;
2001
+ readonly setDeleted: _angular_core.OutputEmitterRef<string>;
2002
+ readonly setRenamed: _angular_core.OutputEmitterRef<YuwFilterSetRenameDto>;
2003
+ readonly setSaved: _angular_core.OutputEmitterRef<YuwFilterSetSaveDto>;
1963
2004
  protected readonly isMobile: _angular_core.Signal<boolean>;
1964
2005
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuwListToolbarComponent, never>;
1965
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<YuwListToolbarComponent, "yuw-list-toolbar", never, { "filterGroups": { "alias": "filterGroups"; "required": false; "isSignal": true; }; "filtersDisabled": { "alias": "filtersDisabled"; "required": false; "isSignal": true; }; "hiddenColumns": { "alias": "hiddenColumns"; "required": false; "isSignal": true; }; "hideableColumns": { "alias": "hideableColumns"; "required": false; "isSignal": true; }; "idleColor": { "alias": "idleColor"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": true; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "showExport": { "alias": "showExport"; "required": false; "isSignal": true; }; }, { "hiddenColumns": "hiddenColumnsChange"; "search": "searchChange"; "selection": "selectionChange"; "exported": "exported"; "searched": "searched"; }, never, ["*"], true, never>;
2006
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<YuwListToolbarComponent, "yuw-list-toolbar", never, { "filterGroups": { "alias": "filterGroups"; "required": false; "isSignal": true; }; "filtersDisabled": { "alias": "filtersDisabled"; "required": false; "isSignal": true; }; "filterSets": { "alias": "filterSets"; "required": false; "isSignal": true; }; "hiddenColumns": { "alias": "hiddenColumns"; "required": false; "isSignal": true; }; "hideableColumns": { "alias": "hideableColumns"; "required": false; "isSignal": true; }; "idleColor": { "alias": "idleColor"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": true; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "showExport": { "alias": "showExport"; "required": false; "isSignal": true; }; }, { "hiddenColumns": "hiddenColumnsChange"; "search": "searchChange"; "selection": "selectionChange"; "exported": "exported"; "searched": "searched"; "setDeleted": "setDeleted"; "setRenamed": "setRenamed"; "setSaved": "setSaved"; }, never, ["*"], true, never>;
1966
2007
  }
1967
2008
 
1968
2009
  type YuwDatatableAlign = 'start' | 'center' | 'end';
@@ -2263,7 +2304,7 @@ declare class YuwDatatableRowSelect {
2263
2304
  }
2264
2305
 
2265
2306
  /**
2266
- * Gear button cell that runs `onEdit`, an input because `flexRenderComponent` does not subscribe
2307
+ * Pencil button cell that runs `onEdit`, an input because `flexRenderComponent` does not subscribe
2267
2308
  * outputs. The host stops the click so a clickable row does not fire twice.
2268
2309
  */
2269
2310
  declare class YuwActionsCellComponent {
@@ -2525,6 +2566,9 @@ type YuwPopoverAlignDto = 'start' | 'center' | 'end';
2525
2566
  * - `triggerClass`: Extra classes merged onto the trigger button, last, so they beat both the
2526
2567
  * variant classes and `triggerTransparent` (e.g. `h-auto p-0` to drop the button's own box).
2527
2568
  *
2569
+ * The panel is always anchored to the trigger, including when `open` is set from code without a
2570
+ * click on it; the brain trigger only records its element on click.
2571
+ *
2528
2572
  * The trigger is a `<yuw-button>`; `YuwPopoverTriggerDirective` composes the brain trigger onto it,
2529
2573
  * so the popover reuses our button component instead of applying `[hlmBtn]` directly.
2530
2574
  *
@@ -2538,6 +2582,7 @@ type YuwPopoverAlignDto = 'start' | 'center' | 'end';
2538
2582
  * ```
2539
2583
  */
2540
2584
  declare class YuwPopoverComponent {
2585
+ protected readonly _trigger: _angular_core.Signal<ElementRef<any> | undefined>;
2541
2586
  readonly align: _angular_core.InputSignal<YuwPopoverAlignDto>;
2542
2587
  readonly description: _angular_core.InputSignal<string | undefined>;
2543
2588
  readonly offsetX: _angular_core.InputSignal<number>;
@@ -3889,4 +3934,4 @@ declare class YuwCommandDialogComponent {
3889
3934
  }
3890
3935
 
3891
3936
  export { DATATABLE_ALIGN_CLASS, DATATABLE_LAYOUT_CLASS, DATATABLE_WRAP_CONTENT_CLASS, YUW_DATATABLE_FEATURES, YUW_DATATABLE_WRAP_MIN_WIDTH, YUW_PASSWORD_REVEAL_STATES, YUW_SIDEBAR_RAIL_ICON_SIZE, YUW_SIDEBAR_RAIL_PADDING, YUW_SIDEBAR_RAIL_WIDTH, YuwAccordion, YuwAccordionContentComponent, YuwAccordionImports, YuwAccordionItem, YuwAccordionTriggerComponent, YuwActionsCellComponent, YuwAlertActionDirective, YuwAlertComponent, YuwAlertDescriptionDirective, YuwAlertDialogComponent, YuwAlertDialogMediaDirective, YuwAlertDialogTriggerDirective, YuwAlertImports, YuwAlertTitleDirective, YuwAttachmentActionDirective, YuwAttachmentActionsDirective, YuwAttachmentContentDirective, YuwAttachmentDescriptionDirective, YuwAttachmentDirective, YuwAttachmentGroupDirective, YuwAttachmentMediaDirective, YuwAttachmentTitleDirective, YuwAttachmentTriggerDirective, YuwAvatarComponent, YuwBadgeComponent, YuwBreadcrumbComponent, YuwBreadcrumbTrailService, YuwButtonComponent, YuwButtonGroupComponent, YuwButtonGroupContentDirective, YuwCaptionDirective, YuwCardActionDirective, YuwCardContentDirective, YuwCardDescriptionDirective, YuwCardDirective, YuwCardFooterDirective, YuwCardGridComponent, YuwCardGridItemComponent, YuwCardHeaderDirective, YuwCardImports, YuwCardTitleDirective, YuwCheckboxComponent, YuwClassDirective, YuwComboboxComponent, YuwComboboxItemDirective, YuwCommandComponent, YuwCommandDialogComponent, YuwContextMenuCheckboxDirective, YuwContextMenuCheckboxIndicatorComponent, YuwContextMenuDirective, YuwContextMenuGroupDirective, YuwContextMenuImports, YuwContextMenuItemDirective, YuwContextMenuLabelDirective, YuwContextMenuRadioDirective, YuwContextMenuRadioIndicatorComponent, YuwContextMenuSeparatorDirective, YuwContextMenuShortcutDirective, YuwContextMenuSubDirective, YuwContextMenuSubIndicatorComponent, YuwContextMenuSubTriggerDirective, YuwContextMenuTriggerDirective, YuwDatatableComponent, YuwDatatablePaginationDirective, YuwDatatableRowSelect, YuwDatepickerComponent, YuwDialogCloseDirective, YuwDialogComponent, YuwDialogFooterDirective, YuwDialogImports, YuwDialogTriggerDirective, YuwEmptyContentDirective, YuwEmptyDescriptionDirective, YuwEmptyDirective, YuwEmptyHeaderDirective, YuwEmptyImports, YuwEmptyMediaDirective, YuwEmptyTitleDirective, YuwFieldBase, YuwInputAddonImports, YuwInputComponent, YuwInputOtpComponent, YuwItemActionsDirective, YuwItemContentDirective, YuwItemDescriptionDirective, YuwItemDirective, YuwItemFooterDirective, YuwItemGroupDirective, YuwItemHeaderDirective, YuwItemImports, YuwItemMediaDirective, YuwItemSeparatorDirective, YuwItemTitleDirective, YuwLabel, YuwLeftAddonDirective, YuwListPaginationComponent, YuwListToolbarComponent, YuwPageHeaderComponent, YuwPageSizeComponent, YuwPaginationComponent, YuwPasswordInputComponent, YuwPopoverComponent, YuwPopoverTriggerDirective, YuwRadioGroupComponent, YuwRightAddonDirective, YuwSearchInputComponent, YuwSheetCloseDirective, YuwSheetComponent, YuwSheetFooterDirective, YuwSheetImports, YuwSheetTriggerDirective, YuwSidebarComponent, YuwSidebarContentDirective, YuwSidebarContentExtraDirective, YuwSidebarFooterDirective, YuwSidebarFooterExtraDirective, YuwSidebarGroupContentDirective, YuwSidebarGroupDirective, YuwSidebarGroupLabelDirective, YuwSidebarHeaderDirective, YuwSidebarInsetDirective, YuwSidebarMenuAvatarButtonDirective, YuwSidebarMenuBadgeDirective, YuwSidebarMenuButtonDirective, YuwSidebarMenuDirective, YuwSidebarMenuItemDirective, YuwSidebarMenuSubButtonDirective, YuwSidebarMenuSubDirective, YuwSidebarMenuSubItemDirective, YuwSidebarRailDirective, YuwSidebarRailService, YuwSidebarSeparatorDirective, YuwSidebarSubmenuService, YuwSidebarTriggerComponent, YuwSidebarWrapperDirective, YuwSkeletonDirective, YuwSpinnerComponent, YuwSwitchComponent, YuwTBodyDirective, YuwTFootDirective, YuwTHeadDirective, YuwTabContentDirective, YuwTabPanelDirective, YuwTableContainerDirective, YuwTableDirective, YuwTableImports, YuwTabsComponent, YuwTdDirective, YuwTextFieldBase, YuwTextareaComponent, YuwThDirective, YuwToasterComponent, YuwTooltipDirective, YuwTrDirective, YuwValueAccessorBase, buildInputOtpGroups, buildYuwActionsColumn, cn, createPagedList, datatableCellVariants, datatableContainerVariants, datatableHeadVariants, datatableHeaderCellVariants, datatableRowVariants, getPaginationRange, provideValueAccessor, totalInputOtpLength, yuwCommandDefaultFilter };
3892
- export type { YuwAlertDialogSizeDto, YuwAlertVariantDto, YuwAvatarGroupItemDto, YuwAvatarSizeDto, YuwBreadcrumbCrumb, YuwBreadcrumbItemDto, YuwBreadcrumbRouteData, YuwButtonGroupClickDto, YuwButtonGroupItemDto, YuwColorDto, YuwComboboxItemContext, YuwComboboxOptionDto, YuwComboboxValue, YuwCommandGroupDto, YuwCommandItemDto, YuwDatatableAlign, YuwDatatableAppearanceDto, YuwDatatableColumnDef, YuwDatatableColumnMeta, YuwDatatableFeatures, YuwDatatableRowClass, YuwDatepickerModeDto, YuwDatepickerValue, YuwFieldSizeDto, YuwFilterGroupDto, YuwFilterGroupMode, YuwFilterOptionDto, YuwFilterSelection, YuwInputModeDto, YuwInputOtpGroupDto, YuwInputOtpModeDto, YuwInputTypeDto, YuwListPaginationLabels, YuwListToolbarColumnsLabels, YuwListToolbarFilterLabels, YuwListToolbarLabels, YuwListToolbarSearchLabels, YuwPageQuery, YuwPageRange, YuwPageSizeLabels, YuwPageSort, YuwPagedList, YuwPagedListOptions, YuwPaginationRangeItem, YuwPaginationSizeDto, YuwPasswordRevealStateDto, YuwPopoverAlignDto, YuwRadioOptionDto, YuwSearchInputCollapseFromDto, YuwSheetScrollStrategyDto, YuwSheetSideDto, YuwSidebarAvatarDto, YuwSidebarCollapsibleDto, YuwSidebarContentDto, YuwSidebarGroupDto, YuwSidebarItemClickDto, YuwSidebarItemDto, YuwSidebarSideDto, YuwSidebarSubItemDto, YuwSidebarVariantDto, YuwSwitchSizeDto, YuwTabItemDto, YuwTabsActivationModeDto, YuwTabsOrientationDto, YuwTabsVariantDto, YuwTextFieldContract, YuwToasterPositionDto, YuwToasterThemeDto, YuwTooltipPositionDto };
3937
+ export type { YuwAlertDialogSizeDto, YuwAlertVariantDto, YuwAvatarGroupItemDto, YuwAvatarSizeDto, YuwBreadcrumbCrumb, YuwBreadcrumbItemDto, YuwBreadcrumbRouteData, YuwButtonGroupClickDto, YuwButtonGroupItemDto, YuwColorDto, YuwComboboxItemContext, YuwComboboxOptionDto, YuwComboboxValue, YuwCommandGroupDto, YuwCommandItemDto, YuwDatatableAlign, YuwDatatableAppearanceDto, YuwDatatableColumnDef, YuwDatatableColumnMeta, YuwDatatableFeatures, YuwDatatableRowClass, YuwDatepickerModeDto, YuwDatepickerValue, YuwFieldSizeDto, YuwFilterGroupDto, YuwFilterGroupMode, YuwFilterOptionDto, YuwFilterSelection, YuwFilterSetDto, YuwFilterSetLabels, YuwFilterSetRenameDto, YuwFilterSetSaveDto, YuwInputModeDto, YuwInputOtpGroupDto, YuwInputOtpModeDto, YuwInputTypeDto, YuwListPaginationLabels, YuwListToolbarColumnsLabels, YuwListToolbarFilterLabels, YuwListToolbarLabels, YuwListToolbarSearchLabels, YuwPageQuery, YuwPageRange, YuwPageSizeLabels, YuwPageSort, YuwPagedList, YuwPagedListOptions, YuwPaginationRangeItem, YuwPaginationSizeDto, YuwPasswordRevealStateDto, YuwPopoverAlignDto, YuwRadioOptionDto, YuwSearchInputCollapseFromDto, YuwSheetScrollStrategyDto, YuwSheetSideDto, YuwSidebarAvatarDto, YuwSidebarCollapsibleDto, YuwSidebarContentDto, YuwSidebarGroupDto, YuwSidebarItemClickDto, YuwSidebarItemDto, YuwSidebarSideDto, YuwSidebarSubItemDto, YuwSidebarVariantDto, YuwSwitchSizeDto, YuwTabItemDto, YuwTabsActivationModeDto, YuwTabsOrientationDto, YuwTabsVariantDto, YuwTextFieldContract, YuwToasterPositionDto, YuwToasterThemeDto, YuwTooltipPositionDto };