<commit_before>
//= require <widgets/natives/box>


Ergo.declare('Ergo.widgets.grid.Header', 'Ergo.widgets.Box', {
	
	defaults: {
		html: '<table cellspacing="0" cellpadding="0"/>',
		
		layout: {
			etype: 'default-layout',
			html: '<thead/>'
		},
		
		cls: 'e-grid-header',
		
		defaultItem: {
			etype: 'grid-header-row'
		},
		
		columns: [],
		row: {},
		cell: {},
		
		items: [{}]
	},
	
	$init: function(o) {
		this.$super(o);
		
		// var control_cols = [];
		// for(var i = 0; i < o.columns.length; i++) {
			// var c = o.columns[i];
			// var col = {};
			// if(c.width) {
				// col.width = c.width;
				// delete c.width;
			// }
			// control_cols.push(col);
		// }
		
		
		Ergo.smart_override(o.defaultItem, o.row, {items: o.columns, defaultItem: o.cell});
//		Ergo.smart_override(o.components.control, {items: control_cols});
		
	}
	
	
	
}, 'grid-header');<commit_msg>fix table<commit_after>
//= require <widgets/natives/box>


Ergo.declare('Ergo.widgets.grid.Header', 'Ergo.widgets.Box', {
	
	defaults: {
		html: '<table cellspacing="0" cellpadding="0"/>',
		
		layout: {
			etype: 'default-layout',
			html: '<thead/>'
		},
		
		cls: 'e-grid-header',
		
		defaultItem: {
			etype: 'grid-header-row'
		},
		
		components: {
			control: {
				etype: 'grid-row',
				cls: 'e-grid-control-row',
				weight: -1
			}
		},
		
		
		columns: [],
		row: {},
		cell: {},
		
		items: [{}]
	},
	
	$init: function(o) {
		this.$super(o);
		
		var control_cols = [];
		for(var i = 0; i < o.columns.length; i++) {
			var c = o.columns[i];
			var col = {};
			if(c.width) {
				col.width = c.width;
				delete c.width;
			}
			control_cols.push(col);
		}
		
		
		Ergo.smart_override(o.defaultItem, o.row, {items: o.columns, defaultItem: o.cell});
		Ergo.smart_override(o.components.control, {items: control_cols});
		
	}
	
	
	
}, 'grid-header');
{'fraction_non_alphanumeric': 0.20889853499728703, 'fraction_numerical': 0.0037981551817688553, 'mean_word_length': 2.4990512333965844, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '903950', 'n_tokens_mistral': 883, 'n_tokens_neox': 700, 'n_words': 120}