@i-cell/ids-angular 0.2.19 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/datepicker/index.d.ts +1 -1
- package/dialog/index.d.ts +3 -1
- package/fesm2022/i-cell-ids-angular-breadcrumb.mjs +1 -1
- package/fesm2022/i-cell-ids-angular-breadcrumb.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-chip.mjs +1 -1
- package/fesm2022/i-cell-ids-angular-chip.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-datepicker.mjs +3 -3
- package/fesm2022/i-cell-ids-angular-datepicker.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-dialog.mjs +4 -2
- package/fesm2022/i-cell-ids-angular-dialog.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-forms.mjs +7 -8
- package/fesm2022/i-cell-ids-angular-forms.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-icon-button.mjs +3 -2
- package/fesm2022/i-cell-ids-angular-icon-button.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-notification.mjs +1 -1
- package/fesm2022/i-cell-ids-angular-notification.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-radio.mjs +19 -3
- package/fesm2022/i-cell-ids-angular-radio.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-segmented-control-toggle.mjs +8 -4
- package/fesm2022/i-cell-ids-angular-segmented-control-toggle.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-segmented-control.mjs +8 -4
- package/fesm2022/i-cell-ids-angular-segmented-control.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-select.mjs +8 -6
- package/fesm2022/i-cell-ids-angular-select.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-side-nav.mjs +1 -1
- package/fesm2022/i-cell-ids-angular-side-nav.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-side-sheet.mjs +2 -2
- package/fesm2022/i-cell-ids-angular-side-sheet.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-snackbar.mjs +1 -1
- package/fesm2022/i-cell-ids-angular-snackbar.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-table.mjs +50 -4
- package/fesm2022/i-cell-ids-angular-table.mjs.map +1 -1
- package/icon-button/index.d.ts +2 -1
- package/package.json +23 -23
- package/radio/index.d.ts +1 -0
- package/table/index.d.ts +21 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_PAGE_SIZE } from '@i-cell/ids-angular/paginator';
|
|
2
2
|
import { BehaviorSubject, Subject, map, merge, debounceTime, switchMap, Observable, catchError, of, tap, finalize, startWith } from 'rxjs';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { input, Directive, inject, TemplateRef, InjectionToken, Injectable, Optional, SkipSelf, ElementRef, computed, signal, Component, ChangeDetectorRef, viewChildren, contentChildren, output, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
|
4
|
+
import { input, Directive, inject, TemplateRef, InjectionToken, Injectable, Optional, SkipSelf, ElementRef, computed, signal, Component, ChangeDetectorRef, viewChildren, contentChildren, contentChild, output, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
|
5
5
|
import { isTypeDerivedFrom, isString, IdsSize, ComponentBaseWithDefaults, coerceBooleanAttribute } from '@i-cell/ids-angular/core';
|
|
6
6
|
import { NgComponentOutlet, NgTemplateOutlet, NgClass } from '@angular/common';
|
|
7
7
|
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
@@ -144,6 +144,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
144
144
|
}]
|
|
145
145
|
}] });
|
|
146
146
|
|
|
147
|
+
class IdsTableSortAscIconDirective {
|
|
148
|
+
constructor() {
|
|
149
|
+
this.templateRef = inject((TemplateRef));
|
|
150
|
+
}
|
|
151
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsTableSortAscIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
152
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: IdsTableSortAscIconDirective, isStandalone: true, selector: "ng-template[idsTableSortAscIcon]", ngImport: i0 }); }
|
|
153
|
+
}
|
|
154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsTableSortAscIconDirective, decorators: [{
|
|
155
|
+
type: Directive,
|
|
156
|
+
args: [{
|
|
157
|
+
selector: 'ng-template[idsTableSortAscIcon]',
|
|
158
|
+
standalone: true,
|
|
159
|
+
}]
|
|
160
|
+
}] });
|
|
161
|
+
class IdsTableSortDescIconDirective {
|
|
162
|
+
constructor() {
|
|
163
|
+
this.templateRef = inject((TemplateRef));
|
|
164
|
+
}
|
|
165
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsTableSortDescIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
166
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: IdsTableSortDescIconDirective, isStandalone: true, selector: "ng-template[idsTableSortDescIcon]", ngImport: i0 }); }
|
|
167
|
+
}
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsTableSortDescIconDirective, decorators: [{
|
|
169
|
+
type: Directive,
|
|
170
|
+
args: [{
|
|
171
|
+
selector: 'ng-template[idsTableSortDescIcon]',
|
|
172
|
+
standalone: true,
|
|
173
|
+
}]
|
|
174
|
+
}] });
|
|
175
|
+
class IdsTableSortNoneIconDirective {
|
|
176
|
+
constructor() {
|
|
177
|
+
this.templateRef = inject((TemplateRef));
|
|
178
|
+
}
|
|
179
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsTableSortNoneIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
180
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: IdsTableSortNoneIconDirective, isStandalone: true, selector: "ng-template[idsTableSortNoneIcon]", ngImport: i0 }); }
|
|
181
|
+
}
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsTableSortNoneIconDirective, decorators: [{
|
|
183
|
+
type: Directive,
|
|
184
|
+
args: [{
|
|
185
|
+
selector: 'ng-template[idsTableSortNoneIcon]',
|
|
186
|
+
standalone: true,
|
|
187
|
+
}]
|
|
188
|
+
}] });
|
|
189
|
+
|
|
147
190
|
const IdsTableAppearance = {
|
|
148
191
|
PLAIN: 'plain',
|
|
149
192
|
LINE_DIVISION: 'line-division',
|
|
@@ -346,6 +389,9 @@ class IdsTableComponent extends ComponentBaseWithDefaults {
|
|
|
346
389
|
this._selectorCheckboxes = viewChildren(IdsCheckboxComponent, ...(ngDevMode ? [{ debugName: "_selectorCheckboxes" }] : []));
|
|
347
390
|
this._cellContentRenderers = viewChildren((IdsCellContentComponent), ...(ngDevMode ? [{ debugName: "_cellContentRenderers" }] : []));
|
|
348
391
|
this._contentCellTemplates = contentChildren(IdsTableCellTemplateDirective, ...(ngDevMode ? [{ debugName: "_contentCellTemplates" }] : []));
|
|
392
|
+
this._sortAscIconTemplate = contentChild(IdsTableSortAscIconDirective, ...(ngDevMode ? [{ debugName: "_sortAscIconTemplate" }] : []));
|
|
393
|
+
this._sortDescIconTemplate = contentChild(IdsTableSortDescIconDirective, ...(ngDevMode ? [{ debugName: "_sortDescIconTemplate" }] : []));
|
|
394
|
+
this._sortNoneIconTemplate = contentChild(IdsTableSortNoneIconDirective, ...(ngDevMode ? [{ debugName: "_sortNoneIconTemplate" }] : []));
|
|
349
395
|
this.columnDefs = input.required(...(ngDevMode ? [{ debugName: "columnDefs" }] : []));
|
|
350
396
|
this.dataSource = input.required(...(ngDevMode ? [{ debugName: "dataSource" }] : []));
|
|
351
397
|
/** Flag to have sticky header. */
|
|
@@ -601,7 +647,7 @@ class IdsTableComponent extends ComponentBaseWithDefaults {
|
|
|
601
647
|
this.rowSelection.select(...data);
|
|
602
648
|
}
|
|
603
649
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
604
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: IdsTableComponent, isStandalone: true, selector: "ids-table", inputs: { columnDefs: { classPropertyName: "columnDefs", publicName: "columnDefs", isSignal: true, isRequired: true, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, fixedHeader: { classPropertyName: "fixedHeader", publicName: "fixedHeader", isSignal: true, isRequired: false, transformFunction: null }, enableSorting: { classPropertyName: "enableSorting", publicName: "enableSorting", isSignal: true, isRequired: false, transformFunction: null }, masterDetail: { classPropertyName: "masterDetail", publicName: "masterDetail", isSignal: true, isRequired: false, transformFunction: null }, detailTemplateName: { classPropertyName: "detailTemplateName", publicName: "detailTemplateName", isSignal: true, isRequired: false, transformFunction: null }, detailStickyColumns: { classPropertyName: "detailStickyColumns", publicName: "detailStickyColumns", isSignal: true, isRequired: false, transformFunction: null }, showDetailHeader: { classPropertyName: "showDetailHeader", publicName: "showDetailHeader", isSignal: true, isRequired: false, transformFunction: null }, hasDetailRow: { classPropertyName: "hasDetailRow", publicName: "hasDetailRow", isSignal: true, isRequired: false, transformFunction: null }, enableRowSelection: { classPropertyName: "enableRowSelection", publicName: "enableRowSelection", isSignal: true, isRequired: false, transformFunction: null }, clearSelectionOnChange: { classPropertyName: "clearSelectionOnChange", publicName: "clearSelectionOnChange", isSignal: true, isRequired: false, transformFunction: null }, isRowSelectable: { classPropertyName: "isRowSelectable", publicName: "isRowSelectable", isSignal: true, isRequired: false, transformFunction: null }, noRowsToShowOverlayBelow: { classPropertyName: "noRowsToShowOverlayBelow", publicName: "noRowsToShowOverlayBelow", isSignal: true, isRequired: false, transformFunction: null }, withBorder: { classPropertyName: "withBorder", publicName: "withBorder", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sortChange: "sortChange", cellClick: "cellClick", rowClick: "rowClick", rowKeydown: "rowKeydown", contentChanged: "contentChanged" }, providers: [{ provide: IDS_ICON_BUTTON_PARENT, useExisting: IdsTableComponent }], queries: [{ propertyName: "_contentCellTemplates", predicate: IdsTableCellTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "_viewCellTemplates", predicate: IdsTableCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "_rowDataHolders", predicate: (RowInfoHolderDirective), descendants: true, isSignal: true }, { propertyName: "_selectorCheckboxes", predicate: IdsCheckboxComponent, descendants: true, isSignal: true }, { propertyName: "_cellContentRenderers", predicate: (IdsCellContentComponent), descendants: true, isSignal: true }], exportAs: ["idsTable"], usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/prefer-self-closing-tags -->\n\n<!-- Empty table message template -->\n<ng-template #noRowsToShow>\n <div class=\"ids-table__no-rows-to-show\">\n <ng-content select=\"[idsNoRowsToShow]\">No rows to show</ng-content>\n </div>\n</ng-template>\n\n<!-- Default detail cell template (a table showing the non-visible columns) -->\n<ng-template #defaultDetail let-row let-cols=\"cols\" [idsCellTemplate]=\"_defaultMasterDetailTemplateName\">\n <ids-table appearance=\"zebra\" [dataSource]=\"[row]\" [columnDefs]=\"cols\"></ids-table>\n</ng-template>\n\n<!-- TODO: Loading spinner -->\n\n<div class=\"ids-table__horizontal-scroll\">\n <table\n cdk-table\n cdkDropListGroup\n multiTemplateDataRows\n [id]=\"id()\"\n [dataSource]=\"dataSource()\"\n (contentChanged)=\"_tableContentChanged()\"\n >\n <caption><ng-content select=\"[idsTableCaption]\"></ng-content></caption>\n\n <!-- Column and row definitions for row selection -->\n <ng-container cdkColumnDef=\"$selectBoxes\" sticky>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n role=\"cell\"\n class=\"ids-table__header-cell ids-table__header-cell--select-all-rows\"\n >\n @let isRowSelected = rowSelection.hasValue();\n @let isTableVariantPrimary = variant() === 'primary';\n <ids-checkbox\n [indeterminate]=\"isRowSelected && !_isAllSelected()\"\n [checked]=\"isRowSelected && _isAllSelected()\"\n [disabled]=\"_isSelectAllDisabled()\"\n [aria-label]=\"_intl.headerSelectorAriaLabel\"\n [variant]=\"isTableVariantPrimary && isRowSelected ? 'light' : 'surface'\"\n (change)=\"$event ? _masterToggle() : null\"\n >\n </ids-checkbox>\n </th>\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--row-select\"\n >\n <ids-checkbox\n class=\"ids-table__checkbox--row-selector\"\n [disabled]=\"_unselectableRows().has(row)\"\n [checked]=\"rowSelection.isSelected(row)\"\n [value]=\"row\"\n [aria-label]=\"_intl.rowSelectorAriaLabel\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? rowSelection.toggle(row) : null\"\n >\n </ids-checkbox>\n </td>\n </ng-container>\n\n <!-- Column and row definitions for the master-detail toggle feature -->\n <ng-container cdkColumnDef=\"$masterDetail\" stickyEnd>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n class=\"ids-table__header-cell ids-table__header-cell--master-detail-toggle\"\n [class.ids-table__header-cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @if (showDetailHeader()) {\n <span>{{ _intl.detailHeaderLabel }}</span>\n }\n </th>\n <td\n *cdkCellDef=\"let row; let idx = $index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--master-detail-toggle\"\n [class.ids-table__cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @let hasDetail = hasDetailRow()(idx, row);\n @let rowExpanded = _expandedRows.has(row);\n @if (hasDetail) {\n <button\n type=\"button\"\n idsIconButton\n class=\"ids-table__button--master-detail\"\n [attr.aria-expanded]=\"rowExpanded || false\"\n [attr.aria-label]=\"_intl.getDetailExpandButtonAriaLabel(row) || null\"\n (click)=\"_handleMasterDetailClick(row)\"\n >\n <ids-icon aria-hidden=\"true\" alt=\"\" [fontIcon]=\"rowExpanded ? 'chevron-up' : 'chevron-down'\" />\n </button>\n }\n </td>\n </ng-container>\n <!-- Column definition for the detail cells -->\n <ng-container cdkColumnDef=\"$expandedDetail\">\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell ids-table__detail-cell\" [attr.colspan]=\"_detailColSpan()\">\n <div class=\"ids-table__detail-cell--content-wrapper\" [@detailExpand]=\"_expandedRows.has(row) ? 'expanded' : 'collapsed'\">\n @let isDefaultTemplate = _detailTemplate() === _defaulDetailTemplate();\n @let context = isDefaultTemplate ? { $implicit: row, cols: _hiddenColumns() } : { $implicit: row };\n <ng-container *ngTemplateOutlet=\"_detailTemplate() ?? defaultDetail; context: context\"></ng-container>\n </div>\n </td>\n </ng-container>\n\n <!-- Column definitions for sticky empty cells -->\n <ng-container cdkColumnDef=\"$empty\" sticky>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n <ng-container cdkColumnDef=\"$emptyEnd\" stickyEnd>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n\n <!-- Column and row definitions for the actual data -->\n @for (col of columnDefs(); track col.id; let colIndex = $index; let isLast = $last ) {\n <ng-container\n [cdkColumnDef]=\"col.id\"\n [sticky]=\"col.sticky && !col.stickyEnd\"\n [stickyEnd]=\"col.stickyEnd && !col.sticky\"\n >\n @let colSortable = col.sortable && enableSorting();\n @let colNumeric = col.cellRenderer === 'numeric';\n @let orderName = col.orderName || col.field || col.id;\n @let sortDirection = colSortable && _sortState()?.sortBy === orderName ? _sortState()?.direction : null;\n @let nextSortDirection = _getNextSortDirectionFor(orderName);\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n class=\"ids-table__header-cell\"\n idsHeaderCellContent\n scope=\"col\"\n [class.ids-table__header-cell--sortable]=\"colSortable\"\n [class.ids-table__header-cell--numeric]=\"colNumeric\"\n [class]=\"col.columnClasses || ''\"\n [colDef]=\"col\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n [id]=\"id() + '-header-' + col.id\"\n >\n @if (colSortable) {\n <button\n type=\"button\"\n idsIconButton\n colEnd\n class=\"ids-table__header-cell--sort-button\"\n [attr.aria-label]=\"_intl.getSortButtonAriaLabel(col, nextSortDirection)\"\n (click)=\"_handleSortClick(orderName)\"\n >\n @switch (sortDirection) {\n @case ('asc') {\n <ids-icon [fontIcon]=\"'chevron-up'\"></ids-icon>\n }\n @case ('desc') {\n <ids-icon [fontIcon]=\"'chevron-down'\"></ids-icon>\n }\n @default {\n <ids-icon [fontIcon]=\"'adjustments-horizontal'\"></ids-icon>\n }\n }\n </button>\n }\n </th>\n\n @if (col.identifier) {\n <th\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n idsCellContent\n class=\"ids-table__cell ids-table__cell--identifier\"\n role=\"gridcell\"\n scope=\"row\"\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></th>\n } @else {\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell\"\n idsCellContent\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Header row render definition -->\n <tr *cdkHeaderRowDef=\"_actualColumns(); sticky: fixedHeader()\" cdk-header-row class=\"ids-table__header-row\"></tr>\n\n <!-- Row render definition -->\n <tr\n *cdkRowDef=\"let row; columns: _actualColumns(); let idx = dataIndex\"\n cdk-row\n class=\"ids-table__row\"\n [rowInfo]=\"{ rowData: row, index: idx }\"\n [ngClass]=\"(appearance() !== _appearanceZebra || idx % 2 === 0) ? 'ids-table__row--surface' : 'ids-table__row--secondary'\"\n (click)=\"_handleRowClick($event, row)\"\n (keydown)=\"_handleRowKeyDown($event, row)\"\n ></tr>\n\n <!-- Detail row render definition -->\n @if (masterDetail()) {\n <tr\n *cdkRowDef=\"let row; columns: _detailRowTemplates(); when: hasDetailRow()\"\n cdk-row\n class=\"ids-table__detail-row ids-table__row--surface\"\n [class.ids-table__detail-row--expanded]=\"_expandedRows.has(row) || _allRowsExpanded()\"\n ></tr>\n }\n\n <!-- Empty table message (inside the table) -->\n @if (!noRowsToShowOverlayBelow()) {\n <tr *cdkNoDataRow class=\"ids-table__row\">\n <td class=\"ids-table__cell\" [attr.colspan]=\"_actualColumns().length\">\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n </td>\n </tr>\n }\n </table>\n</div>\n<!-- Empty table message (outside the table) -->\n@if (noRowsToShowOverlayBelow() && _hasNoRows()) {\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n}\n", dependencies: [{ kind: "component", type: IdsTableComponent, selector: "ids-table", inputs: ["columnDefs", "dataSource", "fixedHeader", "enableSorting", "masterDetail", "detailTemplateName", "detailStickyColumns", "showDetailHeader", "hasDetailRow", "enableRowSelection", "clearSelectionOnChange", "isRowSelectable", "noRowsToShowOverlayBelow", "withBorder", "appearance", "size", "variant"], outputs: ["sortChange", "cellClick", "rowClick", "rowKeydown", "contentChanged"], exportAs: ["idsTable"] }, { kind: "component", type: IdsCellContentComponent, selector: "th[idsCellContent],td[idsCellContent],th[idsHeaderCellContent],td[idsHeaderCellContent]", inputs: ["externalCellTemplates"] }, { kind: "component", type: IdsCheckboxComponent, selector: "ids-checkbox", inputs: ["name", "required", "readonly", "size", "tabIndex", "value", "variant", "checked", "indeterminate", "aria-label", "aria-labelledby", "aria-describedby", "disabled"], outputs: ["disabledChange", "change", "indeterminateChange"] }, { kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }, { kind: "component", type: IdsIconButtonComponent, selector: "button[idsIconButton], a[idsIconButton]", inputs: ["appearance", "size", "variant", "disabled"] }, { kind: "directive", type: IdsTableCellTemplateDirective, selector: "[idsCellTemplate]", inputs: ["idsCellTemplate"] }, { kind: "directive", type: CdkCell, selector: "cdk-cell, td[cdk-cell]" }, { kind: "directive", type: CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["cdkColumnDef", "sticky", "stickyEnd"] }, { kind: "directive", type: CdkHeaderCell, selector: "cdk-header-cell, th[cdk-header-cell]" }, { kind: "directive", type: CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "component", type: CdkHeaderRow, selector: "cdk-header-row, tr[cdk-header-row]" }, { kind: "directive", type: CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { kind: "directive", type: CdkNoDataRow, selector: "ng-template[cdkNoDataRow]" }, { kind: "component", type: CdkRow, selector: "cdk-row, tr[cdk-row]" }, { kind: "directive", type: CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "component", type: CdkTable, selector: "cdk-table, table[cdk-table]", inputs: ["trackBy", "dataSource", "multiTemplateDataRows", "fixedLayout"], outputs: ["contentChanged"], exportAs: ["cdkTable"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RowInfoHolderDirective, selector: "[rowInfo]", inputs: ["rowInfo"] }], animations: [
|
|
650
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: IdsTableComponent, isStandalone: true, selector: "ids-table", inputs: { columnDefs: { classPropertyName: "columnDefs", publicName: "columnDefs", isSignal: true, isRequired: true, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, fixedHeader: { classPropertyName: "fixedHeader", publicName: "fixedHeader", isSignal: true, isRequired: false, transformFunction: null }, enableSorting: { classPropertyName: "enableSorting", publicName: "enableSorting", isSignal: true, isRequired: false, transformFunction: null }, masterDetail: { classPropertyName: "masterDetail", publicName: "masterDetail", isSignal: true, isRequired: false, transformFunction: null }, detailTemplateName: { classPropertyName: "detailTemplateName", publicName: "detailTemplateName", isSignal: true, isRequired: false, transformFunction: null }, detailStickyColumns: { classPropertyName: "detailStickyColumns", publicName: "detailStickyColumns", isSignal: true, isRequired: false, transformFunction: null }, showDetailHeader: { classPropertyName: "showDetailHeader", publicName: "showDetailHeader", isSignal: true, isRequired: false, transformFunction: null }, hasDetailRow: { classPropertyName: "hasDetailRow", publicName: "hasDetailRow", isSignal: true, isRequired: false, transformFunction: null }, enableRowSelection: { classPropertyName: "enableRowSelection", publicName: "enableRowSelection", isSignal: true, isRequired: false, transformFunction: null }, clearSelectionOnChange: { classPropertyName: "clearSelectionOnChange", publicName: "clearSelectionOnChange", isSignal: true, isRequired: false, transformFunction: null }, isRowSelectable: { classPropertyName: "isRowSelectable", publicName: "isRowSelectable", isSignal: true, isRequired: false, transformFunction: null }, noRowsToShowOverlayBelow: { classPropertyName: "noRowsToShowOverlayBelow", publicName: "noRowsToShowOverlayBelow", isSignal: true, isRequired: false, transformFunction: null }, withBorder: { classPropertyName: "withBorder", publicName: "withBorder", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sortChange: "sortChange", cellClick: "cellClick", rowClick: "rowClick", rowKeydown: "rowKeydown", contentChanged: "contentChanged" }, providers: [{ provide: IDS_ICON_BUTTON_PARENT, useExisting: IdsTableComponent }], queries: [{ propertyName: "_contentCellTemplates", predicate: IdsTableCellTemplateDirective, isSignal: true }, { propertyName: "_sortAscIconTemplate", first: true, predicate: IdsTableSortAscIconDirective, descendants: true, isSignal: true }, { propertyName: "_sortDescIconTemplate", first: true, predicate: IdsTableSortDescIconDirective, descendants: true, isSignal: true }, { propertyName: "_sortNoneIconTemplate", first: true, predicate: IdsTableSortNoneIconDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_viewCellTemplates", predicate: IdsTableCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "_rowDataHolders", predicate: (RowInfoHolderDirective), descendants: true, isSignal: true }, { propertyName: "_selectorCheckboxes", predicate: IdsCheckboxComponent, descendants: true, isSignal: true }, { propertyName: "_cellContentRenderers", predicate: (IdsCellContentComponent), descendants: true, isSignal: true }], exportAs: ["idsTable"], usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/prefer-self-closing-tags -->\n\n<!-- Empty table message template -->\n<ng-template #noRowsToShow>\n <div class=\"ids-table__no-rows-to-show\">\n <ng-content select=\"[idsNoRowsToShow]\">No rows to show</ng-content>\n </div>\n</ng-template>\n\n<!-- Default detail cell template (a table showing the non-visible columns) -->\n<ng-template #defaultDetail let-row let-cols=\"cols\" [idsCellTemplate]=\"_defaultMasterDetailTemplateName\">\n <ids-table appearance=\"zebra\" [dataSource]=\"[row]\" [columnDefs]=\"cols\"></ids-table>\n</ng-template>\n\n<ng-template #defaultSortAscIcon>\n <ids-icon [fontIcon]=\"'chevron-up'\"></ids-icon>\n</ng-template>\n\n<ng-template #defaultSortDescIcon>\n <ids-icon [fontIcon]=\"'chevron-down'\"></ids-icon>\n</ng-template>\n\n<ng-template #defaultSortNoneIcon>\n <ids-icon [fontIcon]=\"'adjustments-horizontal'\"></ids-icon>\n</ng-template>\n\n<!-- TODO: Loading spinner -->\n\n<div class=\"ids-table__horizontal-scroll\">\n <table\n cdk-table\n cdkDropListGroup\n multiTemplateDataRows\n [id]=\"id()\"\n [dataSource]=\"dataSource()\"\n (contentChanged)=\"_tableContentChanged()\"\n >\n <caption><ng-content select=\"[idsTableCaption]\"></ng-content></caption>\n\n <!-- Column and row definitions for row selection -->\n <ng-container cdkColumnDef=\"$selectBoxes\" sticky>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n role=\"cell\"\n class=\"ids-table__header-cell ids-table__header-cell--select-all-rows\"\n >\n @let isRowSelected = rowSelection.hasValue();\n @let isTableVariantPrimary = variant() === 'primary';\n <ids-checkbox\n [indeterminate]=\"isRowSelected && !_isAllSelected()\"\n [checked]=\"isRowSelected && _isAllSelected()\"\n [disabled]=\"_isSelectAllDisabled()\"\n [aria-label]=\"_intl.headerSelectorAriaLabel\"\n [variant]=\"isTableVariantPrimary && isRowSelected ? 'light' : 'surface'\"\n (change)=\"$event ? _masterToggle() : null\"\n >\n </ids-checkbox>\n </th>\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--row-select\"\n >\n <ids-checkbox\n class=\"ids-table__checkbox--row-selector\"\n [disabled]=\"_unselectableRows().has(row)\"\n [checked]=\"rowSelection.isSelected(row)\"\n [value]=\"row\"\n [aria-label]=\"_intl.rowSelectorAriaLabel\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? rowSelection.toggle(row) : null\"\n >\n </ids-checkbox>\n </td>\n </ng-container>\n\n <!-- Column and row definitions for the master-detail toggle feature -->\n <ng-container cdkColumnDef=\"$masterDetail\" stickyEnd>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n class=\"ids-table__header-cell ids-table__header-cell--master-detail-toggle\"\n [class.ids-table__header-cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @if (showDetailHeader()) {\n <span>{{ _intl.detailHeaderLabel }}</span>\n }\n </th>\n <td\n *cdkCellDef=\"let row; let idx = $index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--master-detail-toggle\"\n [class.ids-table__cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @let hasDetail = hasDetailRow()(idx, row);\n @let rowExpanded = _expandedRows.has(row);\n @if (hasDetail) {\n <button\n type=\"button\"\n idsIconButton\n class=\"ids-table__button--master-detail\"\n [attr.aria-expanded]=\"rowExpanded || false\"\n [attr.aria-label]=\"_intl.getDetailExpandButtonAriaLabel(row) || null\"\n (click)=\"_handleMasterDetailClick(row)\"\n >\n <ids-icon aria-hidden=\"true\" alt=\"\" [fontIcon]=\"rowExpanded ? 'chevron-up' : 'chevron-down'\" />\n </button>\n }\n </td>\n </ng-container>\n <!-- Column definition for the detail cells -->\n <ng-container cdkColumnDef=\"$expandedDetail\">\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell ids-table__detail-cell\" [attr.colspan]=\"_detailColSpan()\">\n <div class=\"ids-table__detail-cell--content-wrapper\" [@detailExpand]=\"_expandedRows.has(row) ? 'expanded' : 'collapsed'\">\n @let isDefaultTemplate = _detailTemplate() === _defaulDetailTemplate();\n @let context = isDefaultTemplate ? { $implicit: row, cols: _hiddenColumns() } : { $implicit: row };\n <ng-container *ngTemplateOutlet=\"_detailTemplate() ?? defaultDetail; context: context\"></ng-container>\n </div>\n </td>\n </ng-container>\n\n <!-- Column definitions for sticky empty cells -->\n <ng-container cdkColumnDef=\"$empty\" sticky>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n <ng-container cdkColumnDef=\"$emptyEnd\" stickyEnd>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n\n <!-- Column and row definitions for the actual data -->\n @for (col of columnDefs(); track col.id; let colIndex = $index; let isLast = $last ) {\n <ng-container\n [cdkColumnDef]=\"col.id\"\n [sticky]=\"col.sticky && !col.stickyEnd\"\n [stickyEnd]=\"col.stickyEnd && !col.sticky\"\n >\n @let colSortable = col.sortable && enableSorting();\n @let colNumeric = col.cellRenderer === 'numeric';\n @let orderName = col.orderName || col.field || col.id;\n @let sortDirection = colSortable && _sortState()?.sortBy === orderName ? _sortState()?.direction : null;\n @let nextSortDirection = _getNextSortDirectionFor(orderName);\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n class=\"ids-table__header-cell\"\n idsHeaderCellContent\n scope=\"col\"\n [class.ids-table__header-cell--sortable]=\"colSortable\"\n [class.ids-table__header-cell--numeric]=\"colNumeric\"\n [class]=\"col.columnClasses || ''\"\n [colDef]=\"col\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n [id]=\"id() + '-header-' + col.id\"\n >\n @if (colSortable) {\n <button\n type=\"button\"\n idsIconButton\n allowCustomContent\n colEnd\n class=\"ids-table__header-cell--sort-button\"\n [attr.aria-label]=\"_intl.getSortButtonAriaLabel(col, nextSortDirection)\"\n (click)=\"_handleSortClick(orderName)\"\n >\n @switch (sortDirection) {\n @case ('asc') {\n <ng-container *ngTemplateOutlet=\"_sortAscIconTemplate()?.templateRef ?? defaultSortAscIcon\"></ng-container> }\n @case ('desc') {\n <ng-container *ngTemplateOutlet=\"_sortDescIconTemplate()?.templateRef ?? defaultSortDescIcon\"></ng-container> }\n @default {\n <ng-container *ngTemplateOutlet=\"_sortNoneIconTemplate()?.templateRef ?? defaultSortNoneIcon\"></ng-container> }\n }\n </button>\n }\n </th>\n\n @if (col.identifier) {\n <th\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n idsCellContent\n class=\"ids-table__cell ids-table__cell--identifier\"\n role=\"gridcell\"\n scope=\"row\"\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></th>\n } @else {\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell\"\n idsCellContent\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Header row render definition -->\n <tr *cdkHeaderRowDef=\"_actualColumns(); sticky: fixedHeader()\" cdk-header-row class=\"ids-table__header-row\"></tr>\n\n <!-- Row render definition -->\n <tr\n *cdkRowDef=\"let row; columns: _actualColumns(); let idx = dataIndex\"\n cdk-row\n class=\"ids-table__row\"\n [rowInfo]=\"{ rowData: row, index: idx }\"\n [ngClass]=\"(appearance() !== _appearanceZebra || idx % 2 === 0) ? 'ids-table__row--surface' : 'ids-table__row--secondary'\"\n (click)=\"_handleRowClick($event, row)\"\n (keydown)=\"_handleRowKeyDown($event, row)\"\n ></tr>\n\n <!-- Detail row render definition -->\n @if (masterDetail()) {\n <tr\n *cdkRowDef=\"let row; columns: _detailRowTemplates(); when: hasDetailRow()\"\n cdk-row\n class=\"ids-table__detail-row ids-table__row--surface\"\n [class.ids-table__detail-row--expanded]=\"_expandedRows.has(row) || _allRowsExpanded()\"\n ></tr>\n }\n\n <!-- Empty table message (inside the table) -->\n @if (!noRowsToShowOverlayBelow()) {\n <tr *cdkNoDataRow class=\"ids-table__row\">\n <td class=\"ids-table__cell\" [attr.colspan]=\"_actualColumns().length\">\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n </td>\n </tr>\n }\n </table>\n</div>\n<!-- Empty table message (outside the table) -->\n@if (noRowsToShowOverlayBelow() && _hasNoRows()) {\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n}\n", dependencies: [{ kind: "component", type: IdsTableComponent, selector: "ids-table", inputs: ["columnDefs", "dataSource", "fixedHeader", "enableSorting", "masterDetail", "detailTemplateName", "detailStickyColumns", "showDetailHeader", "hasDetailRow", "enableRowSelection", "clearSelectionOnChange", "isRowSelectable", "noRowsToShowOverlayBelow", "withBorder", "appearance", "size", "variant"], outputs: ["sortChange", "cellClick", "rowClick", "rowKeydown", "contentChanged"], exportAs: ["idsTable"] }, { kind: "component", type: IdsCellContentComponent, selector: "th[idsCellContent],td[idsCellContent],th[idsHeaderCellContent],td[idsHeaderCellContent]", inputs: ["externalCellTemplates"] }, { kind: "component", type: IdsCheckboxComponent, selector: "ids-checkbox", inputs: ["name", "required", "readonly", "size", "tabIndex", "value", "variant", "checked", "indeterminate", "aria-label", "aria-labelledby", "aria-describedby", "disabled"], outputs: ["disabledChange", "change", "indeterminateChange"] }, { kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }, { kind: "component", type: IdsIconButtonComponent, selector: "button[idsIconButton], a[idsIconButton]", inputs: ["appearance", "size", "variant", "disabled", "allowCustomContent"] }, { kind: "directive", type: IdsTableCellTemplateDirective, selector: "[idsCellTemplate]", inputs: ["idsCellTemplate"] }, { kind: "directive", type: CdkCell, selector: "cdk-cell, td[cdk-cell]" }, { kind: "directive", type: CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["cdkColumnDef", "sticky", "stickyEnd"] }, { kind: "directive", type: CdkHeaderCell, selector: "cdk-header-cell, th[cdk-header-cell]" }, { kind: "directive", type: CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "component", type: CdkHeaderRow, selector: "cdk-header-row, tr[cdk-header-row]" }, { kind: "directive", type: CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { kind: "directive", type: CdkNoDataRow, selector: "ng-template[cdkNoDataRow]" }, { kind: "component", type: CdkRow, selector: "cdk-row, tr[cdk-row]" }, { kind: "directive", type: CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "component", type: CdkTable, selector: "cdk-table, table[cdk-table]", inputs: ["trackBy", "dataSource", "multiTemplateDataRows", "fixedLayout"], outputs: ["contentChanged"], exportAs: ["cdkTable"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RowInfoHolderDirective, selector: "[rowInfo]", inputs: ["rowInfo"] }], animations: [
|
|
605
651
|
trigger('detailExpand', [
|
|
606
652
|
state('collapsed', style({ height: '0px', minHeight: '0', visibility: 'hidden' })),
|
|
607
653
|
state('expanded', style({ height: '*', visibility: 'visible' })),
|
|
@@ -637,12 +683,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
637
683
|
state('expanded', style({ height: '*', visibility: 'visible' })),
|
|
638
684
|
transition('expanded <=> collapsed', animate('200ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
639
685
|
]),
|
|
640
|
-
], providers: [{ provide: IDS_ICON_BUTTON_PARENT, useExisting: IdsTableComponent }], exportAs: 'idsTable', template: "<!-- eslint-disable @angular-eslint/template/prefer-self-closing-tags -->\n\n<!-- Empty table message template -->\n<ng-template #noRowsToShow>\n <div class=\"ids-table__no-rows-to-show\">\n <ng-content select=\"[idsNoRowsToShow]\">No rows to show</ng-content>\n </div>\n</ng-template>\n\n<!-- Default detail cell template (a table showing the non-visible columns) -->\n<ng-template #defaultDetail let-row let-cols=\"cols\" [idsCellTemplate]=\"_defaultMasterDetailTemplateName\">\n <ids-table appearance=\"zebra\" [dataSource]=\"[row]\" [columnDefs]=\"cols\"></ids-table>\n</ng-template>\n\n<!-- TODO: Loading spinner -->\n\n<div class=\"ids-table__horizontal-scroll\">\n <table\n cdk-table\n cdkDropListGroup\n multiTemplateDataRows\n [id]=\"id()\"\n [dataSource]=\"dataSource()\"\n (contentChanged)=\"_tableContentChanged()\"\n >\n <caption><ng-content select=\"[idsTableCaption]\"></ng-content></caption>\n\n <!-- Column and row definitions for row selection -->\n <ng-container cdkColumnDef=\"$selectBoxes\" sticky>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n role=\"cell\"\n class=\"ids-table__header-cell ids-table__header-cell--select-all-rows\"\n >\n @let isRowSelected = rowSelection.hasValue();\n @let isTableVariantPrimary = variant() === 'primary';\n <ids-checkbox\n [indeterminate]=\"isRowSelected && !_isAllSelected()\"\n [checked]=\"isRowSelected && _isAllSelected()\"\n [disabled]=\"_isSelectAllDisabled()\"\n [aria-label]=\"_intl.headerSelectorAriaLabel\"\n [variant]=\"isTableVariantPrimary && isRowSelected ? 'light' : 'surface'\"\n (change)=\"$event ? _masterToggle() : null\"\n >\n </ids-checkbox>\n </th>\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--row-select\"\n >\n <ids-checkbox\n class=\"ids-table__checkbox--row-selector\"\n [disabled]=\"_unselectableRows().has(row)\"\n [checked]=\"rowSelection.isSelected(row)\"\n [value]=\"row\"\n [aria-label]=\"_intl.rowSelectorAriaLabel\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? rowSelection.toggle(row) : null\"\n >\n </ids-checkbox>\n </td>\n </ng-container>\n\n <!-- Column and row definitions for the master-detail toggle feature -->\n <ng-container cdkColumnDef=\"$masterDetail\" stickyEnd>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n class=\"ids-table__header-cell ids-table__header-cell--master-detail-toggle\"\n [class.ids-table__header-cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @if (showDetailHeader()) {\n <span>{{ _intl.detailHeaderLabel }}</span>\n }\n </th>\n <td\n *cdkCellDef=\"let row; let idx = $index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--master-detail-toggle\"\n [class.ids-table__cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @let hasDetail = hasDetailRow()(idx, row);\n @let rowExpanded = _expandedRows.has(row);\n @if (hasDetail) {\n <button\n type=\"button\"\n idsIconButton\n class=\"ids-table__button--master-detail\"\n [attr.aria-expanded]=\"rowExpanded || false\"\n [attr.aria-label]=\"_intl.getDetailExpandButtonAriaLabel(row) || null\"\n (click)=\"_handleMasterDetailClick(row)\"\n >\n <ids-icon aria-hidden=\"true\" alt=\"\" [fontIcon]=\"rowExpanded ? 'chevron-up' : 'chevron-down'\" />\n </button>\n }\n </td>\n </ng-container>\n <!-- Column definition for the detail cells -->\n <ng-container cdkColumnDef=\"$expandedDetail\">\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell ids-table__detail-cell\" [attr.colspan]=\"_detailColSpan()\">\n <div class=\"ids-table__detail-cell--content-wrapper\" [@detailExpand]=\"_expandedRows.has(row) ? 'expanded' : 'collapsed'\">\n @let isDefaultTemplate = _detailTemplate() === _defaulDetailTemplate();\n @let context = isDefaultTemplate ? { $implicit: row, cols: _hiddenColumns() } : { $implicit: row };\n <ng-container *ngTemplateOutlet=\"_detailTemplate() ?? defaultDetail; context: context\"></ng-container>\n </div>\n </td>\n </ng-container>\n\n <!-- Column definitions for sticky empty cells -->\n <ng-container cdkColumnDef=\"$empty\" sticky>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n <ng-container cdkColumnDef=\"$emptyEnd\" stickyEnd>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n\n <!-- Column and row definitions for the actual data -->\n @for (col of columnDefs(); track col.id; let colIndex = $index; let isLast = $last ) {\n <ng-container\n [cdkColumnDef]=\"col.id\"\n [sticky]=\"col.sticky && !col.stickyEnd\"\n [stickyEnd]=\"col.stickyEnd && !col.sticky\"\n >\n @let colSortable = col.sortable && enableSorting();\n @let colNumeric = col.cellRenderer === 'numeric';\n @let orderName = col.orderName || col.field || col.id;\n @let sortDirection = colSortable && _sortState()?.sortBy === orderName ? _sortState()?.direction : null;\n @let nextSortDirection = _getNextSortDirectionFor(orderName);\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n class=\"ids-table__header-cell\"\n idsHeaderCellContent\n scope=\"col\"\n [class.ids-table__header-cell--sortable]=\"colSortable\"\n [class.ids-table__header-cell--numeric]=\"colNumeric\"\n [class]=\"col.columnClasses || ''\"\n [colDef]=\"col\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n [id]=\"id() + '-header-' + col.id\"\n >\n @if (colSortable) {\n <button\n type=\"button\"\n idsIconButton\n colEnd\n class=\"ids-table__header-cell--sort-button\"\n [attr.aria-label]=\"_intl.getSortButtonAriaLabel(col, nextSortDirection)\"\n (click)=\"_handleSortClick(orderName)\"\n >\n @switch (sortDirection) {\n @case ('asc') {\n <ids-icon [fontIcon]=\"'chevron-up'\"></ids-icon>\n }\n @case ('desc') {\n <ids-icon [fontIcon]=\"'chevron-down'\"></ids-icon>\n }\n @default {\n <ids-icon [fontIcon]=\"'adjustments-horizontal'\"></ids-icon>\n }\n }\n </button>\n }\n </th>\n\n @if (col.identifier) {\n <th\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n idsCellContent\n class=\"ids-table__cell ids-table__cell--identifier\"\n role=\"gridcell\"\n scope=\"row\"\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></th>\n } @else {\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell\"\n idsCellContent\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Header row render definition -->\n <tr *cdkHeaderRowDef=\"_actualColumns(); sticky: fixedHeader()\" cdk-header-row class=\"ids-table__header-row\"></tr>\n\n <!-- Row render definition -->\n <tr\n *cdkRowDef=\"let row; columns: _actualColumns(); let idx = dataIndex\"\n cdk-row\n class=\"ids-table__row\"\n [rowInfo]=\"{ rowData: row, index: idx }\"\n [ngClass]=\"(appearance() !== _appearanceZebra || idx % 2 === 0) ? 'ids-table__row--surface' : 'ids-table__row--secondary'\"\n (click)=\"_handleRowClick($event, row)\"\n (keydown)=\"_handleRowKeyDown($event, row)\"\n ></tr>\n\n <!-- Detail row render definition -->\n @if (masterDetail()) {\n <tr\n *cdkRowDef=\"let row; columns: _detailRowTemplates(); when: hasDetailRow()\"\n cdk-row\n class=\"ids-table__detail-row ids-table__row--surface\"\n [class.ids-table__detail-row--expanded]=\"_expandedRows.has(row) || _allRowsExpanded()\"\n ></tr>\n }\n\n <!-- Empty table message (inside the table) -->\n @if (!noRowsToShowOverlayBelow()) {\n <tr *cdkNoDataRow class=\"ids-table__row\">\n <td class=\"ids-table__cell\" [attr.colspan]=\"_actualColumns().length\">\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n </td>\n </tr>\n }\n </table>\n</div>\n<!-- Empty table message (outside the table) -->\n@if (noRowsToShowOverlayBelow() && _hasNoRows()) {\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n}\n" }]
|
|
686
|
+
], providers: [{ provide: IDS_ICON_BUTTON_PARENT, useExisting: IdsTableComponent }], exportAs: 'idsTable', template: "<!-- eslint-disable @angular-eslint/template/prefer-self-closing-tags -->\n\n<!-- Empty table message template -->\n<ng-template #noRowsToShow>\n <div class=\"ids-table__no-rows-to-show\">\n <ng-content select=\"[idsNoRowsToShow]\">No rows to show</ng-content>\n </div>\n</ng-template>\n\n<!-- Default detail cell template (a table showing the non-visible columns) -->\n<ng-template #defaultDetail let-row let-cols=\"cols\" [idsCellTemplate]=\"_defaultMasterDetailTemplateName\">\n <ids-table appearance=\"zebra\" [dataSource]=\"[row]\" [columnDefs]=\"cols\"></ids-table>\n</ng-template>\n\n<ng-template #defaultSortAscIcon>\n <ids-icon [fontIcon]=\"'chevron-up'\"></ids-icon>\n</ng-template>\n\n<ng-template #defaultSortDescIcon>\n <ids-icon [fontIcon]=\"'chevron-down'\"></ids-icon>\n</ng-template>\n\n<ng-template #defaultSortNoneIcon>\n <ids-icon [fontIcon]=\"'adjustments-horizontal'\"></ids-icon>\n</ng-template>\n\n<!-- TODO: Loading spinner -->\n\n<div class=\"ids-table__horizontal-scroll\">\n <table\n cdk-table\n cdkDropListGroup\n multiTemplateDataRows\n [id]=\"id()\"\n [dataSource]=\"dataSource()\"\n (contentChanged)=\"_tableContentChanged()\"\n >\n <caption><ng-content select=\"[idsTableCaption]\"></ng-content></caption>\n\n <!-- Column and row definitions for row selection -->\n <ng-container cdkColumnDef=\"$selectBoxes\" sticky>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n role=\"cell\"\n class=\"ids-table__header-cell ids-table__header-cell--select-all-rows\"\n >\n @let isRowSelected = rowSelection.hasValue();\n @let isTableVariantPrimary = variant() === 'primary';\n <ids-checkbox\n [indeterminate]=\"isRowSelected && !_isAllSelected()\"\n [checked]=\"isRowSelected && _isAllSelected()\"\n [disabled]=\"_isSelectAllDisabled()\"\n [aria-label]=\"_intl.headerSelectorAriaLabel\"\n [variant]=\"isTableVariantPrimary && isRowSelected ? 'light' : 'surface'\"\n (change)=\"$event ? _masterToggle() : null\"\n >\n </ids-checkbox>\n </th>\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--row-select\"\n >\n <ids-checkbox\n class=\"ids-table__checkbox--row-selector\"\n [disabled]=\"_unselectableRows().has(row)\"\n [checked]=\"rowSelection.isSelected(row)\"\n [value]=\"row\"\n [aria-label]=\"_intl.rowSelectorAriaLabel\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? rowSelection.toggle(row) : null\"\n >\n </ids-checkbox>\n </td>\n </ng-container>\n\n <!-- Column and row definitions for the master-detail toggle feature -->\n <ng-container cdkColumnDef=\"$masterDetail\" stickyEnd>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n class=\"ids-table__header-cell ids-table__header-cell--master-detail-toggle\"\n [class.ids-table__header-cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @if (showDetailHeader()) {\n <span>{{ _intl.detailHeaderLabel }}</span>\n }\n </th>\n <td\n *cdkCellDef=\"let row; let idx = $index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--master-detail-toggle\"\n [class.ids-table__cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @let hasDetail = hasDetailRow()(idx, row);\n @let rowExpanded = _expandedRows.has(row);\n @if (hasDetail) {\n <button\n type=\"button\"\n idsIconButton\n class=\"ids-table__button--master-detail\"\n [attr.aria-expanded]=\"rowExpanded || false\"\n [attr.aria-label]=\"_intl.getDetailExpandButtonAriaLabel(row) || null\"\n (click)=\"_handleMasterDetailClick(row)\"\n >\n <ids-icon aria-hidden=\"true\" alt=\"\" [fontIcon]=\"rowExpanded ? 'chevron-up' : 'chevron-down'\" />\n </button>\n }\n </td>\n </ng-container>\n <!-- Column definition for the detail cells -->\n <ng-container cdkColumnDef=\"$expandedDetail\">\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell ids-table__detail-cell\" [attr.colspan]=\"_detailColSpan()\">\n <div class=\"ids-table__detail-cell--content-wrapper\" [@detailExpand]=\"_expandedRows.has(row) ? 'expanded' : 'collapsed'\">\n @let isDefaultTemplate = _detailTemplate() === _defaulDetailTemplate();\n @let context = isDefaultTemplate ? { $implicit: row, cols: _hiddenColumns() } : { $implicit: row };\n <ng-container *ngTemplateOutlet=\"_detailTemplate() ?? defaultDetail; context: context\"></ng-container>\n </div>\n </td>\n </ng-container>\n\n <!-- Column definitions for sticky empty cells -->\n <ng-container cdkColumnDef=\"$empty\" sticky>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n <ng-container cdkColumnDef=\"$emptyEnd\" stickyEnd>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n\n <!-- Column and row definitions for the actual data -->\n @for (col of columnDefs(); track col.id; let colIndex = $index; let isLast = $last ) {\n <ng-container\n [cdkColumnDef]=\"col.id\"\n [sticky]=\"col.sticky && !col.stickyEnd\"\n [stickyEnd]=\"col.stickyEnd && !col.sticky\"\n >\n @let colSortable = col.sortable && enableSorting();\n @let colNumeric = col.cellRenderer === 'numeric';\n @let orderName = col.orderName || col.field || col.id;\n @let sortDirection = colSortable && _sortState()?.sortBy === orderName ? _sortState()?.direction : null;\n @let nextSortDirection = _getNextSortDirectionFor(orderName);\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n class=\"ids-table__header-cell\"\n idsHeaderCellContent\n scope=\"col\"\n [class.ids-table__header-cell--sortable]=\"colSortable\"\n [class.ids-table__header-cell--numeric]=\"colNumeric\"\n [class]=\"col.columnClasses || ''\"\n [colDef]=\"col\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n [id]=\"id() + '-header-' + col.id\"\n >\n @if (colSortable) {\n <button\n type=\"button\"\n idsIconButton\n allowCustomContent\n colEnd\n class=\"ids-table__header-cell--sort-button\"\n [attr.aria-label]=\"_intl.getSortButtonAriaLabel(col, nextSortDirection)\"\n (click)=\"_handleSortClick(orderName)\"\n >\n @switch (sortDirection) {\n @case ('asc') {\n <ng-container *ngTemplateOutlet=\"_sortAscIconTemplate()?.templateRef ?? defaultSortAscIcon\"></ng-container> }\n @case ('desc') {\n <ng-container *ngTemplateOutlet=\"_sortDescIconTemplate()?.templateRef ?? defaultSortDescIcon\"></ng-container> }\n @default {\n <ng-container *ngTemplateOutlet=\"_sortNoneIconTemplate()?.templateRef ?? defaultSortNoneIcon\"></ng-container> }\n }\n </button>\n }\n </th>\n\n @if (col.identifier) {\n <th\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n idsCellContent\n class=\"ids-table__cell ids-table__cell--identifier\"\n role=\"gridcell\"\n scope=\"row\"\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></th>\n } @else {\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell\"\n idsCellContent\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Header row render definition -->\n <tr *cdkHeaderRowDef=\"_actualColumns(); sticky: fixedHeader()\" cdk-header-row class=\"ids-table__header-row\"></tr>\n\n <!-- Row render definition -->\n <tr\n *cdkRowDef=\"let row; columns: _actualColumns(); let idx = dataIndex\"\n cdk-row\n class=\"ids-table__row\"\n [rowInfo]=\"{ rowData: row, index: idx }\"\n [ngClass]=\"(appearance() !== _appearanceZebra || idx % 2 === 0) ? 'ids-table__row--surface' : 'ids-table__row--secondary'\"\n (click)=\"_handleRowClick($event, row)\"\n (keydown)=\"_handleRowKeyDown($event, row)\"\n ></tr>\n\n <!-- Detail row render definition -->\n @if (masterDetail()) {\n <tr\n *cdkRowDef=\"let row; columns: _detailRowTemplates(); when: hasDetailRow()\"\n cdk-row\n class=\"ids-table__detail-row ids-table__row--surface\"\n [class.ids-table__detail-row--expanded]=\"_expandedRows.has(row) || _allRowsExpanded()\"\n ></tr>\n }\n\n <!-- Empty table message (inside the table) -->\n @if (!noRowsToShowOverlayBelow()) {\n <tr *cdkNoDataRow class=\"ids-table__row\">\n <td class=\"ids-table__cell\" [attr.colspan]=\"_actualColumns().length\">\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n </td>\n </tr>\n }\n </table>\n</div>\n<!-- Empty table message (outside the table) -->\n@if (noRowsToShowOverlayBelow() && _hasNoRows()) {\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n}\n" }]
|
|
641
687
|
}] });
|
|
642
688
|
|
|
643
689
|
/**
|
|
644
690
|
* Generated bundle index. Do not edit.
|
|
645
691
|
*/
|
|
646
692
|
|
|
647
|
-
export { DEFAULT_DATA_LOAD_DEBOUNCE_TIME, DEFAULT_MASTER_DETAIL_TEMPLATE_NAME, IDS_TABLE_DEFAULT_CONFIG, IDS_TABLE_DEFAULT_CONFIG_FACTORY, IDS_TABLE_INTL_PROVIDER, IDS_TABLE_INTL_PROVIDER_FACTORY, IdsTableAppearance, IdsTableCellRenderer, IdsTableCellTemplateDirective, IdsTableComponent, IdsTableIntl, IdsTableSortDirection, IdsTableSortInfo, IdsTableVariant, ServerSideDataSource };
|
|
693
|
+
export { DEFAULT_DATA_LOAD_DEBOUNCE_TIME, DEFAULT_MASTER_DETAIL_TEMPLATE_NAME, IDS_TABLE_DEFAULT_CONFIG, IDS_TABLE_DEFAULT_CONFIG_FACTORY, IDS_TABLE_INTL_PROVIDER, IDS_TABLE_INTL_PROVIDER_FACTORY, IdsTableAppearance, IdsTableCellRenderer, IdsTableCellTemplateDirective, IdsTableComponent, IdsTableIntl, IdsTableSortAscIconDirective, IdsTableSortDescIconDirective, IdsTableSortDirection, IdsTableSortInfo, IdsTableSortNoneIconDirective, IdsTableVariant, ServerSideDataSource };
|
|
648
694
|
//# sourceMappingURL=i-cell-ids-angular-table.mjs.map
|