<commit_before>import React, {useEffect} from "react";
import {
    Box,
    Button,
    Container,
    Dialog,
    DialogActions,
    DialogTitle,
    IconButton,
    Tab,
    Tabs,
    TextField,
    Typography
} from "@mui/material";
import {Add, CheckBoxOutlineBlank, Close} from "@mui/icons-material";
import LoadingSpinner from "../loadingSpinner/LoadingSpinner";
import FieldAccordion from "../fieldAccordion/FieldAccordion";
import RelationshipAccordion from "../relationshipAccordion/RelationshipAccordion";
import EntityEditorStyles from "./EntityEditorStyles";
import TabPanel from "../tabPanel/TabPanel";
import Statement from "../statement/Statement";
import {useTranslation} from "react-i18next";

function EntityEditor(props) {

    const [value, setValue] = React.useState(0);
    const [entity, setEntity] = React.useState(null);
    const entityEditorStyles = EntityEditorStyles();
    const {t} = useTranslation();

    const {entityId, onClose, handleSave, entities} = props;

    useEffect(() => {

        setEntity({...entities.find(entity => entity.id === entityId)})

    }, [entityId])

    const dataTypes = [
        {
            id: 1,
            name: "string"
        },
        {
            id: 2,
            name: "integer",
            allowMin: true,
            allowMax: true
        },
        {
            id: 3,
            name: "double",
            allowMin: true,
            allowMax: true
        },
        {
            id: 4,
            name: "date"<commit_msg>corrected npm build<commit_after>import React, {useEffect} from "react";
import {
    Box,
    Button,
    Container,
    Dialog,
    DialogActions,
    DialogTitle,
    IconButton,
    Tab,
    Tabs,
    TextField,
    Typography
} from "@mui/material";
import {Add, CheckBoxOutlineBlank, Close} from "@mui/icons-material";
import LoadingSpinner from "../loadingSpinner/LoadingSpinner";
import FieldAccordion from "../fieldAccordion/FieldAccordion";
import RelationshipAccordion from "../relationshipAccordion/RelationshipAccordion";
import EntityEditorStyles from "./EntityEditorStyles";
import TabPanel from "../tabPanel/TabPanel";
import Statement from "../statement/Statement";
import {useTranslation} from "react-i18next";

function EntityEditor(props) {

    const [value, setValue] = React.useState(0);
    const [entity, setEntity] = React.useState(null);
    const entityEditorStyles = EntityEditorStyles();
    const {t} = useTranslation();

    const {entityId, onClose, handleSave, entities} = props;

    useEffect(() => {

        setEntity({...entities.find(entity => entity.id === entityId)})

    }, [entityId, entities])

    const dataTypes = [
        {
            id: 1,
            name: "string"
        },
        {
            id: 2,
            name: "integer",
            allowMin: true,
            allowMax: true
        },
        {
            id: 3,
            name: "double",
            allowMin: true,
            allowMax: true
        },
        {
            id: 4,
            name: "date"
{'fraction_non_alphanumeric': 0.12171916010498687, 'fraction_numerical': 0.004593175853018373, 'mean_word_length': 2.3653421633554084, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5105489', 'n_tokens_mistral': 882, 'n_tokens_neox': 856, 'n_words': 214}