<commit_before>/**
 * @class Oskari.statistics.bundle.statsgrid.plugin.ManageStatsPlugin
 * Creates the indicator selection ui and the actual grid where the stats data will be displayed.
 * Handles sending the data out to create a visualization which then can be displayed on the map.
 */
Oskari.clazz.define('Oskari.statistics.bundle.statsgrid.plugin.ManageStatsPlugin',
/**
 * @method create called automatically on construction
 * @params {Object} config
 *  {
 *   'published': {Boolean}, // optional, defaults to false
 *   'state':     {Object},  // optional, defaults to an empty object
 *   'layer':     {Object}   // optional, can be set later with #setLayer
 *  }
 * @params {Object} locale   localization strings
 *
 * @static
 */
function(config, locale) {
    this.mapModule = null;
    this.pluginName = null;
    this._sandbox = null;
    this._map = null;
    this._layer = null;
    this._state = null;
    this.element = undefined;
    this.statsService = null;
    // indicators (meta data)
    this.indicators = [];

//    this.conf = config || {};
    defaults = {"statistics" : [
        {"id" : "avg", "visible": true},
        {"id" : "max", "visible": true},
        {"id" : "min", "visible": true},
        {"id" : "mde", "visible": true},
        {"id" : "mdn", "visible": true},
        {"id" : "std", "visible": true},
        {"id" : "sum", "visible": true}
        ]
    };
    this.conf = jQuery.extend(true, defaults, config);
    this._locale = locale || {};
    this.templates = {
        'csvButton'         : '<button class="statsgrid-csv-button">csv</button>',
        'statsgridTotalsVar': '<span class="statsgrid-variable"></span>',
        'subHeader'         : '<span class="statsgrid-grid-subheader"></span>',
        'gridHeaderMenu'    : '<li><input type="checkbox" /><label></label></li>'
    }
}, {
    /** 
     * @property __name module name
     * @static 
     */
    __name: 'ManageStatsPlugin',

    /**
     * @method getName
     * @return {String} plugin name
     */
    getName : function() {
        return this.pluginName;
    },
<commit_msg>Extending config with defaults instead of other way around.<commit_after>/**
 * @class Oskari.statistics.bundle.statsgrid.plugin.ManageStatsPlugin
 * Creates the indicator selection ui and the actual grid where the stats data will be displayed.
 * Handles sending the data out to create a visualization which then can be displayed on the map.
 */
Oskari.clazz.define('Oskari.statistics.bundle.statsgrid.plugin.ManageStatsPlugin',
/**
 * @method create called automatically on construction
 * @params {Object} config
 *  {
 *   'published': {Boolean}, // optional, defaults to false
 *   'state':     {Object},  // optional, defaults to an empty object
 *   'layer':     {Object}   // optional, can be set later with #setLayer
 *  }
 * @params {Object} locale   localization strings
 *
 * @static
 */
function(config, locale) {
    this.mapModule = null;
    this.pluginName = null;
    this._sandbox = null;
    this._map = null;
    this._layer = null;
    this._state = null;
    this.element = undefined;
    this.statsService = null;
    // indicators (meta data)
    this.indicators = [];

//    this.conf = config || {};
    defaults = {"statistics" : [
        {"id" : "avg", "visible": true},
        {"id" : "max", "visible": true},
        {"id" : "min", "visible": true},
        {"id" : "mde", "visible": true},
        {"id" : "mdn", "visible": true},
        {"id" : "std", "visible": true},
        {"id" : "sum", "visible": true}
        ]
    };
    this.conf = jQuery.extend(true, config, defaults);
    this._locale = locale || {};
    this.templates = {
        'csvButton'         : '<button class="statsgrid-csv-button">csv</button>',
        'statsgridTotalsVar': '<span class="statsgrid-variable"></span>',
        'subHeader'         : '<span class="statsgrid-grid-subheader"></span>',
        'gridHeaderMenu'    : '<li><input type="checkbox" /><label></label></li>'
    }
}, {
    /** 
     * @property __name module name
     * @static 
     */
    __name: 'ManageStatsPlugin',

    /**
     * @method getName
     * @return {String} plugin name
     */
    getName : function() {
        return this.pluginName;
    },

{'fraction_non_alphanumeric': 0.16117647058823528, 'fraction_numerical': 0.0, 'mean_word_length': 2.6583476764199654, 'pattern_counts': {'":': 14, '<': 25, '<?xml version=': 0, '>': 25, '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': '531489', 'n_tokens_mistral': 1278, 'n_tokens_neox': 1269, 'n_words': 340}