<commit_before>import Em from 'ember';
import LlamaCell from './llama-cell';
import { defaultValue } from 'llama-table/computed';

var LlamaHeaderCell = LlamaCell.extend({
	templateName: 'llama-header-cell',
	classNames: 'llama-header-cell',
	classNameBindings: ['sortByThis', 'sortByThisAscending', 'sortByThisDescending', 'isSortable'],
	attributeBindings: ['title'],
	showLabel: Em.computed.alias('column.showLabel'),

	column: null,

	title: function () {
		var label = this.get('column.label');
		if (Em.isBlank(label)) {
			label = this.get('column.name');
		}
		return label;
	}.property('column.label'),

	isSortable: defaultValue('column.isSortable', true),
	isResizable: defaultValue('column.isResizable', true),

	sortProperties: Em.computed.alias('controller.sortProperties'),
	sortAscending: Em.computed.alias('controller.sortAscending'),
	sortDescending: Em.computed.not('sortAscending'),

	sortByThis: function () {
		var sortProperties = this.get('sortProperties');
		var thisColumn = this.get('column.name');
		var contained = Em.isArray(sortProperties) && sortProperties.contains(thisColumn);
		return contained;
	}.property('sortProperties', 'column.name'),

	sortByThisAscending: Em.computed.and('sortByThis', 'sortAscending'),
	sortByThisDescending: Em.computed.and('sortByThis', 'sortDescending'),
<commit_msg>Fixed table-wide sortable and resizable overrides<commit_after>import Em from 'ember';
import LlamaCell from './llama-cell';
import { defaultValue } from 'llama-table/computed';

var LlamaHeaderCell = LlamaCell.extend({
	templateName: 'llama-header-cell',
	classNames: 'llama-header-cell',
	classNameBindings: ['sortByThis', 'sortByThisAscending', 'sortByThisDescending', 'isSortable'],
	attributeBindings: ['title'],
	showLabel: Em.computed.alias('column.showLabel'),

	column: null,

	title: function () {
		var label = this.get('column.label');
		if (Em.isBlank(label)) {
			label = this.get('column.name');
		}
		return label;
	}.property('column.label'),

	tableIsSortable: defaultValue('controller.isSortable', true),
	columnIsSortable: defaultValue('column.isSortable', true),
	isSortable: Em.computed.and('tableIsSortable', 'columnIsSortable'),
	tableIsResizable: defaultValue('controller.isResizable', true),
	columnIsResizable: defaultValue('column.isResizable', true),
	isResizable: Em.computed.and('tableIsResizable', 'columnIsResizable'),

	sortProperties: Em.computed.alias('controller.sortProperties'),
	sortAscending: Em.computed.alias('controller.sortAscending'),
	sortDescending: Em.computed.not('sortAscending'),

	sortByThis: function () {
		var sortProperties = this.get('sortProperties');
		var thisColumn = this.get('column.name');
		var contained = Em.isArray(sortProperties) && sortProperties.contains(thisColumn);
		return contained;
	}.property('sortProperties', 'column.name'),

	sortByThisAscending: Em.computed.and('sortByThis', 'sortAscending'),
	sortByThisDescending: Em.computed.and('sortByThis', 'sortDescending'),

{'fraction_non_alphanumeric': 0.15263334451526334, 'fraction_numerical': 0.0, 'mean_word_length': 6.8680738786279685, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7198476', 'n_tokens_mistral': 981, 'n_tokens_neox': 932, 'n_words': 169}