-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af3acf6
commit d17ce98
Showing
27 changed files
with
343 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 26 additions & 3 deletions
29
src/RapidCMS.Core/Abstractions/Config/IHasConfigurability.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,36 @@ | ||
namespace RapidCMS.Core.Abstractions.Config | ||
using System; | ||
using System.Threading.Tasks; | ||
using RapidCMS.Core.Enums; | ||
|
||
namespace RapidCMS.Core.Abstractions.Config | ||
{ | ||
public interface IHasConfigurability<TReturn> | ||
public interface IHasConfigurability<TEntity, TReturn> | ||
{ | ||
/// <summary> | ||
/// Sets configuration for the field. This will be made available in the component as Configuration property. | ||
/// Use IWantConfiguration and IRequireConfiguration interfaces to gain access to the GetConfig() extension method. | ||
/// </summary> | ||
/// <typeparam name="TConfig"></typeparam> | ||
/// <param name="config"></param> | ||
/// <returns></returns> | ||
TReturn SetConfiguration<TConfig>(TConfig config); | ||
TReturn SetConfiguration<TConfig>(TConfig config) where TConfig : class; | ||
|
||
/// <summary> | ||
/// Sets configuration for the field. This will be made available in the component as Configuration property. | ||
/// Use IWantConfiguration and IRequireConfiguration interfaces to gain access to the GetConfig() extension method. | ||
/// </summary> | ||
/// <typeparam name="TConfig"></typeparam> | ||
/// <param name="config"></param> | ||
/// <returns></returns> | ||
TReturn SetConfiguration<TConfig>(Func<TEntity, EntityState, TConfig?> config) where TConfig : class; | ||
|
||
/// <summary> | ||
/// Sets configuration for the field. This will be made available in the component as Configuration property. | ||
/// Use IWantConfiguration and IRequireConfiguration interfaces to gain access to the GetConfig() extension method. | ||
/// </summary> | ||
/// <typeparam name="TConfig"></typeparam> | ||
/// <param name="config"></param> | ||
/// <returns></returns> | ||
TReturn SetConfiguration<TConfig>(Func<TEntity, EntityState, Task<TConfig?>> config) where TConfig : class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using RapidCMS.Core.Abstractions.Data; | ||
using RapidCMS.Core.Enums; | ||
|
||
namespace RapidCMS.Core.Abstractions.UI; | ||
|
||
public interface IBaseUIElement | ||
{ | ||
IEntity Entity { get; } | ||
EntityState EntityState { get; } | ||
Func<object, EntityState, Task<object?>>? Configuration { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace RapidCMS.Core.Abstractions.UI; | ||
|
||
public interface IRequireConfiguration<TConfig> : IBaseUIElement | ||
where TConfig : class | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace RapidCMS.Core.Abstractions.UI; | ||
|
||
public interface IWantConfiguration<TConfig> : IBaseUIElement | ||
where TConfig : class | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ public enum DisplayType | |
Custom = -1, | ||
|
||
Label = 0, | ||
Pre | ||
Pre, | ||
Link | ||
} | ||
} |
Oops, something went wrong.