UNPKG

@adaptabletools/adaptable

Version:

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

19 lines (18 loc) 1.61 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import * as React from 'react'; import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard'; import { NewScopeComponent } from '../../Components/NewScopeComponent'; import { Box, Flex } from '../../../components/Flex'; export const PlusMinusScopeWizardSection = (props) => { const { data, api } = useOnePageAdaptableWizardContext(); const availableColumns = React.useMemo(() => api.columnApi.getNumericColumns(), []); return (_jsxs(Flex, { flexDirection: "column", className: "twa:h-full", children: [_jsxs(Flex, { flexDirection: "row", alignItems: "center", className: "twa:p-2 twa:gap-3 twa:border-b twa:mb-2 twa:border-b-foreground/20", children: [_jsx(Box, { className: "twa:text-5 twa:font-medium", children: "Target" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:max-w-[520px]", children: "Specify where the Plus/Minus Nudge should be applied (numeric columns only)" })] }), _jsx(Box, { className: "twa:flex-1 twa:min-h-0 twa:overflow-auto twa:p-2", children: _jsx(NewScopeComponent, { disableDataTypes: true, scopeColumns: availableColumns, scope: data.Scope, descriptions: { rowScope: 'Matching rows will have the plus/minus applied', columnScope: 'Selected Columns will have the plus/minus applied', }, updateScope: (Scope) => { props.onChange({ ...data, Scope: Scope, }); } }) })] })); };