yukit-web 0.6.5 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,16 +6,16 @@ import { classes, hlm } from 'yukit-web/helm/utils';
6
6
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
7
7
  import { toSignal, toObservable, outputFromObservable } from '@angular/core/rxjs-interop';
8
8
  import { debounceTime, distinctUntilChanged, filter, startWith, map, skip, switchMap, of, timer, fromEvent, Subject, concat } from 'rxjs';
9
+ import { NgTemplateOutlet, DOCUMENT } from '@angular/common';
9
10
  import { HlmButton, provideBrnButtonConfig } from 'yukit-web/helm/button';
10
11
  import * as i2 from 'yukit-web/helm/dropdown-menu';
11
12
  import { HlmDropdownMenuTrigger, HlmDropdownMenuCheckboxIndicator, HlmDropdownMenuRadioIndicator, HlmDropdownMenuItemSubIndicator, HlmDropdownMenu, HlmDropdownMenuItem, HlmDropdownMenuCheckbox, HlmDropdownMenuRadio, HlmDropdownMenuLabel, HlmDropdownMenuGroup, HlmDropdownMenuSeparator, HlmDropdownMenuShortcut, HlmDropdownMenuSub, HlmDropdownMenuSubTrigger } from 'yukit-web/helm/dropdown-menu';
12
13
  import { cva } from 'class-variance-authority';
13
- import { NgTemplateOutlet, DOCUMENT } from '@angular/common';
14
14
  import * as i1 from '@spartan-ng/brain/tooltip';
15
15
  import { BrnTooltip, provideBrnTooltipDefaultOptions } from '@spartan-ng/brain/tooltip';
16
16
  import { tooltipPositionVariants, DEFAULT_TOOLTIP_CONTENT_CLASSES, DEFAULT_TOOLTIP_SVG_CLASS } from 'yukit-web/helm/tooltip';
17
17
  import { NgIcon, provideIcons } from '@ng-icons/core';
18
- import { lucideX, lucideChevronRight, lucideChevronLeft, lucideUpload, lucideSearch, lucideEyeOff, lucideEye, lucideChevronsUpDown, lucideChevronUp, lucideChevronDown, lucidePencil, lucideCheck, lucideMinus, lucideCopy, lucideTrash2, lucideSave, lucideArrowLeft, lucideArchiveRestore, lucidePlus, lucideSettings2, lucideList, lucideLayoutGrid, lucideDownload, lucideEllipsis, lucideStar } from '@ng-icons/lucide';
18
+ import { lucideX, lucideChevronRight, lucideChevronLeft, lucideUpload, lucideSearch, lucideEyeOff, lucideEye, lucideChevronsUpDown, lucideChevronUp, lucideChevronDown, lucidePencil, lucideCheck, lucideMinus, lucideCopy, lucideTrash2, lucideSave, lucideArrowLeft, lucideArchiveRestore, lucidePlus, lucideShare2, lucidePrinter, lucideFileText, lucideFileSpreadsheet, lucideFileDown, lucideClipboardCopy, lucideSettings2, lucideList, lucideLayoutGrid, lucideDownload, lucideEllipsis, lucideStar } from '@ng-icons/lucide';
19
19
  import * as i1$1 from 'yukit-web/helm/badge';
20
20
  import { HlmBadge } from 'yukit-web/helm/badge';
21
21
  import * as i1$2 from 'yukit-web/helm/breadcrumb';
@@ -723,16 +723,16 @@ class YuwButtonComponent {
723
723
  this.clicked.emit(event);
724
724
  }
