2020-06-03 10:50:10 +00:00
|
|
|
import styled from "styled-components";
|
2020-08-10 11:16:13 +00:00
|
|
|
import { TableSizes } from "widgets/TableWidget";
|
2020-08-13 16:41:08 +00:00
|
|
|
import { Colors, Color } from "constants/Colors";
|
2020-08-10 11:16:13 +00:00
|
|
|
import { scrollbarLight } from "constants/DefaultTheme";
|
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;
|
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;
|
2020-11-06 11:18:04 +00:00
|
|
|
overflow: auto;
|
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%;
|
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 {
|
|
|
|
|
.tr {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
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 {
|
2020-06-16 07:37:39 +00:00
|
|
|
background: ${Colors.POLAR};
|
2020-07-28 14:26:27 +00:00
|
|
|
&:hover {
|
|
|
|
|
background: ${Colors.POLAR};
|
|
|
|
|
}
|
2020-06-03 10:50:10 +00:00
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: ${Colors.ATHENS_GRAY};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.th,
|
|
|
|
|
.td {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 9px 10px;
|
|
|
|
|
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;
|
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
|
|
|
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;
|
2020-06-03 10:50:10 +00:00
|
|
|
padding: 0 10px;
|
|
|
|
|
}
|
2020-11-06 11:18:04 +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;
|
|
|
|
|
&.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 {
|
|
|
|
|
display: flex;
|
|
|
|
|
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;
|
2020-06-03 10:50:10 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const PaginationItemWrapper = styled.div<{
|
|
|
|
|
disabled?: boolean;
|
|
|
|
|
selected?: boolean;
|
|
|
|
|
}>`
|
2020-12-24 04:32:25 +00:00
|
|
|
background: ${(props) =>
|
|
|
|
|
props.disabled ? Colors.ATHENS_GRAY : Colors.WHITE};
|
2020-06-03 10:50:10 +00:00
|
|
|
border: 1px solid
|
2020-12-24 04:32:25 +00:00
|
|
|
${(props) => (props.selected ? Colors.GREEN : Colors.GEYSER_LIGHT)};
|
2020-06-03 10:50:10 +00:00
|
|
|
box-sizing: border-box;
|
|
|
|
|
border-radius: 4px;
|
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;
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const ActionWrapper = styled.div`
|
2020-07-14 07:55:46 +00:00
|
|
|
margin: 0 5px 0 0;
|
|
|
|
|
&&&&&& {
|
|
|
|
|
.bp3-button span {
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-06-03 10:50:10 +00:00
|
|
|
`;
|
|
|
|
|
|
2020-08-13 16:41:08 +00:00
|
|
|
export const CellWrapper = styled.div<{ isHidden?: boolean }>`
|
2020-06-03 10:50:10 +00:00
|
|
|
display: flex;
|
|
|
|
|
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")};
|
2020-06-03 10:50:10 +00:00
|
|
|
.image-cell {
|
|
|
|
|
width: 40px;
|
|
|
|
|
height: 32px;
|
|
|
|
|
margin: 0 5px 0 0;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
background-position: center;
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-size: cover;
|
|
|
|
|
}
|
|
|
|
|
video {
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
2020-06-16 07:37:39 +00:00
|
|
|
&.video-cell {
|
|
|
|
|
height: 100%;
|
|
|
|
|
iframe {
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-06-03 10:50:10 +00:00
|
|
|
`;
|
2020-07-02 06:26:01 +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
|
|
|
}>`
|
2020-07-02 06:26:01 +00:00
|
|
|
display: flex;
|
|
|
|
|
border-bottom: 1px solid ${Colors.GEYSER_LIGHT};
|
2020-12-24 04:32:25 +00:00
|
|
|
width: ${(props) => props.width}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-08-28 09:55:20 +00:00
|
|
|
overflow-x: auto;
|
2020-08-13 06:53:21 +00:00
|
|
|
overflow-y: hidden;
|
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;
|
2020-08-10 11:16:13 +00:00
|
|
|
${scrollbarLight};
|
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;
|
2020-08-17 07:41:50 +00:00
|
|
|
color: ${Colors.BLUE_BAYOUX};
|
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;
|
2020-08-28 09:55:20 +00:00
|
|
|
height: 42px;
|
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
|
|
|
|
2020-08-20 06:38:16 +00:00
|
|
|
export const SortIconWrapper = styled.div<{ rotate: string }>`
|
2020-12-24 04:32:25 +00:00
|
|
|
transform: ${(props) =>
|
|
|
|
|
props.rotate === "true" ? "rotate(180deg)" : "none"};
|
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;
|
2020-12-24 04:32:25 +00:00
|
|
|
background: ${(props) => props.selected && Colors.GREEN};
|
2020-08-28 14:14:47 +00:00
|
|
|
position: relative;
|
|
|
|
|
.title {
|
2020-12-24 04:32:25 +00:00
|
|
|
color: ${(props) => (props.selected ? Colors.WHITE : Colors.OXFORD_BLUE)};
|
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;
|
2020-12-24 04:32:25 +00:00
|
|
|
color: ${(props) => (props.selected ? Colors.WHITE : Colors.BLUE_BAYOUX)};
|
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;
|
|
|
|
|
`;
|