<commit_before>import { useState } from 'haunted';
import { useProcessedItems } from './use-processed-items';
import { useFastLayout } from './use-fast-layout';
import { useSettings } from './settings';
import { useSortAndGroupOptions } from './use-sort-and-group-options';
import { usePublicInterface } from './use-public-interface';
import { useHeader } from './use-header';
import { useList } from './use-list';
import { useFooter } from './use-footer';

// eslint-disable-next-line max-lines-per-function
export const useOmnitable = (host) => {
	const { hashParam, settingsId, data, resizeSpeedFactor } = host,
		settingS = useSettings({ settingsId, host }),
		{ settings, setSettings, columns, resetRef } = settingS,
		sortAndGroupOptions = useSortAndGroupOptions(
			columns,
			hashParam,
			settings,
			setSettings,
			resetRef
		),
		// TODO: drop filterFunctions
		{
			processedItems,
			visibleData,
			filters,
			setFilterState,
			filterFunctions,
		} = useProcessedItems({
			data,
			columns,
			hashParam,
			sortAndGroupOptions,
		}),
		{ collapsedColumns } = useFastLayout({
			host,
			columns,
			settings,
			setSettings,
			resizeSpeedFactor,
			sortAndGroupOptions,
		}),
		dataIsValid = data && Array.isArray(data) && data.length > 0,
		[selectedItems, setSelectedItems] = useState([]);

	usePublicInterface({
		host,
		visibleData,
		sortedFilteredGroupedItems: processedItems,
		columns,
		filters,
		setFilterState,
		selectedItems,
		...sortAndGroupOptions,
	});

	return {
		header: useHeader({
			host,
			selectedItems,
			sortAndGroupOptions,
			dataIsValid,
			data,
			columns,
			filters,
			collapsedColumns,
			settings,
			filterFunctions,
			settingS,
			setFilterState,
		}),
		list: useList({
			host,
			dataIsValid,
			processedItems,
			setSelectedItems,
			columns,
			collapsedColumns,
			sortAndGroupOptions,
		}),
		footer: useFooter({
			host,
			selectedItems,
			columns,
		}),
	};
};
<commit_msg>feat(checkbox): pass proper value for hideSelectAll<commit_after>import { useState } from 'haunted';
import { useProcessedItems } from './use-processed-items';
import { useFastLayout } from './use-fast-layout';
import { useSettings } from './settings';
import { useSortAndGroupOptions } from './use-sort-and-group-options';
import { usePublicInterface } from './use-public-interface';
import { useHeader } from './use-header';
import { useList } from './use-list';
import { useFooter } from './use-footer';

// eslint-disable-next-line max-lines-per-function
export const useOmnitable = (host) => {
	const { hashParam, settingsId, data, resizeSpeedFactor } = host,
		settingS = useSettings({ settingsId, host }),
		{ settings, setSettings, columns, resetRef } = settingS,
		sortAndGroupOptions = useSortAndGroupOptions(
			columns,
			hashParam,
			settings,
			setSettings,
			resetRef
		),
		// TODO: drop filterFunctions
		{
			processedItems,
			visibleData,
			filters,
			setFilterState,
			filterFunctions,
		} = useProcessedItems({
			data,
			columns,
			hashParam,
			sortAndGroupOptions,
		}),
		{ collapsedColumns } = useFastLayout({
			host,
			columns,
			settings,
			setSettings,
			resizeSpeedFactor,
			sortAndGroupOptions,
		}),
		dataIsValid = data && Array.isArray(data) && data.length > 0,
		[selectedItems, setSelectedItems] = useState([]);

	usePublicInterface({
		host,
		visibleData,
		sortedFilteredGroupedItems: processedItems,
		columns,
		filters,
		setFilterState,
		selectedItems,
		...sortAndGroupOptions,
	});

	return {
		header: useHeader({
			host,
			selectedItems,
			sortAndGroupOptions,
			dataIsValid,
			data,
			columns,
			filters,
			collapsedColumns,
			settings,
			filterFunctions,
			settingS,
			setFilterState,
			hideSelectAll: host.hideSelectAll
		}),
		list: useList({
			host,
			dataIsValid,
			processedItems,
			setSelectedItems,
			columns,
			collapsedColumns,
			sortAndGroupOptions,
		}),
		footer: useFooter({
			host,
			selectedItems,
			columns,
		}),
	};
};

{'fraction_non_alphanumeric': 0.11993965300477748, 'fraction_numerical': 0.0005028916268544129, 'mean_word_length': 3.7244655581947743, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3352814', 'n_tokens_mistral': 1470, 'n_tokens_neox': 1241, 'n_words': 271}