<commit_before>define(['arches', 'knockout', 'uuid'], function (arches, ko, uuid) {
    ko.components.register('domain-value-datatype-config', {
        viewModel: function(params) {
            var self = this;
            this.options = params.config.options;
            var setupOption = function(option) {
                option.remove = function () {
                    self.options.remove(option);
                };
            };
            this.options().forEach(setupOption);
            this.newOptionLabel = ko.observable('');
            this.addNewOption = function () {
                var option = {
                    id: uuid.generate(),
                    text: self.newOptionLabel()
                }
                setupOption(option);
                self.options.push(option);
                self.newOptionLabel('');
            }
        },
        template: { require: 'text!datatype-config-templates/domain-value' }
    });
    return name;
});<commit_msg>more bug fixes for domain widgets<commit_after>define(['arches', 'knockout', 'uuid'], function (arches, ko, uuid) {
    ko.components.register('domain-value-datatype-config', {
        viewModel: function(params) {
            var self = this;
            this.options = params.config.options;
            var setupOption = function(option) {
                option.remove = function () {
                    self.options.remove(option);
                };
            };
            this.options().forEach(setupOption);
            this.newOptionLabel = ko.observable('');
            this.addNewOption = function () {
                var option = {
                    id: uuid.generate(),
                    text: ko.observable(self.newOptionLabel())
                }
                setupOption(option);
                self.options.push(option);
                self.newOptionLabel('');
            }
        },
        template: { require: 'text!datatype-config-templates/domain-value' }
    });
    return name;
});
{'fraction_non_alphanumeric': 0.12667660208643816, 'fraction_numerical': 0.0, 'mean_word_length': 1.5397225725094577, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3831376', 'n_tokens_mistral': 515, 'n_tokens_neox': 495, 'n_words': 85}