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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"TableHead":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"[ibmTableHead]","template":"\n\t<ng-container *ngIf=\"model\">\n\t\t<tr>\n\t\t\t<th ibmTableHeadExpand *ngIf=\"model.hasExpandableRows()\"></th>\n\t\t\t<th\n\t\t\t\tibmTableHeadCheckbox\n\t\t\t\t*ngIf=\"!skeleton && showSelectionColumn\"\n\t\t\t\t[checked]=\"selectAllCheckbox\"\n\t\t\t\t[indeterminate]=\"selectAllCheckboxSomeSelected\"\n\t\t\t\t[ariaLabel]=\"getCheckboxHeaderLabel()\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[skeleton]=\"skeleton\"\n\t\t\t\t(change)=\"onSelectAllCheckboxChange()\">\n\t\t\t</th>\n\t\t\t<ng-container *ngFor=\"let column of model.header; let i = index\">\n\t\t\t\t<th\n\t\t\t\t\tibmTableHeadCell\n\t\t\t\t\t[column]=\"column\"\n\t\t\t\t\t[filterTitle]=\"getFilterTitle()\"\n\t\t\t\t\t(sort)=\"sort.emit(i)\"\n\t\t\t\t\t*ngIf=\"column.visible\"\n\t\t\t\t\t[class]=\"column.className\"\n\t\t\t\t\t[ngStyle]=\"column.style\">\n\t\t\t\t</th>\n\t\t\t</ng-container>\n\t\t\t<th *ngIf=\"!skeleton && stickyHeader\" [ngStyle]=\"{'width': scrollbarWidth + 'px', 'padding': 0, 'border': 0}\">\n\t\t\t\t<!--\n\t\t\t\t\tScrollbar pushes body to the left so this header column is added to push\n\t\t\t\t\tthe title bar the same amount and keep the header and body columns aligned.\n\t\t\t\t-->\n\t\t\t</th>\n\t\t</tr>\n\t</ng-container>\n\t<ng-content></ng-content>\n\t"}]}],"members":{"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":60,"character":2}}]}],"showSelectionColumn":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":62,"character":2}}]}],"selectAllCheckboxSomeSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":64,"character":2}}]}],"selectAllCheckbox":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":66,"character":2}}]}],"skeleton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":68,"character":2}}]}],"stickyHeader":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":70,"character":2}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":75,"character":2}}]}],"checkboxHeaderLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":77,"character":2}}]}],"sortDescendingLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":86,"character":2}}]}],"sortAscendingLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":95,"character":2}}]}],"filterTitle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":104,"character":2}}]}],"sort":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":116,"character":2}}]}],"selectAll":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":122,"character":2}}]}],"deselectAll":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":128,"character":2}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../i18n/i18n.module","name":"I18n","line":137,"character":29}]}],"onSelectAllCheckboxChange":[{"__symbolic":"method"}],"getCheckboxHeaderLabel":[{"__symbolic":"method"}],"getSortDescendingLabel":[{"__symbolic":"method"}],"getSortAscendingLabel":[{"__symbolic":"method"}],"getFilterTitle":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
* carbon-angular v0.0.0 | table-head.component.ngfactory.d.ts
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2014, 2019 IBM
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
* carbon-angular v0.0.0 | table-head.component.ngfactory.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2014, 2019 IBM
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @fileoverview This file was generated by the Angular template compiler. Do not edit.
|
|
23
|
+
*
|
|
24
|
+
* @suppress {suspiciousCode,uselessCode,missingProperties,missingOverride,checkTypes}
|
|
25
|
+
* tslint:disable
|
|
26
|
+
*/
|
|
27
|
+
import * as i0 from "@angular/core";
|
|
28
|
+
import * as i1 from "./table-head-expand.component.ngfactory";
|
|
29
|
+
import * as i2 from "./table-head-expand.component";
|
|
30
|
+
import * as i3 from "./table-head-checkbox.component.ngfactory";
|
|
31
|
+
import * as i4 from "./table-head-checkbox.component";
|
|
32
|
+
import * as i5 from "../../i18n/i18n.service";
|
|
33
|
+
import * as i6 from "./table-head-cell.component.ngfactory";
|
|
34
|
+
import * as i7 from "@angular/common";
|
|
35
|
+
import * as i8 from "./table-head-cell.component";
|
|
36
|
+
import * as i9 from "./table-head.component";
|
|
37
|
+
var styles_TableHead = [];
|
|
38
|
+
var RenderType_TableHead = i0.ɵcrt({ encapsulation: 2, styles: styles_TableHead, data: {} });
|
|
39
|
+
export { RenderType_TableHead as RenderType_TableHead };
|
|
40
|
+
function View_TableHead_2(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 1, "th", [["ibmTableHeadExpand", ""]], [[2, "bx--table-expand", null]], null, null, i1.View_TableHeadExpand_0, i1.RenderType_TableHeadExpand)), i0.ɵdid(1, 49152, null, 0, i2.TableHeadExpand, [], null, null)], null, function (_ck, _v) { var currVal_0 = i0.ɵnov(_v, 1).hostClass; _ck(_v, 0, 0, currVal_0); }); }
|
|
41
|
+
function View_TableHead_3(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 1, "th", [["ibmTableHeadCheckbox", ""]], [[2, "bx--table-column-checkbox", null], [1, "style", 2]], [[null, "change"]], function (_v, en, $event) { var ad = true; var _co = _v.component; if (("change" === en)) {
|
|
42
|
+
var pd_0 = (_co.onSelectAllCheckboxChange() !== false);
|
|
43
|
+
ad = (pd_0 && ad);
|
|
44
|
+
} return ad; }, i3.View_TableHeadCheckbox_0, i3.RenderType_TableHeadCheckbox)), i0.ɵdid(1, 49152, null, 0, i4.TableHeadCheckbox, [i5.I18n], { size: [0, "size"], checked: [1, "checked"], indeterminate: [2, "indeterminate"], skeleton: [3, "skeleton"], ariaLabel: [4, "ariaLabel"] }, { change: "change" })], function (_ck, _v) { var _co = _v.component; var currVal_2 = _co.size; var currVal_3 = _co.selectAllCheckbox; var currVal_4 = _co.selectAllCheckboxSomeSelected; var currVal_5 = _co.skeleton; var currVal_6 = _co.getCheckboxHeaderLabel(); _ck(_v, 1, 0, currVal_2, currVal_3, currVal_4, currVal_5, currVal_6); }, function (_ck, _v) { var currVal_0 = i0.ɵnov(_v, 1).hostClass; var currVal_1 = i0.ɵnov(_v, 1).hostStyle; _ck(_v, 0, 0, currVal_0, currVal_1); }); }
|
|
45
|
+
function View_TableHead_5(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 2, "th", [["ibmTableHeadCell", ""]], [[8, "className", 0], [2, "thead_action", null]], [[null, "sort"]], function (_v, en, $event) { var ad = true; var _co = _v.component; if (("sort" === en)) {
|
|
46
|
+
var pd_0 = (_co.sort.emit(_v.parent.context.index) !== false);
|
|
47
|
+
ad = (pd_0 && ad);
|
|
48
|
+
} return ad; }, i6.View_TableHeadCell_0, i6.RenderType_TableHeadCell)), i0.ɵdid(1, 278528, null, 0, i7.NgStyle, [i0.KeyValueDiffers, i0.ElementRef, i0.Renderer2], { ngStyle: [0, "ngStyle"] }, null), i0.ɵdid(2, 573440, null, 0, i8.TableHeadCell, [i5.I18n], { column: [0, "column"], filterTitle: [1, "filterTitle"] }, { sort: "sort" })], function (_ck, _v) { var _co = _v.component; var currVal_2 = _v.parent.context.$implicit.style; _ck(_v, 1, 0, currVal_2); var currVal_3 = _v.parent.context.$implicit; var currVal_4 = _co.getFilterTitle(); _ck(_v, 2, 0, currVal_3, currVal_4); }, function (_ck, _v) { var currVal_0 = _v.parent.context.$implicit.className; var currVal_1 = i0.ɵnov(_v, 2).theadAction; _ck(_v, 0, 0, currVal_0, currVal_1); }); }
|
|
49
|
+
function View_TableHead_4(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 2, null, null, null, null, null, null, null)), (_l()(), i0.ɵand(16777216, null, null, 1, null, View_TableHead_5)), i0.ɵdid(2, 16384, null, 0, i7.NgIf, [i0.ViewContainerRef, i0.TemplateRef], { ngIf: [0, "ngIf"] }, null), (_l()(), i0.ɵand(0, null, null, 0))], function (_ck, _v) { var currVal_0 = _v.context.$implicit.visible; _ck(_v, 2, 0, currVal_0); }, null); }
|
|
50
|
+
function View_TableHead_6(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 2, "th", [], null, null, null, null, null)), i0.ɵdid(1, 278528, null, 0, i7.NgStyle, [i0.KeyValueDiffers, i0.ElementRef, i0.Renderer2], { ngStyle: [0, "ngStyle"] }, null), i0.ɵpod(2, { "width": 0, "padding": 1, "border": 2 })], function (_ck, _v) { var _co = _v.component; var currVal_0 = _ck(_v, 2, 0, (_co.scrollbarWidth + "px"), 0, 0); _ck(_v, 1, 0, currVal_0); }, null); }
|
|
51
|
+
function View_TableHead_1(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 9, null, null, null, null, null, null, null)), (_l()(), i0.ɵeld(1, 0, null, null, 8, "tr", [], null, null, null, null, null)), (_l()(), i0.ɵand(16777216, null, null, 1, null, View_TableHead_2)), i0.ɵdid(3, 16384, null, 0, i7.NgIf, [i0.ViewContainerRef, i0.TemplateRef], { ngIf: [0, "ngIf"] }, null), (_l()(), i0.ɵand(16777216, null, null, 1, null, View_TableHead_3)), i0.ɵdid(5, 16384, null, 0, i7.NgIf, [i0.ViewContainerRef, i0.TemplateRef], { ngIf: [0, "ngIf"] }, null), (_l()(), i0.ɵand(16777216, null, null, 1, null, View_TableHead_4)), i0.ɵdid(7, 278528, null, 0, i7.NgForOf, [i0.ViewContainerRef, i0.TemplateRef, i0.IterableDiffers], { ngForOf: [0, "ngForOf"] }, null), (_l()(), i0.ɵand(16777216, null, null, 1, null, View_TableHead_6)), i0.ɵdid(9, 16384, null, 0, i7.NgIf, [i0.ViewContainerRef, i0.TemplateRef], { ngIf: [0, "ngIf"] }, null)], function (_ck, _v) { var _co = _v.component; var currVal_0 = _co.model.hasExpandableRows(); _ck(_v, 3, 0, currVal_0); var currVal_1 = (!_co.skeleton && _co.showSelectionColumn); _ck(_v, 5, 0, currVal_1); var currVal_2 = _co.model.header; _ck(_v, 7, 0, currVal_2); var currVal_3 = (!_co.skeleton && _co.stickyHeader); _ck(_v, 9, 0, currVal_3); }, null); }
|
|
52
|
+
export function View_TableHead_0(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵand(16777216, null, null, 1, null, View_TableHead_1)), i0.ɵdid(1, 16384, null, 0, i7.NgIf, [i0.ViewContainerRef, i0.TemplateRef], { ngIf: [0, "ngIf"] }, null), i0.ɵncd(null, 0)], function (_ck, _v) { var _co = _v.component; var currVal_0 = _co.model; _ck(_v, 1, 0, currVal_0); }, null); }
|
|
53
|
+
export function View_TableHead_Host_0(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 1, "div", [["ibmTableHead", ""]], null, null, null, View_TableHead_0, RenderType_TableHead)), i0.ɵdid(1, 49152, null, 0, i9.TableHead, [i5.I18n], null, null)], null, null); }
|
|
54
|
+
var TableHeadNgFactory = i0.ɵccf("[ibmTableHead]", i9.TableHead, View_TableHead_Host_0, { model: "model", showSelectionColumn: "showSelectionColumn", selectAllCheckboxSomeSelected: "selectAllCheckboxSomeSelected", selectAllCheckbox: "selectAllCheckbox", skeleton: "skeleton", stickyHeader: "stickyHeader", size: "size", checkboxHeaderLabel: "checkboxHeaderLabel", sortDescendingLabel: "sortDescendingLabel", sortAscendingLabel: "sortAscendingLabel", filterTitle: "filterTitle" }, { sort: "sort", selectAll: "selectAll", deselectAll: "deselectAll" }, ["*"]);
|
|
55
|
+
export { TableHeadNgFactory as TableHeadNgFactory };
|
|
56
|
+
//# sourceMappingURL=table-head.component.ngfactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-head.component.ngfactory.js","sourceRoot":"","sources":["../../src/table/head/table-head.component.ngfactory.ts","../../src/table/head/table-head.component.ts.TableHead.html"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;oDCGG,+UAAyD;oDACzD,iNAQwC,YAAvC;;wBAAsC;MARvC,ySAQwC,mDAFvC,mBAAa,OAHb,mBAA6B,oBAC7B,mBAA+C,gCAG/C,mBAAqB,WAFrB,mBAAsC,2BALvC,YAQwC,EAFvC,SAAa,EAHb,SAA6B,EAC7B,SAA+C,EAG/C,SAAqB,EAFrB,SAAsC,2BALvC,sHAQwC;oDAGvC,kMAO0B,YAHzB;;wBAAqB;MAJtB,wUAO0B,mDAAzB,kBAAwB,iCAPzB,YAO0B,EAAzB,SAAwB,GALxB,kBAAiB,2BACjB,mBAAgC,mBAHjC,YAO0B,EALzB,SAAiB,EACjB,SAAgC,2BAGhC,kBAA0B,qCAN3B,wDAO0B,EADzB,SAA0B,EAN3B,SAO0B;oDAR3B,6EAAiE,KAChE,yKAO0B,8DAFzB,kBAAsB,4BALvB,YAO0B,EAFzB,SAAsB;oDAKxB,2MAA8G,GAAxE,oKAAuE,GAA7G,YAA8G,EAAxE,SAAuE;oDAxB/G,6EAA4B,KAC3B,2EAAI,KACH,yKAAyD,IACzD,yKAQwC,IAExC,uMAAiE,IAWjE,yKAA8G,iDAtBvF,mBAAiC,4BAAxD,YAAyD,EAAlC,SAAiC,GAGvD,qCAAwC,uBAFzC,YAQwC,EANvC,SAAwC,GAQ3B,mBAAkD,eAAhE,YAAiE,EAAnD,SAAkD,GAW5D,qCAAiC,gBAArC,YAA8G,EAA1G,SAAiC;2DAxBvC,yKAA4B,GAgC5B,eAAY,iDAhCE,mBAAa,QAA3B,YAA4B,EAAd,SAAa","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n","\n\t<ng-container *ngIf=\"model\">\n\t\t<tr>\n\t\t\t<th ibmTableHeadExpand *ngIf=\"model.hasExpandableRows()\"></th>\n\t\t\t<th\n\t\t\t\tibmTableHeadCheckbox\n\t\t\t\t*ngIf=\"!skeleton && showSelectionColumn\"\n\t\t\t\t[checked]=\"selectAllCheckbox\"\n\t\t\t\t[indeterminate]=\"selectAllCheckboxSomeSelected\"\n\t\t\t\t[ariaLabel]=\"getCheckboxHeaderLabel()\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[skeleton]=\"skeleton\"\n\t\t\t\t(change)=\"onSelectAllCheckboxChange()\">\n\t\t\t</th>\n\t\t\t<ng-container *ngFor=\"let column of model.header; let i = index\">\n\t\t\t\t<th\n\t\t\t\t\tibmTableHeadCell\n\t\t\t\t\t[column]=\"column\"\n\t\t\t\t\t[filterTitle]=\"getFilterTitle()\"\n\t\t\t\t\t(sort)=\"sort.emit(i)\"\n\t\t\t\t\t*ngIf=\"column.visible\"\n\t\t\t\t\t[class]=\"column.className\"\n\t\t\t\t\t[ngStyle]=\"column.style\">\n\t\t\t\t</th>\n\t\t\t</ng-container>\n\t\t\t<th *ngIf=\"!skeleton && stickyHeader\" [ngStyle]=\"{'width': scrollbarWidth + 'px', 'padding': 0, 'border': 0}\">\n\t\t\t\t<!--\n\t\t\t\t\tScrollbar pushes body to the left so this header column is added to push\n\t\t\t\t\tthe title bar the same amount and keep the header and body columns aligned.\n\t\t\t\t-->\n\t\t\t</th>\n\t\t</tr>\n\t</ng-container>\n\t<ng-content></ng-content>\n\t"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"class","members":{"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"showSelectionColumn":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"selectAllCheckboxSomeSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"selectAllCheckbox":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"skeleton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"stickyHeader":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"checkboxHeaderLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"sortDescendingLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"sortAscendingLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"filterTitle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"sort":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":2,"members":[]}}]}],"selectAll":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":2,"members":[]}}]}],"deselectAll":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":2,"members":[]}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbol":3,"members":[]}]}],"onSelectAllCheckboxChange":[{"__symbolic":"method"}],"getCheckboxHeaderLabel":[{"__symbolic":"method"}],"getSortDescendingLabel":[{"__symbolic":"method"}],"getSortAscendingLabel":[{"__symbolic":"method"}],"getFilterTitle":[{"__symbolic":"method"}]}},"type":{"summaryKind":1,"type":{"reference":{"__symbol":0,"members":[]},"diDeps":[{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":4,"members":[]}}}}],"lifecycleHooks":[]},"isComponent":true,"selector":"[ibmTableHead]","exportAs":null,"inputs":{"model":"model","showSelectionColumn":"showSelectionColumn","selectAllCheckboxSomeSelected":"selectAllCheckboxSomeSelected","selectAllCheckbox":"selectAllCheckbox","skeleton":"skeleton","stickyHeader":"stickyHeader","size":"size","checkboxHeaderLabel":"checkboxHeaderLabel","sortDescendingLabel":"sortDescendingLabel","sortAscendingLabel":"sortAscendingLabel","filterTitle":"filterTitle"},"outputs":{"sort":"sort","selectAll":"selectAll","deselectAll":"deselectAll"},"hostListeners":{},"hostProperties":{},"hostAttributes":{},"providers":[],"viewProviders":[],"queries":[],"guards":{},"viewQueries":[],"entryComponents":[],"changeDetection":1,"template":{"ngContentSelectors":["*"],"encapsulation":2},"componentViewType":{"__symbol":5,"members":[]},"rendererType":{"__symbol":6,"members":[]},"componentFactory":{"__symbol":7,"members":[]}}}],"symbols":[{"__symbol":0,"name":"TableHead","filePath":"./table-head.component"},{"__symbol":1,"name":"Input","filePath":"@angular/core"},{"__symbol":2,"name":"Output","filePath":"@angular/core"},{"__symbol":3,"name":"I18n","filePath":"../../i18n/i18n.module"},{"__symbol":4,"name":"I18n","filePath":"../../i18n/i18n.service"},{"__symbol":5,"name":"View_TableHead_0","filePath":"./table-head.component.ngfactory"},{"__symbol":6,"name":"RenderType_TableHead","filePath":"./table-head.component.ngfactory"},{"__symbol":7,"name":"TableHeadNgFactory","filePath":"./table-head.component.ngfactory"}]}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
* carbon-angular v0.0.0 | table-adapter.class.d.ts
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2014, 2019 IBM
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* An abstract class that represents a cell in a table
|
|
23
|
+
*/
|
|
24
|
+
export declare abstract class TableCellAdapter {
|
|
25
|
+
/**
|
|
26
|
+
* The index of the cell in the table
|
|
27
|
+
*/
|
|
28
|
+
cellIndex: number;
|
|
29
|
+
/**
|
|
30
|
+
* The number of columns spanned by this cell
|
|
31
|
+
*/
|
|
32
|
+
colSpan: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* An abstract class that represents a row in a table
|
|
36
|
+
*/
|
|
37
|
+
export declare abstract class TableRowAdapter {
|
|
38
|
+
/**
|
|
39
|
+
* The index of the row in the table
|
|
40
|
+
*/
|
|
41
|
+
rowIndex: number;
|
|
42
|
+
/**
|
|
43
|
+
* An array (or `HTMLCollection`) of `TableCellAdapter`s
|
|
44
|
+
*/
|
|
45
|
+
cells: HTMLCollection | TableCellAdapter[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* An abstract representation of a table that provides
|
|
49
|
+
* a standard interface to query 2d tables for cell and row information.
|
|
50
|
+
*/
|
|
51
|
+
export declare abstract class TableAdapter {
|
|
52
|
+
/**
|
|
53
|
+
* The last acccessible column in the table
|
|
54
|
+
*/
|
|
55
|
+
readonly lastColumnIndex: number;
|
|
56
|
+
/**
|
|
57
|
+
* The last accessible row in the table
|
|
58
|
+
*/
|
|
59
|
+
readonly lastRowIndex: number;
|
|
60
|
+
/**
|
|
61
|
+
* Returns a cell from the table
|
|
62
|
+
*
|
|
63
|
+
* @param row index of the row
|
|
64
|
+
* @param column index of the column
|
|
65
|
+
*/
|
|
66
|
+
getCell(row: number, column: number): TableCellAdapter;
|
|
67
|
+
/**
|
|
68
|
+
* Returns a row from the table
|
|
69
|
+
*
|
|
70
|
+
* @param row index of the row
|
|
71
|
+
*/
|
|
72
|
+
getRow(row: number): TableRowAdapter;
|
|
73
|
+
/**
|
|
74
|
+
* Finds the column index of a given cell
|
|
75
|
+
*
|
|
76
|
+
* @param cell the cell to search for
|
|
77
|
+
*/
|
|
78
|
+
findColumnIndex(cell: TableCellAdapter): number;
|
|
79
|
+
/**
|
|
80
|
+
* Finds the row index of a given cell
|
|
81
|
+
*
|
|
82
|
+
* @param cell the cell to search for
|
|
83
|
+
*/
|
|
84
|
+
findRowIndex(cell: TableCellAdapter): number;
|
|
85
|
+
/**
|
|
86
|
+
* Finds the row and column index of a given cell
|
|
87
|
+
*
|
|
88
|
+
* @param cell the cell to search for
|
|
89
|
+
* @returns a tuple that follows the `[row, column]` convention
|
|
90
|
+
*/
|
|
91
|
+
findIndex(cell: TableCellAdapter): [number, number];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* A concrete implementation of `TableAdapter`
|
|
95
|
+
*
|
|
96
|
+
* Provides standard and consistent access to table cells and rows
|
|
97
|
+
*/
|
|
98
|
+
export declare class TableDomAdapter implements TableAdapter {
|
|
99
|
+
tableElement: HTMLTableElement;
|
|
100
|
+
/**
|
|
101
|
+
* The last acccessible column in the table
|
|
102
|
+
*/
|
|
103
|
+
readonly lastColumnIndex: number;
|
|
104
|
+
/**
|
|
105
|
+
* The last accessible row in the table
|
|
106
|
+
*/
|
|
107
|
+
readonly lastRowIndex: number;
|
|
108
|
+
/**
|
|
109
|
+
* `TableDomAdapter` works on a normal HTML table structure.
|
|
110
|
+
* Custom tables that don't follow the standard structure should use a custom implementation of `TableAdapter`.
|
|
111
|
+
*
|
|
112
|
+
* The standard structure allows us to directly query rows for cells and indexes - though we do have to handle colspans specially.
|
|
113
|
+
*
|
|
114
|
+
* @param tableElement the root HTML table element.
|
|
115
|
+
*/
|
|
116
|
+
constructor(tableElement: HTMLTableElement);
|
|
117
|
+
/**
|
|
118
|
+
* Returns a cell from the table taking colspans in to account.
|
|
119
|
+
*
|
|
120
|
+
* @param row index of the row
|
|
121
|
+
* @param column index of the column
|
|
122
|
+
*/
|
|
123
|
+
getCell(row: number, column: number): HTMLTableCellElement;
|
|
124
|
+
/**
|
|
125
|
+
* Returns a row from the table
|
|
126
|
+
*
|
|
127
|
+
* @param row index of the row
|
|
128
|
+
*/
|
|
129
|
+
getRow(row: number): HTMLTableRowElement;
|
|
130
|
+
/**
|
|
131
|
+
* Finds the column index of a given cell
|
|
132
|
+
*
|
|
133
|
+
* @param cell the cell to search for
|
|
134
|
+
*/
|
|
135
|
+
findColumnIndex(cell: HTMLTableCellElement): number;
|
|
136
|
+
/**
|
|
137
|
+
* Finds the row index of a given cell
|
|
138
|
+
*
|
|
139
|
+
* @param cell the cell to search for
|
|
140
|
+
*/
|
|
141
|
+
findRowIndex(cell: HTMLTableCellElement): number;
|
|
142
|
+
/**
|
|
143
|
+
* Finds the row and column index of a given cell
|
|
144
|
+
*
|
|
145
|
+
* @param cell the cell to search for
|
|
146
|
+
* @returns a tuple that follows the `[row, column]` convention
|
|
147
|
+
*/
|
|
148
|
+
findIndex(cell: HTMLTableCellElement): [number, number];
|
|
149
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
* carbon-angular v0.0.0 | table-adapter.class.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2014, 2019 IBM
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* An abstract class that represents a cell in a table
|
|
23
|
+
*/
|
|
24
|
+
var TableCellAdapter = /** @class */ (function () {
|
|
25
|
+
function TableCellAdapter() {
|
|
26
|
+
}
|
|
27
|
+
return TableCellAdapter;
|
|
28
|
+
}());
|
|
29
|
+
export { TableCellAdapter };
|
|
30
|
+
/**
|
|
31
|
+
* An abstract class that represents a row in a table
|
|
32
|
+
*/
|
|
33
|
+
var TableRowAdapter = /** @class */ (function () {
|
|
34
|
+
function TableRowAdapter() {
|
|
35
|
+
}
|
|
36
|
+
return TableRowAdapter;
|
|
37
|
+
}());
|
|
38
|
+
export { TableRowAdapter };
|
|
39
|
+
/**
|
|
40
|
+
* An abstract representation of a table that provides
|
|
41
|
+
* a standard interface to query 2d tables for cell and row information.
|
|
42
|
+
*/
|
|
43
|
+
var TableAdapter = /** @class */ (function () {
|
|
44
|
+
function TableAdapter() {
|
|
45
|
+
}
|
|
46
|
+
Object.defineProperty(TableAdapter.prototype, "lastColumnIndex", {
|
|
47
|
+
/**
|
|
48
|
+
* The last acccessible column in the table
|
|
49
|
+
*/
|
|
50
|
+
get: function () { return; },
|
|
51
|
+
enumerable: true,
|
|
52
|
+
configurable: true
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(TableAdapter.prototype, "lastRowIndex", {
|
|
55
|
+
/**
|
|
56
|
+
* The last accessible row in the table
|
|
57
|
+
*/
|
|
58
|
+
get: function () { return; },
|
|
59
|
+
enumerable: true,
|
|
60
|
+
configurable: true
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* Returns a cell from the table
|
|
64
|
+
*
|
|
65
|
+
* @param row index of the row
|
|
66
|
+
* @param column index of the column
|
|
67
|
+
*/
|
|
68
|
+
TableAdapter.prototype.getCell = function (row, column) { return; };
|
|
69
|
+
/**
|
|
70
|
+
* Returns a row from the table
|
|
71
|
+
*
|
|
72
|
+
* @param row index of the row
|
|
73
|
+
*/
|
|
74
|
+
TableAdapter.prototype.getRow = function (row) { return; };
|
|
75
|
+
/**
|
|
76
|
+
* Finds the column index of a given cell
|
|
77
|
+
*
|
|
78
|
+
* @param cell the cell to search for
|
|
79
|
+
*/
|
|
80
|
+
TableAdapter.prototype.findColumnIndex = function (cell) { return; };
|
|
81
|
+
/**
|
|
82
|
+
* Finds the row index of a given cell
|
|
83
|
+
*
|
|
84
|
+
* @param cell the cell to search for
|
|
85
|
+
*/
|
|
86
|
+
TableAdapter.prototype.findRowIndex = function (cell) { return; };
|
|
87
|
+
/**
|
|
88
|
+
* Finds the row and column index of a given cell
|
|
89
|
+
*
|
|
90
|
+
* @param cell the cell to search for
|
|
91
|
+
* @returns a tuple that follows the `[row, column]` convention
|
|
92
|
+
*/
|
|
93
|
+
TableAdapter.prototype.findIndex = function (cell) { return; };
|
|
94
|
+
return TableAdapter;
|
|
95
|
+
}());
|
|
96
|
+
export { TableAdapter };
|
|
97
|
+
/**
|
|
98
|
+
* A concrete implementation of `TableAdapter`
|
|
99
|
+
*
|
|
100
|
+
* Provides standard and consistent access to table cells and rows
|
|
101
|
+
*/
|
|
102
|
+
var TableDomAdapter = /** @class */ (function () {
|
|
103
|
+
/**
|
|
104
|
+
* `TableDomAdapter` works on a normal HTML table structure.
|
|
105
|
+
* Custom tables that don't follow the standard structure should use a custom implementation of `TableAdapter`.
|
|
106
|
+
*
|
|
107
|
+
* The standard structure allows us to directly query rows for cells and indexes - though we do have to handle colspans specially.
|
|
108
|
+
*
|
|
109
|
+
* @param tableElement the root HTML table element.
|
|
110
|
+
*/
|
|
111
|
+
function TableDomAdapter(tableElement) {
|
|
112
|
+
this.tableElement = tableElement;
|
|
113
|
+
}
|
|
114
|
+
Object.defineProperty(TableDomAdapter.prototype, "lastColumnIndex", {
|
|
115
|
+
/**
|
|
116
|
+
* The last acccessible column in the table
|
|
117
|
+
*/
|
|
118
|
+
get: function () {
|
|
119
|
+
return this.tableElement.rows[0].cells.length - 1;
|
|
120
|
+
},
|
|
121
|
+
enumerable: true,
|
|
122
|
+
configurable: true
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(TableDomAdapter.prototype, "lastRowIndex", {
|
|
125
|
+
/**
|
|
126
|
+
* The last accessible row in the table
|
|
127
|
+
*/
|
|
128
|
+
get: function () {
|
|
129
|
+
return this.tableElement.rows.length - 1;
|
|
130
|
+
},
|
|
131
|
+
enumerable: true,
|
|
132
|
+
configurable: true
|
|
133
|
+
});
|
|
134
|
+
/**
|
|
135
|
+
* Returns a cell from the table taking colspans in to account.
|
|
136
|
+
*
|
|
137
|
+
* @param row index of the row
|
|
138
|
+
* @param column index of the column
|
|
139
|
+
*/
|
|
140
|
+
TableDomAdapter.prototype.getCell = function (row, column) {
|
|
141
|
+
var baseRow = this.getRow(row);
|
|
142
|
+
var baseCells = Array.from(baseRow.cells);
|
|
143
|
+
// rows can have fewer total cells than the actual table
|
|
144
|
+
// the model pretends all rows behave the same (with colspans > 1 being N cells long)
|
|
145
|
+
// this maps that view to the HTML view (colspans > 1 are one element, so the array is shorter)
|
|
146
|
+
var realIndex = 0;
|
|
147
|
+
// i is only used for iterating the "cells"
|
|
148
|
+
for (var i = 0; i < column;) {
|
|
149
|
+
// skip the next N "cells"
|
|
150
|
+
i += baseCells[realIndex].colSpan;
|
|
151
|
+
// don't bump realIndex if i now exceeds the column we're shooting for
|
|
152
|
+
if (i > column) {
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
// finally, increment realIndex (to keep it generally in step with i)
|
|
156
|
+
realIndex++;
|
|
157
|
+
}
|
|
158
|
+
return baseCells[realIndex];
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Returns a row from the table
|
|
162
|
+
*
|
|
163
|
+
* @param row index of the row
|
|
164
|
+
*/
|
|
165
|
+
TableDomAdapter.prototype.getRow = function (row) {
|
|
166
|
+
return this.tableElement.rows[row];
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Finds the column index of a given cell
|
|
170
|
+
*
|
|
171
|
+
* @param cell the cell to search for
|
|
172
|
+
*/
|
|
173
|
+
TableDomAdapter.prototype.findColumnIndex = function (cell) {
|
|
174
|
+
var row = this.getRow(this.findRowIndex(cell));
|
|
175
|
+
var cellIndex = 0;
|
|
176
|
+
for (var _i = 0, _a = Array.from(row.cells); _i < _a.length; _i++) {
|
|
177
|
+
var c = _a[_i];
|
|
178
|
+
if (c === cell) {
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
cellIndex += c.colSpan;
|
|
182
|
+
}
|
|
183
|
+
return cellIndex;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Finds the row index of a given cell
|
|
187
|
+
*
|
|
188
|
+
* @param cell the cell to search for
|
|
189
|
+
*/
|
|
190
|
+
TableDomAdapter.prototype.findRowIndex = function (cell) {
|
|
191
|
+
for (var _i = 0, _a = Array.from(this.tableElement.rows); _i < _a.length; _i++) {
|
|
192
|
+
var row = _a[_i];
|
|
193
|
+
if (row.contains(cell)) {
|
|
194
|
+
return row.rowIndex;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Finds the row and column index of a given cell
|
|
200
|
+
*
|
|
201
|
+
* @param cell the cell to search for
|
|
202
|
+
* @returns a tuple that follows the `[row, column]` convention
|
|
203
|
+
*/
|
|
204
|
+
TableDomAdapter.prototype.findIndex = function (cell) {
|
|
205
|
+
return [this.findRowIndex(cell), this.findColumnIndex(cell)];
|
|
206
|
+
};
|
|
207
|
+
return TableDomAdapter;
|
|
208
|
+
}());
|
|
209
|
+
export { TableDomAdapter };
|
|
210
|
+
//# sourceMappingURL=table-adapter.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-adapter.class.js","sourceRoot":"","sources":["../src/table/table-adapter.class.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;IAAA;IASA,CAAC;IAAD,uBAAC;AAAD,CAAC,AATD,IASC;;AAED;;GAEG;AACH;IAAA;IASA,CAAC;IAAD,sBAAC;AAAD,CAAC,AATD,IASC;;AAED;;;GAGG;AACH;IAAA;IA+CA,CAAC;IA3CA,sBAAW,yCAAe;QAH1B;;WAEG;aACH,cAAuC,OAAO,CAAC,CAAC;;;OAAA;IAKhD,sBAAW,sCAAY;QAHvB;;WAEG;aACH,cAAoC,OAAO,CAAC,CAAC;;;OAAA;IAE7C;;;;;OAKG;IACH,8BAAO,GAAP,UAAQ,GAAW,EAAE,MAAc,IAAsB,OAAO,CAAC,CAAC;IAElE;;;;OAIG;IACH,6BAAM,GAAN,UAAO,GAAW,IAAqB,OAAO,CAAC,CAAC;IAEhD;;;;OAIG;IACH,sCAAe,GAAf,UAAgB,IAAsB,IAAY,OAAO,CAAC,CAAC;IAE3D;;;;OAIG;IACH,mCAAY,GAAZ,UAAa,IAAsB,IAAY,OAAO,CAAC,CAAC;IAExD;;;;;OAKG;IACH,gCAAS,GAAT,UAAU,IAAsB,IAAsB,OAAO,CAAC,CAAC;IAChE,mBAAC;AAAD,CAAC,AA/CD,IA+CC;;AAED;;;;GAIG;AACH;IAeC;;;;;;;OAOG;IACH,yBAAmB,YAA8B;QAA9B,iBAAY,GAAZ,YAAY,CAAkB;IAAI,CAAC;IAnBtD,sBAAW,4CAAe;QAH1B;;WAEG;aACH;YACC,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACnD,CAAC;;;OAAA;IAKD,sBAAW,yCAAY;QAHvB;;WAEG;aACH;YACC,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAC1C,CAAC;;;OAAA;IAYD;;;;;OAKG;IACH,iCAAO,GAAP,UAAQ,GAAW,EAAE,MAAc;QAClC,IAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAE1C,wDAAwD;QACxD,qFAAqF;QACrF,+FAA+F;QAC/F,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,2CAA2C;QAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,GAAG;YAC5B,0BAA0B;YAC1B,CAAC,IAAI,SAAS,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC;YAClC,sEAAsE;YACtE,IAAI,CAAC,GAAG,MAAM,EAAE;gBAAE,MAAM;aAAE;YAC1B,qEAAqE;YACrE,SAAS,EAAE,CAAC;SACZ;QACD,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,gCAAM,GAAN,UAAO,GAAW;QACjB,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACH,yCAAe,GAAf,UAAgB,IAA0B;QACzC,IAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;QACjD,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,KAAgB,UAAqB,EAArB,KAAA,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAArB,cAAqB,EAArB,IAAqB,EAAE;YAAlC,IAAM,CAAC,SAAA;YACX,IAAI,CAAC,KAAK,IAAI,EAAE;gBAAE,MAAM;aAAE;YAC1B,SAAS,IAAI,CAAC,CAAC,OAAO,CAAC;SACvB;QACD,OAAO,SAAS,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACH,sCAAY,GAAZ,UAAa,IAA0B;QACtC,KAAkB,UAAkC,EAAlC,KAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAlC,cAAkC,EAAlC,IAAkC,EAAE;YAAjD,IAAM,GAAG,SAAA;YACb,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBACvB,OAAO,GAAG,CAAC,QAAQ,CAAC;aACpB;SACD;IACF,CAAC;IAED;;;;;OAKG;IACH,mCAAS,GAAT,UAAU,IAA0B;QACnC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9D,CAAC;IACF,sBAAC;AAAD,CAAC,AAjGD,IAiGC","sourcesContent":["/**\n * An abstract class that represents a cell in a table\n */\nexport abstract class TableCellAdapter {\n\t/**\n\t * The index of the cell in the table\n\t */\n\tcellIndex: number;\n\t/**\n\t * The number of columns spanned by this cell\n\t */\n\tcolSpan: number;\n}\n\n/**\n * An abstract class that represents a row in a table\n */\nexport abstract class TableRowAdapter {\n\t/**\n\t * The index of the row in the table\n\t */\n\trowIndex: number;\n\t/**\n\t * An array (or `HTMLCollection`) of `TableCellAdapter`s\n\t */\n\tcells: HTMLCollection | TableCellAdapter[];\n}\n\n/**\n * An abstract representation of a table that provides\n * a standard interface to query 2d tables for cell and row information.\n */\nexport abstract class TableAdapter {\n\t/**\n\t * The last acccessible column in the table\n\t */\n\tpublic get lastColumnIndex(): number { return; }\n\n\t/**\n\t * The last accessible row in the table\n\t */\n\tpublic get lastRowIndex(): number { return; }\n\n\t/**\n\t * Returns a cell from the table\n\t *\n\t * @param row index of the row\n\t * @param column index of the column\n\t */\n\tgetCell(row: number, column: number): TableCellAdapter { return; }\n\n\t/**\n\t * Returns a row from the table\n\t *\n\t * @param row index of the row\n\t */\n\tgetRow(row: number): TableRowAdapter { return; }\n\n\t/**\n\t * Finds the column index of a given cell\n\t *\n\t * @param cell the cell to search for\n\t */\n\tfindColumnIndex(cell: TableCellAdapter): number { return; }\n\n\t/**\n\t * Finds the row index of a given cell\n\t *\n\t * @param cell the cell to search for\n\t */\n\tfindRowIndex(cell: TableCellAdapter): number { return; }\n\n\t/**\n\t * Finds the row and column index of a given cell\n\t *\n\t * @param cell the cell to search for\n\t * @returns a tuple that follows the `[row, column]` convention\n\t */\n\tfindIndex(cell: TableCellAdapter): [number, number] { return; }\n}\n\n/**\n * A concrete implementation of `TableAdapter`\n *\n * Provides standard and consistent access to table cells and rows\n */\nexport class TableDomAdapter implements TableAdapter {\n\t/**\n\t * The last acccessible column in the table\n\t */\n\tpublic get lastColumnIndex() {\n\t\treturn this.tableElement.rows[0].cells.length - 1;\n\t}\n\n\t/**\n\t * The last accessible row in the table\n\t */\n\tpublic get lastRowIndex() {\n\t\treturn this.tableElement.rows.length - 1;\n\t}\n\n\t/**\n\t * `TableDomAdapter` works on a normal HTML table structure.\n\t * Custom tables that don't follow the standard structure should use a custom implementation of `TableAdapter`.\n\t *\n\t * The standard structure allows us to directly query rows for cells and indexes - though we do have to handle colspans specially.\n\t *\n\t * @param tableElement the root HTML table element.\n\t */\n\tconstructor(public tableElement: HTMLTableElement) { }\n\n\t/**\n\t * Returns a cell from the table taking colspans in to account.\n\t *\n\t * @param row index of the row\n\t * @param column index of the column\n\t */\n\tgetCell(row: number, column: number): HTMLTableCellElement {\n\t\tconst baseRow = this.getRow(row);\n\t\tlet baseCells = Array.from(baseRow.cells);\n\n\t\t// rows can have fewer total cells than the actual table\n\t\t// the model pretends all rows behave the same (with colspans > 1 being N cells long)\n\t\t// this maps that view to the HTML view (colspans > 1 are one element, so the array is shorter)\n\t\tlet realIndex = 0;\n\t\t// i is only used for iterating the \"cells\"\n\t\tfor (let i = 0; i < column;) {\n\t\t\t// skip the next N \"cells\"\n\t\t\ti += baseCells[realIndex].colSpan;\n\t\t\t// don't bump realIndex if i now exceeds the column we're shooting for\n\t\t\tif (i > column) { break; }\n\t\t\t// finally, increment realIndex (to keep it generally in step with i)\n\t\t\trealIndex++;\n\t\t}\n\t\treturn baseCells[realIndex];\n\t}\n\n\t/**\n\t * Returns a row from the table\n\t *\n\t * @param row index of the row\n\t */\n\tgetRow(row: number): HTMLTableRowElement {\n\t\treturn this.tableElement.rows[row];\n\t}\n\n\t/**\n\t * Finds the column index of a given cell\n\t *\n\t * @param cell the cell to search for\n\t */\n\tfindColumnIndex(cell: HTMLTableCellElement): number {\n\t\tconst row = this.getRow(this.findRowIndex(cell));\n\t\tlet cellIndex = 0;\n\t\tfor (const c of Array.from(row.cells)) {\n\t\t\tif (c === cell) { break; }\n\t\t\tcellIndex += c.colSpan;\n\t\t}\n\t\treturn cellIndex;\n\t}\n\n\t/**\n\t * Finds the row index of a given cell\n\t *\n\t * @param cell the cell to search for\n\t */\n\tfindRowIndex(cell: HTMLTableCellElement): number {\n\t\tfor (const row of Array.from(this.tableElement.rows)) {\n\t\t\tif (row.contains(cell)) {\n\t\t\t\treturn row.rowIndex;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Finds the row and column index of a given cell\n\t *\n\t * @param cell the cell to search for\n\t * @returns a tuple that follows the `[row, column]` convention\n\t */\n\tfindIndex(cell: HTMLTableCellElement): [number, number] {\n\t\treturn [this.findRowIndex(cell), this.findColumnIndex(cell)];\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"TableCellAdapter":{"__symbolic":"class"},"TableRowAdapter":{"__symbolic":"class"},"TableAdapter":{"__symbolic":"class","members":{"getCell":[{"__symbolic":"method"}],"getRow":[{"__symbolic":"method"}],"findColumnIndex":[{"__symbolic":"method"}],"findRowIndex":[{"__symbolic":"method"}],"findIndex":[{"__symbolic":"method"}]}},"TableDomAdapter":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":109,"character":34,"context":{"typeName":"HTMLTableElement"}}]}],"getCell":[{"__symbolic":"method"}],"getRow":[{"__symbolic":"method"}],"findColumnIndex":[{"__symbolic":"method"}],"findRowIndex":[{"__symbolic":"method"}],"findIndex":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"class"}},{"symbol":{"__symbol":1,"members":[]},"metadata":{"__symbolic":"class"}},{"symbol":{"__symbol":2,"members":[]},"metadata":{"__symbolic":"class","members":{"getCell":[{"__symbolic":"method"}],"getRow":[{"__symbolic":"method"}],"findColumnIndex":[{"__symbolic":"method"}],"findRowIndex":[{"__symbolic":"method"}],"findIndex":[{"__symbolic":"method"}]}}},{"symbol":{"__symbol":3,"members":[]},"metadata":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","context":{"typeName":"HTMLTableElement"},"fileName":"dist/src/table/table-adapter.class.ts"}]}],"getCell":[{"__symbolic":"method"}],"getRow":[{"__symbolic":"method"}],"findColumnIndex":[{"__symbolic":"method"}],"findRowIndex":[{"__symbolic":"method"}],"findIndex":[{"__symbolic":"method"}]}}}],"symbols":[{"__symbol":0,"name":"TableCellAdapter","filePath":"./table-adapter.class"},{"__symbol":1,"name":"TableRowAdapter","filePath":"./table-adapter.class"},{"__symbol":2,"name":"TableAdapter","filePath":"./table-adapter.class"},{"__symbol":3,"name":"TableDomAdapter","filePath":"./table-adapter.class"}]}
|
|
@@ -24,20 +24,17 @@ export declare class TableHeaderItem {
|
|
|
24
24
|
/**
|
|
25
25
|
* Defines if column under this TableHeaderItem should be displayed.
|
|
26
26
|
*
|
|
27
|
-
* @memberof TableHeaderItem
|
|
28
27
|
*/
|
|
29
28
|
visible: boolean;
|
|
30
29
|
/**
|
|
31
30
|
* Disables sorting by default.
|
|
32
31
|
*
|
|
33
|
-
* @memberof TableHeaderItem
|
|
34
32
|
*/
|
|
35
33
|
sorted: boolean;
|
|
36
34
|
/**
|
|
37
35
|
* Enables sorting on click by default.
|
|
38
36
|
* If false then this column won't show a sorting arrow at all.
|
|
39
37
|
*
|
|
40
|
-
* @memberof TableHeaderItem
|
|
41
38
|
*/
|
|
42
39
|
sortable: boolean;
|
|
43
40
|
/**
|
|
@@ -45,13 +42,11 @@ export declare class TableHeaderItem {
|
|
|
45
42
|
*
|
|
46
43
|
* `filter()` should set it to appropriate number.
|
|
47
44
|
*
|
|
48
|
-
* @memberof TableHeaderItem
|
|
49
45
|
*/
|
|
50
46
|
filterCount: number;
|
|
51
47
|
/**
|
|
52
48
|
* Attach a class to the column, both the header and column cells.
|
|
53
49
|
*
|
|
54
|
-
* @memberof TableHeaderItem
|
|
55
50
|
*/
|
|
56
51
|
className: string;
|
|
57
52
|
/**
|
|
@@ -59,34 +54,25 @@ export declare class TableHeaderItem {
|
|
|
59
54
|
*
|
|
60
55
|
* ngStyle-like format
|
|
61
56
|
*
|
|
62
|
-
* @memberof TableHeaderItem
|
|
63
57
|
*/
|
|
64
58
|
style: {};
|
|
65
59
|
/**
|
|
66
60
|
* If true, sort is set to ascending, if false descending will be true.
|
|
67
61
|
*
|
|
68
|
-
* @memberof TableHeaderItem
|
|
69
62
|
*/
|
|
70
63
|
ascending: any;
|
|
71
64
|
/**
|
|
72
65
|
* If true, sort is set to descending, if false ascending will be true.
|
|
73
66
|
*
|
|
74
|
-
* @memberof TableHeaderItem
|
|
75
67
|
*/
|
|
76
68
|
descending: any;
|
|
77
69
|
/**
|
|
78
70
|
* Data for the header item.
|
|
79
|
-
*
|
|
80
|
-
* @type {*}
|
|
81
|
-
* @memberof TableHeaderItem
|
|
82
71
|
*/
|
|
83
72
|
data: any;
|
|
84
73
|
/**
|
|
85
74
|
* Data for the header item for general usage in the controller.
|
|
86
75
|
* For example, which `field` is this column related to.
|
|
87
|
-
*
|
|
88
|
-
* @type {*}
|
|
89
|
-
* @memberof TableHeaderItem
|
|
90
76
|
*/
|
|
91
77
|
metadata: any;
|
|
92
78
|
/**
|
|
@@ -120,10 +106,16 @@ export declare class TableHeaderItem {
|
|
|
120
106
|
* new TableHeaderItem({data: {name: "Custom header", link: "/table"}, template: this.customHeaderTemplate})
|
|
121
107
|
* ];
|
|
122
108
|
* ```
|
|
123
|
-
* @type {TemplateRef<any>}
|
|
124
|
-
* @memberof TableHeaderItem
|
|
125
109
|
*/
|
|
126
110
|
template: TemplateRef<any>;
|
|
111
|
+
/**
|
|
112
|
+
* The label for the sort button
|
|
113
|
+
*/
|
|
114
|
+
ariaSortLabel: string;
|
|
115
|
+
/**
|
|
116
|
+
* A callback function to format the sort label. Will be heavily called.
|
|
117
|
+
*/
|
|
118
|
+
formatSortLabel: (label: string, staticLabel?: string) => string;
|
|
127
119
|
/**
|
|
128
120
|
* Used as a template for popover filter.
|
|
129
121
|
*
|
|
@@ -170,16 +162,10 @@ export declare class TableHeaderItem {
|
|
|
170
162
|
* }
|
|
171
163
|
* }
|
|
172
164
|
* ```
|
|
173
|
-
*
|
|
174
|
-
* @type {TemplateRef<any>}
|
|
175
|
-
* @memberof TableHeaderItem
|
|
176
165
|
*/
|
|
177
166
|
filterTemplate: TemplateRef<any>;
|
|
178
167
|
/**
|
|
179
168
|
* Used along with `filterTemplate` to construct the filter popover
|
|
180
|
-
*
|
|
181
|
-
* @type {TemplateRef<any>}
|
|
182
|
-
* @memberof TableHeaderItem
|
|
183
169
|
*/
|
|
184
170
|
filterFooter: TemplateRef<any>;
|
|
185
171
|
/**
|
|
@@ -191,22 +177,16 @@ export declare class TableHeaderItem {
|
|
|
191
177
|
* available in `filterData.data` in your extension of `TableHeaderItem`.
|
|
192
178
|
*
|
|
193
179
|
* Because angular and object references.
|
|
194
|
-
*
|
|
195
|
-
* @type {*}
|
|
196
|
-
* @memberof TableHeaderItem
|
|
197
180
|
*/
|
|
198
181
|
filterData: any;
|
|
199
182
|
/**
|
|
200
183
|
* used in `ascending`
|
|
201
184
|
*
|
|
202
185
|
* @protected
|
|
203
|
-
* @memberof TableHeaderItem
|
|
204
186
|
*/
|
|
205
187
|
protected _ascending: boolean;
|
|
206
188
|
/**
|
|
207
189
|
* Creates an instance of TableHeaderItem.
|
|
208
|
-
* @param {*} [rawData]
|
|
209
|
-
* @memberof TableHeaderItem
|
|
210
190
|
*/
|
|
211
191
|
constructor(rawData?: any);
|
|
212
192
|
/**
|
|
@@ -214,13 +194,9 @@ export declare class TableHeaderItem {
|
|
|
214
194
|
*
|
|
215
195
|
* Override to enable different sorting.
|
|
216
196
|
*
|
|
217
|
-
* @param {TableItem} one
|
|
218
|
-
* @param {TableItem} two
|
|
219
|
-
* @returns {number}
|
|
220
197
|
* < 0 if `one` should go before `two`
|
|
221
198
|
* > 0 if `one` shoulg go after `two`
|
|
222
199
|
* 0 if it doesn't matter (they are the same)
|
|
223
|
-
* @memberof TableHeaderItem
|
|
224
200
|
*/
|
|
225
201
|
compare(one: TableItem, two: TableItem): number;
|
|
226
202
|
/**
|
|
@@ -231,11 +207,8 @@ export declare class TableHeaderItem {
|
|
|
231
207
|
* Even though there is just one filter function, there can be multiple filters.
|
|
232
208
|
* When implementing filter, set `filterCount` before returning.
|
|
233
209
|
*
|
|
234
|
-
* @param {TableItem} item
|
|
235
|
-
* @returns {boolean}
|
|
236
210
|
* `true` to hide the row
|
|
237
211
|
* `false` to show the row
|
|
238
|
-
* @memberof TableHeaderItem
|
|
239
212
|
*/
|
|
240
213
|
filter(item: TableItem): boolean;
|
|
241
214
|
}
|