UNPKG

@blueprintjs/table

Version:

Scalable interactive table component

134 lines 9.11 kB
/* * Copyright 2017 Palantir Technologies, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { Classes } from "@blueprintjs/core"; var NS = Classes.getClassNamespace(); export var TABLE_BODY = "".concat(NS, "-table-body"); export var TABLE_BODY_CELLS = "".concat(NS, "-table-body-cells"); export var TABLE_BODY_SCROLLING_INDICATOR_OVERLAY = "".concat(NS, "-table-body-scrolling-indicator-overlay"); export var TABLE_BODY_IS_SCROLLING_TOP = "".concat(NS, "-table-body-is-scrolling-top"); export var TABLE_BODY_IS_SCROLLING_BOTTOM = "".concat(NS, "-table-body-is-scrolling-bottom"); export var TABLE_BODY_IS_SCROLLING_RIGHT = "".concat(NS, "-table-body-is-scrolling-right"); export var TABLE_BODY_IS_SCROLLING_LEFT = "".concat(NS, "-table-body-is-scrolling-left"); export var TABLE_BODY_SCROLL_CLIENT = "".concat(NS, "-table-body-scroll-client"); export var TABLE_BODY_VIRTUAL_CLIENT = "".concat(NS, "-table-body-virtual-client"); export var TABLE_BOTTOM_CONTAINER = "".concat(NS, "-table-bottom-container"); export var TABLE_CELL = "".concat(NS, "-table-cell"); export var TABLE_CELL_CLIENT = "".concat(NS, "-table-cell-client"); export var TABLE_CELL_GHOST = "".concat(NS, "-table-cell-ghost"); export var TABLE_CELL_INTERACTIVE = "".concat(NS, "-table-cell-interactive"); export var TABLE_CELL_LEDGER_EVEN = "".concat(NS, "-table-cell-ledger-even"); export var TABLE_CELL_LEDGER_ODD = "".concat(NS, "-table-cell-ledger-odd"); export var TABLE_COLUMN_HEADER_TR = "".concat(NS, "-table-column-header-tr"); export var TABLE_COLUMN_HEADERS = "".concat(NS, "-table-column-headers"); export var TABLE_COLUMN_HEADER_CELL = "".concat(NS, "-table-column-header-cell"); export var TABLE_COLUMN_NAME = "".concat(NS, "-table-column-name"); export var TABLE_COLUMN_NAME_TEXT = "".concat(NS, "-table-column-name-text"); export var TABLE_CONTAINER = "".concat(NS, "-table-container"); export var TABLE_DRAGGING = "".concat(NS, "-table-dragging"); export var TABLE_EDITABLE_NAME = "".concat(NS, "-table-editable-name"); export var TABLE_EDITABLE_TEXT = "".concat(NS, "-table-editable-text"); export var TABLE_CELL_TEXT_PLACEHOLDER = "".concat(NS, "-table-cell-text-placeholder"); export var TABLE_FOCUS_REGION = "".concat(NS, "-table-focus-region"); export var TABLE_HAS_INTERACTION_BAR = "".concat(NS, "-table-has-interaction-bar"); export var TABLE_HAS_REORDER_HANDLE = "".concat(NS, "-table-has-reorder-handle"); export var TABLE_HEADER = "".concat(NS, "-table-header"); export var TABLE_HEADER_ACTIVE = "".concat(NS, "-table-header-active"); export var TABLE_HEADER_CONTENT = "".concat(NS, "-table-header-content"); export var TABLE_HEADER_REORDERABLE = "".concat(NS, "-table-header-reorderable"); export var TABLE_HEADER_SELECTED = "".concat(NS, "-table-header-selected"); export var TABLE_HORIZONTAL_CELL_DIVIDER = "".concat(NS, "-table-horizontal-cell-divider"); export var TABLE_HORIZONTAL_GUIDE = "".concat(NS, "-table-horizontal-guide"); export var TABLE_INTERACTION_BAR = "".concat(NS, "-table-interaction-bar"); export var TABLE_LAST_IN_COLUMN = "".concat(NS, "-table-last-in-column"); export var TABLE_LAST_IN_ROW = "".concat(NS, "-table-last-in-row"); export var TABLE_MENU = "".concat(NS, "-table-menu"); export var TABLE_NO_HORIZONTAL_SCROLL = "".concat(NS, "-table-no-horizontal-scroll"); export var TABLE_NO_LAYOUT = "".concat(NS, "-table-no-layout"); export var TABLE_NO_ROWS = "".concat(NS, "-table-no-rows"); export var TABLE_NO_VERTICAL_SCROLL = "".concat(NS, "-table-no-vertical-scroll"); export var TABLE_NO_WRAP_TEXT = "".concat(NS, "-table-no-wrap-text"); export var TABLE_NULL = "".concat(NS, "-table-null"); export var TABLE_OVERLAY = "".concat(NS, "-table-overlay"); export var TABLE_OVERLAY_LAYER = "".concat(NS, "-table-overlay-layer"); export var TABLE_OVERLAY_REORDERING_CURSOR = "".concat(NS, "-table-reordering-cursor-overlay"); export var TABLE_POPOVER_WHITESPACE_NORMAL = "".concat(NS, "-table-popover-whitespace-normal"); export var TABLE_POPOVER_WHITESPACE_PRE = "".concat(NS, "-table-popover-whitespace-pre"); export var TABLE_QUADRANT = "".concat(NS, "-table-quadrant"); export var TABLE_QUADRANT_BODY_CONTAINER = "".concat(NS, "-table-quadrant-body-container"); export var TABLE_QUADRANT_LEFT = "".concat(NS, "-table-quadrant-left"); export var TABLE_QUADRANT_MAIN = "".concat(NS, "-table-quadrant-main"); export var TABLE_QUADRANT_SCROLL_CONTAINER = "".concat(NS, "-table-quadrant-scroll-container"); export var TABLE_QUADRANT_STACK = "".concat(NS, "-table-quadrant-stack"); export var TABLE_QUADRANT_TOP = "".concat(NS, "-table-quadrant-top"); export var TABLE_QUADRANT_TOP_LEFT = "".concat(NS, "-table-quadrant-top-left"); export var TABLE_REGION = "".concat(NS, "-table-region"); export var TABLE_REORDER_HANDLE = "".concat(NS, "-table-reorder-handle"); export var TABLE_REORDER_HANDLE_TARGET = "".concat(NS, "-table-reorder-handle-target"); export var TABLE_REORDERING = "".concat(NS, "-table-reordering"); export var TABLE_RESIZE_GUIDES = "".concat(NS, "-table-resize-guides"); export var TABLE_RESIZE_HANDLE = "".concat(NS, "-table-resize-handle"); export var TABLE_RESIZE_HANDLE_TARGET = "".concat(NS, "-table-resize-handle-target"); export var TABLE_RESIZE_HORIZONTAL = "".concat(NS, "-table-resize-horizontal"); export var TABLE_RESIZE_SENSOR = "".concat(NS, "-table-resize-sensor"); export var TABLE_RESIZE_SENSOR_EXPAND = "".concat(NS, "-table-resize-sensor-expand"); export var TABLE_RESIZE_SENSOR_SHRINK = "".concat(NS, "-table-resize-sensor-shrink"); export var TABLE_RESIZE_VERTICAL = "".concat(NS, "-table-resize-vertical"); export var TABLE_ROUNDED_LAYOUT = "".concat(NS, "-table-rounded-layout"); export var TABLE_ROW_HEADERS = "".concat(NS, "-table-row-headers"); export var TABLE_ROW_HEADERS_CELLS_CONTAINER = "".concat(NS, "-table-row-headers-cells-container"); export var TABLE_ROW_NAME = "".concat(NS, "-table-row-name"); export var TABLE_ROW_NAME_TEXT = "".concat(NS, "-table-row-name-text"); export var TABLE_SELECTION_ENABLED = "".concat(NS, "-table-selection-enabled"); export var TABLE_SELECTION_REGION = "".concat(NS, "-table-selection-region"); export var TABLE_TH_MENU = "".concat(NS, "-table-th-menu"); export var TABLE_TH_MENU_CONTAINER = "".concat(NS, "-table-th-menu-container"); export var TABLE_TH_MENU_CONTAINER_BACKGROUND = "".concat(NS, "-table-th-menu-container-background"); export var TABLE_TH_MENU_OPEN = "".concat(NS, "-table-th-menu-open"); export var TABLE_TH_MENU_SELECT_CELLS = "".concat(NS, "-table-th-menu-select-cells"); export var TABLE_THEAD = "".concat(NS, "-table-thead"); export var TABLE_TOP_CONTAINER = "".concat(NS, "-table-top-container"); export var TABLE_TRUNCATED_CELL = "".concat(NS, "-table-truncated-cell"); export var TABLE_TRUNCATED_FORMAT = "".concat(NS, "-table-truncated-format"); export var TABLE_TRUNCATED_FORMAT_TEXT = "".concat(NS, "-table-truncated-format-text"); export var TABLE_TRUNCATED_POPOVER = "".concat(NS, "-table-truncated-popover"); export var TABLE_TRUNCATED_POPOVER_TARGET = "".concat(NS, "-table-truncated-popover-target"); export var TABLE_TRUNCATED_TEXT = "".concat(NS, "-table-truncated-text"); export var TABLE_TRUNCATED_VALUE = "".concat(NS, "-table-truncated-value"); export var TABLE_VERTICAL_GUIDE = "".concat(NS, "-table-vertical-guide"); /** Common code for row and column index class generator functions, since they're essentially the same. */ function dimensionIndexClass(classPrefix, index) { if (typeof index === "number") { return "".concat(classPrefix).concat(index); } return index.indexOf(classPrefix) === 0 ? index : "".concat(classPrefix).concat(index); } /** Return CSS class for table colummn index, whether or not 'pt-table-col-' prefix is included. */ export function columnIndexClass(columnIndex) { return dimensionIndexClass("".concat(NS, "-table-col-"), columnIndex); } /** Return CSS class for table row index, whether or not 'pt-table-row-' prefix is included. */ export function rowIndexClass(rowIndex) { return dimensionIndexClass("".concat(NS, "-table-row-"), rowIndex); } /** Return CSS class for table colummn cell index, whether or not 'pt-table-cell-col-' prefix is included. */ export function columnCellIndexClass(columnIndex) { return dimensionIndexClass("".concat(NS, "-table-cell-col-"), columnIndex); } /** Return CSS class for table row cell index, whether or not 'pt-table-cell-row-' prefix is included. */ export function rowCellIndexClass(rowIndex) { return dimensionIndexClass("".concat(NS, "-table-cell-row-"), rowIndex); } //# sourceMappingURL=classes.js.map