725
725
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
726
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwButtonComponent, isStandalone: true, selector: "yuw-button", inputs: { animationDisabled: { classPropertyName: "animationDisabled", publicName: "animationDisabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, transparent: { classPropertyName: "transparent", publicName: "transparent", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, yuwDropdownMenuTrigger: { classPropertyName: "yuwDropdownMenuTrigger", publicName: "yuwDropdownMenuTrigger", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, host: { properties: { "class.cursor-not-allowed": "disabled()", "attr.data-yuw-color": "color()", "attr.data-yuw-variant": "_effectiveVariant()" }, classAttribute: "inline-flex" }, ngImport: i0, template: "@if (href(); as hrefValue) {\n <a\n hlmBtn\n [variant]=\"_effectiveVariant()\"\n [size]=\"size()\"\n [disabled]=\"disabled()\"\n [href]=\"disabled() ? null : hrefValue\"\n [target]=\"target()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"onClick($event)\"\n [hlmDropdownMenuTrigger]=\"yuwDropdownMenuTrigger()\"\n [yuwClass]=\"_btnClass()\"\n >\n <ng-content />\n </a>\n} @else {\n <button\n hlmBtn\n [variant]=\"_effectiveVariant()\"\n [size]=\"size()\"\n [type]=\"type()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"onClick($event)\"\n [hlmDropdownMenuTrigger]=\"yuwDropdownMenuTrigger()\"\n [yuwClass]=\"_btnClass()\"\n >\n <ng-content />\n </button>\n}\n", dependencies: [{ kind: "directive", type: HlmButton, selector: "button[hlmBtn], a[hlmBtn]", inputs: ["variant", "size"], exportAs: ["hlmBtn"] }, { kind: "directive", type: HlmDropdownMenuTrigger, selector: "[hlmDropdownMenuTrigger]", inputs: ["align", "side"] }, { kind: "directive", type: YuwClassDirective, selector: "[yuwClass]", inputs: ["yuwClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
726
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwButtonComponent, isStandalone: true, selector: "yuw-button", inputs: { animationDisabled: { classPropertyName: "animationDisabled", publicName: "animationDisabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, transparent: { classPropertyName: "transparent", publicName: "transparent", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, yuwDropdownMenuTrigger: { classPropertyName: "yuwDropdownMenuTrigger", publicName: "yuwDropdownMenuTrigger", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, host: { properties: { "class.cursor-not-allowed": "disabled()", "attr.data-yuw-color": "color()", "attr.data-yuw-variant": "_effectiveVariant()" }, classAttribute: "inline-flex" }, ngImport: i0, template: "<ng-template #content><ng-content /></ng-template>\n\n@if (href(); as hrefValue) {\n <a\n hlmBtn\n [variant]=\"_effectiveVariant()\"\n [size]=\"size()\"\n [disabled]=\"disabled()\"\n [href]=\"disabled() ? null : hrefValue\"\n [target]=\"target()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"onClick($event)\"\n [hlmDropdownMenuTrigger]=\"yuwDropdownMenuTrigger()\"\n [yuwClass]=\"_btnClass()\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else {\n <button\n hlmBtn\n [variant]=\"_effectiveVariant()\"\n [size]=\"size()\"\n [type]=\"type()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"onClick($event)\"\n [hlmDropdownMenuTrigger]=\"yuwDropdownMenuTrigger()\"\n [yuwClass]=\"_btnClass()\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n}\n", dependencies: [{ kind: "directive", type: HlmButton, selector: "button[hlmBtn], a[hlmBtn]", inputs: ["variant", "size"], exportAs: ["hlmBtn"] }, { kind: "directive", type: HlmDropdownMenuTrigger, selector: "[hlmDropdownMenuTrigger]", inputs: ["align", "side"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: YuwClassDirective, selector: "[yuwClass]", inputs: ["yuwClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
727
727
  }
728
728
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwButtonComponent, decorators: [{
729
729
  type: Component,
730
- args: [{ selector: 'yuw-button', imports: [HlmButton, HlmDropdownMenuTrigger, YuwClassDirective], host: {
730
+ args: [{ selector: 'yuw-button', imports: [HlmButton, HlmDropdownMenuTrigger, NgTemplateOutlet, YuwClassDirective], host: {
731
731
  class: 'inline-flex',
732
732
  '[class.cursor-not-allowed]': 'disabled()',
733
733
  '[attr.data-yuw-color]': 'color()',
734
734
  '[attr.data-yuw-variant]': '_effectiveVariant()',
735
- }, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (href(); as hrefValue) {\n <a\n hlmBtn\n [variant]=\"_effectiveVariant()\"\n [size]=\"size()\"\n [disabled]=\"disabled()\"\n [href]=\"disabled() ? null : hrefValue\"\n [target]=\"target()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"onClick($event)\"\n [hlmDropdownMenuTrigger]=\"yuwDropdownMenuTrigger()\"\n [yuwClass]=\"_btnClass()\"\n >\n <ng-content />\n </a>\n} @else {\n <button\n hlmBtn\n [variant]=\"_effectiveVariant()\"\n [size]=\"size()\"\n [type]=\"type()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"onClick($event)\"\n [hlmDropdownMenuTrigger]=\"yuwDropdownMenuTrigger()\"\n [yuwClass]=\"_btnClass()\"\n >\n <ng-content />\n </button>\n}\n" }]
735
+ }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #content><ng-content /></ng-template>\n\n@if (href(); as hrefValue) {\n <a\n hlmBtn\n [variant]=\"_effectiveVariant()\"\n [size]=\"size()\"\n [disabled]=\"disabled()\"\n [href]=\"disabled() ? null : hrefValue\"\n [target]=\"target()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"onClick($event)\"\n [hlmDropdownMenuTrigger]=\"yuwDropdownMenuTrigger()\"\n [yuwClass]=\"_btnClass()\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else {\n <button\n hlmBtn\n [variant]=\"_effectiveVariant()\"\n [size]=\"size()\"\n [type]=\"type()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"onClick($event)\"\n [hlmDropdownMenuTrigger]=\"yuwDropdownMenuTrigger()\"\n [yuwClass]=\"_btnClass()\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n}\n" }]
736
736
  }], propDecorators: { animationDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "animationDisabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], transparent: [{ type: i0.Input, args: [{ isSignal: true, alias: "transparent", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], yuwDropdownMenuTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "yuwDropdownMenuTrigger", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
737
737
 
738
738
  /**
@@ -4021,6 +4021,23 @@ const YUW_DATATABLE_FEATURES = {
4021
4021
  rowSortingFeature,
4022
4022
  };
4023
4023
 
4024
+ function textOf(cell) {
4025
+ return (cell?.innerText ?? '').replace(/\s+/g, ' ').trim();
4026
+ }
4027
+ /**
4028
+ * Reads the rendered text of `table`, so what is shared is what the user sees: translated headers, formatted values
4029
+ * and the labels of status cells. Columns with an empty header, such as the selection or the action buttons, are left
4030
+ * out. The header is the last row of `thead`.
4031
+ */
4032
+ function readTableSnapshot(table) {
4033
+ const headerCells = Array.from(table.tHead?.rows[table.tHead.rows.length - 1]?.cells ?? []);
4034
+ const exported = headerCells.flatMap((cell, index) => (textOf(cell) ? [index] : []));
4035
+ return {
4036
+ headers: exported.map((index) => textOf(headerCells[index])),
4037
+ rows: Array.from(table.tBodies[0]?.rows ?? []).map((row) => exported.map((index) => textOf(row.cells[index]))),
4038
+ };
4039
+ }
4040
+
4024
4041
  /**
4025
4042
  * Default floor for a column that opts into `meta.wrap`, as a Tailwind `min-w-*` class.
4026
4043
  *
@@ -4225,6 +4242,7 @@ const DATATABLE_WRAP_CONTENT_CLASS = 'whitespace-normal max-w-0';
4225
4242
  */
4226
4243
  class YuwDatatableComponent {
4227
4244
  constructor() {
4245
+ this._table = viewChild.required('tableElement');
4228
4246
  this.customPagination = contentChild(YuwDatatablePaginationDirective, ...(ngDevMode ? [{ debugName: "customPagination" }] : /* istanbul ignore next */ []));
4229
4247
  this.appearance = input('default', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
4230
4248
  this.caption = input(undefined, ...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
@@ -4345,6 +4363,11 @@ class YuwDatatableComponent {
4345
4363
  const options = this._options();
4346
4364
  this.table.setOptions((previous) => ({ ...previous, ...options }));
4347
4365
  }
4366
+ /** The rendered text of the current page, with no rows while loading or empty. */
4367
+ snapshot() {
4368
+ const snapshot = readTableSnapshot(this._table().nativeElement);
4369
+ return this.loading() || this._isEmpty() ? { ...snapshot, rows: [] } : snapshot;
4370
+ }
4348
4371
  onPageChange(page) {
4349
4372
  this.pagination.update((current) => ({ ...current, pageIndex: page - 1 }));
4350
4373
  }
@@ -4359,14 +4382,14 @@ class YuwDatatableComponent {
4359
4382
  this.rowClicked.emit(row);
4360
4383
  }
4361
4384
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwDatatableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4362
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwDatatableComponent, isStandalone: true, selector: "yuw-datatable", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, cellClass: { classPropertyName: "cellClass", publicName: "cellClass", isSignal: true, isRequired: false, transformFunction: null }, columnFilters: { classPropertyName: "columnFilters", publicName: "columnFilters", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, columnVisibility: { classPropertyName: "columnVisibility", publicName: "columnVisibility", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingRows: { classPropertyName: "loadingRows", publicName: "loadingRows", isSignal: true, isRequired: false, transformFunction: null }, nextPageLabel: { classPropertyName: "nextPageLabel", publicName: "nextPageLabel", isSignal: true, isRequired: true, transformFunction: null }, paginated: { classPropertyName: "paginated", publicName: "paginated", isSignal: true, isRequired: false, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: false, transformFunction: null }, paginationAriaLabel: { classPropertyName: "paginationAriaLabel", publicName: "paginationAriaLabel", isSignal: true, isRequired: true, transformFunction: null }, paginationEllipsisSrText: { classPropertyName: "paginationEllipsisSrText", publicName: "paginationEllipsisSrText", isSignal: true, isRequired: true, transformFunction: null }, previousPageLabel: { classPropertyName: "previousPageLabel", publicName: "previousPageLabel", isSignal: true, isRequired: true, transformFunction: null }, rowClass: { classPropertyName: "rowClass", publicName: "rowClass", isSignal: true, isRequired: false, transformFunction: null }, rowSelection: { classPropertyName: "rowSelection", publicName: "rowSelection", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, sortable: { classPropertyName: "sortable", publicName: "sortable", isSignal: true, isRequired: false, transformFunction: null }, sorting: { classPropertyName: "sorting", publicName: "sorting", isSignal: true, isRequired: false, transformFunction: null }, tableClass: { classPropertyName: "tableClass", publicName: "tableClass", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnFilters: "columnFiltersChange", columnVisibility: "columnVisibilityChange", pagination: "paginationChange", rowSelection: "rowSelectionChange", sorting: "sortingChange", rowClicked: "rowClicked", selectedRowsChange: "selectedRowsChange" }, host: { classAttribute: "contents" }, providers: [provideIcons({ lucideChevronDown, lucideChevronUp, lucideChevronsUpDown })], queries: [{ propertyName: "customPagination", first: true, predicate: YuwDatatablePaginationDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div yuwTableContainer [class]=\"_containerClass()\">\n <table yuwTable [class]=\"_tableClass()\">\n @if (caption()) {\n <caption yuwCaption>{{ caption() }}</caption>\n }\n\n <thead yuwTHead [class]=\"_headClass()\">\n @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n <tr yuwTr [class]=\"_rowClass()\">\n @for (header of headerGroup.headers; track header.id) {\n @let sorted = header.column.getIsSorted();\n @let headerClasses = _cellClasses().get(header.column.id);\n <th\n yuwTh\n scope=\"col\"\n [attr.colspan]=\"header.colSpan\"\n [attr.aria-sort]=\"sorted ? _ariaSort[sorted] : null\"\n [class]=\"headerClasses?.header\"\n >\n @if (!header.isPlaceholder) {\n @if (sortable() && header.column.getCanSort()) {\n <button\n type=\"button\"\n class=\"inline-flex items-center gap-1 select-none hover:text-foreground/80\"\n (click)=\"header.column.toggleSorting()\"\n >\n <ng-container\n *flexRender=\"header.column.columnDef.header; props: header.getContext(); let rendered\"\n >\n {{ rendered }}\n </ng-container>\n\n <ng-icon [name]=\"_sortIcon[sorted || 'none']\" class=\"shrink-0 text-xs\" aria-hidden=\"true\" />\n </button>\n } @else {\n <ng-container *flexRender=\"header.column.columnDef.header; props: header.getContext(); let rendered\">\n {{ rendered }}\n </ng-container>\n }\n }\n </th>\n }\n </tr>\n }\n </thead>\n\n <tbody yuwTBody>\n @if (loading()) {\n @for (row of _skeletonRows(); track row) {\n <tr yuwTr [class]=\"_rowClass()\">\n @for (column of table.getVisibleLeafColumns(); track column.id) {\n <td yuwTd [class]=\"_cellClasses().get(column.id)?.cell\">\n <span yuwSkeleton class=\"block h-4 w-full\"></span>\n </td>\n }\n </tr>\n }\n } @else if (_isEmpty()) {\n <tr yuwTr [class]=\"_rowClass()\">\n <td yuwTd [attr.colspan]=\"_columnCount()\" class=\"h-24 text-center text-muted-foreground\">\n {{ emptyText() ?? '' }}\n </td>\n </tr>\n } @else {\n @for (row of table.getRowModel().rows; track row.id) {\n <tr\n yuwTr\n [class]=\"_rowClasses().get(row.id)\"\n [attr.data-state]=\"row.getIsSelected() ? 'selected' : null\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"onRowClick(row.original)\"\n (keydown)=\"onRowKeydown($event, row.original)\"\n >\n @for (cell of row.getVisibleCells(); track cell.id) {\n <td yuwTd [class]=\"_cellClasses().get(cell.column.id)?.cell\">\n <ng-container *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let rendered\">\n {{ rendered }}\n </ng-container>\n </td>\n }\n </tr>\n }\n }\n </tbody>\n </table>\n</div>\n\n@if (paginated()) {\n <div class=\"flex items-center flex-wrap justify-end gap-4 py-3 px-1 max-lg:justify-center\">\n @if (customPagination()) {\n <ng-content select=\"[yuwDatatablePagination]\" />\n }\n <yuw-pagination\n [page]=\"currentPage()\"\n (pageChange)=\"onPageChange($event)\"\n [totalPages]=\"table.getPageCount() || 1\"\n [previousLabel]=\"previousPageLabel()\"\n [nextLabel]=\"nextPageLabel()\"\n [ellipsisSrText]=\"paginationEllipsisSrText()\"\n [ariaLabel]=\"paginationAriaLabel()\"\n color=\"neutral\"\n size=\"icon-sm\"\n class=\"flex\"\n />\n </div>\n}\n", dependencies: [{ kind: "directive", type: YuwTableContainerDirective, selector: "[yuwTableContainer]" }, { kind: "directive", type: YuwTableDirective, selector: "[yuwTable]" }, { kind: "directive", type: YuwTHeadDirective, selector: "[yuwTHead]" }, { kind: "directive", type: YuwTBodyDirective, selector: "[yuwTBody]" }, { kind: "directive", type: YuwTrDirective, selector: "[yuwTr]" }, { kind: "directive", type: YuwThDirective, selector: "[yuwTh]" }, { kind: "directive", type: YuwTdDirective, selector: "[yuwTd]" }, { kind: "directive", type: YuwCaptionDirective, selector: "[yuwCaption]" }, { kind: "component", type: YuwPaginationComponent, selector: "yuw-pagination", inputs: ["ariaLabel", "color", "ellipsisSrText", "nextLabel", "page", "previousLabel", "size", "totalPages"], outputs: ["pageChange"] }, { kind: "directive", type: YuwSkeletonDirective, selector: "[yuwSkeleton]" }, { kind: "directive", type: FlexRenderDirective, selector: "ng-template[flexRender]", inputs: ["flexRender", "flexRenderProps", "flexRenderInjector"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4385
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwDatatableComponent, isStandalone: true, selector: "yuw-datatable", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, cellClass: { classPropertyName: "cellClass", publicName: "cellClass", isSignal: true, isRequired: false, transformFunction: null }, columnFilters: { classPropertyName: "columnFilters", publicName: "columnFilters", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, columnVisibility: { classPropertyName: "columnVisibility", publicName: "columnVisibility", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingRows: { classPropertyName: "loadingRows", publicName: "loadingRows", isSignal: true, isRequired: false, transformFunction: null }, nextPageLabel: { classPropertyName: "nextPageLabel", publicName: "nextPageLabel", isSignal: true, isRequired: true, transformFunction: null }, paginated: { classPropertyName: "paginated", publicName: "paginated", isSignal: true, isRequired: false, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: false, transformFunction: null }, paginationAriaLabel: { classPropertyName: "paginationAriaLabel", publicName: "paginationAriaLabel", isSignal: true, isRequired: true, transformFunction: null }, paginationEllipsisSrText: { classPropertyName: "paginationEllipsisSrText", publicName: "paginationEllipsisSrText", isSignal: true, isRequired: true, transformFunction: null }, previousPageLabel: { classPropertyName: "previousPageLabel", publicName: "previousPageLabel", isSignal: true, isRequired: true, transformFunction: null }, rowClass: { classPropertyName: "rowClass", publicName: "rowClass", isSignal: true, isRequired: false, transformFunction: null }, rowSelection: { classPropertyName: "rowSelection", publicName: "rowSelection", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, sortable: { classPropertyName: "sortable", publicName: "sortable", isSignal: true, isRequired: false, transformFunction: null }, sorting: { classPropertyName: "sorting", publicName: "sorting", isSignal: true, isRequired: false, transformFunction: null }, tableClass: { classPropertyName: "tableClass", publicName: "tableClass", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnFilters: "columnFiltersChange", columnVisibility: "columnVisibilityChange", pagination: "paginationChange", rowSelection: "rowSelectionChange", sorting: "sortingChange", rowClicked: "rowClicked", selectedRowsChange: "selectedRowsChange" }, host: { classAttribute: "contents" }, providers: [provideIcons({ lucideChevronDown, lucideChevronUp, lucideChevronsUpDown })], queries: [{ propertyName: "customPagination", first: true, predicate: YuwDatatablePaginationDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_table", first: true, predicate: ["tableElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div yuwTableContainer [class]=\"_containerClass()\">\n <table #tableElement yuwTable [class]=\"_tableClass()\">\n @if (caption()) {\n <caption yuwCaption>{{ caption() }}</caption>\n }\n\n <thead yuwTHead [class]=\"_headClass()\">\n @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n <tr yuwTr [class]=\"_rowClass()\">\n @for (header of headerGroup.headers; track header.id) {\n @let sorted = header.column.getIsSorted();\n @let headerClasses = _cellClasses().get(header.column.id);\n <th\n yuwTh\n scope=\"col\"\n [attr.colspan]=\"header.colSpan\"\n [attr.aria-sort]=\"sorted ? _ariaSort[sorted] : null\"\n [class]=\"headerClasses?.header\"\n >\n @if (!header.isPlaceholder) {\n @if (sortable() && header.column.getCanSort()) {\n <button\n type=\"button\"\n class=\"inline-flex items-center gap-1 select-none hover:text-foreground/80\"\n (click)=\"header.column.toggleSorting()\"\n >\n <ng-container\n *flexRender=\"header.column.columnDef.header; props: header.getContext(); let rendered\"\n >\n {{ rendered }}\n </ng-container>\n\n <ng-icon [name]=\"_sortIcon[sorted || 'none']\" class=\"shrink-0 text-xs\" aria-hidden=\"true\" />\n </button>\n } @else {\n <ng-container *flexRender=\"header.column.columnDef.header; props: header.getContext(); let rendered\">\n {{ rendered }}\n </ng-container>\n }\n }\n </th>\n }\n </tr>\n }\n </thead>\n\n <tbody yuwTBody>\n @if (loading()) {\n @for (row of _skeletonRows(); track row) {\n <tr yuwTr [class]=\"_rowClass()\">\n @for (column of table.getVisibleLeafColumns(); track column.id) {\n <td yuwTd [class]=\"_cellClasses().get(column.id)?.cell\">\n <span yuwSkeleton class=\"block h-4 w-full\"></span>\n </td>\n }\n </tr>\n }\n } @else if (_isEmpty()) {\n <tr yuwTr [class]=\"_rowClass()\">\n <td yuwTd [attr.colspan]=\"_columnCount()\" class=\"h-24 text-center text-muted-foreground\">\n {{ emptyText() ?? '' }}\n </td>\n </tr>\n } @else {\n @for (row of table.getRowModel().rows; track row.id) {\n <tr\n yuwTr\n [class]=\"_rowClasses().get(row.id)\"\n [attr.data-state]=\"row.getIsSelected() ? 'selected' : null\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"onRowClick(row.original)\"\n (keydown)=\"onRowKeydown($event, row.original)\"\n >\n @for (cell of row.getVisibleCells(); track cell.id) {\n <td yuwTd [class]=\"_cellClasses().get(cell.column.id)?.cell\">\n <ng-container *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let rendered\">\n {{ rendered }}\n </ng-container>\n </td>\n }\n </tr>\n }\n }\n </tbody>\n </table>\n</div>\n\n@if (paginated()) {\n <div class=\"flex items-center flex-wrap justify-end gap-4 py-3 px-1 max-lg:justify-center\">\n @if (customPagination()) {\n <ng-content select=\"[yuwDatatablePagination]\" />\n }\n <yuw-pagination\n [page]=\"currentPage()\"\n (pageChange)=\"onPageChange($event)\"\n [totalPages]=\"table.getPageCount() || 1\"\n [previousLabel]=\"previousPageLabel()\"\n [nextLabel]=\"nextPageLabel()\"\n [ellipsisSrText]=\"paginationEllipsisSrText()\"\n [ariaLabel]=\"paginationAriaLabel()\"\n color=\"neutral\"\n size=\"icon-sm\"\n class=\"flex\"\n />\n </div>\n}\n", dependencies: [{ kind: "directive", type: YuwTableContainerDirective, selector: "[yuwTableContainer]" }, { kind: "directive", type: YuwTableDirective, selector: "[yuwTable]" }, { kind: "directive", type: YuwTHeadDirective, selector: "[yuwTHead]" }, { kind: "directive", type: YuwTBodyDirective, selector: "[yuwTBody]" }, { kind: "directive", type: YuwTrDirective, selector: "[yuwTr]" }, { kind: "directive", type: YuwThDirective, selector: "[yuwTh]" }, { kind: "directive", type: YuwTdDirective, selector: "[yuwTd]" }, { kind: "directive", type: YuwCaptionDirective, selector: "[yuwCaption]" }, { kind: "component", type: YuwPaginationComponent, selector: "yuw-pagination", inputs: ["ariaLabel", "color", "ellipsisSrText", "nextLabel", "page", "previousLabel", "size", "totalPages"], outputs: ["pageChange"] }, { kind: "directive", type: YuwSkeletonDirective, selector: "[yuwSkeleton]" }, { kind: "directive", type: FlexRenderDirective, selector: "ng-template[flexRender]", inputs: ["flexRender", "flexRenderProps", "flexRenderInjector"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4363
4386
  }
4364
4387
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwDatatableComponent, decorators: [{
4365
4388
  type: Component,
4366
4389
  args: [{ selector: 'yuw-datatable', imports: [...YuwTableImports, YuwPaginationComponent, YuwSkeletonDirective, FlexRenderDirective, NgIcon], providers: [provideIcons({ lucideChevronDown, lucideChevronUp, lucideChevronsUpDown })], host: {
4367
4390
  class: 'contents',
4368
- }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div yuwTableContainer [class]=\"_containerClass()\">\n <table yuwTable [class]=\"_tableClass()\">\n @if (caption()) {\n <caption yuwCaption>{{ caption() }}</caption>\n }\n\n <thead yuwTHead [class]=\"_headClass()\">\n @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n <tr yuwTr [class]=\"_rowClass()\">\n @for (header of headerGroup.headers; track header.id) {\n @let sorted = header.column.getIsSorted();\n @let headerClasses = _cellClasses().get(header.column.id);\n <th\n yuwTh\n scope=\"col\"\n [attr.colspan]=\"header.colSpan\"\n [attr.aria-sort]=\"sorted ? _ariaSort[sorted] : null\"\n [class]=\"headerClasses?.header\"\n >\n @if (!header.isPlaceholder) {\n @if (sortable() && header.column.getCanSort()) {\n <button\n type=\"button\"\n class=\"inline-flex items-center gap-1 select-none hover:text-foreground/80\"\n (click)=\"header.column.toggleSorting()\"\n >\n <ng-container\n *flexRender=\"header.column.columnDef.header; props: header.getContext(); let rendered\"\n >\n {{ rendered }}\n </ng-container>\n\n <ng-icon [name]=\"_sortIcon[sorted || 'none']\" class=\"shrink-0 text-xs\" aria-hidden=\"true\" />\n </button>\n } @else {\n <ng-container *flexRender=\"header.column.columnDef.header; props: header.getContext(); let rendered\">\n {{ rendered }}\n </ng-container>\n }\n }\n </th>\n }\n </tr>\n }\n </thead>\n\n <tbody yuwTBody>\n @if (loading()) {\n @for (row of _skeletonRows(); track row) {\n <tr yuwTr [class]=\"_rowClass()\">\n @for (column of table.getVisibleLeafColumns(); track column.id) {\n <td yuwTd [class]=\"_cellClasses().get(column.id)?.cell\">\n <span yuwSkeleton class=\"block h-4 w-full\"></span>\n </td>\n }\n </tr>\n }\n } @else if (_isEmpty()) {\n <tr yuwTr [class]=\"_rowClass()\">\n <td yuwTd [attr.colspan]=\"_columnCount()\" class=\"h-24 text-center text-muted-foreground\">\n {{ emptyText() ?? '' }}\n </td>\n </tr>\n } @else {\n @for (row of table.getRowModel().rows; track row.id) {\n <tr\n yuwTr\n [class]=\"_rowClasses().get(row.id)\"\n [attr.data-state]=\"row.getIsSelected() ? 'selected' : null\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"onRowClick(row.original)\"\n (keydown)=\"onRowKeydown($event, row.original)\"\n >\n @for (cell of row.getVisibleCells(); track cell.id) {\n <td yuwTd [class]=\"_cellClasses().get(cell.column.id)?.cell\">\n <ng-container *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let rendered\">\n {{ rendered }}\n </ng-container>\n </td>\n }\n </tr>\n }\n }\n </tbody>\n </table>\n</div>\n\n@if (paginated()) {\n <div class=\"flex items-center flex-wrap justify-end gap-4 py-3 px-1 max-lg:justify-center\">\n @if (customPagination()) {\n <ng-content select=\"[yuwDatatablePagination]\" />\n }\n <yuw-pagination\n [page]=\"currentPage()\"\n (pageChange)=\"onPageChange($event)\"\n [totalPages]=\"table.getPageCount() || 1\"\n [previousLabel]=\"previousPageLabel()\"\n [nextLabel]=\"nextPageLabel()\"\n [ellipsisSrText]=\"paginationEllipsisSrText()\"\n [ariaLabel]=\"paginationAriaLabel()\"\n color=\"neutral\"\n size=\"icon-sm\"\n class=\"flex\"\n />\n </div>\n}\n" }]
4369
- }], propDecorators: { customPagination: [{ type: i0.ContentChild, args: [i0.forwardRef(() => YuwDatatablePaginationDirective), { isSignal: true }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], cellClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellClass", required: false }] }], columnFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnFilters", required: false }] }, { type: i0.Output, args: ["columnFiltersChange"] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], columnVisibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnVisibility", required: false }] }, { type: i0.Output, args: ["columnVisibilityChange"] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingRows", required: false }] }], nextPageLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextPageLabel", required: true }] }], paginated: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginated", required: false }] }], pagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagination", required: false }] }, { type: i0.Output, args: ["paginationChange"] }], paginationAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginationAriaLabel", required: true }] }], paginationEllipsisSrText: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginationEllipsisSrText", required: true }] }], previousPageLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousPageLabel", required: true }] }], rowClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowClass", required: false }] }], rowSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowSelection", required: false }] }, { type: i0.Output, args: ["rowSelectionChange"] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], sortable: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortable", required: false }] }], sorting: [{ type: i0.Input, args: [{ isSignal: true, alias: "sorting", required: false }] }, { type: i0.Output, args: ["sortingChange"] }], tableClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableClass", required: false }] }], totalItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalItems", required: false }] }], rowClicked: [{ type: i0.Output, args: ["rowClicked"] }], selectedRowsChange: [{ type: i0.Output, args: ["selectedRowsChange"] }] } });
4391
+ }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div yuwTableContainer [class]=\"_containerClass()\">\n <table #tableElement yuwTable [class]=\"_tableClass()\">\n @if (caption()) {\n <caption yuwCaption>{{ caption() }}</caption>\n }\n\n <thead yuwTHead [class]=\"_headClass()\">\n @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n <tr yuwTr [class]=\"_rowClass()\">\n @for (header of headerGroup.headers; track header.id) {\n @let sorted = header.column.getIsSorted();\n @let headerClasses = _cellClasses().get(header.column.id);\n <th\n yuwTh\n scope=\"col\"\n [attr.colspan]=\"header.colSpan\"\n [attr.aria-sort]=\"sorted ? _ariaSort[sorted] : null\"\n [class]=\"headerClasses?.header\"\n >\n @if (!header.isPlaceholder) {\n @if (sortable() && header.column.getCanSort()) {\n <button\n type=\"button\"\n class=\"inline-flex items-center gap-1 select-none hover:text-foreground/80\"\n (click)=\"header.column.toggleSorting()\"\n >\n <ng-container\n *flexRender=\"header.column.columnDef.header; props: header.getContext(); let rendered\"\n >\n {{ rendered }}\n </ng-container>\n\n <ng-icon [name]=\"_sortIcon[sorted || 'none']\" class=\"shrink-0 text-xs\" aria-hidden=\"true\" />\n </button>\n } @else {\n <ng-container *flexRender=\"header.column.columnDef.header; props: header.getContext(); let rendered\">\n {{ rendered }}\n </ng-container>\n }\n }\n </th>\n }\n </tr>\n }\n </thead>\n\n <tbody yuwTBody>\n @if (loading()) {\n @for (row of _skeletonRows(); track row) {\n <tr yuwTr [class]=\"_rowClass()\">\n @for (column of table.getVisibleLeafColumns(); track column.id) {\n <td yuwTd [class]=\"_cellClasses().get(column.id)?.cell\">\n <span yuwSkeleton class=\"block h-4 w-full\"></span>\n </td>\n }\n </tr>\n }\n } @else if (_isEmpty()) {\n <tr yuwTr [class]=\"_rowClass()\">\n <td yuwTd [attr.colspan]=\"_columnCount()\" class=\"h-24 text-center text-muted-foreground\">\n {{ emptyText() ?? '' }}\n </td>\n </tr>\n } @else {\n @for (row of table.getRowModel().rows; track row.id) {\n <tr\n yuwTr\n [class]=\"_rowClasses().get(row.id)\"\n [attr.data-state]=\"row.getIsSelected() ? 'selected' : null\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"onRowClick(row.original)\"\n (keydown)=\"onRowKeydown($event, row.original)\"\n >\n @for (cell of row.getVisibleCells(); track cell.id) {\n <td yuwTd [class]=\"_cellClasses().get(cell.column.id)?.cell\">\n <ng-container *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let rendered\">\n {{ rendered }}\n </ng-container>\n </td>\n }\n </tr>\n }\n }\n </tbody>\n </table>\n</div>\n\n@if (paginated()) {\n <div class=\"flex items-center flex-wrap justify-end gap-4 py-3 px-1 max-lg:justify-center\">\n @if (customPagination()) {\n <ng-content select=\"[yuwDatatablePagination]\" />\n }\n <yuw-pagination\n [page]=\"currentPage()\"\n (pageChange)=\"onPageChange($event)\"\n [totalPages]=\"table.getPageCount() || 1\"\n [previousLabel]=\"previousPageLabel()\"\n [nextLabel]=\"nextPageLabel()\"\n [ellipsisSrText]=\"paginationEllipsisSrText()\"\n [ariaLabel]=\"paginationAriaLabel()\"\n color=\"neutral\"\n size=\"icon-sm\"\n class=\"flex\"\n />\n </div>\n}\n" }]
4392
+ }], propDecorators: { _table: [{ type: i0.ViewChild, args: ['tableElement', { isSignal: true }] }], customPagination: [{ type: i0.ContentChild, args: [i0.forwardRef(() => YuwDatatablePaginationDirective), { isSignal: true }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], cellClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellClass", required: false }] }], columnFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnFilters", required: false }] }, { type: i0.Output, args: ["columnFiltersChange"] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], columnVisibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnVisibility", required: false }] }, { type: i0.Output, args: ["columnVisibilityChange"] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingRows", required: false }] }], nextPageLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextPageLabel", required: true }] }], paginated: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginated", required: false }] }], pagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagination", required: false }] }, { type: i0.Output, args: ["paginationChange"] }], paginationAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginationAriaLabel", required: true }] }], paginationEllipsisSrText: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginationEllipsisSrText", required: true }] }], previousPageLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousPageLabel", required: true }] }], rowClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowClass", required: false }] }], rowSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowSelection", required: false }] }, { type: i0.Output, args: ["rowSelectionChange"] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], sortable: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortable", required: false }] }], sorting: [{ type: i0.Input, args: [{ isSignal: true, alias: "sorting", required: false }] }, { type: i0.Output, args: ["sortingChange"] }], tableClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableClass", required: false }] }], totalItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalItems", required: false }] }], rowClicked: [{ type: i0.Output, args: ["rowClicked"] }], selectedRowsChange: [{ type: i0.Output, args: ["selectedRowsChange"] }] } });
4370
4393
 
