UNPKG

@adaptabletools/adaptable

Version:

Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

11 lines (10 loc) 1.58 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { CheckBox } from '../../../../components/CheckBox'; import { DataPreview } from './DataPreview'; import { Box, Flex } from '../../../../components/Flex'; import { Card } from '../../../../components/Card'; export const ValidationSection = (props) => { return (_jsxs(Flex, { flexDirection: "column", className: "twa:h-full twa:gap-3 twa:p-3", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Import Options" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose how rows that fail validation should be handled" })] }), _jsx(Card.Body, { children: _jsx(CheckBox, { onChange: () => { props.onSkipInvalidRowsChange(!props.skipInvalidRows); }, checked: props.skipInvalidRows, children: "Exclude invalid rows from import" }) })] }), _jsxs(Card, { shadow: false, className: "twa:flex-1 twa:min-h-0", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Preview" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Review imported data and fix any validation errors before importing" })] }), _jsx(Card.Body, { className: "twa:flex-1 twa:min-h-0", children: _jsx(DataPreview, { columnsMap: props.columnsMap, data: props.data, errors: props.errors, editable: true, onDataChange: props.onDataChange }) })] })] })); };