diff --git a/src/Umbraco.Compat7/Core/PropertyEditors/PropertyEditorResolver.cs b/src/Umbraco.Compat7/Core/PropertyEditors/PropertyEditorResolver.cs index b401424495..8b063afcce 100644 --- a/src/Umbraco.Compat7/Core/PropertyEditors/PropertyEditorResolver.cs +++ b/src/Umbraco.Compat7/Core/PropertyEditors/PropertyEditorResolver.cs @@ -15,8 +15,8 @@ namespace Umbraco.Core.PropertyEditors public static PropertyEditorResolver Current { get; } = new PropertyEditorResolver(CoreCurrent.Container.GetInstance()); - public IEnumerable PropertyEditors => CoreCurrent.PropertyEditors; + public IEnumerable PropertyEditors => CoreCurrent.PropertyEditors; - public IConfiguredDataEditor GetByAlias(string alias) => CoreCurrent.PropertyEditors[alias]; + public IDataEditor GetByAlias(string alias) => CoreCurrent.PropertyEditors[alias]; } } diff --git a/src/Umbraco.Core/Manifest/DataEditorConverter.cs b/src/Umbraco.Core/Manifest/DataEditorConverter.cs index c003c7e1e2..dad31aa62e 100644 --- a/src/Umbraco.Core/Manifest/DataEditorConverter.cs +++ b/src/Umbraco.Core/Manifest/DataEditorConverter.cs @@ -23,26 +23,31 @@ namespace Umbraco.Core.Manifest } /// - protected override IDataEditor Create(Type objectType, JObject jobject) + protected override IDataEditor Create(Type objectType, string path, JObject jobject) { // in PackageManifest, property editors are IConfiguredDataEditor[] whereas // parameter editors are IDataEditor[] - both will end up here because we handle // IDataEditor and IConfiguredDataEditor implements it, but we can check the // type to figure out what to create - if (objectType == typeof(IConfiguredDataEditor)) + var type = EditorType.PropertyValue; + + var isPropertyEditor = path.StartsWith("propertyEditors["); + + if (isPropertyEditor) { // property editor - var type = EditorType.PropertyValue; + jobject["isPropertyEditor"] = JToken.FromObject(true); if (jobject["isParameterEditor"] is JToken jToken && jToken.Value()) type |= EditorType.MacroParameter; - return new ConfiguredDataEditor(_logger, type); } else { // parameter editor - return new DataEditor(EditorType.MacroParameter); + type = EditorType.MacroParameter; } + + return new DataEditor(_logger, type); } /// @@ -50,42 +55,38 @@ namespace Umbraco.Core.Manifest { // see Create above, target is either DataEditor (parameter) or ConfiguredDataEditor (property) - if (target is ConfiguredDataEditor configuredEditor) - { - // property editor - PrepareForPropertyEditor(jobject, configuredEditor); - } - else if (target is DataEditor editor) - { - // parameter editor - PrepareForParameterEditor(jobject, editor); - } - else throw new Exception("panic."); + if (!(target is DataEditor dataEditor)) + throw new Exception("panic."); + if (jobject["isPropertyEditor"] is JToken jtoken && jtoken.Value()) + PrepareForPropertyEditor(jobject, dataEditor); + else + PrepareForParameterEditor(jobject, dataEditor); + base.Deserialize(jobject, target, serializer); } - private static void PrepareForPropertyEditor(JObject jobject, ConfiguredDataEditor target) + private static void PrepareForPropertyEditor(JObject jobject, DataEditor target) { - if (jobject["editor"] != null) - { - // explicitely assign a value editor of type ValueEditor - // (else the deserializer will try to read it before setting it) - // (and besides it's an interface) - target.ValueEditor = new DataValueEditor(); + if (jobject["editor"] == null) + throw new InvalidOperationException("Missing 'editor' value."); - // in the manifest, validators are a simple dictionary eg - // { - // required: true, - // regex: '\\d*' - // } - // and we need to turn this into a list of IPropertyValidator - // so, rewrite the json structure accordingly - if (jobject["editor"]["validation"] is JObject validation) - jobject["editor"]["validation"] = RewriteValidators(validation); - } + // explicitely assign a value editor of type ValueEditor + // (else the deserializer will try to read it before setting it) + // (and besides it's an interface) + target.ValueEditor = new DataValueEditor(); - if (jobject["prevalues"] is JObject prevalues) + // in the manifest, validators are a simple dictionary eg + // { + // required: true, + // regex: '\\d*' + // } + // and we need to turn this into a list of IPropertyValidator + // so, rewrite the json structure accordingly + if (jobject["editor"]["validation"] is JObject validation) + jobject["editor"]["validation"] = RewriteValidators(validation); + + if (jobject["prevalues"] is JObject config) { // explicitely assign a configuration editor of type ConfigurationEditor // (else the deserializer will try to read it before setting it) @@ -93,12 +94,12 @@ namespace Umbraco.Core.Manifest target.ConfigurationEditor = new ConfigurationEditor(); // see note about validators, above - same applies to field validators - if (jobject["prevalues"]?["fields"] is JArray jarray) + if (config["fields"] is JArray jarray) { foreach (var field in jarray) { - if (field["validation"] is JObject validation) - field["validation"] = RewriteValidators(validation); + if (field["validation"] is JObject fvalidation) + field["validation"] = RewriteValidators(fvalidation); } } @@ -106,9 +107,14 @@ namespace Umbraco.Core.Manifest // move it down to configuration editor level so it can be deserialized properly if (jobject["defaultConfig"] is JObject defaultConfig) { - prevalues["defaultConfig"] = defaultConfig; + config["defaultConfig"] = defaultConfig; jobject.Remove("defaultConfig"); } + + // in the manifest, configuration is named 'prevalues', rename + // it is important to do this LAST + jobject["config"] = config; + jobject.Remove("prevalues"); } } @@ -135,6 +141,13 @@ namespace Umbraco.Core.Manifest jobject["editor"] = new JObject { ["view"] = jobject["view"] }; jobject.Property("view").Remove(); } + + // in the manifest, default configuration is named 'config', rename + if (jobject["config"] is JObject config) + { + jobject["defaultConfig"] = config; + jobject.Remove("config"); + } } private static JArray RewriteValidators(JObject validation) diff --git a/src/Umbraco.Core/Manifest/ManifestParser.cs b/src/Umbraco.Core/Manifest/ManifestParser.cs index b8ff43ecd5..11e4b18e44 100644 --- a/src/Umbraco.Core/Manifest/ManifestParser.cs +++ b/src/Umbraco.Core/Manifest/ManifestParser.cs @@ -95,7 +95,7 @@ namespace Umbraco.Core.Manifest { var scripts = new HashSet(); var stylesheets = new HashSet(); - var propertyEditors = new List(); + var propertyEditors = new List(); var parameterEditors = new List(); var gridEditors = new List(); diff --git a/src/Umbraco.Core/Manifest/ManifestValidatorConverter.cs b/src/Umbraco.Core/Manifest/ManifestValidatorConverter.cs index 6717535159..d58a66e7b4 100644 --- a/src/Umbraco.Core/Manifest/ManifestValidatorConverter.cs +++ b/src/Umbraco.Core/Manifest/ManifestValidatorConverter.cs @@ -20,7 +20,7 @@ namespace Umbraco.Core.Manifest _validators = validators; } - protected override IValueValidator Create(Type objectType, JObject jObject) + protected override IValueValidator Create(Type objectType, string path, JObject jObject) { // all validators coming from manifests are ManifestPropertyValidator instances return new ManifestValueValidator(_validators); diff --git a/src/Umbraco.Core/Manifest/PackageManifest.cs b/src/Umbraco.Core/Manifest/PackageManifest.cs index a739151ff7..1b449e4570 100644 --- a/src/Umbraco.Core/Manifest/PackageManifest.cs +++ b/src/Umbraco.Core/Manifest/PackageManifest.cs @@ -16,7 +16,7 @@ namespace Umbraco.Core.Manifest public string[] Stylesheets { get; set; }= Array.Empty(); [JsonProperty("propertyEditors")] - public IConfiguredDataEditor[] PropertyEditors { get; set; } = Array.Empty(); + public IDataEditor[] PropertyEditors { get; set; } = Array.Empty(); [JsonProperty("parameterEditors")] public IDataEditor[] ParameterEditors { get; set; } = Array.Empty(); diff --git a/src/Umbraco.Core/Models/DataType.cs b/src/Umbraco.Core/Models/DataType.cs index 0732c51ec9..8b0e7d5327 100644 --- a/src/Umbraco.Core/Models/DataType.cs +++ b/src/Umbraco.Core/Models/DataType.cs @@ -17,7 +17,7 @@ namespace Umbraco.Core.Models { private static PropertySelectors _selectors; - private IConfiguredDataEditor _editor; + private IDataEditor _editor; private ValueStorageType _databaseType; private object _configuration; private bool _hasConfiguration; @@ -26,7 +26,7 @@ namespace Umbraco.Core.Models /// /// Initializes a new instance of the class. /// - public DataType(IConfiguredDataEditor editor, int parentId = -1) + public DataType(IDataEditor editor, int parentId = -1) { _editor = editor ?? throw new ArgumentNullException(nameof(editor)); ParentId = parentId; @@ -43,7 +43,7 @@ namespace Umbraco.Core.Models /// [IgnoreDataMember] - public IConfiguredDataEditor Editor + public IDataEditor Editor { get => _editor; set diff --git a/src/Umbraco.Core/Models/IDataType.cs b/src/Umbraco.Core/Models/IDataType.cs index a365e05535..c7e682e4a2 100644 --- a/src/Umbraco.Core/Models/IDataType.cs +++ b/src/Umbraco.Core/Models/IDataType.cs @@ -11,7 +11,7 @@ namespace Umbraco.Core.Models /// /// Gets or sets the property editor. /// - IConfiguredDataEditor Editor { get; set; } + IDataEditor Editor { get; set; } /// /// Gets the property editor alias. diff --git a/src/Umbraco.Core/PropertyEditors/ConfiguredDataEditor.cs b/src/Umbraco.Core/PropertyEditors/ConfiguredDataEditor.cs deleted file mode 100644 index 8c4d475088..0000000000 --- a/src/Umbraco.Core/PropertyEditors/ConfiguredDataEditor.cs +++ /dev/null @@ -1,192 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using Newtonsoft.Json; -using Umbraco.Core.Composing; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; - -namespace Umbraco.Core.PropertyEditors -{ - /// - /// Provides a base class for property editors. fixme rewrite - /// - /// - /// Editors can be deserialized from manifests, which is why the Json serialization - /// attributes are required, and the properties require an internal setter. - /// - [DebuggerDisplay("{" + nameof(DebuggerDisplay) + "(),nq}")] - [HideFromTypeFinder] - public class ConfiguredDataEditor : IConfiguredDataEditor - { - private IDataValueEditor _valueEditorAssigned; - private IConfigurationEditor _configurationEditorAssigned; - - /// - /// Initializes a new instance of the class. - /// - public ConfiguredDataEditor(ILogger logger, EditorType type = EditorType.PropertyValue) - { - Logger = logger ?? throw new ArgumentNullException(nameof(logger)); - - // defaults - Type = type; - Icon = Constants.Icons.PropertyEditor; - Group = "common"; - - // assign properties based on the attribute, if it is found - Attribute = GetType().GetCustomAttribute(false); - if (Attribute == null) return; - - Alias = Attribute.Alias; - Type = Attribute.Type; - Name = Attribute.Name; - Icon = Attribute.Icon; - Group = Attribute.Group; - IsDeprecated = Attribute.IsDeprecated; - } - - /// - /// Gets the editor attribute. - /// - protected DataEditorAttribute Attribute { get; } - - /// - /// Gets a logger. - /// - protected ILogger Logger { get; } - - /// - [JsonProperty("alias", Required = Required.Always)] - public string Alias { get; internal set; } - - /// - [JsonIgnore] - public EditorType Type { get; } - - /// - [JsonProperty("name", Required = Required.Always)] - public string Name { get; internal set; } - - /// - [JsonProperty("icon")] - public string Icon { get; internal set; } - - /// - [JsonProperty("group")] - public string Group { get; internal set; } - - /// - /// Gets or sets a value indicating whether the property editor is deprecated. - /// - /// A deprecated editor does not show up in the list of available editors for a datatype, - /// unless it is the current editor for the datatype. - [JsonIgnore] - public bool IsDeprecated { get; internal set; } // fixme on interface? - - [JsonProperty("preValues")] - public IDictionary DefaultConfiguration => ConfigurationEditor.DefaultConfiguration; - - /// - /// Gets or sets the value editor. - /// - /// - /// If an instance of a value editor is assigned to the property, - /// then this instance is returned when getting the property value. Otherwise, a - /// new instance is created by CreateValueEditor. - /// The instance created by CreateValueEditor is not cached, i.e. - /// a new instance is created each time the property value is retrieved. The - /// property editor is a singleton, and the value editor cannot be a singleton - /// since it depends on the datatype configuration. - /// Technically, it could be cached by datatype but let's keep things - /// simple enough for now. - /// The property is *not* marked with json ObjectCreationHandling = ObjectCreationHandling.Replace, - /// so by default the deserializer will first try to read it before assigning it, which is why - /// all deserialization *should* set the property before anything (see manifest deserializer). - /// - [JsonProperty("editor", Required = Required.Always)] - public IDataValueEditor ValueEditor - { - // create a new value editor each time - the property editor can be a - // singleton, but the value editor will get a configuration which depends - // on the datatype, so it cannot be a singleton really - get => CreateValueEditor(); - set => _valueEditorAssigned = value; - } - - /// - /// Gets or sets the configuration editor. - /// - /// - /// If an instance of a configuration editor is assigned to the property, - /// then this instance is returned when getting the property value. Otherwise, a - /// new instance is created by CreateConfigurationEditor. - /// The instance created by CreateConfigurationEditor is not cached, i.e. - /// a new instance is created each time the property value is retrieved. The - /// property editor is a singleton, and although the configuration editor could - /// technically be a singleton too, we'd rather not keep configuration editor - /// cached. - /// The property is *not* marked with json ObjectCreationHandling = ObjectCreationHandling.Replace, - /// so by default the deserializer will first try to read it before assigning it, which is why - /// all deserialization *should* set the property before anything (see manifest deserializer). - /// - [JsonProperty("prevalues")] // changing the name would break manifests - public IConfigurationEditor ConfigurationEditor - { - get => CreateConfigurationEditor(); - set => _configurationEditorAssigned = value; - } - - /// - /// Creates a value editor instance. - /// - protected virtual IDataValueEditor CreateValueEditor() - { - // handle assigned editor - // or create a new editor - return _valueEditorAssigned ?? new DataValueEditor(Attribute); - } - - /// - /// Creates a configuration editor instance. - /// - protected virtual IConfigurationEditor CreateConfigurationEditor() - { - // handle assigned editor - if (_configurationEditorAssigned != null) - return _configurationEditorAssigned; - - // else return an empty one - return new ConfigurationEditor(); - } - - protected bool Equals(ConfiguredDataEditor other) - { - return string.Equals(Alias, other.Alias); - } - - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) return false; - if (ReferenceEquals(this, obj)) return true; - if (obj.GetType() != GetType()) return false; - return Equals((ConfiguredDataEditor) obj); - } - - public override int GetHashCode() - { - // an internal setter is required for de-serialization from manifests - // but we are never going to change the alias once the editor exists - // ReSharper disable once NonReadonlyMemberInGetHashCode - return Alias.GetHashCode(); - } - - /// - /// Provides a summary of the PropertyEditor for use with the . - /// - protected virtual string DebuggerDisplay() - { - return $"Name: {Name}, Alias: {Alias}"; - } - } -} diff --git a/src/Umbraco.Core/PropertyEditors/DataEditor.cs b/src/Umbraco.Core/PropertyEditors/DataEditor.cs index 89e379a6a7..732250da00 100644 --- a/src/Umbraco.Core/PropertyEditors/DataEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DataEditor.cs @@ -1,32 +1,38 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using Newtonsoft.Json; using Umbraco.Core.Composing; +using Umbraco.Core.Logging; namespace Umbraco.Core.PropertyEditors { /// - /// Represents a parameter editor. fixme rewrite + /// Represents a data editor. /// /// - /// Is not abstract because can be instanciated from manifests. + /// Editors can be deserialized from e.g. manifests, which is. why the class is not abstract, + /// the json serialization attributes are required, and the properties have an internal setter. /// + [DebuggerDisplay("{" + nameof(DebuggerDisplay) + "(),nq}")] [HideFromTypeFinder] public class DataEditor : IDataEditor { - private IDataValueEditor _valueEditor; + private IDictionary _defaultConfiguration; private IDataValueEditor _valueEditorAssigned; - + private IConfigurationEditor _configurationEditorAssigned; + /// /// Initializes a new instance of the class. /// - public DataEditor(EditorType type = EditorType.PropertyValue) + public DataEditor(ILogger logger, EditorType type = EditorType.PropertyValue) { + Logger = logger ?? throw new ArgumentNullException(nameof(logger)); + // defaults Type = type; Icon = Constants.Icons.PropertyEditor; Group = "common"; - DefaultConfiguration = new Dictionary(); // assign properties based on the attribute, if it is found Attribute = GetType().GetCustomAttribute(false); @@ -35,6 +41,8 @@ namespace Umbraco.Core.PropertyEditors Alias = Attribute.Alias; Type = Attribute.Type; Name = Attribute.Name; + Icon = Attribute.Icon; + Group = Attribute.Group; IsDeprecated = Attribute.IsDeprecated; } @@ -43,6 +51,11 @@ namespace Umbraco.Core.PropertyEditors /// protected DataEditorAttribute Attribute { get; } + /// + /// Gets a logger. + /// + protected ILogger Logger { get; } + /// [JsonProperty("alias", Required = Required.Always)] public string Alias { get; internal set; } @@ -57,31 +70,72 @@ namespace Umbraco.Core.PropertyEditors /// [JsonProperty("icon")] - public string Icon { get; } + public string Icon { get; internal set; } /// [JsonProperty("group")] - public string Group { get; } + public string Group { get; internal set; } /// [JsonIgnore] public bool IsDeprecated { get; } /// + /// + /// If an instance of a value editor is assigned to the property, + /// then this instance is returned when getting the property value. Otherwise, a + /// new instance is created by CreateValueEditor. + /// The instance created by CreateValueEditor is not cached, i.e. + /// a new instance is created each time the property value is retrieved. The + /// property editor is a singleton, and the value editor cannot be a singleton + /// since it depends on the datatype configuration. + /// Technically, it could be cached by datatype but let's keep things + /// simple enough for now. + /// The property is *not* marked with json ObjectCreationHandling = ObjectCreationHandling.Replace, + /// so by default the deserializer will first try to read it before assigning it, which is why + /// all deserialization *should* set the property before anything (see manifest deserializer). + /// [JsonProperty("editor")] public IDataValueEditor ValueEditor { - get => _valueEditor ?? (_valueEditor = CreateValueEditor()); - set - { - _valueEditorAssigned = value; - _valueEditor = null; - } + // create a new value editor each time - the property editor can be a + // singleton, but the value editor will get a configuration which depends + // on the datatype, so it cannot be a singleton really + get => CreateValueEditor(); + set => _valueEditorAssigned = value; } /// + /// + /// If an instance of a configuration editor is assigned to the property, + /// then this instance is returned when getting the property value. Otherwise, a + /// new instance is created by CreateConfigurationEditor. + /// The instance created by CreateConfigurationEditor is not cached, i.e. + /// a new instance is created each time the property value is retrieved. The + /// property editor is a singleton, and although the configuration editor could + /// technically be a singleton too, we'd rather not keep configuration editor + /// cached. + /// The property is *not* marked with json ObjectCreationHandling = ObjectCreationHandling.Replace, + /// so by default the deserializer will first try to read it before assigning it, which is why + /// all deserialization *should* set the property before anything (see manifest deserializer). + /// [JsonProperty("config")] - public IDictionary DefaultConfiguration { get; set; } + public IConfigurationEditor ConfigurationEditor + { + get => CreateConfigurationEditor(); + set => _configurationEditorAssigned = value; + } + + /// + [JsonProperty("defaultConfig")] + public IDictionary DefaultConfiguration + { + // for property value editors, get the ConfigurationEditor.DefaultConfiguration + // else fallback to a default, empty dictionary + + get => _defaultConfiguration ?? ((Type & EditorType.PropertyValue) > 0 ? ConfigurationEditor.DefaultConfiguration : (_defaultConfiguration = new Dictionary())); + set => _defaultConfiguration = value; + } /// /// Creates a value editor instance. @@ -89,19 +143,58 @@ namespace Umbraco.Core.PropertyEditors /// protected virtual IDataValueEditor CreateValueEditor() { - // handle assigned editor + // handle assigned editor, or create a new one if (_valueEditorAssigned != null) return _valueEditorAssigned; - // create a new editor - var editor = new DataValueEditor(); - - var view = Attribute?.View; - if (string.IsNullOrWhiteSpace(view)) + if (Attribute == null) throw new InvalidOperationException("The editor does not specify a view."); - editor.View = view; - return editor; + return new DataValueEditor(Attribute); + } + + /// + /// Creates a configuration editor instance. + /// + protected virtual IConfigurationEditor CreateConfigurationEditor() + { + // handle assigned editor + if (_configurationEditorAssigned != null) + return _configurationEditorAssigned; + + // else return an empty one + return new ConfigurationEditor(); + } + + // fixme why are we implementing equality here? + + protected bool Equals(DataEditor other) + { + return string.Equals(Alias, other.Alias); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != GetType()) return false; + return Equals((DataEditor) obj); + } + + public override int GetHashCode() + { + // an internal setter is required for de-serialization from manifests + // but we are never going to change the alias once the editor exists + // ReSharper disable once NonReadonlyMemberInGetHashCode + return Alias.GetHashCode(); + } + + /// + /// Provides a summary of the PropertyEditor for use with the . + /// + protected virtual string DebuggerDisplay() + { + return $"Name: {Name}, Alias: {Alias}"; } } } diff --git a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs index 34f2508587..c0221ebcfe 100644 --- a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs @@ -45,7 +45,7 @@ namespace Umbraco.Core.PropertyEditors public DataValueEditor(DataEditorAttribute attribute) : this() { - if (attribute == null) return; + if (attribute == null) throw new ArgumentNullException(nameof(attribute)); var view = attribute.View; if (string.IsNullOrWhiteSpace(view)) diff --git a/src/Umbraco.Core/PropertyEditors/IConfiguredDataEditor.cs b/src/Umbraco.Core/PropertyEditors/IConfiguredDataEditor.cs deleted file mode 100644 index 08eaf9697d..0000000000 --- a/src/Umbraco.Core/PropertyEditors/IConfiguredDataEditor.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Umbraco.Core.PropertyEditors -{ - /// - /// Represents a data editor which can be configured. - /// - public interface IConfiguredDataEditor : IDataEditor - { - /// - /// Gets the editor to edit the value editor configuration. - /// - IConfigurationEditor ConfigurationEditor { get; } // fixme should be a method - but, deserialization? - } -} \ No newline at end of file diff --git a/src/Umbraco.Core/PropertyEditors/IDataEditor.cs b/src/Umbraco.Core/PropertyEditors/IDataEditor.cs index 803f3d7f93..48a1428358 100644 --- a/src/Umbraco.Core/PropertyEditors/IDataEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/IDataEditor.cs @@ -52,5 +52,11 @@ namespace Umbraco.Core.PropertyEditors /// Gets the configuration for the value editor. /// IDictionary DefaultConfiguration { get; } + + /// + /// Gets the editor to edit the value editor configuration. + /// + /// Is expected to throw if the editor does not support being configured, e.g. for most parameter editors. + IConfigurationEditor ConfigurationEditor { get; } // fixme should be a method - but, deserialization? } } \ No newline at end of file diff --git a/src/Umbraco.Core/PropertyEditors/PropertyEditorCollection.cs b/src/Umbraco.Core/PropertyEditors/PropertyEditorCollection.cs index 6e1f6d7cfc..712a66e55d 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyEditorCollection.cs +++ b/src/Umbraco.Core/PropertyEditors/PropertyEditorCollection.cs @@ -4,26 +4,24 @@ using Umbraco.Core.Manifest; namespace Umbraco.Core.PropertyEditors { - public class PropertyEditorCollection : BuilderCollectionBase + public class PropertyEditorCollection : BuilderCollectionBase { public PropertyEditorCollection(DataEditorCollection dataEditors, ManifestParser manifestParser) : base(dataEditors .Where(x => (x.Type & EditorType.PropertyValue) > 0) - .Cast() .Union(manifestParser.Manifest.PropertyEditors)) { } public PropertyEditorCollection(DataEditorCollection dataEditors) : base(dataEditors - .Where(x => (x.Type & EditorType.PropertyValue) > 0) - .Cast()) + .Where(x => (x.Type & EditorType.PropertyValue) > 0)) { } // note: virtual so it can be mocked - public virtual IConfiguredDataEditor this[string alias] + public virtual IDataEditor this[string alias] => this.SingleOrDefault(x => x.Alias == alias); - public virtual bool TryGet(string alias, out IConfiguredDataEditor editor) + public virtual bool TryGet(string alias, out IDataEditor editor) { editor = this.FirstOrDefault(x => x.Alias == alias); return editor != null; diff --git a/src/Umbraco.Core/PropertyEditors/VoidEditor.cs b/src/Umbraco.Core/PropertyEditors/VoidEditor.cs index 657f8af5fe..b3a3e8ac0c 100644 --- a/src/Umbraco.Core/PropertyEditors/VoidEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/VoidEditor.cs @@ -10,7 +10,7 @@ namespace Umbraco.Core.PropertyEditors /// editor is available. Not to be used otherwise. Not discovered, and therefore /// not part of the editors collection. [HideFromTypeFinder] - public class VoidEditor : ConfiguredDataEditor + public class VoidEditor : DataEditor { /// /// Initializes a new instance of the class. diff --git a/src/Umbraco.Core/Serialization/JsonReadConverter.cs b/src/Umbraco.Core/Serialization/JsonReadConverter.cs index b578a29bc0..c13f4a562b 100644 --- a/src/Umbraco.Core/Serialization/JsonReadConverter.cs +++ b/src/Umbraco.Core/Serialization/JsonReadConverter.cs @@ -15,9 +15,10 @@ namespace Umbraco.Core.Serialization /// Create an instance of objectType, based properties in the JSON object /// /// type of object expected + /// The path of the current json token. /// contents of JSON object that will be deserialized /// - protected abstract T Create(Type objectType, JObject jObject); + protected abstract T Create(Type objectType, string path, JObject jObject); /// public override bool CanConvert(Type objectType) @@ -32,7 +33,7 @@ namespace Umbraco.Core.Serialization var jObject = JObject.Load(reader); // Create target object based on JObject - var target = Create(objectType, jObject); + var target = Create(objectType, reader.Path, jObject); Deserialize(jObject, target, serializer); diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 9367228728..9a6ffdbe33 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -337,7 +337,6 @@ - @@ -1199,7 +1198,6 @@ - diff --git a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs index b1a48fc153..0ff6bc66a9 100644 --- a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs +++ b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs @@ -304,11 +304,11 @@ AnotherContentFinder { var types = new HashSet(); - var propEditors = new TypeLoader.TypeList(typeof (ConfiguredDataEditor), null); + var propEditors = new TypeLoader.TypeList(typeof (DataEditor), null); propEditors.Add(typeof(LabelPropertyEditor)); types.Add(propEditors); - var found = types.SingleOrDefault(x => x.BaseType == typeof (ConfiguredDataEditor) && x.AttributeType == null); + var found = types.SingleOrDefault(x => x.BaseType == typeof (DataEditor) && x.AttributeType == null); Assert.IsNotNull(found); diff --git a/src/Umbraco.Tests/Models/Mapping/ContentTypeModelMappingTests.cs b/src/Umbraco.Tests/Models/Mapping/ContentTypeModelMappingTests.cs index 9b651d642f..79e5b36b80 100644 --- a/src/Umbraco.Tests/Models/Mapping/ContentTypeModelMappingTests.cs +++ b/src/Umbraco.Tests/Models/Mapping/ContentTypeModelMappingTests.cs @@ -71,7 +71,7 @@ namespace Umbraco.Tests.Models.Mapping base.Compose(); // create and register a fake property editor collection to return fake property editors - var editors = new ConfiguredDataEditor[] { new TextboxPropertyEditor(Mock.Of()), }; + var editors = new DataEditor[] { new TextboxPropertyEditor(Mock.Of()), }; var dataEditors = new DataEditorCollection(editors); _editorsMock = new Mock(dataEditors); _editorsMock.Setup(x => x[It.IsAny()]).Returns(editors[0]); diff --git a/src/Umbraco.Tests/Models/Mapping/ContentWebModelMappingTests.cs b/src/Umbraco.Tests/Models/Mapping/ContentWebModelMappingTests.cs index 063936686f..5df5e5b87e 100644 --- a/src/Umbraco.Tests/Models/Mapping/ContentWebModelMappingTests.cs +++ b/src/Umbraco.Tests/Models/Mapping/ContentWebModelMappingTests.cs @@ -30,7 +30,7 @@ namespace Umbraco.Tests.Models.Mapping } [DataEditor("Test.Test", "Test", "~/Test.html")] - public class TestPropertyEditor : ConfiguredDataEditor + public class TestPropertyEditor : DataEditor { /// /// The constructor will setup the property editor based on the attribute if one is found diff --git a/src/Umbraco.Tests/Persistence/Repositories/ContentRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/ContentRepositoryTest.cs index 7ef5aec75a..65a32942df 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/ContentRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/ContentRepositoryTest.cs @@ -48,7 +48,7 @@ namespace Umbraco.Tests.Persistence.Repositories TemplateRepository tr; var ctRepository = CreateRepository(scopeAccessor, out contentTypeRepository, out tr); - var editors = new PropertyEditorCollection(new DataEditorCollection(Enumerable.Empty())); + var editors = new PropertyEditorCollection(new DataEditorCollection(Enumerable.Empty())); dtdRepository = new DataTypeRepository(scopeAccessor, cacheHelper, new Lazy(() => editors), Logger); return ctRepository; } diff --git a/src/Umbraco.Tests/Persistence/Repositories/PartialViewRepositoryTests.cs b/src/Umbraco.Tests/Persistence/Repositories/PartialViewRepositoryTests.cs index f4468c459d..cf307d2ea9 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/PartialViewRepositoryTests.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/PartialViewRepositoryTests.cs @@ -29,7 +29,7 @@ namespace Umbraco.Tests.Persistence.Repositories { base.Compose(); - Container.RegisterSingleton(f => new DataEditorCollection(Enumerable.Empty())); + Container.RegisterSingleton(f => new DataEditorCollection(Enumerable.Empty())); } [Test] diff --git a/src/Umbraco.Tests/Persistence/Repositories/ScriptRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/ScriptRepositoryTest.cs index 8ec1fecdfc..be7dcb15ae 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/ScriptRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/ScriptRepositoryTest.cs @@ -37,7 +37,7 @@ namespace Umbraco.Tests.Persistence.Repositories { base.Compose(); - Container.RegisterSingleton(f => new DataEditorCollection(Enumerable.Empty())); + Container.RegisterSingleton(f => new DataEditorCollection(Enumerable.Empty())); } [Test] diff --git a/src/Umbraco.Tests/Published/NestedContentTests.cs b/src/Umbraco.Tests/Published/NestedContentTests.cs index 1bc1982027..a916a2d51e 100644 --- a/src/Umbraco.Tests/Published/NestedContentTests.cs +++ b/src/Umbraco.Tests/Published/NestedContentTests.cs @@ -34,7 +34,7 @@ namespace Umbraco.Tests.Published PropertyEditorCollection editors = null; var editor = new NestedContentPropertyEditor(logger, new Lazy(() => editors)); - editors = new PropertyEditorCollection(new DataEditorCollection(new ConfiguredDataEditor[] { editor })); + editors = new PropertyEditorCollection(new DataEditorCollection(new DataEditor[] { editor })); var dataType1 = new DataType(editor) { diff --git a/src/Umbraco.Tests/Services/Importing/PackageImportTests.cs b/src/Umbraco.Tests/Services/Importing/PackageImportTests.cs index 6bb723bdcd..b404a0a83c 100644 --- a/src/Umbraco.Tests/Services/Importing/PackageImportTests.cs +++ b/src/Umbraco.Tests/Services/Importing/PackageImportTests.cs @@ -19,7 +19,7 @@ namespace Umbraco.Tests.Services.Importing public class PackageImportTests : TestWithSomeContentBase { [HideFromTypeFinder] - public class Editor1 : ConfiguredDataEditor + public class Editor1 : DataEditor { public Editor1(ILogger logger) : base(logger) @@ -29,7 +29,7 @@ namespace Umbraco.Tests.Services.Importing } [HideFromTypeFinder] - public class Editor2 : ConfiguredDataEditor + public class Editor2 : DataEditor { public Editor2(ILogger logger) : base(logger) diff --git a/src/Umbraco.Tests/TestHelpers/TestObjects.cs b/src/Umbraco.Tests/TestHelpers/TestObjects.cs index 6a628aa631..769fe52d4b 100644 --- a/src/Umbraco.Tests/TestHelpers/TestObjects.cs +++ b/src/Umbraco.Tests/TestHelpers/TestObjects.cs @@ -177,7 +177,7 @@ namespace Umbraco.Tests.TestHelpers GetRepo(c))); var macroService = GetLazyService(container, c => new MacroService(scopeProvider, logger, eventMessagesFactory, GetRepo(c), GetRepo(c))); - var packagingService = GetLazyService(container, c => new PackagingService(logger, contentService.Value, contentTypeService.Value, mediaService.Value, macroService.Value, dataTypeService.Value, fileService.Value, localizationService.Value, entityService.Value, userService.Value, scopeProvider, urlSegmentProviders, GetRepo(c), GetRepo(c), new PropertyEditorCollection(new DataEditorCollection(Enumerable.Empty())))); + var packagingService = GetLazyService(container, c => new PackagingService(logger, contentService.Value, contentTypeService.Value, mediaService.Value, macroService.Value, dataTypeService.Value, fileService.Value, localizationService.Value, entityService.Value, userService.Value, scopeProvider, urlSegmentProviders, GetRepo(c), GetRepo(c), new PropertyEditorCollection(new DataEditorCollection(Enumerable.Empty())))); var relationService = GetLazyService(container, c => new RelationService(scopeProvider, logger, eventMessagesFactory, entityService.Value, GetRepo(c), GetRepo(c))); var treeService = GetLazyService(container, c => new ApplicationTreeService(logger, cache)); var tagService = GetLazyService(container, c => new TagService(scopeProvider, logger, eventMessagesFactory, GetRepo(c))); diff --git a/src/Umbraco.Web/Editors/DataTypeController.cs b/src/Umbraco.Web/Editors/DataTypeController.cs index a8d3bcb65e..ad33113720 100644 --- a/src/Umbraco.Web/Editors/DataTypeController.cs +++ b/src/Umbraco.Web/Editors/DataTypeController.cs @@ -147,7 +147,7 @@ namespace Umbraco.Web.Editors if (dataTypeId == -1) { //this is a new data type, so just return the field editors with default values - return Mapper.Map>(propEd); + return Mapper.Map>(propEd); } //we have a data type associated @@ -167,7 +167,7 @@ namespace Umbraco.Web.Editors } //these are new pre-values, so just return the field editors with default values - return Mapper.Map>(propEd); + return Mapper.Map>(propEd); } /// diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentPropertyBasic.cs b/src/Umbraco.Web/Models/ContentEditing/ContentPropertyBasic.cs index 52f7db8592..58c838382a 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentPropertyBasic.cs +++ b/src/Umbraco.Web/Models/ContentEditing/ContentPropertyBasic.cs @@ -35,7 +35,7 @@ namespace Umbraco.Web.Models.ContentEditing /// Used internally during model mapping /// [IgnoreDataMember] - internal IConfiguredDataEditor PropertyEditor { get; set; } + internal IDataEditor PropertyEditor { get; set; } } } diff --git a/src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs b/src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs index 8c0419eda2..bb391a51a9 100644 --- a/src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs +++ b/src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs @@ -45,7 +45,7 @@ namespace Umbraco.Web.Models.ContentEditing /// Gets or sets the property editor. /// [IgnoreDataMember] - internal IConfiguredDataEditor PropertyEditor { get; set; } + internal IDataEditor PropertyEditor { get; set; } } } diff --git a/src/Umbraco.Web/Models/Mapping/DataTypeConfigurationFieldDisplayResolver.cs b/src/Umbraco.Web/Models/Mapping/DataTypeConfigurationFieldDisplayResolver.cs index d8fd8e44e4..ba76b96778 100644 --- a/src/Umbraco.Web/Models/Mapping/DataTypeConfigurationFieldDisplayResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/DataTypeConfigurationFieldDisplayResolver.cs @@ -36,15 +36,8 @@ namespace Umbraco.Web.Models.Mapping /// public IEnumerable Resolve(IDataType dataType) { - ConfiguredDataEditor editor = null; - if (!string.IsNullOrWhiteSpace(dataType.EditorAlias)) - { - if (!Current.PropertyEditors.TryGet(dataType.EditorAlias, out var e1)) - throw new InvalidOperationException($"Could not find a property editor with alias \"{dataType.EditorAlias}\"."); - if (!(e1 is ConfiguredDataEditor e2)) - throw new InvalidOperationException($"Property editor with alias \"{dataType.EditorAlias}\" is not configurable."); - editor = e2; - } + if (!string.IsNullOrWhiteSpace(dataType.EditorAlias) || !Current.PropertyEditors.TryGet(dataType.EditorAlias, out var e) || !(e is DataEditor editor)) + throw new InvalidOperationException($"Could not find a property editor with alias \"{dataType.EditorAlias}\"."); var configuration = dataType.Configuration; Dictionary configurationDictionary = null; diff --git a/src/Umbraco.Web/Models/Mapping/DataTypeMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/DataTypeMapperProfile.cs index 847af79e65..fa1146adae 100644 --- a/src/Umbraco.Web/Models/Mapping/DataTypeMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/DataTypeMapperProfile.cs @@ -23,7 +23,7 @@ namespace Umbraco.Web.Models.Mapping var configurationDisplayResolver = new DataTypeConfigurationFieldDisplayResolver(); var databaseTypeResolver = new DatabaseTypeResolver(); - CreateMap(); + CreateMap(); // map the standard properties, not the values CreateMap() @@ -36,7 +36,7 @@ namespace Umbraco.Web.Models.Mapping Constants.DataTypes.DefaultMembersListView }; - CreateMap() + CreateMap() .ForMember(dest => dest.Udi, opt => opt.Ignore()) .ForMember(dest => dest.HasPrevalues, opt => opt.Ignore()) .ForMember(dest => dest.IsSystemDataType, opt => opt.Ignore()) @@ -105,7 +105,7 @@ namespace Umbraco.Web.Models.Mapping .ForMember(dest => dest.Editor, opt => opt.MapFrom(src => propertyEditors[src.EditorAlias])); //Converts a property editor to a new list of pre-value fields - used when creating a new data type or changing a data type with new pre-vals - CreateMap>() + CreateMap>() .ConvertUsing(src => { // this is a new data type, initialize default configuration diff --git a/src/Umbraco.Web/PropertyEditors/CheckBoxListPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/CheckBoxListPropertyEditor.cs index 6a9ec78551..dc16dfb3df 100644 --- a/src/Umbraco.Web/PropertyEditors/CheckBoxListPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/CheckBoxListPropertyEditor.cs @@ -14,7 +14,7 @@ namespace Umbraco.Web.PropertyEditors /// in cache and not the int ID. /// [DataEditor(Constants.PropertyEditors.Aliases.CheckBoxList, "Checkbox list", "checkboxlist", Icon="icon-bulleted-list", Group="lists")] - public class CheckBoxListPropertyEditor : ConfiguredDataEditor + public class CheckBoxListPropertyEditor : DataEditor { private readonly ILocalizedTextService _textService; diff --git a/src/Umbraco.Web/PropertyEditors/ColorPickerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ColorPickerPropertyEditor.cs index 52f6ffe240..3525a9cc75 100644 --- a/src/Umbraco.Web/PropertyEditors/ColorPickerPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ColorPickerPropertyEditor.cs @@ -6,7 +6,7 @@ using Umbraco.Core.Services; namespace Umbraco.Web.PropertyEditors { [DataEditor(Constants.PropertyEditors.Aliases.ColorPicker, "Color Picker", "colorpicker", Icon="icon-colorpicker", Group="Pickers")] - public class ColorPickerPropertyEditor : ConfiguredDataEditor + public class ColorPickerPropertyEditor : DataEditor { private readonly ILocalizedTextService _textService; diff --git a/src/Umbraco.Web/PropertyEditors/ContentPicker2PropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ContentPicker2PropertyEditor.cs index 257eebe9c6..a48c4a9929 100644 --- a/src/Umbraco.Web/PropertyEditors/ContentPicker2PropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ContentPicker2PropertyEditor.cs @@ -9,7 +9,7 @@ namespace Umbraco.Web.PropertyEditors /// Content property editor that stores UDI /// [DataEditor(Constants.PropertyEditors.Aliases.ContentPicker2Alias, EditorType.PropertyValue | EditorType.MacroParameter, "Content Picker", "contentpicker", ValueType = ValueTypes.String, Group = "Pickers")] - public class ContentPicker2PropertyEditor : ConfiguredDataEditor + public class ContentPicker2PropertyEditor : DataEditor { public ContentPicker2PropertyEditor(ILogger logger) : base(logger) diff --git a/src/Umbraco.Web/PropertyEditors/DatePropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/DatePropertyEditor.cs index 1aadf0e8fa..7f65658b13 100644 --- a/src/Umbraco.Web/PropertyEditors/DatePropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/DatePropertyEditor.cs @@ -1,12 +1,11 @@ -using System.Collections.Generic; -using Umbraco.Core; +using Umbraco.Core; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors { [DataEditor(Constants.PropertyEditors.Aliases.Date, "Date", "datepicker", ValueType = ValueTypes.Date, Icon="icon-calendar")] - public class DatePropertyEditor : ConfiguredDataEditor + public class DatePropertyEditor : DataEditor { public DatePropertyEditor(ILogger logger): base(logger) { } diff --git a/src/Umbraco.Web/PropertyEditors/DateTimePropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/DateTimePropertyEditor.cs index b9d5c404cd..64c3d8e969 100644 --- a/src/Umbraco.Web/PropertyEditors/DateTimePropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/DateTimePropertyEditor.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using Umbraco.Core; +using Umbraco.Core; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; @@ -9,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents a date and time property editor. /// [DataEditor(Constants.PropertyEditors.Aliases.DateTime, "Date/Time", "datepicker", ValueType = ValueTypes.DateTime, Icon="icon-time")] - public class DateTimePropertyEditor : ConfiguredDataEditor + public class DateTimePropertyEditor : DataEditor { /// /// Initializes a new instance of the class. diff --git a/src/Umbraco.Web/PropertyEditors/DecimalPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/DecimalPropertyEditor.cs index 32b347f54b..15b33f28b7 100644 --- a/src/Umbraco.Web/PropertyEditors/DecimalPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/DecimalPropertyEditor.cs @@ -9,7 +9,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents a decimal property and parameter editor. /// [DataEditor(Constants.PropertyEditors.Aliases.Decimal, EditorType.PropertyValue | EditorType.MacroParameter, "Decimal", "decimal", ValueType = ValueTypes.Decimal)] - public class DecimalPropertyEditor : ConfiguredDataEditor + public class DecimalPropertyEditor : DataEditor { /// /// Initializes a new instance of the class. diff --git a/src/Umbraco.Web/PropertyEditors/DropDownWithKeysPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/DropDownWithKeysPropertyEditor.cs index 38ce4ef8d4..70b6bb5399 100644 --- a/src/Umbraco.Web/PropertyEditors/DropDownWithKeysPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/DropDownWithKeysPropertyEditor.cs @@ -14,7 +14,7 @@ namespace Umbraco.Web.PropertyEditors /// in cache and not the string value. /// [DataEditor(Constants.PropertyEditors.Aliases.DropdownlistPublishKeys, "Dropdown list, publishing keys", "dropdown", ValueType = ValueTypes.Integer, Group = "lists", Icon = "icon-indent")] - public class DropDownWithKeysPropertyEditor : ConfiguredDataEditor + public class DropDownWithKeysPropertyEditor : DataEditor { private readonly ILocalizedTextService _textService; diff --git a/src/Umbraco.Web/PropertyEditors/EmailAddressPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/EmailAddressPropertyEditor.cs index bfd76e739b..d870d2df5f 100644 --- a/src/Umbraco.Web/PropertyEditors/EmailAddressPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/EmailAddressPropertyEditor.cs @@ -6,7 +6,7 @@ using Umbraco.Core.PropertyEditors.Validators; namespace Umbraco.Web.PropertyEditors { [DataEditor(Constants.PropertyEditors.Aliases.EmailAddress, "Email address", "email", Icon="icon-message")] - public class EmailAddressPropertyEditor : ConfiguredDataEditor + public class EmailAddressPropertyEditor : DataEditor { /// /// The constructor will setup the property editor based on the attribute if one is found diff --git a/src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs index 6c2e102de7..bc4d21c4c4 100644 --- a/src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs @@ -11,7 +11,7 @@ using Umbraco.Core.Services; namespace Umbraco.Web.PropertyEditors { [DataEditor(Constants.PropertyEditors.Aliases.UploadField, "File upload", "fileupload", Icon = "icon-download-alt", Group = "media")] - public class FileUploadPropertyEditor : ConfiguredDataEditor + public class FileUploadPropertyEditor : DataEditor { private readonly MediaFileSystem _mediaFileSystem; diff --git a/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs index 82bd6038f8..6256f49c67 100644 --- a/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs @@ -19,7 +19,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents a grid property and parameter editor. /// [DataEditor(Constants.PropertyEditors.Aliases.Grid, "Grid layout", "grid", HideLabel = true, ValueType = ValueTypes.Json, Group="rich content", Icon="icon-layout")] - public class GridPropertyEditor : ConfiguredDataEditor + public class GridPropertyEditor : DataEditor { public GridPropertyEditor(ILogger logger) : base(logger) diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs index 352b88f2b9..e666b04abd 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs @@ -18,7 +18,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents an image cropper property editor. /// [DataEditor(Constants.PropertyEditors.Aliases.ImageCropper, "Image Cropper", "imagecropper", ValueType = ValueTypes.Json, HideLabel = false, Group="media", Icon="icon-crop")] - public class ImageCropperPropertyEditor : ConfiguredDataEditor + public class ImageCropperPropertyEditor : DataEditor { private readonly MediaFileSystem _mediaFileSystem; private readonly UploadAutoFillProperties _autoFillProperties; diff --git a/src/Umbraco.Web/PropertyEditors/IntegerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/IntegerPropertyEditor.cs index e1a255b378..a0a70f08a2 100644 --- a/src/Umbraco.Web/PropertyEditors/IntegerPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/IntegerPropertyEditor.cs @@ -9,7 +9,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents an integer property and parameter editor. /// [DataEditor(Constants.PropertyEditors.Aliases.Integer, EditorType.PropertyValue | EditorType.MacroParameter, "Numeric", "integer", ValueType = ValueTypes.Integer)] - public class IntegerPropertyEditor : ConfiguredDataEditor + public class IntegerPropertyEditor : DataEditor { public IntegerPropertyEditor(ILogger logger) : base(logger) diff --git a/src/Umbraco.Web/PropertyEditors/LabelPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/LabelPropertyEditor.cs index 14018c00bd..0e1a031284 100644 --- a/src/Umbraco.Web/PropertyEditors/LabelPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/LabelPropertyEditor.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents a property editor for label properties. /// [DataEditor(Constants.PropertyEditors.Aliases.NoEdit, "Label", "readonlyvalue", Icon = "icon-readonly")] - public class LabelPropertyEditor : ConfiguredDataEditor + public class LabelPropertyEditor : DataEditor { /// /// Initializes a new instance of the class. diff --git a/src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs index 148a6f4b10..6d537d0aca 100644 --- a/src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs @@ -9,7 +9,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents a list-view editor. /// [DataEditor(Constants.PropertyEditors.Aliases.ListView, "List view", "listview", HideLabel = true, Group = "lists", Icon = "icon-item-arrangement")] - public class ListViewPropertyEditor : ConfiguredDataEditor + public class ListViewPropertyEditor : DataEditor { /// /// Initializes a new instance of the class. diff --git a/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs index ae3a9f2482..66fdfec7ac 100644 --- a/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs @@ -6,7 +6,7 @@ namespace Umbraco.Web.PropertyEditors { // fixme - if deprecated, what's the alternative? [DataEditor(Constants.PropertyEditors.Aliases.MacroContainer, "(Obsolete) Macro Picker", "macrocontainer", ValueType = ValueTypes.Text, Group="rich content", Icon="icon-settings-alt", IsDeprecated = true)] - public class MacroContainerPropertyEditor : ConfiguredDataEditor + public class MacroContainerPropertyEditor : DataEditor { public MacroContainerPropertyEditor(ILogger logger) : base(logger) diff --git a/src/Umbraco.Web/PropertyEditors/MarkdownPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/MarkdownPropertyEditor.cs index af2e2d4cfc..1de60980e0 100644 --- a/src/Umbraco.Web/PropertyEditors/MarkdownPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MarkdownPropertyEditor.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents a markdown editor. /// [DataEditor(Constants.PropertyEditors.Aliases.MarkdownEditor, "Markdown editor", "markdowneditor", ValueType = ValueTypes.Text, Icon="icon-code", Group="rich content")] - public class MarkdownPropertyEditor : ConfiguredDataEditor + public class MarkdownPropertyEditor : DataEditor { /// /// Initializes a new instance of the class. diff --git a/src/Umbraco.Web/PropertyEditors/MediaPicker2PropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/MediaPicker2PropertyEditor.cs index 7f4b55fea1..c8a403f348 100644 --- a/src/Umbraco.Web/PropertyEditors/MediaPicker2PropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MediaPicker2PropertyEditor.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents a media picker property editor. /// [DataEditor(Constants.PropertyEditors.Aliases.MediaPicker2, EditorType.PropertyValue | EditorType.MacroParameter, "mediapicker", ValueTypes.Text, Group = "media", Icon = "icon-picture")] - public class MediaPicker2PropertyEditor : ConfiguredDataEditor + public class MediaPicker2PropertyEditor : DataEditor { /// /// Initializes a new instance of the class. diff --git a/src/Umbraco.Web/PropertyEditors/MemberGroupPickerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/MemberGroupPickerPropertyEditor.cs index aa2648db94..9c67838e0c 100644 --- a/src/Umbraco.Web/PropertyEditors/MemberGroupPickerPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MemberGroupPickerPropertyEditor.cs @@ -5,7 +5,7 @@ using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors { [DataEditor(Constants.PropertyEditors.Aliases.MemberGroupPicker, "Member Group Picker", "membergrouppicker", Group="People", Icon="icon-users")] - public class MemberGroupPickerPropertyEditor : ConfiguredDataEditor + public class MemberGroupPickerPropertyEditor : DataEditor { public MemberGroupPickerPropertyEditor(ILogger logger) : base(logger) diff --git a/src/Umbraco.Web/PropertyEditors/MemberPicker2PropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/MemberPicker2PropertyEditor.cs index cd4ef08050..e48f6644cb 100644 --- a/src/Umbraco.Web/PropertyEditors/MemberPicker2PropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MemberPicker2PropertyEditor.cs @@ -5,7 +5,7 @@ using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors { [DataEditor(Constants.PropertyEditors.Aliases.MemberPicker2, "Member Picker", "memberpicker", ValueType = ValueTypes.String, Group = "People", Icon = "icon-user")] - public class MemberPicker2PropertyEditor : ConfiguredDataEditor + public class MemberPicker2PropertyEditor : DataEditor { public MemberPicker2PropertyEditor(ILogger logger) : base(logger) diff --git a/src/Umbraco.Web/PropertyEditors/MultiNodeTreePicker2PropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/MultiNodeTreePicker2PropertyEditor.cs index d8624807b3..2760efb704 100644 --- a/src/Umbraco.Web/PropertyEditors/MultiNodeTreePicker2PropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MultiNodeTreePicker2PropertyEditor.cs @@ -5,7 +5,7 @@ using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors { [DataEditor(Constants.PropertyEditors.Aliases.MultiNodeTreePicker2, "Multinode Treepicker", "contentpicker", ValueType = ValueTypes.Text, Group = "pickers", Icon = "icon-page-add")] - public class MultiNodeTreePicker2PropertyEditor : ConfiguredDataEditor + public class MultiNodeTreePicker2PropertyEditor : DataEditor { public MultiNodeTreePicker2PropertyEditor(ILogger logger) : base(logger) diff --git a/src/Umbraco.Web/PropertyEditors/MultipleTextStringPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/MultipleTextStringPropertyEditor.cs index 95b4d55043..df2174ed09 100644 --- a/src/Umbraco.Web/PropertyEditors/MultipleTextStringPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MultipleTextStringPropertyEditor.cs @@ -14,7 +14,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents a multiple text string property editor. /// [DataEditor(Constants.PropertyEditors.Aliases.MultipleTextstring, "Repeatable textstrings", "multipletextbox", ValueType = ValueTypes.Text, Icon="icon-ordered-list", Group="lists")] - public class MultipleTextStringPropertyEditor : ConfiguredDataEditor + public class MultipleTextStringPropertyEditor : DataEditor { /// /// Initializes a new instance of the class. diff --git a/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs index a24324275c..b5e9ffa8a0 100644 --- a/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs @@ -19,7 +19,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents a nested content property editor. /// [DataEditor(Constants.PropertyEditors.Aliases.NestedContent, "Nested Content", "nestedcontent", ValueType = "JSON", Group = "lists", Icon = "icon-thumbnail-list")] - public class NestedContentPropertyEditor : ConfiguredDataEditor + public class NestedContentPropertyEditor : DataEditor { private readonly Lazy _propertyEditors; diff --git a/src/Umbraco.Web/PropertyEditors/ParameterEditors/ContentTypeParameterEditor.cs b/src/Umbraco.Web/PropertyEditors/ParameterEditors/ContentTypeParameterEditor.cs index f73911d861..cb016c97b9 100644 --- a/src/Umbraco.Web/PropertyEditors/ParameterEditors/ContentTypeParameterEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ParameterEditors/ContentTypeParameterEditor.cs @@ -1,4 +1,5 @@ -using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Logging; +using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors.ParameterEditors { @@ -11,7 +12,8 @@ namespace Umbraco.Web.PropertyEditors.ParameterEditors /// /// Initializes a new instance of the class. /// - public ContentTypeParameterEditor() + public ContentTypeParameterEditor(ILogger logger) + : base(logger) { // configure DefaultConfiguration.Add("multiple", false); diff --git a/src/Umbraco.Web/PropertyEditors/ParameterEditors/MultipleContentTypeParameterEditor.cs b/src/Umbraco.Web/PropertyEditors/ParameterEditors/MultipleContentTypeParameterEditor.cs index 4119b33dad..d51be8961a 100644 --- a/src/Umbraco.Web/PropertyEditors/ParameterEditors/MultipleContentTypeParameterEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ParameterEditors/MultipleContentTypeParameterEditor.cs @@ -1,11 +1,13 @@ -using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Logging; +using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors.ParameterEditors { [DataEditor("contentTypeMultiple", EditorType.MacroParameter, "Multiple Content Type Picker", "entitypicker")] public class MultipleContentTypeParameterEditor : DataEditor { - public MultipleContentTypeParameterEditor() + public MultipleContentTypeParameterEditor(ILogger logger) + : base(logger) { // configure DefaultConfiguration.Add("multiple", true); diff --git a/src/Umbraco.Web/PropertyEditors/ParameterEditors/MultiplePropertyGroupParameterEditor.cs b/src/Umbraco.Web/PropertyEditors/ParameterEditors/MultiplePropertyGroupParameterEditor.cs index 8a15aca65e..11bf64c044 100644 --- a/src/Umbraco.Web/PropertyEditors/ParameterEditors/MultiplePropertyGroupParameterEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ParameterEditors/MultiplePropertyGroupParameterEditor.cs @@ -1,11 +1,13 @@ -using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Logging; +using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors.ParameterEditors { [DataEditor("tabPickerMultiple", EditorType.MacroParameter, "Multiple Tab Picker", "entitypicker")] public class MultiplePropertyGroupParameterEditor : DataEditor { - public MultiplePropertyGroupParameterEditor() + public MultiplePropertyGroupParameterEditor(ILogger logger) + : base(logger) { // configure DefaultConfiguration.Add("multiple", true); diff --git a/src/Umbraco.Web/PropertyEditors/ParameterEditors/MultiplePropertyTypeParameterEditor.cs b/src/Umbraco.Web/PropertyEditors/ParameterEditors/MultiplePropertyTypeParameterEditor.cs index e74bfb5400..3d519c127f 100644 --- a/src/Umbraco.Web/PropertyEditors/ParameterEditors/MultiplePropertyTypeParameterEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ParameterEditors/MultiplePropertyTypeParameterEditor.cs @@ -1,11 +1,13 @@ -using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Logging; +using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors.ParameterEditors { [DataEditor("propertyTypePickerMultiple", EditorType.MacroParameter, "Multiple Property Type Picker", "entitypicker")] public class MultiplePropertyTypeParameterEditor : DataEditor { - public MultiplePropertyTypeParameterEditor() + public MultiplePropertyTypeParameterEditor(ILogger logger) + : base(logger) { // configure DefaultConfiguration.Add("multiple", "1"); diff --git a/src/Umbraco.Web/PropertyEditors/ParameterEditors/PropertyGroupParameterEditor.cs b/src/Umbraco.Web/PropertyEditors/ParameterEditors/PropertyGroupParameterEditor.cs index 013d52d8bb..028db9d2a5 100644 --- a/src/Umbraco.Web/PropertyEditors/ParameterEditors/PropertyGroupParameterEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ParameterEditors/PropertyGroupParameterEditor.cs @@ -1,11 +1,13 @@ -using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Logging; +using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors.ParameterEditors { [DataEditor("tabPicker", EditorType.MacroParameter, "Tab Picker", "entitypicker")] public class PropertyGroupParameterEditor : DataEditor { - public PropertyGroupParameterEditor() + public PropertyGroupParameterEditor(ILogger logger) + : base(logger) { // configure DefaultConfiguration.Add("multiple", "0"); diff --git a/src/Umbraco.Web/PropertyEditors/ParameterEditors/PropertyTypeParameterEditor.cs b/src/Umbraco.Web/PropertyEditors/ParameterEditors/PropertyTypeParameterEditor.cs index 9b07bf0797..e24534a81b 100644 --- a/src/Umbraco.Web/PropertyEditors/ParameterEditors/PropertyTypeParameterEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ParameterEditors/PropertyTypeParameterEditor.cs @@ -1,11 +1,13 @@ -using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Logging; +using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors.ParameterEditors { [DataEditor("propertyTypePicker", EditorType.MacroParameter, "Property Type Picker", "entitypicker")] public class PropertyTypeParameterEditor : DataEditor { - public PropertyTypeParameterEditor() + public PropertyTypeParameterEditor(ILogger logger) + : base(logger) { // configure DefaultConfiguration.Add("multiple", "0"); diff --git a/src/Umbraco.Web/PropertyEditors/RelatedLinks2PropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/RelatedLinks2PropertyEditor.cs index 3bc19d39a9..77fb5775ad 100644 --- a/src/Umbraco.Web/PropertyEditors/RelatedLinks2PropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/RelatedLinks2PropertyEditor.cs @@ -6,7 +6,7 @@ using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors { [DataEditor(Constants.PropertyEditors.Aliases.RelatedLinks2, "Related links", "relatedlinks", ValueType = ValueTypes.Json, Icon = "icon-thumbnail-list", Group = "pickers")] - public class RelatedLinks2PropertyEditor : ConfiguredDataEditor + public class RelatedLinks2PropertyEditor : DataEditor { public RelatedLinks2PropertyEditor(ILogger logger) : base(logger) diff --git a/src/Umbraco.Web/PropertyEditors/RichTextPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/RichTextPropertyEditor.cs index c5536131ae..ec499d9f01 100644 --- a/src/Umbraco.Web/PropertyEditors/RichTextPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/RichTextPropertyEditor.cs @@ -13,7 +13,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents a rich text property editor. /// [DataEditor(Constants.PropertyEditors.Aliases.TinyMce, "Rich Text Editor", "rte", ValueType = ValueTypes.Text, HideLabel = false, Group="Rich Content", Icon="icon-browser-window")] - public class RichTextPropertyEditor : ConfiguredDataEditor + public class RichTextPropertyEditor : DataEditor { /// /// The constructor will setup the property editor based on the attribute if one is found diff --git a/src/Umbraco.Web/PropertyEditors/SliderPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/SliderPropertyEditor.cs index 4c3f07681d..d6684c3f61 100644 --- a/src/Umbraco.Web/PropertyEditors/SliderPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/SliderPropertyEditor.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents a slider editor. /// [DataEditor(Constants.PropertyEditors.Aliases.Slider, "Slider", "slider", Icon = "icon-navigation-horizontal")] - public class SliderPropertyEditor : ConfiguredDataEditor + public class SliderPropertyEditor : DataEditor { /// /// Initializes a new instance of the class. diff --git a/src/Umbraco.Web/PropertyEditors/TagsPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/TagsPropertyEditor.cs index 126a0592e7..e863c662a7 100644 --- a/src/Umbraco.Web/PropertyEditors/TagsPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/TagsPropertyEditor.cs @@ -15,7 +15,7 @@ namespace Umbraco.Web.PropertyEditors /// [TagsPropertyEditor] [DataEditor(Constants.PropertyEditors.Aliases.Tags, "Tags", "tags", Icon="icon-tags")] - public class TagsPropertyEditor : ConfiguredDataEditor + public class TagsPropertyEditor : DataEditor { private readonly ManifestValidatorCollection _validators; diff --git a/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs index 3bfc4c2fd9..f05cf969e7 100644 --- a/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents a textarea property and parameter editor. /// [DataEditor(Constants.PropertyEditors.Aliases.TextboxMultiple, EditorType.PropertyValue | EditorType.MacroParameter, "Textarea", "textarea", ValueType = ValueTypes.Text, Icon="icon-application-window-alt")] - public class TextAreaPropertyEditor : ConfiguredDataEditor + public class TextAreaPropertyEditor : DataEditor { /// /// Initializes a new instance of the class. diff --git a/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs index 1864d11115..5fe6b8023e 100644 --- a/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents a textbox property and parameter editor. /// [DataEditor(Constants.PropertyEditors.Aliases.Textbox, EditorType.PropertyValue | EditorType.MacroParameter, "Textbox", "textbox", Group = "Common")] - public class TextboxPropertyEditor : ConfiguredDataEditor + public class TextboxPropertyEditor : DataEditor { /// /// Initializes a new instance of the class. diff --git a/src/Umbraco.Web/PropertyEditors/TrueFalsePropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/TrueFalsePropertyEditor.cs index 379867ad4b..79456aa8ca 100644 --- a/src/Umbraco.Web/PropertyEditors/TrueFalsePropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/TrueFalsePropertyEditor.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors /// Represents a boolean property and parameter editor. /// [DataEditor(Constants.PropertyEditors.Aliases.Boolean, EditorType.PropertyValue | EditorType.MacroParameter, "True/False", "boolean", ValueType = ValueTypes.Integer, Group = "Common", Icon="icon-checkbox")] - public class TrueFalsePropertyEditor : ConfiguredDataEditor + public class TrueFalsePropertyEditor : DataEditor { /// /// Initializes a new instance of the class. diff --git a/src/Umbraco.Web/PropertyEditors/UserPickerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/UserPickerPropertyEditor.cs index 931e0864e7..e1e01ff437 100644 --- a/src/Umbraco.Web/PropertyEditors/UserPickerPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/UserPickerPropertyEditor.cs @@ -7,7 +7,7 @@ using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors { [DataEditor(Constants.PropertyEditors.Aliases.UserPicker, "User picker", "entitypicker", ValueType = ValueTypes.Integer, Group = "People", Icon = "icon-user")] - public class UserPickerPropertyEditor : ConfiguredDataEditor + public class UserPickerPropertyEditor : DataEditor { public UserPickerPropertyEditor(ILogger logger) : base(logger)