4371
4394
  /**
4372
4395
  * Selection checkbox for a datatable cell or header. The host stops the click so neither the
@@ -4450,6 +4473,98 @@ function buildYuwActionsColumn(label, onEdit, cellClass = 'w-12', header = '') {
4450
4473
  };
4451
4474
  }
4452
4475
 
4476
+ const YUW_TABLE_SHARE_FORMATS = ['copy', 'print', 'pdf', 'excel', 'csv'];
4477
+
4478
+ const UNSAFE_FILE_NAME_CHARACTERS = /[\\/:*?"<>|]+/g;
4479
+ function fileName({ title }, extension) {
4480
+ const base = title?.replace(UNSAFE_FILE_NAME_CHARACTERS, ' ').trim() || 'export';
4481
+ return `${base} ${new Date().toISOString().slice(0, 10)}.${extension}`;
4482
+ }
4483
+ function csvField(value) {
4484
+ return /[",\r\n]/.test(value) ? `"${value.replace(/"/g, '""')}"` : value;
4485
+ }
4486
+ function lines({ headers, rows }, field, separator) {
4487
+ return [headers, ...rows].map((row) => row.map(field).join(separator)).join('\r\n');
4488
+ }
4489
+ function download(blob, name) {
4490
+ const url = URL.createObjectURL(blob);
4491
+ const link = document.createElement('a');
4492
+ link.href = url;
4493
+ link.download = name;
4494
+ link.click();
4495
+ setTimeout(() => URL.revokeObjectURL(url));
4496
+ }
4497
+ function appendRow(document, parent, cells, tag) {
4498
+ const row = parent.appendChild(document.createElement('tr'));
4499
+ cells.forEach((text) => {
4500
+ row.appendChild(document.createElement(tag)).textContent = text;
4501
+ });
4502
+ }
4503
+ /**
4504
+ * Builds the printout in a hidden iframe with the DOM API, never from an HTML string, so cell text cannot inject
4505
+ * markup. The iframe goes away once the print dialog closes.
4506
+ */
4507
+ function print(snapshot) {
4508
+ const frame = document.body.appendChild(document.createElement('iframe'));
4509
+ frame.style.cssText = 'position:fixed;width:0;height:0;border:0;visibility:hidden';
4510
+ const frameDocument = frame.contentDocument;
4511
+ const style = frameDocument.head.appendChild(frameDocument.createElement('style'));
4512
+ style.textContent =
4513
+ 'body{font-family:system-ui,sans-serif;font-size:11px}table{width:100%;border-collapse:collapse}' +
4514
+ 'th,td{border:1px solid #ccc;padding:4px 6px;text-align:left}th{background:#f3f3f3}';
4515
+ frameDocument.title = snapshot.title ?? '';
4516
+ if (snapshot.title) {
4517
+ frameDocument.body.appendChild(frameDocument.createElement('h1')).textContent = snapshot.title;
4518
+ }
4519
+ const table = frameDocument.body.appendChild(frameDocument.createElement('table'));
4520
+ appendRow(frameDocument, table.createTHead(), snapshot.headers, 'th');
4521
+ const body = table.createTBody();
4522
+ snapshot.rows.forEach((row) => appendRow(frameDocument, body, row, 'td'));
4523
+ const frameWindow = frame.contentWindow;
4524
+ frameWindow.addEventListener('afterprint', () => frame.remove(), { once: true });
4525
+ frameWindow.focus();
4526
+ frameWindow.print();
4527
+ return Promise.resolve();
4528
+ }
4529
+ async function savePdf(snapshot) {
4530
+ const [{ jsPDF }, { autoTable }] = await Promise.all([import('jspdf'), import('jspdf-autotable')]);
4531
+ const pdf = new jsPDF({ orientation: 'landscape' });
4532
+ if (snapshot.title) {
4533
+ pdf.setFontSize(14);
4534
+ pdf.text(snapshot.title, 14, 16);
4535
+ }
4536
+ autoTable(pdf, {
4537
+ head: [[...snapshot.headers]],
4538
+ body: snapshot.rows.map((row) => [...row]),
4539
+ startY: snapshot.title ? 22 : 14,
4540
+ styles: { fontSize: 8 },
4541
+ });
4542
+ pdf.save(fileName(snapshot, 'pdf'));
4543
+ }
4544
+ async function saveExcel(snapshot) {
4545
+ const { default: writeExcelFile } = await import('write-excel-file/browser');
4546
+ const header = snapshot.headers.map((value) => ({ value, fontWeight: 'bold' }));
4547
+ await writeExcelFile([header, ...snapshot.rows.map((row) => [...row])]).toFile(fileName(snapshot, 'xlsx'));
4548
+ }
4549
+ /**
4550
+ * One handler per format. The PDF and Excel libraries load on first use, so a page that never exports does not pay
4551
+ * for them. The CSV starts with a byte order mark so Excel reads it as UTF-8.
4552
+ */
4553
+ const SHARE_HANDLERS = {
4554
+ copy: (snapshot) => navigator.clipboard.writeText(lines(snapshot, (value) => value, '\t')),
4555
+ print,
4556
+ pdf: savePdf,
4557
+ excel: saveExcel,
4558
+ csv: (snapshot) => {
4559
+ download(new Blob(['', lines(snapshot, csvField, ',')], { type: 'text/csv;charset=utf-8' }), fileName(snapshot, 'csv'));
4560
+ return Promise.resolve();
4561
+ },
4562
+ };
4563
+ /** Copies, prints or downloads `snapshot` as `format`; rejects when the browser refuses, e.g. clipboard access. */
4564
+ function shareTable(format, snapshot) {
4565
+ return SHARE_HANDLERS[format](snapshot);
4566
+ }
4567
+
4453
4568
  /**
4454
4569
  * Container directive for list/row item layout structures.
4455
4570
  * Accepts optional `variant` and `size` inputs.
@@ -7601,9 +7716,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
7601
7716
  *
7602
7717
  * Outputs:
7603
7718
  * - `rowClicked`: Emits the clicked row.
7719
+ *
7720
+ * It is a `YuwTableShareSource`: bind it to `yuws-list-toolbar`'s `shareSource` to copy, print or download the page
7721
+ * the user is looking at.
7604
7722
  */
