<commit_before>import { Controller } from "stimulus";
import TomSelect from "tom-select";

export default class extends Controller {
  static values = { options: Object };
  static defaults = {
    maxItems: 1,
    maxOptions: null,
    plugins: ["dropdown_input"],
    allowEmptyOption: true,
  };

  connect() {
    this.control = new TomSelect(this.element, {
      ...this.constructor.defaults,
      ...this.optionsValue,
    });
  }

  disconnect() {
    if (this.control) this.control.destroy();
  }
}<commit_msg>Prepare tom-select controller to inherit others controllers<commit_after>import { Controller } from "stimulus";
import TomSelect from "tom-select";

export default class extends Controller {
  static values = { options: Object };
  static defaults = {
    maxItems: 1,
    maxOptions: null,
    plugins: ["dropdown_input"],
    allowEmptyOption: true,
  };

  connect(options = {}) {
    this.control = new TomSelect(this.element, {
      ...this.constructor.defaults,
      ...this.optionsValue,
      ...options,
    });
  }

  disconnect() {
    if (this.control) this.control.destroy();
  }
}
{'fraction_non_alphanumeric': 0.13440860215053763, 'fraction_numerical': 0.0017921146953405018, 'mean_word_length': 3.137037037037037, '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': '2135054', 'n_tokens_mistral': 333, 'n_tokens_neox': 323, 'n_words': 81}