Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
numericSortMethod,
textSortMethod,
determineColumnWidth,
pathOr,
emptyStateValue,
isNil,
} from "../utils/utils";
const numericPattern = "([+-]?[0-9]*(\\.[0-9]*)?)(:[+-]?[0-9]*(\\.[0-9]*)?)?";
// Special markers we use as category for empty run results
const RUN_ABORTED = "aborted"; // result tag was present but empty (failure)
const RUN_EMPTY = "empty"; // result tag was not present in results XML
const SPECIAL_CATEGORIES = { [RUN_EMPTY]: "Empty rows", [RUN_ABORTED]: "—" };
const ReactTableFixedColumns = withFixedColumns(ReactTable);
export default function Table(props) {
const [fixed, setFixed] = useState(true);
let [filteredColumnValues, setFilteredColumnValues] = useState({});
let [disableTaskText, setDisableTaskText] = useState(false);
function FilterInputField(props) {
const elementId = props.column.id + "_filter";
const filter = props.filter ? props.filter.value : props.filter;
let value;
let typingTimer;
const textPlaceHolder = disableTaskText
? "To edit, please clear task id filter in the sidebar"
: "text";
//
// SPDX-License-Identifier: Apache-2.0
import React from "react";
import ReactTable from "react-table";
import "react-table/react-table.css";
import withFixedColumns from "react-table-hoc-fixed-columns";
import "react-table-hoc-fixed-columns/lib/styles.css";
import {
createRunSetColumns,
StandardColumnHeader,
SelectColumnsButton,
} from "./TableComponents.js";
import { determineColumnWidth, isNumericColumn } from "../utils/utils";
const ReactTableFixedColumns = withFixedColumns(ReactTable);
export default class Summary extends React.Component {
constructor(props) {
super(props);
this.state = {
fixed: true,
};
this.infos = [
"displayName",
"tool",
"limit",
"host",
"os",
"system",
"date",
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import ReactTable from 'react-table';
import withFixedColumns from 'react-table-hoc-fixed-columns';
const ReactTableFixedColumns = withFixedColumns(ReactTable);
const SmartTable = (props) => {
const { striped, highlight, sortable, sticky, ...opts } = props;
const classes = cx('', {
'-highlight': highlight,
'-striped': striped,
'-sorting': sortable,
'-sticky': sticky,
});
return (
);
};
SmartTable.propTypes = {
import * as React from "react";
import ReactTable from "react-table";
import withFixedColumns from "react-table-hoc-fixed-columns";
import CustomReactTableStyles from "../css/";
import * as Dx from "../types";
import styled from "styled-components";
const ReactTableFixedColumns = withFixedColumns(ReactTable);
const switchMode = (currentMode: string) => {
const nextMode: Dx.JSONObject = {
"=": ">",
">": "<",
"<": "="
};
return nextMode[currentMode];
};
type OnChangeProps = (input: number | string) => void;
type FilterIndexSignature = "integer" | "number" | "string";
interface NumberFilterProps {
onChange: OnChangeProps;
import * as React from "react";
import ReactTable from "react-table";
import withFixedColumns from "react-table-hoc-fixed-columns";
import CustomReactTableStyles from "../css/";
import * as Dx from "../types";
import styled from "styled-components";
const ReactTableFixedColumns = withFixedColumns(ReactTable);
const switchMode = (currentMode: string) => {
const nextMode: Dx.JSONObject = {
"=": ">",
">": "<",
"<": "="
};
return nextMode[currentMode];
};
type OnChangeProps = (input: number | string) => void;
type FilterIndexSignature = "integer" | "number" | "string";
interface NumberFilterProps {
onChange: OnChangeProps;