7605
7723
  class YuwsListTableComponent {
7606
7724
  constructor() {
7725
+ this._datatable = viewChild.required(YuwDatatableComponent);
7607
7726
  this.columns = input.required(...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
7608
7727
  this.columnVisibility = model({}, ...(ngDevMode ? [{ debugName: "columnVisibility" }] : /* istanbul ignore next */ []));
7609
7728
  this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
@@ -7616,13 +7735,16 @@ class YuwsListTableComponent {
7616
7735
  this.total = input.required(...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
7617
7736
  this.rowClicked = output();
7618
7737
  }
7738
+ snapshot() {
7739
+ return this._datatable().snapshot();
7740
+ }
7619
7741
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsListTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7620
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: YuwsListTableComponent, isStandalone: true, selector: "yuws-list-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, columnVisibility: { classPropertyName: "columnVisibility", publicName: "columnVisibility", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: true, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: true, transformFunction: null }, list: { classPropertyName: "list", publicName: "list", isSignal: true, isRequired: true, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, rowClass: { classPropertyName: "rowClass", publicName: "rowClass", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { columnVisibility: "columnVisibilityChange", rowClicked: "rowClicked" }, ngImport: i0, template: "<yuw-datatable\n sortable\n paginated\n appearance=\"card\"\n [nextPageLabel]=\"labels().next\"\n [previousPageLabel]=\"labels().previous\"\n [paginationEllipsisSrText]=\"labels().ellipsis\"\n [paginationAriaLabel]=\"labels().ariaLabel\"\n [emptyText]=\"emptyText()\"\n [columns]=\"columns()\"\n [data]=\"data()\"\n [totalItems]=\"total()\"\n [loading]=\"loading()\"\n [rowClass]=\"rowClass()\"\n [selectable]=\"selectable()\"\n [pagination]=\"list().pagination()\"\n [sorting]=\"list().sorting()\"\n [(columnVisibility)]=\"columnVisibility\"\n (paginationChange)=\"list().pagination.set($event)\"\n (sortingChange)=\"list().sorting.set($event)\"\n (rowClicked)=\"rowClicked.emit($event)\"\n>\n <yuws-page-size yuwDatatablePagination [list]=\"list()\" [labels]=\"labels().pageSize\" [disabled]=\"loading()\" />\n</yuw-datatable>\n", dependencies: [{ kind: "component", type: YuwDatatableComponent, selector: "yuw-datatable", inputs: ["appearance", "caption", "cellClass", "columnFilters", "columns", "columnVisibility", "data", "emptyText", "loading", "loadingRows", "nextPageLabel", "paginated", "pagination", "paginationAriaLabel", "paginationEllipsisSrText", "previousPageLabel", "rowClass", "rowSelection", "selectable", "sortable", "sorting", "tableClass", "totalItems"], outputs: ["columnFiltersChange", "columnVisibilityChange", "paginationChange", "rowSelectionChange", "sortingChange", "rowClicked", "selectedRowsChange"] }, { kind: "directive", type: YuwDatatablePaginationDirective, selector: "[yuwDatatablePagination]" }, { kind: "component", type: YuwsPageSizeComponent, selector: "yuws-page-size", inputs: ["disabled", "labels", "list"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7742
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.22", type: YuwsListTableComponent, isStandalone: true, selector: "yuws-list-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, columnVisibility: { classPropertyName: "columnVisibility", publicName: "columnVisibility", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: true, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: true, transformFunction: null }, list: { classPropertyName: "list", publicName: "list", isSignal: true, isRequired: true, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, rowClass: { classPropertyName: "rowClass", publicName: "rowClass", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { columnVisibility: "columnVisibilityChange", rowClicked: "rowClicked" }, viewQueries: [{ propertyName: "_datatable", first: true, predicate: YuwDatatableComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<yuw-datatable\n sortable\n paginated\n appearance=\"card\"\n [nextPageLabel]=\"labels().next\"\n [previousPageLabel]=\"labels().previous\"\n [paginationEllipsisSrText]=\"labels().ellipsis\"\n [paginationAriaLabel]=\"labels().ariaLabel\"\n [emptyText]=\"emptyText()\"\n [columns]=\"columns()\"\n [data]=\"data()\"\n [totalItems]=\"total()\"\n [loading]=\"loading()\"\n [rowClass]=\"rowClass()\"\n [selectable]=\"selectable()\"\n [pagination]=\"list().pagination()\"\n [sorting]=\"list().sorting()\"\n [(columnVisibility)]=\"columnVisibility\"\n (paginationChange)=\"list().pagination.set($event)\"\n (sortingChange)=\"list().sorting.set($event)\"\n (rowClicked)=\"rowClicked.emit($event)\"\n>\n <yuws-page-size yuwDatatablePagination [list]=\"list()\" [labels]=\"labels().pageSize\" [disabled]=\"loading()\" />\n</yuw-datatable>\n", dependencies: [{ kind: "component", type: YuwDatatableComponent, selector: "yuw-datatable", inputs: ["appearance", "caption", "cellClass", "columnFilters", "columns", "columnVisibility", "data", "emptyText", "loading", "loadingRows", "nextPageLabel", "paginated", "pagination", "paginationAriaLabel", "paginationEllipsisSrText", "previousPageLabel", "rowClass", "rowSelection", "selectable", "sortable", "sorting", "tableClass", "totalItems"], outputs: ["columnFiltersChange", "columnVisibilityChange", "paginationChange", "rowSelectionChange", "sortingChange", "rowClicked", "selectedRowsChange"] }, { kind: "directive", type: YuwDatatablePaginationDirective, selector: "[yuwDatatablePagination]" }, { kind: "component", type: YuwsPageSizeComponent, selector: "yuws-page-size", inputs: ["disabled", "labels", "list"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7621
7743
  }
7622
7744
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsListTableComponent, decorators: [{
7623
7745
  type: Component,
7624
7746
  args: [{ selector: 'yuws-list-table', changeDetection: ChangeDetectionStrategy.OnPush, imports: [YuwDatatableComponent, YuwDatatablePaginationDirective, YuwsPageSizeComponent], template: "<yuw-datatable\n sortable\n paginated\n appearance=\"card\"\n [nextPageLabel]=\"labels().next\"\n [previousPageLabel]=\"labels().previous\"\n [paginationEllipsisSrText]=\"labels().ellipsis\"\n [paginationAriaLabel]=\"labels().ariaLabel\"\n [emptyText]=\"emptyText()\"\n [columns]=\"columns()\"\n [data]=\"data()\"\n [totalItems]=\"total()\"\n [loading]=\"loading()\"\n [rowClass]=\"rowClass()\"\n [selectable]=\"selectable()\"\n [pagination]=\"list().pagination()\"\n [sorting]=\"list().sorting()\"\n [(columnVisibility)]=\"columnVisibility\"\n (paginationChange)=\"list().pagination.set($event)\"\n (sortingChange)=\"list().sorting.set($event)\"\n (rowClicked)=\"rowClicked.emit($event)\"\n>\n <yuws-page-size yuwDatatablePagination [list]=\"list()\" [labels]=\"labels().pageSize\" [disabled]=\"loading()\" />\n</yuw-datatable>\n" }]
7625
- }], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], columnVisibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnVisibility", required: false }] }, { type: i0.Output, args: ["columnVisibilityChange"] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: true }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: true }] }], list: [{ type: i0.Input, args: [{ isSignal: true, alias: "list", required: true }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], rowClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowClass", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: true }] }], rowClicked: [{ type: i0.Output, args: ["rowClicked"] }] } });
7747
+ }], propDecorators: { _datatable: [{ type: i0.ViewChild, args: [i0.forwardRef(() => YuwDatatableComponent), { isSignal: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], columnVisibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnVisibility", required: false }] }, { type: i0.Output, args: ["columnVisibilityChange"] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: true }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: true }] }], list: [{ type: i0.Input, args: [{ isSignal: true, alias: "list", required: true }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], rowClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowClass", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: true }] }], rowClicked: [{ type: i0.Output, args: ["rowClicked"] }] } });
7626
7748
 
