<commit_before>import WeaveLayoutManager from "./WeaveLayoutManager";
import WeaveC3Barchart from "../outts/tools/weave-c3-barchart.jsx";
import WeaveC3ScatterPlot from "../outts/tools/weave-c3-scatterplot.jsx";
import WeaveC3ColorLegend from "../outts/tools/weave-c3-colorlegend.jsx";
import WeaveC3LineChart from "./tools/weave-c3-linechart.jsx";
import WeaveC3PieChart from "../outts/tools/weave-c3-piechart.jsx";
import WeaveC3Histogram from "../outts/tools/weave-c3-histogram.jsx";
import WeaveOpenLayersMap from "./tools/map.js";
import WeaveReactTable from "./tools/weave-react-table.jsx";
import SessionStateMenuTool from "./tools/weave-session-state-menu.jsx";
import JSZip from "jszip";

import React from "react";
import ReactDOM from "react-dom";

/*global Weave, weavejs*/

weavejs.util.JS.JSZip = JSZip;

var WeaveUI = {
    Layout: WeaveLayoutManager,
    Barchart: WeaveC3Barchart,
    ScatterPlot: WeaveC3ScatterPlot,
    ColorLegend: WeaveC3ColorLegend,
    LineChart: WeaveC3LineChart,
    PieChart: WeaveC3PieChart,
    Histogram: WeaveC3Histogram,
    Map: WeaveOpenLayersMap,
    DataTable: WeaveReactTable,
    MenuTool: SessionStateMenuTool
};

WeaveUI.loadLayout = function(weave, fileName, targetEltId) {

    function render() {
        ReactDOM.render(
            <WeaveUI.Layout weave={weave}/>, document.getElementById(targetEltId)
        );
    }

    weavejs.core.WeaveArchive.loadUrl(weave, fileName).then(render, e => {
        console.error(e)
    });

}

// namespace WeaveUI
window.WeaveUI = WeaveUI;

export default WeaveUI;<commit_msg>added callback function to loadLayout, added loadUrlParams<commit_after>import WeaveLayoutManager from "./WeaveLayoutManager";
import WeaveC3Barchart from "../outts/tools/weave-c3-barchart.jsx";
import WeaveC3ScatterPlot from "../outts/tools/weave-c3-scatterplot.jsx";
import WeaveC3ColorLegend from "../outts/tools/weave-c3-colorlegend.jsx";
import WeaveC3LineChart from "./tools/weave-c3-linechart.jsx";
import WeaveC3PieChart from "../outts/tools/weave-c3-piechart.jsx";
import WeaveC3Histogram from "../outts/tools/weave-c3-histogram.jsx";
import WeaveOpenLayersMap from "./tools/map.js";
import WeaveReactTable from "./tools/weave-react-table.jsx";
import SessionStateMenuTool from "./tools/weave-session-state-menu.jsx";
import StandardLib from "../outts/Utils/StandardLib.js";
import JSZip from "jszip";

import React from "react";
import ReactDOM from "react-dom";

/*global Weave, weavejs*/

weavejs.util.JS.JSZip = JSZip;

var WeaveUI = {
    Layout: WeaveLayoutManager,
    Barchart: WeaveC3Barchart,
    ScatterPlot: WeaveC3ScatterPlot,
    ColorLegend: WeaveC3ColorLegend,
    LineChart: WeaveC3LineChart,
    PieChart: WeaveC3PieChart,
    Histogram: WeaveC3Histogram,
    Map: WeaveOpenLayersMap,
    DataTable: WeaveReactTable,
    MenuTool: SessionStateMenuTool,
    loadUrlParams: StandardLib.loadUrlParams
};

WeaveUI.loadLayout = function(weave, fileName, targetEltId, callback) {

    function render() {
        ReactDOM.render(
            <WeaveUI.Layout weave={weave}/>,
            document.getElementById(targetEltId),
            callback
        );
    }

    weavejs.core.WeaveArchive.loadUrl(weave, fileName).then(render, e => {
        console.error(e)
    });

}

// namespace WeaveUI
window.WeaveUI = WeaveUI;

export default WeaveUI;
{'fraction_non_alphanumeric': 0.11931818181818182, 'fraction_numerical': 0.01076555023923445, 'mean_word_length': 4.1461538461538465, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4844259', 'n_tokens_mistral': 1189, 'n_tokens_neox': 1173, 'n_words': 213}