<commit_before>{% block oro_combobox_dataconfig_entity_field_choice %}
    $field.data('entity-field-util', new EntityFieldUtil($field));

    {% if configs.entities is defined %}
    var entities = {{ configs.entities|json_encode|raw }};
    $field.data('entity-field-util').findEntity = function (entity) {
        return _.findWhere(entities, {name: entity});
    };
    {% endif %}
    var formatContext = {
        getFieldData: function (fieldId) {
            return $field.data('entity-field-util').getFieldData(fieldId);
        }
    };
    select2Config.formatContext = function () {
        return formatContext;
    };
{% endblock %}

{% block oro_combobox_dataconfig_entity_field_select %}
    {{ block('oro_combobox_dataconfig_entity_field_choice') }}

    var formatContext = {
        getFieldData: function (fieldId) {
            return $field.data('entity-field-util').getFieldData(fieldId);
        },
        splitFieldId: function (fieldId) {
            return $field.data('entity-field-util').splitFieldId(fieldId);
        }
    };
    select2Config.formatContext = function () {
        return formatContext;
    };

    select2Config.collapsibleResults = true;
    select2Config.data = function () {
        return {more: false, results: $field.data('entity-field-util')._getData() };
    }
{% endblock %}<commit_msg>BAP-2731: Develop UI for segmentation builder<commit_after>{% block oro_combobox_dataconfig_entity_field_base %}
    $field.data('entity-field-util', new EntityFieldUtil($field));

    {% if configs.entities is defined %}
    var entities = {{ configs.entities|json_encode|raw }};
    $field.data('entity-field-util').findEntity = function (entity) {
        return _.findWhere(entities, {name: entity});
    };
    {% endif %}

    var formatContext = {
        getFieldData: function (fieldId) {
            return $field.data('entity-field-util').getFieldData(fieldId);
        },
        splitFieldId: function (fieldId) {
            return $field.data('entity-field-util').splitFieldId(fieldId);
        }
    };
    select2Config.formatContext = function () {
        return formatContext;
    };
{% endblock %}

{% block oro_combobox_dataconfig_entity_field_choice %}
    {{ block('oro_combobox_dataconfig_entity_field_base') }}
{% endblock %}

{% block oro_combobox_dataconfig_entity_field_select %}
    {{ block('oro_combobox_dataconfig_entity_field_base') }}

    select2Config.collapsibleResults = true;
    select2Config.data = function () {
        return {more: false, results: $field.data('entity-field-util')._getData() };
    }
{% endblock %}
{'fraction_non_alphanumeric': 0.1362763915547025, 'fraction_numerical': 0.004222648752399232, 'mean_word_length': 3.3361064891846923, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4441365', 'n_tokens_mistral': 817, 'n_tokens_neox': 779, 'n_words': 122}