<commit_before>"use strict";
import "./settingsPanel.scss";
import {Settings, SettingsService, SettingsServiceSubscriber} from "../../core/settings/settings.service";
import $ from "jQuery";

/**
 * Controls the settingsPanel
 */
export class SettingsPanelController implements SettingsServiceSubscriber {

    public viewModel = {
        blacklistLength: 0
    };

    /* @ngInject */
    constructor(
        private $scope,
        private $timeout,
        private settingsService: SettingsService) {

        settingsService.subscribe(this);
    }

    /**
     * This is necessary to update the rzSlider on panel expansion
     * @param $panel
     */
    collapseAndUpdateChildRzSlider($panel) {
        $panel.collapse();
        this.$timeout(() => {
            this.$scope.$broadcast("rzSliderForceRender");
        },50);
    }

    onSettingsChanged(settings: Settings, event: Event) {
        if (settings.blacklist.length != this.viewModel.blacklistLength) {
            this.highlightCounterIcon();
        }
        this.viewModel.blacklistLength = settings.blacklist.length;
    }

    highlightCounterIcon() {
        const panelElement = $(".item-counter").closest("md-expansion-panel");
        panelElement.addClass("highlight");

        this.$timeout(() => {
            panelElement.removeClass("highlight");
        },500);
    }

}

export const settingsPanelComponent = {
    selector: "settingsPanelComponent",
    template: require("./settingsPanel.html"),
    controller: SettingsPanelController
};



<commit_msg>Fix wrong import #298<commit_after>"use strict";
import "./settingsPanel.scss";
import {Settings, SettingsService, SettingsServiceSubscriber} from "../../core/settings/settings.service";
import $ from "jquery";

/**
 * Controls the settingsPanel
 */
export class SettingsPanelController implements SettingsServiceSubscriber {

    public viewModel = {
        blacklistLength: 0
    };

    /* @ngInject */
    constructor(
        private $scope,
        private $timeout,
        private settingsService: SettingsService) {

        settingsService.subscribe(this);
    }

    /**
     * This is necessary to update the rzSlider on panel expansion
     * @param $panel
     */
    collapseAndUpdateChildRzSlider($panel) {
        $panel.collapse();
        this.$timeout(() => {
            this.$scope.$broadcast("rzSliderForceRender");
        },50);
    }

    onSettingsChanged(settings: Settings, event: Event) {
        if (settings.blacklist.length != this.viewModel.blacklistLength) {
            this.highlightCounterIcon();
        }
        this.viewModel.blacklistLength = settings.blacklist.length;
    }

    highlightCounterIcon() {
        const panelElement = $(".item-counter").closest("md-expansion-panel");
        panelElement.addClass("highlight");

        this.$timeout(() => {
            panelElement.removeClass("highlight");
        },500);
    }

}

export const settingsPanelComponent = {
    selector: "settingsPanelComponent",
    template: require("./settingsPanel.html"),
    controller: SettingsPanelController
};




{'fraction_non_alphanumeric': 0.12419354838709677, 'fraction_numerical': 0.004838709677419355, 'mean_word_length': 2.8283950617283953, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3108217', 'n_tokens_mistral': 817, 'n_tokens_neox': 791, 'n_words': 161}