UNPKG

terra-clinical-data-grid

Version:

An organizational component that renders a collection of data in a grid-like format.

91 lines (90 loc) 2.95 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(require("react")); var _bind = _interopRequireDefault(require("classnames/bind")); var _terraClinicalDataGrid = _interopRequireDefault(require("terra-clinical-data-grid")); var _ContentCellLayout = _interopRequireDefault(require("./ContentCellLayout")); var _ClinicalDataGridCommonTestModule = _interopRequireDefault(require("./ClinicalDataGridCommon.test.module.scss")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var cx = _bind.default.bind(_ClinicalDataGridCommonTestModule.default); var overflowColumns = [{ id: 'Column-0', text: 'Column 0', width: 100 }, { id: 'Column-1', text: 'Column 1' }, { id: 'Column-2', text: 'Column 2' }, { id: 'Column-3', text: 'Column 3' }, { id: 'Column-4', text: 'Column 4' }, { id: 'Column-5', text: 'Column 5' }]; var sectionWithOneRow = { id: 'Section-0', rows: [{ id: 'Section-0_Row-0', ariaLabel: 'Section 0, Row 0', cells: [{ columnId: 'Column-0', component: /*#__PURE__*/_react.default.createElement(_ContentCellLayout.default, { text: "Row-0, Column-0", label: "Section-0_Row-0_Column-0" }) }, { columnId: 'Column-1', component: /*#__PURE__*/_react.default.createElement(_ContentCellLayout.default, { text: "Row-0, Column-1", label: "Section-0_Row-0_Column-1" }) }, { columnId: 'Column-2', component: /*#__PURE__*/_react.default.createElement(_ContentCellLayout.default, { text: "Row-0, Column-2", label: "Section-0_Row-0_Column-2" }) }, { columnId: 'Column-3', component: /*#__PURE__*/_react.default.createElement(_ContentCellLayout.default, { text: "Row-0, Column-3", label: "Section-0_Row-0_Column-3" }) }, { columnId: 'Column-4', component: /*#__PURE__*/_react.default.createElement(_ContentCellLayout.default, { text: "Row-0, Column-4", label: "Section-0_Row-0_Column-4" }) }, { columnId: 'Column-5', component: /*#__PURE__*/_react.default.createElement(_ContentCellLayout.default, { text: "Row-0, Column-5", label: "Section-0_Row-0_Column-5" }) }] }] }; var HighlightColumnSingleRowDataGrid = function HighlightColumnSingleRowDataGrid() { return /*#__PURE__*/_react.default.createElement("div", { id: "highlight-column-single-row-data-grid", className: cx('content-wrapper') }, /*#__PURE__*/_react.default.createElement(_terraClinicalDataGrid.default, { id: "highlight-column-example", columnHighlightId: "Column-2", overflowColumns: overflowColumns, sections: [sectionWithOneRow], defaultColumnWidth: 250, fill: true })); }; var _default = exports.default = HighlightColumnSingleRowDataGrid;