<commit_before>define(['jquery', 'oroui/js/mediator', 'orotranslation/js/translator', '../content-processor/dropdown-button'
    ], function($, mediator, __) {
    'use strict';

    function updatePageHeader() {
        var $header = $('.navigation.navbar-extra');
        var $container = $header.find('.title-buttons-container');
        var options = {
            moreLabel: __('oro.ui.page_header.button.more'),
            minItemQuantity: 1
        };
        var label = $container.find('.btn').slice(0, 2).text().replace(/\s{2,}/g, ' ');
        if (label.length > 35) {
            options.minItemQuantity = 0;
        }
        $container.dropdownButtonProcessor(options);
    }

    /**
     * Initializes mobile layout for page-header
     *
     * @export oroui/js/mobile/page-header
     * @name oro.mobile.pageHeader
     */
    return {
        init: function() {
            updatePageHeader();
            mediator.on('page:afterChange', updatePageHeader);
        }
    };
});<commit_msg>BAP-15918: Import does not work in mobile version due to JS errors (#14622)<commit_after>define(['jquery', 'oroui/js/mediator', 'orotranslation/js/translator', '../content-processor/dropdown-button'
    ], function($, mediator, __) {
    'use strict';

    var containerSelector = '.navigation.navbar-extra .title-buttons-container';

    function hideButtons() {
        $(containerSelector).find('.btn').parent().hide();
    }

    function updatePageHeader() {
        var $container = $(containerSelector);
        var options = {
            moreLabel: __('oro.ui.page_header.button.more'),
            minItemQuantity: 1
        };
        var label = $container.find('.btn').slice(0, 2).text().replace(/\s{2,}/g, ' ');
        if (label.length > 35) {
            options.minItemQuantity = 0;
        }
        $container.dropdownButtonProcessor(options);
    }

    /**
     * Initializes mobile layout for page-header
     *
     * @export oroui/js/mobile/page-header
     * @name oro.mobile.pageHeader
     */
    return {
        init: function() {
            hideButtons();
            mediator.on('page:afterChange', updatePageHeader);
        }
    };
});
{'fraction_non_alphanumeric': 0.15603487838458008, 'fraction_numerical': 0.01101422670949977, 'mean_word_length': 2.3080424886191198, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6125762', 'n_tokens_mistral': 661, 'n_tokens_neox': 625, 'n_words': 110}