<commit_before>﻿define(['app', 'text!views/search/search-filters/left-side-filter.html', 'lodash', 'ngDialog',
    'components/scbd-angularjs-services/services/utilities'], function (app, template, _) {

        app.directive('leftSideFilter', ['ngDialog', 'Thesaurus', 'locale', '$timeout', function (ngDialog, thesaurus, locale, $timeout) {
            return {
                restrict: 'EA',
                replace: true,
                require: '^searchDirective',
                template: template,
                scope: false,
                link: function ($scope, $element, $attrs, searchDirectiveCtrl) {
                    var freeTextKeys = 0;
                    // $scope.leftMenuFilters = {}
                    $scope.locale = locale;
                    $scope.onSchemaFilterChanged = function (schema, selected) {
                        if (!selected) {
                            if ($scope.leftMenuFilters)
                                $scope.leftMenuFilters[schema] = undefined;
                            $scope.leftMenuFilters = _.omit($scope.leftMenuFilters, _.isUndefined);
                            if (_.isEmpty($scope.leftMenuFilters))
                                $scope.leftMenuFilters = undefined;
                        }
                        else {

                            var fieldMappings = angular.copy(searchDirectiveCtrl.getSchemaFieldMapping(schema));

                            if (!_.isEmpty(fieldMappings)) {
                                if (!$scope.leftMenuFilters)
                                    $scope.leftMenuFilters = {};
                                $scope.leftMenuFilters[schema] = fieldMappings
                            }
                        }
                        return $scope.leftMenuFilters;
                    }

                    $scope.showFilterDialog = function (schema, filter, facets) {
                        ngDialog.open({
                            template: 'filtersDialog', 
                            className: 'search-filters ngdialog-theme-default wide',
                            controller: ['$scope', '$timeout', 'thesaurusService', 'searchService', function ($scope, $timeout, thesaurusService, searchService) {

                                $scope.treeViewSelected = [];
                                $scope.schema = schema;<commit_msg>remove unused services reference<commit_after>﻿define(['app', 'text!views/search/search-filters/left-side-filter.html', 'lodash', 'ngDialog',
    'components/scbd-angularjs-services/services/utilities'], function (app, template, _) {

        app.directive('leftSideFilter', ['ngDialog', 'locale', function (ngDialog, locale) {
            return {
                restrict: 'EA',
                replace: true,
                require: '^searchDirective',
                template: template,
                scope: false,
                link: function ($scope, $element, $attrs, searchDirectiveCtrl) {
                    var freeTextKeys = 0;
                    // $scope.leftMenuFilters = {}
                    $scope.locale = locale;
                    $scope.onSchemaFilterChanged = function (schema, selected) {
                        if (!selected) {
                            if ($scope.leftMenuFilters)
                                $scope.leftMenuFilters[schema] = undefined;
                            $scope.leftMenuFilters = _.omit($scope.leftMenuFilters, _.isUndefined);
                            if (_.isEmpty($scope.leftMenuFilters))
                                $scope.leftMenuFilters = undefined;
                        }
                        else {

                            var fieldMappings = angular.copy(searchDirectiveCtrl.getSchemaFieldMapping(schema));

                            if (!_.isEmpty(fieldMappings)) {
                                if (!$scope.leftMenuFilters)
                                    $scope.leftMenuFilters = {};
                                $scope.leftMenuFilters[schema] = fieldMappings
                            }
                        }
                        return $scope.leftMenuFilters;
                    }

                    $scope.showFilterDialog = function (schema, filter, facets) {
                        ngDialog.open({
                            template: 'filtersDialog', 
                            className: 'search-filters ngdialog-theme-default wide',
                            controller: ['$scope', 'thesaurusService', 'searchService', function ($scope, thesaurusService, searchService) {

                                $scope.treeViewSelected = [];
                                $scope.schema = schema;
{'fraction_non_alphanumeric': 0.10006387055567384, 'fraction_numerical': 0.0004258037044922291, 'mean_word_length': 1.2651880424300868, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2646100', 'n_tokens_mistral': 1069, 'n_tokens_neox': 1023, 'n_words': 188}