7627
7749
  /**
7628
7750
  * Pagination footer for lists without a datatable: the page size selector with its range message
@@ -7794,10 +7916,71 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
7794
7916
  }]
7795
7917
  }], propDecorators: { groupId: [{ type: i0.Input, args: [{ isSignal: true, alias: "yuwsFilterContent", required: true }] }] } });
7796
7918
 
7919
+ const SHARE_ICONS = {
7920
+ copy: 'lucideClipboardCopy',
7921
+ print: 'lucidePrinter',
7922
+ pdf: 'lucideFileText',
7923
+ excel: 'lucideFileSpreadsheet',
7924
+ csv: 'lucideFileDown',
7925
+ };
7926
+ /**
7927
+ * Share button of `yuws-list-toolbar`: a menu that copies the table to the clipboard, prints it, or downloads it as
7928
+ * PDF, Excel or CSV. It reads the table from `source` when an item is picked, so what is shared is the page on screen
7929
+ * at that moment. A copy is confirmed with the `copied` toast, and any format the browser refuses with `failed`.
7930
+ *
7931
+ * Inputs:
7932
+ * - `labels`: Required `YuwsListToolbarShareLabels` with the consumer's translated text.
7933
+ * - `source`: Required `YuwTableShareSource`, typically a `yuws-list-table`.
7934
+ * - `title`: Heading of the printout and the PDF, and name of the downloaded files.
7935
+ */
7936
+ class YuwsListToolbarShareComponent {
7937
+ constructor() {
7938
+ this.labels = input.required(...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
7939
+ this.source = input.required(...(ngDevMode ? [{ debugName: "source" }] : /* istanbul ignore next */ []));
7940
+ this.title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
7941
+ this.items = computed(() => YUW_TABLE_SHARE_FORMATS.map((format) => ({ format, icon: SHARE_ICONS[format], label: this.labels()[format] })), ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
7942
+ }
7943
+ async onShare(format) {
7944
+ try {
7945
+ await shareTable(format, { ...this.source().snapshot(), title: this.title() });
7946
+ if (format === 'copy') {
7947
+ toast.success(this.labels().copied);
7948
+ }
7949
+ }
7950
+ catch {
7951
+ toast.error(this.labels().failed);
7952
+ }
7953
+ }
7954
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsListToolbarShareComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7955
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwsListToolbarShareComponent, isStandalone: true, selector: "yuws-list-toolbar-share", inputs: { labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: true, transformFunction: null }, source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "flex shrink-0" }, providers: [
7956
+ provideIcons({
7957
+ lucideClipboardCopy,
7958
+ lucideFileDown,
7959
+ lucideFileSpreadsheet,
7960
+ lucideFileText,
7961
+ lucidePrinter,
7962
+ lucideShare2,
7963
+ }),
7964
+ ], ngImport: i0, template: "<yuw-button variant=\"outline\" class=\"gap-2\" [ariaLabel]=\"labels().trigger\" [yuwDropdownMenuTrigger]=\"menu\">\n <ng-icon name=\"lucideShare2\" size=\"16\" />\n <span class=\"max-md:hidden\">\n {{ labels().trigger }}\n </span>\n</yuw-button>\n\n<ng-template #menu>\n <div yuwContextMenu>\n @for (item of items(); track item.format) {\n <button yuwContextMenuItem (triggered)=\"onShare(item.format)\">\n <ng-icon [name]=\"item.icon\" />\n {{ item.label }}\n </button>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "component", type: YuwButtonComponent, selector: "yuw-button", inputs: ["animationDisabled", "ariaLabel", "color", "disabled", "href", "size", "target", "transparent", "type", "class", "variant", "yuwDropdownMenuTrigger"], outputs: ["clicked"] }, { kind: "directive", type: YuwContextMenuDirective, selector: "[yuwContextMenu]" }, { kind: "directive", type: YuwContextMenuItemDirective, selector: "[yuwContextMenuItem]", outputs: ["triggered"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7965
+ }
7966
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsListToolbarShareComponent, decorators: [{
7967
+ type: Component,
7968
+ args: [{ selector: 'yuws-list-toolbar-share', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgIcon, YuwButtonComponent, ...YuwContextMenuImports], providers: [
7969
+ provideIcons({
7970
+ lucideClipboardCopy,
7971
+ lucideFileDown,
7972
+ lucideFileSpreadsheet,
7973
+ lucideFileText,
7974
+ lucidePrinter,
7975
+ lucideShare2,
7976
+ }),
7977
+ ], host: { class: 'flex shrink-0' }, template: "<yuw-button variant=\"outline\" class=\"gap-2\" [ariaLabel]=\"labels().trigger\" [yuwDropdownMenuTrigger]=\"menu\">\n <ng-icon name=\"lucideShare2\" size=\"16\" />\n <span class=\"max-md:hidden\">\n {{ labels().trigger }}\n </span>\n</yuw-button>\n\n<ng-template #menu>\n <div yuwContextMenu>\n @for (item of items(); track item.format) {\n <button yuwContextMenuItem (triggered)=\"onShare(item.format)\">\n <ng-icon [name]=\"item.icon\" />\n {{ item.label }}\n </button>\n }\n </div>\n</ng-template>\n" }]
7978
+ }], propDecorators: { labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: true }] }], source: [{ type: i0.Input, args: [{ isSignal: true, alias: "source", required: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }] } });
7979
+
7797
7980
  const VIEW_MODES = ['list', 'block'];
7798
7981
  const DEFAULT_VIEW_MODE_ICONS = { list: 'lucideList', block: 'lucideLayoutGrid' };
7799
7982
  /**
7800
- * Action row of `yuws-list-toolbar`: search, export and column visibility, each rendered only when
7983
+ * Action row of `yuws-list-toolbar`: search, export, share and column visibility, each rendered only when
7801
7984
  * its input is set. Below `md` the search collapses into a popover; both widths bind the same
7802
7985
  * `search` model and carry their own `yuw-search-input` because the popover anchors to the element
7803
7986
  * holding `yuwPopoverTrigger`.
@@ -7817,6 +8000,8 @@ const DEFAULT_VIEW_MODE_ICONS = { list: 'lucideList', block: 'lucideLayoutGrid'
7817
8000
  * - `labels`: Required `YuwsListToolbarLabels` with the consumer's text for the controls.
7818
8001
  * - `search`: Two-way (`[(search)]`) text of the search field, shared by the inline and popover fields. Default is `''`.
7819
8002
  * - `searchPlaceholder`: Placeholder of the search field; the search renders only when set.
8003
+ * - `shareSource`: `YuwTableShareSource` the share menu reads; the menu renders only with it and `labels.share`.
8004
+ * - `shareTitle`: Title of what the share menu prints and downloads.
7820
8005
  * - `showExport`: Renders the export button. Default is `false`.
7821
8006
  * - `viewMode`: Two-way (`[(viewMode)]`) `YuwsViewMode` (`'list'` or `'block'`); the list/block switch renders only when set.
7822
8007
  * - `viewModeIcons`: Partial override of the switch icons by mode (ng-icon names, registered by the consumer with `provideIcons`). Defaults are `lucideList` and `lucideLayoutGrid`.
@@ -7833,13 +8018,20 @@ class YuwsListToolbarActionsComponent {
7833
8018
  this.labels = input.required(...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
7834
8019
  this.search = model('', ...(ngDevMode ? [{ debugName: "search" }] : /* istanbul ignore next */ []));
