<commit_before>// = require jquery3
// = require foundation
// = require rails-ujs
// = require ./tab_focus
// = require ./choose_language
// = require ./toggle_nav
// = require ./sort_list.component
// = require decidim/editor
// = require foundation-datepicker
// = require form_datepicker
// = require moment.min
// = require decidim/data_picker
// = require jquery.auto-complete
// = require ./auto_label_by_position.component
// = require ./auto_buttons_by_position.component
// = require ./dynamic_fields.component
// = require ./field_dependent_inputs.component
// = require ./bundle
// = require ./draggable-list
// = require ./sortable
// = require ./gallery
// = require ./moderations
// = require decidim/input_tags
// = require decidim/input_hashtags
// = require decidim/input_mentions
// = require decidim/vizzs
// = require jquery.serializejson
// = require decidim/ajax_modals
// = require ./officializations
// = require decidim/input_character_counter
// = require decidim/geocoding/attach_input
// = require_self

window.Decidim = window.Decidim || {};
window.DecidimAdmin = window.DecidimAdmin || {};

const pageLoad = () => {
  const { toggleNav, createSortList, renderAutocompleteSelects } = window.DecidimAdmin;

  $(document).foundation();

  toggleNav();

  renderAutocompleteSelects('[data-plugin="autocomplete"]');

  createSortList("#steps tbody", {
    placeholder: $('<tr style="border-style: dashed; border-color: #000"><td colspan="4">&nbsp;</td></tr>')[0],
    onSortUpdate: ($children) => {
      const sortUrl = $("#steps tbody").data("sort-url")
      const order = $children.map((index, child) => $(child).data("id")).toArray();

      $.ajax({
        method: "POST",
        url: sortUrl,
        contentType: "application/json",
        data: JSON.stringify({ items_ids: order }) }, // eslint-disable-line camelcase
      );
    }
  })
};

$(() => {
  if (window.Decidim.DataPicker) {
    window.theDataPicker = new window.Decidim.DataPicker($(".data-picker"));
  }

  pageLoad();

  if (window.Decidim.formDatePicker) {
    window.Decidim.formDatePicker();
  }

  if (window.Decidim.quillEditor) {
    window.Decidim.quillEditor();
  }
});
<commit_msg>Fix require session timeouter javascript in admin application.js (#7389)<commit_after>// = require jquery3
// = require foundation
// = require rails-ujs
// = require ./tab_focus
// = require ./choose_language
// = require ./toggle_nav
// = require ./sort_list.component
// = require decidim/editor
// = require foundation-datepicker
// = require form_datepicker
// = require moment.min
// = require decidim/data_picker
// = require jquery.auto-complete
// = require ./auto_label_by_position.component
// = require ./auto_buttons_by_position.component
// = require ./dynamic_fields.component
// = require ./field_dependent_inputs.component
// = require ./bundle
// = require ./draggable-list
// = require ./sortable
// = require ./gallery
// = require ./moderations
// = require decidim/input_tags
// = require decidim/input_hashtags
// = require decidim/input_mentions
// = require decidim/vizzs
// = require jquery.serializejson
// = require decidim/ajax_modals
// = require ./officializations
// = require decidim/input_character_counter
// = require decidim/geocoding/attach_input
// = require decidim/session_timeouter
// = require_self

window.Decidim = window.Decidim || {};
window.DecidimAdmin = window.DecidimAdmin || {};

const pageLoad = () => {
  const { toggleNav, createSortList, renderAutocompleteSelects } = window.DecidimAdmin;

  $(document).foundation();

  toggleNav();

  renderAutocompleteSelects('[data-plugin="autocomplete"]');

  createSortList("#steps tbody", {
    placeholder: $('<tr style="border-style: dashed; border-color: #000"><td colspan="4">&nbsp;</td></tr>')[0],
    onSortUpdate: ($children) => {
      const sortUrl = $("#steps tbody").data("sort-url")
      const order = $children.map((index, child) => $(child).data("id")).toArray();

      $.ajax({
        method: "POST",
        url: sortUrl,
        contentType: "application/json",
        data: JSON.stringify({ items_ids: order }) }, // eslint-disable-line camelcase
      );
    }
  })
};

$(() => {
  if (window.Decidim.DataPicker) {
    window.theDataPicker = new window.Decidim.DataPicker($(".data-picker"));
  }

  pageLoad();

  if (window.Decidim.formDatePicker) {
    window.Decidim.formDatePicker();
  }

  if (window.Decidim.quillEditor) {
    window.Decidim.quillEditor();
  }
});

{'fraction_non_alphanumeric': 0.16681534344335414, 'fraction_numerical': 0.003568242640499554, 'mean_word_length': 3.4805194805194803, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, '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': '7590845', 'n_tokens_mistral': 1421, 'n_tokens_neox': 1366, 'n_words': 256}