carbon-components-angular 3.16.3 → 3.17.3
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/docs/documentation/classes/DataGridInteractionModel.html +1462 -0
- package/docs/documentation/classes/NumberChange.html +8 -7
- package/docs/documentation/classes/TableAdapter.html +852 -0
- package/docs/documentation/classes/TableCellAdapter.html +445 -0
- package/docs/documentation/classes/TableDomAdapter.html +968 -0
- package/docs/documentation/classes/TableHeaderItem.html +125 -64
- package/docs/documentation/classes/TableItem.html +5 -18
- package/docs/documentation/classes/TableModel.html +445 -180
- package/docs/documentation/classes/TableRowAdapter.html +445 -0
- package/docs/documentation/components/Accordion.html +2 -2
- package/docs/documentation/components/AccordionItem.html +2 -2
- package/docs/documentation/components/AlertModal.html +2 -2
- package/docs/documentation/components/Breadcrumb.html +2 -2
- package/docs/documentation/components/BreadcrumbItemComponent.html +2 -2
- package/docs/documentation/components/Checkbox.html +2 -2
- package/docs/documentation/components/ClickableTile.html +2 -2
- package/docs/documentation/components/CodeSnippet.html +2 -2
- package/docs/documentation/components/ComboBox.html +2 -2
- package/docs/documentation/components/ContentSwitcher.html +2 -2
- package/docs/documentation/components/DatePicker.html +2 -2
- package/docs/documentation/components/DatePickerInput.html +2 -2
- package/docs/documentation/components/Dialog.html +2 -2
- package/docs/documentation/components/DialogPlaceholder.html +2 -2
- package/docs/documentation/components/Documentation.html +2 -2
- package/docs/documentation/components/Dropdown.html +12 -7
- package/docs/documentation/components/DropdownList.html +2 -2
- package/docs/documentation/components/ExpandableTile.html +2 -2
- package/docs/documentation/components/File.html +51 -8
- package/docs/documentation/components/FileUploader.html +41 -29
- package/docs/documentation/components/Hamburger.html +2 -2
- package/docs/documentation/components/Header.html +430 -13
- package/docs/documentation/components/HeaderAction.html +8 -10
- package/docs/documentation/components/HeaderGlobal.html +2 -2
- package/docs/documentation/components/HeaderItem.html +2 -2
- package/docs/documentation/components/HeaderMenu.html +2 -2
- package/docs/documentation/components/HeaderNavigation.html +2 -2
- package/docs/documentation/components/InlineLoading.html +2 -2
- package/docs/documentation/components/Label.html +2 -2
- package/docs/documentation/components/ListColumn.html +2 -2
- package/docs/documentation/components/ListHeader.html +2 -2
- package/docs/documentation/components/ListRow.html +2 -2
- package/docs/documentation/components/Loading.html +2 -2
- package/docs/documentation/components/Modal.html +2 -2
- package/docs/documentation/components/ModalFooter.html +2 -2
- package/docs/documentation/components/ModalHeader.html +2 -2
- package/docs/documentation/components/ModalPlaceholder.html +2 -2
- package/docs/documentation/components/Notification.html +39 -7
- package/docs/documentation/components/{Number.html → NumberComponent.html} +14 -13
- package/docs/documentation/components/OverflowMenu.html +2 -2
- package/docs/documentation/components/OverflowMenuOption.html +2 -2
- package/docs/documentation/components/OverflowMenuPane.html +2 -2
- package/docs/documentation/components/Overlay.html +2 -2
- package/docs/documentation/components/Pagination.html +2 -2
- package/docs/documentation/components/Panel.html +2 -2
- package/docs/documentation/components/Placeholder.html +2 -2
- package/docs/documentation/components/ProductSwitcher.html +2 -2
- package/docs/documentation/components/ProgressIndicator.html +2 -2
- package/docs/documentation/components/Radio.html +2 -2
- package/docs/documentation/components/RadioGroup.html +2 -2
- package/docs/documentation/components/Sample.html +2 -2
- package/docs/documentation/components/SampleSub.html +2 -2
- package/docs/documentation/components/Search.html +2 -2
- package/docs/documentation/components/Select.html +2 -2
- package/docs/documentation/components/SelectionTile.html +2 -2
- package/docs/documentation/components/SideNav.html +2 -2
- package/docs/documentation/components/SideNavHeader.html +2 -2
- package/docs/documentation/components/SideNavItem.html +2 -2
- package/docs/documentation/components/SideNavMenu.html +2 -2
- package/docs/documentation/components/Slider.html +2 -2
- package/docs/documentation/components/StructuredList.html +2 -2
- package/docs/documentation/components/SwitcherList.html +2 -2
- package/docs/documentation/components/SwitcherListItem.html +2 -2
- package/docs/documentation/components/Tab.html +2 -2
- package/docs/documentation/components/TabHeaders.html +34 -32
- package/docs/documentation/components/Table.html +1039 -1121
- package/docs/documentation/components/TableBody.html +1145 -0
- package/docs/documentation/components/TableCheckbox.html +828 -0
- package/docs/documentation/components/TableContainer.html +2 -2
- package/docs/documentation/components/TableData.html +307 -0
- package/docs/documentation/components/TableExpandButton.html +762 -0
- package/docs/documentation/components/TableExpandedRow.html +567 -0
- package/docs/documentation/components/TableHead.html +1549 -0
- package/docs/documentation/components/TableHeadCell.html +1307 -0
- package/docs/documentation/components/TableHeadCheckbox.html +792 -0
- package/docs/documentation/components/TableHeadExpand.html +292 -0
- package/docs/documentation/components/TableHeader.html +2 -2
- package/docs/documentation/components/TableRowComponent.html +1414 -0
- package/docs/documentation/components/TableToolbar.html +2 -2
- package/docs/documentation/components/TableToolbarActions.html +2 -2
- package/docs/documentation/components/TableToolbarContent.html +2 -2
- package/docs/documentation/components/TableToolbarSearch.html +2 -2
- package/docs/documentation/components/Tabs.html +2 -2
- package/docs/documentation/components/Tag.html +2 -2
- package/docs/documentation/components/TagFilter.html +2 -2
- package/docs/documentation/components/Tile.html +2 -2
- package/docs/documentation/components/TileGroup.html +2 -2
- package/docs/documentation/components/TimePicker.html +2 -2
- package/docs/documentation/components/TimePickerSelect.html +2 -2
- package/docs/documentation/components/Toast.html +79 -9
- package/docs/documentation/components/Toggle.html +2 -2
- package/docs/documentation/components/Tooltip.html +2 -2
- package/docs/documentation/components/TooltipDefinition.html +2 -2
- package/docs/documentation/components/TooltipIcon.html +2 -2
- package/docs/documentation/coverage.html +297 -25
- package/docs/documentation/directives/DataGridFocus.html +38 -117
- package/docs/documentation/directives/TableDirective.html +452 -0
- package/docs/documentation/graph/dependencies.dot +2 -4
- package/docs/documentation/images/coverage-badge-documentation.svg +1 -1
- package/docs/documentation/interfaces/DataGridPosition.html +490 -0
- package/docs/documentation/interfaces/FileItem.html +66 -0
- package/docs/documentation/interfaces/NotificationContent.html +39 -0
- package/docs/documentation/interfaces/TableTranslations.html +254 -455
- package/docs/documentation/interfaces/ToastContent.html +1 -0
- package/docs/documentation/js/menu-wc.js +1 -1
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/FileUploaderModule.html +3 -1
- package/docs/documentation/modules/NumberModule/dependencies.svg +30 -56
- package/docs/documentation/modules/NumberModule.html +32 -58
- package/docs/documentation/modules/TableModule/dependencies.svg +424 -160
- package/docs/documentation/modules/TableModule.html +575 -182
- package/docs/documentation/overview.html +4 -4
- package/docs/storybook/iframe.html +3 -3
- package/docs/storybook/{main.9e8069cf2ee0957ae098.bundle.js → main.edce6b8dbd74b486e13b.bundle.js} +4631 -2440
- package/docs/storybook/main.edce6b8dbd74b486e13b.bundle.js.map +1 -0
- package/docs/storybook/{runtime~main.9e8069cf2ee0957ae098.bundle.js → runtime~main.edce6b8dbd74b486e13b.bundle.js} +1 -1
- package/docs/storybook/{runtime~main.9e8069cf2ee0957ae098.bundle.js.map → runtime~main.edce6b8dbd74b486e13b.bundle.js.map} +1 -1
- package/docs/storybook/{vendors~main.9e8069cf2ee0957ae098.bundle.js → vendors~main.edce6b8dbd74b486e13b.bundle.js} +1 -1
- package/docs/storybook/{vendors~main.9e8069cf2ee0957ae098.bundle.js.map → vendors~main.edce6b8dbd74b486e13b.bundle.js.map} +1 -1
- package/dropdown/dropdown.component.js +4 -0
- package/dropdown/dropdown.component.js.map +1 -1
- package/file-uploader/file-item.interface.d.ts +2 -0
- package/file-uploader/file-item.interface.js.map +1 -1
- package/file-uploader/file-uploader.component.js +3 -1
- package/file-uploader/file-uploader.component.js.map +1 -1
- package/file-uploader/file-uploader.component.metadata.json +1 -1
- package/file-uploader/file-uploader.component.ngfactory.js +9 -8
- package/file-uploader/file-uploader.component.ngfactory.js.map +1 -1
- package/file-uploader/file-uploader.module.js +3 -1
- package/file-uploader/file-uploader.module.js.map +1 -1
- package/file-uploader/file-uploader.module.metadata.json +1 -1
- package/file-uploader/file-uploader.module.ngfactory.js +2 -1
- package/file-uploader/file-uploader.module.ngfactory.js.map +1 -1
- package/file-uploader/file-uploader.module.ngsummary.json +1 -1
- package/file-uploader/file.component.d.ts +1 -0
- package/file-uploader/file.component.js +10 -2
- package/file-uploader/file.component.js.map +1 -1
- package/file-uploader/file.component.metadata.json +1 -1
- package/file-uploader/file.component.ngfactory.js +19 -16
- package/file-uploader/file.component.ngfactory.js.map +1 -1
- package/file-uploader/file.component.ngsummary.json +1 -1
- package/index.ngsummary.json +1 -1
- package/notification/notification-content.interface.d.ts +1 -0
- package/notification/notification-content.interface.js.map +1 -1
- package/notification/notification.component.d.ts +1 -0
- package/notification/notification.component.js +7 -1
- package/notification/notification.component.js.map +1 -1
- package/notification/notification.component.metadata.json +1 -1
- package/notification/notification.component.ngfactory.js +1 -1
- package/notification/notification.component.ngsummary.json +1 -1
- package/notification/toast.component.d.ts +1 -0
- package/notification/toast.component.js +7 -1
- package/notification/toast.component.js.map +1 -1
- package/notification/toast.component.metadata.json +1 -1
- package/notification/toast.component.ngfactory.js +1 -1
- package/notification/toast.component.ngsummary.json +1 -1
- package/number-input/number.component.d.ts +3 -2
- package/number-input/number.component.js +21 -20
- package/number-input/number.component.js.map +1 -1
- package/package.json +1 -1
- package/table/body/table-body.component.d.ts +77 -0
- package/table/body/table-body.component.js +120 -0
- package/table/body/table-body.component.js.map +1 -0
- package/table/body/table-body.component.metadata.json +1 -0
- package/{utils/window-tools.d.ts → table/body/table-body.component.ngfactory.d.ts} +2 -2
- package/table/body/table-body.component.ngfactory.js +62 -0
- package/table/body/table-body.component.ngfactory.js.map +1 -0
- package/table/body/table-body.component.ngsummary.json +1 -0
- package/table/body/table-expanded-row.component.d.ts +28 -0
- package/table/body/table-expanded-row.component.js +58 -0
- package/table/body/table-expanded-row.component.js.map +1 -0
- package/table/body/table-expanded-row.component.metadata.json +1 -0
- package/table/body/table-expanded-row.component.ngfactory.d.ts +21 -0
- package/table/body/table-expanded-row.component.ngfactory.js +39 -0
- package/table/body/table-expanded-row.component.ngfactory.js.map +1 -0
- package/table/body/table-expanded-row.component.ngsummary.json +1 -0
- package/table/body/table-row.component.d.ts +85 -0
- package/table/body/table-row.component.js +163 -0
- package/table/body/table-row.component.js.map +1 -0
- package/table/body/table-row.component.metadata.json +1 -0
- package/table/body/table-row.component.ngfactory.d.ts +21 -0
- package/table/body/table-row.component.ngfactory.js +55 -0
- package/table/body/table-row.component.ngfactory.js.map +1 -0
- package/table/body/table-row.component.ngsummary.json +1 -0
- package/table/cell/table-checkbox.component.d.ts +56 -0
- package/table/cell/table-checkbox.component.js +80 -0
- package/table/cell/table-checkbox.component.js.map +1 -0
- package/table/cell/table-checkbox.component.metadata.json +1 -0
- package/table/cell/table-checkbox.component.ngfactory.d.ts +21 -0
- package/table/cell/table-checkbox.component.ngfactory.js +46 -0
- package/table/cell/table-checkbox.component.ngfactory.js.map +1 -0
- package/table/cell/table-checkbox.component.ngsummary.json +1 -0
- package/table/cell/table-data.component.d.ts +24 -0
- package/table/cell/table-data.component.js +40 -0
- package/table/cell/table-data.component.js.map +1 -0
- package/table/cell/table-data.component.metadata.json +1 -0
- package/table/cell/table-data.component.ngfactory.d.ts +21 -0
- package/table/cell/table-data.component.ngfactory.js +39 -0
- package/table/cell/table-data.component.ngfactory.js.map +1 -0
- package/table/cell/table-data.component.ngsummary.json +1 -0
- package/table/cell/table-expand-button.component.d.ts +43 -0
- package/table/cell/table-expand-button.component.js +83 -0
- package/table/cell/table-expand-button.component.js.map +1 -0
- package/table/cell/table-expand-button.component.metadata.json +1 -0
- package/table/cell/table-expand-button.component.ngfactory.d.ts +21 -0
- package/table/cell/table-expand-button.component.ngfactory.js +44 -0
- package/table/cell/table-expand-button.component.ngfactory.js.map +1 -0
- package/table/cell/table-expand-button.component.ngsummary.json +1 -0
- package/table/data-grid-focus.directive.d.ts +5 -1
- package/table/data-grid-focus.directive.js +17 -24
- package/table/data-grid-focus.directive.js.map +1 -1
- package/table/data-grid-focus.directive.metadata.json +1 -1
- package/table/data-grid-focus.directive.ngsummary.json +1 -1
- package/table/data-grid-interaction-model.class.d.ts +185 -0
- package/table/data-grid-interaction-model.class.js +269 -0
- package/table/data-grid-interaction-model.class.js.map +1 -0
- package/table/data-grid-interaction-model.class.metadata.json +1 -0
- package/table/data-grid-interaction-model.class.ngsummary.json +1 -0
- package/table/head/table-head-cell.component.d.ts +46 -0
- package/table/head/table-head-cell.component.js +117 -0
- package/table/head/table-head-cell.component.js.map +1 -0
- package/table/head/table-head-cell.component.metadata.json +1 -0
- package/table/head/table-head-cell.component.ngfactory.d.ts +21 -0
- package/table/head/table-head-cell.component.ngfactory.js +55 -0
- package/table/head/table-head-cell.component.ngfactory.js.map +1 -0
- package/table/head/table-head-cell.component.ngsummary.json +1 -0
- package/table/head/table-head-checkbox.component.d.ts +40 -0
- package/table/head/table-head-checkbox.component.js +75 -0
- package/table/head/table-head-checkbox.component.js.map +1 -0
- package/table/head/table-head-checkbox.component.metadata.json +1 -0
- package/table/head/table-head-checkbox.component.ngfactory.d.ts +21 -0
- package/table/head/table-head-checkbox.component.ngfactory.js +45 -0
- package/table/head/table-head-checkbox.component.ngfactory.js.map +1 -0
- package/table/head/table-head-checkbox.component.ngsummary.json +1 -0
- package/table/head/table-head-expand.component.d.ts +23 -0
- package/table/head/table-head-expand.component.js +39 -0
- package/table/head/table-head-expand.component.js.map +1 -0
- package/table/head/table-head-expand.component.metadata.json +1 -0
- package/table/head/table-head-expand.component.ngfactory.d.ts +21 -0
- package/table/head/table-head-expand.component.ngfactory.js +36 -0
- package/table/head/table-head-expand.component.ngfactory.js.map +1 -0
- package/table/head/table-head-expand.component.ngsummary.json +1 -0
- package/table/head/table-head.component.d.ts +77 -0
- package/table/head/table-head.component.js +157 -0
- package/table/head/table-head.component.js.map +1 -0
- package/table/head/table-head.component.metadata.json +1 -0
- package/table/head/table-head.component.ngfactory.d.ts +21 -0
- package/table/head/table-head.component.ngfactory.js +56 -0
- package/table/head/table-head.component.ngfactory.js.map +1 -0
- package/table/head/table-head.component.ngsummary.json +1 -0
- package/table/table-adapter.class.d.ts +149 -0
- package/table/table-adapter.class.js +210 -0
- package/table/table-adapter.class.js.map +1 -0
- package/table/table-adapter.class.metadata.json +1 -0
- package/table/table-adapter.class.ngsummary.json +1 -0
- package/table/table-header-item.class.d.ts +8 -35
- package/table/table-header-item.class.js +0 -17
- package/table/table-header-item.class.js.map +1 -1
- package/table/table-item.class.d.ts +0 -13
- package/table/table-item.class.js +0 -2
- package/table/table-item.class.js.map +1 -1
- package/table/table-model.class.d.ts +41 -105
- package/table/table-model.class.js +45 -73
- package/table/table-model.class.js.map +1 -1
- package/table/table-model.class.metadata.json +1 -1
- package/table/table-model.class.ngsummary.json +1 -1
- package/table/table.component.d.ts +45 -81
- package/table/table.component.js +191 -200
- package/table/table.component.js.map +1 -1
- package/table/table.component.metadata.json +1 -1
- package/table/table.component.ngfactory.js +30 -199
- package/table/table.component.ngfactory.js.map +1 -1
- package/table/table.component.ngsummary.json +1 -1
- package/table/table.directive.d.ts +33 -0
- package/table/table.directive.js +72 -0
- package/table/table.directive.js.map +1 -0
- package/table/table.directive.metadata.json +1 -0
- package/table/table.directive.ngfactory.js.map +1 -0
- package/table/table.directive.ngsummary.json +1 -0
- package/table/table.module.d.ts +25 -11
- package/table/table.module.js +60 -21
- package/table/table.module.js.map +1 -1
- package/table/table.module.metadata.json +1 -1
- package/table/table.module.ngfactory.js.map +1 -1
- package/table/table.module.ngsummary.json +1 -1
- package/tabs/tab-headers.component.js +1 -1
- package/tabs/tab-headers.component.js.map +1 -1
- package/tabs/tab-headers.component.metadata.json +1 -1
- package/tabs/tab-headers.component.ngfactory.js +1 -1
- package/tabs/tab-headers.component.ngfactory.js.map +1 -1
- package/ui-shell/header/header-action.component.js +1 -1
- package/ui-shell/header/header-action.component.js.map +1 -1
- package/ui-shell/header/header-action.component.metadata.json +1 -1
- package/ui-shell/header/header-action.component.ngfactory.js +5 -6
- package/ui-shell/header/header-action.component.ngfactory.js.map +1 -1
- package/ui-shell/header/header.component.d.ts +26 -1
- package/ui-shell/header/header.component.js +40 -5
- package/ui-shell/header/header.component.js.map +1 -1
- package/ui-shell/header/header.component.metadata.json +1 -1
- package/ui-shell/header/header.component.ngfactory.js +9 -3
- package/ui-shell/header/header.component.ngfactory.js.map +1 -1
- package/ui-shell/header/header.component.ngsummary.json +1 -1
- package/ui-shell/header/header.module.ngfactory.js.map +1 -1
- package/common/utils.d.ts +0 -35
- package/common/utils.js +0 -40
- package/common/utils.js.map +0 -1
- package/common/utils.metadata.json +0 -1
- package/common/utils.ngsummary.json +0 -1
- package/docs/storybook/main.9e8069cf2ee0957ae098.bundle.js.map +0 -1
- package/utils/window-tools.js +0 -46
- package/utils/window-tools.js.map +0 -1
- package/utils/window-tools.metadata.json +0 -1
- package/utils/window-tools.ngsummary.json +0 -1
package/table/table.component.js
CHANGED
|
@@ -19,14 +19,15 @@
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
import { Component, ApplicationRef, Input, Output, EventEmitter, ElementRef, TemplateRef } from "@angular/core";
|
|
22
|
-
import { fromEvent } from "rxjs";
|
|
22
|
+
import { Subscription, fromEvent } from "rxjs";
|
|
23
23
|
import { TableModel } from "./table.module";
|
|
24
24
|
import { TableHeaderItem } from "./table-header-item.class";
|
|
25
25
|
import { TableItem } from "./table-item.class";
|
|
26
|
-
import { getScrollbarWidth } from "../common/utils";
|
|
27
26
|
import { getFocusElementList, tabbableSelectorIgnoreTabIndex } from "../common/tab.service";
|
|
28
27
|
import { I18n } from "./../i18n/i18n.module";
|
|
29
28
|
import { merge } from "./../utils/object";
|
|
29
|
+
import { DataGridInteractionModel } from "./data-grid-interaction-model.class";
|
|
30
|
+
import { TableDomAdapter } from "./table-adapter.class";
|
|
30
31
|
/**
|
|
31
32
|
* Build your table with this component by extending things that differ from default.
|
|
32
33
|
*
|
|
@@ -170,16 +171,10 @@ import { merge } from "./../utils/object";
|
|
|
170
171
|
* ```
|
|
171
172
|
*
|
|
172
173
|
* <example-url>../../iframe.html?id=table--basic</example-url>
|
|
173
|
-
*
|
|
174
|
-
* @export
|
|
175
|
-
* @class Table
|
|
176
|
-
* @implements {AfterContentChecked}
|
|
177
174
|
*/
|
|
178
175
|
var Table = /** @class */ (function () {
|
|
179
176
|
/**
|
|
180
177
|
* Creates an instance of Table.
|
|
181
|
-
*
|
|
182
|
-
* @param {ApplicationRef} applicationRef
|
|
183
178
|
*/
|
|
184
179
|
function Table(elementRef, applicationRef, i18n) {
|
|
185
180
|
this.elementRef = elementRef;
|
|
@@ -187,35 +182,23 @@ var Table = /** @class */ (function () {
|
|
|
187
182
|
this.i18n = i18n;
|
|
188
183
|
/**
|
|
189
184
|
* Size of the table rows.
|
|
190
|
-
*
|
|
191
|
-
* @type {("sm" | "sh" | "md" | "lg")}
|
|
192
185
|
*/
|
|
193
186
|
this.size = "md";
|
|
194
187
|
/**
|
|
195
188
|
* Set to `true` for a loading table.
|
|
196
189
|
*/
|
|
197
190
|
this.skeleton = false;
|
|
198
|
-
/**
|
|
199
|
-
* Set to `true` for a data grid with keyboard interactions.
|
|
200
|
-
*/
|
|
201
|
-
this.isDataGrid = false;
|
|
202
191
|
/**
|
|
203
192
|
* Controls whether to show the selection checkboxes column or not.
|
|
204
|
-
*
|
|
205
|
-
* @type {boolean}
|
|
206
193
|
*/
|
|
207
194
|
this.showSelectionColumn = true;
|
|
208
195
|
/**
|
|
209
196
|
* Controls whether to enable multiple or single row selection.
|
|
210
|
-
*
|
|
211
|
-
* @type {boolean}
|
|
212
197
|
*/
|
|
213
198
|
this.enableSingleSelect = false;
|
|
214
199
|
/**
|
|
215
200
|
* Distance (in px) from the bottom that view has to reach before
|
|
216
201
|
* `scrollLoad` event is emitted.
|
|
217
|
-
*
|
|
218
|
-
* @type {number}
|
|
219
202
|
*/
|
|
220
203
|
this.scrollLoadDistance = 0;
|
|
221
204
|
/**
|
|
@@ -233,27 +216,8 @@ var Table = /** @class */ (function () {
|
|
|
233
216
|
*
|
|
234
217
|
*/
|
|
235
218
|
this.columnsDraggable = false;
|
|
236
|
-
this.checkboxHeaderLabel = this.i18n.getOverridable("TABLE.CHECKBOX_HEADER");
|
|
237
|
-
this.checkboxRowLabel = this.i18n.getOverridable("TABLE.CHECKBOX_ROW");
|
|
238
|
-
this.endOfDataText = this.i18n.getOverridable("TABLE.END_OF_DATA");
|
|
239
|
-
this.scrollTopText = this.i18n.getOverridable("TABLE.SCROLL_TOP");
|
|
240
|
-
this.filterTitle = this.i18n.getOverridable("TABLE.FILTER");
|
|
241
|
-
/**
|
|
242
|
-
* Controls if all checkboxes are viewed as selected.
|
|
243
|
-
*
|
|
244
|
-
* @type {boolean}
|
|
245
|
-
*/
|
|
246
|
-
this.selectAllCheckbox = false;
|
|
247
|
-
/**
|
|
248
|
-
* Controls the indeterminate state of the header checkbox.
|
|
249
|
-
*
|
|
250
|
-
* @type {boolean}
|
|
251
|
-
*/
|
|
252
|
-
this.selectAllCheckboxSomeSelected = false;
|
|
253
219
|
/**
|
|
254
220
|
* Set to `false` to remove table rows (zebra) stripes.
|
|
255
|
-
*
|
|
256
|
-
* @type {boolean}
|
|
257
221
|
*/
|
|
258
222
|
this.striped = true;
|
|
259
223
|
/**
|
|
@@ -268,40 +232,54 @@ var Table = /** @class */ (function () {
|
|
|
268
232
|
/**
|
|
269
233
|
* Emits if all rows are selected.
|
|
270
234
|
*
|
|
271
|
-
* @param
|
|
235
|
+
* @param model
|
|
272
236
|
*/
|
|
273
237
|
this.selectAll = new EventEmitter();
|
|
274
238
|
/**
|
|
275
239
|
* Emits if all rows are deselected.
|
|
276
240
|
*
|
|
277
|
-
* @param
|
|
241
|
+
* @param model
|
|
278
242
|
*/
|
|
279
243
|
this.deselectAll = new EventEmitter();
|
|
280
244
|
/**
|
|
281
245
|
* Emits if a single row is selected.
|
|
282
246
|
*
|
|
283
|
-
* @param
|
|
247
|
+
* @param ({model: this.model, selectedRowIndex: index})
|
|
284
248
|
*/
|
|
285
249
|
this.selectRow = new EventEmitter();
|
|
286
250
|
/**
|
|
287
251
|
* Emits if a single row is deselected.
|
|
288
252
|
*
|
|
289
|
-
* @param
|
|
253
|
+
* @param ({model: this.model, deselectedRowIndex: index})
|
|
290
254
|
*/
|
|
291
255
|
this.deselectRow = new EventEmitter();
|
|
292
256
|
/**
|
|
293
257
|
* Emits when table requires more data to be loaded.
|
|
294
|
-
*
|
|
295
|
-
* @param {TableModel} model
|
|
296
258
|
*/
|
|
297
259
|
this.scrollLoad = new EventEmitter();
|
|
298
|
-
|
|
260
|
+
/**
|
|
261
|
+
* Controls if all checkboxes are viewed as selected.
|
|
262
|
+
*/
|
|
263
|
+
this.selectAllCheckbox = false;
|
|
264
|
+
/**
|
|
265
|
+
* Controls the indeterminate state of the header checkbox.
|
|
266
|
+
*/
|
|
267
|
+
this.selectAllCheckboxSomeSelected = false;
|
|
299
268
|
this.isColumnDragging = false;
|
|
300
269
|
this.columnDraggedHoverIndex = -1;
|
|
301
270
|
this.columnDraggedPosition = "";
|
|
271
|
+
this._isDataGrid = false;
|
|
272
|
+
// flag to prevent getters/setters from querying the view before it's fully instantiated
|
|
273
|
+
this.isViewReady = false;
|
|
274
|
+
this.subscriptions = new Subscription();
|
|
302
275
|
this._expandButtonAriaLabel = this.i18n.getOverridable("TABLE.EXPAND_BUTTON");
|
|
303
276
|
this._sortDescendingLabel = this.i18n.getOverridable("TABLE.SORT_DESCENDING");
|
|
304
277
|
this._sortAscendingLabel = this.i18n.getOverridable("TABLE.SORT_ASCENDING");
|
|
278
|
+
this._checkboxHeaderLabel = this.i18n.getOverridable("TABLE.CHECKBOX_HEADER");
|
|
279
|
+
this._checkboxRowLabel = this.i18n.getOverridable("TABLE.CHECKBOX_ROW");
|
|
280
|
+
this._endOfDataText = this.i18n.getOverridable("TABLE.END_OF_DATA");
|
|
281
|
+
this._scrollTopText = this.i18n.getOverridable("TABLE.SCROLL_TOP");
|
|
282
|
+
this._filterTitle = this.i18n.getOverridable("TABLE.FILTER");
|
|
305
283
|
}
|
|
306
284
|
/**
|
|
307
285
|
* Creates a skeleton model with a row and column count specified by the user
|
|
@@ -311,9 +289,6 @@ var Table = /** @class */ (function () {
|
|
|
311
289
|
* ```typescript
|
|
312
290
|
* this.model = Table.skeletonModel(5, 5);
|
|
313
291
|
* ```
|
|
314
|
-
*
|
|
315
|
-
* @param {number} rowCount
|
|
316
|
-
* @param {number} columnCount
|
|
317
292
|
*/
|
|
318
293
|
Table.skeletonModel = function (rowCount, columnCount) {
|
|
319
294
|
var model = new TableModel();
|
|
@@ -343,31 +318,42 @@ var Table = /** @class */ (function () {
|
|
|
343
318
|
element.tabIndex = index;
|
|
344
319
|
}
|
|
345
320
|
};
|
|
321
|
+
Table.focus = function (element) {
|
|
322
|
+
var focusElementList = getFocusElementList(element, tabbableSelectorIgnoreTabIndex);
|
|
323
|
+
if (element.firstElementChild && element.firstElementChild.classList.contains("bx--table-sort")) {
|
|
324
|
+
focusElementList[1].focus();
|
|
325
|
+
}
|
|
326
|
+
else if (focusElementList.length > 0) {
|
|
327
|
+
focusElementList[0].focus();
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
element.focus();
|
|
331
|
+
}
|
|
332
|
+
};
|
|
346
333
|
Object.defineProperty(Table.prototype, "model", {
|
|
347
334
|
get: function () {
|
|
348
335
|
return this._model;
|
|
349
336
|
},
|
|
350
337
|
/**
|
|
351
338
|
* `TableModel` with data the table is to display.
|
|
352
|
-
*
|
|
353
|
-
* @type {TableModel}
|
|
354
339
|
*/
|
|
355
340
|
set: function (m) {
|
|
356
341
|
var _this = this;
|
|
357
342
|
if (this._model) {
|
|
358
|
-
this.
|
|
359
|
-
this._model.rowsSelectedChange.unsubscribe();
|
|
343
|
+
this.subscriptions.unsubscribe();
|
|
360
344
|
}
|
|
361
345
|
this._model = m;
|
|
362
|
-
this._model.rowsSelectedChange.subscribe(function () { return _this.updateSelectAllCheckbox(); });
|
|
363
|
-
this._model.dataChange.subscribe(function () {
|
|
364
|
-
_this.updateSelectAllCheckbox();
|
|
346
|
+
var rowsChange = this._model.rowsSelectedChange.subscribe(function () { return _this.updateSelectAllCheckbox(); });
|
|
347
|
+
var dataChange = this._model.dataChange.subscribe(function () {
|
|
365
348
|
if (_this.isDataGrid) {
|
|
366
|
-
_this.
|
|
349
|
+
_this.resetTabIndex();
|
|
367
350
|
}
|
|
351
|
+
_this.updateSelectAllCheckbox();
|
|
368
352
|
});
|
|
353
|
+
this.subscriptions.add(rowsChange);
|
|
354
|
+
this.subscriptions.add(dataChange);
|
|
369
355
|
if (this.isDataGrid) {
|
|
370
|
-
this._model.rowsExpandedChange.subscribe(function () {
|
|
356
|
+
var expandedChange = this._model.rowsExpandedChange.subscribe(function () {
|
|
371
357
|
// Allows the expanded row to have a focus state when it exists in the DOM
|
|
372
358
|
setTimeout(function () {
|
|
373
359
|
var expandedRows = _this.elementRef.nativeElement.querySelectorAll(".bx--expandable-row:not(.bx--parent-row)");
|
|
@@ -378,6 +364,28 @@ var Table = /** @class */ (function () {
|
|
|
378
364
|
});
|
|
379
365
|
});
|
|
380
366
|
});
|
|
367
|
+
this.subscriptions.add(expandedChange);
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
enumerable: true,
|
|
371
|
+
configurable: true
|
|
372
|
+
});
|
|
373
|
+
Object.defineProperty(Table.prototype, "isDataGrid", {
|
|
374
|
+
get: function () {
|
|
375
|
+
return this._isDataGrid;
|
|
376
|
+
},
|
|
377
|
+
/**
|
|
378
|
+
* Set to `true` for a data grid with keyboard interactions.
|
|
379
|
+
*/
|
|
380
|
+
set: function (value) {
|
|
381
|
+
this._isDataGrid = value;
|
|
382
|
+
if (this.isViewReady) {
|
|
383
|
+
if (value) {
|
|
384
|
+
this.enableDataGridInteractions();
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
this.disableDataGridInteractions();
|
|
388
|
+
}
|
|
381
389
|
}
|
|
382
390
|
},
|
|
383
391
|
enumerable: true,
|
|
@@ -390,7 +398,7 @@ var Table = /** @class */ (function () {
|
|
|
390
398
|
/**
|
|
391
399
|
* Controls whether to show the selection checkboxes column or not.
|
|
392
400
|
*
|
|
393
|
-
* @deprecated in the next major carbon-components-angular version in
|
|
401
|
+
* @deprecated in the next major carbon-components-angular version in favor of
|
|
394
402
|
* `showSelectionColumn` because of new attribute `enableSingleSelect`
|
|
395
403
|
* please use `showSelectionColumn` instead
|
|
396
404
|
*/
|
|
@@ -445,11 +453,11 @@ var Table = /** @class */ (function () {
|
|
|
445
453
|
*/
|
|
446
454
|
set: function (value) {
|
|
447
455
|
var valueWithDefaults = merge(this.i18n.getMultiple("TABLE"), value);
|
|
448
|
-
this.
|
|
449
|
-
this.
|
|
450
|
-
this.
|
|
451
|
-
this.
|
|
452
|
-
this.
|
|
456
|
+
this._filterTitle.override(valueWithDefaults.FILTER);
|
|
457
|
+
this._endOfDataText.override(valueWithDefaults.END_OF_DATA);
|
|
458
|
+
this._scrollTopText.override(valueWithDefaults.SCROLL_TOP);
|
|
459
|
+
this._checkboxHeaderLabel.override(valueWithDefaults.CHECKBOX_HEADER);
|
|
460
|
+
this._checkboxRowLabel.override(valueWithDefaults.CHECKBOX_ROW);
|
|
453
461
|
},
|
|
454
462
|
enumerable: true,
|
|
455
463
|
configurable: true
|
|
@@ -464,38 +472,78 @@ var Table = /** @class */ (function () {
|
|
|
464
472
|
configurable: true
|
|
465
473
|
});
|
|
466
474
|
Table.prototype.ngAfterViewInit = function () {
|
|
475
|
+
this.isViewReady = true;
|
|
467
476
|
if (this.isDataGrid) {
|
|
468
|
-
this.
|
|
477
|
+
this.enableDataGridInteractions();
|
|
469
478
|
}
|
|
470
479
|
};
|
|
471
|
-
Table.prototype.
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
480
|
+
Table.prototype.ngOnDestroy = function () {
|
|
481
|
+
this.subscriptions.unsubscribe();
|
|
482
|
+
if (this.positionSubscription) {
|
|
483
|
+
this.positionSubscription.unsubscribe();
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
Table.prototype.enableDataGridInteractions = function () {
|
|
487
|
+
// if we have an `interactioModel` we've already enabled datagrid
|
|
488
|
+
if (this.interactionModel) {
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
var table = this.elementRef.nativeElement.querySelector("table");
|
|
492
|
+
var tableAdapter = new TableDomAdapter(table);
|
|
493
|
+
var keydownEventStream = fromEvent(table, "keydown");
|
|
494
|
+
var clickEventStream = fromEvent(table, "click");
|
|
495
|
+
this.interactionModel = new DataGridInteractionModel(keydownEventStream, clickEventStream, tableAdapter);
|
|
496
|
+
this.positionSubscription = this.interactionModel.position.subscribe(function (event) {
|
|
497
|
+
var _a = event.current, currentRow = _a[0], currentColumn = _a[1];
|
|
498
|
+
var _b = event.previous, previousRow = _b[0], previousColumn = _b[1];
|
|
499
|
+
var currentElement = tableAdapter.getCell(currentRow, currentColumn);
|
|
500
|
+
Table.setTabIndex(currentElement, 0);
|
|
501
|
+
// if the model has just initialized don't focus or reset anything
|
|
502
|
+
if (previousRow === -1 || previousColumn === -1) {
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
var previousElement = tableAdapter.getCell(previousRow, previousColumn);
|
|
506
|
+
Table.setTabIndex(previousElement, -1);
|
|
507
|
+
Table.focus(currentElement);
|
|
481
508
|
});
|
|
509
|
+
// call this after assigning `this.interactionModel` since it depends on it
|
|
510
|
+
this.resetTabIndex();
|
|
482
511
|
};
|
|
483
|
-
Table.prototype.
|
|
484
|
-
|
|
485
|
-
|
|
512
|
+
Table.prototype.disableDataGridInteractions = function () {
|
|
513
|
+
// unsubscribe first so we don't cause the focus to fly around
|
|
514
|
+
if (this.positionSubscription) {
|
|
515
|
+
this.positionSubscription.unsubscribe();
|
|
516
|
+
}
|
|
517
|
+
// undo tab indexing (also resets the model)
|
|
518
|
+
this.resetTabIndex(0);
|
|
519
|
+
// null out the model ref
|
|
520
|
+
this.interactionModel = null;
|
|
486
521
|
};
|
|
487
|
-
Table.prototype.
|
|
488
|
-
this.
|
|
489
|
-
this.
|
|
522
|
+
Table.prototype.onSelectAll = function () {
|
|
523
|
+
this.model.selectAll(true);
|
|
524
|
+
this.selectAll.emit(this.model);
|
|
525
|
+
};
|
|
526
|
+
Table.prototype.onDeselectAll = function () {
|
|
527
|
+
this.model.selectAll(false);
|
|
528
|
+
this.deselectAll.emit(this.model);
|
|
490
529
|
};
|
|
491
|
-
Table.prototype.
|
|
530
|
+
Table.prototype.onSelectRow = function (event) {
|
|
492
531
|
var _this = this;
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
this.
|
|
498
|
-
|
|
532
|
+
// check for the existence of the selectedRowIndex property
|
|
533
|
+
if (Object.keys(event).includes("selectedRowIndex")) {
|
|
534
|
+
this.model.selectRow(event.selectedRowIndex, true);
|
|
535
|
+
this.selectRow.emit(event);
|
|
536
|
+
if (!this.showSelectionColumn && this.enableSingleSelect) {
|
|
537
|
+
var index = event.selectedRowIndex;
|
|
538
|
+
this.model.rowsSelected.forEach(function (_, index) {
|
|
539
|
+
_this.model.selectRow(index, false);
|
|
540
|
+
});
|
|
541
|
+
this.model.selectRow(index, !this.model.rowsSelected[index]);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
else {
|
|
545
|
+
this.model.selectRow(event.deselectedRowIndex, false);
|
|
546
|
+
this.deselectRow.emit(event);
|
|
499
547
|
}
|
|
500
548
|
};
|
|
501
549
|
Table.prototype.updateSelectAllCheckbox = function () {
|
|
@@ -508,63 +556,52 @@ var Table = /** @class */ (function () {
|
|
|
508
556
|
else if (selectedRowsCount < this.model.data.length) {
|
|
509
557
|
this.selectAllCheckboxSomeSelected = true;
|
|
510
558
|
}
|
|
511
|
-
};
|
|
512
|
-
/**
|
|
513
|
-
* Triggered whenever the header checkbox is clicked.
|
|
514
|
-
* Updates all the checkboxes in the table view.
|
|
515
|
-
* Emits the `selectAll` or `deselectAll` event.
|
|
516
|
-
*
|
|
517
|
-
*/
|
|
518
|
-
Table.prototype.onSelectAllCheckboxChange = function () {
|
|
519
|
-
this.applicationRef.tick(); // give app time to process the click if needed
|
|
520
|
-
if (this.selectAllCheckboxSomeSelected) {
|
|
521
|
-
this.selectAllCheckbox = false; // clear all boxes
|
|
522
|
-
this.deselectAll.emit(this.model);
|
|
523
|
-
}
|
|
524
|
-
else if (this.selectAllCheckbox) {
|
|
525
|
-
this.selectAll.emit(this.model);
|
|
526
|
-
}
|
|
527
559
|
else {
|
|
528
|
-
this.
|
|
529
|
-
|
|
530
|
-
this.selectAllCheckboxSomeSelected = false;
|
|
531
|
-
for (var i = 0; i < this.model.rowsSelected.length; i++) {
|
|
532
|
-
this.model.rowsSelected[i] = this.selectAllCheckbox;
|
|
560
|
+
this.selectAllCheckbox = true;
|
|
561
|
+
this.selectAllCheckboxSomeSelected = false;
|
|
533
562
|
}
|
|
534
563
|
};
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
this.selectRow.emit({ model: this.model, selectedRowIndex: index });
|
|
547
|
-
}
|
|
548
|
-
else {
|
|
549
|
-
this.deselectRow.emit({ model: this.model, deselectedRowIndex: index });
|
|
550
|
-
}
|
|
551
|
-
for (var i = 1; i < this.model.rowsSelected.length; i++) {
|
|
552
|
-
var one = this.model.rowsSelected[i];
|
|
553
|
-
if (!!one !== !!startValue) { // !! essentially converts to boolean and we want undefined to be false
|
|
554
|
-
// set indeterminate
|
|
555
|
-
this.selectAllCheckbox = false;
|
|
556
|
-
this.selectAllCheckboxSomeSelected = true;
|
|
557
|
-
return;
|
|
564
|
+
Table.prototype.resetTabIndex = function (newTabIndex) {
|
|
565
|
+
var _this = this;
|
|
566
|
+
if (newTabIndex === void 0) { newTabIndex = -1; }
|
|
567
|
+
// ensure the view is ready for the reset before we preform the actual reset
|
|
568
|
+
setTimeout(function () {
|
|
569
|
+
// reset all the tabIndexes we can find
|
|
570
|
+
var focusElementList = getFocusElementList(_this.elementRef.nativeElement, tabbableSelectorIgnoreTabIndex);
|
|
571
|
+
if (focusElementList) {
|
|
572
|
+
focusElementList.forEach(function (tabbable) {
|
|
573
|
+
tabbable.tabIndex = newTabIndex;
|
|
574
|
+
});
|
|
558
575
|
}
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
576
|
+
// reset interaction model positions and tabIndexes
|
|
577
|
+
if (_this.interactionModel) {
|
|
578
|
+
_this.interactionModel.resetTabIndexes(newTabIndex);
|
|
579
|
+
}
|
|
580
|
+
});
|
|
581
|
+
};
|
|
582
|
+
Table.prototype.columnResizeStart = function (event, column) {
|
|
583
|
+
var _this = this;
|
|
584
|
+
this.columnResizeWidth = parseInt(column.style.width, 10);
|
|
585
|
+
this.columnResizeMouseX = event.clientX;
|
|
586
|
+
event.preventDefault();
|
|
587
|
+
this.mouseMoveSubscription = fromEvent(document.body, "mousemove").subscribe(function (event) {
|
|
588
|
+
_this.columnResizeProgress(event, column);
|
|
589
|
+
});
|
|
590
|
+
this.mouseUpSubscription = fromEvent(document.body, "mouseup").subscribe(function (event) {
|
|
591
|
+
_this.columnResizeEnd(event, column);
|
|
592
|
+
});
|
|
593
|
+
};
|
|
594
|
+
Table.prototype.columnResizeProgress = function (event, column) {
|
|
595
|
+
var move = event.clientX - this.columnResizeMouseX;
|
|
596
|
+
column.style.width = this.columnResizeWidth + move + "px";
|
|
597
|
+
};
|
|
598
|
+
Table.prototype.columnResizeEnd = function (event, column) {
|
|
599
|
+
this.mouseMoveSubscription.unsubscribe();
|
|
600
|
+
this.mouseUpSubscription.unsubscribe();
|
|
562
601
|
};
|
|
563
602
|
/**
|
|
564
603
|
* Triggered when the user scrolls on the `<tbody>` element.
|
|
565
604
|
* Emits the `scrollLoad` event.
|
|
566
|
-
*
|
|
567
|
-
* @param {any} event
|
|
568
605
|
*/
|
|
569
606
|
Table.prototype.onScroll = function (event) {
|
|
570
607
|
var distanceFromBottom = event.target.scrollHeight - event.target.clientHeight - event.target.scrollTop;
|
|
@@ -603,75 +640,14 @@ var Table = /** @class */ (function () {
|
|
|
603
640
|
this.columnDraggedPosition = "";
|
|
604
641
|
this.model.moveColumn(parseInt(event.dataTransfer.getData("columnIndex"), 10), columnIndex + (position === "right" ? 1 : 0));
|
|
605
642
|
};
|
|
606
|
-
Object.defineProperty(Table.prototype, "scrollbarWidth", {
|
|
607
|
-
get: function () {
|
|
608
|
-
return getScrollbarWidth();
|
|
609
|
-
},
|
|
610
|
-
enumerable: true,
|
|
611
|
-
configurable: true
|
|
612
|
-
});
|
|
613
|
-
Table.prototype.firstExpandedDataInRow = function (row) {
|
|
614
|
-
var found = row.find(function (d) { return d.expandedData; });
|
|
615
|
-
if (found) {
|
|
616
|
-
return found.expandedData;
|
|
617
|
-
}
|
|
618
|
-
return found;
|
|
619
|
-
};
|
|
620
|
-
Table.prototype.firstExpandedTemplateInRow = function (row) {
|
|
621
|
-
var found = row.find(function (d) { return d.expandedTemplate; });
|
|
622
|
-
if (found) {
|
|
623
|
-
return found.expandedTemplate;
|
|
624
|
-
}
|
|
625
|
-
return found;
|
|
626
|
-
};
|
|
627
643
|
/**
|
|
628
644
|
* Triggered when the user scrolls on the `<tbody>` element.
|
|
629
645
|
* Emits the `scrollLoad` event.
|
|
630
|
-
*
|
|
631
|
-
* @param {any} event
|
|
632
646
|
*/
|
|
633
647
|
Table.prototype.scrollToTop = function (event) {
|
|
634
648
|
event.target.parentElement.parentElement.parentElement.parentElement.children[1].scrollTop = 0;
|
|
635
649
|
this.model.isEnd = false;
|
|
636
650
|
};
|
|
637
|
-
Table.prototype.handleTabIndex = function () {
|
|
638
|
-
var _this = this;
|
|
639
|
-
setTimeout(function () {
|
|
640
|
-
var focusElementList = getFocusElementList(_this.elementRef.nativeElement, tabbableSelectorIgnoreTabIndex);
|
|
641
|
-
if (focusElementList.length > 0) {
|
|
642
|
-
focusElementList.forEach(function (tabbable) {
|
|
643
|
-
tabbable.tabIndex = -1;
|
|
644
|
-
});
|
|
645
|
-
}
|
|
646
|
-
Array.from(_this.elementRef.nativeElement.querySelectorAll("td, th")).forEach(function (cell) { return Table.setTabIndex(cell, -1); });
|
|
647
|
-
var rows = _this.elementRef.nativeElement.firstElementChild.rows;
|
|
648
|
-
if (Array.from(rows[0].querySelectorAll("th")).some(function (th) { return getFocusElementList(th, tabbableSelectorIgnoreTabIndex).length > 0; })) {
|
|
649
|
-
Table.setTabIndex(rows[0].querySelector("th"), 0);
|
|
650
|
-
}
|
|
651
|
-
else {
|
|
652
|
-
Table.setTabIndex(rows[1].querySelector("td"), 0);
|
|
653
|
-
}
|
|
654
|
-
});
|
|
655
|
-
};
|
|
656
|
-
Table.prototype.setIndex = function (columnIndex) {
|
|
657
|
-
if (this.model.hasExpandableRows() && this.showSelectionColumn) {
|
|
658
|
-
this.columnIndex = columnIndex + 2;
|
|
659
|
-
}
|
|
660
|
-
else if (this.model.hasExpandableRows() || this.showSelectionColumn) {
|
|
661
|
-
this.columnIndex = columnIndex + 1;
|
|
662
|
-
}
|
|
663
|
-
};
|
|
664
|
-
Table.prototype.setCheckboxIndex = function () {
|
|
665
|
-
if (this.model.hasExpandableRows()) {
|
|
666
|
-
this.columnIndex = 1;
|
|
667
|
-
}
|
|
668
|
-
else {
|
|
669
|
-
this.columnIndex = 0;
|
|
670
|
-
}
|
|
671
|
-
};
|
|
672
|
-
Table.prototype.setExpandIndex = function (event) {
|
|
673
|
-
this.columnIndex = 0;
|
|
674
|
-
};
|
|
675
651
|
Table.prototype.getSelectionLabelValue = function (row) {
|
|
676
652
|
if (!this.selectionLabelColumn) {
|
|
677
653
|
return { value: this.i18n.get().TABLE.ROW };
|
|
@@ -687,10 +663,25 @@ var Table = /** @class */ (function () {
|
|
|
687
663
|
Table.prototype.getSortAscendingLabel = function () {
|
|
688
664
|
return this._sortAscendingLabel.subject;
|
|
689
665
|
};
|
|
666
|
+
Table.prototype.getCheckboxHeaderLabel = function () {
|
|
667
|
+
return this._checkboxHeaderLabel.subject;
|
|
668
|
+
};
|
|
669
|
+
Table.prototype.getCheckboxRowLabel = function () {
|
|
670
|
+
return this._checkboxRowLabel.subject;
|
|
671
|
+
};
|
|
672
|
+
Table.prototype.getEndOfDataText = function () {
|
|
673
|
+
return this._endOfDataText.subject;
|
|
674
|
+
};
|
|
675
|
+
Table.prototype.getScrollTopText = function () {
|
|
676
|
+
return this._scrollTopText.subject;
|
|
677
|
+
};
|
|
678
|
+
Table.prototype.getFilterTitle = function () {
|
|
679
|
+
return this._filterTitle.subject;
|
|
680
|
+
};
|
|
690
681
|
Table.decorators = [
|
|
691
682
|
{ type: Component, args: [{
|
|
692
683
|
selector: "ibm-table",
|
|
693
|
-
template: "\n\t<table\n\tclass=\"bx--data-table bx--data-table--sort\"\n\t[ngClass]=\"{\n\t\t'bx--data-table--compact': size === 'sm',\n\t\t'bx--data-table--tall': size === 'lg',\n\t\t'bx--data-table--short': size === 'sh',\n\t\t'bx--data-table--zebra': striped,\n\t\t'bx--skeleton': skeleton\n\t}\">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th\n\t\t\t\t\tclass=\"bx--table-expand\"\n\t\t\t\t\t*ngIf=\"model.hasExpandableRows()\"\n\t\t\t\t\t[ibmDataGridFocus]=\"isDataGrid\"\n\t\t\t\t\t[(columnIndex)]=\"columnIndex\"\n\t\t\t\t\t(click)=\"setExpandIndex($event)\">\n\t\t\t\t</th>\n\t\t\t\t<th\n\t\t\t\t\tclass=\"bx--table-column-checkbox\"\n\t\t\t\t\t*ngIf=\"!skeleton && showSelectionColumn\"\n\t\t\t\t\t[ibmDataGridFocus]=\"isDataGrid\"\n\t\t\t\t\t[(columnIndex)]=\"columnIndex\"\n\t\t\t\t\t(click)=\"setCheckboxIndex()\"\n\t\t\t\t\tstyle=\"width: 10px;\">\n\t\t\t\t\t<ibm-checkbox\n\t\t\t\t\t\tinline=\"true\"\n\t\t\t\t\t\t[size]=\"(size !== 'sm' ? 'md' : 'sm')\"\n\t\t\t\t\t\t[(ngModel)]=\"selectAllCheckbox\"\n\t\t\t\t\t\t[indeterminate]=\"selectAllCheckboxSomeSelected\"\n\t\t\t\t\t\t[attr.aria-label]=\"checkboxHeaderLabel.subject | async\"\n\t\t\t\t\t\t(change)=\"onSelectAllCheckboxChange()\">\n\t\t\t\t\t</ibm-checkbox>\n\t\t\t\t</th>\n\t\t\t\t<ng-container *ngFor=\"let column of model.header; let i = index\">\n\t\t\t\t\t<th\n\t\t\t\t\t\t[ngClass]='{\"thead_action\": column.filterTemplate || this.sort.observers.length > 0}'\n\t\t\t\t\t\t*ngIf=\"column.visible\"\n\t\t\t\t\t\t[class]=\"column.className\"\n\t\t\t\t\t\t[ngStyle]=\"column.style\"\n\t\t\t\t\t\t[ibmDataGridFocus]=\"isDataGrid\"\n\t\t\t\t\t\t[(columnIndex)]=\"columnIndex\"\n\t\t\t\t\t\t[draggable]=\"columnsDraggable\"\n\t\t\t\t\t\t(dragstart)=\"columnDragStart($event, i)\"\n\t\t\t\t\t\t(dragend)=\"columnDragEnd($event, i)\"\n\t\t\t\t\t\t(click)=\"setIndex(i)\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t*ngIf=\"columnsResizable\"\n\t\t\t\t\t\t\tclass=\"column-resize-handle\"\n\t\t\t\t\t\t\t(mousedown)=\"columnResizeStart($event, column)\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tclass=\"bx--table-sort\"\n\t\t\t\t\t\t\t*ngIf=\"!skeleton && this.sort.observers.length > 0 && column.sortable\"\n\t\t\t\t\t\t\t[attr.aria-label]=\"(column.sorted && column.ascending ? getSortDescendingLabel() : getSortAscendingLabel()) | async\"\n\t\t\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t\t\t'bx--table-sort--active': column.sorted,\n\t\t\t\t\t\t\t\t'bx--table-sort--ascending': column.ascending\n\t\t\t\t\t\t\t}\"\n\t\t\t\t\t\t\t(click)=\"sort.emit(i)\">\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t*ngIf=\"!column.template\"\n\t\t\t\t\t\t\t\t[title]=\"column.data\"\n\t\t\t\t\t\t\t\ttabindex=\"-1\">\n\t\t\t\t\t\t\t\t{{column.data}}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<ng-template\n\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"column.template\" [ngTemplateOutletContext]=\"{data: column.data}\">\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\tclass=\"bx--table-sort__icon\"\n\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t\t\t<path d=\"M12.3 9.3l-3.8 3.8V1h-1v12.1L3.7 9.3 3 10l5 5 5-5z\"></path>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\tclass=\"bx--table-sort__icon-unsorted\"\n\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t\t\t<path d=\"M13.8 10.3L12 12.1V2h-1v10.1l-1.8-1.8-.7.7 3 3 3-3zM4.5 2l-3 3 .7.7L4 3.9V14h1V3.9l1.8 1.8.7-.7z\"></path>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclass=\"bx--table-header-label\"\n\t\t\t\t\t\t\t*ngIf=\"!skeleton && this.sort.observers.length === 0 || (this.sort.observers.length > 0 && !column.sortable)\">\n\t\t\t\t\t\t\t<span *ngIf=\"!column.template\" [title]=\"column.data\">{{column.data}}</span>\n\t\t\t\t\t\t\t<ng-template\n\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"column.template\" [ngTemplateOutletContext]=\"{data: column.data}\">\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t[ngClass]=\"{'active': column.filterCount > 0}\"\n\t\t\t\t\t\t\t*ngIf=\"column.filterTemplate\"\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\taria-expanded=\"false\"\n\t\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\t\t[ibmTooltip]=\"column.filterTemplate\"\n\t\t\t\t\t\t\ttrigger=\"click\"\n\t\t\t\t\t\t\t[title]=\"filterTitle.subject | async\"\n\t\t\t\t\t\t\tplacement=\"bottom,top\"\n\t\t\t\t\t\t\t[data]=\"column.filterData\">\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\tclass=\"icon--sm\"\n\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 16 16\">\n\t\t\t\t\t\t\t\t<path d=\"M0 0v3l6 8v5h4v-5l6-8V0H0zm9 10.7V15H7v-4.3L1.3 3h13.5L9 10.7z\"/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t<span *ngIf=\"column.filterCount > 0\">\n\t\t\t\t\t\t\t\t{{column.filterCount}}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf=\"columnsDraggable && isColumnDragging\"\n\t\t\t\t\t\tclass=\"drop-area\">\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t*ngIf=\"columnDraggedHoverIndex == i && columnDraggedPosition == 'left'\"\n\t\t\t\t\t\t\tclass=\"drop-indicator-left\"></div>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"drop-area-left\"\n\t\t\t\t\t\t\t(dragenter)=\"columnDragEnter($event, 'left', i)\"\n\t\t\t\t\t\t\t(dragleave)=\"columnDragLeave($event, 'left', i)\"\n\t\t\t\t\t\t\t(dragover)=\"columnDragover($event, 'left', i)\"\n\t\t\t\t\t\t\t(drop)=\"columnDrop($event, 'left', i)\">\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"drop-area-right\"\n\t\t\t\t\t\t\t(dragenter)=\"columnDragEnter($event, 'right', i)\"\n\t\t\t\t\t\t\t(dragleave)=\"columnDragLeave($event, 'right', i)\"\n\t\t\t\t\t\t\t(dragover)=\"columnDragover($event, 'right', i)\"\n\t\t\t\t\t\t\t(drop)=\"columnDrop($event, 'right', i)\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t*ngIf=\"columnDraggedHoverIndex == i && columnDraggedPosition == 'right'\"\n\t\t\t\t\t\t\tclass=\"drop-indicator-right\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</th>\n\t\t\t\t</ng-container>\n\t\t\t\t<th *ngIf=\"!skeleton && stickyHeader\" [ngStyle]=\"{'width': scrollbarWidth + 'px', 'padding': 0, 'border': 0}\">\n\t\t\t\t\t<!--\n\t\t\t\t\t\tScrollbar pushes body to the left so this header column is added to push\n\t\t\t\t\t\tthe title bar the same amount and keep the header and body columns aligned.\n\t\t\t\t\t-->\n\t\t\t\t</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody\n\t\t*ngIf=\"!noData; else noDataTemplate\"\n\t\t[ngStyle]=\"{'overflow-y': 'scroll'}\"\n\t\t(scroll)=\"onScroll($event)\">\n\t\t\t<ng-container *ngFor=\"let row of model.data; let i = index\">\n\t\t\t\t<tr *ngIf=\"!model.isRowFiltered(i)\"\n\t\t\t\t\t(click)=\"onRowSelect(i)\"\n\t\t\t\t\t[attr.data-parent-row]=\"(model.isRowExpandable(i) ? 'true' : null)\"\n\t\t\t\t\t[class]=\"model.rowsClass[i] ? model.rowsClass[i] : null\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'bx--data-table--selected': model.rowsSelected[i],\n\t\t\t\t\t\t'bx--parent-row': model.isRowExpandable(i),\n\t\t\t\t\t\t'bx--expandable-row': model.rowsExpanded[i],\n\t\t\t\t\t\t'tbody_row--selectable': enableSingleSelect,\n\t\t\t\t\t\t'tbody_row--success': !model.rowsSelected[i] && model.rowsContext[i] === 'success',\n\t\t\t\t\t\t'tbody_row--warning': !model.rowsSelected[i] && model.rowsContext[i] === 'warning',\n\t\t\t\t\t\t'tbody_row--info': !model.rowsSelected[i] && model.rowsContext[i] === 'info',\n\t\t\t\t\t\t'tbody_row--error': !model.rowsSelected[i] && model.rowsContext[i] === 'error'\n\t\t\t\t\t}\">\n\t\t\t\t\t<td\n\t\t\t\t\t*ngIf=\"model.hasExpandableRows()\"\n\t\t\t\t\tclass=\"bx--table-expand\"\n\t\t\t\t\t[ibmDataGridFocus]=\"isDataGrid\"\n\t\t\t\t\t[(columnIndex)]=\"columnIndex\"\n\t\t\t\t\t[attr.data-previous-value]=\"(model.rowsExpanded[i] ? 'collapsed' : null)\"\n\t\t\t\t\t(click)=\"setExpandIndex($event)\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf=\"!skeleton && model.isRowExpandable(i)\"\n\t\t\t\t\t\tclass=\"bx--table-expand__button\"\n\t\t\t\t\t\t[attr.aria-label]=\"getExpandButtonAriaLabel() | async\"\n\t\t\t\t\t\t(click)=\"model.expandRow(i, !model.rowsExpanded[i])\">\n\t\t\t\t\t\t\t<ibm-icon-chevron-right16 innerClass=\"bx--table-expand__svg\"></ibm-icon-chevron-right16>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td\n\t\t\t\t\t\t*ngIf=\"!skeleton && showSelectionColumn\"\n\t\t\t\t\t\t[ibmDataGridFocus]=\"isDataGrid\"\n\t\t\t\t\t\t[(columnIndex)]=\"columnIndex\"\n\t\t\t\t\t\t(click)=\"setCheckboxIndex()\">\n\t\t\t\t\t\t<ibm-checkbox\n\t\t\t\t\t\t\tinline=\"true\"\n\t\t\t\t\t\t\t[aria-label]=\"checkboxRowLabel.subject | i18nReplace:getSelectionLabelValue(row) | async\"\n\t\t\t\t\t\t\t[size]=\"(size !== 'sm' ? 'md' : 'sm')\"\n\t\t\t\t\t\t\t[(ngModel)]=\"model.rowsSelected[i]\"\n\t\t\t\t\t\t\t(change)=\"onRowCheckboxChange(i)\">\n\t\t\t\t\t\t</ibm-checkbox>\n\t\t\t\t\t</td>\n\t\t\t\t\t<ng-container *ngFor=\"let item of row; let j = index\">\n\t\t\t\t\t\t<td *ngIf=\"model.header[j].visible\"\n\t\t\t\t\t\t\t[class]=\"model.header[j].className\"\n\t\t\t\t\t\t\t[ngStyle]=\"model.header[j].style\"\n\t\t\t\t\t\t\t[ibmDataGridFocus]=\"isDataGrid\"\n\t\t\t\t\t\t\t[(columnIndex)]=\"columnIndex\"\n\t\t\t\t\t\t\t(click)=\"setIndex(j)\">\n\t\t\t\t\t\t\t<span *ngIf=\"skeleton && i === 0\"></span>\n\t\t\t\t\t\t\t<ng-container *ngIf=\"!skeleton && !item.template\">{{item.data}}</ng-container>\n\t\t\t\t\t\t\t<ng-template\n\t\t\t\t\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"item.template\" [ngTemplateOutletContext]=\"{data: item.data}\">\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</ng-container>\n\t\t\t\t</tr>\n\t\t\t\t<tr\n\t\t\t\t*ngIf=\"model.rowsExpanded[i] && !model.isRowFiltered(i)\"\n\t\t\t\tclass=\"bx--expandable-row\"\n\t\t\t\tibmExpandedRowHover\n\t\t\t\t[attr.data-child-row]=\"(model.rowsExpanded[i] ? 'true' : null)\">\n\t\t\t\t\t<td\n\t\t\t\t\t\t[ibmDataGridFocus]=\"isDataGrid\"\n\t\t\t\t\t\t[(columnIndex)]=\"columnIndex\"\n\t\t\t\t\t\t[attr.colspan]=\"row.length + 2\"\n\t\t\t\t\t\t(click)=\"setExpandIndex($event)\">\n\t\t\t\t\t\t<ng-container *ngIf=\"!firstExpandedTemplateInRow(row)\">{{firstExpandedDataInRow(row)}}</ng-container>\n\t\t\t\t\t\t<ng-template\n\t\t\t\t\t\t\t[ngTemplateOutlet]=\"firstExpandedTemplateInRow(row)\"\n\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{data: firstExpandedDataInRow(row)}\">\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</ng-container>\n\t\t</tbody>\n\t\t<ng-template #noDataTemplate><ng-content></ng-content></ng-template>\n\t\t<tfoot>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]=\"footerTemplate\">\n\t\t\t</ng-template>\n\t\t\t<tr *ngIf=\"this.model.isLoading\">\n\t\t\t\t<td class=\"table_loading-indicator\">\n\t\t\t\t\t<div class=\"bx--loading bx--loading--small\">\n\t\t\t\t\t\t<svg class=\"bx--loading__svg\" viewBox=\"-75 -75 150 150\">\n\t\t\t\t\t\t\t<circle class=\"bx--loading__stroke\" cx=\"0\" cy=\"0\" r=\"37.5\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr *ngIf=\"this.model.isEnd\">\n\t\t\t\t<td class=\"table_end-indicator\">\n\t\t\t\t\t<h5>{{endOfDataText.subject | async}}</h5>\n\t\t\t\t\t<button (click)=\"scrollToTop($event)\" class=\"btn--secondary-sm\">\n\t\t\t\t\t\t{{scrollTopText.subject | async}}\n\t\t\t\t\t</button>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</tfoot>\n\t</table>\n\t"
|
|
684
|
+
template: "\n\t<table\n\t\tibmTable\n\t\tsortable=\"true\"\n\t\t[size]=\"size\"\n\t\t[striped]=\"striped\"\n\t\t[skeleton]=\"skeleton\">\n\t\t<thead\n\t\t\tibmTableHead\n\t\t\t(deselectAll)=\"onDeselectAll()\"\n\t\t\t(selectAll)=\"onSelectAll()\"\n\t\t\t(sort)=\"sort.emit($event)\"\n\t\t\t[checkboxHeaderLabel]=\"getCheckboxHeaderLabel()\"\n\t\t\t[filterTitle]=\"getFilterTitle()\"\n\t\t\t[model]=\"model\"\n\t\t\t[size]=\"size\"\n\t\t\t[selectAllCheckbox]=\"selectAllCheckbox\"\n\t\t\t[selectAllCheckboxSomeSelected]=\"selectAllCheckboxSomeSelected\"\n\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[sortAscendingLabel]=\"sortAscendingLabel\"\n\t\t\t[sortDescendingLabel]=\"sortDescendingLabel\"\n\t\t\t[stickyHeader]=\"stickyHeader\">\n\t\t</thead>\n\t\t<tbody\n\t\t\tibmTableBody\n\t\t\t(deselectRow)=\"onSelectRow($event)\"\n\t\t\t(scroll)=\"onScroll($event)\"\n\t\t\t(selectRow)=\"onSelectRow($event)\"\n\t\t\t[checkboxRowLabel]=\"getCheckboxRowLabel()\"\n\t\t\t[enableSingleSelect]=\"enableSingleSelect\"\n\t\t\t[expandButtonAriaLabel]=\"expandButtonAriaLabel\"\n\t\t\t[model]=\"model\"\n\t\t\t[size]=\"size\"\n\t\t\t[ngStyle]=\"{'overflow-y': 'scroll'}\"\n\t\t\t[selectionLabelColumn]=\"selectionLabelColumn\"\n\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t*ngIf=\"!noData; else noDataTemplate\">\n\t\t</tbody>\n\t\t<ng-template #noDataTemplate><ng-content></ng-content></ng-template>\n\t\t<tfoot>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]=\"footerTemplate\">\n\t\t\t</ng-template>\n\t\t\t<tr *ngIf=\"this.model.isLoading\">\n\t\t\t\t<td class=\"table_loading-indicator\">\n\t\t\t\t\t<div class=\"bx--loading bx--loading--small\">\n\t\t\t\t\t\t<svg class=\"bx--loading__svg\" viewBox=\"-75 -75 150 150\">\n\t\t\t\t\t\t\t<circle class=\"bx--loading__stroke\" cx=\"0\" cy=\"0\" r=\"37.5\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr *ngIf=\"this.model.isEnd\">\n\t\t\t\t<td class=\"table_end-indicator\">\n\t\t\t\t\t<h5>{{getEndOfDataText() | async}}</h5>\n\t\t\t\t\t<button (click)=\"scrollToTop($event)\" class=\"btn--secondary-sm\">\n\t\t\t\t\t\t{{getScrollTopText() | async}}\n\t\t\t\t\t</button>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</tfoot>\n\t</table>\n\t"
|
|
694
685
|
},] },
|
|
695
686
|
];
|
|
696
687
|
/** @nocollapse */
|
|
@@ -700,10 +691,10 @@ var Table = /** @class */ (function () {
|
|
|
700
691
|
{ type: I18n }
|
|
701
692
|
]; };
|
|
702
693
|
Table.propDecorators = {
|
|
694
|
+
model: [{ type: Input }],
|
|
703
695
|
size: [{ type: Input }],
|
|
704
696
|
skeleton: [{ type: Input }],
|
|
705
697
|
isDataGrid: [{ type: Input }],
|
|
706
|
-
model: [{ type: Input }],
|
|
707
698
|
enableRowSelect: [{ type: Input }],
|
|
708
699
|
showSelectionColumn: [{ type: Input }],
|
|
709
700
|
enableSingleSelect: [{ type: Input }],
|