yukit-web 1.1.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,7 @@ import * as i1$32 from "@spartan-ng/brain/tooltip";
16
16
  import { BrnTooltip, provideBrnTooltipDefaultOptions } from "@spartan-ng/brain/tooltip";
17
17
  import { DEFAULT_TOOLTIP_CONTENT_CLASSES, DEFAULT_TOOLTIP_SVG_CLASS, tooltipPositionVariants } from "yukit-web/helm/tooltip";
18
18
  import { NgIcon, provideIcons } from "@ng-icons/core";
19
- import { lucideArchiveRestore, lucideArrowLeft, lucideCheck, lucideChevronDown, lucideChevronLeft, lucideChevronRight, lucideChevronUp, lucideChevronsUpDown, lucideCircleAlert, lucideClipboardCopy, lucideCopy, lucideDownload, lucideEllipsis, lucideEye, lucideEyeOff, lucideFileDown, lucideFileSpreadsheet, lucideFileText, lucideImagePlus, lucideInfo, lucideLayoutGrid, lucideList, lucideMinus, lucidePaperclip, lucidePencil, lucidePlus, lucidePrinter, lucideSaveCheck, lucideSearch, lucideSettings2, lucideShare, lucideStar, lucideTrash2, lucideUndo2, lucideUpload, lucideX } from "@ng-icons/lucide";
19
+ import { lucideArchiveRestore, lucideArrowLeft, lucideCheck, lucideChevronDown, lucideChevronLeft, lucideChevronRight, lucideChevronUp, lucideChevronsUpDown, lucideCircleAlert, lucideClipboardCopy, lucideCopy, lucideDownload, lucideEllipsis, lucideEye, lucideEyeOff, lucideFileDown, lucideFileSpreadsheet, lucideFileText, lucideImagePlus, lucideInfo, lucideLayoutGrid, lucideList, lucideMinus, lucidePaperclip, lucidePencil, lucidePin, lucidePlus, lucidePrinter, lucideSaveCheck, lucideSearch, lucideSettings2, lucideShare, lucideStar, lucideTrash2, lucideUndo2, lucideUpload, lucideX } from "@ng-icons/lucide";
20
20
  import * as i1$31 from "yukit-web/helm/badge";
21
21
  import { HlmBadge } from "yukit-web/helm/badge";
22
22
  import * as i1$30 from "yukit-web/helm/breadcrumb";
