2021-02-16 10:29:08 +00:00
|
|
|
import styled, { css } from "styled-components";
|
2021-09-09 15:10:22 +00:00
|
|
|
import { TableSizes, CellLayoutProperties, CellAlignment } from "./Constants";
|
2020-08-13 16:41:08 +00:00
|
|
|
import { Colors, Color } from "constants/Colors";
|
2021-04-15 05:33:09 +00:00
|
|
|
import { hideScrollbar } from "constants/DefaultTheme";
|
2021-04-01 08:30:33 +00:00
|
|
|
import { FontStyleTypes, TEXT_SIZES } from "constants/WidgetConstants";
|
2020-06-03 10:50:10 +00:00
|
|
|
|
2020-08-10 10:01:36 +00:00
|
|
|
export const TableWrapper = styled.div<{
|
|
|
|
|
width: number;
|
|
|
|
|
height: number;
|
|
|
|
|
tableSizes: TableSizes;
|
2020-08-13 06:53:21 +00:00
|
|
|
backgroundColor?: Color;
|
2021-01-22 10:12:34 +00:00
|
|
|
triggerRowSelection: boolean;
|
2021-05-14 09:39:57 +00:00
|
|
|
isHeaderVisible?: boolean;
|
2020-08-10 10:01:36 +00:00
|
|
|
}>`
|
2020-07-20 06:04:05 +00:00
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
2020-06-03 10:50:10 +00:00
|
|
|
background: white;
|
|
|
|
|
border: 1px solid ${Colors.GEYSER_LIGHT};
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
flex-direction: column;
|
2020-07-24 10:32:31 +00:00
|
|
|
overflow: hidden;
|
2020-06-03 10:50:10 +00:00
|
|
|
.tableWrap {
|
2020-06-16 07:37:39 +00:00
|
|
|
height: 100%;
|
2020-06-03 10:50:10 +00:00
|
|
|
display: block;
|
2021-03-18 05:37:16 +00:00
|
|
|
position: relative;
|
|
|
|
|
width: ${(props) => props.width - 8}px;
|
2021-03-17 11:45:49 +00:00
|
|
|
overflow-x: auto;
|
2021-04-15 05:33:09 +00:00
|
|
|
${hideScrollbar};
|
2021-04-15 05:01:06 +00:00
|
|
|
.thumb-horizontal {
|
|
|
|
|
height: 4px !important;
|
|
|
|
|
border-radius: ${(props) => props.theme.radii[3]}px;
|
|
|
|
|
background: ${(props) => props.theme.colors.scrollbarLight} !important;
|
|
|
|
|
&:hover {
|
|
|
|
|
height: 6px !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-06-03 10:50:10 +00:00
|
|
|
}
|
|
|
|
|
.table {
|
|
|
|
|
border-spacing: 0;
|
2020-08-17 07:41:50 +00:00
|
|
|
color: ${Colors.THUNDER};
|
2020-06-03 10:50:10 +00:00
|
|
|
position: relative;
|
2020-08-13 06:53:21 +00:00
|
|
|
background: ${Colors.ATHENS_GRAY_DARKER};
|
2020-10-28 14:19:15 +00:00
|
|
|
display: table;
|
|
|
|
|
width: 100%;
|
2021-04-15 05:33:09 +00:00
|
|
|
${hideScrollbar};
|
2020-07-20 06:04:05 +00:00
|
|
|
.thead,
|
2020-06-03 10:50:10 +00:00
|
|
|
.tbody {
|
2020-07-20 06:04:05 +00:00
|
|
|
overflow: hidden;
|
2020-06-03 10:50:10 +00:00
|
|
|
}
|
2020-08-13 06:53:21 +00:00
|
|
|
.tbody {
|
2021-05-14 09:39:57 +00:00
|
|
|
height: ${(props) =>
|
|
|
|
|
props.isHeaderVisible ? props.height - 80 : props.height - 40}px;
|
2021-03-17 11:45:49 +00:00
|
|
|
width: 100%;
|
|
|
|
|
overflow-y: auto;
|
2021-04-15 05:33:09 +00:00
|
|
|
${hideScrollbar};
|
2020-08-13 06:53:21 +00:00
|
|
|
}
|
2020-06-03 10:50:10 +00:00
|
|
|
.tr {
|
2020-07-20 06:04:05 +00:00
|
|
|
overflow: hidden;
|
2021-01-22 10:12:34 +00:00
|
|
|
cursor: ${(props) => props.triggerRowSelection && "pointer"};
|
2021-01-22 09:37:43 +00:00
|
|
|
background: ${Colors.WHITE};
|
2020-06-03 10:50:10 +00:00
|
|
|
&.selected-row {
|
2021-10-26 08:31:27 +00:00
|
|
|
background: ${Colors.NARVIK_GREEN}!important;
|
2020-06-03 10:50:10 +00:00
|
|
|
}
|
|
|
|
|
&:hover {
|
2021-10-26 08:31:27 +00:00
|
|
|
background: ${Colors.NARVIK_GREEN};
|
2020-06-03 10:50:10 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.th,
|
|
|
|
|
.td {
|
|
|
|
|
margin: 0;
|
|
|
|
|
border-bottom: 1px solid ${Colors.GEYSER_LIGHT};
|
|
|
|
|
border-right: 1px solid ${Colors.GEYSER_LIGHT};
|
|
|
|
|
position: relative;
|
2020-12-24 04:32:25 +00:00
|
|
|
font-size: ${(props) => props.tableSizes.ROW_FONT_SIZE}px;
|
|
|
|
|
line-height: ${(props) => props.tableSizes.ROW_FONT_SIZE}px;
|
2020-06-03 10:50:10 +00:00
|
|
|
:last-child {
|
|
|
|
|
border-right: 0;
|
|
|
|
|
}
|
|
|
|
|
.resizer {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
width: 10px;
|
|
|
|
|
height: 100%;
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
transform: translateX(50%);
|
|
|
|
|
z-index: 1;
|
|
|
|
|
${"" /* prevents from scrolling while dragging on touch devices */}
|
|
|
|
|
touch-action:none;
|
|
|
|
|
&.isResizing {
|
|
|
|
|
cursor: isResizing;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.th {
|
|
|
|
|
padding: 0 10px 0 0;
|
2021-05-19 11:02:07 +00:00
|
|
|
height: ${(props) =>
|
|
|
|
|
props.isHeaderVisible ? props.tableSizes.COLUMN_HEADER_HEIGHT : 40}px;
|
|
|
|
|
line-height: ${(props) =>
|
|
|
|
|
props.isHeaderVisible ? props.tableSizes.COLUMN_HEADER_HEIGHT : 40}px;
|
2020-06-03 10:50:10 +00:00
|
|
|
background: ${Colors.ATHENS_GRAY_DARKER};
|
|
|
|
|
}
|
|
|
|
|
.td {
|
2020-12-24 04:32:25 +00:00
|
|
|
height: ${(props) => props.tableSizes.ROW_HEIGHT}px;
|
|
|
|
|
line-height: ${(props) => props.tableSizes.ROW_HEIGHT}px;
|
2021-02-16 10:29:08 +00:00
|
|
|
padding: 0;
|
2020-06-03 10:50:10 +00:00
|
|
|
}
|
2020-11-06 11:18:04 +00:00
|
|
|
.thead {
|
|
|
|
|
position: sticky;
|
|
|
|
|
top: 0;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
}
|
2020-11-06 05:21:29 +00:00
|
|
|
.thead {
|
|
|
|
|
position: sticky;
|
|
|
|
|
top: 0;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
}
|
2020-06-03 10:50:10 +00:00
|
|
|
}
|
|
|
|
|
.draggable-header,
|
|
|
|
|
.hidden-header {
|
|
|
|
|
width: 100%;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
color: ${Colors.OXFORD_BLUE};
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
padding-left: 10px;
|
2020-08-10 06:45:31 +00:00
|
|
|
&.sorted {
|
|
|
|
|
padding-left: 5px;
|
|
|
|
|
}
|
2020-06-03 10:50:10 +00:00
|
|
|
}
|
|
|
|
|
.draggable-header {
|
|
|
|
|
cursor: pointer;
|
2021-02-11 06:00:36 +00:00
|
|
|
display: inline-block;
|
2021-04-09 10:34:01 +00:00
|
|
|
width: 100%;
|
2021-02-11 06:00:36 +00:00
|
|
|
height: 38px;
|
2020-06-03 10:50:10 +00:00
|
|
|
&.reorder-line {
|
|
|
|
|
width: 1px;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.hidden-header {
|
|
|
|
|
opacity: 0.6;
|
|
|
|
|
}
|
|
|
|
|
.column-menu {
|
|
|
|
|
cursor: pointer;
|
2020-12-24 04:32:25 +00:00
|
|
|
height: ${(props) => props.tableSizes.COLUMN_HEADER_HEIGHT}px;
|
|
|
|
|
line-height: ${(props) => props.tableSizes.COLUMN_HEADER_HEIGHT}px;
|
2020-06-03 10:50:10 +00:00
|
|
|
}
|
|
|
|
|
.th {
|
2021-02-11 06:00:36 +00:00
|
|
|
display: flex !important;
|
2020-06-03 10:50:10 +00:00
|
|
|
justify-content: space-between;
|
|
|
|
|
&.highlight-left {
|
|
|
|
|
border-left: 2px solid ${Colors.GREEN};
|
|
|
|
|
}
|
|
|
|
|
&.highlight-right {
|
|
|
|
|
border-right: 2px solid ${Colors.GREEN};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.input-group {
|
2020-12-24 04:32:25 +00:00
|
|
|
height: ${(props) => props.tableSizes.COLUMN_HEADER_HEIGHT}px;
|
|
|
|
|
line-height: ${(props) => props.tableSizes.COLUMN_HEADER_HEIGHT}px;
|
2020-06-03 10:50:10 +00:00
|
|
|
padding: 0 5px;
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const DropDownWrapper = styled.div`
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
background: white;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
border: 1px solid ${Colors.ATHENS_GRAY};
|
|
|
|
|
box-shadow: 0px 2px 4px rgba(67, 70, 74, 0.14);
|
|
|
|
|
`;
|
|
|
|
|
|
2020-12-15 11:24:15 +00:00
|
|
|
export const OptionWrapper = styled.div<{
|
|
|
|
|
selected: boolean;
|
|
|
|
|
isHeader?: boolean;
|
|
|
|
|
}>`
|
2020-06-03 10:50:10 +00:00
|
|
|
display: flex;
|
|
|
|
|
width: 100%;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
height: 32px;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 8px;
|
2020-12-24 04:32:25 +00:00
|
|
|
color: ${(props) => (props.selected ? Colors.WHITE : Colors.OXFORD_BLUE)};
|
2020-06-03 10:50:10 +00:00
|
|
|
font-size: 14px;
|
|
|
|
|
min-width: 200px;
|
2020-12-24 04:32:25 +00:00
|
|
|
cursor: ${(props) => (!props.isHeader ? "pointer" : "default")};
|
2020-06-03 10:50:10 +00:00
|
|
|
border-radius: 4px;
|
|
|
|
|
margin: 3px 0;
|
2020-12-24 04:32:25 +00:00
|
|
|
background: ${(props) => (props.selected ? Colors.GREEN : Colors.WHITE)};
|
2020-06-03 10:50:10 +00:00
|
|
|
&:hover {
|
2020-12-24 04:32:25 +00:00
|
|
|
background: ${(props) => (props.selected ? Colors.GREEN : Colors.POLAR)};
|
2020-06-03 10:50:10 +00:00
|
|
|
}
|
|
|
|
|
.column-type {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
&.non-selectable {
|
2020-12-24 04:32:25 +00:00
|
|
|
background: ${(props) =>
|
2020-12-15 11:24:15 +00:00
|
|
|
!props.isHeader ? Colors.WHITE_SMOKE : Colors.WHITE_CLOUD};
|
2020-06-03 10:50:10 +00:00
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const IconOptionWrapper = styled.div`
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
width: 100%;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const PaginationWrapper = styled.div`
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
display: flex;
|
|
|
|
|
width: 100%;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
align-items: center;
|
2020-08-13 16:41:08 +00:00
|
|
|
padding: 8px 20px;
|
2021-05-10 11:24:50 +00:00
|
|
|
color: ${Colors.GRAY};
|
2020-06-03 10:50:10 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const PaginationItemWrapper = styled.div<{
|
|
|
|
|
disabled?: boolean;
|
|
|
|
|
selected?: boolean;
|
|
|
|
|
}>`
|
2021-05-10 11:24:50 +00:00
|
|
|
background: ${(props) => (props.disabled ? Colors.MERCURY : Colors.WHITE)};
|
|
|
|
|
border: 1px solid ${Colors.ALTO2};
|
2020-06-03 10:50:10 +00:00
|
|
|
box-sizing: border-box;
|
2020-08-13 16:41:08 +00:00
|
|
|
width: 24px;
|
|
|
|
|
height: 24px;
|
2020-06-03 10:50:10 +00:00
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
2020-07-03 08:32:21 +00:00
|
|
|
margin: 0 4px;
|
2020-12-24 04:32:25 +00:00
|
|
|
pointer-events: ${(props) => props.disabled && "none"};
|
2020-06-03 10:50:10 +00:00
|
|
|
cursor: pointer;
|
|
|
|
|
&:hover {
|
|
|
|
|
border-color: ${Colors.GREEN};
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const MenuColumnWrapper = styled.div<{ selected: boolean }>`
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
align-items: center;
|
|
|
|
|
width: 100%;
|
2020-12-24 04:32:25 +00:00
|
|
|
background: ${(props) => props.selected && Colors.GREEN};
|
2020-06-03 10:50:10 +00:00
|
|
|
position: relative;
|
|
|
|
|
.title {
|
2020-12-24 04:32:25 +00:00
|
|
|
color: ${(props) => (props.selected ? Colors.WHITE : Colors.OXFORD_BLUE)};
|
2020-06-03 10:50:10 +00:00
|
|
|
margin-left: 10px;
|
|
|
|
|
}
|
|
|
|
|
.sub-menu {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 0;
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
2021-02-16 10:29:08 +00:00
|
|
|
export const ActionWrapper = styled.div<{
|
|
|
|
|
background: string;
|
|
|
|
|
buttonLabelColor: string;
|
|
|
|
|
}>`
|
2020-07-14 07:55:46 +00:00
|
|
|
margin: 0 5px 0 0;
|
|
|
|
|
&&&&&& {
|
2021-02-16 10:29:08 +00:00
|
|
|
.bp3-button {
|
|
|
|
|
background: ${(props) => props.background};
|
|
|
|
|
color: ${(props) => props.buttonLabelColor};
|
|
|
|
|
border: none;
|
|
|
|
|
}
|
2020-07-14 07:55:46 +00:00
|
|
|
.bp3-button span {
|
|
|
|
|
font-weight: 400;
|
2021-09-06 07:06:15 +00:00
|
|
|
text-decoration: none;
|
2020-07-14 07:55:46 +00:00
|
|
|
}
|
2021-08-17 12:54:43 +00:00
|
|
|
&&& .bp3-disabled {
|
|
|
|
|
color: ${Colors.SLATE_GRAY};
|
|
|
|
|
background: ${Colors.MERCURY};
|
|
|
|
|
}
|
2020-07-14 07:55:46 +00:00
|
|
|
}
|
2020-06-03 10:50:10 +00:00
|
|
|
`;
|
|
|
|
|
|
2021-02-16 10:29:08 +00:00
|
|
|
const JUSTIFY_CONTENT = {
|
|
|
|
|
LEFT: "flex-start",
|
|
|
|
|
CENTER: "center",
|
|
|
|
|
RIGHT: "flex-end",
|
|
|
|
|
};
|
|
|
|
|
|
2021-04-09 10:34:01 +00:00
|
|
|
const TEXT_ALIGN = {
|
|
|
|
|
LEFT: "left",
|
|
|
|
|
CENTER: "center",
|
|
|
|
|
RIGHT: "right",
|
|
|
|
|
};
|
|
|
|
|
|
2021-02-16 10:29:08 +00:00
|
|
|
const ALIGN_ITEMS = {
|
|
|
|
|
TOP: "flex-start",
|
|
|
|
|
CENTER: "center",
|
|
|
|
|
BOTTOM: "flex-end",
|
|
|
|
|
};
|
|
|
|
|
|
2021-04-19 05:01:17 +00:00
|
|
|
const IMAGE_HORIZONTAL_ALIGN = {
|
|
|
|
|
LEFT: "left",
|
|
|
|
|
CENTER: "center",
|
|
|
|
|
RIGHT: "right",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const IMAGE_VERTICAL_ALIGN = {
|
|
|
|
|
TOP: "top",
|
|
|
|
|
CENTER: "center",
|
|
|
|
|
BOTTOM: "bottom",
|
|
|
|
|
};
|
|
|
|
|
|
2021-09-06 07:06:15 +00:00
|
|
|
export const TableStyles = css<{
|
|
|
|
|
cellProperties?: CellLayoutProperties;
|
|
|
|
|
isTextType?: boolean;
|
|
|
|
|
}>`
|
2021-02-16 10:29:08 +00:00
|
|
|
font-weight: ${(props) =>
|
|
|
|
|
props?.cellProperties?.fontStyle?.includes(FontStyleTypes.BOLD)
|
|
|
|
|
? "bold"
|
|
|
|
|
: "normal"};
|
|
|
|
|
color: ${(props) => props?.cellProperties?.textColor};
|
|
|
|
|
font-style: ${(props) =>
|
|
|
|
|
props?.cellProperties?.fontStyle?.includes(FontStyleTypes.ITALIC)
|
|
|
|
|
? "italic"
|
|
|
|
|
: ""};
|
|
|
|
|
text-decoration: ${(props) =>
|
2021-09-06 07:06:15 +00:00
|
|
|
props?.cellProperties?.fontStyle?.includes(FontStyleTypes.UNDERLINE) &&
|
|
|
|
|
props.isTextType
|
2021-02-16 10:29:08 +00:00
|
|
|
? "underline"
|
|
|
|
|
: ""};
|
|
|
|
|
justify-content: ${(props) =>
|
|
|
|
|
props?.cellProperties?.horizontalAlignment &&
|
|
|
|
|
JUSTIFY_CONTENT[props?.cellProperties?.horizontalAlignment]};
|
|
|
|
|
align-items: ${(props) =>
|
|
|
|
|
props?.cellProperties?.verticalAlignment &&
|
|
|
|
|
ALIGN_ITEMS[props?.cellProperties?.verticalAlignment]};
|
|
|
|
|
background: ${(props) => props?.cellProperties?.cellBackground};
|
|
|
|
|
font-size: ${(props) =>
|
|
|
|
|
props?.cellProperties?.textSize &&
|
|
|
|
|
TEXT_SIZES[props?.cellProperties?.textSize]};
|
|
|
|
|
`;
|
|
|
|
|
|
2021-04-09 10:34:01 +00:00
|
|
|
export const DraggableHeaderWrapper = styled.div<{
|
|
|
|
|
horizontalAlignment?: CellAlignment;
|
|
|
|
|
}>`
|
|
|
|
|
text-align: ${(props) =>
|
|
|
|
|
props?.horizontalAlignment && TEXT_ALIGN[props?.horizontalAlignment]};
|
|
|
|
|
`;
|
|
|
|
|
|
2021-02-16 10:29:08 +00:00
|
|
|
export const CellWrapper = styled.div<{
|
|
|
|
|
isHidden?: boolean;
|
|
|
|
|
cellProperties?: CellLayoutProperties;
|
2021-03-24 11:24:10 +00:00
|
|
|
isHyperLink?: boolean;
|
|
|
|
|
useLinkToolTip?: boolean;
|
2021-08-17 12:54:43 +00:00
|
|
|
isCellVisible?: boolean;
|
2021-09-06 07:06:15 +00:00
|
|
|
isTextType?: boolean;
|
2021-02-16 10:29:08 +00:00
|
|
|
}>`
|
2021-08-30 09:29:58 +00:00
|
|
|
display: ${(props) => (props.isCellVisible !== false ? "flex" : "none")};
|
2021-08-17 12:54:43 +00:00
|
|
|
|
2020-06-03 10:50:10 +00:00
|
|
|
align-items: center;
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
width: 100%;
|
2020-06-18 11:23:11 +00:00
|
|
|
height: 100%;
|
2020-06-03 10:50:10 +00:00
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
2020-06-16 07:37:39 +00:00
|
|
|
white-space: nowrap;
|
2020-12-24 04:32:25 +00:00
|
|
|
opacity: ${(props) => (props.isHidden ? "0.6" : "1")};
|
2021-02-16 10:29:08 +00:00
|
|
|
${TableStyles};
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
.image-cell-wrapper {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
2020-06-03 10:50:10 +00:00
|
|
|
.image-cell {
|
2021-02-16 10:29:08 +00:00
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
2020-06-03 10:50:10 +00:00
|
|
|
margin: 0 5px 0 0;
|
|
|
|
|
border-radius: 4px;
|
2021-04-19 05:01:17 +00:00
|
|
|
background-position-x: ${(props) =>
|
|
|
|
|
props?.cellProperties?.horizontalAlignment &&
|
|
|
|
|
IMAGE_HORIZONTAL_ALIGN[props?.cellProperties?.horizontalAlignment]};
|
|
|
|
|
background-position-y: ${(props) =>
|
|
|
|
|
props?.cellProperties?.verticalAlignment &&
|
|
|
|
|
IMAGE_VERTICAL_ALIGN[props?.cellProperties?.verticalAlignment]};
|
2020-06-03 10:50:10 +00:00
|
|
|
background-repeat: no-repeat;
|
2021-02-16 10:29:08 +00:00
|
|
|
background-size: contain;
|
2020-06-03 10:50:10 +00:00
|
|
|
}
|
|
|
|
|
video {
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
2021-03-24 11:24:10 +00:00
|
|
|
${(props) =>
|
|
|
|
|
props.isHyperLink &&
|
|
|
|
|
`
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
&:hover {
|
|
|
|
|
color: ${Colors.ROYAL_BLUE};
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
}`};
|
2020-06-16 07:37:39 +00:00
|
|
|
&.video-cell {
|
|
|
|
|
height: 100%;
|
|
|
|
|
iframe {
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-03-24 11:24:10 +00:00
|
|
|
.link-text {
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
white-space: nowrap;
|
2021-05-04 19:48:40 +00:00
|
|
|
text-align: ${(props) =>
|
|
|
|
|
props?.cellProperties?.horizontalAlignment &&
|
|
|
|
|
TEXT_ALIGN[props?.cellProperties?.horizontalAlignment]};
|
2021-03-24 11:24:10 +00:00
|
|
|
}
|
|
|
|
|
.hidden-icon {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
.hidden-icon {
|
|
|
|
|
display: inline;
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-06-03 10:50:10 +00:00
|
|
|
`;
|
2020-07-02 06:26:01 +00:00
|
|
|
|
2021-07-07 05:52:10 +00:00
|
|
|
export const CellCheckboxWrapper = styled(CellWrapper)<{ isChecked?: boolean }>`
|
|
|
|
|
justify-content: center;
|
|
|
|
|
width: 40px;
|
|
|
|
|
& > div {
|
2021-10-26 08:31:27 +00:00
|
|
|
${(props) =>
|
|
|
|
|
props.isChecked
|
|
|
|
|
? `
|
|
|
|
|
background: ${Colors.FERN_GREEN};
|
|
|
|
|
&:hover {
|
|
|
|
|
background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
|
|
|
|
|
${Colors.FERN_GREEN};
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
: `
|
|
|
|
|
border: 1px solid ${Colors.GREY_3};
|
|
|
|
|
&:hover {
|
|
|
|
|
border: 1px solid ${Colors.GREY_5};
|
|
|
|
|
}
|
|
|
|
|
`};
|
2021-07-07 05:52:10 +00:00
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const CellCheckbox = styled.div`
|
2021-10-26 08:31:27 +00:00
|
|
|
height: 14px;
|
|
|
|
|
width: 14px;
|
|
|
|
|
background: ${Colors.WHITE};
|
|
|
|
|
cursor: pointer;
|
2021-07-07 05:52:10 +00:00
|
|
|
position: relative;
|
|
|
|
|
.th-svg {
|
|
|
|
|
display: block;
|
|
|
|
|
position: absolute;
|
2021-10-26 08:31:27 +00:00
|
|
|
left: 2px;
|
|
|
|
|
top: 2px;
|
2021-07-07 05:52:10 +00:00
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
2020-08-10 06:47:47 +00:00
|
|
|
export const TableHeaderWrapper = styled.div<{
|
|
|
|
|
serverSidePaginationEnabled: boolean;
|
|
|
|
|
width: number;
|
2020-08-13 16:41:08 +00:00
|
|
|
tableSizes: TableSizes;
|
2020-08-13 06:53:21 +00:00
|
|
|
backgroundColor?: Color;
|
2020-08-10 06:47:47 +00:00
|
|
|
}>`
|
2021-03-18 19:09:13 +00:00
|
|
|
position: relative;
|
2020-07-02 06:26:01 +00:00
|
|
|
display: flex;
|
2021-03-18 19:09:13 +00:00
|
|
|
width: ${(props) => props.width - 8}px;
|
2020-08-10 06:47:47 +00:00
|
|
|
.show-page-items {
|
2020-12-24 04:32:25 +00:00
|
|
|
display: ${(props) => (props.width < 700 ? "none" : "flex")};
|
2020-08-10 06:47:47 +00:00
|
|
|
}
|
2020-12-24 04:32:25 +00:00
|
|
|
height: ${(props) => props.tableSizes.TABLE_HEADER_HEIGHT}px;
|
|
|
|
|
min-height: ${(props) => props.tableSizes.TABLE_HEADER_HEIGHT}px;
|
2021-04-15 05:01:06 +00:00
|
|
|
overflow-x: auto;
|
2021-04-15 05:33:09 +00:00
|
|
|
${hideScrollbar};
|
2021-04-15 05:01:06 +00:00
|
|
|
.thumb-horizontal {
|
|
|
|
|
height: 4px !important;
|
|
|
|
|
border-radius: ${(props) => props.theme.radii[3]}px;
|
|
|
|
|
background: ${(props) => props.theme.colors.scrollbarLight};
|
|
|
|
|
&:hover {
|
|
|
|
|
height: 6px !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const TableHeaderInnerWrapper = styled.div<{
|
|
|
|
|
serverSidePaginationEnabled: boolean;
|
|
|
|
|
width: number;
|
|
|
|
|
tableSizes: TableSizes;
|
|
|
|
|
backgroundColor?: Color;
|
|
|
|
|
}>`
|
|
|
|
|
position: relative;
|
|
|
|
|
display: flex;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
2021-04-15 11:07:54 +00:00
|
|
|
border-bottom: 1px solid ${Colors.GEYSER_LIGHT};
|
2020-07-02 06:26:01 +00:00
|
|
|
`;
|
2020-07-03 08:26:04 +00:00
|
|
|
|
2020-08-13 16:41:08 +00:00
|
|
|
export const CommonFunctionsMenuWrapper = styled.div<{
|
|
|
|
|
tableSizes: TableSizes;
|
|
|
|
|
}>`
|
2020-07-03 08:26:04 +00:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2020-12-24 04:32:25 +00:00
|
|
|
height: ${(props) => props.tableSizes.TABLE_HEADER_HEIGHT}px;
|
2020-07-03 08:26:04 +00:00
|
|
|
`;
|
2020-07-03 08:32:21 +00:00
|
|
|
|
|
|
|
|
export const RowWrapper = styled.div`
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
2020-08-17 07:41:50 +00:00
|
|
|
font-size: 12px;
|
2020-07-03 08:32:21 +00:00
|
|
|
line-height: 20px;
|
2021-05-10 11:24:50 +00:00
|
|
|
color: ${Colors.GRAY};
|
2020-07-03 08:32:21 +00:00
|
|
|
margin: 0 4px;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
`;
|
2020-07-20 06:04:05 +00:00
|
|
|
|
|
|
|
|
export const TableIconWrapper = styled.div<{
|
|
|
|
|
selected?: boolean;
|
|
|
|
|
disabled?: boolean;
|
|
|
|
|
}>`
|
2020-12-24 04:32:25 +00:00
|
|
|
background: ${(props) =>
|
|
|
|
|
props.selected ? Colors.ATHENS_GRAY : "transparent"};
|
|
|
|
|
box-shadow: ${(props) =>
|
2020-07-20 06:04:05 +00:00
|
|
|
props.selected ? `inset 0px 4px 0px ${Colors.GREEN}` : "none"};
|
|
|
|
|
width: 48px;
|
2021-04-15 11:07:54 +00:00
|
|
|
height: 38px;
|
2020-07-20 06:04:05 +00:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
2020-12-24 04:32:25 +00:00
|
|
|
opacity: ${(props) => (props.disabled ? 0.6 : 1)};
|
|
|
|
|
cursor: ${(props) => !props.disabled && "pointer"};
|
2020-08-20 09:30:19 +00:00
|
|
|
position: relative;
|
2020-07-20 06:04:05 +00:00
|
|
|
&:hover {
|
|
|
|
|
background: ${Colors.ATHENS_GRAY};
|
|
|
|
|
}
|
|
|
|
|
`;
|
2020-08-10 06:45:31 +00:00
|
|
|
|
2021-02-11 06:00:36 +00:00
|
|
|
export const SortIconWrapper = styled.div`
|
|
|
|
|
display: inline-block;
|
2021-03-13 06:36:02 +00:00
|
|
|
height: 32px;
|
|
|
|
|
line-height: 32px;
|
2020-08-10 06:45:31 +00:00
|
|
|
`;
|
2020-08-28 14:14:47 +00:00
|
|
|
|
|
|
|
|
export const RenderOptionWrapper = styled.div<{ selected: boolean }>`
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
width: 150px;
|
|
|
|
|
position: relative;
|
|
|
|
|
.title {
|
2021-10-11 06:01:05 +00:00
|
|
|
color: ${Colors.GREY_10};
|
2020-08-28 14:14:47 +00:00
|
|
|
width: 120px;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
}
|
|
|
|
|
.type {
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 135px;
|
|
|
|
|
font-size: 12px !important;
|
2021-10-11 06:01:05 +00:00
|
|
|
color: ${Colors.GREY_10};
|
2020-08-28 14:14:47 +00:00
|
|
|
}
|
|
|
|
|
`;
|
2020-09-11 10:40:15 +00:00
|
|
|
|
|
|
|
|
export const MenuCategoryWrapper = styled.div`
|
|
|
|
|
display: flex;
|
|
|
|
|
width: 100%;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
color: ${Colors.RIVER_BED};
|
|
|
|
|
`;
|
2020-12-15 11:24:15 +00:00
|
|
|
|
|
|
|
|
export const MenuStyledOptionHeader = styled.div`
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
`;
|