<commit_before>Imcms.define("imcms-keywords-tab-builder",
    [
        "imcms-bem-builder", "imcms-components-builder",
        "imcms-page-info-tabs-linker"
    ],
    function (BEM, components, linker) {

        return {
            name: "keywords",
            data: {},
            buildTab: function (index) {
                this.data.$keywordsBox = components.keywords.keywordsBox("<div>", {
                    "input-id": "keyword",
                    title: "Keywords",
                    placeholder: "keyword",
                    "button-text": "ADD+"
                });
                this.data.$searchDisableCheckbox = components.checkboxes.imcmsCheckbox("<div>", {
                    id: "isSearchDisabled",
                    name: "isSearchDisabled",
                    text: "Disable search"
                });
                var $checkboxField = components.checkboxes.checkboxContainerField("<div>", [
                    this.data.$searchDisableCheckbox
                ]);

                return linker.buildFormBlock([this.data.$keywordsBox, $checkboxField], index);
            },
            fillTabDataFromDocument: function (document) {
                document.keywords.forEach(this.data.$keywordsBox.addKeyword);
                this.data.$searchDisableCheckbox.setChecked(document.searchDisabled);
            },
            saveData: function (documentDTO) {
                documentDTO.keywords = this.data.$keywordsBox.getKeywords();
                documentDTO.searchDisabled = this.data.$searchDisableCheckbox.isChecked();
                return documentDTO;
            },
            clearTabData: function () {
                this.data.$keywordsBox.find('.imcms-keyword__keywords')
                    .find('.imcms-button--close')
                    .click();

                this.data.$searchDisableCheckbox.setChecked(false);
            }
        };
    }
);<commit_msg>IMCMS-255 - Upgrade server side to work with new client: - Naming fix.<commit_after>Imcms.define("imcms-keywords-tab-builder",
    [
        "imcms-bem-builder", "imcms-components-builder",
        "imcms-page-info-tabs-linker"
    ],
    function (BEM, components, tabContentBuilder) {

        return {
            name: "keywords",
            data: {},
            buildTab: function (index) {
                this.data.$keywordsBox = components.keywords.keywordsBox("<div>", {
                    "input-id": "keyword",
                    title: "Keywords",
                    placeholder: "keyword",
                    "button-text": "ADD+"
                });
                this.data.$searchDisableCheckbox = components.checkboxes.imcmsCheckbox("<div>", {
                    id: "isSearchDisabled",
                    name: "isSearchDisabled",
                    text: "Disable search"
                });
                var $checkboxField = components.checkboxes.checkboxContainerField("<div>", [
                    this.data.$searchDisableCheckbox
                ]);

                return tabContentBuilder.buildFormBlock([this.data.$keywordsBox, $checkboxField], index);
            },
            fillTabDataFromDocument: function (document) {
                document.keywords.forEach(this.data.$keywordsBox.addKeyword);
                this.data.$searchDisableCheckbox.setChecked(document.searchDisabled);
            },
            saveData: function (documentDTO) {
                documentDTO.keywords = this.data.$keywordsBox.getKeywords();
                documentDTO.searchDisabled = this.data.$searchDisableCheckbox.isChecked();
                return documentDTO;
            },
            clearTabData: function () {
                this.data.$keywordsBox.find('.imcms-keyword__keywords')
                    .find('.imcms-button--close')
                    .click();

                this.data.$searchDisableCheckbox.setChecked(false);
            }
        };
    }
);
{'fraction_non_alphanumeric': 0.11918678526048285, 'fraction_numerical': 0.0007623888182973316, 'mean_word_length': 1.615282392026578, 'pattern_counts': {'":': 4, '<': 9, '<?xml version=': 0, '>': 9, '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': '1699423', 'n_tokens_mistral': 1016, 'n_tokens_neox': 930, 'n_words': 134}