<commit_before>import Directive from '../directive';
import Command from 'core/infrastructure/command';
import AppError from 'core/infrastructure/error';
import * as sortService from 'core/sort/sort.service';
import {VIEW_CORE_NAME, HEAD_CORE_NAME, TH_CORE_NAME} from 'src/definition';

class HeadCore extends Directive(HEAD_CORE_NAME, {view: `^^${VIEW_CORE_NAME}`}) {
	constructor($scope) {
		super();

		this.$scope = $scope;
		this.drop = new Command({
			canExecute: e => e.source.key === TH_CORE_NAME,
			execute: e => {
				const view = this.view.model.view;
				const columns = view().columns;
				const targetIndex = columns.findIndex(c => c.key === e.target.value);
				const sourceIndex = columns.findIndex(c => c.key === e.source.value);<commit_msg>fix dnd of columns<commit_after>import Directive from '../directive';
import Command from 'core/infrastructure/command';
import AppError from 'core/infrastructure/error';
import * as sortService from 'core/sort/sort.service';
import {VIEW_CORE_NAME, HEAD_CORE_NAME, TH_CORE_NAME} from 'src/definition';

class HeadCore extends Directive(HEAD_CORE_NAME, {view: `^^${VIEW_CORE_NAME}`}) {
	constructor($scope) {
		super();

		this.$scope = $scope;
		this.drop = new Command({
			canExecute: e => e.source.key === TH_CORE_NAME,
			execute: e => {
				const view = this.view.model.view;
				const columns = view().columns;
				const targetIndex = columns.findIndex(c => c.model.key === e.target.value);
				const sourceIndex = columns.findIndex(c => c.model.key === e.source.value);
{'fraction_non_alphanumeric': 0.1483409238776838, 'fraction_numerical': 0.0, 'mean_word_length': 4.696296296296296, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2253155', 'n_tokens_mistral': 523, 'n_tokens_neox': 482, 'n_words': 118}