@zambon-dev/ui 1.9.0 → 1.10.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.
@@ -1187,6 +1187,8 @@ i0.ɵɵngDeclareClassMetadata({
1187
1187
  decorators: [{ type: Injectable }],
1188
1188
  ctorParameters: () => []
1189
1189
  });
1190
+ const DEFAULT_GRID_ROW_HEIGHT = 41.6;
1191
+ const COMPACT_GRID_ROW_HEIGHT = 32;
1190
1192
  var GridConfigsProvider = class GridConfigsProvider {
1191
1193
  _configs;
1192
1194
  get configs() {
@@ -1198,7 +1200,7 @@ var GridConfigsProvider = class GridConfigsProvider {
1198
1200
  messageOnEmpty: "No results",
1199
1201
  messageOnFailed: "The records could not be loaded.",
1200
1202
  recordBlockSize: 100,
1201
- rowHeight: 41.6,
1203
+ rowHeight: DEFAULT_GRID_ROW_HEIGHT,
1202
1204
  rowsToDisplay: 6
1203
1205
  };
1204
1206
  }
@@ -1481,6 +1483,11 @@ var DataGridDataset = class DataGridDataset extends GridDataset {
1481
1483
  get visibleColumns() {
1482
1484
  return (this.columns ?? []).filter((column) => !this.isColumnHidden(column));
1483
1485
  }
1486
+ get effectiveRowHeight() {
1487
+ const rowHeight = this.configs.rowHeight ?? 41.6;
1488
+ if (this.configs.density === "compact" && rowHeight === 41.6) return 32;
1489
+ return rowHeight;
1490
+ }
1484
1491
  get hasSelectedRows() {
1485
1492
  return this.selectedRowKeys.length > 0;
1486
1493
  }
@@ -5430,11 +5437,16 @@ var DataGridRowComponent = class DataGridRowComponent extends BaseComponent {
5430
5437
  selectionResized = new EventEmitter();
5431
5438
  setFocus(event) {
5432
5439
  if (event?.target instanceof HTMLLabelElement && event.target.classList.contains("selection-target")) return;
5440
+ if (this.hasTextSelectionInGrid()) return;
5433
5441
  if (!this.disabled) {
5434
5442
  this.dataGridDataset.setFocusedRow(this.rowKey);
5435
5443
  if (this.dataGridDataset.configs.multiSelect && (this.dataGridDataset.configs.selectOnClick ?? true)) this.selected.set(this.isRowDataSelected);
5436
5444
  }
5437
5445
  }
5446
+ preventMultiClickSelection(event) {
5447
+ const target = event.target;
5448
+ if (event.detail > 1 && !(target instanceof HTMLInputElement || target instanceof HTMLButtonElement)) event.preventDefault();
5449
+ }
5438
5450
  activate() {
5439
5451
  if (!this.disabled) this.dataGridDataset.rowActivated.emit(this.rowData);
5440
5452
  }
@@ -5461,6 +5473,9 @@ var DataGridRowComponent = class DataGridRowComponent extends BaseComponent {
5461
5473
  get rowKey() {
5462
5474
  return this.dataGridDataset.getRowInternalKey(this.rowData);
5463
5475
  }
5476
+ get pinFirstColumn() {
5477
+ return this.dataGridDataset.configs.pinFirstColumn ?? false;
5478
+ }
5464
5479
  get selectRowText() {
5465
5480
  return this.dataGridDataset.configs.selectRowText ?? DEFAULT_SELECT_ROW_TEXT;
5466
5481
  }
@@ -5516,6 +5531,13 @@ var DataGridRowComponent = class DataGridRowComponent extends BaseComponent {
5516
5531
  getValue(field) {
5517
5532
  return field.split(".").reduce((value, field) => value?.[field], this.rowData);
5518
5533
  }
5534
+ hasTextSelectionInGrid() {
5535
+ const host = this.elementRef.nativeElement;
5536
+ const selection = host.ownerDocument?.getSelection?.() ?? null;
5537
+ if (!selection || selection.isCollapsed || selection.toString().trim() === "") return false;
5538
+ const grid = host.closest("lib-data-grid") ?? host;
5539
+ return grid.contains(selection.anchorNode) || grid.contains(selection.focusNode);
5540
+ }
5519
5541
  refreshSelection() {
5520
5542
  this.selected.set(this.isRowDataSelected);
5521
5543
  }
@@ -5575,6 +5597,7 @@ var DataGridRowComponent = class DataGridRowComponent extends BaseComponent {
5575
5597
  attributes: { "role": "row" },
5576
5598
  listeners: {
5577
5599
  "click": "setFocus($event)",
5600
+ "mousedown": "preventMultiClickSelection($event)",
5578
5601
  "dblclick": "activate()"
5579
5602
  },
5580
5603
  properties: {
@@ -5589,8 +5612,8 @@ var DataGridRowComponent = class DataGridRowComponent extends BaseComponent {
5589
5612
  },
5590
5613
  usesInheritance: true,
5591
5614
  ngImport: i0,
5592
- template: "<!-- The cell is a gridcell and the <label> inside it fills it: clicking anywhere in\nthe cell still reaches the checkbox, natively. A <label> cannot take the gridcell\nrole itself. The click handler is a mouse-only convenience. The checkbox is out of\nthe Tab order (tabindex -1), because the row is the grid's one Tab stop; Space on\nthe focused row toggles the selection instead. -->\n@if (dataGridDataset.configs.multiSelect) {\n <!-- A quick second click on the checkbox undoes the first one; it must not open the record. -->\n <div\n class=\"cell selection\"\n role=\"gridcell\"\n (dblclick)=\"$event.stopPropagation()\"\n (onResize)=\"onResizeSelection($event)\"\n >\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <label class=\"selection-target\" (click)=\"onToggleSelection($event)\">\n <!-- Null, not false: an attribute binding writes disabled=\"false\" for false, and any value at\n all disables a control, so every checkbox rendered disabled and faded. -->\n <input\n class=\"form-input\"\n tabindex=\"-1\"\n type=\"checkbox\"\n [attr.aria-label]=\"selectRowText | translate\"\n [attr.disabled]=\"disabled ? true : null\"\n [(ngModel)]=\"selected\"\n />\n </label>\n </div>\n}\n@for (column of columns; track column) {\n <div\n #cell\n class=\"cell\"\n role=\"gridcell\"\n [class.actions]=\"column.type === 'actions' && !column.template\"\n [class.align-center]=\"alignOf(column) === 'center'\"\n [class.align-end]=\"alignOf(column) === 'end'\"\n [class.disabled]=\"disabled\"\n [class.numeric]=\"isNumeric(column)\"\n [ngClass]=\"column.customClass\"\n >\n @if (isFirstRow) {\n <div class=\"spacer\" (onResize)=\"onResize(column, $event)\"></div>\n }\n <ng-container\n *ngTemplateOutlet=\"\n column.template ? column.template : column.type === 'actions' ? actionsTemplate : simpleTemplate;\n context: { rowData: rowData, column: column }\n \"\n >\n </ng-container>\n </div>\n}\n\n<!-- An actions column: an icon-only button per visible action. The click stops at the button, so\nit neither focuses nor selects the row, and a quick second click does not open it. The buttons are\nTab stops only in the grid's tabbable row: Tab goes from that row to its actions, then out of the\ngrid. In every other row they are out of the Tab order, so the grid stays one stop wide. -->\n<ng-template #actionsTemplate let-column=\"column\">\n @for (action of visibleActions(column); track action) {\n <button\n class=\"row-action\"\n type=\"button\"\n [attr.tabindex]=\"tabbable() ? 0 : -1\"\n [attr.aria-label]=\"action.label | translate\"\n [class.danger]=\"action.intent === 'danger'\"\n [disabled]=\"disabled || isActionDisabled(action)\"\n [libTooltip]=\"action.label\"\n (click)=\"onActionClicked($event, action)\"\n (dblclick)=\"$event.stopPropagation()\"\n >\n <i aria-hidden=\"true\" [class]=\"action.icon\"></i>\n </button>\n }\n</ng-template>\n\n<!-- A column without a template. The column's type decides the formatting; with no type the\nvalue shows as it is. The translate pipe sits only in the branches that hold a translation key, so a\nplain cell renders as it always did. -->\n<ng-template #simpleTemplate let-column=\"column\">\n @let cell = formatCell(column);\n @switch (cell.kind) {\n @case ('boolean') {\n @if (cell.checked) {\n <i class=\"fa-solid fa-check\" aria-hidden=\"true\"></i>\n }\n @if (cell.translate) {\n <span class=\"visually-hidden\">{{ cell.text | translate }}</span>\n }\n }\n @case ('badge') {\n <lib-badge [intent]=\"cell.intent ?? 'neutral'\">\n @if (cell.translate) {\n {{ cell.text | translate }}\n } @else {\n {{ cell.text }}\n }\n </lib-badge>\n }\n @default {\n @if (cell.translate) {\n <span>{{ cell.text | translate }}</span>\n } @else {\n <span>{{ cell.text }}</span>\n }\n }\n }\n</ng-template>\n",
5593
- styles: ["@layer properties;:host{grid-column:1 / -1;display:grid;grid-template-columns:subgrid}.cell{position:relative;align-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cell.disabled{pointer-events:none;cursor:default;overflow:hidden;text-overflow:ellipsis;opacity:.6}.cell input{vertical-align:super}.cell.selection{display:flex;align-items:center}.cell .selection-target{display:flex;flex-grow:1;align-items:center;align-self:stretch}.cell.align-center{text-align:center}.cell.align-end{text-align:end}.cell.numeric{font-variant-numeric:tabular-nums}.cell.actions{overflow:visible}.row-action{display:inline-flex;height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);cursor:pointer;align-items:center;justify-content:center;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;vertical-align:middle;border-radius:var(--radius-control);color:var(--color-content-secondary);transition-property:background-color,color;transition-duration:var(--duration-instant);transition-timing-function:var(--ease-standard)}.row-action+.row-action{margin-inline-start:var(--spacing, .25rem)}.row-action:hover:not(:disabled){background-color:var(--state-hover);color:var(--color-content-primary)}.row-action:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(var(--focus-ring-width) + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style: none;outline-style:none;--tw-ring-color: var(--color-focus-ring)}@media(forced-colors:active){.row-action:focus-visible{outline:2px solid transparent;outline-offset:2px}}.row-action:disabled{cursor:default;opacity:var(--opacity-disabled)}.row-action.danger,.row-action.danger:hover:not(:disabled){color:var(--color-danger)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.spacer{position:absolute;inset:0;z-index:-1;height:0px}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
5615
+ template: "<!-- The cell is a gridcell and the <label> inside it fills it: clicking anywhere in\nthe cell still reaches the checkbox, natively. A <label> cannot take the gridcell\nrole itself. The click handler is a mouse-only convenience. The checkbox is out of\nthe Tab order (tabindex -1), because the row is the grid's one Tab stop; Space on\nthe focused row toggles the selection instead. -->\n@if (dataGridDataset.configs.multiSelect) {\n <!-- A quick second click on the checkbox undoes the first one; it must not open the record. -->\n <div\n class=\"cell selection\"\n role=\"gridcell\"\n [class.pinned]=\"pinFirstColumn\"\n (dblclick)=\"$event.stopPropagation()\"\n (onResize)=\"onResizeSelection($event)\"\n >\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <label class=\"selection-target\" (click)=\"onToggleSelection($event)\">\n <!-- Null, not false: an attribute binding writes disabled=\"false\" for false, and any value at\n all disables a control, so every checkbox rendered disabled and faded. -->\n <input\n class=\"form-input\"\n tabindex=\"-1\"\n type=\"checkbox\"\n [attr.aria-label]=\"selectRowText | translate\"\n [attr.disabled]=\"disabled ? true : null\"\n [(ngModel)]=\"selected\"\n />\n </label>\n </div>\n}\n@for (column of columns; track column; let first = $first) {\n <!-- With pinFirstColumn, the first data column, and the selection column before it, stay in place\n while the rows scroll sideways. -->\n <div\n #cell\n class=\"cell\"\n role=\"gridcell\"\n [class.pinned]=\"pinFirstColumn && first\"\n [class.actions]=\"column.type === 'actions' && !column.template\"\n [class.align-center]=\"alignOf(column) === 'center'\"\n [class.align-end]=\"alignOf(column) === 'end'\"\n [class.disabled]=\"disabled\"\n [class.numeric]=\"isNumeric(column)\"\n [ngClass]=\"column.customClass\"\n >\n @if (isFirstRow) {\n <div class=\"spacer\" (onResize)=\"onResize(column, $event)\"></div>\n }\n <ng-container\n *ngTemplateOutlet=\"\n column.template ? column.template : column.type === 'actions' ? actionsTemplate : simpleTemplate;\n context: { rowData: rowData, column: column }\n \"\n >\n </ng-container>\n </div>\n}\n\n<!-- An actions column: an icon-only button per visible action. The click stops at the button, so\nit neither focuses nor selects the row, and a quick second click does not open it. The buttons are\nTab stops only in the grid's tabbable row: Tab goes from that row to its actions, then out of the\ngrid. In every other row they are out of the Tab order, so the grid stays one stop wide. -->\n<ng-template #actionsTemplate let-column=\"column\">\n @for (action of visibleActions(column); track action) {\n <button\n class=\"row-action\"\n type=\"button\"\n [attr.tabindex]=\"tabbable() ? 0 : -1\"\n [attr.aria-label]=\"action.label | translate\"\n [class.danger]=\"action.intent === 'danger'\"\n [disabled]=\"disabled || isActionDisabled(action)\"\n [libTooltip]=\"action.label\"\n (click)=\"onActionClicked($event, action)\"\n (dblclick)=\"$event.stopPropagation()\"\n >\n <i aria-hidden=\"true\" [class]=\"action.icon\"></i>\n </button>\n }\n</ng-template>\n\n<!-- A column without a template. The column's type decides the formatting; with no type the\nvalue shows as it is. The translate pipe sits only in the branches that hold a translation key, so a\nplain cell renders as it always did. -->\n<ng-template #simpleTemplate let-column=\"column\">\n @let cell = formatCell(column);\n @switch (cell.kind) {\n @case ('boolean') {\n @if (cell.checked) {\n <i class=\"fa-solid fa-check\" aria-hidden=\"true\"></i>\n }\n @if (cell.translate) {\n <span class=\"visually-hidden\">{{ cell.text | translate }}</span>\n }\n }\n @case ('badge') {\n <lib-badge [intent]=\"cell.intent ?? 'neutral'\">\n @if (cell.translate) {\n {{ cell.text | translate }}\n } @else {\n {{ cell.text }}\n }\n </lib-badge>\n }\n @default {\n @if (cell.translate) {\n <span>{{ cell.text | translate }}</span>\n } @else {\n <span>{{ cell.text }}</span>\n }\n }\n }\n</ng-template>\n",
5616
+ styles: ["@layer properties;:host{grid-column:1 / -1;display:grid;grid-template-columns:subgrid}.cell{position:relative;align-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-user-select:text;user-select:text}.cell.disabled{pointer-events:none;cursor:default;overflow:hidden;text-overflow:ellipsis;opacity:.6}.cell input{vertical-align:super}.cell.selection{display:flex;align-items:center;-webkit-user-select:none;user-select:none}.cell .selection-target{display:flex;flex-grow:1;align-items:center;align-self:stretch}.cell.align-center{text-align:center}.cell.align-end{text-align:end}.cell.numeric{font-variant-numeric:tabular-nums}.cell.actions{overflow:visible;-webkit-user-select:none;user-select:none}.cell.pinned{position:sticky;z-index:1;inset-inline-start:0;margin-inline-start:-1rem;padding-inline-start:1rem;background:linear-gradient(var(--grid-pinned-tint, transparent),var(--grid-pinned-tint, transparent)),var(--color-surface-solid)}.cell.selection.pinned~.cell.pinned{inset-inline-start:var(--grid-pin-offset, 0px)}.cell.pinned:not(.selection){box-shadow:1px 0 0 var(--color-line-strong)}.cell.pinned:not(.selection):dir(rtl){box-shadow:-1px 0 0 var(--color-line-strong)}:host(.striped){--grid-pinned-tint: var(--state-hover)}:host(:hover),:host(.selected){--grid-pinned-tint: var(--state-selected)}:host(:focus-visible) .cell.pinned:first-child{box-shadow:inset var(--focus-ring-width) 0 0 var(--color-focus-ring)}:host(:focus-visible) .cell.pinned:first-child:not(.selection){box-shadow:inset var(--focus-ring-width) 0 0 var(--color-focus-ring),1px 0 0 var(--color-line-strong)}.row-action{display:inline-flex;height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);cursor:pointer;align-items:center;justify-content:center;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;vertical-align:middle;border-radius:var(--radius-control);color:var(--color-content-secondary);transition-property:background-color,color;transition-duration:var(--duration-instant);transition-timing-function:var(--ease-standard)}.row-action+.row-action{margin-inline-start:var(--spacing, .25rem)}.row-action:hover:not(:disabled){background-color:var(--state-hover);color:var(--color-content-primary)}.row-action:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(var(--focus-ring-width) + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style: none;outline-style:none;--tw-ring-color: var(--color-focus-ring)}@media(forced-colors:active){.row-action:focus-visible{outline:2px solid transparent;outline-offset:2px}}.row-action:disabled{cursor:default;opacity:var(--opacity-disabled)}.row-action.danger,.row-action.danger:hover:not(:disabled){color:var(--color-danger)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.spacer{position:absolute;inset:0;z-index:-1;height:0px}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
5594
5617
  dependencies: [
5595
5618
  {
5596
5619
  kind: "component",
@@ -5705,8 +5728,8 @@ i0.ɵɵngDeclareClassMetadata({
5705
5728
  TooltipDirective,
5706
5729
  TranslatePipe
5707
5730
  ],
5708
- template: "<!-- The cell is a gridcell and the <label> inside it fills it: clicking anywhere in\nthe cell still reaches the checkbox, natively. A <label> cannot take the gridcell\nrole itself. The click handler is a mouse-only convenience. The checkbox is out of\nthe Tab order (tabindex -1), because the row is the grid's one Tab stop; Space on\nthe focused row toggles the selection instead. -->\n@if (dataGridDataset.configs.multiSelect) {\n <!-- A quick second click on the checkbox undoes the first one; it must not open the record. -->\n <div\n class=\"cell selection\"\n role=\"gridcell\"\n (dblclick)=\"$event.stopPropagation()\"\n (onResize)=\"onResizeSelection($event)\"\n >\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <label class=\"selection-target\" (click)=\"onToggleSelection($event)\">\n <!-- Null, not false: an attribute binding writes disabled=\"false\" for false, and any value at\n all disables a control, so every checkbox rendered disabled and faded. -->\n <input\n class=\"form-input\"\n tabindex=\"-1\"\n type=\"checkbox\"\n [attr.aria-label]=\"selectRowText | translate\"\n [attr.disabled]=\"disabled ? true : null\"\n [(ngModel)]=\"selected\"\n />\n </label>\n </div>\n}\n@for (column of columns; track column) {\n <div\n #cell\n class=\"cell\"\n role=\"gridcell\"\n [class.actions]=\"column.type === 'actions' && !column.template\"\n [class.align-center]=\"alignOf(column) === 'center'\"\n [class.align-end]=\"alignOf(column) === 'end'\"\n [class.disabled]=\"disabled\"\n [class.numeric]=\"isNumeric(column)\"\n [ngClass]=\"column.customClass\"\n >\n @if (isFirstRow) {\n <div class=\"spacer\" (onResize)=\"onResize(column, $event)\"></div>\n }\n <ng-container\n *ngTemplateOutlet=\"\n column.template ? column.template : column.type === 'actions' ? actionsTemplate : simpleTemplate;\n context: { rowData: rowData, column: column }\n \"\n >\n </ng-container>\n </div>\n}\n\n<!-- An actions column: an icon-only button per visible action. The click stops at the button, so\nit neither focuses nor selects the row, and a quick second click does not open it. The buttons are\nTab stops only in the grid's tabbable row: Tab goes from that row to its actions, then out of the\ngrid. In every other row they are out of the Tab order, so the grid stays one stop wide. -->\n<ng-template #actionsTemplate let-column=\"column\">\n @for (action of visibleActions(column); track action) {\n <button\n class=\"row-action\"\n type=\"button\"\n [attr.tabindex]=\"tabbable() ? 0 : -1\"\n [attr.aria-label]=\"action.label | translate\"\n [class.danger]=\"action.intent === 'danger'\"\n [disabled]=\"disabled || isActionDisabled(action)\"\n [libTooltip]=\"action.label\"\n (click)=\"onActionClicked($event, action)\"\n (dblclick)=\"$event.stopPropagation()\"\n >\n <i aria-hidden=\"true\" [class]=\"action.icon\"></i>\n </button>\n }\n</ng-template>\n\n<!-- A column without a template. The column's type decides the formatting; with no type the\nvalue shows as it is. The translate pipe sits only in the branches that hold a translation key, so a\nplain cell renders as it always did. -->\n<ng-template #simpleTemplate let-column=\"column\">\n @let cell = formatCell(column);\n @switch (cell.kind) {\n @case ('boolean') {\n @if (cell.checked) {\n <i class=\"fa-solid fa-check\" aria-hidden=\"true\"></i>\n }\n @if (cell.translate) {\n <span class=\"visually-hidden\">{{ cell.text | translate }}</span>\n }\n }\n @case ('badge') {\n <lib-badge [intent]=\"cell.intent ?? 'neutral'\">\n @if (cell.translate) {\n {{ cell.text | translate }}\n } @else {\n {{ cell.text }}\n }\n </lib-badge>\n }\n @default {\n @if (cell.translate) {\n <span>{{ cell.text | translate }}</span>\n } @else {\n <span>{{ cell.text }}</span>\n }\n }\n }\n</ng-template>\n",
5709
- styles: ["@layer properties;:host{grid-column:1 / -1;display:grid;grid-template-columns:subgrid}.cell{position:relative;align-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cell.disabled{pointer-events:none;cursor:default;overflow:hidden;text-overflow:ellipsis;opacity:.6}.cell input{vertical-align:super}.cell.selection{display:flex;align-items:center}.cell .selection-target{display:flex;flex-grow:1;align-items:center;align-self:stretch}.cell.align-center{text-align:center}.cell.align-end{text-align:end}.cell.numeric{font-variant-numeric:tabular-nums}.cell.actions{overflow:visible}.row-action{display:inline-flex;height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);cursor:pointer;align-items:center;justify-content:center;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;vertical-align:middle;border-radius:var(--radius-control);color:var(--color-content-secondary);transition-property:background-color,color;transition-duration:var(--duration-instant);transition-timing-function:var(--ease-standard)}.row-action+.row-action{margin-inline-start:var(--spacing, .25rem)}.row-action:hover:not(:disabled){background-color:var(--state-hover);color:var(--color-content-primary)}.row-action:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(var(--focus-ring-width) + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style: none;outline-style:none;--tw-ring-color: var(--color-focus-ring)}@media(forced-colors:active){.row-action:focus-visible{outline:2px solid transparent;outline-offset:2px}}.row-action:disabled{cursor:default;opacity:var(--opacity-disabled)}.row-action.danger,.row-action.danger:hover:not(:disabled){color:var(--color-danger)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.spacer{position:absolute;inset:0;z-index:-1;height:0px}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
5731
+ template: "<!-- The cell is a gridcell and the <label> inside it fills it: clicking anywhere in\nthe cell still reaches the checkbox, natively. A <label> cannot take the gridcell\nrole itself. The click handler is a mouse-only convenience. The checkbox is out of\nthe Tab order (tabindex -1), because the row is the grid's one Tab stop; Space on\nthe focused row toggles the selection instead. -->\n@if (dataGridDataset.configs.multiSelect) {\n <!-- A quick second click on the checkbox undoes the first one; it must not open the record. -->\n <div\n class=\"cell selection\"\n role=\"gridcell\"\n [class.pinned]=\"pinFirstColumn\"\n (dblclick)=\"$event.stopPropagation()\"\n (onResize)=\"onResizeSelection($event)\"\n >\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <label class=\"selection-target\" (click)=\"onToggleSelection($event)\">\n <!-- Null, not false: an attribute binding writes disabled=\"false\" for false, and any value at\n all disables a control, so every checkbox rendered disabled and faded. -->\n <input\n class=\"form-input\"\n tabindex=\"-1\"\n type=\"checkbox\"\n [attr.aria-label]=\"selectRowText | translate\"\n [attr.disabled]=\"disabled ? true : null\"\n [(ngModel)]=\"selected\"\n />\n </label>\n </div>\n}\n@for (column of columns; track column; let first = $first) {\n <!-- With pinFirstColumn, the first data column, and the selection column before it, stay in place\n while the rows scroll sideways. -->\n <div\n #cell\n class=\"cell\"\n role=\"gridcell\"\n [class.pinned]=\"pinFirstColumn && first\"\n [class.actions]=\"column.type === 'actions' && !column.template\"\n [class.align-center]=\"alignOf(column) === 'center'\"\n [class.align-end]=\"alignOf(column) === 'end'\"\n [class.disabled]=\"disabled\"\n [class.numeric]=\"isNumeric(column)\"\n [ngClass]=\"column.customClass\"\n >\n @if (isFirstRow) {\n <div class=\"spacer\" (onResize)=\"onResize(column, $event)\"></div>\n }\n <ng-container\n *ngTemplateOutlet=\"\n column.template ? column.template : column.type === 'actions' ? actionsTemplate : simpleTemplate;\n context: { rowData: rowData, column: column }\n \"\n >\n </ng-container>\n </div>\n}\n\n<!-- An actions column: an icon-only button per visible action. The click stops at the button, so\nit neither focuses nor selects the row, and a quick second click does not open it. The buttons are\nTab stops only in the grid's tabbable row: Tab goes from that row to its actions, then out of the\ngrid. In every other row they are out of the Tab order, so the grid stays one stop wide. -->\n<ng-template #actionsTemplate let-column=\"column\">\n @for (action of visibleActions(column); track action) {\n <button\n class=\"row-action\"\n type=\"button\"\n [attr.tabindex]=\"tabbable() ? 0 : -1\"\n [attr.aria-label]=\"action.label | translate\"\n [class.danger]=\"action.intent === 'danger'\"\n [disabled]=\"disabled || isActionDisabled(action)\"\n [libTooltip]=\"action.label\"\n (click)=\"onActionClicked($event, action)\"\n (dblclick)=\"$event.stopPropagation()\"\n >\n <i aria-hidden=\"true\" [class]=\"action.icon\"></i>\n </button>\n }\n</ng-template>\n\n<!-- A column without a template. The column's type decides the formatting; with no type the\nvalue shows as it is. The translate pipe sits only in the branches that hold a translation key, so a\nplain cell renders as it always did. -->\n<ng-template #simpleTemplate let-column=\"column\">\n @let cell = formatCell(column);\n @switch (cell.kind) {\n @case ('boolean') {\n @if (cell.checked) {\n <i class=\"fa-solid fa-check\" aria-hidden=\"true\"></i>\n }\n @if (cell.translate) {\n <span class=\"visually-hidden\">{{ cell.text | translate }}</span>\n }\n }\n @case ('badge') {\n <lib-badge [intent]=\"cell.intent ?? 'neutral'\">\n @if (cell.translate) {\n {{ cell.text | translate }}\n } @else {\n {{ cell.text }}\n }\n </lib-badge>\n }\n @default {\n @if (cell.translate) {\n <span>{{ cell.text | translate }}</span>\n } @else {\n <span>{{ cell.text }}</span>\n }\n }\n }\n</ng-template>\n",
5732
+ styles: ["@layer properties;:host{grid-column:1 / -1;display:grid;grid-template-columns:subgrid}.cell{position:relative;align-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-user-select:text;user-select:text}.cell.disabled{pointer-events:none;cursor:default;overflow:hidden;text-overflow:ellipsis;opacity:.6}.cell input{vertical-align:super}.cell.selection{display:flex;align-items:center;-webkit-user-select:none;user-select:none}.cell .selection-target{display:flex;flex-grow:1;align-items:center;align-self:stretch}.cell.align-center{text-align:center}.cell.align-end{text-align:end}.cell.numeric{font-variant-numeric:tabular-nums}.cell.actions{overflow:visible;-webkit-user-select:none;user-select:none}.cell.pinned{position:sticky;z-index:1;inset-inline-start:0;margin-inline-start:-1rem;padding-inline-start:1rem;background:linear-gradient(var(--grid-pinned-tint, transparent),var(--grid-pinned-tint, transparent)),var(--color-surface-solid)}.cell.selection.pinned~.cell.pinned{inset-inline-start:var(--grid-pin-offset, 0px)}.cell.pinned:not(.selection){box-shadow:1px 0 0 var(--color-line-strong)}.cell.pinned:not(.selection):dir(rtl){box-shadow:-1px 0 0 var(--color-line-strong)}:host(.striped){--grid-pinned-tint: var(--state-hover)}:host(:hover),:host(.selected){--grid-pinned-tint: var(--state-selected)}:host(:focus-visible) .cell.pinned:first-child{box-shadow:inset var(--focus-ring-width) 0 0 var(--color-focus-ring)}:host(:focus-visible) .cell.pinned:first-child:not(.selection){box-shadow:inset var(--focus-ring-width) 0 0 var(--color-focus-ring),1px 0 0 var(--color-line-strong)}.row-action{display:inline-flex;height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);cursor:pointer;align-items:center;justify-content:center;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;vertical-align:middle;border-radius:var(--radius-control);color:var(--color-content-secondary);transition-property:background-color,color;transition-duration:var(--duration-instant);transition-timing-function:var(--ease-standard)}.row-action+.row-action{margin-inline-start:var(--spacing, .25rem)}.row-action:hover:not(:disabled){background-color:var(--state-hover);color:var(--color-content-primary)}.row-action:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(var(--focus-ring-width) + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style: none;outline-style:none;--tw-ring-color: var(--color-focus-ring)}@media(forced-colors:active){.row-action:focus-visible{outline:2px solid transparent;outline-offset:2px}}.row-action:disabled{cursor:default;opacity:var(--opacity-disabled)}.row-action.danger,.row-action.danger:hover:not(:disabled){color:var(--color-danger)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.spacer{position:absolute;inset:0;z-index:-1;height:0px}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
5710
5733
  }]
5711
5734
  }],
5712
5735
  ctorParameters: () => [],
@@ -5735,6 +5758,10 @@ i0.ɵɵngDeclareClassMetadata({
5735
5758
  type: HostListener,
5736
5759
  args: ["click", ["$event"]]
5737
5760
  }],
5761
+ preventMultiClickSelection: [{
5762
+ type: HostListener,
5763
+ args: ["mousedown", ["$event"]]
5764
+ }],
5738
5765
  activate: [{
5739
5766
  type: HostListener,
5740
5767
  args: ["dblclick"]
@@ -5747,8 +5774,12 @@ const DEFAULT_SELECT_ALL_TEXT = "Select all rows";
5747
5774
  const DEFAULT_COLUMN_CHOOSER_TEXT = "Choose columns";
5748
5775
  const DEFAULT_RESET_COLUMNS_TEXT = "Reset columns";
5749
5776
  const DEFAULT_RESIZE_COLUMN_TEXT = "Resize {{ column }}";
5777
+ const DEFAULT_COPIED_TEXT = "Copied {{ count }} rows";
5778
+ const DEFAULT_COPIED_ROW_TEXT = "Copied 1 row";
5779
+ const COPIED_ANNOUNCEMENT_TIME = 5e3;
5750
5780
  const RESIZE_STEP = 16;
5751
5781
  const ROW_CELL_GAP = 16;
5782
+ const PINNED_CELL_BLEED = 16;
5752
5783
  let nextColumnChooserId = 0;
5753
5784
  var DataGridComponent = class DataGridComponent extends BaseComponent {
5754
5785
  bodyElement = viewChild("body", ...ngDevMode ? [{ debugName: "bodyElement" }] : /* istanbul ignore next */ []);
@@ -5762,13 +5793,17 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
5762
5793
  hasFailed = signal(false, ...ngDevMode ? [{ debugName: "hasFailed" }] : /* istanbul ignore next */ []);
5763
5794
  headerRightMargin = signal(0, ...ngDevMode ? [{ debugName: "headerRightMargin" }] : /* istanbul ignore next */ []);
5764
5795
  headerScrollLeft = signal(0, ...ngDevMode ? [{ debugName: "headerScrollLeft" }] : /* istanbul ignore next */ []);
5796
+ horizontalScrollbarHeight = signal(0, ...ngDevMode ? [{ debugName: "horizontalScrollbarHeight" }] : /* istanbul ignore next */ []);
5797
+ copiedCount = signal(null, ...ngDevMode ? [{ debugName: "copiedCount" }] : /* istanbul ignore next */ []);
5765
5798
  loading = signal(false, ...ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []);
5766
5799
  columnChooserOpen = signal(false, ...ngDevMode ? [{ debugName: "columnChooserOpen" }] : /* istanbul ignore next */ []);
5767
5800
  columnChooserId = `lib-data-grid-columns-${nextColumnChooserId++}`;
5768
5801
  minColumnWidth = 48;
5769
5802
  bodyResized$ = new Subject();
5803
+ copiedTimer;
5770
5804
  pendingFocusKey = null;
5771
5805
  bodyResizeObserver;
5806
+ contentResizeObserver;
5772
5807
  columnChooserRef;
5773
5808
  document = inject(DOCUMENT);
5774
5809
  injector = inject(Injector);
@@ -5782,13 +5817,26 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
5782
5817
  localeService = inject(LocaleService);
5783
5818
  ngZone = inject(NgZone);
5784
5819
  router = inject(Router);
5820
+ translateService = inject(TranslateService);
5785
5821
  selectionColRealSize;
5786
5822
  get bodyMinHeight() {
5787
5823
  let rowsToDisplay = this.configs.rowsToDisplay ?? 3;
5788
5824
  let rowsCount = this.dataGridDataset.loadedRows?.length ?? 0;
5789
5825
  if (rowsCount === 0) rowsCount = 1;
5790
5826
  if (rowsCount < rowsToDisplay) rowsToDisplay = rowsCount;
5791
- return rowsToDisplay * this.configs.rowHeight;
5827
+ return rowsToDisplay * this.rowHeight + this.horizontalScrollbarHeight();
5828
+ }
5829
+ get rowHeight() {
5830
+ return this.dataGridDataset.effectiveRowHeight;
5831
+ }
5832
+ get pinFirstColumn() {
5833
+ return this.configs.pinFirstColumn ?? false;
5834
+ }
5835
+ get firstColumn() {
5836
+ return this.columns[0];
5837
+ }
5838
+ get pinOffset() {
5839
+ return this.pinFirstColumn && this.selectionColRealSize ? `${this.selectionColRealSize + PINNED_CELL_BLEED}px` : null;
5792
5840
  }
5793
5841
  get ariaRowCount() {
5794
5842
  const headerRows = this.isHideColumns ? 0 : 1;
@@ -5860,7 +5908,8 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
5860
5908
  return this.configs.selectAllText ?? DEFAULT_SELECT_ALL_TEXT;
5861
5909
  }
5862
5910
  get selectionColWidth() {
5863
- return this.selectionColRealSize ? `${this.selectionColRealSize}px` : this.configs.multiSelectSize ?? "min-content";
5911
+ if (!this.selectionColRealSize) return this.configs.multiSelectSize ?? "min-content";
5912
+ return `${this.selectionColRealSize + (this.pinFirstColumn ? PINNED_CELL_BLEED : 0)}px`;
5864
5913
  }
5865
5914
  get shouldShowTotalRows() {
5866
5915
  const totalRows = this.dataGridDataset.totalRows;
@@ -5877,6 +5926,8 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
5877
5926
  return this.dataGridDataset?.configs?.showMessageOnEmpty ?? true;
5878
5927
  }
5879
5928
  get statusText() {
5929
+ const copiedCount = this.copiedCount();
5930
+ if (copiedCount !== null) return copiedCount === 1 ? this.configs.copiedRowText ?? DEFAULT_COPIED_ROW_TEXT : this.configs.copiedText ?? DEFAULT_COPIED_TEXT;
5880
5931
  if (this.loading()) return this.configs.loadingDisplayText ?? "";
5881
5932
  if (!this.hasBeenLoaded && !this.hasFailed() && this.lazyLoadRows()) return this.messageToDisplayWhenLazyLoad;
5882
5933
  if (this.hasFailed()) return this.messageToDisplayWhenFailed;
@@ -5895,7 +5946,7 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
5895
5946
  }
5896
5947
  get pageSize() {
5897
5948
  const viewportHeight = this.viewport()?.measureViewportSize("vertical") ?? 0;
5898
- const rows = Math.floor(viewportHeight / this.configs.rowHeight);
5949
+ const rows = Math.floor(viewportHeight / this.rowHeight);
5899
5950
  return Math.max(1, rows > 0 ? rows : this.configs.rowsToDisplay ?? 1);
5900
5951
  }
5901
5952
  get isBodyAttached() {
@@ -5957,19 +6008,27 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
5957
6008
  if (viewportWidth > 0) this.headerRightMargin.set(this.bodyElement().nativeElement.clientWidth - viewportWidth);
5958
6009
  this.viewport()?.checkViewportSize();
5959
6010
  this.syncHeaderScroll();
6011
+ this.measureHorizontalScrollbar();
5960
6012
  });
5961
6013
  this.ngZone.runOutsideAngular(() => {
5962
6014
  this.bodyResizeObserver = new ResizeObserver(() => {
5963
6015
  this.bodyResized$.next();
5964
6016
  });
5965
6017
  this.bodyResizeObserver.observe(this.bodyElement().nativeElement);
6018
+ const contentWrapper = viewportElement?.querySelector(".cdk-virtual-scroll-content-wrapper");
6019
+ if (contentWrapper) {
6020
+ this.contentResizeObserver = new ResizeObserver(() => this.measureHorizontalScrollbar());
6021
+ this.contentResizeObserver.observe(contentWrapper);
6022
+ }
5966
6023
  });
5967
6024
  }
5968
6025
  ngOnDestroy() {
5969
6026
  this.bodyResizeObserver?.disconnect();
6027
+ this.contentResizeObserver?.disconnect();
5970
6028
  this.stopColumnResize?.();
5971
6029
  this.columnChooserRef?.dispose();
5972
6030
  this.columnChooserRef = void 0;
6031
+ clearTimeout(this.copiedTimer);
5973
6032
  super.ngOnDestroy();
5974
6033
  }
5975
6034
  onToggleSelectAll() {
@@ -5978,7 +6037,12 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
5978
6037
  else this.dataGridDataset.selectRows(this.dataGridDataset.loadedKeys ?? []);
5979
6038
  }
5980
6039
  onKeydown(event) {
5981
- if (this.disabled() || event.altKey || event.ctrlKey || event.metaKey) return;
6040
+ if (this.disabled()) return;
6041
+ if (this.isCopyShortcut(event)) {
6042
+ this.onCopyKeydown(event);
6043
+ return;
6044
+ }
6045
+ if (event.altKey || event.ctrlKey || event.metaKey) return;
5982
6046
  const target = event.target;
5983
6047
  if (!(target instanceof HTMLElement) || target.tagName !== "LIB-DATA-GRID-ROW") return;
5984
6048
  const loadedKeys = this.dataGridDataset.loadedKeys ?? [];
@@ -6020,6 +6084,19 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
6020
6084
  event.preventDefault();
6021
6085
  this.moveFocusTo(targetIndex, loadedKeys);
6022
6086
  }
6087
+ onCopyKeydown(event) {
6088
+ const target = event.target;
6089
+ if (!(target instanceof HTMLElement) || target.tagName !== "LIB-DATA-GRID-ROW" || this.hasTextSelection()) return;
6090
+ const loadedKeys = this.dataGridDataset.loadedKeys ?? [];
6091
+ const index = Number(target.dataset["rowIndex"]);
6092
+ if (!Number.isInteger(index) || index < 0 || index >= loadedKeys.length) return;
6093
+ const clipboard = this.document.defaultView?.navigator?.clipboard;
6094
+ if (typeof clipboard?.writeText !== "function") return;
6095
+ const selectedKeys = this.isShowMultiSelect ? loadedKeys.filter((key) => this.dataGridDataset.isKeySelected(key)) : [];
6096
+ const keys = selectedKeys.length > 0 ? selectedKeys : [loadedKeys[index]];
6097
+ event.preventDefault();
6098
+ clipboard.writeText(this.rowsAsText(keys)).then(() => this.announceCopied(keys.length), () => void 0);
6099
+ }
6023
6100
  onToggleColumnChooser() {
6024
6101
  if (this.columnChooserOpen()) this.closeColumnChooser(true);
6025
6102
  else this.openColumnChooser();
@@ -6088,6 +6165,16 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
6088
6165
  fillCount(text) {
6089
6166
  return text.replace(/\{\{\s*count\s*\}\}/g, this.formattedTotalRows);
6090
6167
  }
6168
+ get formattedCopiedCount() {
6169
+ return formatLocaleNumber(this.copiedCount() ?? 0, this.localeService.locale(), { maxFractionDigits: 0 });
6170
+ }
6171
+ fillCopiedCount(text) {
6172
+ return this.copiedCount() === null ? text : text.replace(/\{\{\s*count\s*\}\}/g, this.formattedCopiedCount);
6173
+ }
6174
+ pinnedHeaderTransform() {
6175
+ const scrollLeft = this.headerScrollLeft();
6176
+ return this.pinFirstColumn && scrollLeft ? `translateX(${scrollLeft}px)` : null;
6177
+ }
6091
6178
  headerWidth(column) {
6092
6179
  if (column.realSize !== void 0) return column.realSize;
6093
6180
  return column.type === "actions" ? null : this.dataGridDataset.getColumnWidth(column.field) ?? null;
@@ -6106,6 +6193,43 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
6106
6193
  if (renderedRange) return rowIndex === renderedRange.start;
6107
6194
  return false;
6108
6195
  }
6196
+ announceCopied(count) {
6197
+ clearTimeout(this.copiedTimer);
6198
+ if (this.copiedCount() !== null) {
6199
+ this.copiedCount.set(null);
6200
+ this.copiedTimer = setTimeout(() => this.announceCopied(count), 100);
6201
+ return;
6202
+ }
6203
+ this.copiedCount.set(count);
6204
+ this.copiedTimer = setTimeout(() => this.copiedCount.set(null), COPIED_ANNOUNCEMENT_TIME);
6205
+ }
6206
+ cellText(rowData, column) {
6207
+ const cell = formatGridCellValue(column.field.split(".").reduce((current, field) => current?.[field], rowData), column, this.localeService.locale(), {
6208
+ trueText: this.configs.booleanTrueText ?? "Yes",
6209
+ falseText: this.configs.booleanFalseText ?? "No"
6210
+ });
6211
+ return (cell.translate ? String(this.translateService.instant(cell.text)) : cell.text).replace(/[\t\r\n]+/g, " ");
6212
+ }
6213
+ hasTextSelection() {
6214
+ const selection = this.document.getSelection?.() ?? null;
6215
+ return !!selection && !selection.isCollapsed && selection.toString().trim() !== "";
6216
+ }
6217
+ isCopyShortcut(event) {
6218
+ return (event.ctrlKey || event.metaKey) && !event.altKey && !event.shiftKey && event.key?.toLowerCase() === "c";
6219
+ }
6220
+ measureHorizontalScrollbar() {
6221
+ const viewportElement = this.viewport()?.elementRef?.nativeElement;
6222
+ if (!viewportElement || !this.isBodyAttached) return;
6223
+ const height = viewportElement.scrollWidth > viewportElement.clientWidth ? Math.max(0, viewportElement.offsetHeight - viewportElement.clientHeight) : 0;
6224
+ if (this.horizontalScrollbarHeight() !== height) this.horizontalScrollbarHeight.set(height);
6225
+ }
6226
+ rowsAsText(keys) {
6227
+ const columns = this.columns.filter((column) => column.type !== "actions");
6228
+ return keys.map((key) => {
6229
+ const rowData = this.dataGridDataset.getRowData(key);
6230
+ return columns.map((column) => this.cellText(rowData, column)).join(" ");
6231
+ }).join("\n");
6232
+ }
6109
6233
  openColumnChooser() {
6110
6234
  const button = this.columnChooserButton()?.nativeElement;
6111
6235
  const template = this.columnChooserTemplate();
@@ -6144,7 +6268,8 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
6144
6268
  currentColumnWidth(column, headerCell) {
6145
6269
  const width = this.dataGridDataset.getColumnWidth(column.field);
6146
6270
  if (width !== void 0) return width;
6147
- const cellWidth = column.realSize ?? headerCell?.getBoundingClientRect().width ?? 0;
6271
+ let cellWidth = column.realSize ?? headerCell?.getBoundingClientRect().width ?? 0;
6272
+ if (this.pinFirstColumn && column === this.firstColumn) cellWidth -= PINNED_CELL_BLEED;
6148
6273
  return Math.max(48, cellWidth + ROW_CELL_GAP);
6149
6274
  }
6150
6275
  focusPendingRow() {
@@ -6224,7 +6349,9 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
6224
6349
  host: { properties: {
6225
6350
  "class.no-borders": "showButtons()",
6226
6351
  "class.hide-borders": "configs.hideBorders === true",
6227
- "class.has-column-chooser": "showColumnChooser && !isHideColumns"
6352
+ "class.has-column-chooser": "showColumnChooser && !isHideColumns",
6353
+ "class.compact": "configs.density === 'compact'",
6354
+ "class.pin-first-column": "pinFirstColumn"
6228
6355
  } },
6229
6356
  viewQueries: [
6230
6357
  {
@@ -6258,8 +6385,8 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
6258
6385
  ],
6259
6386
  usesInheritance: true,
6260
6387
  ngImport: i0,
6261
- template: "@if (showButtons()) {\n <div class=\"buttons\">\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n}\n\n<!-- The WAI-ARIA grid pattern at row level: the header and the rows are the grid. The toolbar\nabove and the footer below are not rows, so they stay outside it. The keys are handled here, for\nthe row that has the focus; see onKeydown. The grid element itself takes no focus: its rows do,\nand their keydown bubbles up to it. -->\n<div class=\"grid-frame\">\n <!-- The column chooser button sits over the end of the header. It is not part of the grid: a\n row may hold only cells, so a control between them would break the grid's role tree. It comes\n before the grid in the Tab order, a Tab stop of its own as the select-all checkbox is. -->\n @if (showColumnChooser && !isHideColumns) {\n <div class=\"column-chooser-slot\">\n <button\n #columnChooserButton\n class=\"column-chooser-button\"\n aria-haspopup=\"dialog\"\n type=\"button\"\n [attr.aria-controls]=\"columnChooserOpen() ? columnChooserId : null\"\n [attr.aria-expanded]=\"columnChooserOpen()\"\n [attr.aria-label]=\"columnChooserText | translate\"\n [libTooltip]=\"columnChooserOpen() ? null : columnChooserText\"\n (click)=\"onToggleColumnChooser()\"\n >\n <i class=\"fa-solid fa-table-columns\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"grid\"\n role=\"grid\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [attr.aria-label]=\"gridLabel ? (gridLabel | translate) : null\"\n [attr.aria-multiselectable]=\"isShowMultiSelect ? true : null\"\n [attr.aria-rowcount]=\"ariaRowCount\"\n (keydown)=\"onKeydown($event)\"\n >\n <div class=\"header\" role=\"rowgroup\" [class.hide]=\"isHideColumns\" [style.padding-right.px]=\"headerRightMargin()\">\n <!-- Translated by however far the body is scrolled sideways. The rows scroll inside the CDK\n viewport and the header sits outside it, so without this the headings simply stay put\n while the cells move away from them. -->\n <div\n class=\"header-row\"\n aria-rowindex=\"1\"\n role=\"row\"\n [style.transform]=\"headerScrollLeft() ? 'translateX(-' + headerScrollLeft() + 'px)' : null\"\n >\n @if (isShowMultiSelect) {\n <div\n class=\"header-cell selection\"\n role=\"columnheader\"\n [ngStyle]=\"{\n width: selectionColWidth ? selectionColWidth : null,\n }\"\n >\n <!-- Selects or clears every loaded row. Rows a paged grid has not loaded yet are not part\n of it. A native checkbox, so it is focusable and toggles with Space. -->\n <input\n class=\"form-input\"\n type=\"checkbox\"\n [attr.aria-label]=\"selectAllText | translate\"\n [attr.disabled]=\"disabled() || !hasLoadedRows ? true : null\"\n [checked]=\"allRowsSelected\"\n [indeterminate]=\"someRowsSelected\"\n (change)=\"onToggleSelectAll()\"\n />\n </div>\n }\n\n <!-- A measured zero is a width, not the absence of one: it is a 1fr column that collapsed,\n and its heading has to collapse too.\n\n Such a heading is removed rather than merely made zero wide, because a flex item still\n takes a gap on each side while the body grid allows the collapsed track only one, and\n that spare gap pushed every heading to its right out by 16px. -->\n @for (column of columns; track column) {\n @let width = headerWidth(column);\n <div\n class=\"header-cell\"\n role=\"columnheader\"\n [class.align-center]=\"alignOf(column) === 'center'\"\n [class.align-end]=\"alignOf(column) === 'end'\"\n [ngStyle]=\"{\n display: width === 0 ? 'none' : null,\n 'width.px': width,\n }\"\n >\n <span class=\"header-text\">{{ column.headerName | translate }}</span>\n <!-- The width sets the column's track in the rows' template. The header then copies the\n cell measured in the first row, as for any column. ArrowLeft and ArrowRight change the\n width; a double click gives the column its declared size back. -->\n @if (isResizable(column)) {\n @let columnName = column.headerName | translate;\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\n <div\n class=\"resize-handle\"\n aria-orientation=\"vertical\"\n role=\"separator\"\n tabindex=\"0\"\n [attr.aria-label]=\"fillColumn(resizeColumnText | translate: { column: columnName }, columnName)\"\n [attr.aria-valuemin]=\"minColumnWidth\"\n [attr.aria-valuenow]=\"resizeValue(column)\"\n (click)=\"$event.stopPropagation()\"\n (dblclick)=\"onResizeReset($event, column)\"\n (keydown)=\"onResizeKeydown($event, column)\"\n (pointerdown)=\"onResizeStart($event, column)\"\n ></div>\n }\n </div>\n }\n </div>\n </div>\n\n <div #body class=\"body\" role=\"rowgroup\" [style.min-height.px]=\"bodyMinHeight\">\n <cdk-virtual-scroll-viewport [itemSize]=\"configs.rowHeight\" [style.grid-template-columns]=\"gridColumns\">\n @let tabbableKey = tabbableRowKey;\n <lib-data-grid-row\n #row\n *cdkVirtualFor=\"let row of dataGridDataset.loadedRows; index as i; trackBy: trackByFn\"\n [disabled]=\"disabled()\"\n [isFirstRow]=\"isFirstVisibleRow(i)\"\n [rowData]=\"row\"\n [rowIndex]=\"i\"\n [style.height.px]=\"configs.rowHeight\"\n [tabbable]=\"dataGridDataset.getRowInternalKey(row) === tabbableKey\"\n (selectionResized)=\"onSelectionResized($event)\"\n >\n </lib-data-grid-row>\n\n <!-- The messages below are not rows, so assistive technology does not see them here: the\n status region after the grid announces the same text. -->\n @if (loading()) {\n <div class=\"loading\" aria-hidden=\"true\" [style.height.px]=\"configs.rowHeight\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n <span>\n {{ dataGridDataset.configs.loadingDisplayText ?? '' | translate }}\n </span>\n </div>\n }\n @if (!loading() && !hasBeenLoaded && !hasFailed() && lazyLoadRows()) {\n <div class=\"message\" aria-hidden=\"true\" [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenLazyLoad | translate }}\n </span>\n </div>\n }\n <!-- A failed load shows its message even when no load has succeeded yet: the first one failing\n used to leave the grid blank. -->\n @if (!loading() && (hasFailed() || (hasBeenLoaded && !hasLoadedRows))) {\n @if (!hasFailed() && !hasLoadedRows && hasMessageToDisplayWhenEmpty && shouldDisplayMessageWhenEmpty) {\n <div class=\"message\" aria-hidden=\"true\" [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenEmpty | translate }}\n </span>\n </div>\n }\n @if (hasFailed()) {\n <div class=\"message\" aria-hidden=\"true\" [style.height.px]=\"configs.rowHeight\">\n <span>\n <i class=\"fas fa-exclamation-triangle mr-2 text-yellow-600\"></i\n >{{ messageToDisplayWhenFailed | translate }}\n </span>\n </div>\n }\n }\n </cdk-virtual-scroll-viewport>\n </div>\n </div>\n</div>\n\n<!-- Polite: screen readers hear the loading, lazy-load, empty and failure messages without losing\ntheir place. Always in the page, so a change of text is announced. -->\n<div class=\"status\" role=\"status\">{{ statusText | translate }}</div>\n\n@if (shouldShowTotalRows) {\n <div class=\"footer\">\n {{ fillCount(totalRowsText | translate: { count: formattedTotalRows }) }}\n </div>\n}\n\n<!-- The column chooser, opened in a CDK overlay under its button. The focus is trapped inside;\nEscape and a click outside close it and give the focus back to the button. -->\n<ng-template #columnChooserTemplate>\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"column-chooser\"\n cdkTrapFocus\n role=\"dialog\"\n [attr.aria-label]=\"columnChooserText | translate\"\n [attr.id]=\"columnChooserId\"\n (keydown)=\"onColumnChooserKeydown($event)\"\n >\n <ul class=\"column-chooser-list\">\n @for (column of hideableColumns; track column) {\n <li>\n <label class=\"column-chooser-option\">\n <input\n class=\"form-input\"\n type=\"checkbox\"\n [checked]=\"!dataGridDataset.isColumnHidden(column)\"\n [disabled]=\"!dataGridDataset.isColumnHidden(column) && !dataGridDataset.canHideColumn(column)\"\n (change)=\"onToggleColumn(column, $event)\"\n />\n <span>{{ column.headerName || column.field | translate }}</span>\n </label>\n </li>\n }\n </ul>\n <button class=\"column-chooser-reset\" type=\"button\" (click)=\"onResetColumns()\">\n {{ resetColumnsText | translate }}\n </button>\n </div>\n</ng-template>\n",
6262
- styles: ["@charset \"UTF-8\";@layer properties;:host{display:flex;flex-direction:column;overflow:hidden;-webkit-user-select:none;user-select:none}:host:not(.no-borders){background-color:var(--color-surface-solid)}:host:not(.no-borders):not(.hide-borders){border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-line);border-radius:var(--surface-radius, .5rem)}:host.no-borders .header .header-row{padding-block:calc(var(--spacing, .25rem) * 1.5)}:host.no-borders .column-chooser-slot{padding-block:calc(var(--spacing, .25rem) * 1.5)}:host.no-borders .body lib-data-grid-row{padding-block:var(--spacing, .25rem)}.grid-frame{position:relative;display:flex;min-height:0px;flex-grow:1;flex-direction:column}.grid{display:flex;min-height:0px;flex-grow:1;flex-direction:column;overflow:hidden}.column-chooser-slot{position:absolute;inset-inline-end:calc(var(--spacing, .25rem) * 0);top:0;z-index:2;display:flex;align-items:center;padding-block:calc(var(--spacing, .25rem) * 3);padding-inline-start:var(--spacing, .25rem);padding-inline-end:calc(var(--spacing, .25rem) * 2);background:linear-gradient(color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent),color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent)),var(--color-surface-solid)}@supports (color: color-mix(in lab,red,red)){.column-chooser-slot{background:linear-gradient(color-mix(in srgb,var(--color-content-primary) 14%,transparent),color-mix(in srgb,var(--color-content-primary) 14%,transparent)),var(--color-surface-solid)}}.column-chooser-button{display:inline-flex;height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);cursor:pointer;align-items:center;justify-content:center;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;border-radius:var(--radius-control);color:var(--color-content-secondary)}.column-chooser-button:hover{background-color:var(--state-hover);color:var(--color-content-primary)}.column-chooser-button:focus-visible{outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:0}:host.has-column-chooser .header-row,:host.has-column-chooser .body lib-data-grid-row{padding-inline-end:2.5rem}.status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.header-row,lib-data-grid-row,.loading,.message{gap:calc(var(--spacing, .25rem) * 4);padding-inline:calc(var(--spacing, .25rem) * 4)}.header{overflow:hidden;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);background-color:color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent);border-color:var(--color-line)}@supports (color: color-mix(in lab,red,red)){.header{background-color:color-mix(in srgb,var(--color-content-primary) 14%,transparent)}}.header.hide{display:none}.header .header-row{display:flex;flex-direction:row;padding-block:calc(var(--spacing, .25rem) * 3)}.header .header-cell{position:relative;display:flex;align-items:center;white-space:nowrap}.header .header-cell .header-text{min-width:0px;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.header .header-cell:not(.selection){flex:none}.header .header-cell.selection{display:flex;align-items:center}.header .header-cell.align-center{text-align:center}.header .header-cell.align-end{text-align:end}.header .resize-handle{position:absolute;top:0;bottom:0;z-index:1;cursor:col-resize;touch-action:none;inset-inline-end:-.875rem;width:.75rem}.header .resize-handle:after{position:absolute;top:0;bottom:0;opacity:0%;content:\"\";inset-inline-start:calc(50% - 1px);width:2px;background-color:var(--color-line-strong);transition:opacity var(--duration-short) var(--ease-standard)}.header .resize-handle:hover:after,.header .resize-handle:active:after,.header .resize-handle:focus-visible:after{opacity:100%}.header .resize-handle:focus-visible{outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:calc(-1 * var(--focus-ring-width))}.column-chooser{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing, .25rem) * 2);min-width:12rem;max-height:20rem;border-color:var(--color-line);border-radius:var(--radius-control);background-color:var(--color-surface-solid);color:var(--color-content-primary);box-shadow:var(--shadow-overlay);font-size:var(--text-body)}.column-chooser-list{display:flex;flex-direction:column;overflow-y:auto}.column-chooser-option{display:flex;cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);white-space:nowrap;border-radius:var(--radius-control)}.column-chooser-option:hover{background-color:var(--state-hover)}.column-chooser-option:has(input:disabled){cursor:default;opacity:var(--opacity-disabled)}.column-chooser-reset{cursor:pointer;border-style:var(--tw-border-style);border-width:1px;padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);text-align:start;border-color:var(--color-line);border-radius:var(--radius-control)}.column-chooser-reset:hover{background-color:var(--state-hover)}.column-chooser-reset:focus-visible{outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:0}.footer{overflow:hidden;border-top-style:var(--tw-border-style);border-top-width:1px;padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 1.5);text-overflow:ellipsis;white-space:nowrap;border-color:var(--color-line);color:var(--color-content-secondary);font-size:var(--text-caption);font-variant-numeric:tabular-nums}.body{position:relative;flex-grow:1}.body cdk-virtual-scroll-viewport{position:absolute;inset:0}.body cdk-virtual-scroll-viewport ::ng-deep .cdk-virtual-scroll-content-wrapper{display:grid;grid-template-columns:inherit}.body lib-data-grid-row{margin-top:-1px;cursor:pointer;border-block-style:var(--tw-border-style);border-block-width:1px;padding-block:calc(var(--spacing, .25rem) * 2);border-color:var(--color-line)}.body lib-data-grid-row.striped{background-color:var(--state-hover)}.body lib-data-grid-row:hover{background-color:var(--state-selected)}.body lib-data-grid-row.focused{z-index:1;border-color:var(--color-line-strong)}.body lib-data-grid-row:focus-visible{position:relative;z-index:20;outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:calc(-1 * var(--focus-ring-width))}.body lib-data-grid-row.selected{position:relative;z-index:10;background-color:var(--state-selected);border-color:var(--color-line-selected)}.body lib-data-grid-row.selected:hover{background-color:var(--state-selected)}.body .loading,.body .message{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);white-space:nowrap;height:calc(var(--spacing, .25rem) * 10);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-line);grid-column:1 / -1}.body .loading span,.body .message span{overflow:hidden;text-overflow:ellipsis}.body .loading svg{height:calc(var(--spacing, .25rem) * 6);min-height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);min-width:calc(var(--spacing, .25rem) * 6);animation:var(--animate-spin, spin 1s linear infinite);transition-property:opacity;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));transition-duration:var(--duration-short);transition-timing-function:var(--ease-standard)}.buttons{display:flex;border-top-style:var(--tw-border-style);border-top-width:1px;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;padding:var(--spacing, .25rem);border-color:var(--color-line)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
6388
+ template: "@if (showButtons()) {\n <div class=\"buttons\">\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n}\n\n<!-- The WAI-ARIA grid pattern at row level: the header and the rows are the grid. The toolbar\nabove and the footer below are not rows, so they stay outside it. The keys are handled here, for\nthe row that has the focus; see onKeydown. The grid element itself takes no focus: its rows do,\nand their keydown bubbles up to it. -->\n<div class=\"grid-frame\">\n <!-- The column chooser button sits over the end of the header. It is not part of the grid: a\n row may hold only cells, so a control between them would break the grid's role tree. It comes\n before the grid in the Tab order, a Tab stop of its own as the select-all checkbox is. -->\n @if (showColumnChooser && !isHideColumns) {\n <div class=\"column-chooser-slot\">\n <button\n #columnChooserButton\n class=\"column-chooser-button\"\n aria-haspopup=\"dialog\"\n type=\"button\"\n [attr.aria-controls]=\"columnChooserOpen() ? columnChooserId : null\"\n [attr.aria-expanded]=\"columnChooserOpen()\"\n [attr.aria-label]=\"columnChooserText | translate\"\n [libTooltip]=\"columnChooserOpen() ? null : columnChooserText\"\n (click)=\"onToggleColumnChooser()\"\n >\n <i class=\"fa-solid fa-table-columns\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"grid\"\n role=\"grid\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [attr.aria-label]=\"gridLabel ? (gridLabel | translate) : null\"\n [attr.aria-multiselectable]=\"isShowMultiSelect ? true : null\"\n [attr.aria-rowcount]=\"ariaRowCount\"\n (keydown)=\"onKeydown($event)\"\n >\n <div class=\"header\" role=\"rowgroup\" [class.hide]=\"isHideColumns\" [style.padding-right.px]=\"headerRightMargin()\">\n <!-- Translated by however far the body is scrolled sideways. The rows scroll inside the CDK\n viewport and the header sits outside it, so without this the headings simply stay put\n while the cells move away from them. -->\n <div\n class=\"header-row\"\n aria-rowindex=\"1\"\n role=\"row\"\n [style.transform]=\"headerScrollLeft() ? 'translateX(-' + headerScrollLeft() + 'px)' : null\"\n >\n @if (isShowMultiSelect) {\n <div\n class=\"header-cell selection\"\n role=\"columnheader\"\n [class.pinned]=\"pinFirstColumn\"\n [style.transform]=\"pinnedHeaderTransform()\"\n [ngStyle]=\"{\n width: selectionColWidth ? selectionColWidth : null,\n }\"\n >\n <!-- Selects or clears every loaded row. Rows a paged grid has not loaded yet are not part\n of it. A native checkbox, so it is focusable and toggles with Space. -->\n <input\n class=\"form-input\"\n type=\"checkbox\"\n [attr.aria-label]=\"selectAllText | translate\"\n [attr.disabled]=\"disabled() || !hasLoadedRows ? true : null\"\n [checked]=\"allRowsSelected\"\n [indeterminate]=\"someRowsSelected\"\n (change)=\"onToggleSelectAll()\"\n />\n </div>\n }\n\n <!-- A measured zero is a width, not the absence of one: it is a 1fr column that collapsed,\n and its heading has to collapse too.\n\n Such a heading is removed rather than merely made zero wide, because a flex item still\n takes a gap on each side while the body grid allows the collapsed track only one, and\n that spare gap pushed every heading to its right out by 16px. -->\n <!-- With pinFirstColumn, the first heading, and the select-all heading before it, move back by\n as much as the header row moves, so they stay in place over their pinned cells. -->\n @for (column of columns; track column; let first = $first) {\n @let width = headerWidth(column);\n <div\n class=\"header-cell\"\n role=\"columnheader\"\n [class.pinned]=\"pinFirstColumn && first\"\n [style.transform]=\"first ? pinnedHeaderTransform() : null\"\n [class.align-center]=\"alignOf(column) === 'center'\"\n [class.align-end]=\"alignOf(column) === 'end'\"\n [ngStyle]=\"{\n display: width === 0 ? 'none' : null,\n 'width.px': width,\n }\"\n >\n <span class=\"header-text\">{{ column.headerName | translate }}</span>\n <!-- The width sets the column's track in the rows' template. The header then copies the\n cell measured in the first row, as for any column. ArrowLeft and ArrowRight change the\n width; a double click gives the column its declared size back. -->\n @if (isResizable(column)) {\n @let columnName = column.headerName | translate;\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\n <div\n class=\"resize-handle\"\n aria-orientation=\"vertical\"\n role=\"separator\"\n tabindex=\"0\"\n [attr.aria-label]=\"fillColumn(resizeColumnText | translate: { column: columnName }, columnName)\"\n [attr.aria-valuemin]=\"minColumnWidth\"\n [attr.aria-valuenow]=\"resizeValue(column)\"\n (click)=\"$event.stopPropagation()\"\n (dblclick)=\"onResizeReset($event, column)\"\n (keydown)=\"onResizeKeydown($event, column)\"\n (pointerdown)=\"onResizeStart($event, column)\"\n ></div>\n }\n </div>\n }\n </div>\n </div>\n\n <div #body class=\"body\" role=\"rowgroup\" [style.min-height.px]=\"bodyMinHeight\">\n <cdk-virtual-scroll-viewport\n [itemSize]=\"rowHeight\"\n [style.--grid-pin-offset]=\"pinOffset\"\n [style.grid-template-columns]=\"gridColumns\"\n >\n @let tabbableKey = tabbableRowKey;\n <lib-data-grid-row\n #row\n *cdkVirtualFor=\"let row of dataGridDataset.loadedRows; index as i; trackBy: trackByFn\"\n [disabled]=\"disabled()\"\n [isFirstRow]=\"isFirstVisibleRow(i)\"\n [rowData]=\"row\"\n [rowIndex]=\"i\"\n [style.height.px]=\"rowHeight\"\n [tabbable]=\"dataGridDataset.getRowInternalKey(row) === tabbableKey\"\n (selectionResized)=\"onSelectionResized($event)\"\n >\n </lib-data-grid-row>\n\n <!-- The messages below are not rows, so assistive technology does not see them here: the\n status region after the grid announces the same text. -->\n @if (loading()) {\n <div class=\"loading\" aria-hidden=\"true\" [style.height.px]=\"rowHeight\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n <span>\n {{ dataGridDataset.configs.loadingDisplayText ?? '' | translate }}\n </span>\n </div>\n }\n @if (!loading() && !hasBeenLoaded && !hasFailed() && lazyLoadRows()) {\n <div class=\"message\" aria-hidden=\"true\" [style.height.px]=\"rowHeight\">\n <span>\n {{ messageToDisplayWhenLazyLoad | translate }}\n </span>\n </div>\n }\n <!-- A failed load shows its message even when no load has succeeded yet: the first one failing\n used to leave the grid blank. -->\n @if (!loading() && (hasFailed() || (hasBeenLoaded && !hasLoadedRows))) {\n @if (!hasFailed() && !hasLoadedRows && hasMessageToDisplayWhenEmpty && shouldDisplayMessageWhenEmpty) {\n <div class=\"message\" aria-hidden=\"true\" [style.height.px]=\"rowHeight\">\n <span>\n {{ messageToDisplayWhenEmpty | translate }}\n </span>\n </div>\n }\n @if (hasFailed()) {\n <div class=\"message\" aria-hidden=\"true\" [style.height.px]=\"rowHeight\">\n <span>\n <i class=\"fas fa-exclamation-triangle mr-2 text-yellow-600\"></i\n >{{ messageToDisplayWhenFailed | translate }}\n </span>\n </div>\n }\n }\n </cdk-virtual-scroll-viewport>\n </div>\n </div>\n</div>\n\n<!-- Polite: screen readers hear the loading, lazy-load, empty and failure messages, and how many rows\na copy took, without losing their place. Always in the page, so a change of text is announced. -->\n<div class=\"status\" role=\"status\">\n {{ fillCopiedCount(statusText | translate: { count: formattedCopiedCount }) }}\n</div>\n\n@if (shouldShowTotalRows) {\n <div class=\"footer\">\n {{ fillCount(totalRowsText | translate: { count: formattedTotalRows }) }}\n </div>\n}\n\n<!-- The column chooser, opened in a CDK overlay under its button. The focus is trapped inside;\nEscape and a click outside close it and give the focus back to the button. -->\n<ng-template #columnChooserTemplate>\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"column-chooser\"\n cdkTrapFocus\n role=\"dialog\"\n [attr.aria-label]=\"columnChooserText | translate\"\n [attr.id]=\"columnChooserId\"\n (keydown)=\"onColumnChooserKeydown($event)\"\n >\n <ul class=\"column-chooser-list\">\n @for (column of hideableColumns; track column) {\n <li>\n <label class=\"column-chooser-option\">\n <input\n class=\"form-input\"\n type=\"checkbox\"\n [checked]=\"!dataGridDataset.isColumnHidden(column)\"\n [disabled]=\"!dataGridDataset.isColumnHidden(column) && !dataGridDataset.canHideColumn(column)\"\n (change)=\"onToggleColumn(column, $event)\"\n />\n <span>{{ column.headerName || column.field | translate }}</span>\n </label>\n </li>\n }\n </ul>\n <button class=\"column-chooser-reset\" type=\"button\" (click)=\"onResetColumns()\">\n {{ resetColumnsText | translate }}\n </button>\n </div>\n</ng-template>\n",
6389
+ styles: ["@charset \"UTF-8\";@layer properties;:host{display:flex;flex-direction:column;overflow:hidden}:host:not(.no-borders){background-color:var(--color-surface-solid)}:host:not(.no-borders):not(.hide-borders){border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-line);border-radius:var(--surface-radius, .5rem)}:host.compact .header .header-row,:host.compact .column-chooser-slot{padding-block:calc(var(--spacing, .25rem) * 1.5)}:host.compact .body lib-data-grid-row{padding-block:var(--spacing, .25rem)}:host.no-borders .header .header-row{padding-block:calc(var(--spacing, .25rem) * 1.5)}:host.no-borders .column-chooser-slot{padding-block:calc(var(--spacing, .25rem) * 1.5)}:host.no-borders .body lib-data-grid-row{padding-block:var(--spacing, .25rem)}.grid-frame{position:relative;display:flex;min-height:0px;flex-grow:1;flex-direction:column}.grid{display:flex;min-height:0px;flex-grow:1;flex-direction:column;overflow:hidden}.column-chooser-slot{position:absolute;inset-inline-end:calc(var(--spacing, .25rem) * 0);top:0;z-index:2;display:flex;align-items:center;padding-block:calc(var(--spacing, .25rem) * 3);padding-inline-start:var(--spacing, .25rem);padding-inline-end:calc(var(--spacing, .25rem) * 2);-webkit-user-select:none;user-select:none;background:linear-gradient(color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent),color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent)),var(--color-surface-solid)}@supports (color: color-mix(in lab,red,red)){.column-chooser-slot{background:linear-gradient(color-mix(in srgb,var(--color-content-primary) 14%,transparent),color-mix(in srgb,var(--color-content-primary) 14%,transparent)),var(--color-surface-solid)}}.column-chooser-button{display:inline-flex;height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);cursor:pointer;align-items:center;justify-content:center;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;border-radius:var(--radius-control);color:var(--color-content-secondary)}.column-chooser-button:hover{background-color:var(--state-hover);color:var(--color-content-primary)}.column-chooser-button:focus-visible{outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:0}:host.has-column-chooser .header-row,:host.has-column-chooser .body lib-data-grid-row{padding-inline-end:2.5rem}.status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.header-row,lib-data-grid-row,.loading,.message{gap:calc(var(--spacing, .25rem) * 4);padding-inline:calc(var(--spacing, .25rem) * 4)}.header{overflow:hidden;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);-webkit-user-select:none;user-select:none;background-color:color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent);border-color:var(--color-line)}@supports (color: color-mix(in lab,red,red)){.header{background-color:color-mix(in srgb,var(--color-content-primary) 14%,transparent)}}.header.hide{display:none}.header .header-row{display:flex;flex-direction:row;padding-block:calc(var(--spacing, .25rem) * 3)}.header .header-cell{position:relative;display:flex;align-items:center;white-space:nowrap}.header .header-cell .header-text{min-width:0px;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.header .header-cell:not(.selection){flex:none}.header .header-cell.selection{display:flex;align-items:center}.header .header-cell.align-center{text-align:center}.header .header-cell.align-end{text-align:end}.header .header-cell.pinned{z-index:2;margin-inline-start:-1rem;padding-inline-start:1rem;background:linear-gradient(color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent),color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent)),var(--color-surface-solid)}@supports (color: color-mix(in lab,red,red)){.header .header-cell.pinned{background:linear-gradient(color-mix(in srgb,var(--color-content-primary) 14%,transparent),color-mix(in srgb,var(--color-content-primary) 14%,transparent)),var(--color-surface-solid)}}.header .header-cell.pinned:not(.selection){box-shadow:1px 0 0 var(--color-line-strong)}.header .header-cell.pinned:not(.selection):dir(rtl){box-shadow:-1px 0 0 var(--color-line-strong)}.header .resize-handle{position:absolute;top:0;bottom:0;z-index:1;cursor:col-resize;touch-action:none;inset-inline-end:-.875rem;width:.75rem}.header .resize-handle:after{position:absolute;top:0;bottom:0;opacity:0%;content:\"\";inset-inline-start:calc(50% - 1px);width:2px;background-color:var(--color-line-strong);transition:opacity var(--duration-short) var(--ease-standard)}.header .resize-handle:hover:after,.header .resize-handle:active:after,.header .resize-handle:focus-visible:after{opacity:100%}.header .resize-handle:focus-visible{outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:calc(-1 * var(--focus-ring-width))}.column-chooser{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing, .25rem) * 2);min-width:12rem;max-height:20rem;border-color:var(--color-line);border-radius:var(--radius-control);background-color:var(--color-surface-solid);color:var(--color-content-primary);box-shadow:var(--shadow-overlay);font-size:var(--text-body)}.column-chooser-list{display:flex;flex-direction:column;overflow-y:auto}.column-chooser-option{display:flex;cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);white-space:nowrap;border-radius:var(--radius-control)}.column-chooser-option:hover{background-color:var(--state-hover)}.column-chooser-option:has(input:disabled){cursor:default;opacity:var(--opacity-disabled)}.column-chooser-reset{cursor:pointer;border-style:var(--tw-border-style);border-width:1px;padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);text-align:start;border-color:var(--color-line);border-radius:var(--radius-control)}.column-chooser-reset:hover{background-color:var(--state-hover)}.column-chooser-reset:focus-visible{outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:0}.footer{overflow:hidden;border-top-style:var(--tw-border-style);border-top-width:1px;padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 1.5);text-overflow:ellipsis;white-space:nowrap;border-color:var(--color-line);color:var(--color-content-secondary);font-size:var(--text-caption);font-variant-numeric:tabular-nums}.body{position:relative;flex-grow:1}.body cdk-virtual-scroll-viewport{position:absolute;inset:0}.body cdk-virtual-scroll-viewport ::ng-deep .cdk-virtual-scroll-content-wrapper{display:grid;grid-template-columns:inherit}.body lib-data-grid-row{margin-top:-1px;cursor:pointer;border-block-style:var(--tw-border-style);border-block-width:1px;padding-block:calc(var(--spacing, .25rem) * 2);border-color:var(--color-line)}.body lib-data-grid-row.striped{background-color:var(--state-hover)}.body lib-data-grid-row:hover{background-color:var(--state-selected)}.body lib-data-grid-row.focused{z-index:1;border-color:var(--color-line-strong)}.body lib-data-grid-row:focus-visible{position:relative;z-index:20;outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:calc(-1 * var(--focus-ring-width))}.body lib-data-grid-row.selected{position:relative;z-index:10;background-color:var(--state-selected);border-color:var(--color-line-selected)}.body lib-data-grid-row.selected:hover{background-color:var(--state-selected)}.body .loading,.body .message{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);white-space:nowrap;-webkit-user-select:none;user-select:none;height:calc(var(--spacing, .25rem) * 10);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-line);grid-column:1 / -1}.body .loading span,.body .message span{overflow:hidden;text-overflow:ellipsis}.body .loading svg{height:calc(var(--spacing, .25rem) * 6);min-height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);min-width:calc(var(--spacing, .25rem) * 6);animation:var(--animate-spin, spin 1s linear infinite);transition-property:opacity;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));transition-duration:var(--duration-short);transition-timing-function:var(--ease-standard)}.buttons{display:flex;border-top-style:var(--tw-border-style);border-top-width:1px;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;padding:var(--spacing, .25rem);border-color:var(--color-line)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
6263
6390
  dependencies: [
6264
6391
  {
6265
6392
  kind: "ngmodule",
@@ -6354,7 +6481,9 @@ i0.ɵɵngDeclareClassMetadata({
6354
6481
  host: {
6355
6482
  "[class.no-borders]": "showButtons()",
6356
6483
  "[class.hide-borders]": "configs.hideBorders === true",
6357
- "[class.has-column-chooser]": "showColumnChooser && !isHideColumns"
6484
+ "[class.has-column-chooser]": "showColumnChooser && !isHideColumns",
6485
+ "[class.compact]": "configs.density === 'compact'",
6486
+ "[class.pin-first-column]": "pinFirstColumn"
6358
6487
  },
6359
6488
  imports: [
6360
6489
  A11yModule,
@@ -6364,8 +6493,8 @@ i0.ɵɵngDeclareClassMetadata({
6364
6493
  TooltipDirective,
6365
6494
  TranslatePipe
6366
6495
  ],
6367
- template: "@if (showButtons()) {\n <div class=\"buttons\">\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n}\n\n<!-- The WAI-ARIA grid pattern at row level: the header and the rows are the grid. The toolbar\nabove and the footer below are not rows, so they stay outside it. The keys are handled here, for\nthe row that has the focus; see onKeydown. The grid element itself takes no focus: its rows do,\nand their keydown bubbles up to it. -->\n<div class=\"grid-frame\">\n <!-- The column chooser button sits over the end of the header. It is not part of the grid: a\n row may hold only cells, so a control between them would break the grid's role tree. It comes\n before the grid in the Tab order, a Tab stop of its own as the select-all checkbox is. -->\n @if (showColumnChooser && !isHideColumns) {\n <div class=\"column-chooser-slot\">\n <button\n #columnChooserButton\n class=\"column-chooser-button\"\n aria-haspopup=\"dialog\"\n type=\"button\"\n [attr.aria-controls]=\"columnChooserOpen() ? columnChooserId : null\"\n [attr.aria-expanded]=\"columnChooserOpen()\"\n [attr.aria-label]=\"columnChooserText | translate\"\n [libTooltip]=\"columnChooserOpen() ? null : columnChooserText\"\n (click)=\"onToggleColumnChooser()\"\n >\n <i class=\"fa-solid fa-table-columns\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"grid\"\n role=\"grid\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [attr.aria-label]=\"gridLabel ? (gridLabel | translate) : null\"\n [attr.aria-multiselectable]=\"isShowMultiSelect ? true : null\"\n [attr.aria-rowcount]=\"ariaRowCount\"\n (keydown)=\"onKeydown($event)\"\n >\n <div class=\"header\" role=\"rowgroup\" [class.hide]=\"isHideColumns\" [style.padding-right.px]=\"headerRightMargin()\">\n <!-- Translated by however far the body is scrolled sideways. The rows scroll inside the CDK\n viewport and the header sits outside it, so without this the headings simply stay put\n while the cells move away from them. -->\n <div\n class=\"header-row\"\n aria-rowindex=\"1\"\n role=\"row\"\n [style.transform]=\"headerScrollLeft() ? 'translateX(-' + headerScrollLeft() + 'px)' : null\"\n >\n @if (isShowMultiSelect) {\n <div\n class=\"header-cell selection\"\n role=\"columnheader\"\n [ngStyle]=\"{\n width: selectionColWidth ? selectionColWidth : null,\n }\"\n >\n <!-- Selects or clears every loaded row. Rows a paged grid has not loaded yet are not part\n of it. A native checkbox, so it is focusable and toggles with Space. -->\n <input\n class=\"form-input\"\n type=\"checkbox\"\n [attr.aria-label]=\"selectAllText | translate\"\n [attr.disabled]=\"disabled() || !hasLoadedRows ? true : null\"\n [checked]=\"allRowsSelected\"\n [indeterminate]=\"someRowsSelected\"\n (change)=\"onToggleSelectAll()\"\n />\n </div>\n }\n\n <!-- A measured zero is a width, not the absence of one: it is a 1fr column that collapsed,\n and its heading has to collapse too.\n\n Such a heading is removed rather than merely made zero wide, because a flex item still\n takes a gap on each side while the body grid allows the collapsed track only one, and\n that spare gap pushed every heading to its right out by 16px. -->\n @for (column of columns; track column) {\n @let width = headerWidth(column);\n <div\n class=\"header-cell\"\n role=\"columnheader\"\n [class.align-center]=\"alignOf(column) === 'center'\"\n [class.align-end]=\"alignOf(column) === 'end'\"\n [ngStyle]=\"{\n display: width === 0 ? 'none' : null,\n 'width.px': width,\n }\"\n >\n <span class=\"header-text\">{{ column.headerName | translate }}</span>\n <!-- The width sets the column's track in the rows' template. The header then copies the\n cell measured in the first row, as for any column. ArrowLeft and ArrowRight change the\n width; a double click gives the column its declared size back. -->\n @if (isResizable(column)) {\n @let columnName = column.headerName | translate;\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\n <div\n class=\"resize-handle\"\n aria-orientation=\"vertical\"\n role=\"separator\"\n tabindex=\"0\"\n [attr.aria-label]=\"fillColumn(resizeColumnText | translate: { column: columnName }, columnName)\"\n [attr.aria-valuemin]=\"minColumnWidth\"\n [attr.aria-valuenow]=\"resizeValue(column)\"\n (click)=\"$event.stopPropagation()\"\n (dblclick)=\"onResizeReset($event, column)\"\n (keydown)=\"onResizeKeydown($event, column)\"\n (pointerdown)=\"onResizeStart($event, column)\"\n ></div>\n }\n </div>\n }\n </div>\n </div>\n\n <div #body class=\"body\" role=\"rowgroup\" [style.min-height.px]=\"bodyMinHeight\">\n <cdk-virtual-scroll-viewport [itemSize]=\"configs.rowHeight\" [style.grid-template-columns]=\"gridColumns\">\n @let tabbableKey = tabbableRowKey;\n <lib-data-grid-row\n #row\n *cdkVirtualFor=\"let row of dataGridDataset.loadedRows; index as i; trackBy: trackByFn\"\n [disabled]=\"disabled()\"\n [isFirstRow]=\"isFirstVisibleRow(i)\"\n [rowData]=\"row\"\n [rowIndex]=\"i\"\n [style.height.px]=\"configs.rowHeight\"\n [tabbable]=\"dataGridDataset.getRowInternalKey(row) === tabbableKey\"\n (selectionResized)=\"onSelectionResized($event)\"\n >\n </lib-data-grid-row>\n\n <!-- The messages below are not rows, so assistive technology does not see them here: the\n status region after the grid announces the same text. -->\n @if (loading()) {\n <div class=\"loading\" aria-hidden=\"true\" [style.height.px]=\"configs.rowHeight\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n <span>\n {{ dataGridDataset.configs.loadingDisplayText ?? '' | translate }}\n </span>\n </div>\n }\n @if (!loading() && !hasBeenLoaded && !hasFailed() && lazyLoadRows()) {\n <div class=\"message\" aria-hidden=\"true\" [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenLazyLoad | translate }}\n </span>\n </div>\n }\n <!-- A failed load shows its message even when no load has succeeded yet: the first one failing\n used to leave the grid blank. -->\n @if (!loading() && (hasFailed() || (hasBeenLoaded && !hasLoadedRows))) {\n @if (!hasFailed() && !hasLoadedRows && hasMessageToDisplayWhenEmpty && shouldDisplayMessageWhenEmpty) {\n <div class=\"message\" aria-hidden=\"true\" [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenEmpty | translate }}\n </span>\n </div>\n }\n @if (hasFailed()) {\n <div class=\"message\" aria-hidden=\"true\" [style.height.px]=\"configs.rowHeight\">\n <span>\n <i class=\"fas fa-exclamation-triangle mr-2 text-yellow-600\"></i\n >{{ messageToDisplayWhenFailed | translate }}\n </span>\n </div>\n }\n }\n </cdk-virtual-scroll-viewport>\n </div>\n </div>\n</div>\n\n<!-- Polite: screen readers hear the loading, lazy-load, empty and failure messages without losing\ntheir place. Always in the page, so a change of text is announced. -->\n<div class=\"status\" role=\"status\">{{ statusText | translate }}</div>\n\n@if (shouldShowTotalRows) {\n <div class=\"footer\">\n {{ fillCount(totalRowsText | translate: { count: formattedTotalRows }) }}\n </div>\n}\n\n<!-- The column chooser, opened in a CDK overlay under its button. The focus is trapped inside;\nEscape and a click outside close it and give the focus back to the button. -->\n<ng-template #columnChooserTemplate>\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"column-chooser\"\n cdkTrapFocus\n role=\"dialog\"\n [attr.aria-label]=\"columnChooserText | translate\"\n [attr.id]=\"columnChooserId\"\n (keydown)=\"onColumnChooserKeydown($event)\"\n >\n <ul class=\"column-chooser-list\">\n @for (column of hideableColumns; track column) {\n <li>\n <label class=\"column-chooser-option\">\n <input\n class=\"form-input\"\n type=\"checkbox\"\n [checked]=\"!dataGridDataset.isColumnHidden(column)\"\n [disabled]=\"!dataGridDataset.isColumnHidden(column) && !dataGridDataset.canHideColumn(column)\"\n (change)=\"onToggleColumn(column, $event)\"\n />\n <span>{{ column.headerName || column.field | translate }}</span>\n </label>\n </li>\n }\n </ul>\n <button class=\"column-chooser-reset\" type=\"button\" (click)=\"onResetColumns()\">\n {{ resetColumnsText | translate }}\n </button>\n </div>\n</ng-template>\n",
6368
- styles: ["@charset \"UTF-8\";@layer properties;:host{display:flex;flex-direction:column;overflow:hidden;-webkit-user-select:none;user-select:none}:host:not(.no-borders){background-color:var(--color-surface-solid)}:host:not(.no-borders):not(.hide-borders){border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-line);border-radius:var(--surface-radius, .5rem)}:host.no-borders .header .header-row{padding-block:calc(var(--spacing, .25rem) * 1.5)}:host.no-borders .column-chooser-slot{padding-block:calc(var(--spacing, .25rem) * 1.5)}:host.no-borders .body lib-data-grid-row{padding-block:var(--spacing, .25rem)}.grid-frame{position:relative;display:flex;min-height:0px;flex-grow:1;flex-direction:column}.grid{display:flex;min-height:0px;flex-grow:1;flex-direction:column;overflow:hidden}.column-chooser-slot{position:absolute;inset-inline-end:calc(var(--spacing, .25rem) * 0);top:0;z-index:2;display:flex;align-items:center;padding-block:calc(var(--spacing, .25rem) * 3);padding-inline-start:var(--spacing, .25rem);padding-inline-end:calc(var(--spacing, .25rem) * 2);background:linear-gradient(color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent),color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent)),var(--color-surface-solid)}@supports (color: color-mix(in lab,red,red)){.column-chooser-slot{background:linear-gradient(color-mix(in srgb,var(--color-content-primary) 14%,transparent),color-mix(in srgb,var(--color-content-primary) 14%,transparent)),var(--color-surface-solid)}}.column-chooser-button{display:inline-flex;height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);cursor:pointer;align-items:center;justify-content:center;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;border-radius:var(--radius-control);color:var(--color-content-secondary)}.column-chooser-button:hover{background-color:var(--state-hover);color:var(--color-content-primary)}.column-chooser-button:focus-visible{outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:0}:host.has-column-chooser .header-row,:host.has-column-chooser .body lib-data-grid-row{padding-inline-end:2.5rem}.status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.header-row,lib-data-grid-row,.loading,.message{gap:calc(var(--spacing, .25rem) * 4);padding-inline:calc(var(--spacing, .25rem) * 4)}.header{overflow:hidden;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);background-color:color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent);border-color:var(--color-line)}@supports (color: color-mix(in lab,red,red)){.header{background-color:color-mix(in srgb,var(--color-content-primary) 14%,transparent)}}.header.hide{display:none}.header .header-row{display:flex;flex-direction:row;padding-block:calc(var(--spacing, .25rem) * 3)}.header .header-cell{position:relative;display:flex;align-items:center;white-space:nowrap}.header .header-cell .header-text{min-width:0px;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.header .header-cell:not(.selection){flex:none}.header .header-cell.selection{display:flex;align-items:center}.header .header-cell.align-center{text-align:center}.header .header-cell.align-end{text-align:end}.header .resize-handle{position:absolute;top:0;bottom:0;z-index:1;cursor:col-resize;touch-action:none;inset-inline-end:-.875rem;width:.75rem}.header .resize-handle:after{position:absolute;top:0;bottom:0;opacity:0%;content:\"\";inset-inline-start:calc(50% - 1px);width:2px;background-color:var(--color-line-strong);transition:opacity var(--duration-short) var(--ease-standard)}.header .resize-handle:hover:after,.header .resize-handle:active:after,.header .resize-handle:focus-visible:after{opacity:100%}.header .resize-handle:focus-visible{outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:calc(-1 * var(--focus-ring-width))}.column-chooser{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing, .25rem) * 2);min-width:12rem;max-height:20rem;border-color:var(--color-line);border-radius:var(--radius-control);background-color:var(--color-surface-solid);color:var(--color-content-primary);box-shadow:var(--shadow-overlay);font-size:var(--text-body)}.column-chooser-list{display:flex;flex-direction:column;overflow-y:auto}.column-chooser-option{display:flex;cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);white-space:nowrap;border-radius:var(--radius-control)}.column-chooser-option:hover{background-color:var(--state-hover)}.column-chooser-option:has(input:disabled){cursor:default;opacity:var(--opacity-disabled)}.column-chooser-reset{cursor:pointer;border-style:var(--tw-border-style);border-width:1px;padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);text-align:start;border-color:var(--color-line);border-radius:var(--radius-control)}.column-chooser-reset:hover{background-color:var(--state-hover)}.column-chooser-reset:focus-visible{outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:0}.footer{overflow:hidden;border-top-style:var(--tw-border-style);border-top-width:1px;padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 1.5);text-overflow:ellipsis;white-space:nowrap;border-color:var(--color-line);color:var(--color-content-secondary);font-size:var(--text-caption);font-variant-numeric:tabular-nums}.body{position:relative;flex-grow:1}.body cdk-virtual-scroll-viewport{position:absolute;inset:0}.body cdk-virtual-scroll-viewport ::ng-deep .cdk-virtual-scroll-content-wrapper{display:grid;grid-template-columns:inherit}.body lib-data-grid-row{margin-top:-1px;cursor:pointer;border-block-style:var(--tw-border-style);border-block-width:1px;padding-block:calc(var(--spacing, .25rem) * 2);border-color:var(--color-line)}.body lib-data-grid-row.striped{background-color:var(--state-hover)}.body lib-data-grid-row:hover{background-color:var(--state-selected)}.body lib-data-grid-row.focused{z-index:1;border-color:var(--color-line-strong)}.body lib-data-grid-row:focus-visible{position:relative;z-index:20;outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:calc(-1 * var(--focus-ring-width))}.body lib-data-grid-row.selected{position:relative;z-index:10;background-color:var(--state-selected);border-color:var(--color-line-selected)}.body lib-data-grid-row.selected:hover{background-color:var(--state-selected)}.body .loading,.body .message{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);white-space:nowrap;height:calc(var(--spacing, .25rem) * 10);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-line);grid-column:1 / -1}.body .loading span,.body .message span{overflow:hidden;text-overflow:ellipsis}.body .loading svg{height:calc(var(--spacing, .25rem) * 6);min-height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);min-width:calc(var(--spacing, .25rem) * 6);animation:var(--animate-spin, spin 1s linear infinite);transition-property:opacity;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));transition-duration:var(--duration-short);transition-timing-function:var(--ease-standard)}.buttons{display:flex;border-top-style:var(--tw-border-style);border-top-width:1px;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;padding:var(--spacing, .25rem);border-color:var(--color-line)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
6496
+ template: "@if (showButtons()) {\n <div class=\"buttons\">\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n}\n\n<!-- The WAI-ARIA grid pattern at row level: the header and the rows are the grid. The toolbar\nabove and the footer below are not rows, so they stay outside it. The keys are handled here, for\nthe row that has the focus; see onKeydown. The grid element itself takes no focus: its rows do,\nand their keydown bubbles up to it. -->\n<div class=\"grid-frame\">\n <!-- The column chooser button sits over the end of the header. It is not part of the grid: a\n row may hold only cells, so a control between them would break the grid's role tree. It comes\n before the grid in the Tab order, a Tab stop of its own as the select-all checkbox is. -->\n @if (showColumnChooser && !isHideColumns) {\n <div class=\"column-chooser-slot\">\n <button\n #columnChooserButton\n class=\"column-chooser-button\"\n aria-haspopup=\"dialog\"\n type=\"button\"\n [attr.aria-controls]=\"columnChooserOpen() ? columnChooserId : null\"\n [attr.aria-expanded]=\"columnChooserOpen()\"\n [attr.aria-label]=\"columnChooserText | translate\"\n [libTooltip]=\"columnChooserOpen() ? null : columnChooserText\"\n (click)=\"onToggleColumnChooser()\"\n >\n <i class=\"fa-solid fa-table-columns\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"grid\"\n role=\"grid\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [attr.aria-label]=\"gridLabel ? (gridLabel | translate) : null\"\n [attr.aria-multiselectable]=\"isShowMultiSelect ? true : null\"\n [attr.aria-rowcount]=\"ariaRowCount\"\n (keydown)=\"onKeydown($event)\"\n >\n <div class=\"header\" role=\"rowgroup\" [class.hide]=\"isHideColumns\" [style.padding-right.px]=\"headerRightMargin()\">\n <!-- Translated by however far the body is scrolled sideways. The rows scroll inside the CDK\n viewport and the header sits outside it, so without this the headings simply stay put\n while the cells move away from them. -->\n <div\n class=\"header-row\"\n aria-rowindex=\"1\"\n role=\"row\"\n [style.transform]=\"headerScrollLeft() ? 'translateX(-' + headerScrollLeft() + 'px)' : null\"\n >\n @if (isShowMultiSelect) {\n <div\n class=\"header-cell selection\"\n role=\"columnheader\"\n [class.pinned]=\"pinFirstColumn\"\n [style.transform]=\"pinnedHeaderTransform()\"\n [ngStyle]=\"{\n width: selectionColWidth ? selectionColWidth : null,\n }\"\n >\n <!-- Selects or clears every loaded row. Rows a paged grid has not loaded yet are not part\n of it. A native checkbox, so it is focusable and toggles with Space. -->\n <input\n class=\"form-input\"\n type=\"checkbox\"\n [attr.aria-label]=\"selectAllText | translate\"\n [attr.disabled]=\"disabled() || !hasLoadedRows ? true : null\"\n [checked]=\"allRowsSelected\"\n [indeterminate]=\"someRowsSelected\"\n (change)=\"onToggleSelectAll()\"\n />\n </div>\n }\n\n <!-- A measured zero is a width, not the absence of one: it is a 1fr column that collapsed,\n and its heading has to collapse too.\n\n Such a heading is removed rather than merely made zero wide, because a flex item still\n takes a gap on each side while the body grid allows the collapsed track only one, and\n that spare gap pushed every heading to its right out by 16px. -->\n <!-- With pinFirstColumn, the first heading, and the select-all heading before it, move back by\n as much as the header row moves, so they stay in place over their pinned cells. -->\n @for (column of columns; track column; let first = $first) {\n @let width = headerWidth(column);\n <div\n class=\"header-cell\"\n role=\"columnheader\"\n [class.pinned]=\"pinFirstColumn && first\"\n [style.transform]=\"first ? pinnedHeaderTransform() : null\"\n [class.align-center]=\"alignOf(column) === 'center'\"\n [class.align-end]=\"alignOf(column) === 'end'\"\n [ngStyle]=\"{\n display: width === 0 ? 'none' : null,\n 'width.px': width,\n }\"\n >\n <span class=\"header-text\">{{ column.headerName | translate }}</span>\n <!-- The width sets the column's track in the rows' template. The header then copies the\n cell measured in the first row, as for any column. ArrowLeft and ArrowRight change the\n width; a double click gives the column its declared size back. -->\n @if (isResizable(column)) {\n @let columnName = column.headerName | translate;\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\n <div\n class=\"resize-handle\"\n aria-orientation=\"vertical\"\n role=\"separator\"\n tabindex=\"0\"\n [attr.aria-label]=\"fillColumn(resizeColumnText | translate: { column: columnName }, columnName)\"\n [attr.aria-valuemin]=\"minColumnWidth\"\n [attr.aria-valuenow]=\"resizeValue(column)\"\n (click)=\"$event.stopPropagation()\"\n (dblclick)=\"onResizeReset($event, column)\"\n (keydown)=\"onResizeKeydown($event, column)\"\n (pointerdown)=\"onResizeStart($event, column)\"\n ></div>\n }\n </div>\n }\n </div>\n </div>\n\n <div #body class=\"body\" role=\"rowgroup\" [style.min-height.px]=\"bodyMinHeight\">\n <cdk-virtual-scroll-viewport\n [itemSize]=\"rowHeight\"\n [style.--grid-pin-offset]=\"pinOffset\"\n [style.grid-template-columns]=\"gridColumns\"\n >\n @let tabbableKey = tabbableRowKey;\n <lib-data-grid-row\n #row\n *cdkVirtualFor=\"let row of dataGridDataset.loadedRows; index as i; trackBy: trackByFn\"\n [disabled]=\"disabled()\"\n [isFirstRow]=\"isFirstVisibleRow(i)\"\n [rowData]=\"row\"\n [rowIndex]=\"i\"\n [style.height.px]=\"rowHeight\"\n [tabbable]=\"dataGridDataset.getRowInternalKey(row) === tabbableKey\"\n (selectionResized)=\"onSelectionResized($event)\"\n >\n </lib-data-grid-row>\n\n <!-- The messages below are not rows, so assistive technology does not see them here: the\n status region after the grid announces the same text. -->\n @if (loading()) {\n <div class=\"loading\" aria-hidden=\"true\" [style.height.px]=\"rowHeight\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n <span>\n {{ dataGridDataset.configs.loadingDisplayText ?? '' | translate }}\n </span>\n </div>\n }\n @if (!loading() && !hasBeenLoaded && !hasFailed() && lazyLoadRows()) {\n <div class=\"message\" aria-hidden=\"true\" [style.height.px]=\"rowHeight\">\n <span>\n {{ messageToDisplayWhenLazyLoad | translate }}\n </span>\n </div>\n }\n <!-- A failed load shows its message even when no load has succeeded yet: the first one failing\n used to leave the grid blank. -->\n @if (!loading() && (hasFailed() || (hasBeenLoaded && !hasLoadedRows))) {\n @if (!hasFailed() && !hasLoadedRows && hasMessageToDisplayWhenEmpty && shouldDisplayMessageWhenEmpty) {\n <div class=\"message\" aria-hidden=\"true\" [style.height.px]=\"rowHeight\">\n <span>\n {{ messageToDisplayWhenEmpty | translate }}\n </span>\n </div>\n }\n @if (hasFailed()) {\n <div class=\"message\" aria-hidden=\"true\" [style.height.px]=\"rowHeight\">\n <span>\n <i class=\"fas fa-exclamation-triangle mr-2 text-yellow-600\"></i\n >{{ messageToDisplayWhenFailed | translate }}\n </span>\n </div>\n }\n }\n </cdk-virtual-scroll-viewport>\n </div>\n </div>\n</div>\n\n<!-- Polite: screen readers hear the loading, lazy-load, empty and failure messages, and how many rows\na copy took, without losing their place. Always in the page, so a change of text is announced. -->\n<div class=\"status\" role=\"status\">\n {{ fillCopiedCount(statusText | translate: { count: formattedCopiedCount }) }}\n</div>\n\n@if (shouldShowTotalRows) {\n <div class=\"footer\">\n {{ fillCount(totalRowsText | translate: { count: formattedTotalRows }) }}\n </div>\n}\n\n<!-- The column chooser, opened in a CDK overlay under its button. The focus is trapped inside;\nEscape and a click outside close it and give the focus back to the button. -->\n<ng-template #columnChooserTemplate>\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"column-chooser\"\n cdkTrapFocus\n role=\"dialog\"\n [attr.aria-label]=\"columnChooserText | translate\"\n [attr.id]=\"columnChooserId\"\n (keydown)=\"onColumnChooserKeydown($event)\"\n >\n <ul class=\"column-chooser-list\">\n @for (column of hideableColumns; track column) {\n <li>\n <label class=\"column-chooser-option\">\n <input\n class=\"form-input\"\n type=\"checkbox\"\n [checked]=\"!dataGridDataset.isColumnHidden(column)\"\n [disabled]=\"!dataGridDataset.isColumnHidden(column) && !dataGridDataset.canHideColumn(column)\"\n (change)=\"onToggleColumn(column, $event)\"\n />\n <span>{{ column.headerName || column.field | translate }}</span>\n </label>\n </li>\n }\n </ul>\n <button class=\"column-chooser-reset\" type=\"button\" (click)=\"onResetColumns()\">\n {{ resetColumnsText | translate }}\n </button>\n </div>\n</ng-template>\n",
6497
+ styles: ["@charset \"UTF-8\";@layer properties;:host{display:flex;flex-direction:column;overflow:hidden}:host:not(.no-borders){background-color:var(--color-surface-solid)}:host:not(.no-borders):not(.hide-borders){border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-line);border-radius:var(--surface-radius, .5rem)}:host.compact .header .header-row,:host.compact .column-chooser-slot{padding-block:calc(var(--spacing, .25rem) * 1.5)}:host.compact .body lib-data-grid-row{padding-block:var(--spacing, .25rem)}:host.no-borders .header .header-row{padding-block:calc(var(--spacing, .25rem) * 1.5)}:host.no-borders .column-chooser-slot{padding-block:calc(var(--spacing, .25rem) * 1.5)}:host.no-borders .body lib-data-grid-row{padding-block:var(--spacing, .25rem)}.grid-frame{position:relative;display:flex;min-height:0px;flex-grow:1;flex-direction:column}.grid{display:flex;min-height:0px;flex-grow:1;flex-direction:column;overflow:hidden}.column-chooser-slot{position:absolute;inset-inline-end:calc(var(--spacing, .25rem) * 0);top:0;z-index:2;display:flex;align-items:center;padding-block:calc(var(--spacing, .25rem) * 3);padding-inline-start:var(--spacing, .25rem);padding-inline-end:calc(var(--spacing, .25rem) * 2);-webkit-user-select:none;user-select:none;background:linear-gradient(color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent),color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent)),var(--color-surface-solid)}@supports (color: color-mix(in lab,red,red)){.column-chooser-slot{background:linear-gradient(color-mix(in srgb,var(--color-content-primary) 14%,transparent),color-mix(in srgb,var(--color-content-primary) 14%,transparent)),var(--color-surface-solid)}}.column-chooser-button{display:inline-flex;height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);cursor:pointer;align-items:center;justify-content:center;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;border-radius:var(--radius-control);color:var(--color-content-secondary)}.column-chooser-button:hover{background-color:var(--state-hover);color:var(--color-content-primary)}.column-chooser-button:focus-visible{outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:0}:host.has-column-chooser .header-row,:host.has-column-chooser .body lib-data-grid-row{padding-inline-end:2.5rem}.status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.header-row,lib-data-grid-row,.loading,.message{gap:calc(var(--spacing, .25rem) * 4);padding-inline:calc(var(--spacing, .25rem) * 4)}.header{overflow:hidden;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);-webkit-user-select:none;user-select:none;background-color:color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent);border-color:var(--color-line)}@supports (color: color-mix(in lab,red,red)){.header{background-color:color-mix(in srgb,var(--color-content-primary) 14%,transparent)}}.header.hide{display:none}.header .header-row{display:flex;flex-direction:row;padding-block:calc(var(--spacing, .25rem) * 3)}.header .header-cell{position:relative;display:flex;align-items:center;white-space:nowrap}.header .header-cell .header-text{min-width:0px;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.header .header-cell:not(.selection){flex:none}.header .header-cell.selection{display:flex;align-items:center}.header .header-cell.align-center{text-align:center}.header .header-cell.align-end{text-align:end}.header .header-cell.pinned{z-index:2;margin-inline-start:-1rem;padding-inline-start:1rem;background:linear-gradient(color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent),color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent)),var(--color-surface-solid)}@supports (color: color-mix(in lab,red,red)){.header .header-cell.pinned{background:linear-gradient(color-mix(in srgb,var(--color-content-primary) 14%,transparent),color-mix(in srgb,var(--color-content-primary) 14%,transparent)),var(--color-surface-solid)}}.header .header-cell.pinned:not(.selection){box-shadow:1px 0 0 var(--color-line-strong)}.header .header-cell.pinned:not(.selection):dir(rtl){box-shadow:-1px 0 0 var(--color-line-strong)}.header .resize-handle{position:absolute;top:0;bottom:0;z-index:1;cursor:col-resize;touch-action:none;inset-inline-end:-.875rem;width:.75rem}.header .resize-handle:after{position:absolute;top:0;bottom:0;opacity:0%;content:\"\";inset-inline-start:calc(50% - 1px);width:2px;background-color:var(--color-line-strong);transition:opacity var(--duration-short) var(--ease-standard)}.header .resize-handle:hover:after,.header .resize-handle:active:after,.header .resize-handle:focus-visible:after{opacity:100%}.header .resize-handle:focus-visible{outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:calc(-1 * var(--focus-ring-width))}.column-chooser{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing, .25rem) * 2);min-width:12rem;max-height:20rem;border-color:var(--color-line);border-radius:var(--radius-control);background-color:var(--color-surface-solid);color:var(--color-content-primary);box-shadow:var(--shadow-overlay);font-size:var(--text-body)}.column-chooser-list{display:flex;flex-direction:column;overflow-y:auto}.column-chooser-option{display:flex;cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);white-space:nowrap;border-radius:var(--radius-control)}.column-chooser-option:hover{background-color:var(--state-hover)}.column-chooser-option:has(input:disabled){cursor:default;opacity:var(--opacity-disabled)}.column-chooser-reset{cursor:pointer;border-style:var(--tw-border-style);border-width:1px;padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);text-align:start;border-color:var(--color-line);border-radius:var(--radius-control)}.column-chooser-reset:hover{background-color:var(--state-hover)}.column-chooser-reset:focus-visible{outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:0}.footer{overflow:hidden;border-top-style:var(--tw-border-style);border-top-width:1px;padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 1.5);text-overflow:ellipsis;white-space:nowrap;border-color:var(--color-line);color:var(--color-content-secondary);font-size:var(--text-caption);font-variant-numeric:tabular-nums}.body{position:relative;flex-grow:1}.body cdk-virtual-scroll-viewport{position:absolute;inset:0}.body cdk-virtual-scroll-viewport ::ng-deep .cdk-virtual-scroll-content-wrapper{display:grid;grid-template-columns:inherit}.body lib-data-grid-row{margin-top:-1px;cursor:pointer;border-block-style:var(--tw-border-style);border-block-width:1px;padding-block:calc(var(--spacing, .25rem) * 2);border-color:var(--color-line)}.body lib-data-grid-row.striped{background-color:var(--state-hover)}.body lib-data-grid-row:hover{background-color:var(--state-selected)}.body lib-data-grid-row.focused{z-index:1;border-color:var(--color-line-strong)}.body lib-data-grid-row:focus-visible{position:relative;z-index:20;outline:var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:calc(-1 * var(--focus-ring-width))}.body lib-data-grid-row.selected{position:relative;z-index:10;background-color:var(--state-selected);border-color:var(--color-line-selected)}.body lib-data-grid-row.selected:hover{background-color:var(--state-selected)}.body .loading,.body .message{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);white-space:nowrap;-webkit-user-select:none;user-select:none;height:calc(var(--spacing, .25rem) * 10);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-line);grid-column:1 / -1}.body .loading span,.body .message span{overflow:hidden;text-overflow:ellipsis}.body .loading svg{height:calc(var(--spacing, .25rem) * 6);min-height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);min-width:calc(var(--spacing, .25rem) * 6);animation:var(--animate-spin, spin 1s linear infinite);transition-property:opacity;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));transition-duration:var(--duration-short);transition-timing-function:var(--ease-standard)}.buttons{display:flex;border-top-style:var(--tw-border-style);border-top-width:1px;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;padding:var(--spacing, .25rem);border-color:var(--color-line)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
6369
6498
  }]
6370
6499
  }],
6371
6500
  ctorParameters: () => [],
@@ -8830,7 +8959,11 @@ var DataGridConfigsProvider = class DataGridConfigsProvider extends GridConfigsP
8830
8959
  columnChooserText: "Choose columns",
8831
8960
  resetColumnsText: "Reset columns",
8832
8961
  resizableColumns: false,
8833
- resizeColumnText: "Resize {{ column }}"
8962
+ resizeColumnText: "Resize {{ column }}",
8963
+ density: "comfortable",
8964
+ pinFirstColumn: false,
8965
+ copiedText: "Copied {{ count }} rows",
8966
+ copiedRowText: "Copied 1 row"
8834
8967
  };
8835
8968
  }
8836
8969
  static ɵfac = i0.ɵɵngDeclareFactory({
@@ -8918,6 +9051,6 @@ var DateValidators = class {
8918
9051
  };
8919
9052
  }
8920
9053
  };
8921
- export { BadgeComponent, BaseComponent, BaseDataset, ButtonComponent, CalendarComponent, CatalogSelectComponent, CatalogService, DataGridComponent, DataGridConfigsProvider, DataGridDataset, DataGridRowComponent, DataProviderService, DateHelpers, DateInputComponent, DateValidators, DisplayControls, EnumTranslatePipe, FormGroupComponent, FormGroupService, FormInputComponent, FormInputGroupComponent, FormService, GridConfigsProvider, GridDataset, GroupAccordionComponent, GroupContainerComponent, GroupScrollSpyComponent, GuidHelper, LibraryModule, LocaleService, MIN_GRID_COLUMN_WIDTH, ModalComponent, MultiEditorComponent, MultiEditorDataset, MultiSelectComponent, MultiSelectResultDataset, MultiSelectResultGridComponent, NumberInputComponent, ReplaceManyPipe, ReplacePipe, RibbonButtonComponent, RibbonComponent, RibbonGroupChild, RibbonGroupComponent, RouterFormatter, SIDEBAR_CONFIGS, ScrollSpyDirective, SidebarComponent, SidebarConfigs, SidebarMenu, SidebarMenuOpenMode, SidebarService, SkeletonComponent, TooltipDirective, formatDateText, formatGridCellValue, formatLocaleNumber, formatTimeText, getDatePattern, getFirstDayOfWeek, getGridColumnAlign, getNumberSeparators, isNumericGridColumn, isValidLocale, parseDateText, parseDigitsInfo, parseIsoValue, parseLocaleNumber, parseTimeText, toIsoDate, toIsoDateTime, toSidebarMenuOpenMode, uses12HourClock };
9054
+ export { BadgeComponent, BaseComponent, BaseDataset, ButtonComponent, COMPACT_GRID_ROW_HEIGHT, CalendarComponent, CatalogSelectComponent, CatalogService, DEFAULT_GRID_ROW_HEIGHT, DataGridComponent, DataGridConfigsProvider, DataGridDataset, DataGridRowComponent, DataProviderService, DateHelpers, DateInputComponent, DateValidators, DisplayControls, EnumTranslatePipe, FormGroupComponent, FormGroupService, FormInputComponent, FormInputGroupComponent, FormService, GridConfigsProvider, GridDataset, GroupAccordionComponent, GroupContainerComponent, GroupScrollSpyComponent, GuidHelper, LibraryModule, LocaleService, MIN_GRID_COLUMN_WIDTH, ModalComponent, MultiEditorComponent, MultiEditorDataset, MultiSelectComponent, MultiSelectResultDataset, MultiSelectResultGridComponent, NumberInputComponent, ReplaceManyPipe, ReplacePipe, RibbonButtonComponent, RibbonComponent, RibbonGroupChild, RibbonGroupComponent, RouterFormatter, SIDEBAR_CONFIGS, ScrollSpyDirective, SidebarComponent, SidebarConfigs, SidebarMenu, SidebarMenuOpenMode, SidebarService, SkeletonComponent, TooltipDirective, formatDateText, formatGridCellValue, formatLocaleNumber, formatTimeText, getDatePattern, getFirstDayOfWeek, getGridColumnAlign, getNumberSeparators, isNumericGridColumn, isValidLocale, parseDateText, parseDigitsInfo, parseIsoValue, parseLocaleNumber, parseTimeText, toIsoDate, toIsoDateTime, toSidebarMenuOpenMode, uses12HourClock };
8922
9055
 
8923
9056
  //# sourceMappingURL=zambon-dev-ui-library.mjs.map