* @class * * ### Overview * * The `ui5-table-group-row` component represents a group row in the `ui5-table`. * @constructor * @since 2.0.0 * @implements {ITableRow} * @extends UI5Element * @public * @slot {Node[]} default - Defines the text of the component. * * **Note:** Although this s
| 36 | * @deprecated Deprecated as of version 2.12.0, use `@ui5/webcomponents/dist/Table.js` instead. |
| 37 | */ |
| 38 | @customElement({ |
| 39 | tag: "ui5-table-group-row", |
| 40 | styles: tableGroupRowStyles, |
| 41 | renderer: jsxRenderer, |
| 42 | template: TableGroupRowTemplate, |
| 43 | }) |
| 44 | @event("_focused", { |
| 45 | bubbles: true, |
| 46 | }) |
| 47 | class TableGroupRow extends UI5Element implements ITableRow { |
| 48 | eventDetails!: { |
| 49 | _focused: FocusEvent, |
| 50 | } |
| 51 | /** |
| 52 | * Defines the mode of the row |
| 53 | * @default "None" |
| 54 | * @private |
| 55 | */ |
| 56 | @property() |
| 57 | mode: `${TableMode}` = "None"; |
| 58 | |
| 59 | @property({ type: Array, noAttribute: true }) |
| 60 | _columnsInfo?: Array<TableColumnInfo>; |
| 61 | |
| 62 | @property() |
| 63 | forcedTabIndex?: string; |
| 64 | |
| 65 | @property({ type: Boolean }) |
| 66 | forcedBusy = false; |
| 67 | |
| 68 | @property() |
| 69 | forcedAriaPosition?: string; |
| 70 | |
| 71 | // Properties, set and handled by the Table |
| 72 | selected = false; |
| 73 | tabbableElements: Array<HTMLElement> = []; |
| 74 | _columnsInfoString = ""; |
| 75 | |
| 76 | @i18n("@ui5/webcomponents") |
| 77 | static i18nBundle: I18nBundle; |
| 78 | |
| 79 | _colSpan?: number; |
| 80 | |
| 81 | get colSpan() { |
| 82 | return this._colSpan; |
| 83 | } |
| 84 | |
| 85 | get ariaLabelText() { |
| 86 | return `${TableGroupRow.i18nBundle.getText(TABLE_GROUP_ROW_ARIA_LABEL)} ${this.textContent}. ${this.forcedAriaPosition}`; |
| 87 | } |
| 88 | |
| 89 | visibleColCount(): number { |
| 90 | let count = this._columnsInfo?.reduce((acc, column) => { |
| 91 | return column.visible ? ++acc : acc; |
| 92 | }, 0) || 0; |
| 93 | |
| 94 | if (this.mode === TableMode.MultiSelect) { |
| 95 | count++; |
nothing calls this directly
no test coverage detected