@@ -75,7 +75,7 @@ import { HlmDatePickerImports, injectHlmDatePickerConfig, injectHlmDatePickerMul
75
75
  import { BrnDatePickerTriggerToken, provideBrnDatePicker } from "@spartan-ng/brain/date-picker";
76
76
  import * as i1$11 from "yukit-web/helm/table";
77
77
  import { HlmCaption, HlmTBody, HlmTFoot, HlmTHead, HlmTable, HlmTableContainer, HlmTd, HlmTh, HlmTr } from "yukit-web/helm/table";
78
- import { columnFilteringFeature, columnVisibilityFeature, createCoreRowModel, createFilteredRowModel, createPaginatedRowModel, createSortedRowModel, rowPaginationFeature, rowSelectionFeature, rowSortingFeature, sortFns } from "@tanstack/table-core";
78
+ import { columnFilteringFeature, columnPinningFeature, columnVisibilityFeature, createCoreRowModel, createFilteredRowModel, createPaginatedRowModel, createSortedRowModel, rowPaginationFeature, rowSelectionFeature, rowSortingFeature, sortFns } from "@tanstack/table-core";
79
79
  import { FlexRenderDirective, flexRenderComponent, injectTable } from "@tanstack/angular-table";
80
80
  import * as i1$10 from "yukit-web/helm/item";
81
81
  import { HlmItem, HlmItemActions, HlmItemContent, HlmItemDescription, HlmItemFooter, HlmItemGroup, HlmItemHeader, HlmItemMedia, HlmItemSeparator, HlmItemTitle } from "yukit-web/helm/item";
@@ -4981,6 +4981,7 @@ const yuwSheetBottomClass = `
4981
4981
  data-[side=bottom]:rounded-4xl
4982
4982
  data-[side=bottom]:overflow-hidden
4983
4983
  `;
4984
+ const yuwSheetRightClass = "data-[side=right]:w-full data-[side=right]:sm:max-w-[480px]";
4984
4985
  const yuwLayoutLeftInsetClass = `
4985
4986
  data-[side=left]:inset-y-1
4986
4987
  lg:data-[side=left]:inset-y-2
@@ -5049,7 +5050,7 @@ var YuwSheetComponent = class YuwSheetComponent {
5049
5050
  this._bodyClass = computed(() => cn("flex-1 overflow-y-auto px-4 scroll-fade-y [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", this.bodyClass()), ...ngDevMode ? [{ debugName: "_bodyClass" }] : /* istanbul ignore next */ []);
5050
5051
  this._panelClass = computed(() => {
5051
5052
  const inset = this.layoutInset();
5052
- return cn(yuwSheetBottomClass, inset ? YUW_SHEET_LAYOUT_INSET_CLASS[inset] : void 0, this.panelClass());
5053
+ return cn(yuwSheetBottomClass, yuwSheetRightClass, inset ? YUW_SHEET_LAYOUT_INSET_CLASS[inset] : void 0, this.panelClass());
5053
5054
  }, ...ngDevMode ? [{ debugName: "_panelClass" }] : /* istanbul ignore next */ []);
5054
5055
  this._sheetState = computed(() => this.open() ? "open" : "closed", ...ngDevMode ? [{ debugName: "_sheetState" }] : /* istanbul ignore next */ []);
5055
5056
  const root = inject(DOCUMENT$1).documentElement;
@@ -7525,7 +7526,7 @@ var YuwSwitchCardComponent = class YuwSwitchCardComponent extends YuwValueAccess
7525
7526
  providers: [provideValueAccessor(YuwSwitchCardComponent)],
7526
7527
  usesInheritance: true,
7527
7528
  ngImport: i0,
7528
- template: "<label [class]=\"_cardClass\" (focusout)=\"_onBlur()\">\n <span class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span [id]=\"_labelId\" class=\"text-sm font-semibold text-foreground\">{{ label() }}</span>\n @if (description(); as text) {\n <span [id]=\"_descriptionId\" class=\"text-sm text-muted-foreground\">{{ text }}</span>\n }\n </span>\n <hlm-switch\n [checked]=\"value()\"\n [class]=\"_switchClass\"\n [disabled]=\"_disabled()\"\n [inputId]=\"inputId() ?? null\"\n [aria-labelledby]=\"_labelId\"\n [aria-describedby]=\"_describedBy()\"\n (checkedChange)=\"onCheckedChange($event)\"\n />\n</label>\n",
7529
+ template: "<label [class]=\"_cardClass\" (focusout)=\"_onBlur()\">\n <span class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span [id]=\"_labelId\" class=\"text-sm font-semibold text-foreground\">{{ label() }}</span>\n @if (description(); as text) {\n <span [id]=\"_descriptionId\" class=\"text-xs text-muted-foreground\">{{ text }}</span>\n }\n </span>\n <hlm-switch\n [checked]=\"value()\"\n [class]=\"_switchClass\"\n [disabled]=\"_disabled()\"\n [inputId]=\"inputId() ?? null\"\n [aria-labelledby]=\"_labelId\"\n [aria-describedby]=\"_describedBy()\"\n (checkedChange)=\"onCheckedChange($event)\"\n />\n</label>\n",
7529
7530
  dependencies: [{
7530
7531
  kind: "component",
7531
7532
  type: i1$20.HlmSwitch,
@@ -7559,7 +7560,7 @@ i0.ɵɵngDeclareClassMetadata({
7559
7560
  providers: [provideValueAccessor(YuwSwitchCardComponent)],
7560
7561
  host: { class: "block" },
7561
7562
  changeDetection: ChangeDetectionStrategy.OnPush,
7562
- template: "<label [class]=\"_cardClass\" (focusout)=\"_onBlur()\">\n <span class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span [id]=\"_labelId\" class=\"text-sm font-semibold text-foreground\">{{ label() }}</span>\n @if (description(); as text) {\n <span [id]=\"_descriptionId\" class=\"text-sm text-muted-foreground\">{{ text }}</span>\n }\n </span>\n <hlm-switch\n [checked]=\"value()\"\n [class]=\"_switchClass\"\n [disabled]=\"_disabled()\"\n [inputId]=\"inputId() ?? null\"\n [aria-labelledby]=\"_labelId\"\n [aria-describedby]=\"_describedBy()\"\n (checkedChange)=\"onCheckedChange($event)\"\n />\n</label>\n"
7563
+ template: "<label [class]=\"_cardClass\" (focusout)=\"_onBlur()\">\n <span class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span [id]=\"_labelId\" class=\"text-sm font-semibold text-foreground\">{{ label() }}</span>\n @if (description(); as text) {\n <span [id]=\"_descriptionId\" class=\"text-xs text-muted-foreground\">{{ text }}</span>\n }\n </span>\n <hlm-switch\n [checked]=\"value()\"\n [class]=\"_switchClass\"\n [disabled]=\"_disabled()\"\n [inputId]=\"inputId() ?? null\"\n [aria-labelledby]=\"_labelId\"\n [aria-describedby]=\"_describedBy()\"\n (checkedChange)=\"onCheckedChange($event)\"\n />\n</label>\n"
7563
7564
  }]
7564
7565
  }],
7565
7566
  propDecorators: {
@@ -11131,11 +11132,13 @@ const YuwTableImports = [
11131
11132
  const YUW_DATATABLE_FEATURES = {
11132
11133
  columnMeta: {},
11133
11134
  columnFilteringFeature,
11135
+ columnPinningFeature,
11134
11136
  columnVisibilityFeature,
11135
11137
  rowPaginationFeature,
11136
11138
  rowSelectionFeature,
11137
11139
  rowSortingFeature
11138
11140
  };
11141
+ const YUW_DATATABLE_SELECT_COLUMN_ID = "select";
11139
11142
  function textOf(cell) {
11140
11143
  return (cell?.innerText ?? "").replace(/\s+/g, " ").trim();
11141
11144
  }
@@ -11157,14 +11160,14 @@ const DATATABLE_ALIGN_CLASS = {
11157
11160
  const datatableContainerVariants = cva("", {
11158
11161
  variants: { appearance: {
11159
11162
  default: "",
11160
- card: "scroll-fade-x rounded-(--radius-container-sm) border bg-(--neutrals-surface)"
11163
+ card: "scroll-fade-x yuw-datatable-scroll-fade rounded-(--radius-container-sm) border bg-(--neutrals-surface) [--yuw-datatable-surface:var(--neutrals-surface)]"
11161
11164
  } },
11162
11165
  defaultVariants: { appearance: "default" }
11163
11166
  });
11164
11167
  const datatableHeadVariants = cva("", {
11165
11168
  variants: { appearance: {
11166
11169
  default: "",
11167
- card: "bg-(--neutrals-background) [&_tr]:border-b-0"
11170
+ card: "bg-(--neutrals-background) [--yuw-datatable-surface:var(--neutrals-background)] [&_tr]:border-b-0"
11168
11171
  } },
11169
11172
  defaultVariants: { appearance: "default" }
11170
11173
  });
@@ -11189,6 +11192,7 @@ const datatableRowVariants = cva("", {
11189
11192
  } },
11190
11193
  defaultVariants: { appearance: "default" }
11191
11194
  });
11195
+ const DATATABLE_ACTIONS_CELL_CLASS = "yuw-datatable-actions w-px text-end";
11192
11196
  const DATATABLE_WRAP_CONTENT_CLASS = "whitespace-normal max-w-0";
11193
11197
  var YuwDatatableComponent = class YuwDatatableComponent {
11194
11198
  ngOnInit() {
@@ -11199,6 +11203,8 @@ var YuwDatatableComponent = class YuwDatatableComponent {
11199
11203
  }));
11200
11204
  }
11201
11205
  constructor() {
11206
+ this._destroyRef = inject(DestroyRef);
11207
+ this._container = viewChild.required("containerElement", ...ngDevMode ? [{ debugName: "_container" }] : /* istanbul ignore next */ []);
11202
11208
  this._table = viewChild.required("tableElement", ...ngDevMode ? [{ debugName: "_table" }] : /* istanbul ignore next */ []);
11203
11209
  this.customPagination = contentChild(YuwDatatablePaginationDirective, ...ngDevMode ? [{ debugName: "customPagination" }] : /* istanbul ignore next */ []);
11204
11210
  this.appearance = input("default", ...ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []);
@@ -11217,6 +11223,7 @@ var YuwDatatableComponent = class YuwDatatableComponent {
11217
11223
  ...ngDevMode ? { debugName: "loadingRows" } : /* istanbul ignore next */ {},
11218
11224
  transform: numberAttribute
11219
11225
  });
11226
+ this.maxPinnedColumns = input(void 0, ...ngDevMode ? [{ debugName: "maxPinnedColumns" }] : /* istanbul ignore next */ []);
11220
11227
  this.nextPageLabel = input.required(...ngDevMode ? [{ debugName: "nextPageLabel" }] : /* istanbul ignore next */ []);
11221
11228
  this.paginated = input(false, {
11222
11229
  ...ngDevMode ? { debugName: "paginated" } : /* istanbul ignore next */ {},
@@ -11228,6 +11235,8 @@ var YuwDatatableComponent = class YuwDatatableComponent {
11228
11235
  }, ...ngDevMode ? [{ debugName: "pagination" }] : /* istanbul ignore next */ []);
11229
11236
  this.paginationAriaLabel = input.required(...ngDevMode ? [{ debugName: "paginationAriaLabel" }] : /* istanbul ignore next */ []);
11230
11237
  this.paginationEllipsisSrText = input.required(...ngDevMode ? [{ debugName: "paginationEllipsisSrText" }] : /* istanbul ignore next */ []);
11238
+ this.pinColumnLabel = input(void 0, ...ngDevMode ? [{ debugName: "pinColumnLabel" }] : /* istanbul ignore next */ []);
11239
+ this.pinnedColumns = model([], ...ngDevMode ? [{ debugName: "pinnedColumns" }] : /* istanbul ignore next */ []);
11231
11240
  this.previousPageLabel = input.required(...ngDevMode ? [{ debugName: "previousPageLabel" }] : /* istanbul ignore next */ []);
11232
11241
  this.rowClass = input(void 0, ...ngDevMode ? [{ debugName: "rowClass" }] : /* istanbul ignore next */ []);
11233
11242
  this.rowSelection = model({}, ...ngDevMode ? [{ debugName: "rowSelection" }] : /* istanbul ignore next */ []);
@@ -11269,7 +11278,8 @@ var YuwDatatableComponent = class YuwDatatableComponent {
11269
11278
  columnFilters: this.columnFilters(),
11270
11279
  columnVisibility: this.columnVisibility(),
11271
11280
  rowSelection: this.rowSelection(),
11272
- pagination: this.pagination()
11281
+ pagination: this.pagination(),
11282
+ columnPinning: this._columnPinning()
11273
11283
  },
11274
11284
  onSortingChange: (updater) => this.sorting.update((current) => typeof updater === "function" ? updater(current) : updater),
11275
11285
  onColumnFiltersChange: (updater) => this.columnFilters.update((current) => typeof updater === "function" ? updater(current) : updater),
@@ -11288,25 +11298,60 @@ var YuwDatatableComponent = class YuwDatatableComponent {
11288
11298
  return this.table.getSelectedRowModel().rows.map((row) => row.original);
11289
11299
  }, ...ngDevMode ? [{ debugName: "_selectedRows" }] : /* istanbul ignore next */ []);
11290
11300
  this.selectedRowsChange = outputFromObservable(toObservable(this._selectedRows).pipe(skip(1)));
11301
+ this._actionsCellClass = computed(() => cn(datatableCellVariants({ appearance: this.appearance() }), this.cellClass(), DATATABLE_ACTIONS_CELL_CLASS), ...ngDevMode ? [{ debugName: "_actionsCellClass" }] : /* istanbul ignore next */ []);
11302
+ this._actionsHeaderClass = computed(() => cn(datatableHeaderCellVariants({ appearance: this.appearance() }), this.cellClass(), DATATABLE_ACTIONS_CELL_CLASS), ...ngDevMode ? [{ debugName: "_actionsHeaderClass" }] : /* istanbul ignore next */ []);
11303
+ this._columnIds = computed(() => this.columns().map((column, index) => column.id ?? ("accessorKey" in column ? String(column.accessorKey) : String(index))), ...ngDevMode ? [{ debugName: "_columnIds" }] : /* istanbul ignore next */ []);
11291
11304
  this._cellClasses = computed(() => {
11292
11305
  const header = datatableHeaderCellVariants({ appearance: this.appearance() });
11293
11306
  const cell = datatableCellVariants({ appearance: this.appearance() });
11294
11307
  const shared = this.cellClass();
11308
+ const ids = this._columnIds();
11295
11309
  return new Map(this.columns().map((column, index) => {
11296
11310
  const meta = column.meta;
11297
11311
  const align = DATATABLE_ALIGN_CLASS[meta?.align ?? "start"];
11298
11312
  const width = meta?.cellClass;
11299
11313
  const floor = meta?.wrap ? meta.minWidth ?? "min-w-48" : void 0;
11300
- return [column.id ?? ("accessorKey" in column ? String(column.accessorKey) : String(index)), {
11314
+ return [ids[index], {
11301
11315
  header: cn(header, align, shared, floor, meta?.headerClass ?? width),
11302
11316
  cell: cn(cell, align, shared, meta?.wrap && "whitespace-normal max-w-0", floor, width)
11303
11317
  }];
11304
11318
  }));
11305
11319
  }, ...ngDevMode ? [{ debugName: "_cellClasses" }] : /* istanbul ignore next */ []);
11306
- this._columnCount = computed(() => this.table.getVisibleLeafColumns().length, ...ngDevMode ? [{ debugName: "_columnCount" }] : /* istanbul ignore next */ []);
11320
+ this._rowActionIds = computed(() => new Set(this._columnIds().filter((_, index) => this.columns()[index].meta?.rowAction)), ...ngDevMode ? [{ debugName: "_rowActionIds" }] : /* istanbul ignore next */ []);
11321
+ this._pinnableIds = computed(() => new Set(this._columnIds().filter((_, index) => this.columns()[index].meta?.pinnable)), ...ngDevMode ? [{ debugName: "_pinnableIds" }] : /* istanbul ignore next */ []);
11322
+ this._userPinnedIds = computed(() => {
11323
+ const pinned = new Set(this.pinnedColumns());
11324
+ return this._columnIds().filter((id) => pinned.has(id) && this._pinnableIds().has(id));
11325
+ }, ...ngDevMode ? [{ debugName: "_userPinnedIds" }] : /* istanbul ignore next */ []);
11326
+ this._columnPinning = computed(() => {
11327
+ const pinned = this._userPinnedIds();
11328
+ const select = this._columnIds().includes("select") ? [YUW_DATATABLE_SELECT_COLUMN_ID] : [];
11329
+ return {
11330
+ start: pinned.length ? [...select, ...pinned] : [],
11331
+ end: [...this._rowActionIds()]
11332
+ };
11333
+ }, ...ngDevMode ? [{ debugName: "_columnPinning" }] : /* istanbul ignore next */ []);
11334
+ this._columnCount = computed(() => {
11335
+ this._columnPinning();
11336
+ const actions = this.table.getEndVisibleLeafColumns().length;
11337
+ return this.table.getVisibleLeafColumns().length - actions + (actions ? 1 : 0);
11338
+ }, ...ngDevMode ? [{ debugName: "_columnCount" }] : /* istanbul ignore next */ []);
11307
11339
  this._containerClass = computed(() => datatableContainerVariants({ appearance: this.appearance() }), ...ngDevMode ? [{ debugName: "_containerClass" }] : /* istanbul ignore next */ []);
11340
+ this._hasRowActions = computed(() => this._rowActionIds().size > 0, ...ngDevMode ? [{ debugName: "_hasRowActions" }] : /* istanbul ignore next */ []);
11308
11341
  this._headClass = computed(() => datatableHeadVariants({ appearance: this.appearance() }), ...ngDevMode ? [{ debugName: "_headClass" }] : /* istanbul ignore next */ []);
11309
11342
  this._isEmpty = computed(() => !this.loading() && this.table.getRowModel().rows.length === 0, ...ngDevMode ? [{ debugName: "_isEmpty" }] : /* istanbul ignore next */ []);
11343
+ this._pinLimitReached = computed(() => {
11344
+ const max = this.maxPinnedColumns();
11345
+ return max !== void 0 && this._userPinnedIds().length >= max;
11346
+ }, ...ngDevMode ? [{ debugName: "_pinLimitReached" }] : /* istanbul ignore next */ []);
11347
+ this._pinnedIds = computed(() => new Set(this._userPinnedIds()), ...ngDevMode ? [{ debugName: "_pinnedIds" }] : /* istanbul ignore next */ []);
11348
+ this._pinOffsets = computed(() => {
11349
+ const start = this._columnPinning().start;
11350
+ return new Map(start.map((id, index) => [id, {
11351
+ left: `var(--yuw-datatable-pin-${index}, 0px)`,
11352
+ last: index === start.length - 1
11353
+ }]));
11354
+ }, ...ngDevMode ? [{ debugName: "_pinOffsets" }] : /* istanbul ignore next */ []);
11310
11355
  this._rowClass = computed(() => datatableRowVariants({ appearance: this.appearance() }), ...ngDevMode ? [{ debugName: "_rowClass" }] : /* istanbul ignore next */ []);
11311
11356
  this._rowClasses = computed(() => {
11312
11357
  const base = cn("yuw-reveal-host", this._rowClass());
@@ -11326,6 +11371,15 @@ var YuwDatatableComponent = class YuwDatatableComponent {
11326
11371
  const data = this.data();
11327
11372
  untracked(() => this._clearSelectionOnNewData(data));
11328
11373
  });
11374
+ afterEveryRender({
11375
+ earlyRead: () => this._readPinnedWidths(),
11376
+ write: (widths) => this._writePinOffsets(widths)
11377
+ });
11378
+ afterNextRender(() => {
11379
+ const observer = new ResizeObserver(() => this._writePinOffsets(this._readPinnedWidths()));
11380
+ observer.observe(this._table().nativeElement);
11381
+ this._destroyRef.onDestroy(() => observer.disconnect());
11382
+ });
11329
11383
  }
11330
11384
  snapshot() {
11331
11385
  const snapshot = readTableSnapshot(this._table().nativeElement);
@@ -11348,10 +11402,26 @@ var YuwDatatableComponent = class YuwDatatableComponent {
11348
11402
  event.preventDefault();
11349
11403
  this.rowClicked.emit(row);
11350
11404
  }
11405
+ togglePin(id) {
11406
+ this.pinnedColumns.update((pinned) => pinned.includes(id) ? pinned.filter((pinnedId) => pinnedId !== id) : [...pinned, id]);
11407
+ }
11351
11408
  _clearSelectionOnNewData(data) {
11352
11409
  if (this._selectionData !== void 0 && data !== this._selectionData && Object.keys(this.rowSelection()).length) this.rowSelection.set({});
11353
11410
  this._selectionData = data;
11354
11411
  }
11412
+ _readPinnedWidths() {
11413
+ const head = this._table().nativeElement.tHead;
11414
+ const cells = head?.rows[head.rows.length - 1]?.querySelectorAll(".yuw-datatable-pinned") ?? [];
11415
+ return Array.from(cells, (cell) => cell.getBoundingClientRect().width);
11416
+ }
11417
+ _writePinOffsets(widths) {
11418
+ const container = this._container().nativeElement;
11419
+ const total = widths.reduce((offset, width, index) => {
11420
+ container.style.setProperty(`--yuw-datatable-pin-${index}`, `${offset}px`);
11421
+ return offset + width;
11422
+ }, 0);
11423
+ container.style.setProperty("--yuw-datatable-pinned-width", `${total}px`);
11424
+ }
11355
11425
  static {
11356
11426
  this.ɵfac = i0.ɵɵngDeclareFactory({
11357
11427
  minVersion: "12.0.0",
@@ -11440,6 +11510,13 @@ var YuwDatatableComponent = class YuwDatatableComponent {
11440
11510
  isRequired: false,
11441
11511
  transformFunction: null
11442
11512
  },
11513
+ maxPinnedColumns: {
11514
+ classPropertyName: "maxPinnedColumns",
11515
+ publicName: "maxPinnedColumns",
11516
+ isSignal: true,
11517
+ isRequired: false,
11518
+ transformFunction: null
11519
+ },
11443
11520
  nextPageLabel: {
11444
11521
  classPropertyName: "nextPageLabel",
11445
11522
  publicName: "nextPageLabel",
@@ -11475,6 +11552,20 @@ var YuwDatatableComponent = class YuwDatatableComponent {
11475
11552
  isRequired: true,
11476
11553
  transformFunction: null
11477
11554
  },
11555
+ pinColumnLabel: {
11556
+ classPropertyName: "pinColumnLabel",
11557
+ publicName: "pinColumnLabel",
11558
+ isSignal: true,
11559
+ isRequired: false,
11560
+ transformFunction: null
11561
+ },
11562
+ pinnedColumns: {
11563
+ classPropertyName: "pinnedColumns",
11564
+ publicName: "pinnedColumns",
11565
+ isSignal: true,
11566
+ isRequired: false,
11567
+ transformFunction: null
11568
+ },
11478
11569
  previousPageLabel: {
11479
11570
  classPropertyName: "previousPageLabel",
11480
11571
  publicName: "previousPageLabel",
@@ -11536,6 +11627,7 @@ var YuwDatatableComponent = class YuwDatatableComponent {
11536
11627
  columnFilters: "columnFiltersChange",
11537
11628
  columnVisibility: "columnVisibilityChange",
11538
11629
  pagination: "paginationChange",
11630
+ pinnedColumns: "pinnedColumnsChange",
11539
11631
  rowSelection: "rowSelectionChange",
11540
11632
  sorting: "sortingChange",
11541
11633
  rowClicked: "rowClicked",
@@ -11545,7 +11637,8 @@ var YuwDatatableComponent = class YuwDatatableComponent {
11545
11637
  providers: [provideIcons({
11546
11638
  lucideChevronDown,
11547
11639
  lucideChevronUp,
11548
- lucideChevronsUpDown
11640
+ lucideChevronsUpDown,
11641
+ lucidePin
11549
11642
  })],
11550
11643
  queries: [{
11551
11644
  propertyName: "customPagination",
@@ -11555,6 +11648,12 @@ var YuwDatatableComponent = class YuwDatatableComponent {
11555
11648
  isSignal: true
11556
11649
  }],
11557
11650
  viewQueries: [{
11651
+ propertyName: "_container",
11652
+ first: true,
11653
+ predicate: ["containerElement"],
11654
+ descendants: true,
11655
+ isSignal: true
11656
+ }, {
11558
11657
  propertyName: "_table",
11559
11658
  first: true,
11560
11659
  predicate: ["tableElement"],
@@ -11562,7 +11661,7 @@ var YuwDatatableComponent = class YuwDatatableComponent {
11562
11661
  isSignal: true
11563
11662
  }],
11564
11663
  ngImport: i0,
11565
- 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()\" [attr.inert]=\"loading() ? '' : null\">\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]=\"totalPages()\"\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",
11664
+ template: "<div #containerElement yuwTableContainer [class]=\"_containerClass()\">\n <table #tableElement yuwTable [class]=\"_tableClass()\">\n @if (caption()) {\n <caption yuwCaption>{{ caption() }}</caption>\n }\n\n <thead yuwTHead [class]=\"_headClass()\" [attr.inert]=\"loading() ? '' : null\">\n @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n <tr yuwTr [class]=\"_rowClass()\">\n @for (header of headerGroup.headers; track header.id) {\n @if (!_rowActionIds().has(header.column.id)) {\n @let sorted = header.column.getIsSorted();\n @let headerClasses = _cellClasses().get(header.column.id);\n @let pin = _pinOffsets().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 [class.yuw-datatable-pinned]=\"!!pin\"\n [class.yuw-datatable-pinned-last]=\"!!pin?.last\"\n [style.left]=\"pin?.left ?? null\"\n >\n @if (!header.isPlaceholder) {\n <span class=\"inline-flex items-center gap-2\">\n @if (_pinnableIds().has(header.column.id)) {\n @let pinned = _pinnedIds().has(header.column.id);\n <button\n type=\"button\"\n class=\"yuw-datatable-pin\"\n [attr.aria-label]=\"pinColumnLabel() ?? null\"\n [attr.aria-pressed]=\"pinned\"\n [disabled]=\"!pinned && _pinLimitReached()\"\n (click)=\"togglePin(header.column.id)\"\n >\n <ng-icon name=\"lucidePin\" class=\"text-xs\" aria-hidden=\"true\" />\n </button>\n }\n\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\n *flexRender=\"header.column.columnDef.header; props: header.getContext(); let rendered\"\n >\n {{ rendered }}\n </ng-container>\n }\n </span>\n }\n </th>\n }\n }\n\n @if (_hasRowActions()) {\n <th yuwTh scope=\"col\" [class]=\"_actionsHeaderClass()\">\n <span>\n @for (header of headerGroup.headers; track header.id) {\n @if (_rowActionIds().has(header.column.id) && !header.isPlaceholder) {\n <ng-container\n *flexRender=\"header.column.columnDef.header; props: header.getContext(); let rendered\"\n >\n {{ rendered }}\n </ng-container>\n }\n }\n </span>\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 @if (!_rowActionIds().has(column.id)) {\n @let pin = _pinOffsets().get(column.id);\n <td\n yuwTd\n [class]=\"_cellClasses().get(column.id)?.cell\"\n [class.yuw-datatable-pinned]=\"!!pin\"\n [class.yuw-datatable-pinned-last]=\"!!pin?.last\"\n [style.left]=\"pin?.left ?? null\"\n >\n <span yuwSkeleton class=\"block h-4 w-full\"></span>\n </td>\n }\n }\n\n @if (_hasRowActions()) {\n <td yuwTd [class]=\"_actionsCellClass()\"></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 @if (!_rowActionIds().has(cell.column.id)) {\n @let pin = _pinOffsets().get(cell.column.id);\n <td\n yuwTd\n [class]=\"_cellClasses().get(cell.column.id)?.cell\"\n [class.yuw-datatable-pinned]=\"!!pin\"\n [class.yuw-datatable-pinned-last]=\"!!pin?.last\"\n [style.left]=\"pin?.left ?? null\"\n >\n <ng-container *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let rendered\">\n {{ rendered }}\n </ng-container>\n </td>\n }\n }\n\n @if (_hasRowActions()) {\n <td yuwTd [class]=\"_actionsCellClass()\">\n <div class=\"yuw-datatable-actions-group\">\n @for (cell of row.getEndVisibleCells(); track cell.id) {\n <ng-container *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let rendered\">\n {{ rendered }}\n </ng-container>\n }\n </div>\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]=\"totalPages()\"\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",
11566
11665
  dependencies: [
11567
11666
  {
11568
11667
  kind: "directive",
@@ -11671,15 +11770,20 @@ i0.ɵɵngDeclareClassMetadata({
11671
11770
  providers: [provideIcons({
11672
11771
  lucideChevronDown,
11673
11772
  lucideChevronUp,
11674
- lucideChevronsUpDown
11773
+ lucideChevronsUpDown,
11774
+ lucidePin
11675
11775
  })],
11676
11776
  host: { class: "contents" },
11677
11777
  changeDetection: ChangeDetectionStrategy.OnPush,
11678
- 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()\" [attr.inert]=\"loading() ? '' : null\">\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]=\"totalPages()\"\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"
11778
+ template: "<div #containerElement yuwTableContainer [class]=\"_containerClass()\">\n <table #tableElement yuwTable [class]=\"_tableClass()\">\n @if (caption()) {\n <caption yuwCaption>{{ caption() }}</caption>\n }\n\n <thead yuwTHead [class]=\"_headClass()\" [attr.inert]=\"loading() ? '' : null\">\n @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n <tr yuwTr [class]=\"_rowClass()\">\n @for (header of headerGroup.headers; track header.id) {\n @if (!_rowActionIds().has(header.column.id)) {\n @let sorted = header.column.getIsSorted();\n @let headerClasses = _cellClasses().get(header.column.id);\n @let pin = _pinOffsets().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 [class.yuw-datatable-pinned]=\"!!pin\"\n [class.yuw-datatable-pinned-last]=\"!!pin?.last\"\n [style.left]=\"pin?.left ?? null\"\n >\n @if (!header.isPlaceholder) {\n <span class=\"inline-flex items-center gap-2\">\n @if (_pinnableIds().has(header.column.id)) {\n @let pinned = _pinnedIds().has(header.column.id);\n <button\n type=\"button\"\n class=\"yuw-datatable-pin\"\n [attr.aria-label]=\"pinColumnLabel() ?? null\"\n [attr.aria-pressed]=\"pinned\"\n [disabled]=\"!pinned && _pinLimitReached()\"\n (click)=\"togglePin(header.column.id)\"\n >\n <ng-icon name=\"lucidePin\" class=\"text-xs\" aria-hidden=\"true\" />\n </button>\n }\n\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\n *flexRender=\"header.column.columnDef.header; props: header.getContext(); let rendered\"\n >\n {{ rendered }}\n </ng-container>\n }\n </span>\n }\n </th>\n }\n }\n\n @if (_hasRowActions()) {\n <th yuwTh scope=\"col\" [class]=\"_actionsHeaderClass()\">\n <span>\n @for (header of headerGroup.headers; track header.id) {\n @if (_rowActionIds().has(header.column.id) && !header.isPlaceholder) {\n <ng-container\n *flexRender=\"header.column.columnDef.header; props: header.getContext(); let rendered\"\n >\n {{ rendered }}\n </ng-container>\n }\n }\n </span>\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 @if (!_rowActionIds().has(column.id)) {\n @let pin = _pinOffsets().get(column.id);\n <td\n yuwTd\n [class]=\"_cellClasses().get(column.id)?.cell\"\n [class.yuw-datatable-pinned]=\"!!pin\"\n [class.yuw-datatable-pinned-last]=\"!!pin?.last\"\n [style.left]=\"pin?.left ?? null\"\n >\n <span yuwSkeleton class=\"block h-4 w-full\"></span>\n </td>\n }\n }\n\n @if (_hasRowActions()) {\n <td yuwTd [class]=\"_actionsCellClass()\"></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 @if (!_rowActionIds().has(cell.column.id)) {\n @let pin = _pinOffsets().get(cell.column.id);\n <td\n yuwTd\n [class]=\"_cellClasses().get(cell.column.id)?.cell\"\n [class.yuw-datatable-pinned]=\"!!pin\"\n [class.yuw-datatable-pinned-last]=\"!!pin?.last\"\n [style.left]=\"pin?.left ?? null\"\n >\n <ng-container *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let rendered\">\n {{ rendered }}\n </ng-container>\n </td>\n }\n }\n\n @if (_hasRowActions()) {\n <td yuwTd [class]=\"_actionsCellClass()\">\n <div class=\"yuw-datatable-actions-group\">\n @for (cell of row.getEndVisibleCells(); track cell.id) {\n <ng-container *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let rendered\">\n {{ rendered }}\n </ng-container>\n }\n </div>\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]=\"totalPages()\"\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"
11679
11779
  }]
11680
11780
  }],
11681
11781
  ctorParameters: () => [],
11682
11782
  propDecorators: {
11783
+ _container: [{
11784
+ type: i0.ViewChild,
11785
+ args: ["containerElement", { isSignal: true }]
11786
+ }],
11683
11787
  _table: [{
11684
11788
  type: i0.ViewChild,
11685
11789
  args: ["tableElement", { isSignal: true }]
@@ -11774,6 +11878,14 @@ i0.ɵɵngDeclareClassMetadata({
11774
11878
  required: false
11775
11879
  }]
11776
11880
  }],
11881
+ maxPinnedColumns: [{
11882
+ type: i0.Input,
11883
+ args: [{
11884
+ isSignal: true,
11885
+ alias: "maxPinnedColumns",
11886
+ required: false
11887
+ }]
11888
+ }],
11777
11889
  nextPageLabel: [{
11778
11890
  type: i0.Input,
11779
11891
  args: [{
@@ -11817,6 +11929,25 @@ i0.ɵɵngDeclareClassMetadata({
11817
11929
  required: true
11818
11930
  }]
11819
11931
  }],
11932
+ pinColumnLabel: [{
11933
+ type: i0.Input,
11934
+ args: [{
11935
+ isSignal: true,
11936
+ alias: "pinColumnLabel",
11937
+ required: false
11938
+ }]
11939
+ }],
11940
+ pinnedColumns: [{
11941
+ type: i0.Input,
11942
+ args: [{
11943
+ isSignal: true,
11944
+ alias: "pinnedColumns",
11945
+ required: false
11946
+ }]
11947
+ }, {
11948
+ type: i0.Output,
11949
+ args: ["pinnedColumnsChange"]
11950
+ }],
11820
11951
  previousPageLabel: [{
11821
11952
  type: i0.Input,
11822
11953
  args: [{
@@ -12157,15 +12288,12 @@ i0.ɵɵngDeclareClassMetadata({
12157
12288
  }]
12158
12289
  }
12159
12290
  });
12160
- function buildYuwActionsColumn(label, onEdit, cellClass = "w-12", header = "") {
12291
+ function buildYuwActionsColumn(label, onEdit, header = "") {
12161
12292
  return {
12162
12293
  id: "actions",
12163
12294
  header,
12164
12295
  enableSorting: false,
12165
- meta: cellClass ? {
12166
- align: "end",
12167
- cellClass
12168
- } : { align: "end" },
12296
+ meta: { rowAction: true },
12169
12297
  cell: ({ row }) => flexRenderComponent(YuwActionsCellComponent, { inputs: {
12170
12298
  label,
12171
12299
  onEdit: () => onEdit(row.original)
@@ -19225,7 +19353,7 @@ i0.ɵɵngDeclareClassMetadata({
19225
19353
  });
19226
19354
  const SIZE_CLASS = {
19227
19355
  md: "h-11.25 w-11.25",
19228
- lg: "size-15 rounded-md"
19356
+ lg: "size-15"
19229
19357
  };
19230
19358
  var YuwsImageCellComponent = class YuwsImageCellComponent {
19231
19359
  constructor() {
@@ -19276,7 +19404,7 @@ var YuwsImageCellComponent = class YuwsImageCellComponent {
19276
19404
  }
19277
19405
  },
19278
19406
  ngImport: i0,
19279
- template: "<yuw-avatar [class]=\"sizeClass()\" [src]=\"imageUrl()\" [alt]=\"name()\" [fallback]=\"initials()\" />\n",
19407
+ template: "<yuw-avatar shape=\"square\" [class]=\"sizeClass()\" [src]=\"imageUrl()\" [alt]=\"name()\" [fallback]=\"initials()\" />\n",
19280
19408
  dependencies: [{
19281
19409
  kind: "component",
19282
19410
  type: YuwAvatarComponent,
@@ -19308,7 +19436,7 @@ i0.ɵɵngDeclareClassMetadata({
19308
19436
  selector: "yuws-image-cell",
19309
19437
  changeDetection: ChangeDetectionStrategy.OnPush,
19310
19438
  imports: [YuwAvatarComponent],
19311
- template: "<yuw-avatar [class]=\"sizeClass()\" [src]=\"imageUrl()\" [alt]=\"name()\" [fallback]=\"initials()\" />\n"
19439
+ template: "<yuw-avatar shape=\"square\" [class]=\"sizeClass()\" [src]=\"imageUrl()\" [alt]=\"name()\" [fallback]=\"initials()\" />\n"
19312
19440
  }]
19313
19441
  }],
19314
19442
  propDecorators: {
@@ -20162,10 +20290,7 @@ function buildYuwsIconActionColumn(column) {
20162
20290
  id: column.id,
20163
20291
  header: column.header ?? "",
20164
20292
  enableSorting: false,
20165
- meta: {
20166
- align: "end",
20167
- cellClass: "w-12"
20168
- },
20293
+ meta: { rowAction: true },
20169
20294
  cell: ({ row }) => column.visible?.(row.original) ?? true ? flexRenderComponent(YuwsIconActionCellComponent, { inputs: {
20170
20295
  icon: column.icon,
20171
20296
  label: column.label,
@@ -20180,10 +20305,7 @@ function buildYuwsMenuActionsColumn(column) {
20180
20305
  id: "actions",
20181
20306
  header: column.header ?? "",
20182
20307
  enableSorting: false,
20183
- meta: {
20184
- align: "end",
20185
- cellClass: "w-12"
20186
- },
20308
+ meta: { rowAction: true },
20187
20309
  cell: ({ row }) => {
20188
20310
  const actions = column.actions(row.original);
20189
20311
  return actions.length ? flexRenderComponent(YuwsMenuActionsCellComponent, { inputs: {
@@ -20195,7 +20317,7 @@ function buildYuwsMenuActionsColumn(column) {
20195
20317
  }
20196
20318
  function buildYuwsSelectColumn(labels) {
20197
20319
  return {
20198
- id: "select",
20320
+ id: YUW_DATATABLE_SELECT_COLUMN_ID,
20199
20321
  header: ({ table }) => {
20200
20322
  const rows = table.getRowModel().rows;
20201
20323
  const selected = rows.filter((row) => row.getIsSelected()).length;
@@ -20730,7 +20852,7 @@ var YuwsFormSheetComponent = class YuwsFormSheetComponent {
20730
20852
  this.layoutInset = input("right", ...ngDevMode ? [{ debugName: "layoutInset" }] : /* istanbul ignore next */ []);
20731
20853
  this.note = input(...ngDevMode ? [void 0, { debugName: "note" }] : /* istanbul ignore next */ []);
20732
20854
  this.open = model.required(...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
20733
- this.panelClass = input("w-full sm:max-w-md", ...ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []);
20855
+ this.panelClass = input(void 0, ...ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []);
20734
20856
  this.readonly = input(false, {
20735
20857
  ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
20736
20858
  transform: booleanAttribute
@@ -21856,11 +21978,14 @@ var YuwsListTableComponent = class YuwsListTableComponent {
21856
21978
  "emptyText",
21857
21979
  "loading",
21858
21980
  "loadingRows",
21981
+ "maxPinnedColumns",
21859
21982
  "nextPageLabel",
21860
21983
  "paginated",
21861
21984
  "pagination",
21862
21985
  "paginationAriaLabel",
21863
21986
  "paginationEllipsisSrText",
21987
+ "pinColumnLabel",
21988
+ "pinnedColumns",
21864
21989
  "previousPageLabel",
21865
21990
  "rowClass",
21866
21991
  "rowSelection",
@@ -21874,6 +21999,7 @@ var YuwsListTableComponent = class YuwsListTableComponent {
21874
21999
  "columnFiltersChange",
21875
22000
  "columnVisibilityChange",
21876
22001
  "paginationChange",
22002
+ "pinnedColumnsChange",
21877
22003
  "rowSelectionChange",
21878
22004
  "sortingChange",
21879
22005
  "rowClicked",
@@ -25844,6 +25970,6 @@ i0.ɵɵngDeclareClassMetadata({
25844
25970
  }]
25845
25971
  }
25846
25972
  });
25847
- export { DATATABLE_ALIGN_CLASS, DATATABLE_LAYOUT_CLASS, DATATABLE_WRAP_CONTENT_CLASS, YUWS_AVATAR_NAME_HEADER_CLASS, YUWS_NO_DATA_PLACEHOLDER, YUW_DATATABLE_FEATURES, YUW_DATATABLE_WRAP_MIN_WIDTH, YUW_DATE_RANGES, YUW_MENU_INDICATOR_ITEM_CLASS, YUW_MENU_ITEM_CLASS, YUW_MENU_LABEL_CLASS, YUW_MENU_PANEL_CLASS, YUW_MENU_SEPARATOR_CLASS, YUW_PASSWORD_REVEAL_STATES, YUW_SIDEBAR_RAIL_ICON_SIZE, 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, YuwCalendarComponent, 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, YuwDatepickerTriggerDirective, 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, YuwLayoutComponent, YuwLeftAddonDirective, YuwMouseScrollXDirective, YuwMouseScrollYDirective, YuwPaginationComponent, YuwPasswordInputComponent, YuwPopoverComponent, YuwPopoverTriggerDirective, YuwProgressComponent, 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, YuwSidebarService, YuwSidebarSubmenuService, YuwSidebarTriggerComponent, YuwSidebarWrapperDirective, YuwSkeletonDirective, YuwSpinnerComponent, YuwStepIndicatorDirective, YuwStepPanelDirective, YuwStepperComponent, YuwSwitchCardComponent, YuwSwitchComponent, YuwTBodyDirective, YuwTFootDirective, YuwTHeadDirective, YuwTabContentDirective, YuwTabPanelDirective, YuwTableContainerDirective, YuwTableDirective, YuwTableImports, YuwTabsComponent, YuwTdDirective, YuwTextFieldBase, YuwTextareaComponent, YuwThDirective, YuwToasterComponent, YuwToggleGroupComponent, YuwTooltipDirective, YuwTrDirective, YuwValueAccessorBase, YuwsActiveStatusCellComponent, YuwsAdvanceOnEnterDirective, YuwsAvatarNameCellComponent, YuwsBadgeListCellComponent, YuwsCardGridComponent, YuwsCardGridItemComponent, YuwsClampedTextCellComponent, YuwsConfirmDialogComponent, YuwsCopyButtonComponent, YuwsFilterComboboxComponent, YuwsFilterContentDirective, YuwsFlagCellComponent, YuwsFormSheetComponent, YuwsIconActionCellComponent, YuwsImageCellComponent, YuwsImageFieldComponent, YuwsImageUploadComponent, YuwsLinkCellComponent, YuwsListPaginationComponent, YuwsListTableComponent, YuwsListToolbarComponent, YuwsMenuActionsCellComponent, YuwsOverflowListCellComponent, YuwsPageHeaderComponent, YuwsPageSizeComponent, YuwsSelectCellComponent, YuwsStackedTextCellComponent, YuwsStatCardComponent, YuwsStatusToggleCellComponent, YuwsTitleSkeletonDirective, YuwsWeekdayPickerComponent, buildInputOtpGroups, buildYuwActionsColumn, buildYuwTableSnapshot, buildYuwsActiveStatusColumn, buildYuwsDateTimeColumn, buildYuwsIconActionColumn, buildYuwsMenuActionsColumn, buildYuwsOptionalTextColumn, buildYuwsSelectColumn, buildYuwsStatusToggleColumn, cn, createPagedList, createYuwsSheetEditor, datatableCellVariants, datatableContainerVariants, datatableHeadVariants, datatableHeaderCellVariants, datatableRowVariants, getPaginationRange, provideValueAccessor, provideYuwSidebarConfig, shareTable, totalInputOtpLength, yuwCommandDefaultFilter, yuwCountdownToast, yuwDatePresets, yuwQuarterRange, yuwToast, yuwsDateFilterValue, yuwsInitialsOf, yuwsMediaQuerySignal, yuwsPendingRowClass, yuwsReadFileAsDataUrl, yuwsResolveDateFilter, yuwsStandardDatePresets };
25973
+ export { DATATABLE_ACTIONS_CELL_CLASS, DATATABLE_ALIGN_CLASS, DATATABLE_LAYOUT_CLASS, DATATABLE_WRAP_CONTENT_CLASS, YUWS_AVATAR_NAME_HEADER_CLASS, YUWS_NO_DATA_PLACEHOLDER, YUW_DATATABLE_FEATURES, YUW_DATATABLE_SELECT_COLUMN_ID, YUW_DATATABLE_WRAP_MIN_WIDTH, YUW_DATE_RANGES, YUW_MENU_INDICATOR_ITEM_CLASS, YUW_MENU_ITEM_CLASS, YUW_MENU_LABEL_CLASS, YUW_MENU_PANEL_CLASS, YUW_MENU_SEPARATOR_CLASS, YUW_PASSWORD_REVEAL_STATES, YUW_SIDEBAR_RAIL_ICON_SIZE, 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, YuwCalendarComponent, 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, YuwDatepickerTriggerDirective, 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, YuwLayoutComponent, YuwLeftAddonDirective, YuwMouseScrollXDirective, YuwMouseScrollYDirective, YuwPaginationComponent, YuwPasswordInputComponent, YuwPopoverComponent, YuwPopoverTriggerDirective, YuwProgressComponent, 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, YuwSidebarService, YuwSidebarSubmenuService, YuwSidebarTriggerComponent, YuwSidebarWrapperDirective, YuwSkeletonDirective, YuwSpinnerComponent, YuwStepIndicatorDirective, YuwStepPanelDirective, YuwStepperComponent, YuwSwitchCardComponent, YuwSwitchComponent, YuwTBodyDirective, YuwTFootDirective, YuwTHeadDirective, YuwTabContentDirective, YuwTabPanelDirective, YuwTableContainerDirective, YuwTableDirective, YuwTableImports, YuwTabsComponent, YuwTdDirective, YuwTextFieldBase, YuwTextareaComponent, YuwThDirective, YuwToasterComponent, YuwToggleGroupComponent, YuwTooltipDirective, YuwTrDirective, YuwValueAccessorBase, YuwsActiveStatusCellComponent, YuwsAdvanceOnEnterDirective, YuwsAvatarNameCellComponent, YuwsBadgeListCellComponent, YuwsCardGridComponent, YuwsCardGridItemComponent, YuwsClampedTextCellComponent, YuwsConfirmDialogComponent, YuwsCopyButtonComponent, YuwsFilterComboboxComponent, YuwsFilterContentDirective, YuwsFlagCellComponent, YuwsFormSheetComponent, YuwsIconActionCellComponent, YuwsImageCellComponent, YuwsImageFieldComponent, YuwsImageUploadComponent, YuwsLinkCellComponent, YuwsListPaginationComponent, YuwsListTableComponent, YuwsListToolbarComponent, YuwsMenuActionsCellComponent, YuwsOverflowListCellComponent, YuwsPageHeaderComponent, YuwsPageSizeComponent, YuwsSelectCellComponent, YuwsStackedTextCellComponent, YuwsStatCardComponent, YuwsStatusToggleCellComponent, YuwsTitleSkeletonDirective, YuwsWeekdayPickerComponent, buildInputOtpGroups, buildYuwActionsColumn, buildYuwTableSnapshot, buildYuwsActiveStatusColumn, buildYuwsDateTimeColumn, buildYuwsIconActionColumn, buildYuwsMenuActionsColumn, buildYuwsOptionalTextColumn, buildYuwsSelectColumn, buildYuwsStatusToggleColumn, cn, createPagedList, createYuwsSheetEditor, datatableCellVariants, datatableContainerVariants, datatableHeadVariants, datatableHeaderCellVariants, datatableRowVariants, getPaginationRange, provideValueAccessor, provideYuwSidebarConfig, shareTable, totalInputOtpLength, yuwCommandDefaultFilter, yuwCountdownToast, yuwDatePresets, yuwQuarterRange, yuwToast, yuwsDateFilterValue, yuwsInitialsOf, yuwsMediaQuerySignal, yuwsPendingRowClass, yuwsReadFileAsDataUrl, yuwsResolveDateFilter, yuwsStandardDatePresets };
25848
25974
 
25849
25975
  //# sourceMappingURL=yukit-web.mjs.map