@finos/legend-extension-dsl-data-quality
Version:
Legend extension for Data Quality
37 lines • 3.92 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
/**
* Copyright (c) 2020-present, Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { clsx, Dialog, Modal, ModalBody, ModalFooter, ModalFooterButton, ModalHeader, } from '@finos/legend-art';
import { observer } from 'mobx-react-lite';
import { PrimitiveType } from '@finos/legend-graph';
import { InlineLambdaEditor } from '@finos/legend-query-builder';
export const DataQualityValidationDetailPanel = observer((props) => {
const { dataQualityRelationValidationState, isReadOnly, relationValidationState, changeName, onLambdaEditorFocus, forceBackdrop, changeDescription, } = props;
const { editorStore: { applicationStore }, } = dataQualityRelationValidationState;
const { relationValidation } = relationValidationState;
const closePlanViewer = () => {
relationValidationState.setIsValidationDialogOpen(false);
};
return (_jsx(Dialog, { open: true, classes: {
root: 'relation-validation-dialog-modal__root-container',
container: 'relation-validation-dialog-modal__container',
paper: 'relation-validation-dialog-modal__content',
}, children: _jsxs(Modal, { className: "relation-validation-dialog-modal", darkMode: !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled, children: [_jsx(ModalHeader, { title: "Validation Details" }), _jsx(ModalBody, { className: "relation-validation-dialog-modal__body", children: _jsxs("div", { className: clsx('relation-validation-editor', {
backdrop__element: relationValidationState.parserError,
}), children: [_jsxs("div", { className: "relation-validation-editor__content", children: [_jsx("div", { className: "relation-validation-editor__label", children: "Name" }), _jsx("input", { className: "relation-validation-editor__content__name", spellCheck: false, disabled: isReadOnly, value: relationValidation.name, onChange: changeName, placeholder: "Validation name" })] }), _jsxs("div", { className: "relation-validation-editor__content", children: [_jsx("div", { className: "relation-validation-editor__label", children: "Validation Grammar" }), _jsx("div", { className: "data-quality-uml-element-editor__validation", children: _jsx("div", { className: "data-quality-uml-element-editor__lambda__value", children: _jsx(InlineLambdaEditor, { disabled: dataQualityRelationValidationState.isConvertingValidationLambdaObjects ||
isReadOnly, lambdaEditorState: relationValidationState, forceBackdrop: forceBackdrop, expectedType: PrimitiveType.BOOLEAN, onEditorFocus: () => onLambdaEditorFocus(true), disablePopUp: true, forceExpansion: true, className: "relation-validation__lambda" }) }) })] }), _jsxs("div", { className: "relation-validation-editor__content", children: [_jsx("div", { className: "relation-validation-editor__label", children: "Description" }), _jsx("input", { className: "relation-validation-editor__content__name", spellCheck: false, disabled: isReadOnly, value: relationValidation.description, onChange: changeDescription, placeholder: "Enter the description" })] })] }) }), _jsx(ModalFooter, { children: _jsx(ModalFooterButton, { onClick: closePlanViewer, text: "Close", type: "secondary" }) })] }) }));
});
//# sourceMappingURL=DataQualityValidationDetailPanel.js.map