7835
8020
  this.searchPlaceholder = input(...(ngDevMode ? [undefined, { debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
8021
+ this.shareSource = input(...(ngDevMode ? [undefined, { debugName: "shareSource" }] : /* istanbul ignore next */ []));
8022
+ this.shareTitle = input(...(ngDevMode ? [undefined, { debugName: "shareTitle" }] : /* istanbul ignore next */ []));
7836
8023
  this.showExport = input(false, { ...(ngDevMode ? { debugName: "showExport" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
7837
8024
  this.viewMode = model(...(ngDevMode ? [undefined, { debugName: "viewMode" }] : /* istanbul ignore next */ []));
7838
8025
  this.viewModeIcons = input(...(ngDevMode ? [undefined, { debugName: "viewModeIcons" }] : /* istanbul ignore next */ []));
7839
8026
  this.exported = output();
7840
8027
  this.searched = output();
7841
8028
  this.searchOpen = signal(false, ...(ngDevMode ? [{ debugName: "searchOpen" }] : /* istanbul ignore next */ []));
7842
- this._searchIsOnlyAction = computed(() => !this.showExport() && !this.hideableColumns(), ...(ngDevMode ? [{ debugName: "_searchIsOnlyAction" }] : /* istanbul ignore next */ []));
8029
+ this.share = computed(() => {
8030
+ const source = this.shareSource();
8031
+ const labels = this.labels().share;
8032
+ return source && labels ? { source, labels } : undefined;
8033
+ }, ...(ngDevMode ? [{ debugName: "share" }] : /* istanbul ignore next */ []));
8034
+ this._searchIsOnlyAction = computed(() => !this.showExport() && !this.share() && !this.hideableColumns(), ...(ngDevMode ? [{ debugName: "_searchIsOnlyAction" }] : /* istanbul ignore next */ []));
7843
8035
  this.hasHiddenColumns = computed(() => this.hiddenColumns().length > 0, ...(ngDevMode ? [{ debugName: "hasHiddenColumns" }] : /* istanbul ignore next */ []));
7844
8036
  this.searchPopoverAlign = computed(() => (this._searchIsOnlyAction() ? 'end' : 'center'), ...(ngDevMode ? [{ debugName: "searchPopoverAlign" }] : /* istanbul ignore next */ []));
7845
8037
  this.searchPopoverOffsetX = computed(() => (this._searchIsOnlyAction() ? 0 : -16), ...(ngDevMode ? [{ debugName: "searchPopoverOffsetX" }] : /* istanbul ignore next */ []));
@@ -7867,7 +8059,7 @@ class YuwsListToolbarActionsComponent {
7867
8059
  this.viewMode.set(id);
7868
8060
  }
7869
8061
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsListToolbarActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7870
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwsListToolbarActionsComponent, isStandalone: true, selector: "yuws-list-toolbar-actions", inputs: { hiddenColumns: { classPropertyName: "hiddenColumns", publicName: "hiddenColumns", isSignal: true, isRequired: false, transformFunction: null }, hideableColumns: { classPropertyName: "hideableColumns", publicName: "hideableColumns", isSignal: true, isRequired: false, transformFunction: null }, isMobile: { classPropertyName: "isMobile", publicName: "isMobile", isSignal: true, isRequired: true, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: true, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, showExport: { classPropertyName: "showExport", publicName: "showExport", isSignal: true, isRequired: false, transformFunction: null }, viewMode: { classPropertyName: "viewMode", publicName: "viewMode", isSignal: true, isRequired: false, transformFunction: null }, viewModeIcons: { classPropertyName: "viewModeIcons", publicName: "viewModeIcons", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hiddenColumns: "hiddenColumnsChange", search: "searchChange", viewMode: "viewModeChange", exported: "exported", searched: "searched" }, host: { classAttribute: "flex items-center gap-2" }, providers: [provideIcons({ lucideDownload, lucideLayoutGrid, lucideList, lucideSearch, lucideSettings2 })], ngImport: i0, template: "@if (searchPlaceholder(); as placeholder) {\n @if (isMobile()) {\n <yuw-popover\n [align]=\"searchPopoverAlign()\"\n class=\"mr-5\"\n triggerVariant=\"outline\"\n triggerSize=\"icon\"\n panelClass=\"w-[min(20rem,calc(100vw-2rem))] p-2\"\n [offsetX]=\"searchPopoverOffsetX()\"\n [(open)]=\"searchOpen\"\n >\n <span yuwPopoverTrigger class=\"flex items-center\" [attr.aria-label]=\"labels().search.expand\">\n <ng-icon name=\"lucideSearch\" size=\"16\" />\n </span>\n\n <yuw-search-input\n expandedWidth=\"100%\"\n [(value)]=\"search\"\n [placeholder]=\"placeholder\"\n [clearAriaLabel]=\"labels().search.clear\"\n (searched)=\"searched.emit($event)\"\n />\n </yuw-popover>\n } @else {\n <yuw-search-input\n collapseFrom=\"right\"\n expandedWidth=\"18rem\"\n [(value)]=\"search\"\n [placeholder]=\"placeholder\"\n [clearAriaLabel]=\"labels().search.clear\"\n [expandAriaLabel]=\"labels().search.expand\"\n (searched)=\"searched.emit($event)\"\n />\n }\n}\n\n@if (showExport()) {\n <yuw-button variant=\"outline\" class=\"gap-2\" (clicked)=\"exported.emit($event)\">\n <ng-icon name=\"lucideDownload\" size=\"16\" />\n <span class=\"max-md:hidden\">\n {{ labels().export }}\n </span>\n </yuw-button>\n}\n\n@if (hideableColumns(); as columns) {\n <div class=\"flex shrink-0\">\n <yuw-combobox\n multiple\n keepValueOnEscape\n triggerSize=\"icon\"\n triggerClass=\"relative\"\n [options]=\"columns\"\n [value]=\"hiddenColumns()\"\n [searchPlaceholder]=\"labels().columns.placeholder\"\n [emptyText]=\"labels().columns.empty\"\n [triggerAriaLabel]=\"labels().columns.trigger\"\n (valueChange)=\"onHiddenColumnsChange($event)\"\n >\n <ng-template yuwComboboxTrigger>\n <ng-icon name=\"lucideSettings2\" size=\"16\" />\n\n @if (hasHiddenColumns()) {\n <yuw-badge\n dot\n color=\"destructive\"\n class=\"absolute -top-1 -right-1\"\n style=\"width: 0.5rem; height: 0.5rem\"\n data-testid=\"hidden-columns-dot\"\n />\n }\n </ng-template>\n </yuw-combobox>\n </div>\n}\n\n@if (viewMode()) {\n <yuw-button-group\n variant=\"outline\"\n selectedVariant=\"secondary\"\n selectedColor=\"secondary\"\n [buttons]=\"viewModeButtons()\"\n (buttonClicked)=\"onViewModeClicked($event)\"\n >\n <ng-template yuwButtonGroupContent=\"list\">\n <ng-icon [name]=\"viewModeIconNames().list\" size=\"16\" />\n </ng-template>\n <ng-template yuwButtonGroupContent=\"block\">\n <ng-icon [name]=\"viewModeIconNames().block\" size=\"16\" />\n </ng-template>\n </yuw-button-group>\n}\n", dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "component", type: YuwBadgeComponent, selector: "yuw-badge", inputs: ["color", "dot", "removeLabel", "variant"], outputs: ["removed"] }, { kind: "component", type: YuwButtonComponent, selector: "yuw-button", inputs: ["animationDisabled", "ariaLabel", "color", "disabled", "href", "size", "target", "transparent", "type", "class", "variant", "yuwDropdownMenuTrigger"], outputs: ["clicked"] }, { kind: "component", type: YuwButtonGroupComponent, selector: "yuw-button-group", inputs: ["ariaLabel", "buttons", "color", "orientation", "selectedColor", "selectedVariant", "size", "variant"], outputs: ["buttonClicked"] }, { kind: "directive", type: YuwButtonGroupContentDirective, selector: "ng-template[yuwButtonGroupContent]", inputs: ["yuwButtonGroupContent"] }, { kind: "component", type: YuwComboboxComponent, selector: "yuw-combobox", inputs: ["clearAriaLabel", "emptyText", "helperText", "inputId", "invalid", "keepValueOnEscape", "multiple", "options", "placeholder", "readonlyTrigger", "search", "searchPlaceholder", "size", "triggerAriaLabel", "triggerClass", "triggerColor", "triggerSize", "triggerVariant", "value"], outputs: ["searchChange", "valueChange"] }, { kind: "directive", type: YuwComboboxTriggerDirective, selector: "ng-template[yuwComboboxTrigger]" }, { kind: "component", type: YuwPopoverComponent, selector: "yuw-popover", inputs: ["align", "description", "offsetX", "open", "panelClass", "showTrigger", "sideOffset", "title", "triggerClass", "triggerColor", "triggerSize", "triggerTransparent", "triggerVariant"], outputs: ["openChange"] }, { kind: "component", type: YuwSearchInputComponent, selector: "yuw-search-input", inputs: ["clearAriaLabel", "collapseFrom", "expandAriaLabel", "expandedWidth", "size", "transparent"], outputs: ["searched"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8062
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwsListToolbarActionsComponent, isStandalone: true, selector: "yuws-list-toolbar-actions", inputs: { hiddenColumns: { classPropertyName: "hiddenColumns", publicName: "hiddenColumns", isSignal: true, isRequired: false, transformFunction: null }, hideableColumns: { classPropertyName: "hideableColumns", publicName: "hideableColumns", isSignal: true, isRequired: false, transformFunction: null }, isMobile: { classPropertyName: "isMobile", publicName: "isMobile", isSignal: true, isRequired: true, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: true, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, shareSource: { classPropertyName: "shareSource", publicName: "shareSource", isSignal: true, isRequired: false, transformFunction: null }, shareTitle: { classPropertyName: "shareTitle", publicName: "shareTitle", isSignal: true, isRequired: false, transformFunction: null }, showExport: { classPropertyName: "showExport", publicName: "showExport", isSignal: true, isRequired: false, transformFunction: null }, viewMode: { classPropertyName: "viewMode", publicName: "viewMode", isSignal: true, isRequired: false, transformFunction: null }, viewModeIcons: { classPropertyName: "viewModeIcons", publicName: "viewModeIcons", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hiddenColumns: "hiddenColumnsChange", search: "searchChange", viewMode: "viewModeChange", exported: "exported", searched: "searched" }, host: { classAttribute: "flex items-center gap-2" }, providers: [provideIcons({ lucideDownload, lucideLayoutGrid, lucideList, lucideSearch, lucideSettings2 })], ngImport: i0, template: "@if (searchPlaceholder(); as placeholder) {\n @if (isMobile()) {\n <yuw-popover\n [align]=\"searchPopoverAlign()\"\n class=\"mr-5\"\n triggerVariant=\"outline\"\n triggerSize=\"icon\"\n panelClass=\"w-[min(20rem,calc(100vw-2rem))] p-2\"\n [offsetX]=\"searchPopoverOffsetX()\"\n [(open)]=\"searchOpen\"\n >\n <span yuwPopoverTrigger class=\"flex items-center\" [attr.aria-label]=\"labels().search.expand\">\n <ng-icon name=\"lucideSearch\" size=\"16\" />\n </span>\n\n <yuw-search-input\n expandedWidth=\"100%\"\n [(value)]=\"search\"\n [placeholder]=\"placeholder\"\n [clearAriaLabel]=\"labels().search.clear\"\n (searched)=\"searched.emit($event)\"\n />\n </yuw-popover>\n } @else {\n <yuw-search-input\n collapseFrom=\"right\"\n expandedWidth=\"18rem\"\n [(value)]=\"search\"\n [placeholder]=\"placeholder\"\n [clearAriaLabel]=\"labels().search.clear\"\n [expandAriaLabel]=\"labels().search.expand\"\n (searched)=\"searched.emit($event)\"\n />\n }\n}\n\n@if (showExport()) {\n <yuw-button variant=\"outline\" class=\"gap-2\" (clicked)=\"exported.emit($event)\">\n <ng-icon name=\"lucideDownload\" size=\"16\" />\n <span class=\"max-md:hidden\">\n {{ labels().export }}\n </span>\n </yuw-button>\n}\n\n@if (share(); as share) {\n <yuws-list-toolbar-share [labels]=\"share.labels\" [source]=\"share.source\" [title]=\"shareTitle()\" />\n}\n\n@if (hideableColumns(); as columns) {\n <div class=\"flex shrink-0\">\n <yuw-combobox\n multiple\n keepValueOnEscape\n triggerSize=\"icon\"\n triggerClass=\"relative\"\n [options]=\"columns\"\n [value]=\"hiddenColumns()\"\n [searchPlaceholder]=\"labels().columns.placeholder\"\n [emptyText]=\"labels().columns.empty\"\n [triggerAriaLabel]=\"labels().columns.trigger\"\n (valueChange)=\"onHiddenColumnsChange($event)\"\n >\n <ng-template yuwComboboxTrigger>\n <ng-icon name=\"lucideSettings2\" size=\"16\" />\n\n @if (hasHiddenColumns()) {\n <yuw-badge\n dot\n color=\"destructive\"\n class=\"absolute -top-1 -right-1\"\n style=\"width: 0.5rem; height: 0.5rem\"\n data-testid=\"hidden-columns-dot\"\n />\n }\n </ng-template>\n </yuw-combobox>\n </div>\n}\n\n@if (viewMode()) {\n <yuw-button-group\n variant=\"outline\"\n selectedVariant=\"secondary\"\n selectedColor=\"secondary\"\n [buttons]=\"viewModeButtons()\"\n (buttonClicked)=\"onViewModeClicked($event)\"\n >\n <ng-template yuwButtonGroupContent=\"list\">\n <ng-icon [name]=\"viewModeIconNames().list\" size=\"16\" />\n </ng-template>\n <ng-template yuwButtonGroupContent=\"block\">\n <ng-icon [name]=\"viewModeIconNames().block\" size=\"16\" />\n </ng-template>\n </yuw-button-group>\n}\n", dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "component", type: YuwBadgeComponent, selector: "yuw-badge", inputs: ["color", "dot", "removeLabel", "variant"], outputs: ["removed"] }, { kind: "component", type: YuwButtonComponent, selector: "yuw-button", inputs: ["animationDisabled", "ariaLabel", "color", "disabled", "href", "size", "target", "transparent", "type", "class", "variant", "yuwDropdownMenuTrigger"], outputs: ["clicked"] }, { kind: "component", type: YuwButtonGroupComponent, selector: "yuw-button-group", inputs: ["ariaLabel", "buttons", "color", "orientation", "selectedColor", "selectedVariant", "size", "variant"], outputs: ["buttonClicked"] }, { kind: "directive", type: YuwButtonGroupContentDirective, selector: "ng-template[yuwButtonGroupContent]", inputs: ["yuwButtonGroupContent"] }, { kind: "component", type: YuwComboboxComponent, selector: "yuw-combobox", inputs: ["clearAriaLabel", "emptyText", "helperText", "inputId", "invalid", "keepValueOnEscape", "multiple", "options", "placeholder", "readonlyTrigger", "search", "searchPlaceholder", "size", "triggerAriaLabel", "triggerClass", "triggerColor", "triggerSize", "triggerVariant", "value"], outputs: ["searchChange", "valueChange"] }, { kind: "directive", type: YuwComboboxTriggerDirective, selector: "ng-template[yuwComboboxTrigger]" }, { kind: "component", type: YuwPopoverComponent, selector: "yuw-popover", inputs: ["align", "description", "offsetX", "open", "panelClass", "showTrigger", "sideOffset", "title", "triggerClass", "triggerColor", "triggerSize", "triggerTransparent", "triggerVariant"], outputs: ["openChange"] }, { kind: "component", type: YuwSearchInputComponent, selector: "yuw-search-input", inputs: ["clearAriaLabel", "collapseFrom", "expandAriaLabel", "expandedWidth", "size", "transparent"], outputs: ["searched"] }, { kind: "component", type: YuwsListToolbarShareComponent, selector: "yuws-list-toolbar-share", inputs: ["labels", "source", "title"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7871
8063
  }
7872
8064
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsListToolbarActionsComponent, decorators: [{
7873
8065
  type: Component,
@@ -7881,8 +8073,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
7881
8073
  YuwComboboxTriggerDirective,
7882
8074
  YuwPopoverComponent,
7883
8075
  YuwSearchInputComponent,
7884
- ], providers: [provideIcons({ lucideDownload, lucideLayoutGrid, lucideList, lucideSearch, lucideSettings2 })], host: { class: 'flex items-center gap-2' }, template: "@if (searchPlaceholder(); as placeholder) {\n @if (isMobile()) {\n <yuw-popover\n [align]=\"searchPopoverAlign()\"\n class=\"mr-5\"\n triggerVariant=\"outline\"\n triggerSize=\"icon\"\n panelClass=\"w-[min(20rem,calc(100vw-2rem))] p-2\"\n [offsetX]=\"searchPopoverOffsetX()\"\n [(open)]=\"searchOpen\"\n >\n <span yuwPopoverTrigger class=\"flex items-center\" [attr.aria-label]=\"labels().search.expand\">\n <ng-icon name=\"lucideSearch\" size=\"16\" />\n </span>\n\n <yuw-search-input\n expandedWidth=\"100%\"\n [(value)]=\"search\"\n [placeholder]=\"placeholder\"\n [clearAriaLabel]=\"labels().search.clear\"\n (searched)=\"searched.emit($event)\"\n />\n </yuw-popover>\n } @else {\n <yuw-search-input\n collapseFrom=\"right\"\n expandedWidth=\"18rem\"\n [(value)]=\"search\"\n [placeholder]=\"placeholder\"\n [clearAriaLabel]=\"labels().search.clear\"\n [expandAriaLabel]=\"labels().search.expand\"\n (searched)=\"searched.emit($event)\"\n />\n }\n}\n\n@if (showExport()) {\n <yuw-button variant=\"outline\" class=\"gap-2\" (clicked)=\"exported.emit($event)\">\n <ng-icon name=\"lucideDownload\" size=\"16\" />\n <span class=\"max-md:hidden\">\n {{ labels().export }}\n </span>\n </yuw-button>\n}\n\n@if (hideableColumns(); as columns) {\n <div class=\"flex shrink-0\">\n <yuw-combobox\n multiple\n keepValueOnEscape\n triggerSize=\"icon\"\n triggerClass=\"relative\"\n [options]=\"columns\"\n [value]=\"hiddenColumns()\"\n [searchPlaceholder]=\"labels().columns.placeholder\"\n [emptyText]=\"labels().columns.empty\"\n [triggerAriaLabel]=\"labels().columns.trigger\"\n (valueChange)=\"onHiddenColumnsChange($event)\"\n >\n <ng-template yuwComboboxTrigger>\n <ng-icon name=\"lucideSettings2\" size=\"16\" />\n\n @if (hasHiddenColumns()) {\n <yuw-badge\n dot\n color=\"destructive\"\n class=\"absolute -top-1 -right-1\"\n style=\"width: 0.5rem; height: 0.5rem\"\n data-testid=\"hidden-columns-dot\"\n />\n }\n </ng-template>\n </yuw-combobox>\n </div>\n}\n\n@if (viewMode()) {\n <yuw-button-group\n variant=\"outline\"\n selectedVariant=\"secondary\"\n selectedColor=\"secondary\"\n [buttons]=\"viewModeButtons()\"\n (buttonClicked)=\"onViewModeClicked($event)\"\n >\n <ng-template yuwButtonGroupContent=\"list\">\n <ng-icon [name]=\"viewModeIconNames().list\" size=\"16\" />\n </ng-template>\n <ng-template yuwButtonGroupContent=\"block\">\n <ng-icon [name]=\"viewModeIconNames().block\" size=\"16\" />\n </ng-template>\n </yuw-button-group>\n}\n" }]
7885
- }], propDecorators: { hiddenColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenColumns", required: false }] }, { type: i0.Output, args: ["hiddenColumnsChange"] }], hideableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideableColumns", required: false }] }], isMobile: [{ type: i0.Input, args: [{ isSignal: true, alias: "isMobile", required: true }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: true }] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }, { type: i0.Output, args: ["searchChange"] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], showExport: [{ type: i0.Input, args: [{ isSignal: true, alias: "showExport", required: false }] }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }, { type: i0.Output, args: ["viewModeChange"] }], viewModeIcons: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewModeIcons", required: false }] }], exported: [{ type: i0.Output, args: ["exported"] }], searched: [{ type: i0.Output, args: ["searched"] }] } });
8076
+ YuwsListToolbarShareComponent,
8077
+ ], providers: [provideIcons({ lucideDownload, lucideLayoutGrid, lucideList, lucideSearch, lucideSettings2 })], host: { class: 'flex items-center gap-2' }, template: "@if (searchPlaceholder(); as placeholder) {\n @if (isMobile()) {\n <yuw-popover\n [align]=\"searchPopoverAlign()\"\n class=\"mr-5\"\n triggerVariant=\"outline\"\n triggerSize=\"icon\"\n panelClass=\"w-[min(20rem,calc(100vw-2rem))] p-2\"\n [offsetX]=\"searchPopoverOffsetX()\"\n [(open)]=\"searchOpen\"\n >\n <span yuwPopoverTrigger class=\"flex items-center\" [attr.aria-label]=\"labels().search.expand\">\n <ng-icon name=\"lucideSearch\" size=\"16\" />\n </span>\n\n <yuw-search-input\n expandedWidth=\"100%\"\n [(value)]=\"search\"\n [placeholder]=\"placeholder\"\n [clearAriaLabel]=\"labels().search.clear\"\n (searched)=\"searched.emit($event)\"\n />\n </yuw-popover>\n } @else {\n <yuw-search-input\n collapseFrom=\"right\"\n expandedWidth=\"18rem\"\n [(value)]=\"search\"\n [placeholder]=\"placeholder\"\n [clearAriaLabel]=\"labels().search.clear\"\n [expandAriaLabel]=\"labels().search.expand\"\n (searched)=\"searched.emit($event)\"\n />\n }\n}\n\n@if (showExport()) {\n <yuw-button variant=\"outline\" class=\"gap-2\" (clicked)=\"exported.emit($event)\">\n <ng-icon name=\"lucideDownload\" size=\"16\" />\n <span class=\"max-md:hidden\">\n {{ labels().export }}\n </span>\n </yuw-button>\n}\n\n@if (share(); as share) {\n <yuws-list-toolbar-share [labels]=\"share.labels\" [source]=\"share.source\" [title]=\"shareTitle()\" />\n}\n\n@if (hideableColumns(); as columns) {\n <div class=\"flex shrink-0\">\n <yuw-combobox\n multiple\n keepValueOnEscape\n triggerSize=\"icon\"\n triggerClass=\"relative\"\n [options]=\"columns\"\n [value]=\"hiddenColumns()\"\n [searchPlaceholder]=\"labels().columns.placeholder\"\n [emptyText]=\"labels().columns.empty\"\n [triggerAriaLabel]=\"labels().columns.trigger\"\n (valueChange)=\"onHiddenColumnsChange($event)\"\n >\n <ng-template yuwComboboxTrigger>\n <ng-icon name=\"lucideSettings2\" size=\"16\" />\n\n @if (hasHiddenColumns()) {\n <yuw-badge\n dot\n color=\"destructive\"\n class=\"absolute -top-1 -right-1\"\n style=\"width: 0.5rem; height: 0.5rem\"\n data-testid=\"hidden-columns-dot\"\n />\n }\n </ng-template>\n </yuw-combobox>\n </div>\n}\n\n@if (viewMode()) {\n <yuw-button-group\n variant=\"outline\"\n selectedVariant=\"secondary\"\n selectedColor=\"secondary\"\n [buttons]=\"viewModeButtons()\"\n (buttonClicked)=\"onViewModeClicked($event)\"\n >\n <ng-template yuwButtonGroupContent=\"list\">\n <ng-icon [name]=\"viewModeIconNames().list\" size=\"16\" />\n </ng-template>\n <ng-template yuwButtonGroupContent=\"block\">\n <ng-icon [name]=\"viewModeIconNames().block\" size=\"16\" />\n </ng-template>\n </yuw-button-group>\n}\n" }]
8078
+ }], propDecorators: { hiddenColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenColumns", required: false }] }, { type: i0.Output, args: ["hiddenColumnsChange"] }], hideableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideableColumns", required: false }] }], isMobile: [{ type: i0.Input, args: [{ isSignal: true, alias: "isMobile", required: true }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: true }] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }, { type: i0.Output, args: ["searchChange"] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], shareSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "shareSource", required: false }] }], shareTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "shareTitle", required: false }] }], showExport: [{ type: i0.Input, args: [{ isSignal: true, alias: "showExport", required: false }] }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }, { type: i0.Output, args: ["viewModeChange"] }], viewModeIcons: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewModeIcons", required: false }] }], exported: [{ type: i0.Output, args: ["exported"] }], searched: [{ type: i0.Output, args: ["searched"] }] } });
7886
8079
 
7887
8080
  /** Number of selected values across every group, not the number of groups. */
7888
8081
  function countSelectedValues(selection) {
@@ -8298,7 +8491,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
8298
8491
  * full-width second line, still a single scrolling row, and the trailing actions stay on the first.
8299
8492
  *
8300
8493
  * Each control renders only when its input is set: `filterGroups`, `searchPlaceholder`,
8301
- * `showExport`, `hideableColumns`, `viewMode`. Setting `viewMode` adds a list/block switch bound
8494
+ * `showExport`, `shareSource`, `hideableColumns`, `viewMode`. Setting `viewMode` adds a list/block switch bound
8302
8495
  * two-way to it (`viewModeChange` is the click listener); its names come from `labels.viewMode`. Saved filter sets need `filterSets` and `labels.filters.sets`;
8303
8496
  * the toolbar emits `setSaved`, `setRenamed` and `setDeleted` and the consumer persists them. `labels` holds every text and the consumer translates it;
8304
8497
  * `idleColor` is the tone of the filter row's outline controls (filters, add button, star). Each active
@@ -8316,6 +8509,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
8316
8509
  * - `labels`: Required `YuwsListToolbarLabels` with the consumer's translated text for every control.
8317
8510
  * - `search`: Two-way (`[(search)]`) text of the search field. Default is `''`.
8318
8511
  * - `searchPlaceholder`: Placeholder of the search field; the search renders only when set.
8512
+ * - `shareSource`: `YuwTableShareSource`, typically the page's `yuws-list-table`; with `labels.share` it adds a menu that copies, prints or downloads the table as PDF, Excel or CSV.
8513
+ * - `shareTitle`: Title of what the share menu prints and downloads, and name of its files.
8319
8514
  * - `selection`: Two-way (`[(selection)]`) applied filter selection, values keyed by group id. Default is `{}`.
8320
8515
  * - `showExport`: Renders the export button. Default is `false`.
8321
8516
  * - `viewMode`: Two-way (`[(viewMode)]`) `YuwsViewMode` (`'list'` or `'block'`); the list/block switch renders only when set.
@@ -8338,6 +8533,8 @@ class YuwsListToolbarComponent {
8338
8533
  this.search = model('', ...(ngDevMode ? [{ debugName: "search" }] : /* istanbul ignore next */ []));
8339
8534
  this.searchPlaceholder = input(...(ngDevMode ? [undefined, { debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
8340
8535
  this.selection = model({}, ...(ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []));
8536
+ this.shareSource = input(...(ngDevMode ? [undefined, { debugName: "shareSource" }] : /* istanbul ignore next */ []));
8537
+ this.shareTitle = input(...(ngDevMode ? [undefined, { debugName: "shareTitle" }] : /* istanbul ignore next */ []));
8341
8538
  this.showExport = input(false, { ...(ngDevMode ? { debugName: "showExport" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
8342
8539
  this.viewMode = model(...(ngDevMode ? [undefined, { debugName: "viewMode" }] : /* istanbul ignore next */ []));
8343
8540
  this.viewModeIcons = input(...(ngDevMode ? [undefined, { debugName: "viewModeIcons" }] : /* istanbul ignore next */ []));
@@ -8349,12 +8546,12 @@ class YuwsListToolbarComponent {
8349
8546
  this.isMobile = injectIsMobile();
8350
8547
  }
8351
8548
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsListToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8352
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwsListToolbarComponent, isStandalone: true, selector: "yuws-list-toolbar", inputs: { filterGroups: { classPropertyName: "filterGroups", publicName: "filterGroups", isSignal: true, isRequired: false, transformFunction: null }, filtersDisabled: { classPropertyName: "filtersDisabled", publicName: "filtersDisabled", isSignal: true, isRequired: false, transformFunction: null }, filterSets: { classPropertyName: "filterSets", publicName: "filterSets", isSignal: true, isRequired: false, transformFunction: null }, hiddenColumns: { classPropertyName: "hiddenColumns", publicName: "hiddenColumns", isSignal: true, isRequired: false, transformFunction: null }, hideableColumns: { classPropertyName: "hideableColumns", publicName: "hideableColumns", isSignal: true, isRequired: false, transformFunction: null }, idleColor: { classPropertyName: "idleColor", publicName: "idleColor", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: true, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, showExport: { classPropertyName: "showExport", publicName: "showExport", isSignal: true, isRequired: false, transformFunction: null }, viewMode: { classPropertyName: "viewMode", publicName: "viewMode", isSignal: true, isRequired: false, transformFunction: null }, viewModeIcons: { classPropertyName: "viewModeIcons", publicName: "viewModeIcons", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hiddenColumns: "hiddenColumnsChange", search: "searchChange", selection: "selectionChange", viewMode: "viewModeChange", exported: "exported", searched: "searched", setDeleted: "setDeleted", setRenamed: "setRenamed", setSaved: "setSaved" }, host: { classAttribute: "flex items-center gap-3 max-md:flex-wrap max-md:gap-2" }, queries: [{ propertyName: "filterContents", predicate: YuwsFilterContentDirective, isSignal: true }], ngImport: i0, template: "<!-- Filters -->\n<div class=\"flex flex-1 items-center max-md:contents\">\n @if (filterGroups(); as groups) {\n <yuws-list-toolbar-filters\n [disabled]=\"filtersDisabled()\"\n [groups]=\"groups\"\n [contents]=\"filterContents()\"\n [idleColor]=\"idleColor()\"\n [labels]=\"labels().filters\"\n [sets]=\"filterSets()\"\n [(selection)]=\"selection\"\n (setDeleted)=\"setDeleted.emit($event)\"\n (setRenamed)=\"setRenamed.emit($event)\"\n (setSaved)=\"setSaved.emit($event)\"\n />\n }\n</div>\n\n<!-- Actions -->\n<div class=\"flex min-w-0 items-center gap-2 max-md:ms-auto\">\n <yuws-list-toolbar-actions\n [hideableColumns]=\"hideableColumns()\"\n [(hiddenColumns)]=\"hiddenColumns\"\n [isMobile]=\"isMobile()\"\n [labels]=\"labels()\"\n [searchPlaceholder]=\"searchPlaceholder()\"\n [showExport]=\"showExport()\"\n [(viewMode)]=\"viewMode\"\n [viewModeIcons]=\"viewModeIcons()\"\n [(search)]=\"search\"\n (exported)=\"exported.emit($event)\"\n (searched)=\"searched.emit($event)\"\n />\n\n <ng-content />\n</div>\n", dependencies: [{ kind: "component", type: YuwsListToolbarActionsComponent, selector: "yuws-list-toolbar-actions", inputs: ["hiddenColumns", "hideableColumns", "isMobile", "labels", "search", "searchPlaceholder", "showExport", "viewMode", "viewModeIcons"], outputs: ["hiddenColumnsChange", "searchChange", "viewModeChange", "exported", "searched"] }, { kind: "component", type: YuwsListToolbarFiltersComponent, selector: "yuws-list-toolbar-filters", inputs: ["contents", "disabled", "groups", "idleColor", "labels", "selection", "sets"], outputs: ["selectionChange", "setDeleted", "setRenamed", "setSaved"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8549
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwsListToolbarComponent, isStandalone: true, selector: "yuws-list-toolbar", inputs: { filterGroups: { classPropertyName: "filterGroups", publicName: "filterGroups", isSignal: true, isRequired: false, transformFunction: null }, filtersDisabled: { classPropertyName: "filtersDisabled", publicName: "filtersDisabled", isSignal: true, isRequired: false, transformFunction: null }, filterSets: { classPropertyName: "filterSets", publicName: "filterSets", isSignal: true, isRequired: false, transformFunction: null }, hiddenColumns: { classPropertyName: "hiddenColumns", publicName: "hiddenColumns", isSignal: true, isRequired: false, transformFunction: null }, hideableColumns: { classPropertyName: "hideableColumns", publicName: "hideableColumns", isSignal: true, isRequired: false, transformFunction: null }, idleColor: { classPropertyName: "idleColor", publicName: "idleColor", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: true, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, shareSource: { classPropertyName: "shareSource", publicName: "shareSource", isSignal: true, isRequired: false, transformFunction: null }, shareTitle: { classPropertyName: "shareTitle", publicName: "shareTitle", isSignal: true, isRequired: false, transformFunction: null }, showExport: { classPropertyName: "showExport", publicName: "showExport", isSignal: true, isRequired: false, transformFunction: null }, viewMode: { classPropertyName: "viewMode", publicName: "viewMode", isSignal: true, isRequired: false, transformFunction: null }, viewModeIcons: { classPropertyName: "viewModeIcons", publicName: "viewModeIcons", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hiddenColumns: "hiddenColumnsChange", search: "searchChange", selection: "selectionChange", viewMode: "viewModeChange", exported: "exported", searched: "searched", setDeleted: "setDeleted", setRenamed: "setRenamed", setSaved: "setSaved" }, host: { classAttribute: "flex items-center gap-3 max-md:flex-wrap max-md:gap-2" }, queries: [{ propertyName: "filterContents", predicate: YuwsFilterContentDirective, isSignal: true }], ngImport: i0, template: "<!-- Filters -->\n<div class=\"flex flex-1 items-center max-md:contents\">\n @if (filterGroups(); as groups) {\n <yuws-list-toolbar-filters\n [disabled]=\"filtersDisabled()\"\n [groups]=\"groups\"\n [contents]=\"filterContents()\"\n [idleColor]=\"idleColor()\"\n [labels]=\"labels().filters\"\n [sets]=\"filterSets()\"\n [(selection)]=\"selection\"\n (setDeleted)=\"setDeleted.emit($event)\"\n (setRenamed)=\"setRenamed.emit($event)\"\n (setSaved)=\"setSaved.emit($event)\"\n />\n }\n</div>\n\n<!-- Actions -->\n<div class=\"flex min-w-0 items-center gap-2 max-md:ms-auto\">\n <yuws-list-toolbar-actions\n [hideableColumns]=\"hideableColumns()\"\n [(hiddenColumns)]=\"hiddenColumns\"\n [isMobile]=\"isMobile()\"\n [labels]=\"labels()\"\n [searchPlaceholder]=\"searchPlaceholder()\"\n [shareSource]=\"shareSource()\"\n [shareTitle]=\"shareTitle()\"\n [showExport]=\"showExport()\"\n [(viewMode)]=\"viewMode\"\n [viewModeIcons]=\"viewModeIcons()\"\n [(search)]=\"search\"\n (exported)=\"exported.emit($event)\"\n (searched)=\"searched.emit($event)\"\n />\n\n <ng-content />\n</div>\n", dependencies: [{ kind: "component", type: YuwsListToolbarActionsComponent, selector: "yuws-list-toolbar-actions", inputs: ["hiddenColumns", "hideableColumns", "isMobile", "labels", "search", "searchPlaceholder", "shareSource", "shareTitle", "showExport", "viewMode", "viewModeIcons"], outputs: ["hiddenColumnsChange", "searchChange", "viewModeChange", "exported", "searched"] }, { kind: "component", type: YuwsListToolbarFiltersComponent, selector: "yuws-list-toolbar-filters", inputs: ["contents", "disabled", "groups", "idleColor", "labels", "selection", "sets"], outputs: ["selectionChange", "setDeleted", "setRenamed", "setSaved"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8353
8550
  }
8354
8551
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsListToolbarComponent, decorators: [{
8355
8552
  type: Component,
8356
- args: [{ selector: 'yuws-list-toolbar', changeDetection: ChangeDetectionStrategy.OnPush, imports: [YuwsListToolbarActionsComponent, YuwsListToolbarFiltersComponent], host: { class: 'flex items-center gap-3 max-md:flex-wrap max-md:gap-2' }, template: "<!-- Filters -->\n<div class=\"flex flex-1 items-center max-md:contents\">\n @if (filterGroups(); as groups) {\n <yuws-list-toolbar-filters\n [disabled]=\"filtersDisabled()\"\n [groups]=\"groups\"\n [contents]=\"filterContents()\"\n [idleColor]=\"idleColor()\"\n [labels]=\"labels().filters\"\n [sets]=\"filterSets()\"\n [(selection)]=\"selection\"\n (setDeleted)=\"setDeleted.emit($event)\"\n (setRenamed)=\"setRenamed.emit($event)\"\n (setSaved)=\"setSaved.emit($event)\"\n />\n }\n</div>\n\n<!-- Actions -->\n<div class=\"flex min-w-0 items-center gap-2 max-md:ms-auto\">\n <yuws-list-toolbar-actions\n [hideableColumns]=\"hideableColumns()\"\n [(hiddenColumns)]=\"hiddenColumns\"\n [isMobile]=\"isMobile()\"\n [labels]=\"labels()\"\n [searchPlaceholder]=\"searchPlaceholder()\"\n [showExport]=\"showExport()\"\n [(viewMode)]=\"viewMode\"\n [viewModeIcons]=\"viewModeIcons()\"\n [(search)]=\"search\"\n (exported)=\"exported.emit($event)\"\n (searched)=\"searched.emit($event)\"\n />\n\n <ng-content />\n</div>\n" }]
8357
- }], propDecorators: { filterContents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => YuwsFilterContentDirective), { isSignal: true }] }], filterGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterGroups", required: false }] }], filtersDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "filtersDisabled", required: false }] }], filterSets: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterSets", required: false }] }], hiddenColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenColumns", required: false }] }, { type: i0.Output, args: ["hiddenColumnsChange"] }], hideableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideableColumns", required: false }] }], idleColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "idleColor", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: true }] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }, { type: i0.Output, args: ["searchChange"] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], showExport: [{ type: i0.Input, args: [{ isSignal: true, alias: "showExport", required: false }] }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }, { type: i0.Output, args: ["viewModeChange"] }], viewModeIcons: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewModeIcons", required: false }] }], exported: [{ type: i0.Output, args: ["exported"] }], searched: [{ type: i0.Output, args: ["searched"] }], setDeleted: [{ type: i0.Output, args: ["setDeleted"] }], setRenamed: [{ type: i0.Output, args: ["setRenamed"] }], setSaved: [{ type: i0.Output, args: ["setSaved"] }] } });
8553
+ args: [{ selector: 'yuws-list-toolbar', changeDetection: ChangeDetectionStrategy.OnPush, imports: [YuwsListToolbarActionsComponent, YuwsListToolbarFiltersComponent], host: { class: 'flex items-center gap-3 max-md:flex-wrap max-md:gap-2' }, template: "<!-- Filters -->\n<div class=\"flex flex-1 items-center max-md:contents\">\n @if (filterGroups(); as groups) {\n <yuws-list-toolbar-filters\n [disabled]=\"filtersDisabled()\"\n [groups]=\"groups\"\n [contents]=\"filterContents()\"\n [idleColor]=\"idleColor()\"\n [labels]=\"labels().filters\"\n [sets]=\"filterSets()\"\n [(selection)]=\"selection\"\n (setDeleted)=\"setDeleted.emit($event)\"\n (setRenamed)=\"setRenamed.emit($event)\"\n (setSaved)=\"setSaved.emit($event)\"\n />\n }\n</div>\n\n<!-- Actions -->\n<div class=\"flex min-w-0 items-center gap-2 max-md:ms-auto\">\n <yuws-list-toolbar-actions\n [hideableColumns]=\"hideableColumns()\"\n [(hiddenColumns)]=\"hiddenColumns\"\n [isMobile]=\"isMobile()\"\n [labels]=\"labels()\"\n [searchPlaceholder]=\"searchPlaceholder()\"\n [shareSource]=\"shareSource()\"\n [shareTitle]=\"shareTitle()\"\n [showExport]=\"showExport()\"\n [(viewMode)]=\"viewMode\"\n [viewModeIcons]=\"viewModeIcons()\"\n [(search)]=\"search\"\n (exported)=\"exported.emit($event)\"\n (searched)=\"searched.emit($event)\"\n />\n\n <ng-content />\n</div>\n" }]
8554
+ }], propDecorators: { filterContents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => YuwsFilterContentDirective), { isSignal: true }] }], filterGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterGroups", required: false }] }], filtersDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "filtersDisabled", required: false }] }], filterSets: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterSets", required: false }] }], hiddenColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenColumns", required: false }] }, { type: i0.Output, args: ["hiddenColumnsChange"] }], hideableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideableColumns", required: false }] }], idleColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "idleColor", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: true }] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }, { type: i0.Output, args: ["searchChange"] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], shareSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "shareSource", required: false }] }], shareTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "shareTitle", required: false }] }], showExport: [{ type: i0.Input, args: [{ isSignal: true, alias: "showExport", required: false }] }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }, { type: i0.Output, args: ["viewModeChange"] }], viewModeIcons: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewModeIcons", required: false }] }], exported: [{ type: i0.Output, args: ["exported"] }], searched: [{ type: i0.Output, args: ["searched"] }], setDeleted: [{ type: i0.Output, args: ["setDeleted"] }], setRenamed: [{ type: i0.Output, args: ["setRenamed"] }], setSaved: [{ type: i0.Output, args: ["setSaved"] }] } });
8358
8555
 
8359
8556
  const FOCUSABLE = 'input:not([type="hidden"]), select, textarea, button, [tabindex]:not([tabindex="-1"])';
8360
8557
  /** Targets where Enter already means something: pressing a button, a new line, following a link. */
@@ -8453,5 +8650,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
8453
8650
  * Generated bundle index. Do not edit.
8454
8651
  */
8455
8652
 
8456
- export { DATATABLE_ALIGN_CLASS, DATATABLE_LAYOUT_CLASS, DATATABLE_WRAP_CONTENT_CLASS, YUWS_NO_DATA_PLACEHOLDER, 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, YuwCardHeaderDirective, YuwCardImports, YuwCardTitleDirective, YuwCheckboxComponent, YuwClassDirective, YuwComboboxComponent, YuwComboboxItemDirective, YuwComboboxTriggerButtonDirective, YuwComboboxTriggerDirective, 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, YuwInputFileComponent, YuwInputOtpComponent, YuwItemActionsDirective, YuwItemContentDirective, YuwItemDescriptionDirective, YuwItemDirective, YuwItemFooterDirective, YuwItemGroupDirective, YuwItemHeaderDirective, YuwItemImports, YuwItemMediaDirective, YuwItemSeparatorDirective, YuwItemTitleDirective, YuwLabel, YuwLeftAddonDirective, YuwMouseScrollXDirective, YuwMouseScrollYDirective, YuwPaginationComponent, YuwPasswordInputComponent, YuwPopoverComponent, YuwPopoverTriggerDirective, YuwRadioGroupComponent, YuwRightAddonDirective, YuwSearchInputComponent, YuwSheetCloseDirective, YuwSheetComponent, YuwSheetFooterDirective, YuwSheetHeaderDirective, 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, YuwStepIndicatorDirective, YuwStepPanelDirective, YuwStepperComponent, YuwSwitchComponent, YuwTBodyDirective, YuwTFootDirective, YuwTHeadDirective, YuwTabContentDirective, YuwTabPanelDirective, YuwTableContainerDirective, YuwTableDirective, YuwTableImports, YuwTabsComponent, YuwTdDirective, YuwTextFieldBase, YuwTextareaComponent, YuwThDirective, YuwToasterComponent, YuwTooltipDirective, YuwTrDirective, YuwValueAccessorBase, YuwsActiveStatusCellComponent, YuwsAdvanceOnEnterDirective, YuwsAvatarNameCellComponent, YuwsCardGridComponent, YuwsCardGridItemComponent, YuwsClampedTextCellComponent, YuwsConfirmDialogComponent, YuwsCopyButtonComponent, YuwsFilterComboboxComponent, YuwsFilterContentDirective, YuwsFlagCellComponent, YuwsFormSheetComponent, YuwsIconActionCellComponent, YuwsImageCellComponent, YuwsImageFieldComponent, YuwsImageUploadComponent, YuwsLinkCellComponent, YuwsListPaginationComponent, YuwsListTableComponent, YuwsListToolbarComponent, YuwsPageHeaderComponent, YuwsPageSizeComponent, YuwsStatusToggleCellComponent, YuwsTitleSkeletonDirective, buildInputOtpGroups, buildYuwActionsColumn, buildYuwsActiveStatusColumn, buildYuwsDateTimeColumn, buildYuwsIconActionColumn, buildYuwsOptionalTextColumn, buildYuwsStatusToggleColumn, cn, createPagedList, createYuwsSheetEditor, datatableCellVariants, datatableContainerVariants, datatableHeadVariants, datatableHeaderCellVariants, datatableRowVariants, getPaginationRange, provideValueAccessor, totalInputOtpLength, yuwCommandDefaultFilter, yuwsInitialsOf, yuwsMediaQuerySignal, yuwsPendingRowClass, yuwsReadFileAsDataUrl };
8653
+ export { DATATABLE_ALIGN_CLASS, DATATABLE_LAYOUT_CLASS, DATATABLE_WRAP_CONTENT_CLASS, YUWS_NO_DATA_PLACEHOLDER, 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, YUW_TABLE_SHARE_FORMATS, 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, YuwCardHeaderDirective, YuwCardImports, YuwCardTitleDirective, YuwCheckboxComponent, YuwClassDirective, YuwComboboxComponent, YuwComboboxItemDirective, YuwComboboxTriggerButtonDirective, YuwComboboxTriggerDirective, 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, YuwInputFileComponent, YuwInputOtpComponent, YuwItemActionsDirective, YuwItemContentDirective, YuwItemDescriptionDirective, YuwItemDirective, YuwItemFooterDirective, YuwItemGroupDirective, YuwItemHeaderDirective, YuwItemImports, YuwItemMediaDirective, YuwItemSeparatorDirective, YuwItemTitleDirective, YuwLabel, YuwLeftAddonDirective, YuwMouseScrollXDirective, YuwMouseScrollYDirective, YuwPaginationComponent, YuwPasswordInputComponent, YuwPopoverComponent, YuwPopoverTriggerDirective, YuwRadioGroupComponent, YuwRightAddonDirective, YuwSearchInputComponent, YuwSheetCloseDirective, YuwSheetComponent, YuwSheetFooterDirective, YuwSheetHeaderDirective, 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, YuwStepIndicatorDirective, YuwStepPanelDirective, YuwStepperComponent, YuwSwitchComponent, YuwTBodyDirective, YuwTFootDirective, YuwTHeadDirective, YuwTabContentDirective, YuwTabPanelDirective, YuwTableContainerDirective, YuwTableDirective, YuwTableImports, YuwTabsComponent, YuwTdDirective, YuwTextFieldBase, YuwTextareaComponent, YuwThDirective, YuwToasterComponent, YuwTooltipDirective, YuwTrDirective, YuwValueAccessorBase, YuwsActiveStatusCellComponent, YuwsAdvanceOnEnterDirective, YuwsAvatarNameCellComponent, YuwsCardGridComponent, YuwsCardGridItemComponent, YuwsClampedTextCellComponent, YuwsConfirmDialogComponent, YuwsCopyButtonComponent, YuwsFilterComboboxComponent, YuwsFilterContentDirective, YuwsFlagCellComponent, YuwsFormSheetComponent, YuwsIconActionCellComponent, YuwsImageCellComponent, YuwsImageFieldComponent, YuwsImageUploadComponent, YuwsLinkCellComponent, YuwsListPaginationComponent, YuwsListTableComponent, YuwsListToolbarComponent, YuwsPageHeaderComponent, YuwsPageSizeComponent, YuwsStatusToggleCellComponent, YuwsTitleSkeletonDirective, buildInputOtpGroups, buildYuwActionsColumn, buildYuwsActiveStatusColumn, buildYuwsDateTimeColumn, buildYuwsIconActionColumn, buildYuwsOptionalTextColumn, buildYuwsStatusToggleColumn, cn, createPagedList, createYuwsSheetEditor, datatableCellVariants, datatableContainerVariants, datatableHeadVariants, datatableHeaderCellVariants, datatableRowVariants, getPaginationRange, provideValueAccessor, shareTable, totalInputOtpLength, yuwCommandDefaultFilter, yuwsInitialsOf, yuwsMediaQuerySignal, yuwsPendingRowClass, yuwsReadFileAsDataUrl };
8457
8654
  //# sourceMappingURL=yukit-web.mjs.map