diff --git a/Directory.Build.props b/Directory.Build.props index cc8808c50..be39d62fd 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ https://www.github.com/JJConsulting/JJMasterData https://www.github.com/JJConsulting/JJMasterData JJMasterData.png - 4.1.11 + 4.2.0 README.NuGet.md $(Version) $(Version) diff --git a/doc/Documentation/articles/authorization.md b/doc/Documentation/articles/authorization.md index 375383364..c2b4e2020 100644 --- a/doc/Documentation/articles/authorization.md +++ b/doc/Documentation/articles/authorization.md @@ -8,9 +8,15 @@ JJMasterData uses 2 areas on your routes: - **DataDictionary** It's used to manage forms that only the admin should access; - **MasterData** Is used to render a form, you must check if user has access; +> [!IMPORTANT] +> You must create your own policies for *DataDictionary* and *MasterData* areas. + +> [!IMPORTANT] +> If a user has the claim DataDictionary, we will enable a button to edit the FormElement at /Render route. + Keep in mind that the end-user only access the MasterData Area.
-You can also inject your custom attributes or policy for routes using: +You can also inject your custom authorization requirements for routes using: ```cs app.UseAuthentication(); @@ -23,23 +29,15 @@ app.MapJJMasterData() If you are not familiarized with the concept of policies, please check this [link](https://learn.microsoft.com/en-us/aspnet/core/security/authorization/policies?view=aspnetcore-6.0). -You will need in your application, implement a **authentication** service, before implementing a **authorization** one. +You will need in your application, implement an **authentication** service, before implementing an **authorization** one. Please check [ASP.NET Core docs](https://learn.microsoft.com/en-us/aspnet/core/security/authentication/?view=aspnetcore-6.0) for more information.
-In the example bellow, I'm using a basic cookie authentication to simplify the process. -
-You can use any supported authentication service. -```cs -builder.Services.AddAuthentication(options => -{ - options.DefaultScheme = "SharedCookie"; -}).AddCookie("SharedCookie"); -``` +You can use any supported authentication service, like Microsoft Identity. -To apply your authorization rules on these policies, use the example bellow in your .NET 6 application Program.cs. +To apply your authorization rules on these policies, use the example bellow in your .NET application Program.cs. ```cs builder.Services.AddAuthorization(options => @@ -51,38 +49,27 @@ builder.Services.AddAuthorization(options => }); ``` -MasterDataPermissionRequirement class example: +In the example below, we create an `MasterDataPermissionRequirement` to see if a user has access to a specific element: ```csharp -using System.Security.Claims; -using Microsoft.AspNetCore.Authorization; - -namespace JJMasterData.WebExample.Authorization; - -public class MasterDataPermissionRequirement : AuthorizationHandler, IAuthorizationRequirement +public sealed class MasterDataPermissionRequirement : AuthorizationHandler, IAuthorizationRequirement { protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, IAuthorizationRequirement requirement) { - var filterContext = context.Resource as DefaultHttpContext; - var routeData = filterContext?.HttpContext.GetRouteData(); - - if (routeData == null) - { - context.Fail(); - return Task.CompletedTask; - } + var filterContext = (DefaultHttpContext)context.Resource!; + var routeData = filterContext.HttpContext.GetRouteData(); string? area = null; - if (routeData.Values.ContainsKey("area")) - area = routeData.Values["area"]!.ToString(); - - string? dictionaryName = null; - if (routeData.Values.ContainsKey("id")) - dictionaryName = routeData.Values["id"]!.ToString(); - + if (routeData.Values.TryGetValue("area", out var areaValue)) + area = areaValue!.ToString()?.ToLowerInvariant(); + + string? elementName = null; + if (routeData.Values.TryGetValue("elementName", out var elementNameValue)) + elementName = elementNameValue!.ToString(); + if ("MasterData".Equals(area, StringComparison.InvariantCultureIgnoreCase)) { - if (HasDictionaryAccess(dictionaryName, context.User)) + if (CanAccessElement(elementName, context.User)) { context.Succeed(requirement); return Task.CompletedTask; @@ -93,11 +80,10 @@ public class MasterDataPermissionRequirement : AuthorizationHandler - {IsUpdate} = 1 | 0 - {IsDelete} = 1 | 0 - {IsImport} = 1 | 0 -- {ComponentName} = Name of the component that triggered the AutoPostBack event +- {ComponentName} = Name of the component that the field resides +- {FieldName} = Name of the field that triggered the AutoPostBack event - {UserId} = Identifier of the authenticated user, can be recovered from UserValues, Session or Claims Dynamic values will be recovered in the following order: diff --git a/src/Commons/Commons.csproj b/src/Commons/Commons.csproj index 69178d882..5e7cc6dcb 100644 --- a/src/Commons/Commons.csproj +++ b/src/Commons/Commons.csproj @@ -26,7 +26,6 @@ - diff --git a/src/Commons/Configuration/MasterDataServiceBuilder.cs b/src/Commons/Configuration/MasterDataServiceBuilder.cs index b21c385c9..0b75b5cf1 100644 --- a/src/Commons/Configuration/MasterDataServiceBuilder.cs +++ b/src/Commons/Configuration/MasterDataServiceBuilder.cs @@ -1,6 +1,9 @@ using System; +using System.Collections.Generic; +using System.Linq; using JJMasterData.Commons.Configuration.Options; using JJMasterData.Commons.Data; +using JJMasterData.Commons.Data.Entity.Models; using JJMasterData.Commons.Data.Entity.Providers; using JJMasterData.Commons.Data.Entity.Repository.Abstractions; using JJMasterData.Commons.Tasks; @@ -33,7 +36,7 @@ public MasterDataServiceBuilder WithEntityProvider(string connectionString, Data Services.TryAddTransient(); WithEntityProvider(); break; - case DataAccessProvider.SqLite: + case DataAccessProvider.SQLite: WithEntityProvider(); break; case DataAccessProvider.Oracle: @@ -65,4 +68,13 @@ public MasterDataServiceBuilder WithEntityRepository( Services.Replace(ServiceDescriptor.Transient(implementationFactory)); return this; } + + public MasterDataServiceBuilder WithConnectionStrings(List connectionStrings) + { + Services.PostConfigure(options => + { + options.AdditionalConnectionStrings = connectionStrings; + }); + return this; + } } \ No newline at end of file diff --git a/src/Commons/Configuration/Options/ConnectionString.cs b/src/Commons/Configuration/Options/ConnectionString.cs new file mode 100644 index 000000000..f7f0346ad --- /dev/null +++ b/src/Commons/Configuration/Options/ConnectionString.cs @@ -0,0 +1,20 @@ +#nullable enable +using System; +using System.Diagnostics.CodeAnalysis; + +namespace JJMasterData.Commons.Configuration.Options; + +public class ConnectionString() +{ + [SetsRequiredMembers] + public ConnectionString(string connectionString, string connectionProvider) : this() + { + Connection = connectionString; + ConnectionProvider = connectionProvider; + } + + public Guid Guid { get; init; } = Guid.NewGuid(); + public required string? Name { get; init; } + public required string Connection { get; init; } + public required string ConnectionProvider { get; init; } +} \ No newline at end of file diff --git a/src/Commons/Configuration/Options/MasterDataCommonsOptions.cs b/src/Commons/Configuration/Options/MasterDataCommonsOptions.cs index 9c0395804..4e8223f5f 100644 --- a/src/Commons/Configuration/Options/MasterDataCommonsOptions.cs +++ b/src/Commons/Configuration/Options/MasterDataCommonsOptions.cs @@ -1,9 +1,13 @@ #nullable enable +using System; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using System.Linq; using System.Runtime.InteropServices; using JJMasterData.Commons.Data; using JJMasterData.Commons.Data.Entity.Models; +using JJMasterData.Commons.Exceptions; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; @@ -24,8 +28,9 @@ namespace JJMasterData.Commons.Configuration.Options; public sealed class MasterDataCommonsOptions { public string? ConnectionString { get; set; } - public DataAccessProvider ConnectionProvider { get; set; } + + public List AdditionalConnectionStrings { get; set; } = []; /// /// Default value: tb_masterdata_resources

@@ -54,6 +59,19 @@ public sealed class MasterDataCommonsOptions [JsonIgnore] public static bool IsNetFramework => RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework"); + public ConnectionString GetConnectionString(Guid? guid) + { + if (guid is null) + return new ConnectionString(ConnectionString!, ConnectionProvider.GetAdoNetTypeName()); + + var connectionString = AdditionalConnectionStrings.FirstOrDefault(c => c.Guid == guid); + + if (connectionString is null) + throw new JJMasterDataException($"ConnectionString {guid} does not exist."); + + return connectionString; + } + public string GetReadProcedureName(Element element) { if (!string.IsNullOrEmpty(element.ReadProcedureName)) @@ -76,24 +94,26 @@ public string GetWriteProcedureName(Element element) public string GetReadProcedureName(string tableName) { - var dicName = RemovePrefixChars(tableName); + var dicName = RemoveTbPrefix(tableName); return ReadProcedurePattern.Replace("{tablename}", dicName); } public string GetWriteProcedureName(string tableName) { - var dicName = RemovePrefixChars(tableName); + var dicName = RemoveTbPrefix(tableName); return WriteProcedurePattern.Replace("{tablename}", dicName); } - private static string RemovePrefixChars(string tableName) + public static string RemoveTbPrefix(string tableName) { - if (tableName.ToLower().StartsWith("tb_")) + var loweredTableName = tableName.ToLowerInvariant(); + + if (loweredTableName.StartsWith("tb_")) return tableName[3..]; - if (tableName.ToLower().StartsWith("tb")) + if (loweredTableName.StartsWith("tb")) return tableName[2..]; return tableName; diff --git a/src/Commons/Data/ConnectionResult.cs b/src/Commons/Data/ConnectionResult.cs new file mode 100644 index 000000000..e73f52eea --- /dev/null +++ b/src/Commons/Data/ConnectionResult.cs @@ -0,0 +1,9 @@ +#nullable enable + +namespace JJMasterData.Commons.Data; + +public class ConnectionResult(bool isConnectionSuccessful, string? errorMessage) +{ + public bool? IsConnectionSuccessful { get; } = isConnectionSuccessful; + public string? ErrorMessage { get; } = errorMessage; +} \ No newline at end of file diff --git a/src/Commons/Data/DataAccess.cs b/src/Commons/Data/DataAccess.cs index 300bec141..b7c90206d 100644 --- a/src/Commons/Data/DataAccess.cs +++ b/src/Commons/Data/DataAccess.cs @@ -67,7 +67,6 @@ public DbProviderFactory Factory /// ///Database Connection Provider; - ///Default value configured in app.config as "ConnectionString"; /// ///Provider Name /// @@ -85,19 +84,11 @@ public DbProviderFactory Factory /// See also . ///
/// Conections string with data source, user etc... - /// Provider name. Avaliable provider see - public DataAccess(string connectionString, string connectionProviderName) + /// Provider name. For avaliable providers see + public DataAccess(string connectionString, string connectionProviderType) { ConnectionString = connectionString; - - if (Enum.TryParse(connectionProviderName, out var provider)) - { - ConnectionProvider = provider; - } - else - { - throw new DataAccessProviderException("Invalid DataAccess provider."); - } + ConnectionProvider = DataAccessProviderHelper.GetDataAccessProviderFromString(connectionProviderType); } public DataAccess(string connectionString, DataAccessProvider dataAccessProvider) @@ -114,7 +105,6 @@ public DataAccess(IOptionsSnapshot options) ConnectionProvider = optionsValue.ConnectionProvider; } - public DbConnection GetConnection() { var connection = Factory.CreateConnection(); @@ -133,25 +123,44 @@ public DbConnection GetConnection() } /// - /// Returns a DataTable object populated from a sql. + /// Returns a DataTable object populated by a SQL string. Use a if you need parameters. /// - /// - /// Returns a DataTable object populated by a query with parameters - /// public DataTable GetDataTable(string sql) { return GetDataTable(new DataAccessCommand(sql)); } /// - /// Returns a DataTable object populated from a sql command. + /// Returns a DataTable object populated by a . /// - /// - /// Returns a DataTable object populated by a with parameters - /// public DataTable GetDataTable(DataAccessCommand cmd) { - var dt = new DataTable(); + var dataTable = new DataTable(); + ExecuteDataCommand(cmd, dataAdapter => dataAdapter.Fill(dataTable)); + return dataTable; + } + + + /// + /// Returns a DataSet object populated by a SQL string. Use a if you need parameters. + /// + public DataSet GetDataSet(string sql) + { + return GetDataSet(new DataAccessCommand(sql)); + } + + /// + /// Returns a DataSet object populated by a . + /// + public DataSet GetDataSet(DataAccessCommand cmd) + { + var dataSet = new DataSet(); + ExecuteDataCommand(cmd, dataAdapter => dataAdapter.Fill(dataSet)); + return dataSet; + } + + private void ExecuteDataCommand(DataAccessCommand cmd, Action fillAction) + { try { using var dbCommand = CreateDbCommand(cmd); @@ -161,25 +170,21 @@ public DataTable GetDataTable(DataAccessCommand cmd) { using var dataAdapter = Factory.CreateDataAdapter(); dataAdapter!.SelectCommand = dbCommand; - dataAdapter.Fill(dt); - + fillAction(dataAdapter); + foreach (var parameter in cmd.Parameters) { if (parameter.Direction is ParameterDirection.Output or ParameterDirection.InputOutput) parameter.Value = dbCommand.Parameters[parameter.Name].Value; } - } } catch (Exception ex) { throw GetDataAccessException(ex, cmd); } - - - return dt; } - + /// /// Returns a DataTable object populated from a sql. /// diff --git a/src/Commons/Data/DataAccessAsync.cs b/src/Commons/Data/DataAccessAsync.cs index d9e891897..7c7bd7589 100644 --- a/src/Commons/Data/DataAccessAsync.cs +++ b/src/Commons/Data/DataAccessAsync.cs @@ -8,6 +8,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; +using JJMasterData.Commons.Data.Entity.Models; using JJMasterData.Commons.Exceptions; namespace JJMasterData.Commons.Data; @@ -38,30 +39,21 @@ public Task GetDataTableAsync(string sql, CancellationToken cancellat } /// - public async Task GetDataTableAsync(DataAccessCommand cmd, CancellationToken cancellationToken = default) + public async Task GetDataTableAsync(DataAccessCommand command, CancellationToken cancellationToken = default) { try { -#if NET - await -#endif - using var dbCommand = CreateDbCommand(cmd); + using var dbCommand = CreateDbCommand(command); dbCommand.Connection = await GetConnectionAsync(cancellationToken); - -#if NET - await -#endif + using (dbCommand.Connection) { -#if NET - await -#endif using (var reader = await dbCommand.ExecuteReaderAsync(cancellationToken)) { var dataTable = new DataTable(); dataTable.Load(reader); - foreach (var parameter in cmd.Parameters) + foreach (var parameter in command.Parameters) { if (parameter.Direction is ParameterDirection.Output or ParameterDirection.InputOutput) parameter.Value = dbCommand.Parameters[parameter.Name].Value; @@ -73,10 +65,56 @@ public async Task GetDataTableAsync(DataAccessCommand cmd, Cancellati } catch (Exception ex) { - throw GetDataAccessException(ex, cmd); + throw GetDataAccessException(ex, command); } } + /// + public Task GetDataSetAsync(string sql) + { + return GetDataSetAsync(new DataAccessCommand(sql)); + } + + /// + public async Task GetDataSetAsync(DataAccessCommand command, CancellationToken cancellationToken = default) + { + try + { + using var dbCommand = CreateDbCommand(command); + dbCommand.Connection = await GetConnectionAsync(cancellationToken); + + using (dbCommand.Connection) + { + using (var reader = await dbCommand.ExecuteReaderAsync( cancellationToken)) + { + var dataSet = new DataSet(); + + var index = 1; + do + { + var dataTable = new DataTable(); + dataTable.TableName = $"Result {index}"; + dataTable.Load(reader); + dataSet.Tables.Add(dataTable); + index++; + } while(!reader.IsClosed); + + foreach (var parameter in command.Parameters) + { + if (parameter.Direction is ParameterDirection.Output or ParameterDirection.InputOutput) + parameter.Value = dbCommand.Parameters[parameter.Name].Value; + } + + return dataSet; + } + } + } + catch (Exception ex) + { + throw GetDataAccessException(ex, command); + } + } + /// public Task GetResultAsync(string sql, CancellationToken cancellationToken = default) { @@ -342,7 +380,7 @@ public async Task TableExistsAsync(string tableName, CancellationToken can } /// - public async Task<(bool, string?)> TryConnectionAsync(CancellationToken cancellationToken = default) + public async Task TryConnectionAsync(CancellationToken cancellationToken = default) { bool result; DbConnection? connection = null; @@ -359,7 +397,7 @@ public async Task TableExistsAsync(string tableName, CancellationToken can result = false; var error = new StringBuilder(); error.AppendLine(ex.Message); - if (ex.InnerException is { Message: { } }) + if (ex.InnerException is { Message: not null }) error.Append(ex.InnerException.Message); errorMessage = error.ToString(); @@ -381,7 +419,7 @@ public async Task TableExistsAsync(string tableName, CancellationToken can } } - return (result, errorMessage); + return new(result, errorMessage); } diff --git a/src/Commons/Data/DataAccessCommand.cs b/src/Commons/Data/DataAccessCommand.cs index 0d7073e2d..808447641 100644 --- a/src/Commons/Data/DataAccessCommand.cs +++ b/src/Commons/Data/DataAccessCommand.cs @@ -5,8 +5,6 @@ using System.ComponentModel.DataAnnotations; using System.Data; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Linq; using Newtonsoft.Json; namespace JJMasterData.Commons.Data; @@ -31,16 +29,14 @@ public CommandType CmdType [JsonProperty("parameters")] public List Parameters { get; private set; } - - [SetsRequiredMembers] + public DataAccessCommand() { Sql = string.Empty; Type = CommandType.Text; Parameters = []; } - - [SetsRequiredMembers] + public DataAccessCommand(string sql) : this() { Sql = sql; diff --git a/src/Commons/Data/DataAccessProvider.cs b/src/Commons/Data/DataAccessProvider.cs index ba019ce91..2ea20ec11 100644 --- a/src/Commons/Data/DataAccessProvider.cs +++ b/src/Commons/Data/DataAccessProvider.cs @@ -1,19 +1,11 @@ -using System.ComponentModel; - namespace JJMasterData.Commons.Data; public enum DataAccessProvider { - [Description("Microsoft.Data.SqlClient")] SqlServer, - [Description("System.Data.SQLite")] - SqLite, - [Description("Oracle.ManagedDataAccess.Client")] + SQLite, Oracle, - [Description("Oracle.ManagedDataAccess.Core.Client")] OracleNetCore, - [Description("MySql.Data.MySqlClient.MySqlClientFactory")] MySql, - [Description("Npgsql.NpgsqlFactory")] PostgreSql -} +} \ No newline at end of file diff --git a/src/Commons/Data/DataAccessProviderFactory.cs b/src/Commons/Data/DataAccessProviderFactory.cs index 7d1d5bb7a..359b06dbb 100644 --- a/src/Commons/Data/DataAccessProviderFactory.cs +++ b/src/Commons/Data/DataAccessProviderFactory.cs @@ -10,7 +10,7 @@ namespace JJMasterData.Commons.Data; public static class DataAccessProviderFactory { - public static DataAccessProvider GetDataAccessProviderFromString(string description) + private static DataAccessProvider GetDataAccessProviderFromString(string description) { foreach(var field in typeof(DataAccessProvider).GetFields()) { @@ -29,7 +29,8 @@ public static DataAccessProvider GetDataAccessProviderFromString(string descript return default; } - public static DbProviderFactory GetDbProviderFactory(string dbProviderFactoryTypename, string assemblyName) + + private static DbProviderFactory GetDbProviderFactory(string dbProviderFactoryTypename, string assemblyName) { var instance = ReflectionUtils.GetStaticProperty(dbProviderFactoryTypename, "Instance"); if (instance == null) @@ -53,14 +54,14 @@ public static DbProviderFactory GetDbProviderFactory(DataAccessProvider type) case DataAccessProvider.SqlServer: return SqlClientFactory.Instance; // this library has a ref to SqlClient so this works case DataAccessProvider.Oracle: - return GetDbProviderFactory(type.GetDescription(), "Oracle.ManagedDataAccess"); + return GetDbProviderFactory(type.GetAdoNetTypeName(), "Oracle.ManagedDataAccess"); case DataAccessProvider.OracleNetCore: - return GetDbProviderFactory(type.GetDescription(), "Oracle.ManagedDataAccess.Core"); - case DataAccessProvider.SqLite: + return GetDbProviderFactory(type.GetAdoNetTypeName(), "Oracle.ManagedDataAccess.Core"); + case DataAccessProvider.SQLite: case DataAccessProvider.MySql: - return GetDbProviderFactory(type.GetDescription(), "MySql.Data"); + return GetDbProviderFactory(type.GetAdoNetTypeName(), "MySql.Data"); case DataAccessProvider.PostgreSql: - return GetDbProviderFactory(type.GetDescription(), "Npgsql"); + return GetDbProviderFactory(type.GetAdoNetTypeName(), "Npgsql"); default: throw new NotSupportedException($"Not supported {type}"); } diff --git a/src/Commons/Data/DataAccessProviderHelper.cs b/src/Commons/Data/DataAccessProviderHelper.cs new file mode 100644 index 000000000..716fcf602 --- /dev/null +++ b/src/Commons/Data/DataAccessProviderHelper.cs @@ -0,0 +1,41 @@ +using System; +using JJMasterData.Commons.Exceptions; + +namespace JJMasterData.Commons.Data; + +public static class DataAccessProviderHelper +{ + public static string GetAdoNetTypeName(this DataAccessProvider provider) + { + return provider switch + { + DataAccessProvider.SqlServer => "Microsoft.Data.SqlClient", + DataAccessProvider.SQLite => "System.Data.SQLite", + DataAccessProvider.Oracle => "Oracle.ManagedDataAccess.Client", + DataAccessProvider.OracleNetCore => "Oracle.ManagedDataAccess.Core.Client", + DataAccessProvider.MySql => "MySql.Data.MySqlClient.MySqlClientFactory", + DataAccessProvider.PostgreSql => "Npgsql.NpgsqlFactory", + _ => throw new ArgumentOutOfRangeException(nameof(provider), provider, null) + }; + } + + public static DataAccessProvider GetDataAccessProviderFromString(string providerType) + { + return providerType switch + { + "SqlServer" => DataAccessProvider.SqlServer, + "Microsoft.Data.SqlClient" => DataAccessProvider.SqlServer, + "SQLite" => DataAccessProvider.SQLite, + "System.Data.SQLite" => DataAccessProvider.SQLite, + "Oracle" => DataAccessProvider.Oracle, + "Oracle.ManagedDataAccess.Client" => DataAccessProvider.Oracle, + "OracleNetCore" => DataAccessProvider.OracleNetCore, + "Oracle.ManagedDataAccess.Core.Client" => DataAccessProvider.OracleNetCore, + "MySql" => DataAccessProvider.MySql, + "MySql.Data.MySqlClient.MySqlClientFactory" => DataAccessProvider.MySql, + "PostgreSql" => DataAccessProvider.PostgreSql, + "Npgsql.NpgsqlFactory" => DataAccessProvider.PostgreSql, + _ => throw new DataAccessProviderException("Unknown data access provider name.") + }; + } +} \ No newline at end of file diff --git a/src/Commons/Data/Entity/Models/Element.cs b/src/Commons/Data/Entity/Models/Element.cs index 5bf7fba8d..9a83a5078 100644 --- a/src/Commons/Data/Entity/Models/Element.cs +++ b/src/Commons/Data/Entity/Models/Element.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Diagnostics; using System.Linq; @@ -65,6 +66,13 @@ public class Element() [JsonProperty("mode")] public SynchronismMode SynchronismMode { get; set; } = SynchronismMode.Online; + /// + /// Custom connection string. If null, will use the default JJMasterData:ConnectionString from IConfiguration. + /// + [Display(Name = "Connection String")] + [JsonProperty("connectionId")] + public Guid? ConnectionId { get; set; } + public Element(string name) : this() { Name = name; diff --git a/src/Commons/Data/Entity/Providers/EntityProviderBase.cs b/src/Commons/Data/Entity/Providers/EntityProviderBase.cs index 2ebc542de..3d0f67fbc 100644 --- a/src/Commons/Data/Entity/Providers/EntityProviderBase.cs +++ b/src/Commons/Data/Entity/Providers/EntityProviderBase.cs @@ -16,11 +16,9 @@ namespace JJMasterData.Commons.Data.Entity.Providers; public abstract class EntityProviderBase( - DataAccess dataAccess, IOptionsSnapshot options, ILoggerFactory loggerFactory) { - internal DataAccess DataAccess { get; set; } = dataAccess; protected MasterDataCommonsOptions Options { get; } = options.Value; private ILoggerFactory LoggerFactory { get; } = loggerFactory; @@ -29,7 +27,7 @@ public abstract class EntityProviderBase( public abstract string? GetWriteProcedureScript(Element element); public abstract string? GetReadProcedureScript(Element element); public abstract string GetAlterTableScript(Element element, IEnumerable addedFields); - public abstract Task GetElementFromTableAsync(string tableName); + public abstract Task GetElementFromTableAsync(string tableName, Guid? connectionId = null); public abstract DataAccessCommand GetInsertCommand(Element element, Dictionary values); public abstract DataAccessCommand GetUpdateCommand(Element element, Dictionary values); public abstract DataAccessCommand GetDeleteCommand(Element element, Dictionary primaryKeys); @@ -39,7 +37,8 @@ public abstract class EntityProviderBase( public async Task InsertAsync(Element element, Dictionary values) { var command = GetInsertCommand(element, values); - var newFields = await DataAccess.GetDictionaryAsync(command); + var dataAccess = GetDataAccess(element.ConnectionId); + var newFields = await dataAccess.GetDictionaryAsync(command); foreach (var entry in newFields.Where(entry => element.Fields.ContainsKey(entry.Key))) { @@ -49,8 +48,9 @@ public async Task InsertAsync(Element element, Dictionary values public void Insert(Element element, Dictionary values) { + var dataAccess = GetDataAccess(element.ConnectionId); var command = GetInsertCommand(element, values); - var newFields = DataAccess.GetDictionary(command) ?? new Dictionary(); + var newFields = dataAccess.GetDictionary(command) ?? new Dictionary(); foreach (var entry in newFields.Where(entry => element.Fields.ContainsKey(entry.Key))) { @@ -60,32 +60,36 @@ public void Insert(Element element, Dictionary values) public int Update(Element element, Dictionary values) { + var dataAccess = GetDataAccess(element.ConnectionId); var cmd = GetUpdateCommand(element, values); - int numberRowsAffected = DataAccess.SetCommand(cmd); + int numberRowsAffected = dataAccess.SetCommand(cmd); return numberRowsAffected; } public async Task UpdateAsync(Element element, Dictionary values) { + var dataAccess = GetDataAccess(element.ConnectionId); var cmd = GetUpdateCommand(element, values); - int numberRowsAffected = await DataAccess.SetCommandAsync(cmd); + int numberRowsAffected = await dataAccess.SetCommandAsync(cmd); return numberRowsAffected; } public async Task SetValuesAsync(Element element, Dictionary values) { + var dataAccess = GetDataAccess(element.ConnectionId); const CommandOperation commandType = CommandOperation.None; var command = GetInsertOrReplaceCommand(element, values); - var newFields = await DataAccess.GetDictionaryAsync(command); + var newFields = await dataAccess.GetDictionaryAsync(command); return GetCommandOperation(element, values, command, commandType, newFields); } public CommandOperation SetValues(Element element, Dictionary values, bool ignoreResults) { + var dataAccess = GetDataAccess(element.ConnectionId); const CommandOperation commandType = CommandOperation.None; var command = GetInsertOrReplaceCommand(element, values); - var newFields = DataAccess.GetDictionary(command); + var newFields = dataAccess.GetDictionary(command); return GetCommandOperation(element, values, command, commandType, newFields); } @@ -130,15 +134,17 @@ public Task SetValuesAsync(Element element, Dictionary primaryKeys) { + var dataAccess = GetDataAccess(element.ConnectionId); var cmd = GetDeleteCommand(element, primaryKeys); - int numberRowsAffected = DataAccess.SetCommand(cmd); + int numberRowsAffected = dataAccess.SetCommand(cmd); return numberRowsAffected; } public async Task DeleteAsync(Element element, Dictionary primaryKeys) { + var dataAccess = GetDataAccess(element.ConnectionId); var cmd = GetDeleteCommand(element, primaryKeys); - int numberRowsAffected = await DataAccess.SetCommandAsync(cmd); + int numberRowsAffected = await dataAccess.SetCommandAsync(cmd); return numberRowsAffected; } @@ -157,9 +163,11 @@ public async Task GetDictionaryListAsync( var totalParameter = new DataAccessParameter($"{VariablePrefix}qtdtotal", recoverTotalOfRecords ? 0 : -1, DbType.Int32, 0, ParameterDirection.InputOutput); + var dataAccess = GetDataAccess(element.ConnectionId); + var command = GetReadCommand(element, entityParameters, totalParameter); - var list = await DataAccess.GetDictionaryListAsync(command); + var list = await dataAccess.GetDictionaryListAsync(command); int totalRecords = 0; @@ -171,14 +179,16 @@ public async Task GetDictionaryListAsync( public void CreateDataModel(Element element, List? relationships = null) { + var dataAccess = GetDataAccess(element.ConnectionId); var sqlScripts = GetDataModelScripts(element, relationships); - DataAccess.ExecuteBatch(sqlScripts); + dataAccess.ExecuteBatch(sqlScripts); } public async Task CreateDataModelAsync(Element element, List? relationships = null) { + var dataAccess = GetDataAccess(element.ConnectionId); var sqlScripts = GetDataModelScripts(element, relationships); - await DataAccess.ExecuteBatchAsync(sqlScripts); + await dataAccess.ExecuteBatchAsync(sqlScripts); } private string GetDataModelScripts(Element element, List? relationships = null) @@ -244,9 +254,10 @@ private static bool ValidateOrderByClause(Element element, string? orderBy) private async Task SetValuesNoResultAsync(Element element, Dictionary values) { + var dataAccess = GetDataAccess(element.ConnectionId); const CommandOperation result = CommandOperation.None; var command = GetInsertOrReplaceCommand(element, values); - await DataAccess.SetCommandAsync(command); + await dataAccess.SetCommandAsync(command); return GetCommandFromValuesNoResult(element, command, result); } @@ -284,8 +295,10 @@ public DictionaryListResult GetDictionaryList( var totalParameter = new DataAccessParameter($"{VariablePrefix}qtdtotal", recoverTotalOfRecords ? 0 : -1, DbType.Int32, 0, ParameterDirection.InputOutput); var command = GetReadCommand(element, entityParameters, totalParameter); + + var dataAccess = GetDataAccess(element.ConnectionId); - var list = DataAccess.GetDictionaryList(command); + var list = dataAccess.GetDictionaryList(command); int totalRecords = 0; @@ -294,4 +307,10 @@ public DictionaryListResult GetDictionaryList( return new DictionaryListResult(list, totalRecords); } + + internal DataAccess GetDataAccess(Guid? connectionId) + { + var connection = Options.GetConnectionString(connectionId); + return new DataAccess(connection.Connection, connection.ConnectionProvider); + } } diff --git a/src/Commons/Data/Entity/Providers/OracleProvider.cs b/src/Commons/Data/Entity/Providers/OracleProvider.cs index b6c6891f9..19c6715e4 100644 --- a/src/Commons/Data/Entity/Providers/OracleProvider.cs +++ b/src/Commons/Data/Entity/Providers/OracleProvider.cs @@ -14,10 +14,9 @@ namespace JJMasterData.Commons.Data.Entity.Providers; public class OracleProvider( - DataAccess dataAccess, IOptionsSnapshot options, ILoggerFactory loggerFactory) - : EntityProviderBase(dataAccess, options, loggerFactory) + : EntityProviderBase(options, loggerFactory) { private const string InsertKeyword = "I"; private const string UpdateKeyword = "A"; @@ -1024,10 +1023,8 @@ private bool HasUpdateFields(Element element) } return ret; } - - - public override Task GetElementFromTableAsync(string tableName) + public override Task GetElementFromTableAsync(string tableName, Guid? connectionId = null) { throw new NotImplementedException(); } diff --git a/src/Commons/Data/Entity/Providers/PlainTextReader.cs b/src/Commons/Data/Entity/Providers/PlainTextReader.cs index 276f6f090..c6827e46e 100644 --- a/src/Commons/Data/Entity/Providers/PlainTextReader.cs +++ b/src/Commons/Data/Entity/Providers/PlainTextReader.cs @@ -19,14 +19,13 @@ public class PlainTextReader(EntityProviderBase provider, ILogger Logger { get; } = logger; public bool ShowLogInfo { get; init; } public string Delimiter { get; init; } = "|"; - - + public async Task GetFieldsListAsTextAsync(Element element, EntityParameters entityParameters) { var sRet = new StringBuilder(); var dStart = DateTime.Now; var culture = CultureInfo.CreateSpecificCulture("en-US"); - var dataAccess = provider.DataAccess; + var dataAccess = provider.GetDataAccess(element.ConnectionId); string currentField = null; DbConnection conn = null; diff --git a/src/Commons/Data/Entity/Providers/SQLiteProvider.cs b/src/Commons/Data/Entity/Providers/SQLiteProvider.cs index 4d4dd8be7..8b739abef 100644 --- a/src/Commons/Data/Entity/Providers/SQLiteProvider.cs +++ b/src/Commons/Data/Entity/Providers/SQLiteProvider.cs @@ -14,10 +14,9 @@ namespace JJMasterData.Commons.Data.Entity.Providers; public class SQLiteProvider( - DataAccess dataAccess, IOptionsSnapshot options, ILoggerFactory loggerFactory) - : EntityProviderBase(dataAccess, options, loggerFactory) + : EntityProviderBase(options, loggerFactory) { private const string Tab = "\t"; public override string VariablePrefix => "@"; @@ -249,7 +248,7 @@ public override string GetReadProcedureScript(Element element) return string.Empty; } - public override Task GetElementFromTableAsync(string tableName) + public override Task GetElementFromTableAsync(string tableName, Guid? connectionId = null) { throw new NotImplementedException(); } diff --git a/src/Commons/Data/Entity/Providers/SqlServer/SqlServerInfo.cs b/src/Commons/Data/Entity/Providers/SqlServer/SqlServerInfo.cs index a401839a0..e9924832c 100644 --- a/src/Commons/Data/Entity/Providers/SqlServer/SqlServerInfo.cs +++ b/src/Commons/Data/Entity/Providers/SqlServer/SqlServerInfo.cs @@ -1,18 +1,28 @@ -namespace JJMasterData.Commons.Data.Entity.Providers; +using System; +using JJMasterData.Commons.Configuration.Options; +using Microsoft.Extensions.Options; -public class SqlServerInfo(DataAccess dataAccess) +namespace JJMasterData.Commons.Data.Entity.Providers; + +public class SqlServerInfo(IOptionsSnapshot commonsOptions) { private static int _majorVersion; private static int _compatibilityLevel; - public int GetMajorVersion() + private DataAccess GetDataAccess(Guid? connectionId) + { + var connection = commonsOptions.Value.GetConnectionString(connectionId); + return new DataAccess(connection.Connection, connection.ConnectionProvider); + } + + public int GetMajorVersion(Guid? connectionId) { if (_majorVersion > 0) return _majorVersion; try { - var ret = dataAccess.GetResult("SELECT SERVERPROPERTY('productversion')"); + var ret = GetDataAccess(connectionId).GetResult("SELECT SERVERPROPERTY('productversion')"); var version = ret!.ToString().Split('.')[0]; _majorVersion = int.Parse(version); } @@ -24,14 +34,14 @@ public int GetMajorVersion() return _majorVersion; } - public int GetCompatibilityLevel() + public int GetCompatibilityLevel(Guid? connectionId) { if (_compatibilityLevel > 0) return _compatibilityLevel; try { - var ret = dataAccess.GetResult("select compatibility_level from sys.databases where name = DB_NAME()"); + var ret = GetDataAccess(connectionId).GetResult("select compatibility_level from sys.databases where name = DB_NAME()"); _compatibilityLevel = int.Parse(ret!.ToString()); } catch diff --git a/src/Commons/Data/Entity/Providers/SqlServer/SqlServerProvider.cs b/src/Commons/Data/Entity/Providers/SqlServer/SqlServerProvider.cs index 4307fe456..8b727b7ac 100644 --- a/src/Commons/Data/Entity/Providers/SqlServer/SqlServerProvider.cs +++ b/src/Commons/Data/Entity/Providers/SqlServer/SqlServerProvider.cs @@ -17,12 +17,11 @@ namespace JJMasterData.Commons.Data.Entity.Providers; public class SqlServerProvider( - DataAccess dataAccess, SqlServerScripts sqlServerScripts, IMemoryCache memoryCache, IOptionsSnapshot options, ILoggerFactory loggerFactory) - : EntityProviderBase(dataAccess, options, loggerFactory) + : EntityProviderBase(options, loggerFactory) { private readonly TimeSpan _cacheExpiration = new (4, 0, 0); private SqlServerScripts SqlServerScripts { get; } = sqlServerScripts; @@ -323,18 +322,21 @@ private static FieldType GetDataType(string databaseType) return databaseType.Equals("ntext") ? FieldType.NText : FieldType.NVarchar; } - public override async Task GetElementFromTableAsync(string tableName) + public override async Task GetElementFromTableAsync(string tableName, Guid? connectionId = null) { + var dataAccess = GetDataAccess(connectionId); + if (string.IsNullOrEmpty(tableName)) throw new ArgumentNullException(nameof(tableName)); - if (!await DataAccess.TableExistsAsync(tableName)) + if (!await dataAccess.TableExistsAsync(tableName)) throw new JJMasterDataException($"Table {tableName} not found"); var element = new Element { Name = tableName, - TableName = tableName + TableName = tableName, + ConnectionId = connectionId }; var cmdFields = new DataAccessCommand @@ -343,8 +345,8 @@ public override async Task GetElementFromTableAsync(string tableName) Sql = "sp_columns" }; cmdFields.Parameters.Add(new DataAccessParameter("@table_name", tableName)); - - var dtFields = await DataAccess.GetDataTableAsync(cmdFields); + + var dtFields = await dataAccess.GetDataTableAsync(cmdFields); if (dtFields.Rows.Count == 0) throw new JJMasterDataException($"Table {tableName} has invalid structure"); @@ -371,7 +373,7 @@ public override async Task GetElementFromTableAsync(string tableName) }; cmdPks.Parameters.Add(new DataAccessParameter("@table_name", tableName)); - var primaryKeys = await DataAccess.GetDictionaryListAsync(cmdPks); + var primaryKeys = await dataAccess.GetDictionaryListAsync(cmdPks); foreach (var row in primaryKeys) { element.Fields[row["COLUMN_NAME"]?.ToString()].IsPk = true; diff --git a/src/Commons/Data/Entity/Providers/SqlServer/SqlServerReadProcedureScripts.cs b/src/Commons/Data/Entity/Providers/SqlServer/SqlServerReadProcedureScripts.cs index a840927a2..449bfa163 100644 --- a/src/Commons/Data/Entity/Providers/SqlServer/SqlServerReadProcedureScripts.cs +++ b/src/Commons/Data/Entity/Providers/SqlServer/SqlServerReadProcedureScripts.cs @@ -31,7 +31,7 @@ public string GetReadProcedureScript(Element element) var sql = new StringBuilder(); string procedureFinalName = Options.GetReadProcedureName(element); - if (SqlServerInfo.GetCompatibilityLevel() >= 130) + if (SqlServerInfo.GetCompatibilityLevel(element.ConnectionId) >= 130) { sql.Append("CREATE OR ALTER PROCEDURE ["); } @@ -190,10 +190,10 @@ internal string GetReadScript(Element element, List fields) sql.Append($" LIKE ''%'' + @{field.Name} + ''%'' '"); break; case FilterMode.MultValuesContain: - sql.Append(GetFilterMultValuesContains(field.Name)); + sql.Append(GetFilterMultValuesContains(element, field.Name)); break; case FilterMode.MultValuesEqual: - sql.Append(GetMultValuesEquals(field)); + sql.Append(GetMultValuesEquals(element, field)); break; default: { @@ -331,10 +331,10 @@ internal string GetReadScript(Element element, List fields) return sql.ToString(); } - private string GetMultValuesEquals(ElementField field) + private string GetMultValuesEquals(Element element, ElementField field) { var sql = new StringBuilder(); - if (SqlServerInfo.GetCompatibilityLevel() < 130) + if (SqlServerInfo.GetCompatibilityLevel(element.ConnectionId) < 130) { sql.AppendLine(""); sql.Append(Tab); @@ -499,7 +499,7 @@ private static string GetParameters(List fields, bool addMasterDat return sql.ToString(); } - private string GetFilterMultValuesContains(string fieldName) + private string GetFilterMultValuesContains(Element element, string fieldName) { var sql = new StringBuilder(); sql.AppendLine(); @@ -511,7 +511,7 @@ private string GetFilterMultValuesContains(string fieldName) sql.AppendLine("BEGIN"); - if (SqlServerInfo.GetCompatibilityLevel() >= 130) + if (SqlServerInfo.GetCompatibilityLevel(element.ConnectionId) >= 130) { sql.Append(Tab, 2); sql.Append("SET @sqlWhere = @sqlWhere + ' AND "); diff --git a/src/Commons/Data/Entity/Providers/SqlServer/SqlServerWriteProcedureScripts.cs b/src/Commons/Data/Entity/Providers/SqlServer/SqlServerWriteProcedureScripts.cs index 02af8aed8..1fc942354 100644 --- a/src/Commons/Data/Entity/Providers/SqlServer/SqlServerWriteProcedureScripts.cs +++ b/src/Commons/Data/Entity/Providers/SqlServer/SqlServerWriteProcedureScripts.cs @@ -30,7 +30,7 @@ public string GetWriteProcedureScript(Element element) var sql = new StringBuilder(); string procedureFinalName = Options.GetWriteProcedureName(element); - if (SqlServerInfo.GetCompatibilityLevel() >= 130) + if (SqlServerInfo.GetCompatibilityLevel(element.ConnectionId) >= 130) { sql.Append("CREATE OR ALTER PROCEDURE ["); } diff --git a/src/Commons/Data/Entity/Repository/Abstractions/IEntityRepository.cs b/src/Commons/Data/Entity/Repository/Abstractions/IEntityRepository.cs index 5286fd7c1..2bd4d0294 100644 --- a/src/Commons/Data/Entity/Repository/Abstractions/IEntityRepository.cs +++ b/src/Commons/Data/Entity/Repository/Abstractions/IEntityRepository.cs @@ -1,7 +1,9 @@ #nullable enable +using System; using System.Collections.Generic; using System.Data; +using System.Threading; using System.Threading.Tasks; using JJMasterData.Commons.Data.Entity.Models; @@ -101,50 +103,12 @@ public Task GetListFieldsAsTextAsync( public string? GetWriteProcedureScript(Element element); public Task GetAlterTableScriptAsync(Element element); - - /// - /// Build a element from a existing table - /// - public Task GetElementFromTableAsync(string tableName); - - /// - /// Returns a single sql command value with parameters - /// - /// - /// It's used to return sql expressions commands - /// - public Task GetResultAsync(DataAccessCommand command); - - /// - /// Check if table exists in the database - /// - public Task TableExistsAsync(string tableName); - - /// - /// Execute the command in the database. - /// - /// - /// It's used to run scripts from data dictionary at importation files - /// - public Task SetCommandAsync(DataAccessCommand command); - - /// - /// SetCommand(IEnumerable) - /// - public Task SetCommandListAsync(IEnumerable commandList); - - public Task ExecuteBatchAsync(string script); - Dictionary GetFields(Element element, Dictionary primaryKeys); - Dictionary GetFields(DataAccessCommand command); - - Task> GetFieldsAsync(DataAccessCommand command); + Task> GetFieldsAsync(Element element, Dictionary primaryKeys); - Task>> GetDictionaryListAsync(DataAccessCommand command); - /// /// Returns records from the database based on the filter. /// @@ -155,12 +119,12 @@ Task GetDictionaryListResultAsync( Element element, EntityParameters? parameters = null, bool recoverTotalOfRecords = true); - DictionaryListResult GetDictionaryListResult( Element element, EntityParameters? parameters = null, - bool recoverTotalOfRecords = true); + bool recoverTotalOfRecords = true + ); List> GetDictionaryList( Element element, @@ -171,14 +135,55 @@ DictionaryListResult GetDictionaryListResult( Element element, EntityParameters? parameters = null ); - - DataTable GetDataTable(DataAccessCommand dataAccessCommand); - - Task GetDataTableAsync(DataAccessCommand dataAccessCommand); - Task GetDataTableAsync(Element element, EntityParameters? entityParameters = null); int GetCount(Element element, Dictionary filters); Task GetCountAsync(Element element, Dictionary filters); - bool TableExists(string tableName); + + + + /// + /// Build a element from a existing table + /// + public Task GetElementFromTableAsync(string tableName, Guid? connectionId = null); + + + /// + /// Check if table exists in the database + /// + public Task TableExistsAsync(string tableName, Guid? connectionId = null); + + /// + /// Returns a single sql command value with parameters + /// + /// + /// It's used to return sql expressions commands + /// + public Task GetResultAsync(DataAccessCommand command, Guid? connectionId = null); + + /// + /// Execute the command in the database. + /// + /// + /// It's used to run scripts from data dictionary at importation files + /// + public Task SetCommandAsync(DataAccessCommand command, Guid? connectionId = null); + + /// + /// SetCommand(IEnumerable) + /// + public Task SetCommandListAsync(IEnumerable commandList, Guid? connectionId = null); + + public Task ExecuteBatchAsync(string script, Guid? connectionId = null); + + Dictionary GetFields(DataAccessCommand command, Guid? connectionId = null); + Task> GetFieldsAsync(DataAccessCommand command, Guid? connectionId = null); + Task>> GetDictionaryListAsync(DataAccessCommand command, Guid? connectionId = null); + DataTable GetDataTable(DataAccessCommand dataAccessCommand, Guid? connectionId = null); + Task GetDataTableAsync(DataAccessCommand dataAccessCommand, Guid? connectionId = null); + bool TableExists(string tableName, Guid? connectionId = null); + + DataSet GetDataSet(DataAccessCommand command, Guid? connectionId = null); + + Task GetDataSetAsync(DataAccessCommand command, Guid? connectionId = null, CancellationToken cancellationToken = default); } \ No newline at end of file diff --git a/src/Commons/Data/Entity/Repository/EntityRepository.cs b/src/Commons/Data/Entity/Repository/EntityRepository.cs index 218bb6fa5..1d57dd4c0 100644 --- a/src/Commons/Data/Entity/Repository/EntityRepository.cs +++ b/src/Commons/Data/Entity/Repository/EntityRepository.cs @@ -4,17 +4,23 @@ using System.Collections.Generic; using System.Data; using System.Linq; +using System.Threading; using System.Threading.Tasks; +using JJMasterData.Commons.Configuration.Options; using JJMasterData.Commons.Data.Entity.Models; using JJMasterData.Commons.Data.Entity.Providers; using JJMasterData.Commons.Data.Entity.Repository.Abstractions; +using Microsoft.Extensions.Options; namespace JJMasterData.Commons.Data.Entity.Repository; -public class EntityRepository(DataAccess dataAccess, EntityProviderBase provider) +public class EntityRepository( + IOptionsSnapshot commonsOptions, + EntityProviderBase provider) : IEntityRepository { - private DataAccess DataAccess { get; } = dataAccess; + private MasterDataCommonsOptions Options { get; } = commonsOptions.Value; + private EntityProviderBase Provider { get; } = provider; public int Update(Element element, Dictionary values) @@ -50,33 +56,56 @@ public CommandOperation SetValues(Element element, Dictionary v return Provider.SetValues(element, values, ignoreResults); } - public Task GetElementFromTableAsync(string tableName) => Provider.GetElementFromTableAsync(tableName); - - public Task GetResultAsync(DataAccessCommand command) + public Task GetElementFromTableAsync(string tableName, Guid? connectionId = null) { - return DataAccess.GetResultAsync(command); + return Provider.GetElementFromTableAsync(tableName, connectionId); } - public Task TableExistsAsync(string tableName) => DataAccess.TableExistsAsync(tableName); + public Task GetResultAsync(DataAccessCommand command, Guid? connectionId = null) + { + var dataAccess = GetDataAccess(connectionId); + return dataAccess.GetResultAsync(command); + } - public bool TableExists(string tableName) => DataAccess.TableExists(tableName); + public Task TableExistsAsync(string tableName, Guid? connectionId = null) + { + var dataAccess = GetDataAccess(connectionId); + return dataAccess.TableExistsAsync(tableName); + } - public async Task SetCommandAsync(DataAccessCommand command) + public bool TableExists(string tableName, Guid? connectionId = null) { - await DataAccess.SetCommandAsync(command); + var dataAccess = GetDataAccess(connectionId); + return dataAccess.TableExists(tableName); } - public Task SetCommandListAsync(IEnumerable commandList) => - DataAccess.SetCommandListAsync(commandList); + public async Task SetCommandAsync(DataAccessCommand command, Guid? connectionId = null) + { + var dataAccess = GetDataAccess(connectionId); + await dataAccess.SetCommandAsync(command); + } - public Task ColumnExistsAsync(string tableName, string columnName) => - DataAccess.ColumnExistsAsync(tableName, columnName); + public Task SetCommandListAsync(IEnumerable commandList, Guid? connectionId = null) + { + var dataAccess = GetDataAccess(connectionId); + return dataAccess.SetCommandListAsync(commandList); + } + private Task ColumnExistsAsync(string tableName, string columnName, Guid? connectionId = null) + { + var dataAccess = GetDataAccess(connectionId); + return dataAccess.ColumnExistsAsync(tableName, columnName); + } - public Task ExecuteBatchAsync(string script) => DataAccess.ExecuteBatchAsync(script); + public Task ExecuteBatchAsync(string script, Guid? connectionId = null) + { + var dataAccess = GetDataAccess(connectionId); + return dataAccess.ExecuteBatchAsync(script); + } public Dictionary GetFields(Element element, Dictionary primaryKeys) { + var dataAccess = GetDataAccess(element.ConnectionId); if (!primaryKeys.Any()) throw new ArgumentException("Your need at least one value at your primary keys.", nameof(primaryKeys)); @@ -87,17 +116,19 @@ public Task ColumnExistsAsync(string tableName, string columnName) => Filters = primaryKeys! }, totalOfRecords); - return DataAccess.GetDictionary(cmd) ?? new Dictionary(); + return dataAccess.GetDictionary(cmd) ?? new Dictionary(); } - public Dictionary GetFields(DataAccessCommand command) + public Dictionary GetFields(DataAccessCommand command, Guid? connectionId = null) { - return DataAccess.GetDictionary(command) ?? new Dictionary(); + var dataAccess = GetDataAccess(connectionId); + return dataAccess.GetDictionary(command) ?? new Dictionary(); } - public async Task> GetFieldsAsync(DataAccessCommand command) + public async Task> GetFieldsAsync(DataAccessCommand command, Guid? connectionId = null) { - return await DataAccess.GetDictionaryAsync(command); + var dataAccess = GetDataAccess(connectionId); + return await dataAccess.GetDictionaryAsync(command); } public async Task> GetFieldsAsync(Element element, @@ -112,8 +143,10 @@ public Task ColumnExistsAsync(string tableName, string columnName) => { Filters = primaryKeys! }, totalOfRecords); + + var dataAccess = GetDataAccess(element.ConnectionId); - return await DataAccess.GetDictionaryAsync(cmd); + return await dataAccess.GetDictionaryAsync(cmd); } public Task CreateDataModelAsync(Element element, List? relationships = null) => @@ -133,18 +166,24 @@ public string GetCreateTableScript(Element element, List? public async Task GetAlterTableScriptAsync(Element element) { - var addedFields = await GetAddedFieldsAsync(element).ToListAsync(); + List addedFields = []; + + await foreach (var field in GetAddedFieldsAsync(element)) + { + addedFields.Add(field); + } + return Provider.GetAlterTableScript(element, addedFields); } private async IAsyncEnumerable GetAddedFieldsAsync(Element element) { - if (!await TableExistsAsync(element.TableName)) + if (!await TableExistsAsync(element.TableName, element.ConnectionId)) yield break; foreach (var field in element.Fields.Where(f => f.DataBehavior == FieldBehavior.Real)) { - if (!await ColumnExistsAsync(element.TableName, field.Name)) + if (!await ColumnExistsAsync(element.TableName, field.Name, element.ConnectionId)) { yield return field; } @@ -178,23 +217,26 @@ public Task GetListFieldsAsTextAsync(Element element, EntityParameters? return result.Data; } - public DataTable GetDataTable(DataAccessCommand dataAccessCommand) + public DataTable GetDataTable(DataAccessCommand dataAccessCommand, Guid? connectionId = null) { - return DataAccess.GetDataTable(dataAccessCommand); + var dataAccess = GetDataAccess(connectionId); + return dataAccess.GetDataTable(dataAccessCommand); } - public Task GetDataTableAsync(DataAccessCommand dataAccessCommand) + public Task GetDataTableAsync(DataAccessCommand dataAccessCommand, Guid? connectionId = null) { - return DataAccess.GetDataTableAsync(dataAccessCommand); + var dataAccess = GetDataAccess(connectionId); + return dataAccess.GetDataTableAsync(dataAccessCommand); } public Task GetDataTableAsync(Element element, EntityParameters? parameters = null) { + var dataAccess = GetDataAccess(element.ConnectionId); var totalOfRecords = new DataAccessParameter("@qtdtotal", 1, DbType.Int32, 0, ParameterDirection.InputOutput); var command = Provider.GetReadCommand(element, parameters ?? new EntityParameters(), totalOfRecords); - return DataAccess.GetDataTableAsync(command); + return dataAccess.GetDataTableAsync(command); } public int GetCount(Element element, Dictionary values) @@ -217,9 +259,10 @@ public async Task GetCountAsync(Element element, Dictionary>> GetDictionaryListAsync(DataAccessCommand command) + public Task>> GetDictionaryListAsync(DataAccessCommand command, Guid? connectionId = null) { - return DataAccess.GetDictionaryListAsync(command); + var dataAccess = GetDataAccess(connectionId); + return dataAccess.GetDictionaryListAsync(command); } public async Task GetDictionaryListResultAsync( @@ -244,4 +287,23 @@ public DictionaryListResult GetDictionaryListResult( return new DictionaryListResult(result.Data, result.TotalOfRecords); } + + public DataSet GetDataSet(DataAccessCommand command, Guid? connectionId = null) + { + var dataAccess = GetDataAccess(connectionId); + return dataAccess.GetDataSet(command); + } + + + public Task GetDataSetAsync(DataAccessCommand command, Guid? connectionId = null, CancellationToken cancellationToken = default) + { + var dataAccess = GetDataAccess(connectionId); + return dataAccess.GetDataSetAsync(command, cancellationToken); + } + + private DataAccess GetDataAccess(Guid? connectionId) + { + var connection = Options.GetConnectionString(connectionId); + return new DataAccess(connection.Connection, connection.ConnectionProvider); + } } \ No newline at end of file diff --git a/src/Commons/Extensions/EnumExtensions.cs b/src/Commons/Extensions/EnumExtensions.cs index 2d00eb03e..dd62dd034 100644 --- a/src/Commons/Extensions/EnumExtensions.cs +++ b/src/Commons/Extensions/EnumExtensions.cs @@ -16,17 +16,4 @@ public static string GetDisplayName(this Enum value) .GetCustomAttribute() ?.Name ?? value.ToString(); } - - public static string GetDescription(this Enum value) - { - var fieldInfo = value.GetType().GetField(value.ToString()); - - if (fieldInfo.GetCustomAttributes(typeof(DescriptionAttribute), false) is DescriptionAttribute[] attributes && - attributes.Any()) - { - return attributes.First().Description; - } - - return value.ToString(); - } } \ No newline at end of file diff --git a/src/Commons/Localization/MasterDataResources.pt-BR.resx b/src/Commons/Localization/MasterDataResources.pt-BR.resx index e9ecacb65..f8d9821db 100644 --- a/src/Commons/Localization/MasterDataResources.pt-BR.resx +++ b/src/Commons/Localization/MasterDataResources.pt-BR.resx @@ -1329,8 +1329,8 @@ Ajuda JJMasterDataCore - - Descrição da Ajuda + + Tooltip JJMasterDataWeb @@ -4028,10 +4028,10 @@ Arquivo deletado com sucesso. - - Este campo suporta valores do runtime entre {}. + + Este campo suporta valores do runtime entre chaves. - + Nome da Tabela ou View @@ -4055,8 +4055,8 @@ Habilitar Cache do Dicionário de Dados - - Label Flutuante + + Usar Labels Flutuantes Informações Adicionais @@ -4082,4 +4082,22 @@ Baixar Resources + + Padrão da Aplicação + + + Operação Realizada! + + + Mostra uma label flutuando dentro do campo. Nem todos os campos suportam esta opção. + + + Template de Renderização + + + Template HTML para renderizar o campo na grid. Valores do runtime são suportados entre chaves. + + + Editar Elemento + diff --git a/src/Commons/Logging/Db/DbLogger.cs b/src/Commons/Logging/Db/DbLogger.cs index dda07dffb..d18b9dd76 100644 --- a/src/Commons/Logging/Db/DbLogger.cs +++ b/src/Commons/Logging/Db/DbLogger.cs @@ -38,8 +38,7 @@ private static string GetMessage(EventId eventId, string formatterMessage, Excep var message = new StringBuilder(); if (eventId.Name != null) { - message.Append($"Event - {eventId}"); - message.AppendLine(eventId.Name); + message.AppendLine($"Event - {eventId}"); } message.AppendLine(formatterMessage); diff --git a/src/Commons/Logging/Db/DbLoggerBackgroundService.cs b/src/Commons/Logging/Db/DbLoggerBackgroundService.cs index d7b04484d..5b0a7b867 100644 --- a/src/Commons/Logging/Db/DbLoggerBackgroundService.cs +++ b/src/Commons/Logging/Db/DbLoggerBackgroundService.cs @@ -26,7 +26,7 @@ protected override async Task LogAsync(LogMessage entry, CancellationToken cance var entityRepository = scope.ServiceProvider.GetRequiredService(); if (!TableExists) { - if (!await entityRepository.TableExistsAsync(options.TableName)) + if (!await entityRepository.TableExistsAsync(options.TableName, null)) { await entityRepository.CreateDataModelAsync(element,[]); } diff --git a/src/Commons/Logging/Db/DbLoggerElement.cs b/src/Commons/Logging/Db/DbLoggerElement.cs index cc285fee5..bb51e8a42 100644 --- a/src/Commons/Logging/Db/DbLoggerElement.cs +++ b/src/Commons/Logging/Db/DbLoggerElement.cs @@ -23,7 +23,7 @@ public static Element GetInstance(DbLoggerOptions options) { new ElementField { - Name = "Id", + Name = options.IdColumnName, Label = "Id", IsPk = true, AutoNum = true, diff --git a/src/Commons/Logging/Db/DbLoggerOptions.cs b/src/Commons/Logging/Db/DbLoggerOptions.cs index 07b859d26..7440fcbff 100644 --- a/src/Commons/Logging/Db/DbLoggerOptions.cs +++ b/src/Commons/Logging/Db/DbLoggerOptions.cs @@ -4,6 +4,8 @@ public class DbLoggerOptions { public string TableName { get; set; } = "tb_masterdata_log"; + public string IdColumnName { get; set; } = "Id"; + public string ConnectionStringName { get; set; } = "ConnectionString"; public string CreatedColumnName { get; set; } = "log_dat_evento"; public string LevelColumnName { get; set; } = "log_txt_tipo"; diff --git a/src/Commons/Security/Cryptography/Abstractions/IEncryptionService.cs b/src/Commons/Security/Cryptography/Abstractions/IEncryptionService.cs index 7a85de6ab..9db595f62 100644 --- a/src/Commons/Security/Cryptography/Abstractions/IEncryptionService.cs +++ b/src/Commons/Security/Cryptography/Abstractions/IEncryptionService.cs @@ -1,7 +1,8 @@ +#nullable enable namespace JJMasterData.Commons.Security.Cryptography.Abstractions; public interface IEncryptionService { - string EncryptString(string plainText); - string DecryptString(string cipherText); + string EncryptString(string plainText, string? secretKey = null); + string DecryptString(string cipherText, string? secretKey = null); } \ No newline at end of file diff --git a/src/Commons/Security/Cryptography/AesEncryptionAlgorithm.cs b/src/Commons/Security/Cryptography/AesEncryptionAlgorithm.cs index cd34cbbb0..4ef7695ed 100644 --- a/src/Commons/Security/Cryptography/AesEncryptionAlgorithm.cs +++ b/src/Commons/Security/Cryptography/AesEncryptionAlgorithm.cs @@ -1,3 +1,5 @@ +#nullable enable + using System; using System.IO; using System.Security.Cryptography; @@ -10,7 +12,7 @@ namespace JJMasterData.Commons.Security.Cryptography; /// /// AES is more secure than the DES cipher and is the de facto world standard. DES can be broken easily as it has known vulnerabilities. /// -public class AesEncryptionAlgorithm(IMemoryCache memoryCache) : IEncryptionAlgorithm +public class AesEncryptionAlgorithm(IMemoryCache? memoryCache = null) : IEncryptionAlgorithm { private record AesEntry(byte[] Key, byte[] IV); @@ -46,16 +48,16 @@ public string DecryptString(string cipherText, string secretKey) } catch { - return null; + return string.Empty; } } private Aes CreateAes(string secretKey) { - Aes aes = null; + Aes? aes = null; try { - if (memoryCache.TryGetValue(secretKey, out AesEntry aesEntry)) + if (memoryCache != null && memoryCache.TryGetValue(secretKey, out AesEntry aesEntry)) { aes = CreateAes(aesEntry); return aes; @@ -71,7 +73,7 @@ private Aes CreateAes(string secretKey) aesEntry = new AesEntry(aesKey, aesIv); - memoryCache.Set(secretKey, aesEntry); + memoryCache?.Set(secretKey, aesEntry); aes = CreateAes(aesEntry); diff --git a/src/Commons/Security/Cryptography/EncryptionService.cs b/src/Commons/Security/Cryptography/EncryptionService.cs index 84be77144..a1c4ee3c9 100644 --- a/src/Commons/Security/Cryptography/EncryptionService.cs +++ b/src/Commons/Security/Cryptography/EncryptionService.cs @@ -1,3 +1,4 @@ +#nullable enable using JJMasterData.Commons.Configuration.Options; using JJMasterData.Commons.Security.Cryptography.Abstractions; using Microsoft.Extensions.Options; @@ -12,10 +13,15 @@ public class EncryptionService( IOptionsSnapshot options) : IEncryptionService { - private readonly string _secretKey = options.Value.SecretKey; + private readonly string _secretKey = options.Value.SecretKey!; - public string EncryptString(string plainText) => encryptionAlgorithm.EncryptString(plainText, _secretKey); + public string EncryptString(string plainText, string? secretKey = null) + { + return encryptionAlgorithm.EncryptString(plainText,secretKey ??_secretKey); + } - public string DecryptString(string cipherText) => - encryptionAlgorithm.DecryptString(cipherText,_secretKey); + public string DecryptString(string cipherText, string? secretKey = null) + { + return encryptionAlgorithm.DecryptString(cipherText,secretKey ?? _secretKey); + } } \ No newline at end of file diff --git a/src/Core/Configuration/FactoriesServiceExtensions.cs b/src/Core/Configuration/FactoriesServiceExtensions.cs index cbf7dad83..6c49f20b9 100644 --- a/src/Core/Configuration/FactoriesServiceExtensions.cs +++ b/src/Core/Configuration/FactoriesServiceExtensions.cs @@ -46,6 +46,12 @@ private static IServiceCollection AddComponentsFactories(this IServiceCollection services.AddScoped,LinkButtonFactory>(); services.AddScoped, LinkButtonGroupFactory>(); services.AddScoped, CardFactory>(); + services.AddScoped, BreadcrumbFactory>(); + services.AddScoped, ImageFactory>(); + services.AddScoped, OffcanvasFactory>(); + + services.AddScoped(); + services.AddScoped(); services.AddScoped(); services.AddScoped(); diff --git a/src/Core/Core.csproj b/src/Core/Core.csproj index 199ff99bb..48ce6f13b 100644 --- a/src/Core/Core.csproj +++ b/src/Core/Core.csproj @@ -106,17 +106,4 @@ ComponentResult.cs
- - - - - - - - - - - - - diff --git a/src/Core/Core.csproj.DotSettings b/src/Core/Core.csproj.DotSettings index 59435fb66..a2902809f 100644 --- a/src/Core/Core.csproj.DotSettings +++ b/src/Core/Core.csproj.DotSettings @@ -26,6 +26,7 @@ True True True + True True True True @@ -33,7 +34,9 @@ True True True + True True + True True True True diff --git a/src/Core/DataDictionary/Models/Actions/GridToolbar/DeleteSelectedRowsAction.cs b/src/Core/DataDictionary/Models/Actions/GridToolbar/DeleteSelectedRowsAction.cs deleted file mode 100644 index 77324752e..000000000 --- a/src/Core/DataDictionary/Models/Actions/GridToolbar/DeleteSelectedRowsAction.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace JJMasterData.Core.DataDictionary.Models.Actions; - -public sealed class DeleteSelectedRowsAction : GridToolbarAction -{ - public const string ActionName = "deleteSelectedRows"; - - public DeleteSelectedRowsAction() - { - Name = ActionName; - Text = "Delete Selected"; - Icon = IconType.Trash; - ShowAsButton = true; - Order = 3; - SetVisible(false); - } - public override BasicAction DeepCopy() => CopyAction(); -} \ No newline at end of file diff --git a/src/Core/DataDictionary/Models/DataElementMap.cs b/src/Core/DataDictionary/Models/DataElementMap.cs index ae301fe93..5eac243df 100644 --- a/src/Core/DataDictionary/Models/DataElementMap.cs +++ b/src/Core/DataDictionary/Models/DataElementMap.cs @@ -12,17 +12,23 @@ public class DataElementMap [Required] public string ElementName { get; set; } = null!; - [JsonProperty("fieldKey")] public string IdFieldName { get; set; } = null!; + [JsonProperty("fieldKey")] + public string IdFieldName { get; set; } = null!; - [JsonProperty("fieldDescription")] public string? DescriptionFieldName { get; set; } = null!; + [JsonProperty("fieldDescription")] + public string? DescriptionFieldName { get; set; } = null!; - [JsonProperty("iconId")] public string? IconIdFieldName { get; set; } + [JsonProperty("iconId")] + public string? IconIdFieldName { get; set; } - [JsonProperty("iconColor")] public string? IconColorFieldName { get; set; } + [JsonProperty("iconColor")] + public string? IconColorFieldName { get; set; } - [JsonProperty("group")] public string? GroupFieldName { get; set; } + [JsonProperty("group")] + public string? GroupFieldName { get; set; } - [JsonProperty("popUpSize")] public ModalSize ModalSize { get; set; } + [JsonProperty("popUpSize")] + public ModalSize ModalSize { get; set; } [JsonIgnore] public Dictionary Filters diff --git a/src/Core/DataDictionary/Models/ElementBean.cs b/src/Core/DataDictionary/Models/ElementBean.cs new file mode 100644 index 000000000..a7893ce2a --- /dev/null +++ b/src/Core/DataDictionary/Models/ElementBean.cs @@ -0,0 +1,16 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace JJMasterData.Core.DataDictionary.Models; + +public sealed class ElementBean +{ + [Display(Name = "Table Or View Name", Prompt = "Table Or View Name")] + public string Name { get; init; } = null!; + + [Display(Name = "Import Fields")] + public bool ImportFields { get; init; } + + [Display(Name = "Connection String")] + public Guid? ConnectionId { get; init; } +} \ No newline at end of file diff --git a/src/Core/DataDictionary/Models/Entity.cs b/src/Core/DataDictionary/Models/Entity.cs index 6553e2821..37ba65d2d 100644 --- a/src/Core/DataDictionary/Models/Entity.cs +++ b/src/Core/DataDictionary/Models/Entity.cs @@ -1,4 +1,5 @@ -using System.ComponentModel.DataAnnotations; +using System; +using System.ComponentModel.DataAnnotations; using JJMasterData.Commons.Data.Entity.Models; using JJMasterData.Core.UI.Components; @@ -28,7 +29,7 @@ public sealed class Entity [SyncExpression] public required string Title { get; set; } - [Display(Name = "Title Size")] + [Display(Name = "Size")] public required HeadingSize TitleSize { get; set; } [Display(Name = "SubTitle")] @@ -40,6 +41,9 @@ public sealed class Entity [Display(Name = "Icon")] public required IconType? Icon { get; set; } + + [Display(Name = "Connection String")] + public required Guid? ConnectionId { get; set; } public static Entity FromFormElement(FormElement formElement) { @@ -55,7 +59,24 @@ public static Entity FromFormElement(FormElement formElement) TitleSize = formElement.TitleSize, SubTitle = formElement.SubTitle, Info = formElement.Info, - Icon = formElement.Icon + Icon = formElement.Icon, + ConnectionId = formElement.ConnectionId }; } + + public void SetFormElement(FormElement formElement) + { + formElement.Name = Name; + formElement.TableName = TableName; + formElement.UseReadProcedure = UseReadProcedure; + formElement.UseWriteProcedure = UseWriteProcedure; + formElement.ReadProcedureName = ReadProcedureName; + formElement.WriteProcedureName = WriteProcedureName; + formElement.Title = Title; + formElement.TitleSize = TitleSize; + formElement.SubTitle = SubTitle; + formElement.Info = Info; + formElement.Icon = Icon; + formElement.ConnectionId = ConnectionId; + } } \ No newline at end of file diff --git a/src/Core/DataDictionary/Models/FormElement.cs b/src/Core/DataDictionary/Models/FormElement.cs index ee4dbe160..b9fc444c0 100644 --- a/src/Core/DataDictionary/Models/FormElement.cs +++ b/src/Core/DataDictionary/Models/FormElement.cs @@ -34,6 +34,9 @@ public class FormElement : Element [JsonProperty("icon")] public IconType? Icon { get; set; } + + [JsonProperty("typeIdentifier")] + public char TypeIdentifier { get; init; } = 'F'; [Required] [JsonProperty("fields")] @@ -89,6 +92,7 @@ public FormElement(Element element) SynchronismMode = element.SynchronismMode; Title = element.Name; SubTitle = element.Info; + ConnectionId = element.ConnectionId; Fields = new FormElementFieldList(element.Fields); Panels = []; ApiOptions = new FormElementApiOptions(); diff --git a/src/Core/DataDictionary/Models/FormElementField.cs b/src/Core/DataDictionary/Models/FormElementField.cs index 2a5b7de8a..daba37608 100644 --- a/src/Core/DataDictionary/Models/FormElementField.cs +++ b/src/Core/DataDictionary/Models/FormElementField.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using JetBrains.Annotations; using JJMasterData.Commons.Data.Entity.Models; using JJMasterData.Core.DataDictionary.Models.Actions; using Newtonsoft.Json; @@ -85,7 +86,7 @@ public class FormElementField : ElementField /// Help text will be displayed next to the label /// [JsonProperty("helpDescription")] - [Display(Name = "Help Description")] + [Display(Name = "Tooltip")] public string? HelpDescription { get; set; } /// @@ -163,7 +164,8 @@ public class FormElementField : ElementField [JsonProperty("panelId")] public int PanelId { get; set; } - [JsonProperty("actions")] public FormElementFieldActionList Actions { get; set; } + [JsonProperty("actions")] + public FormElementFieldActionList Actions { get; set; } /// /// Internal developer notes @@ -174,22 +176,25 @@ public class FormElementField : ElementField [JsonProperty("gridAlignment")] [Display(Name = "Alignment At Grid")] public GridAlignment GridAlignment { get; set; } - + + /// + /// Template used to render the field at the Grid. + /// + [LanguageInjection("html")] + [JsonProperty("gridRenderingTemplate")] + [Display(Name = "Rendering Template")] + public string? GridRenderingTemplate { get; set; } + [JsonProperty("encodeHtml")] [Display(Name = "Encode HTML")] public bool EncodeHtml { get; set; } = true; - [JsonProperty("floatingLabel")] - [Display(Name = "Floating Label")] - public bool FloatingLabel { get; set; } - /// /// The field will be disabled but the value send to the server /// [JsonIgnore] public string? ReadOnlyExpression { get; set; } - - + public FormElementField() { Component = FormComponent.Text; @@ -286,13 +291,16 @@ public void SetEnabled(bool value) public bool SupportsFloatingLabel() => Component is FormComponent.Text + or FormComponent.TextArea + or FormComponent.Date + or FormComponent.DateTime or FormComponent.Number or FormComponent.Cep or FormComponent.Cpf or FormComponent.CnpjCpf or FormComponent.Tel or FormComponent.ComboBox - && (DataItem == null || (DataItem != null && DataItem.SupportsFloatingLabels() && Actions.Count == 0)); + && (DataItem == null || (DataItem != null && DataItem.SupportsFloatingLabels())); /// /// Set if the field is enabled. diff --git a/src/Core/DataDictionary/Models/FormElementFieldSelector.cs b/src/Core/DataDictionary/Models/FormElementFieldSelector.cs new file mode 100644 index 000000000..fd19626c1 --- /dev/null +++ b/src/Core/DataDictionary/Models/FormElementFieldSelector.cs @@ -0,0 +1,9 @@ +#nullable enable + +namespace JJMasterData.Core.DataDictionary.Models; + +public class FormElementFieldSelector(FormElement formElement, string fieldName) +{ + public FormElement FormElement { get; } = formElement; + public FormElementField Field { get; } = formElement.Fields[fieldName]; +} \ No newline at end of file diff --git a/src/Core/DataDictionary/Models/FormElementOptions.cs b/src/Core/DataDictionary/Models/FormElementOptions.cs index c7093d7f3..07b55b533 100644 --- a/src/Core/DataDictionary/Models/FormElementOptions.cs +++ b/src/Core/DataDictionary/Models/FormElementOptions.cs @@ -26,6 +26,10 @@ public class FormElementOptions [JsonProperty("enableAuditLog")] [Display(Name = "Enable Audit Log")] public bool EnableAuditLog { get; set; } + + [JsonProperty("useFloatingLabels")] + [Display(Name = "Use Floating Labels")] + public bool UseFloatingLabels { get; set; } public FormElementOptions() { @@ -57,10 +61,11 @@ public FormElementOptions DeepCopy() { Grid = Grid.DeepCopy(), Form = Form.DeepCopy(), - EnableAuditLog = EnableAuditLog, FormToolbarActions = FormToolbarActions.DeepCopy(), GridTableActions = GridTableActions.DeepCopy(), - GridToolbarActions = GridToolbarActions.DeepCopy() + GridToolbarActions = GridToolbarActions.DeepCopy(), + UseFloatingLabels = UseFloatingLabels, + EnableAuditLog = EnableAuditLog }; } } \ No newline at end of file diff --git a/src/Core/DataDictionary/Repository/Abstractions/IDataDictionaryRepository.cs b/src/Core/DataDictionary/Repository/Abstractions/IDataDictionaryRepository.cs index 0e518b76e..5f8e10b11 100644 --- a/src/Core/DataDictionary/Repository/Abstractions/IDataDictionaryRepository.cs +++ b/src/Core/DataDictionary/Repository/Abstractions/IDataDictionaryRepository.cs @@ -20,7 +20,7 @@ public interface IDataDictionaryRepository Task> GetFormElementInfoListAsync(DataDictionaryFilter filters, OrderByData orderByData, int recordsPerPage, int currentPage); Task ExistsAsync(string elementName); - Task InsertOrReplaceAsync(FormElement metadata); + Task InsertOrReplaceAsync(FormElement formElement); void InsertOrReplace(FormElement formElement); Task DeleteAsync(string elementName); } \ No newline at end of file diff --git a/src/Core/DataDictionary/Repository/SqlDataDictionaryRepository.cs b/src/Core/DataDictionary/Repository/SqlDataDictionaryRepository.cs index 8f25f7577..a351d00d9 100644 --- a/src/Core/DataDictionary/Repository/SqlDataDictionaryRepository.cs +++ b/src/Core/DataDictionary/Repository/SqlDataDictionaryRepository.cs @@ -82,7 +82,7 @@ public async Task> GetNameListAsync() if (_enableDataDictionaryCaching && memoryCache.TryGetValue(elementName, out FormElement formElement)) return formElement.DeepCopy(); - var filter = new Dictionary { { DataDictionaryStructure.Name, elementName }, {DataDictionaryStructure.Type, "F" } }; + var filter = new Dictionary { { DataDictionaryStructure.Name, elementName } }; var values = entityRepository.GetFields(_masterDataElement, filter); @@ -106,7 +106,7 @@ public async Task> GetNameListAsync() if (_enableDataDictionaryCaching && memoryCache.TryGetValue(elementName, out FormElement formElement)) return formElement.DeepCopy(); - var filter = new Dictionary { { DataDictionaryStructure.Name, elementName }, {DataDictionaryStructure.Type, "F" } }; + var filter = new Dictionary { { DataDictionaryStructure.Name, elementName } }; var values = await entityRepository.GetFieldsAsync(_masterDataElement, filter); @@ -168,7 +168,7 @@ public void InsertOrReplace(FormElement formElement) { DataDictionaryStructure.Name, name }, { DataDictionaryStructure.TableName, formElement.TableName }, { DataDictionaryStructure.Info, formElement.Info }, - { DataDictionaryStructure.Type, "F" }, + { DataDictionaryStructure.Type, formElement.TypeIdentifier }, { DataDictionaryStructure.Owner, null }, { DataDictionaryStructure.Json, jsonForm }, { DataDictionaryStructure.EnableSynchronism, formElement.EnableSynchronism }, @@ -201,7 +201,7 @@ public async Task ExistsAsync(string elementName) public async Task CreateStructureIfNotExistsAsync() { - if (!await entityRepository.TableExistsAsync(_masterDataElement.Name)) + if (!await entityRepository.TableExistsAsync(_masterDataElement.Name, _masterDataElement.ConnectionId)) await entityRepository.CreateDataModelAsync(_masterDataElement,[]); } diff --git a/src/Core/DataDictionary/Services/ElementService.cs b/src/Core/DataDictionary/Services/ElementService.cs index 5046510a7..d631abaeb 100644 --- a/src/Core/DataDictionary/Services/ElementService.cs +++ b/src/Core/DataDictionary/Services/ElementService.cs @@ -1,18 +1,15 @@ #nullable enable using JJMasterData.Commons.Localization; -using JJMasterData.Commons.Util; -using Microsoft.Extensions.Options; using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Linq; using System.Text; using System.Threading.Tasks; -using JJMasterData.Commons.Data.Entity.Models; +using JJMasterData.Commons.Configuration.Options; using JJMasterData.Commons.Data.Entity.Repository; using JJMasterData.Commons.Data.Entity.Repository.Abstractions; -using JJMasterData.Core.Configuration.Options; using JJMasterData.Core.DataDictionary.Models; using JJMasterData.Core.DataDictionary.Repository.Abstractions; using JJMasterData.Core.DataDictionary.Structure; @@ -23,9 +20,9 @@ namespace JJMasterData.Core.DataDictionary.Services; -public class ElementService(IFormElementComponentFactory formViewFactory, +public class ElementService( + IFormElementComponentFactory formViewFactory, IValidationDictionary validationDictionary, - IOptionsSnapshot options, IStringLocalizer stringLocalizer, IEntityRepository entityRepository, IDataDictionaryRepository dataDictionaryRepository, @@ -38,37 +35,45 @@ public class ElementService(IFormElementComponentFactory formViewFac private IMasterDataUrlHelper UrlHelper { get; } = urlHelper; private IEntityRepository EntityRepository { get; } = entityRepository; - private readonly MasterDataCoreOptions _options = options.Value; - #region Add Dictionary - public async Task CreateEntityAsync(string tableName, bool importFields) + public async Task CreateEntityAsync(ElementBean elementBean) { - if (!await ValidateEntityAsync(tableName, importFields)) + var tableName = elementBean.Name; + var importFields = elementBean.ImportFields; + var connectionId = elementBean.ConnectionId; + + if (!await ValidateEntityAsync(elementBean)) return null; - Element element; + FormElement formElement; if (importFields) { - element = await EntityRepository.GetElementFromTableAsync(tableName); - element.Name = GetElementName(tableName); + var element = await EntityRepository.GetElementFromTableAsync(tableName, connectionId); + element.Name = MasterDataCommonsOptions.RemoveTbPrefix(tableName); + formElement = new FormElement(element); } else { - element = new FormElement + formElement = new FormElement { TableName = tableName, - Name = GetElementName(tableName) + Name = MasterDataCommonsOptions.RemoveTbPrefix(tableName), + ConnectionId = connectionId, }; } - await DataDictionaryRepository.InsertOrReplaceAsync(new FormElement(element)); + await DataDictionaryRepository.InsertOrReplaceAsync(formElement); - return element; + return formElement; } - public async Task ValidateEntityAsync(string tableName, bool importFields) + public async Task ValidateEntityAsync(ElementBean elementBean) { + var tableName = elementBean.Name; + var importFields = elementBean.ImportFields; + var connectionId = elementBean.ConnectionId; + if (ValidateName(tableName)) { if (await DataDictionaryRepository.ExistsAsync(tableName)) @@ -79,7 +84,7 @@ public async Task ValidateEntityAsync(string tableName, bool importFields) if (importFields & IsValid) { - var exists = await EntityRepository.TableExistsAsync(tableName); + var exists = await EntityRepository.TableExistsAsync(tableName, connectionId); if (!exists) AddError("Name", StringLocalizer["Table not found"]); } @@ -87,19 +92,6 @@ public async Task ValidateEntityAsync(string tableName, bool importFields) return IsValid; } - private static string GetElementName(string tablename) - { - string elementName; - if (tablename.ToLower().StartsWith("tb_")) - elementName = tablename.Substring(3); - else if (tablename.ToLower().StartsWith("tb")) - elementName = tablename.Substring(2); - else - elementName = tablename; - - return StringManager.ToPascalCase(elementName); - } - #endregion #region Duplicate Entity @@ -150,7 +142,9 @@ public JJFormView GetFormView() { formView.GridView.CurrentOrder.AddOrReplace(DataDictionaryStructure.Name, OrderByDirection.Asc); } - + + formView.ShowTitle = false; + formView.GridView.ShowTitle = false; formView.GridView.EnableMultiSelect = true; formView.GridView.FilterAction.ExpandedByDefault = true; diff --git a/src/Core/DataDictionary/Services/EntityService.cs b/src/Core/DataDictionary/Services/EntityService.cs index 7f9bb5226..527925414 100644 --- a/src/Core/DataDictionary/Services/EntityService.cs +++ b/src/Core/DataDictionary/Services/EntityService.cs @@ -49,17 +49,7 @@ public async Task EditEntityAsync(Entity entity, string entityName) { var formElement = await DataDictionaryRepository.GetFormElementAsync(entityName); - formElement.Name = entity.Name; - formElement.TableName = entity.TableName; - formElement.ReadProcedureName = entity.ReadProcedureName; - formElement.WriteProcedureName = entity.WriteProcedureName; - formElement.Info = entity.Info; - formElement.Title = entity.Title; - formElement.TitleSize = entity.TitleSize; - formElement.SubTitle = entity.SubTitle; - formElement.UseReadProcedure = entity.UseReadProcedure; - formElement.UseWriteProcedure = entity.UseWriteProcedure; - formElement.Icon = entity.Icon; + entity.SetFormElement(formElement); if (!entityName.Equals(formElement.Name)) { diff --git a/src/Core/DataDictionary/Services/FieldService.cs b/src/Core/DataDictionary/Services/FieldService.cs index 7d8ad7547..f02f3c0a4 100644 --- a/src/Core/DataDictionary/Services/FieldService.cs +++ b/src/Core/DataDictionary/Services/FieldService.cs @@ -73,9 +73,6 @@ private void ClearScriptsCache(FormElement formElement) private static void RemoveUnusedProperties(FormElementField field) { - if (!field.SupportsFloatingLabel()) - field.FloatingLabel = false; - if (field.Component is FormComponent.ComboBox or FormComponent.Search or FormComponent.Lookup or FormComponent.RadioButtonGroup) { switch (field.DataItem!.DataItemType) diff --git a/src/Core/DataDictionary/Services/ScriptsService.cs b/src/Core/DataDictionary/Services/ScriptsService.cs index d43e0680a..52220e379 100644 --- a/src/Core/DataDictionary/Services/ScriptsService.cs +++ b/src/Core/DataDictionary/Services/ScriptsService.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Linq; using System.Text; using System.Threading.Tasks; using JJMasterData.Commons.Data.Entity.Models; @@ -12,9 +11,11 @@ namespace JJMasterData.Core.DataDictionary.Services; public class ScriptsService(IEntityRepository entityRepository, IDataDictionaryRepository dataDictionaryRepository) { + + public async Task GetScriptsAsync(FormElement formElement) { - var relationships = await GetFormElementRelationships(formElement).ToListAsync(); + var relationships = await GetFormElementRelationships(formElement); var createTableScript = entityRepository.GetCreateTableScript(formElement,relationships); var readProcedureScript = formElement.UseReadProcedure ? entityRepository.GetReadProcedureScript(formElement) : null; @@ -30,14 +31,16 @@ public async Task GetScriptsAsync(FormElement formElement) }; } - private async IAsyncEnumerable GetFormElementRelationships(FormElement formElement) + private async Task> GetFormElementRelationships(FormElement formElement) { + List relationshipList = []; foreach (var r in formElement.Relationships.GetElementRelationships()) { var tableName = (await dataDictionaryRepository.GetFormElementAsync(r.ChildElement)).TableName; - yield return new(r.ChildElement, tableName); + relationshipList.Add(new(r.ChildElement, tableName)); } + return relationshipList; } public async Task ExecuteScriptsAsync(string id, string scriptOption) @@ -49,15 +52,15 @@ public async Task ExecuteScriptsAsync(string id, string scriptOption) var sql = new StringBuilder(); sql.AppendLine(entityRepository.GetWriteProcedureScript(formElement)); sql.AppendLine(entityRepository.GetReadProcedureScript(formElement)); - await entityRepository.ExecuteBatchAsync(sql.ToString()); + await entityRepository.ExecuteBatchAsync(sql.ToString(), formElement.ConnectionId); break; case "ExecuteCreateDataModel": - var relationships = await GetFormElementRelationships(formElement).ToListAsync(); + var relationships = await GetFormElementRelationships(formElement); await entityRepository.CreateDataModelAsync(formElement,relationships); break; case "ExecuteAlterTable": var alterTableScript = await entityRepository.GetAlterTableScriptAsync(formElement); - await entityRepository.ExecuteBatchAsync(alterTableScript); + await entityRepository.ExecuteBatchAsync(alterTableScript, formElement.ConnectionId); break; } } diff --git a/src/Core/DataDictionary/Services/UIOptionsService.cs b/src/Core/DataDictionary/Services/UIOptionsService.cs index b00aaa113..2c6d107e6 100644 --- a/src/Core/DataDictionary/Services/UIOptionsService.cs +++ b/src/Core/DataDictionary/Services/UIOptionsService.cs @@ -46,6 +46,7 @@ public async Task EditOptionsAsync(FormElementOptions options,string eleme formElement.Options.Form = options.Form; formElement.Options.Grid = options.Grid; formElement.Options.EnableAuditLog = options.EnableAuditLog; + formElement.Options.UseFloatingLabels = options.UseFloatingLabels; await DataDictionaryRepository.InsertOrReplaceAsync(formElement); } diff --git a/src/Core/DataDictionary/Structure/DataDictionaryFormElementFactory.cs b/src/Core/DataDictionary/Structure/DataDictionaryFormElementFactory.cs index 13521ddd3..e90ea3698 100644 --- a/src/Core/DataDictionary/Structure/DataDictionaryFormElementFactory.cs +++ b/src/Core/DataDictionary/Structure/DataDictionaryFormElementFactory.cs @@ -15,11 +15,9 @@ namespace JJMasterData.Core.DataDictionary.Structure; public class DataDictionaryFormElementFactory( IOptionsSnapshot options, IStringLocalizer stringLocalizer, - IHttpContext httpContext, IMasterDataUrlHelper urlHelper) { private IStringLocalizer StringLocalizer { get; } = stringLocalizer; - private IHttpContext HttpContext { get; } = httpContext; private IMasterDataUrlHelper UrlHelper { get; } = urlHelper; private readonly MasterDataCoreOptions _options = options.Value; @@ -41,10 +39,7 @@ public FormElement GetFormElement() private FormElement GetFormElement(Element element) { - var formElement = new FormElement(element) - { - Title = $"val:{new ImageFactory(HttpContext).CreateMasterDataLogo().GetHtml()}", - }; + var formElement = new FormElement(element); formElement.SubTitle = $"val:{StringLocalizer[formElement.SubTitle!]}"; @@ -144,18 +139,14 @@ private void AddGridToolbarActions(FormElement formElement) FormAction = UrlHelper.Action("Delete", "Element", new {Area="DataDictionary"}), }, - new UrlRedirectAction + new ScriptAction() { Name = "btnAbout", Text = StringLocalizer["About"], Icon = IconType.InfoCircle, ShowAsButton = false, - IsModal = true, - IsIframe = false, IsGroup = true, - ModalTitle = StringLocalizer["About"], - ModalSize = ModalSize.ExtraLarge, - UrlRedirect = UrlHelper.Action("Index", "About", new {Area="DataDictionary"}), + OnClientClick = $"DataDictionaryUtils.showAbout('{UrlHelper.Action("Index", "About", new {Area="DataDictionary"})}')", Order = 14, CssClass = BootstrapHelper.PullRight }, diff --git a/src/Core/DataDictionary/Structure/LoggerFormElementFactory.cs b/src/Core/DataDictionary/Structure/LoggerFormElementFactory.cs index 4abee4b49..4c82636db 100644 --- a/src/Core/DataDictionary/Structure/LoggerFormElementFactory.cs +++ b/src/Core/DataDictionary/Structure/LoggerFormElementFactory.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using JJMasterData.Commons.Localization; using JJMasterData.Commons.Logging.Db; using JJMasterData.Core.DataDictionary.Models; @@ -10,7 +9,10 @@ namespace JJMasterData.Core.DataDictionary.Structure; -public class LoggerFormElementFactory(IOptionsSnapshot options,IMasterDataUrlHelper urlHelper, IStringLocalizer stringLocalizer) +public class LoggerFormElementFactory( + IOptionsSnapshot options, + IMasterDataUrlHelper urlHelper, + IStringLocalizer stringLocalizer) { private IMasterDataUrlHelper UrlHelper { get; } = urlHelper; private IStringLocalizer StringLocalizer { get; } = stringLocalizer; @@ -24,21 +26,23 @@ public FormElement GetFormElement(bool isModal) SubTitle = string.Empty, Icon = IconType.Film }; - - formElement.Options.GridToolbarActions.InsertAction.SetVisible(false); - - formElement.Fields["Id"].VisibleExpression = "val:0"; + + formElement.Fields[Options.IdColumnName].VisibleExpression = "val:0"; + + formElement.Fields[Options.CategoryColumnName].VisibleExpression = "val:0"; + formElement.Fields[Options.CategoryColumnName].CssClass = "col-sm-6"; + formElement.Fields[Options.LevelColumnName].LineGroup = 1; formElement.Fields[Options.LevelColumnName].CssClass = "col-sm-6"; - formElement.Fields[Options.CategoryColumnName].LineGroup = 1; - formElement.Fields[Options.CategoryColumnName].CssClass = "col-sm-6"; + formElement.Fields[Options.CreatedColumnName].LineGroup = 2; formElement.Fields[Options.MessageColumnName].LineGroup = 3; formElement.Fields[Options.MessageColumnName].CssClass = "col-sm-10"; - var logLevel = formElement.Fields[Options.LevelColumnName]; - logLevel.Component = FormComponent.ComboBox; - logLevel.DataItem = new FormElementDataItem + + var levelField = formElement.Fields[Options.LevelColumnName]; + levelField.Component = FormComponent.ComboBox; + levelField.DataItem = new FormElementDataItem { Items = [ @@ -53,7 +57,7 @@ public FormElement GetFormElement(bool isModal) GridBehavior = DataItemGridBehavior.Icon, ShowIcon = true }; - + var btnClearAll = new UrlRedirectAction { Name = "btnClearLog", @@ -61,16 +65,18 @@ public FormElement GetFormElement(bool isModal) Text = StringLocalizer["Clear Log"], ShowAsButton = true, ConfirmationMessage = StringLocalizer["Do you want to clear ALL logs?"], - UrlRedirect = UrlHelper.Action("ClearAll", "Log", new {Area="DataDictionary", isModal}) + UrlRedirect = UrlHelper.Action("ClearAll", "Log", new { Area = "DataDictionary", isModal }) }; - + formElement.Options.GridTableActions.Clear(); - + formElement.Options.GridToolbarActions.InsertAction.SetVisible(false); formElement.Options.GridToolbarActions.Add(btnClearAll); formElement.Options.GridToolbarActions.FilterAction.Text = "Filters"; formElement.Options.GridToolbarActions.FilterAction.ShowIconAtCollapse = true; + formElement.Options.Grid.IsCompact = true; formElement.Options.Grid.UseVerticalLayoutAtFilter = false; + return formElement; } } \ No newline at end of file diff --git a/src/Core/DataManager/Expressions/Abstractions/IAsyncExpressionProvider.cs b/src/Core/DataManager/Expressions/Abstractions/IAsyncExpressionProvider.cs index f0d79cc57..feb7b904c 100644 --- a/src/Core/DataManager/Expressions/Abstractions/IAsyncExpressionProvider.cs +++ b/src/Core/DataManager/Expressions/Abstractions/IAsyncExpressionProvider.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Threading.Tasks; + namespace JJMasterData.Core.DataManager.Expressions.Abstractions; public interface IAsyncExpressionProvider : IExpressionProvider diff --git a/src/Core/DataManager/Expressions/ExpressionDataAccessCommandFactory.cs b/src/Core/DataManager/Expressions/ExpressionDataAccessCommandFactory.cs new file mode 100644 index 000000000..f6586049a --- /dev/null +++ b/src/Core/DataManager/Expressions/ExpressionDataAccessCommandFactory.cs @@ -0,0 +1,59 @@ +#nullable enable +using System; +using System.Collections.Generic; +using System.Data; +using JJMasterData.Commons.Data; + +namespace JJMasterData.Core.DataManager.Expressions; + +public static class ExpressionDataAccessCommandFactory +{ + public static DataAccessCommand Create(string expression, Dictionary parsedValues) + { + var command = new DataAccessCommand(); + + foreach (var keyValuePair in parsedValues) + { + DbType dbType; + var parameterName = $"@{keyValuePair.Key}"; + var oldExpression = expression; + + expression = expression.Replace($"'{ExpressionHelper.Begin}{keyValuePair.Key}{ExpressionHelper.End}'", $" {parameterName} "); + + if (oldExpression != expression) + { + dbType = DbType.String; + } + else + { + expression = expression.Replace($"{ExpressionHelper.Begin}{keyValuePair.Key}{ExpressionHelper.End}", $" {parameterName} "); + + dbType = GetDbTypeFromObject(keyValuePair.Value); + } + var value = keyValuePair.Value; + + if (value is string stringValue) + value = stringValue.Trim(); //this prevents errors when coalescing string to numeric values. + + command.AddParameter(parameterName, value, dbType); + } + + command.Sql = expression; + return command; + } + + private static DbType GetDbTypeFromObject(object? value) + { + return value switch + { + int => DbType.Int32, + double => DbType.Double, + decimal => DbType.Decimal, + float => DbType.Double, + string => DbType.String, + DateTime => DbType.DateTime, + bool => DbType.Boolean, + _ => DbType.String + }; + } +} \ No newline at end of file diff --git a/src/Core/DataManager/Expressions/ExpressionsService.cs b/src/Core/DataManager/Expressions/ExpressionsService.cs index 7b3d08498..cc484bcaa 100644 --- a/src/Core/DataManager/Expressions/ExpressionsService.cs +++ b/src/Core/DataManager/Expressions/ExpressionsService.cs @@ -40,11 +40,6 @@ private record Expression(string Prefix, string Content); return ExpressionParser.ParseExpression(expression, formStateData); } - public Task GetDefaultValueAsync(ElementField field, FormStateData formStateData) - { - return GetExpressionValueAsync(field.DefaultValue, field, formStateData); - } - public string? ReplaceExpressionWithParsedValues( string? expression, FormStateData formStateData, @@ -108,32 +103,21 @@ public bool GetBoolValue(string? expression, FormStateData formStateData) return result; } - public Task GetTriggerValueAsync(FormElementField field, FormStateData formStateData) + public Task GetTriggerValueAsync(FormElementFieldSelector fieldSelector, FormStateData formStateData) { - return GetExpressionValueAsync(field.TriggerExpression, field, formStateData); + var field = fieldSelector.Field; + return GetExpressionValueAsync(fieldSelector,field.TriggerExpression, formStateData); } - - internal async Task GetExpressionValueAsync( - string? expression, - FormStateData formStateData) - { - return await GetExpressionValueAsyncInternal(expression, null, formStateData); - } - - internal async Task GetExpressionValueAsync( - string? expression, - ElementField field, - FormStateData formStateData) + + public Task GetDefaultValueAsync(FormElementFieldSelector fieldSelector, FormStateData formStateData) { - if (field == null) - throw new ArgumentNullException(nameof(field)); - - return await GetExpressionValueAsyncInternal(expression, field, formStateData); + var field = fieldSelector.Field; + return GetExpressionValueAsync(fieldSelector,field.DefaultValue, formStateData); } - - private async Task GetExpressionValueAsyncInternal( + + private async Task GetExpressionValueAsync( + FormElementFieldSelector fieldSelector, string? expression, - ElementField? field, FormStateData formStateData) { var extractedExpression = GetExpressionFromString(expression); @@ -145,12 +129,17 @@ public bool GetBoolValue(string? expression, FormStateData formStateData) throw new JJMasterDataException($"Expression type not supported: {expressionType}"); } + var field = fieldSelector.Field; + try { var parsedValues = ExpressionParser.ParseExpression(expression, formStateData); - var result = await provider.EvaluateAsync(expressionValue, parsedValues); - if (field != null && result is string stringResult) + if(provider is SqlExpressionProvider sqlProvider) + sqlProvider.ConnectionId = fieldSelector.FormElement.ConnectionId; + + var result = await provider.EvaluateAsync(expressionValue, parsedValues); + if (result is string stringResult) { return field.DataType switch { @@ -166,11 +155,10 @@ FieldType.Float when double.TryParse(stringResult.Trim(), } catch (Exception ex) { - var exception = field != null - ? new ExpressionException($"Unhandled exception at a expression provider.\nField: {field.Name}", ex) - : new ExpressionException("Unhandled exception at a expression provider.", ex); + var exception = + new ExpressionException($"Unhandled exception at a expression provider.\nField: {field.Name}", ex); - Logger.LogExpressionErrorWithField(exception, provider.Prefix, expression, field?.Name); + Logger.LogExpressionErrorWithField(exception, provider.Prefix, expression, field.Name); throw exception; } diff --git a/src/Core/DataManager/Expressions/Providers/DefaultExpressionProvider.cs b/src/Core/DataManager/Expressions/Providers/DefaultExpressionProvider.cs index 6ca858964..fc42cf214 100644 --- a/src/Core/DataManager/Expressions/Providers/DefaultExpressionProvider.cs +++ b/src/Core/DataManager/Expressions/Providers/DefaultExpressionProvider.cs @@ -1,4 +1,5 @@ #nullable enable + using System.Collections.Generic; using System.Data; using System.Threading.Tasks; @@ -7,17 +8,17 @@ namespace JJMasterData.Core.DataManager.Expressions.Providers; -public class DefaultExpressionProvider : ISyncExpressionProvider, IAsyncExpressionProvider +public sealed class DefaultExpressionProvider : ISyncExpressionProvider, IAsyncExpressionProvider { public string Prefix => "exp"; public string Title => "Expression"; - - private static readonly DataTable _expressionsDataTable = new(); + + private static readonly DataTable ExpressionsDataTable = new(); public object Evaluate(string expression, Dictionary parsedValues) { var replacedExpression = ExpressionHelper.ReplaceExpression(expression, parsedValues); - var result = _expressionsDataTable.Compute(replacedExpression, string.Empty); + var result = ExpressionsDataTable.Compute(replacedExpression, string.Empty); return result!; } diff --git a/src/Core/DataManager/Expressions/Providers/SqlExpressionProvider.cs b/src/Core/DataManager/Expressions/Providers/SqlExpressionProvider.cs index 9ed186b1b..5a91b0973 100644 --- a/src/Core/DataManager/Expressions/Providers/SqlExpressionProvider.cs +++ b/src/Core/DataManager/Expressions/Providers/SqlExpressionProvider.cs @@ -7,70 +7,21 @@ using JJMasterData.Commons.Data; using JJMasterData.Commons.Data.Entity.Repository.Abstractions; using JJMasterData.Core.DataManager.Expressions.Abstractions; -using JJMasterData.Core.DataManager.Models; namespace JJMasterData.Core.DataManager.Expressions.Providers; -public class SqlExpressionProvider(IEntityRepository entityRepository) : IAsyncExpressionProvider +public sealed class SqlExpressionProvider(IEntityRepository entityRepository) : IAsyncExpressionProvider { public string Prefix => "sql"; public string Title => "SQL"; - + public Guid? ConnectionId { get; set; } + public async Task EvaluateAsync(string expression, Dictionary parsedValues) { - var command = GetParsedDataAccessCommand(expression, parsedValues); + var command = ExpressionDataAccessCommandFactory.Create(expression, parsedValues); - var result = await entityRepository.GetResultAsync(command); + var result = await entityRepository.GetResultAsync(command,ConnectionId); return result; } - - internal static DataAccessCommand GetParsedDataAccessCommand(string expression, Dictionary parsedValues) - { - var command = new DataAccessCommand(); - - foreach (var keyValuePair in parsedValues) - { - DbType dbType; - var parameterName = $"@{keyValuePair.Key}"; - var oldExpression = expression; - - expression = expression.Replace($"'{ExpressionHelper.Begin}{keyValuePair.Key}{ExpressionHelper.End}'", $" {parameterName} "); - - if (oldExpression != expression) - { - dbType = DbType.String; - } - else - { - expression = expression.Replace($"{ExpressionHelper.Begin}{keyValuePair.Key}{ExpressionHelper.End}", $" {parameterName} "); - - dbType = GetDbTypeFromObject(keyValuePair.Value); - } - var value = keyValuePair.Value; - - if (value is string stringValue) - value = stringValue.Trim(); //this prevents erros when coalescing string to numeric values. - - command.AddParameter(parameterName, value, dbType); - } - - command.Sql = expression; - return command; - } - - private static DbType GetDbTypeFromObject(object? value) - { - return value switch - { - int => DbType.Int32, - double => DbType.Double, - decimal => DbType.Decimal, - float => DbType.Double, - string => DbType.String, - DateTime => DbType.DateTime, - bool => DbType.Boolean, - _ => DbType.String - }; - } } diff --git a/src/Core/DataManager/Expressions/Providers/ValueExpressionProvider.cs b/src/Core/DataManager/Expressions/Providers/ValueExpressionProvider.cs index 770614651..f2e26bd52 100644 --- a/src/Core/DataManager/Expressions/Providers/ValueExpressionProvider.cs +++ b/src/Core/DataManager/Expressions/Providers/ValueExpressionProvider.cs @@ -5,7 +5,7 @@ namespace JJMasterData.Core.DataManager.Expressions.Providers; -public class ValueExpressionProvider : IAsyncExpressionProvider, ISyncExpressionProvider +public sealed class ValueExpressionProvider : IAsyncExpressionProvider, ISyncExpressionProvider { public string Prefix => "val"; public string Title => "Value"; diff --git a/src/Core/DataManager/Importation/DataImportationWorker.cs b/src/Core/DataManager/Importation/DataImportationWorker.cs index 8be624ce8..e18650d5f 100644 --- a/src/Core/DataManager/Importation/DataImportationWorker.cs +++ b/src/Core/DataManager/Importation/DataImportationWorker.cs @@ -152,7 +152,7 @@ private async Task RunWorker(DataImportationReporter currentProcess, Cancellatio var parsedSql = ExpressionsService.ReplaceExpressionWithParsedValues(ProcessOptions.CommandBeforeProcess, formStateData); - await EntityRepository.SetCommandAsync(new DataAccessCommand(parsedSql!)); + await EntityRepository.SetCommandAsync(new DataAccessCommand(parsedSql!), FormElement.ConnectionId); } token.ThrowIfCancellationRequested(); @@ -230,7 +230,7 @@ private async Task RunWorker(DataImportationReporter currentProcess, Cancellatio { var parsedSql = ExpressionsService.ReplaceExpressionWithParsedValues(ProcessOptions.CommandAfterProcess, formStateData); - await EntityRepository.SetCommandAsync(new DataAccessCommand(parsedSql!)); + await EntityRepository.SetCommandAsync(new DataAccessCommand(parsedSql!), FormElement.ConnectionId); } if (OnAfterProcessAsync != null) diff --git a/src/Core/DataManager/Models/DataQuery.cs b/src/Core/DataManager/Models/DataQuery.cs new file mode 100644 index 000000000..8d1ed09a1 --- /dev/null +++ b/src/Core/DataManager/Models/DataQuery.cs @@ -0,0 +1,14 @@ +#nullable enable + +using System; +using System.Diagnostics.CodeAnalysis; + +namespace JJMasterData.Core.DataManager.Models; + +public class DataQuery(FormStateData formStateData, Guid? connectionId) +{ + public Guid? ConnectionId { get; } = connectionId; + public FormStateData FormStateData { get; } = formStateData; + public string? SearchText { get; init; } + public string? SearchId { get; init; } +} \ No newline at end of file diff --git a/src/Core/DataManager/Services/AuditLogService.cs b/src/Core/DataManager/Services/AuditLogService.cs index 158a02ae9..49a9014f7 100644 --- a/src/Core/DataManager/Services/AuditLogService.cs +++ b/src/Core/DataManager/Services/AuditLogService.cs @@ -30,8 +30,7 @@ public class AuditLogService(IEntityRepository entityRepository, IOptionsSnapsho public const string DicIp = "ip"; public const string DicBrowser = "browser"; public const string DicJson = "json"; - - private static bool _hasAuditLogTable; + private IEntityRepository EntityRepository { get; } = entityRepository; private IStringLocalizer StringLocalizer { get; } = stringLocalizer; private MasterDataCoreOptions Options { get; } = options.Value; @@ -51,21 +50,16 @@ public async Task LogAsync(Element element,DataContext dataContext, DictionaryformValues) @@ -92,7 +86,7 @@ public static string GetKey(Element element, Dictionaryvalues) return key.ToString(); } - public Element GetElement() + public Element GetElement(Guid? connectionId) { string tableName = Options.AuditLogTableName; var element = new Element(tableName, StringLocalizer["Audit Log"]); @@ -106,23 +100,24 @@ public Element GetElement() element.Fields.Add(DicOrigin, "Origin", FieldType.Int, 1, true, FilterMode.Equal); element.Fields.Add(DicKey, "Record Key", FieldType.Varchar, 100, true, FilterMode.Equal); element.Fields.Add(DicJson, "Object", FieldType.Text, 0, false, FilterMode.None); - + element.ConnectionId = connectionId; + return element; } - public FormElement GetFormElement(string parentElement) + public FormElement GetFormElement(FormElement formElement) { - var formElement = new FormElement(GetElement()); - formElement.Fields[DicId].VisibleExpression = "val:0"; - formElement.Fields[DicName].VisibleExpression = "val:0"; - formElement.Fields[DicBrowser].VisibleExpression = "val:0"; - formElement.Fields[DicJson].VisibleExpression = "val:0"; - formElement.Fields[DicModified].Component = FormComponent.DateTime; - - formElement.Options.GridTableActions.Clear(); - formElement.Options.GridToolbarActions.InsertAction.SetVisible(false); + var auditLogFormElement = new FormElement(GetElement(formElement.ConnectionId)); + auditLogFormElement.Fields[DicId].VisibleExpression = "val:0"; + auditLogFormElement.Fields[DicName].VisibleExpression = "val:0"; + auditLogFormElement.Fields[DicBrowser].VisibleExpression = "val:0"; + auditLogFormElement.Fields[DicJson].VisibleExpression = "val:0"; + auditLogFormElement.Fields[DicModified].Component = FormComponent.DateTime; + + auditLogFormElement.Options.GridTableActions.Clear(); + auditLogFormElement.Options.GridToolbarActions.InsertAction.SetVisible(false); - var origin = formElement.Fields[DicOrigin]; + var origin = auditLogFormElement.Fields[DicOrigin]; origin.Component = FormComponent.ComboBox; origin.DataItem = new FormElementDataItem { @@ -135,7 +130,7 @@ public FormElement GetFormElement(string parentElement) origin.DataItem.Items.Add(item); } - var action = formElement.Fields[DicAction]; + var action = auditLogFormElement.Fields[DicAction]; action.Component = FormComponent.ComboBox; action.DataItem = new FormElementDataItem { @@ -152,10 +147,10 @@ public FormElement GetFormElement(string parentElement) Tooltip = "View" }; btnViewLog.Name = nameof(btnViewLog); - btnViewLog.OnClientClick = $"AuditLogViewHelper.viewAuditLog('{parentElement}','{{{DicId}}}');"; + btnViewLog.OnClientClick = $"AuditLogViewHelper.viewAuditLog('{formElement.Name}','{{{DicId}}}');"; - formElement.Options.GridTableActions.Add(btnViewLog); - return formElement; + auditLogFormElement.Options.GridTableActions.Add(btnViewLog); + return auditLogFormElement; } internal static string GetUpdateColor() diff --git a/src/Core/DataManager/Services/DataItemService.cs b/src/Core/DataManager/Services/DataItemService.cs index b2632bc3d..d81830e0c 100644 --- a/src/Core/DataManager/Services/DataItemService.cs +++ b/src/Core/DataManager/Services/DataItemService.cs @@ -14,12 +14,12 @@ using JJMasterData.Core.DataManager.Expressions; using JJMasterData.Core.DataManager.Expressions.Providers; using JJMasterData.Core.DataManager.Models; -using JJMasterData.Core.Logging; using Microsoft.Extensions.Logging; namespace JJMasterData.Core.DataManager.Services; -public class DataItemService(IEntityRepository entityRepository, +public class DataItemService( + IEntityRepository entityRepository, ExpressionParser expressionParser, ElementMapService elementMapService, ILogger logger) @@ -31,20 +31,18 @@ public class DataItemService(IEntityRepository entityRepository, public async Task> GetValuesAsync( FormElementDataItem dataItem, - FormStateData formStateData, - string? searchText = null, - string? searchId = null) + DataQuery dataQuery) { var dataItemType = GetDataItemType(dataItem); switch (dataItemType) { case DataItemType.Manual: - return GetItemsValues(dataItem, searchId, searchText).ToList(); + return GetItemsValues(dataItem, dataQuery.SearchId, dataQuery.SearchText).ToList(); case DataItemType.SqlCommand: - return await GetSqlCommandValues(dataItem, formStateData, searchId, searchText).ToListAsync(); + return await GetSqlCommandValues(dataItem, dataQuery); case DataItemType.ElementMap: - return await GetElementMapValues(dataItem, formStateData, searchId,searchText).ToListAsync(); + return await GetElementMapValues(dataItem, dataQuery); default: throw new JJMasterDataException("Invalid DataItemType."); } @@ -88,11 +86,17 @@ private static IEnumerable GetItemsValues(FormElementDataItem dat } } - private async IAsyncEnumerable GetElementMapValues(FormElementDataItem dataItem, FormStateData formStateData, string? searchId, string? searchText) + private async Task> GetElementMapValues(FormElementDataItem dataItem, DataQuery dataQuery) { + FormStateData formStateData = dataQuery.FormStateData; + string? searchId = dataQuery.SearchId; + string? searchText = dataQuery.SearchText; + var elementMap = dataItem.ElementMap; var values = await ElementMapService.GetDictionaryList(elementMap!, searchId, formStateData); - + + List result = []; + foreach(var value in values) { var item = new DataItemValue @@ -117,31 +121,39 @@ private async IAsyncEnumerable GetElementMapValues(FormElementDat if (searchText == null || item.Description!.ToLower().Contains(searchText.ToLower())) { - yield return item; + result.Add(item); } } + + return result; } - private async IAsyncEnumerable GetSqlCommandValues(FormElementDataItem dataItem, - FormStateData formStateData, - string? searchId, - string? searchText) + private async Task> GetSqlCommandValues( + FormElementDataItem dataItem, + DataQuery dataQuery) { + FormStateData formStateData = dataQuery.FormStateData; + string? searchId = dataQuery.SearchId; + string? searchText = dataQuery.SearchText; + Guid? connectionId = dataQuery.ConnectionId; + var command = GetDataItemCommand(dataItem, formStateData, searchText, searchId); - DataTable result; + DataTable dataTable; try { - result = await EntityRepository.GetDataTableAsync(command); + dataTable = await EntityRepository.GetDataTableAsync(command, connectionId); } catch (Exception ex) { Logger.LogDataAccessCommandException(ex, command); throw; } + + List result = []; - foreach (DataRow row in result.Rows) + foreach (DataRow row in dataTable.Rows) { var item = new DataItemValue(); item.Id = row[0].ToString()!; @@ -174,9 +186,11 @@ private async IAsyncEnumerable GetSqlCommandValues(FormElementDat if (searchText == null || (item.Description?.ToLower().Contains(searchText.ToLower()) ?? false)) { - yield return item; + result.Add(item); } } + + return result; } private DataAccessCommand GetDataItemCommand(FormElementDataItem dataItem, FormStateData formStateData, string? searchText, @@ -200,6 +214,6 @@ private DataAccessCommand GetDataItemCommand(FormElementDataItem dataItem, FormS var parsedValues = ExpressionParser.ParseExpression(sql, formStateData); - return SqlExpressionProvider.GetParsedDataAccessCommand(sql, parsedValues); + return ExpressionDataAccessCommandFactory.Create(sql, parsedValues); } } \ No newline at end of file diff --git a/src/Core/DataManager/Services/ElementMapService.cs b/src/Core/DataManager/Services/ElementMapService.cs index 800569a57..ebe4b49a8 100644 --- a/src/Core/DataManager/Services/ElementMapService.cs +++ b/src/Core/DataManager/Services/ElementMapService.cs @@ -19,22 +19,21 @@ public class ElementMapService(IDataDictionaryRepository dataDictionaryRepositor public async Task> GetFieldsAsync(DataElementMap elementMap, object? value, FormStateData? formStateData) { var childElement = await DataDictionaryRepository.GetFormElementAsync(elementMap.ElementName); - var filters = await GetFilters(childElement,elementMap, value, formStateData); + var filters = GetFilters(elementMap, value, formStateData); return await EntityRepository.GetFieldsAsync(childElement, filters); } public async Task>> GetDictionaryList(DataElementMap elementMap, object? value, FormStateData formStateData) { var childElement = await DataDictionaryRepository.GetFormElementAsync(elementMap.ElementName); - var filters = await GetFilters(childElement,elementMap, value, formStateData); + var filters = GetFilters(elementMap, value, formStateData); return await EntityRepository.GetDictionaryListAsync(childElement, new EntityParameters { Filters = filters! }); } - private async Task> GetFilters( - FormElement childElement, + private Dictionary GetFilters( DataElementMap elementMap, object? value, FormStateData? formStateData) @@ -49,9 +48,7 @@ private async Task> GetFilters( { if (formStateData != null) { - var field = childElement.Fields[filter.Key]; - var filterParsed = - await ExpressionsService.GetExpressionValueAsync(filter.Value.ToString(), field,formStateData) ?? string.Empty; + var filterParsed = ExpressionsService.GetExpressionValue(filter.Value.ToString(), formStateData) ?? string.Empty; filters[filter.Key] = filterParsed; } } diff --git a/src/Core/DataManager/Services/FieldFormattingService.cs b/src/Core/DataManager/Services/FieldFormattingService.cs index 0d9e9cc28..3d1965c38 100644 --- a/src/Core/DataManager/Services/FieldFormattingService.cs +++ b/src/Core/DataManager/Services/FieldFormattingService.cs @@ -18,12 +18,13 @@ public class FieldFormattingService(DataItemService dataItemService, LookupServi private DataItemService DataItemService { get; } = dataItemService; private LookupService LookupService { get; } = lookupService; - public async Task FormatGridValueAsync(FormElementField field, Dictionary values, Dictionary userValues) + public async Task FormatGridValueAsync( + FormElementFieldSelector fieldSelector, + FormStateData formStateData) { - if (field == null) - throw new ArgumentNullException(nameof(field), "FormElementField cannot be null"); + var field = fieldSelector.Field; - values.TryGetValue(field.Name, out var value); + formStateData.Values.TryGetValue(field.Name, out var value); if (value == null || value == DBNull.Value) return string.Empty; @@ -54,18 +55,20 @@ public async Task FormatGridValueAsync(FormElementField field, Dictionar case FormComponent.Lookup when field.DataItem is { GridBehavior: not DataItemGridBehavior.Id}: var allowOnlyNumerics = field.DataType is FieldType.Int or FieldType.Float; - var formData = new FormStateData(values, PageState.List); - stringValue = await LookupService.GetDescriptionAsync(field.DataItem.ElementMap!, formData, value.ToString(), allowOnlyNumerics); + stringValue = await LookupService.GetDescriptionAsync(field.DataItem.ElementMap!, formStateData, value.ToString(), allowOnlyNumerics); break; case FormComponent.CheckBox: stringValue = StringManager.ParseBool(value) ? "Sim" : "Não"; break; case FormComponent.Search or FormComponent.ComboBox or FormComponent.RadioButtonGroup when field.DataItem is { GridBehavior: not DataItemGridBehavior.Id }: - var searchFormData = new FormStateData(values, userValues, PageState.List); - - values.TryGetValue(field.Name, out var searchId); - var searchBoxValues = await DataItemService.GetValuesAsync(field.DataItem, searchFormData, null, searchId?.ToString()); + + var dataQuery = new DataQuery(formStateData, fieldSelector.FormElement.ConnectionId) + { + SearchId = value?.ToString() + }; + + var searchBoxValues = await DataItemService.GetValuesAsync(field.DataItem, dataQuery); var rowValue = searchBoxValues.FirstOrDefault(v => v.Id == value?.ToString()); return rowValue?.Description ?? rowValue?.Id ?? string.Empty; diff --git a/src/Core/DataManager/Services/FieldValuesService.cs b/src/Core/DataManager/Services/FieldValuesService.cs index d649afc1d..e2547caf7 100644 --- a/src/Core/DataManager/Services/FieldValuesService.cs +++ b/src/Core/DataManager/Services/FieldValuesService.cs @@ -19,8 +19,7 @@ public class FieldValuesService(ExpressionsService expressionsService) /// Apply default and triggers expression values /// /// - /// Form values - /// FormStateData + /// Form values /// Change the field's default value even if it is empty /// /// Returns a new Dictionary with the updated values @@ -50,7 +49,8 @@ public class FieldValuesService(ExpressionsService expressionsService) foreach (var field in fieldsWithDefaultValue) { - var defaultValue = await ExpressionsService.GetDefaultValueAsync(field, formStateData); + var fieldSelector = new FormElementFieldSelector(formElement, field.Name); + var defaultValue = await ExpressionsService.GetDefaultValueAsync(fieldSelector, formStateData); if (!string.IsNullOrEmpty(defaultValue?.ToString())) { defaultValues.Add(field.Name, defaultValue); @@ -108,7 +108,8 @@ private async Task ApplyTriggerValues(FormElement formElement, FormStateData for foreach (var field in fieldsWithTrigger) { - var value = await ExpressionsService.GetTriggerValueAsync(field, formStateData); + var fieldSelector = new FormElementFieldSelector(formElement, field.Name); + var value = await ExpressionsService.GetTriggerValueAsync(fieldSelector, formStateData); if (value != null) { formStateData.Values[field.Name] = value; diff --git a/src/Core/DataManager/Services/FieldsService.cs b/src/Core/DataManager/Services/FieldsService.cs index 11ea39c9b..aee64ec59 100644 --- a/src/Core/DataManager/Services/FieldsService.cs +++ b/src/Core/DataManager/Services/FieldsService.cs @@ -25,9 +25,9 @@ public string ValidateField(FormElementField field, string fieldId, string value return FieldValidationService.ValidateField(field, fieldId, value, enableErrorLink); } - public Task FormatGridValueAsync(FormElementField field, Dictionary values, Dictionary userValues) + public Task FormatGridValueAsync(FormElementFieldSelector fieldSelector, FormStateData formStateData) { - return FieldFormattingService.FormatGridValueAsync(field, values, userValues); + return FieldFormattingService.FormatGridValueAsync(fieldSelector, formStateData); } public static string FormatValue(FormElementField field, object value) diff --git a/src/Core/Logging/LogMessages.cs b/src/Core/Logging/LogMessages.cs index 9d3a77d16..8118bd901 100644 --- a/src/Core/Logging/LogMessages.cs +++ b/src/Core/Logging/LogMessages.cs @@ -1,6 +1,7 @@ #nullable enable using System; using JJMasterData.Commons.Data; +using JJMasterData.Core.DataDictionary.Models; using Microsoft.Extensions.Logging; namespace JJMasterData.Core.Logging; @@ -60,4 +61,14 @@ internal static partial void LogExpressionErrorWithField( string provider, string? expression, string? fieldName); + + [LoggerMessage( + EventId = 7, + Message = "Error recovering DataSource at GridView.\nElement Name: {ElementName}.", + Level = LogLevel.Error)] + internal static partial void LogGridViewDataSourceException( + this ILogger logger, + Exception exception, + string elementName + ); } \ No newline at end of file diff --git a/src/Core/UI/Components/Actions/ActionButtonFactory.cs b/src/Core/UI/Components/Actions/ActionButtonFactory.cs index 1bb52b8bb..6c03efab0 100644 --- a/src/Core/UI/Components/Actions/ActionButtonFactory.cs +++ b/src/Core/UI/Components/Actions/ActionButtonFactory.cs @@ -96,7 +96,7 @@ public JJLinkButton CreateGridToolbarButton(BasicAction action, JJGridView gridV case ConfigAction: button.OnClientClick = BootstrapHelper.GetModalScript($"config-modal-{actionContext.ParentComponentName}"); break; - case DeleteSelectedRowsAction or AuditLogGridToolbarAction: + case AuditLogGridToolbarAction: button.OnClientClick = ActionScripts.GetFormActionScript(actionContext, ActionSource.GridToolbar); break; diff --git a/src/Core/UI/Components/AuditLog/JJAuditLogView.cs b/src/Core/UI/Components/AuditLog/JJAuditLogView.cs index 6e826b67c..f097b5957 100644 --- a/src/Core/UI/Components/AuditLog/JJAuditLogView.cs +++ b/src/Core/UI/Components/AuditLog/JJAuditLogView.cs @@ -195,7 +195,7 @@ private async Task GetLogDetailsHtmlAsync(string logId) var filter = new Dictionary { { AuditLogService.DicId, logId } }; - var values = await EntityRepository.GetFieldsAsync(AuditLogService.GetElement(), filter); + var values = await EntityRepository.GetFieldsAsync(AuditLogService.GetElement(FormElement.ConnectionId), filter); var json = values[AuditLogService.DicJson]?.ToString(); var recordsKey = values[AuditLogService.DicKey]?.ToString(); var auditLogValues = JsonConvert.DeserializeObject>(json ?? string.Empty); @@ -226,7 +226,7 @@ private async Task GetLogDetailsHtmlAsync(string logId) divFields.Append(HtmlTag.Div, group => { group.WithAttribute("id", "sortable-grid"); - group.WithCssClass("list-group sortable-grid"); + group.WithCssClass("list-group jj-list-group sortable-grid"); group.Append(logListGroupHtml); }); }); @@ -262,7 +262,7 @@ private async Task GetDetailsPanel(string logId) { var filter = new Dictionary { { AuditLogService.DicId, logId } }; - var values = await EntityRepository.GetFieldsAsync(AuditLogService.GetElement(), filter); + var values = await EntityRepository.GetFieldsAsync(AuditLogService.GetElement(FormElement.ConnectionId), filter); string json = values[AuditLogService.DicJson].ToString(); var fields = JsonConvert.DeserializeObject>(json); @@ -280,7 +280,7 @@ private JJGridView CreateGridViewLog() if (FormElement == null) throw new ArgumentNullException(nameof(FormElement)); - var gridViewFormElement = AuditLogService.GetFormElement(FormElement.Name); + var gridViewFormElement = AuditLogService.GetFormElement(FormElement); gridViewFormElement.ParentName = FormElement.ParentName; var grid = _componentFactory.GridView.Create(gridViewFormElement); grid.FormElement.Title = FormElement.Title; @@ -400,7 +400,7 @@ private async Task GetLogListGroupHtml(string recordsKey, string vi $"javascript:AuditLogViewHelper.loadAuditLog('{FormElement.ParentName}','{logId}', '{encryptedRouteContext}')"); a.WithNameAndId(logId); a.WithCssClass("list-group-item ui-sortable-handle"); - a.WithCssClassIf(logId.Equals(viewId), "active"); + a.WithCssClassIf(logId!.Equals(viewId), "active"); a.Append(HtmlTag.Div, div => { diff --git a/src/Core/UI/Components/ComponentContext.cs b/src/Core/UI/Components/ComponentContext.cs index 9b2df5424..19f9cc447 100644 --- a/src/Core/UI/Components/ComponentContext.cs +++ b/src/Core/UI/Components/ComponentContext.cs @@ -15,10 +15,6 @@ public enum ComponentContext GridViewFilterReload, - /// - /// The component is requesting a JJSearchBox result from a GridView filter - /// - GridViewFilterSearchBox, /// /// Reloads the current JJDataPanel @@ -42,6 +38,12 @@ public enum ComponentContext /// The component is requesting a JJSearchBox result /// SearchBox, + + /// + /// The component is requesting a JJSearchBox result from a PageState.Filter + /// + SearchBoxFilter, + DownloadFile, AuditLogView, diff --git a/src/Core/UI/Components/Controls/ComboBox/ComboBoxFactory.cs b/src/Core/UI/Components/Controls/ComboBox/ComboBoxFactory.cs index e74c427a1..1300c9a7b 100644 --- a/src/Core/UI/Components/Controls/ComboBox/ComboBoxFactory.cs +++ b/src/Core/UI/Components/Controls/ComboBox/ComboBoxFactory.cs @@ -34,6 +34,7 @@ public JJComboBox Create(FormElement formElement, FormElementField field, Contro throw new ArgumentNullException(nameof(field.DataItem)); var comboBox = Create(); + comboBox.ConnectionId = formElement.ConnectionId; comboBox.DataItem = field.DataItem; comboBox.Name = field.Name; comboBox.Visible = true; diff --git a/src/Core/UI/Components/Controls/ComboBox/JJComboBox.cs b/src/Core/UI/Components/Controls/ComboBox/JJComboBox.cs index 264ce8a2e..582eccbd3 100644 --- a/src/Core/UI/Components/Controls/ComboBox/JJComboBox.cs +++ b/src/Core/UI/Components/Controls/ComboBox/JJComboBox.cs @@ -16,14 +16,17 @@ namespace JJMasterData.Core.UI.Components; -public class JJComboBox : ControlBase +public class JJComboBox : ControlBase, IDataItemControl, IFloatingLabelControl { private string? _selectedValue; private IStringLocalizer StringLocalizer { get; } private DataItemService DataItemService { get; } internal ILogger Logger { get; } - internal FormStateData FormStateData { get; set; } + + public Guid? ConnectionId { get; set; } + + public FormStateData FormStateData{ get; set; } public string? Id { get; set; } @@ -49,6 +52,9 @@ public string? SelectedValue } public bool EnableLocalization { get; set; } = true; + + public string? FloatingLabel { get; set; } + public bool UseFloatingLabel { get; set; } public JJComboBox( IFormValues formValues, @@ -101,6 +107,17 @@ private HtmlBuilder GetSelectHtml(List values) .WithAttributes(Attributes) .AppendRange(GetOptions(values)); + if (UseFloatingLabel) + { + return new Div().WithCssClass("form-floating") + .Append(select) + .AppendLabel(label => + { + label.AppendText(FloatingLabel); + label.WithAttribute("for", Name); + }); + } + return select; } @@ -150,7 +167,7 @@ private HtmlBuilder CreateOption(DataItemValue value) } var content = new HtmlBuilder(); - content.AppendComponentIf(DataItem.ShowIcon, new JJIcon(value.Icon, value.IconColor)); + content.AppendComponentIf(DataItem.ShowIcon, ()=> new JJIcon(value.Icon, value.IconColor)); content.Append(HtmlTag.Span, span => { span.AppendText(label); @@ -214,7 +231,7 @@ private string GetSelectedText(IEnumerable list) public Task> GetValuesAsync() { - return DataItemService.GetValuesAsync(DataItem, FormStateData); + return DataItemService.GetValuesAsync(DataItem, new DataQuery(FormStateData, ConnectionId)); } @@ -257,7 +274,11 @@ public Task> GetValuesAsync() public async Task GetValueAsync(string? searchId) { - var values = await DataItemService.GetValuesAsync(DataItem, FormStateData, null, searchId); + var dataQuery = new DataQuery(FormStateData, ConnectionId) + { + SearchId = searchId + }; + var values = await DataItemService.GetValuesAsync(DataItem, dataQuery); return values.FirstOrDefault(v => v.Id == searchId); } diff --git a/src/Core/UI/Components/Controls/IControlFactoryOfT.cs b/src/Core/UI/Components/Controls/IControlFactoryOfT.cs index df4ad5814..f78e08137 100644 --- a/src/Core/UI/Components/Controls/IControlFactoryOfT.cs +++ b/src/Core/UI/Components/Controls/IControlFactoryOfT.cs @@ -9,7 +9,8 @@ namespace JJMasterData.Core.UI.Components; public interface IControlFactory where TControl : ControlBase { public TControl Create(); - internal TControl Create(FormElement formElement, + internal TControl Create( + FormElement formElement, FormElementField field, ControlContext context); } \ No newline at end of file diff --git a/src/Core/UI/Components/Controls/IDataItemControl.cs b/src/Core/UI/Components/Controls/IDataItemControl.cs new file mode 100644 index 000000000..d717e0fbd --- /dev/null +++ b/src/Core/UI/Components/Controls/IDataItemControl.cs @@ -0,0 +1,14 @@ +using System; +using JJMasterData.Core.DataDictionary.Models; +using JJMasterData.Core.DataManager.Models; + +namespace JJMasterData.Core.UI.Components; + +internal interface IDataItemControl +{ + public Guid? ConnectionId { get; set; } + + public FormElementDataItem DataItem { get; set; } + + internal FormStateData FormStateData { get; set; } +} \ No newline at end of file diff --git a/src/Core/UI/Components/Controls/IFloatingLabelControl.cs b/src/Core/UI/Components/Controls/IFloatingLabelControl.cs new file mode 100644 index 000000000..a5a891c75 --- /dev/null +++ b/src/Core/UI/Components/Controls/IFloatingLabelControl.cs @@ -0,0 +1,8 @@ +#nullable enable +namespace JJMasterData.Core.UI.Components; + +public interface IFloatingLabelControl +{ + public string? FloatingLabel { get; set; } + public bool UseFloatingLabel { get; set; } +} \ No newline at end of file diff --git a/src/Core/UI/Components/Controls/RadioButton/JJRadioButtonGroup.cs b/src/Core/UI/Components/Controls/RadioButton/JJRadioButtonGroup.cs index 5b0e4d19f..ea9e53efc 100644 --- a/src/Core/UI/Components/Controls/RadioButton/JJRadioButtonGroup.cs +++ b/src/Core/UI/Components/Controls/RadioButton/JJRadioButtonGroup.cs @@ -1,4 +1,5 @@ #nullable enable +using System; using System.Collections.Generic; using System.Threading.Tasks; using JJMasterData.Core.DataDictionary.Models; @@ -11,9 +12,8 @@ namespace JJMasterData.Core.UI.Components; public class JJRadioButtonGroup( DataItemService dataItemService, - IFormValues formValues) : ControlBase(formValues) + IFormValues formValues) : ControlBase(formValues), IDataItemControl { - public FormElementDataItem DataItem { get; set; } = null!; private DataItemService DataItemService { get; } = dataItemService; private string? _selectedValue; public string? SelectedValue @@ -29,7 +29,9 @@ public string? SelectedValue } set => _selectedValue = value; } - + + public FormElementDataItem DataItem { get; set; } = null!; + public Guid? ConnectionId { get; set; } public FormStateData FormStateData { get; set; } = null!; protected override async Task BuildResultAsync() @@ -50,7 +52,7 @@ protected override async Task BuildResultAsync() public Task> GetValuesAsync() { - return DataItemService.GetValuesAsync(DataItem,FormStateData); + return DataItemService.GetValuesAsync(DataItem, new DataQuery(FormStateData, ConnectionId)); } private void AppendRadioButton(HtmlBuilder html, DataItemValue item) diff --git a/src/Core/UI/Components/Controls/RadioButton/RadioButtonGroupFactory.cs b/src/Core/UI/Components/Controls/RadioButton/RadioButtonGroupFactory.cs index 65700ee4d..3936603c9 100644 --- a/src/Core/UI/Components/Controls/RadioButton/RadioButtonGroupFactory.cs +++ b/src/Core/UI/Components/Controls/RadioButton/RadioButtonGroupFactory.cs @@ -18,6 +18,7 @@ public JJRadioButtonGroup Create(FormElement formElement, FormElementField field { var radioButtonGroup = Create(); radioButtonGroup.DataItem = field.DataItem!; + radioButtonGroup.ConnectionId = formElement.ConnectionId; radioButtonGroup.Name = field.Name; radioButtonGroup.Visible = true; radioButtonGroup.FormStateData = context.FormStateData; diff --git a/src/Core/UI/Components/Controls/SearchBox/JJSearchBox.cs b/src/Core/UI/Components/Controls/SearchBox/JJSearchBox.cs index 531ae1e9f..29af6f6b8 100644 --- a/src/Core/UI/Components/Controls/SearchBox/JJSearchBox.cs +++ b/src/Core/UI/Components/Controls/SearchBox/JJSearchBox.cs @@ -20,7 +20,7 @@ namespace JJMasterData.Core.UI.Components; /// /// Represents a searchable combobox. /// -public class JJSearchBox : ControlBase +public class JJSearchBox : ControlBase, IDataItemControl { #region "Events" @@ -166,11 +166,7 @@ public bool ScrollBar return _selectedValue; } - - - public FormElementDataItem DataItem { get; set; } - - + /// /// Ao recarregar o painel, manter os valores digitados no formulário /// (Default=True) @@ -180,7 +176,10 @@ public bool ScrollBar private IHttpRequest Request { get; } private IEncryptionService EncryptionService { get; } private DataItemService DataItemService { get; } - public FormStateData FormStateData { get; internal set; } + + public Guid? ConnectionId { get; set; } + public FormElementDataItem DataItem { get; set; } + public FormStateData FormStateData { get; set; } public string SelectedValue { @@ -242,7 +241,7 @@ protected override Task BuildResultAsync() { var fieldName = Request.QueryString["fieldName"]; - if (ComponentContext is ComponentContext.SearchBox && FieldName == fieldName) + if (ComponentContext is ComponentContext.SearchBox or ComponentContext.SearchBoxFilter && FieldName == fieldName) { return GetItemsResult(); } @@ -315,7 +314,7 @@ private string GetQueryString() var url = new StringBuilder(); var componentContext = FormStateData.PageState is PageState.Filter - ? ComponentContext.GridViewFilterSearchBox + ? ComponentContext.SearchBoxFilter : ComponentContext.SearchBox; var context = new RouteContext(ElementName, ParentElementName, componentContext); @@ -344,7 +343,11 @@ private string GetQueryString() } else { - _values ??= await DataItemService.GetValuesAsync(DataItem, FormStateData, null, searchId); + var dataQuery = new DataQuery(FormStateData, ConnectionId) + { + SearchId = searchId + }; + _values ??= await DataItemService.GetValuesAsync(DataItem, dataQuery); } var item = _values?.ToList().Find(x => x.Id.Equals(searchId)); @@ -372,7 +375,11 @@ private async Task> GetValuesAsync(string? searchText) } else { - list.AddRange(await DataItemService.GetValuesAsync(DataItem, FormStateData, searchText)); + var dataQuery = new DataQuery(FormStateData, ConnectionId) + { + SearchText = searchText + }; + list.AddRange(await DataItemService.GetValuesAsync(DataItem, dataQuery)); } return list; diff --git a/src/Core/UI/Components/Controls/SearchBox/SearchBoxFactory.cs b/src/Core/UI/Components/Controls/SearchBox/SearchBoxFactory.cs index c019f91d5..7f6871025 100644 --- a/src/Core/UI/Components/Controls/SearchBox/SearchBoxFactory.cs +++ b/src/Core/UI/Components/Controls/SearchBox/SearchBoxFactory.cs @@ -8,16 +8,13 @@ namespace JJMasterData.Core.UI.Components; -internal class SearchBoxFactory(DataItemService dataItemService, - IDataDictionaryRepository dataDictionaryRepository, - FormValuesService formValuesService, +internal class SearchBoxFactory( + DataItemService dataItemService, IHttpRequest httpRequest, IEncryptionService encryptionService) : IControlFactory { private DataItemService DataItemService { get; } = dataItemService; - private IDataDictionaryRepository DataDictionaryRepository { get; } = dataDictionaryRepository; - private FormValuesService FormValuesService { get; } = formValuesService; private IHttpRequest HttpRequest { get; } = httpRequest; private IEncryptionService EncryptionService { get; } = encryptionService; @@ -34,6 +31,7 @@ public JJSearchBox Create(FormElement formElement, FormElementField field, Contr var search = new JJSearchBox(HttpRequest, EncryptionService, DataItemService) { DataItem = field.DataItem, + ConnectionId = formElement.ConnectionId, Name = field.Name, FieldName = field.Name, ParentElementName = formElement.ParentName, diff --git a/src/Core/UI/Components/Controls/TextArea/JJTextArea.cs b/src/Core/UI/Components/Controls/TextArea/JJTextArea.cs index 36211338e..6cc708423 100644 --- a/src/Core/UI/Components/Controls/TextArea/JJTextArea.cs +++ b/src/Core/UI/Components/Controls/TextArea/JJTextArea.cs @@ -6,8 +6,12 @@ namespace JJMasterData.Core.UI.Components; -public class JJTextArea : ControlBase +public class JJTextArea : ControlBase, IFloatingLabelControl { + + public string FloatingLabel { get; set; } + public bool UseFloatingLabel { get; set; } + private IStringLocalizer StringLocalizer { get; } public int Rows { get; set; } @@ -27,7 +31,7 @@ protected override Task BuildResultAsync() public HtmlBuilder GetHtmlBuilder() { - var html = new HtmlBuilder(HtmlTag.TextArea) + var textArea = new HtmlBuilder(HtmlTag.TextArea) .WithAttributes(Attributes) .WithNameAndId(Name) .WithCssClass(CssClass) @@ -42,6 +46,20 @@ public HtmlBuilder GetHtmlBuilder() .WithAttributeIf(!Enabled, "disabled", "disabled") .AppendText(Text); - return html; + if (UseFloatingLabel) + { + textArea.WithSingleAttribute("placeholder"); + + return new Div() + .WithCssClass("form-floating") + .Append(textArea) + .AppendLabel(label => + { + label.AppendText(FloatingLabel); + label.WithAttribute("for",Name); + }); + } + + return textArea; } } \ No newline at end of file diff --git a/src/Core/UI/Components/Controls/TextBox/JJTextGroup.cs b/src/Core/UI/Components/Controls/TextBox/JJTextGroup.cs index 139fbd762..79a81f609 100644 --- a/src/Core/UI/Components/Controls/TextBox/JJTextGroup.cs +++ b/src/Core/UI/Components/Controls/TextBox/JJTextGroup.cs @@ -6,8 +6,13 @@ namespace JJMasterData.Core.UI.Components; -public class JJTextGroup(IComponentFactory linkButtonGroupFactory, IFormValues formValues) : JJTextBox(formValues) +public class JJTextGroup(IComponentFactory linkButtonGroupFactory, IFormValues formValues) + : JJTextBox(formValues), IFloatingLabelControl { + public string FloatingLabel { get; set; } + + public bool UseFloatingLabel { get; set; } + /// /// Actions of input /// @@ -46,6 +51,18 @@ public override HtmlBuilder GetHtmlBuilder() if (!hasAction && !hasAddons) { + if (UseFloatingLabel) + { + input.WithSingleAttribute("placeholder"); + return new Div().WithCssClass("form-floating") + .Append(input) + .AppendLabel(label => + { + label.AppendText(FloatingLabel); + label.WithAttribute("for", Name); + }); + } + return input; } @@ -62,11 +79,27 @@ public override HtmlBuilder GetHtmlBuilder() if (hasAddons) inputGroup.Append(GetHtmlAddons()); - inputGroup.Append(input); - if (hasAction) AddActionsAt(inputGroup); + if (UseFloatingLabel) + { + input.WithSingleAttribute("placeholder"); + inputGroup.AppendDiv(div => + { + div.WithCssClass("form-floating"); + div.Append(input); + div.AppendLabel(label => + { + label.AppendText(FloatingLabel); + label.WithAttribute("for", Name); + }); + }); + return inputGroup; + } + + inputGroup.Append(input); + return inputGroup; } @@ -87,6 +120,10 @@ private void AddActionsAt(HtmlBuilder inputGroup) var btnGroup = linkButtonGroupFactory.Create(); btnGroup.Actions = Actions; + + if (UseFloatingLabel) + Actions.ForEach(a=>a.CssClass += "btn-floating-action"); + btnGroup.ShowAsButton = true; //Add builder Actions @@ -104,7 +141,4 @@ private HtmlBuilder GetHtmlAddons() return html; } - - - } diff --git a/src/Core/UI/Components/DataPanel/DataPanelControl.cs b/src/Core/UI/Components/DataPanel/DataPanelControl.cs index 8eff31e99..c9dce6886 100644 --- a/src/Core/UI/Components/DataPanel/DataPanelControl.cs +++ b/src/Core/UI/Components/DataPanel/DataPanelControl.cs @@ -112,12 +112,13 @@ private async Task GetHtmlFormVertical(List field int lineGroup = int.MinValue; HtmlBuilder? row = null; var formData = new FormStateData(Values, UserValues, PageState); + foreach (var field in fields) { bool visible = ExpressionsService.GetBoolValue(field.VisibleExpression, formData); if (!visible) continue; - + object? value = null; if (Values != null && Values.ContainsKey(field.Name)) value = FieldsService.FormatValue(field, Values[field.Name]); @@ -129,10 +130,10 @@ private async Task GetHtmlFormVertical(List field html.Append(row); } - var htmlField = new Div() + var formGroup = new Div() .WithCssClass(BootstrapHelper.FormGroup); - row?.Append(htmlField); + row?.Append(formGroup); string? fieldClass; @@ -147,47 +148,29 @@ private async Task GetHtmlFormVertical(List field else fieldClass = colClass; } - htmlField.WithCssClass(fieldClass); + formGroup.WithCssClass(fieldClass); if (BootstrapHelper.Version == 3 && Errors != null && Errors.ContainsKey(field.Name)) - htmlField.WithCssClass("has-error"); + formGroup.WithCssClass("has-error"); if (PageState == PageState.View && FormUI.ShowViewModeAsStatic) - htmlField.WithCssClass("jjborder-static"); + formGroup.WithCssClass("jjborder-static"); - if (field.Component is not FormComponent.CheckBox && !field.FloatingLabel) - { - var label = CreateLabel(field, IsRange(field, PageState)); - htmlField.AppendComponent(label); - } + var useFloatingLabel = FormElement.Options.UseFloatingLabels && field.SupportsFloatingLabel(); - if(field.FloatingLabel) - field.SetAttr("placeholder",field.LabelOrName); - - HtmlBuilder parentDiv; - - if (field.FloatingLabel) + if (field.Component is not FormComponent.CheckBox && !useFloatingLabel) { - var formFloating = new Div().WithCssClass("form-floating"); - htmlField.Append(formFloating); - parentDiv = formFloating; + var label = CreateLabel(field, IsRange(field, PageState)); + formGroup.AppendComponent(label); } - else - parentDiv = htmlField; if (IsViewModeAsStatic) - parentDiv.Append(await GetStaticField(field)); + formGroup.Append(await GetStaticField(field)); else { var controlHtml = await GetControlFieldHtml(field, value); - if(field.FloatingLabel && !string.IsNullOrEmpty(field.HelpDescription)) - controlHtml.WithToolTip(StringLocalizer[field.HelpDescription!]); - parentDiv.Append(controlHtml); + formGroup.Append(controlHtml); } - - if (field.FloatingLabel) - parentDiv.Append(CreateFloatingLabel(field, IsRange(field,PageState))); - } return html; @@ -207,19 +190,10 @@ private async Task GetHtmlFormHorizontal(List fie var formData = new FormStateData(Values, UserValues, PageState); foreach (var field in fields) { - var fieldClass = GetHorizontalFieldClass(colCount); - var labelClass = GetHorizontalLabelClass(colCount); - + var labelClass = "col-sm-2"; + var fieldClass = GetHorizontalFieldClass(cols); var hasCssClass = !string.IsNullOrEmpty(field.CssClass); - if (hasCssClass) - fieldClass = field.CssClass; - - if (BootstrapHelper.Version > 3) - { - labelClass += " d-flex justify-content-end align-items-center"; - fieldClass += " d-flex justify-content-start align-items-center"; - } - + //Visible expression bool visible = ExpressionsService.GetBoolValue(field.VisibleExpression, formData); if (!visible) @@ -229,11 +203,11 @@ private async Task GetHtmlFormHorizontal(List fie object? value = null; if (Values != null && Values.TryGetValue(field.Name, out var nonFormattedValue)) value = FieldsService.FormatValue(field, nonFormattedValue); - - var label = CreateLabel(field, IsRange(field, PageState)); - label.CssClass = labelClass; - + + var isRange = IsRange(field, PageState); + var label = CreateLabel(field, isRange); var cssClass = string.Empty; + if (BootstrapHelper.Version == 3 && Errors != null && Errors.ContainsKey(field.Name)) cssClass += " has-error"; @@ -246,12 +220,22 @@ private async Task GetHtmlFormHorizontal(List fie html.Append(row); } - - string? colClass = fieldClass; + + if (isRange) + { + if (field.Component is FormComponent.Date) + fieldClass = "col-sm-6"; + else + fieldClass = "col-sm-10"; + } + + if (hasCssClass) + fieldClass = field.CssClass; + if (field.Component is FormComponent.TextArea) { colCount = 1; - colClass = GetHorizontalTextAreaClass(cols); + fieldClass = GetHorizontalTextAreaClass(cols); } else if (field.Component is FormComponent.CheckBox) { @@ -263,14 +247,21 @@ private async Task GetHtmlFormHorizontal(List fie { colCount++; } - + + if (BootstrapHelper.Version > 3) + { + labelClass += " d-flex justify-content-end align-items-center"; + fieldClass += " d-flex justify-content-start align-items-center"; + } + + label.CssClass = labelClass; + row?.WithCssClass(cssClass) .AppendComponent(label); - - + await row?.AppendAsync(HtmlTag.Div, async col => { - col.WithCssClass(colClass); + col.WithCssClass(fieldClass); col.Append(IsViewModeAsStatic ? await GetStaticField(field) : await GetControlFieldHtml(field, value)); })!; @@ -278,16 +269,7 @@ private async Task GetHtmlFormHorizontal(List fie return html; } - - private static string GetHorizontalLabelClass(int cols) => cols switch - { - 1 => "col-sm-2", - 2 => "col-sm-2", - 3 => "col-sm-2", - 4 => "col-sm-1", - _ => throw new ArgumentException("Invalid number of columns", nameof(cols)) - }; - + private static string GetHorizontalFieldClass(int cols) => cols switch { //With spaces of 12 subtracting from the label, we consider: @@ -324,23 +306,12 @@ private JJLabel CreateLabel(FormElementField field, bool isRange) return label; } - private HtmlBuilder CreateFloatingLabel(FormElementField field, bool isRange) - { - var label = new HtmlBuilder(HtmlTag.Label); - var fieldName = GetFieldNameWithPrefix(field); - - if (isRange) - fieldName += "_from"; - - label.WithAttribute("for", fieldName); - label.AppendText(field.LabelOrName); - return label; - } private async Task GetStaticField(FormElementField field) { - var staticValue = await FieldsService.FormatGridValueAsync(field, Values, UserValues); + var fieldSelector = new FormElementFieldSelector(FormElement, field.Name); + var staticValue = await FieldsService.FormatGridValueAsync(fieldSelector, FormStateData); var html = new HtmlBuilder(HtmlTag.P) .WithCssClass("form-control-static") .AppendText(field.EncodeHtml ? HttpUtility.HtmlEncode(staticValue) : staticValue); @@ -361,7 +332,7 @@ private Task GetControlFieldHtml(FormElementField field, object? va if (BootstrapHelper.Version > 3 && Errors.ContainsKey(field.Name)) control.CssClass = "is-invalid"; - if (field.AutoPostBack && PageState is PageState.Insert or PageState.Update) + if (field.AutoPostBack && PageState is PageState.Insert or PageState.Update or PageState.Filter) control.SetAttr("onchange", GetScriptReload(field)); if(control is JJTextGroup textGroup && PageState is PageState.View) @@ -370,6 +341,14 @@ private Task GetControlFieldHtml(FormElementField field, object? va if(control is JJTextFile file) file.ParentName = FormElement.Name; + + var useFloatingLabels = FormUI.IsVerticalLayout && FormElement.Options.UseFloatingLabels; + + if (useFloatingLabels && control is IFloatingLabelControl floatingLabelControl) + { + floatingLabelControl.FloatingLabel = StringLocalizer[field.LabelOrName]; + floatingLabelControl.UseFloatingLabel = field.SupportsFloatingLabel(); + } if (PageState != PageState.Filter) return control.GetHtmlBuilderAsync(); diff --git a/src/Core/UI/Components/DataPanel/DataPanelLayout.cs b/src/Core/UI/Components/DataPanel/DataPanelLayout.cs index 0ae370f02..12c9dcaa7 100644 --- a/src/Core/UI/Components/DataPanel/DataPanelLayout.cs +++ b/src/Core/UI/Components/DataPanel/DataPanelLayout.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using JetBrains.Annotations; using JJMasterData.Commons.Security.Hashing; using JJMasterData.Core.DataDictionary.Models; using JJMasterData.Core.DataManager.Expressions; @@ -26,52 +27,54 @@ internal class DataPanelLayout(JJDataPanel dataPanel) private PageState PageState { get; } = dataPanel.PageState; private ExpressionsService ExpressionsService { get; } = dataPanel.ExpressionsService; - - public async IAsyncEnumerable GetHtmlPanelList() + public async Task> GetHtmlPanelList() { - await foreach (var panel in GetTabPanels()) - yield return panel; + List panels = []; - await foreach (var nonTabPanel in GetNonTabPanels()) - yield return nonTabPanel; + panels.Add(await GetTabPanelsHtml()); + panels.AddRange(await GetNonTabPanels()); + panels.AddRange(await GetFieldsWithoutPanel()); - await foreach (var fieldWithoutPanel in GetFieldsWithoutPanel()) - yield return fieldWithoutPanel; + return panels; } - private async IAsyncEnumerable GetTabPanels() + [ItemCanBeNull] + private async Task GetTabPanelsHtml() { - + List tabPanels = []; var tabs = FormElement.Panels.FindAll(x => x.Layout == PanelLayout.Tab); if (tabs.Count <= 0) - yield break; + return null; var navTab = await GetTabNav(tabs); - yield return navTab.GetHtmlBuilder(); + return navTab.GetHtmlBuilder(); } - private async IAsyncEnumerable GetNonTabPanels() + private async Task> GetNonTabPanels() { + List htmlList = []; foreach (var panel in FormElement.Panels.Where(p => p.Layout != PanelLayout.Tab)) { var htmlPanel = await GetHtmlPanelGroup(panel); if (htmlPanel != null) - yield return htmlPanel; + htmlList.Add(htmlPanel); } + + return htmlList; } - private async IAsyncEnumerable GetFieldsWithoutPanel() + private async Task> GetFieldsWithoutPanel() { + List htmlList = []; bool dontContainsVisibleFields = !FormElement.Fields.ToList() - .Exists(x => x.PanelId == 0 && ExpressionsService.GetBoolValue(x.VisibleExpression,DataPanelControl.FormStateData)); - + .Exists(x => x.PanelId == 0 && ExpressionsService.GetBoolValue(x.VisibleExpression, DataPanelControl.FormStateData)); + if (dontContainsVisibleFields) - yield break; - + return htmlList; + if (!RenderPanelGroup) - yield return await GetHtmlForm(null); - + htmlList.Add(await GetHtmlForm(null)); else { var card = new JJCard @@ -79,8 +82,10 @@ private async IAsyncEnumerable GetFieldsWithoutPanel() Layout = PanelLayout.Well, HtmlBuilderContent = await GetHtmlForm(null) }; - yield return card.GetHtmlBuilder(); + htmlList.Add(card.GetHtmlBuilder()); } + + return htmlList; } private async Task GetTabNav(List tabs) diff --git a/src/Core/UI/Components/DataPanel/JJDataPanel.cs b/src/Core/UI/Components/DataPanel/JJDataPanel.cs index b88847472..0b05b0c76 100644 --- a/src/Core/UI/Components/DataPanel/JJDataPanel.cs +++ b/src/Core/UI/Components/DataPanel/JJDataPanel.cs @@ -208,6 +208,7 @@ protected override async Task BuildResultAsync() case ComponentContext.TextFileFileUpload: return await GetFieldResultAsync(); case ComponentContext.SearchBox: + case ComponentContext.SearchBoxFilter: return await GetFieldResultAsync(); case ComponentContext.LookupDescription: return await GetFieldResultAsync(); @@ -262,7 +263,7 @@ internal async Task GetPanelHtmlBuilderAsync() AppendHiddenInputs(html); var panelGroup = new DataPanelLayout(this); - await html.AppendRangeAsync(panelGroup.GetHtmlPanelList()); + html.AppendRange(await panelGroup.GetHtmlPanelList()); html.AppendScript(GetHtmlFormScript()); return html; diff --git a/src/Core/UI/Components/FormView/JJFormView.cs b/src/Core/UI/Components/FormView/JJFormView.cs index e6b08306b..3b31d233b 100644 --- a/src/Core/UI/Components/FormView/JJFormView.cs +++ b/src/Core/UI/Components/FormView/JJFormView.cs @@ -144,7 +144,7 @@ public JJDataPanel DataPanel if (_dataPanel == null) { _dataPanel = ComponentFactory.DataPanel.Create(FormElement); - _dataPanel.AutoReloadFormFields = PageState is not PageState.View; + _dataPanel.AutoReloadFormFields = _dataPanel.PageState is not PageState.View || IsInsertAtGridView; _dataPanel.UserValues = UserValues; _dataPanel.RenderPanelGroup = true; @@ -207,8 +207,8 @@ public JJGridView GridView _gridView.FormElement = FormElement; _gridView.UserValues = UserValues; _gridView.ShowTitle = ShowTitle; - _gridView.ToolbarActions.Add(new DeleteSelectedRowsAction()); - + _gridView.TitleActions = TitleActions; + if (_gridView.InsertAction.InsertActionLocation is InsertActionLocation.AboveGrid) _gridView.OnBeforeTableRenderAsync += RenderInsertActionAtGrid; @@ -302,14 +302,16 @@ public RouteContext RouteContext return _routeContext; } } + + public bool ShowTitle { get; set; } + + public List? TitleActions { get; set; } internal ComponentContext ComponentContext => RouteContext.IsCurrentFormElement(FormElement.Name) ? RouteContext.ComponentContext : default; internal FormViewScripts Scripts => _scripts ??= new(this); - public bool ShowTitle { get; set; } - internal bool IsChildFormView => RelationshipType is not RelationshipType.Parent; internal RelationshipType RelationshipType @@ -449,7 +451,7 @@ internal async Task GetFormResultAsync() case ComponentContext.DataExportation: case ComponentContext.GridViewReload: case ComponentContext.GridViewFilterReload: - case ComponentContext.GridViewFilterSearchBox: + case ComponentContext.SearchBoxFilter: return await GridView.GetResultAsync(); case ComponentContext.DownloadFile: return ComponentFactory.Downloader.Create().GetDownloadResult(); @@ -618,8 +620,6 @@ private async Task GetFormActionResult() result = await GetAuditLogResult(); else if (CurrentAction is DeleteAction) result = await GetDeleteResult(); - else if (CurrentAction is DeleteSelectedRowsAction) - result = await GetDeleteSelectedRowsResult(); else if (CurrentAction is SaveAction) result = await GetSaveActionResult(); else if (CurrentAction is BackAction) @@ -678,11 +678,11 @@ private async Task GetSqlCommandActionResult() var formStateData = await GetFormStateDataAsync(); var parsedValues = ExpressionsService.ParseExpression(sqlAction.SqlCommand, formStateData); - var sqlCommand = SqlExpressionProvider.GetParsedDataAccessCommand(sqlAction.SqlCommand, parsedValues); + var sqlCommand = ExpressionDataAccessCommandFactory.Create(sqlAction.SqlCommand, parsedValues); try { - await EntityRepository.SetCommandAsync(sqlCommand); + await EntityRepository.SetCommandAsync(sqlCommand, FormElement.ConnectionId); } catch (Exception ex) { @@ -699,7 +699,7 @@ private async Task GetSqlCommandActionResult() if (result is HtmlComponentResult htmlComponentResult) { - htmlComponentResult.HtmlBuilder.AppendComponentIf(messageBox is not null, messageBox); + htmlComponentResult.HtmlBuilder.AppendComponentIf(messageBox is not null,()=> messageBox); } return result; @@ -921,8 +921,7 @@ private async Task GetInsertSelectionResult() var mappedFkValues = DataHelper.GetRelationValues(FormElement, selectionValues, true); var values = - await FieldValuesService.MergeWithExpressionValuesAsync(FormElement, new FormStateData(mappedFkValues!,UserValues, PageState.Insert), - true); + await FieldValuesService.MergeWithExpressionValuesAsync(FormElement, new FormStateData(mappedFkValues!,UserValues, PageState.Insert)); var errors = await InsertFormValuesAsync(values, false); @@ -1014,86 +1013,6 @@ private async Task GetDeleteResult() return new RenderedComponentResult(html); } - private async Task GetDeleteSelectedRowsResult() - { - var html = new Div(); - var messageFactory = ComponentFactory.Html.MessageBox; - var errorMessage = new StringBuilder(); - int errorCount = 0; - int successCount = 0; - - try - { - var rows = GridView.GetSelectedGridValues(); - - foreach (var row in rows) - { - var errors = await DeleteFormValuesAsync(row!); - - if (errors.Count > 0) - { - foreach (var err in errors) - { - errorMessage.Append(" - "); - errorMessage.Append(err.Value); - errorMessage.Append("
"); - } - - errorCount++; - } - else - { - successCount++; - } - } - - if (rows.Count > 0) - { - var message = new StringBuilder(); - var icon = MessageIcon.Info; - if (successCount > 0) - { - message.Append("

"); - message.Append(StringLocalizer["{0} Record(s) deleted successfully", successCount]); - message.Append("


"); - } - - if (errorCount > 0) - { - message.Append("

"); - message.Append(StringLocalizer["{0} Record(s) with error", successCount]); - message.Append(StringLocalizer["Details:"]); - message.Append("
"); - message.Append(errorMessage); - icon = MessageIcon.Warning; - } - - html.AppendComponent(messageFactory.Create(message.ToString(), icon)); - - GridView.ClearSelectedGridValues(); - } - } - catch (Exception ex) - { - html.AppendComponent(messageFactory.Create(ex.Message, MessageIcon.Error)); - } - - var gridViewResult = await GetGridViewResult(); - - if (gridViewResult is RenderedComponentResult) - { - html.Append(new HtmlBuilder(gridViewResult)); - } - else - { - return gridViewResult; - } - - PageState = PageState.List; - - return new RenderedComponentResult(html); - } - private async Task GetAuditLogResult() { var actionMap = _currentActionMap; @@ -1212,7 +1131,8 @@ internal async Task GetRelationshipLayoutResult( var bottomActions = toolbarActions.Where(a => a.Location is FormToolbarActionLocation.Bottom).ToList(); - toolbarActions.BackAction.SetVisible(true); + if(!IsChildFormView) + toolbarActions.BackAction.SetVisible(true); html.AppendComponent(await GetFormToolbarAsync(bottomActions)); @@ -1476,7 +1396,7 @@ public async Task> UpdateFormValuesAsync(Dictionary> DeleteFormValuesAsync(Dictionary? filter) { var values = - await FieldValuesService.MergeWithExpressionValuesAsync(FormElement, new FormStateData(filter!, UserValues, PageState.Delete), true); + await FieldValuesService.MergeWithExpressionValuesAsync(FormElement, new FormStateData(filter!, UserValues, PageState.Delete)); var result = await FormService.DeleteAsync(FormElement, values, new DataContext(CurrentContext.Request, DataContextSource.Form, UserId)); UrlRedirect = result.UrlRedirect; @@ -1604,12 +1524,7 @@ private void AddEventHandlers(IFormEventHandler eventHandler) private JJTitle GetTitle(FormStateData formStateData) { - return ComponentFactory.Html.Title.Create(FormElement,formStateData); - } - - private async Task GetTitleAsync() - { - return ComponentFactory.Html.Title.Create(FormElement, await GetFormStateDataAsync()); + return ComponentFactory.Html.Title.Create(FormElement,formStateData, TitleActions); } #region "Legacy inherited GridView compatibility" diff --git a/src/Core/UI/Components/GridView/GridPagination.cs b/src/Core/UI/Components/GridView/GridPagination.cs index a1dd64853..a4ca54b57 100644 --- a/src/Core/UI/Components/GridView/GridPagination.cs +++ b/src/Core/UI/Components/GridView/GridPagination.cs @@ -204,6 +204,7 @@ private HtmlBuilder GetEnableMultSelectTotalRecords() string multipleRecordsSelected = GridView.StringLocalizer["{0} selected records", selectedValues.Count]; var span = new HtmlBuilder(HtmlTag.Span); + span.WithCssClass("small"); span.WithAttribute("id", $"selected-text-{GridView.Name}"); span.WithAttribute("no-record-selected-label", noRecordSelected); span.WithAttribute("one-record-selected-label", oneRecordSelected); diff --git a/src/Core/UI/Components/GridView/GridSqlCommandAction.cs b/src/Core/UI/Components/GridView/GridSqlCommandAction.cs index 1f11af187..0b951c7ce 100644 --- a/src/Core/UI/Components/GridView/GridSqlCommandAction.cs +++ b/src/Core/UI/Components/GridView/GridSqlCommandAction.cs @@ -6,6 +6,7 @@ using JJMasterData.Commons.Exceptions; using JJMasterData.Core.DataDictionary.Models; using JJMasterData.Core.DataDictionary.Models.Actions; +using JJMasterData.Core.DataManager.Expressions; using JJMasterData.Core.DataManager.Expressions.Providers; using JJMasterData.Core.DataManager.Models; using JJMasterData.Core.Logging; @@ -61,11 +62,11 @@ private async Task ExecuteOnList(SqlCommandAction sqlCommandAction, List $"{GridView.Name}-table"; + private string Name { get; } = $"{gridView.Name}-table"; private JJGridView GridView { get; } = gridView; @@ -34,19 +35,23 @@ public async Task GetHtmlBuilderAsync() var tbody = new HtmlBuilder(HtmlTag.Tbody); tbody.WithAttribute("id", Name); - await tbody.AppendRangeAsync(GetRowsList()); + tbody.AppendRange(await GetRowsList()); return tbody; } - private async IAsyncEnumerable GetRowsList() + private async Task> GetRowsList() { - var rows = GridView.DataSource; + List rows = []; + + var dataSource = GridView.DataSource; - for (var i = 0; i < rows?.Count; i++) + for (var i = 0; i < dataSource?.Count; i++) { - yield return await GetRowHtml(rows[i], i); + rows.Add(await GetRowHtml(dataSource[i], i)); } + + return rows; } private async Task GetRowHtml(Dictionary row, int index) @@ -58,8 +63,8 @@ private async Task GetRowHtml(Dictionary row, int tr.WithAttribute("id", $"row{index}"); var enableGridAction = !GridView.EnableEditMode && (defaultAction != null || GridView.EnableMultiSelect); tr.WithCssClassIf(enableGridAction, "tr-hover-action"); - - await tr.AppendRangeAsync(GetTdHtmlList(row, index)); + + tr.AppendRange(await GetTdHtmlList(row, index)); if (OnRenderRowAsync is not null) await OnRenderRowAsync(GridView, new() @@ -71,7 +76,7 @@ private async Task GetRowHtml(Dictionary row, int return tr; } - internal async IAsyncEnumerable GetTdHtmlList(Dictionary row, int index) + internal async Task> GetTdHtmlList(Dictionary row, int index) { var values = await GetValues(row); var formStateData = new FormStateData(values, GridView.UserValues, PageState.List); @@ -79,6 +84,8 @@ internal async IAsyncEnumerable GetTdHtmlList(Dictionary x is { IsVisible: true, IsDefaultOption: true }); var onClickScript = await GetOnClickScript(formStateData, defaultAction); + var tdList = new List(); + if (GridView.EnableMultiSelect) { var checkBox = await GetMultiSelectCheckbox(row, index, values); @@ -93,28 +100,39 @@ internal async IAsyncEnumerable GetTdHtmlList(Dictionary GetVisibleFieldsHtmlList(Dictionary row, int index, - Dictionary values, string onClickScript) + private async Task> GetVisibleFieldsHtmlList( + Dictionary row, + int index, + Dictionary values, + string onClickScript) { + List result = []; + var formStateData = new FormStateData(GetEncodedValues(values), GridView.UserValues, PageState.List); foreach (var field in await GridView.GetVisibleFieldsAsync()) { + var formattedValue = string.Empty; + var stringValue = string.Empty; + if (values.TryGetValue(field.Name, out var value)) { - value = FieldFormattingService.FormatValue(field, value); + formattedValue = FieldFormattingService.FormatValue(field, value); + stringValue = value?.ToString() ?? string.Empty; } var td = new HtmlBuilder(HtmlTag.Td); @@ -124,93 +142,130 @@ private async IAsyncEnumerable GetVisibleFieldsHtmlList(Dictionary< if (GridView.EnableEditMode && field.DataBehavior != FieldBehavior.ViewOnly) { - td.Append(await GetEditModeFieldHtml(field, row, index, values, value?.ToString())); + td.Append(await GetEditModeFieldHtml(field, formStateData, row, index, formattedValue)); } else { - values.TryGetValue(field.Name, out var objValue); - value = objValue?.ToString() ?? string.Empty; - var formStateData = new FormStateData(values, GridView.UserValues, PageState.List); - HtmlBuilder cell; - if (field.DataItem is not null && field.DataItem.ShowIcon && - field.DataItem.GridBehavior is DataItemGridBehavior.Icon - or DataItemGridBehavior.IconWithDescription) - { - var dataItemValues = await GridView.DataItemService.GetValuesAsync(field.DataItem, formStateData, - null, - value.ToString()); - var dataItemValue = dataItemValues.FirstOrDefault(d => d.Id == value.ToString()); + td.Append(await GetGridFieldHtml(field, formStateData, row, stringValue)); + } + result.Add(td); + } - string tooltip; - if (field.DataItem.GridBehavior is DataItemGridBehavior.Icon) - tooltip = GridView.StringLocalizer[dataItemValue?.Description ?? string.Empty]; - else - tooltip = string.Empty; + return result; + } - if (dataItemValue != null) - { - cell = GetIconCell(dataItemValue.Icon, dataItemValue.IconColor ?? string.Empty, tooltip); - - cell.AppendIf(field.DataItem.GridBehavior is DataItemGridBehavior.IconWithDescription, - HtmlTag.Span, - span => - { - span.AppendText(dataItemValue.Description ?? dataItemValue.Id); - span.WithCssClass($"{BootstrapHelper.MarginLeft}-1"); - }); - } - else - { - cell = new HtmlBuilder(); - } - } - else if (field.DataFile is not null) - { - var textFile = GridView.ComponentFactory.Controls.Create(GridView.FormElement, field, - new(formStateData, Name, value)); - cell = textFile.GetButtonGroupHtml(); - } - else if (field.Component is FormComponent.Color && !string.IsNullOrEmpty(value.ToString())) - { - var stringValue = value.ToString()!; - cell = GetIconCell(IconType.Circle, stringValue, stringValue); - } - else if (field.Component is FormComponent.Icon && !string.IsNullOrEmpty(value.ToString())) - { - var iconType = IconHelper.GetIconTypeFromField(field,value); + private async Task GetGridFieldHtml(FormElementField field, + FormStateData formStateData, + Dictionary row, + string stringValue) + { + HtmlBuilder cell; - cell = GetIconCell(iconType, null, iconType.ToString()); - } - else - { - value = await GridView.FieldsService.FormatGridValueAsync(field, values, GridView.UserValues); - var valueString = value?.ToString()?.Trim() ?? string.Empty; - cell = new HtmlBuilder(valueString); - } + var isDataIconWithIcon = field.DataItem is { + ShowIcon: true, + GridBehavior: DataItemGridBehavior.Icon or DataItemGridBehavior.IconWithDescription + }; + + if (isDataIconWithIcon) + { + cell = await GetDataItemIconCell(field.DataItem!, formStateData, stringValue); + } + else if (field.DataFile is not null) + { + var controlContext = new ControlContext(formStateData, Name, stringValue); + var controlFactory = GridView.ComponentFactory.Controls; + var textFile = controlFactory.Create(GridView.FormElement, field,controlContext); + cell = textFile.GetButtonGroupHtml(); + } + else if (field.Component is FormComponent.Color && !string.IsNullOrEmpty(stringValue)) + { + cell = GetIconCell(IconType.Circle, stringValue, stringValue); + } + else if (field.Component is FormComponent.Icon && !string.IsNullOrEmpty(stringValue)) + { + var iconType = IconHelper.GetIconTypeFromField(field, stringValue); - if (OnRenderCellAsync != null) - { - var args = new GridCellEventArgs - { - Field = field, - DataRow = row, - HtmlResult = cell, - Sender = new JJText(value?.ToString()) - }; + cell = GetIconCell(iconType, null, iconType.ToString()); + } + else if (!string.IsNullOrEmpty(field.GridRenderingTemplate)) + { + var replacedTemplate = ExpressionHelper.ReplaceExpression(field.GridRenderingTemplate!, formStateData.Values); + cell = new HtmlBuilder(replacedTemplate); + } + else + { + var selector = new FormElementFieldSelector(GridView.FormElement, field.Name); + var gridValue = await GridView.FieldsService.FormatGridValueAsync(selector, formStateData); + var gridStringValue = gridValue?.Trim() ?? string.Empty; + cell = new HtmlBuilder(gridStringValue); + } - await OnRenderCellAsync(this, args); + if (OnRenderCellAsync == null) + return cell; + + var args = new GridCellEventArgs + { + Field = field, + DataRow = row, + HtmlResult = cell, + Sender = new JJText(stringValue) + }; - td.Append(args.HtmlResult ?? cell); - } - else - { - td.Append(cell); - } + await OnRenderCellAsync(this, args); + + return args.HtmlResult ?? cell; + + } + + private Dictionary GetEncodedValues(Dictionary values) + { + var result = new Dictionary(StringComparer.CurrentCultureIgnoreCase); + foreach (var kvp in values) + { + if (GridView.FormElement.Fields.TryGetField(kvp.Key, out var field) && field.EncodeHtml) + { + result[kvp.Key] = HttpUtility.HtmlEncode(kvp.Value); } + else + { + result[kvp.Key] = kvp.Value; + } + } + + return result; + } - yield return td; + private async Task GetDataItemIconCell(FormElementDataItem dataItem, FormStateData formStateData, string stringValue) + { + HtmlBuilder cell; + var dataQuery = new DataQuery(formStateData, GridView.FormElement.ConnectionId) + { + SearchId = stringValue + }; + var dataItemValues = await GridView.DataItemService.GetValuesAsync(dataItem, dataQuery); + var dataItemValue = dataItemValues.FirstOrDefault(d => d.Id == stringValue); + + var tooltip = dataItem.GridBehavior is DataItemGridBehavior.Icon ? GridView.StringLocalizer[dataItemValue?.Description ?? string.Empty] : string.Empty; + + if (dataItemValue != null) + { + cell = GetIconCell(dataItemValue.Icon, dataItemValue.IconColor ?? string.Empty, tooltip); + + cell.AppendIf(dataItem.GridBehavior is DataItemGridBehavior.IconWithDescription, + HtmlTag.Span, + span => + { + span.AppendText(dataItemValue.Description ?? dataItemValue.Id); + span.WithCssClass($"{BootstrapHelper.MarginLeft}-1"); + }); } + else + { + cell = new HtmlBuilder(); + } + + return cell; } private static HtmlBuilder GetIconCell(IconType iconType, string? color = null, string? tooltip = null) @@ -226,19 +281,21 @@ private static HtmlBuilder GetIconCell(IconType iconType, string? color = null, return cell; } - private async Task GetEditModeFieldHtml(FormElementField field, Dictionary row, - int index, Dictionary values, + private async Task GetEditModeFieldHtml( + FormElementField field, + FormStateData formStateData, + Dictionary row, + int index, string? value) { - var name = GridView.GetFieldName(field.Name, values); + var name = GridView.GetFieldName(field.Name, formStateData.Values); var hasError = GridView.Errors.ContainsKey(name); var div = new Div(); div.WithCssClassIf(hasError, BootstrapHelper.HasError); - var control = GridView.ComponentFactory.Controls.Create(GridView.FormElement, field, - new(values, GridView.UserValues, PageState.List), name, value); + var control = GridView.ComponentFactory.Controls.Create(GridView.FormElement, field, formStateData, name, value); control.Name = name; control.Attributes.Add("gridViewRowIndex", index.ToString()); @@ -272,20 +329,24 @@ private async Task GetEditModeFieldHtml(FormElementField field, Dic return div; } - public async IAsyncEnumerable GetActionsHtmlListAsync(FormStateData formStateData) + public async Task> GetActionsHtmlListAsync(FormStateData formStateData) { + List result = []; var basicActions = GridView.GridTableActions.OrderBy(x => x.Order).ToList(); var actionsWithoutGroup = basicActions.FindAll(x => x.IsVisible && !x.IsGroup); var groupedActions = basicActions.FindAll(x => x.IsVisible && x.IsGroup); - await foreach (var action in GetActionsWithoutGroupHtmlAsync(actionsWithoutGroup, formStateData)) + + foreach (var action in await GetActionsWithoutGroupHtmlAsync(actionsWithoutGroup, formStateData)) { - yield return action; + result.Add(action); } if (groupedActions.Count > 0) { - yield return await GetActionsGroupHtmlAsync(groupedActions, formStateData); + result.Add(await GetActionsGroupHtmlAsync(groupedActions, formStateData)); } + + return result; } @@ -318,10 +379,11 @@ private async Task GetActionsGroupHtmlAsync(IEnumerable GetActionsWithoutGroupHtmlAsync( + private async Task> GetActionsWithoutGroupHtmlAsync( IEnumerable actionsWithoutGroup, FormStateData formStateData) { var factory = GridView.ComponentFactory.ActionButton; + List result = []; foreach (var action in actionsWithoutGroup) { var td = new HtmlBuilder(HtmlTag.Td); @@ -330,11 +392,9 @@ private async IAsyncEnumerable GetActionsWithoutGroupHtmlAsync( if (OnRenderActionAsync is not null) { var args = new ActionEventArgs(action, link, formStateData.Values); - - + await OnRenderActionAsync(GridView, args); - if (args.HtmlResult != null) { td.AppendText(args.HtmlResult); @@ -345,8 +405,10 @@ private async IAsyncEnumerable GetActionsWithoutGroupHtmlAsync( if (link != null) td.AppendComponent(link); - yield return td; + result.Add(td); } + + return result; } private static string GetTdStyle(FormElementField field) diff --git a/src/Core/UI/Components/GridView/GridTableHeader.cs b/src/Core/UI/Components/GridView/GridTableHeader.cs index 9ee865e8b..a548d0324 100644 --- a/src/Core/UI/Components/GridView/GridTableHeader.cs +++ b/src/Core/UI/Components/GridView/GridTableHeader.cs @@ -29,7 +29,7 @@ public async Task GetHtmlBuilderAsync() await html.AppendAsync(HtmlTag.Tr, async tr => { tr.AppendIf(GridView.EnableMultiSelect, GetMultSelectThHtmlElement); - await tr.AppendRangeAsync(GetVisibleFieldsThList()); + tr.AppendRange(await GetVisibleFieldsThList()); tr.AppendRange(GetActionsThList()); }); @@ -55,8 +55,9 @@ private IEnumerable GetActionsThList() } } - private async IAsyncEnumerable GetVisibleFieldsThList() + private async Task> GetVisibleFieldsThList() { + List thList = []; foreach (var field in await GridView.GetVisibleFieldsAsync()) { var th = new HtmlBuilder(HtmlTag.Th); @@ -114,15 +115,17 @@ private async IAsyncEnumerable GetVisibleFieldsThList() if (IsAppliedFilter(field, currentFilter)) { th.AppendText(" "); - th.Append((HtmlBuilder)new JJIcon("fa fa-filter").GetHtmlBuilder() + th.Append(new JJIcon("fa fa-filter").GetHtmlBuilder() .WithToolTip(StringLocalizer["Applied filter"])); } - yield return th; + thList.Add(th); } + + return thList; } - private bool IsAppliedFilter(ElementField field, Dictionary currentFilter) + private static bool IsAppliedFilter(ElementField field, Dictionary currentFilter) { var hasFilterType = field.Filter.Type is not FilterMode.None; var hasFieldOrFromKey = currentFilter.ContainsKey(field.Name) || currentFilter.ContainsKey($"{field.Name}_from"); diff --git a/src/Core/UI/Components/GridView/JJGridView.cs b/src/Core/UI/Components/GridView/JJGridView.cs index 5c792135b..52d07aa63 100644 --- a/src/Core/UI/Components/GridView/JJGridView.cs +++ b/src/Core/UI/Components/GridView/JJGridView.cs @@ -25,6 +25,7 @@ using JJMasterData.Core.DataManager.Services; using JJMasterData.Core.Extensions; using JJMasterData.Core.Http.Abstractions; +using JJMasterData.Core.Logging; using JJMasterData.Core.Tasks; using JJMasterData.Core.UI.Events.Args; using JJMasterData.Core.UI.Html; @@ -198,8 +199,11 @@ private static bool VisibleAtGrid(FormElementField field) } private bool IsUserSetDataSource { get; set; } + public bool ShowTitle { get; set; } - + + public List? TitleActions { get; set; } + public bool EnableFilter { get; set; } public string? ParentComponentName { get; set; } @@ -655,7 +659,7 @@ protected override async Task BuildResultAsync() return new ContentComponentResult(html); } - if (ComponentContext is ComponentContext.GridViewFilterSearchBox) + if (ComponentContext is ComponentContext.SearchBoxFilter) { var fieldName = CurrentContext.Request.QueryString["fieldName"]; var field = FormElement.Fields[fieldName]; @@ -817,8 +821,8 @@ internal async Task GetTableRowHtmlAsync(int rowIndex) var row = DataSource?[rowIndex]; string result = string.Empty; - await foreach (var builder in Table.Body.GetTdHtmlList(row ?? new Dictionary(), rowIndex)) - result = result + builder; + foreach (var builder in await Table.Body.GetTdHtmlList(row ?? new Dictionary(), rowIndex)) + result += builder; return result; } @@ -836,7 +840,7 @@ public async Task GetTitleHtmlAsync() internal async Task GetTitleAsync() { - return ComponentFactory.Html.Title.Create(FormElement, await GetFormStateDataAsync()); + return ComponentFactory.Html.Title.Create(FormElement, await GetFormStateDataAsync(), TitleActions); } internal Task GetToolbarHtmlBuilder() => Toolbar.GetHtmlBuilderAsync(); @@ -1125,37 +1129,45 @@ private async Task SetDataSource() private async Task GetDataSourceAsync(EntityParameters parameters) { - if (IsUserSetDataSource && DataSource != null) + try { + if (IsUserSetDataSource && DataSource != null) + { - using var dataView = new DataView(EnumerableHelper.ConvertToDataTable( new List>(DataSource))); - dataView.Sort = parameters.OrderBy.ToQueryParameter(); - var dataTable = dataView.ToTable(); + using var dataView = new DataView(EnumerableHelper.ConvertToDataTable( new List>(DataSource))); + dataView.Sort = parameters.OrderBy.ToQueryParameter(); + var dataTable = dataView.ToTable(); - return DictionaryListResult.FromDataTable(dataTable); - } + return DictionaryListResult.FromDataTable(dataTable); + } - if (OnDataLoadAsync != null) - { - var args = new GridDataLoadEventArgs + if (OnDataLoadAsync != null) { - Filters = parameters.Filters, - OrderBy = parameters.OrderBy, - RecordsPerPage = parameters.RecordsPerPage, - CurrentPage = parameters.CurrentPage, - }; + var args = new GridDataLoadEventArgs + { + Filters = parameters.Filters, + OrderBy = parameters.OrderBy, + RecordsPerPage = parameters.RecordsPerPage, + CurrentPage = parameters.CurrentPage, + }; - await OnDataLoadAsync.Invoke(this, args); + await OnDataLoadAsync.Invoke(this, args); - if (args.DataSource is not null) - { - TotalOfRecords = args.TotalOfRecords; + if (args.DataSource is not null) + { + TotalOfRecords = args.TotalOfRecords; - return new DictionaryListResult(args.DataSource, args.TotalOfRecords); + return new DictionaryListResult(args.DataSource, args.TotalOfRecords); + } } - } - return await EntityRepository.GetDictionaryListResultAsync(FormElement, parameters); + return await EntityRepository.GetDictionaryListResultAsync(FormElement, parameters); + } + catch (Exception ex) + { + Logger.LogGridViewDataSourceException(ex, FormElement.Name); + throw; + } } /// diff --git a/src/Core/UI/Components/Html/Breadcrumb/BreadcrumbFactory.cs b/src/Core/UI/Components/Html/Breadcrumb/BreadcrumbFactory.cs new file mode 100644 index 000000000..6060fb532 --- /dev/null +++ b/src/Core/UI/Components/Html/Breadcrumb/BreadcrumbFactory.cs @@ -0,0 +1,19 @@ +using System.Collections.Generic; + +namespace JJMasterData.Core.UI.Components; + +public class BreadcrumbFactory : IComponentFactory +{ + public JJBreadcrumb Create() + { + return new JJBreadcrumb(); + } + + public JJBreadcrumb Create(IEnumerable items) + { + var breadcrumb = new JJBreadcrumb(); + breadcrumb.Items.AddRange(items); + + return breadcrumb; + } +} \ No newline at end of file diff --git a/src/Core/UI/Components/Html/Breadcrumb/BreadcrumbItem.cs b/src/Core/UI/Components/Html/Breadcrumb/BreadcrumbItem.cs new file mode 100644 index 000000000..8b622a630 --- /dev/null +++ b/src/Core/UI/Components/Html/Breadcrumb/BreadcrumbItem.cs @@ -0,0 +1,42 @@ +#nullable enable + +using JJMasterData.Core.UI.Html; + +namespace JJMasterData.Core.UI.Components; + +public class BreadcrumbItem +{ + public string? Url { get; set; } + + public HtmlBuilder HtmlContent { get; } + + public string Content + { + init => HtmlContent.AppendText(value); + } + + public BreadcrumbItem() : this(new HtmlBuilder()) + { + } + + public BreadcrumbItem(string text) : this() + { + HtmlContent.AppendText(text); + } + + public BreadcrumbItem(string text, string url) : this(text) + { + Url = url; + } + + public BreadcrumbItem(HtmlBuilder htmlContent) + { + HtmlContent = htmlContent; + } + + public BreadcrumbItem(HtmlBuilder htmlContent, string url) + { + HtmlContent = htmlContent; + Url = url; + } +} \ No newline at end of file diff --git a/src/Core/UI/Components/Html/Breadcrumb/JJBreadcrumb.cs b/src/Core/UI/Components/Html/Breadcrumb/JJBreadcrumb.cs new file mode 100644 index 000000000..77063d4c3 --- /dev/null +++ b/src/Core/UI/Components/Html/Breadcrumb/JJBreadcrumb.cs @@ -0,0 +1,69 @@ +using System.Collections.Generic; +using JJMasterData.Core.UI.Html; + +namespace JJMasterData.Core.UI.Components; + +public class JJBreadcrumb : HtmlComponent +{ + public List Items { get; } + + public JJBreadcrumb() + { + Items = []; + CssClass = "border-bottom mb-3"; + } + + internal override HtmlBuilder BuildHtml() + { + var html = new Div() + .WithNameAndId(Name) + .WithAttributes(Attributes) + .WithCssClass(CssClass) + .Append(HtmlTag.Nav, nav => + { + nav.WithCssClass("mb-2 pb-2") + .WithAttribute("aria-label", "breadcrumb") + .Append(GetHtmlOlItems()); + }); + + return html; + } + + private HtmlBuilder GetHtmlOlItems() + { + var ol = new Ol(); + ol.WithCssClass("breadcrumb mb-0"); + + var totalItems = Items.Count; + for (var index = 0; index < totalItems; index++) + { + var item = Items[index]; + var isLast = index == totalItems - 1; + ol.Append(GetHtmlItem(item, isLast)); + } + + return ol; + } + + private static HtmlBuilder GetHtmlItem(BreadcrumbItem item, bool isLast) + { + var li = new Li(); + li.WithCssClass("breadcrumb-item"); + li.WithCssClassIf(isLast, "active"); + + if (item.Url is null || isLast) + { + li.Append(item.HtmlContent); + } + else + { + li.Append(HtmlTag.A, a => + { + a.WithAttribute("href", item.Url); + a.Append(item.HtmlContent); + }); + } + + return li; + } +} \ No newline at end of file diff --git a/src/Core/UI/Components/Html/CollapsePanel/JJCollapsePanel.cs b/src/Core/UI/Components/Html/CollapsePanel/JJCollapsePanel.cs index 16954a15b..dba241e19 100644 --- a/src/Core/UI/Components/Html/CollapsePanel/JJCollapsePanel.cs +++ b/src/Core/UI/Components/Html/CollapsePanel/JJCollapsePanel.cs @@ -101,7 +101,7 @@ private HtmlBuilder GetAccordionHeader() button.WithAttribute("id", $"heading-{Name.ToLower()}"); button.WithDataAttribute("toggle", "collapse"); button.WithDataAttribute("target", $"#collapse-{Name.ToLower()}"); - button.AppendComponentIf(TitleIcon != null, TitleIcon); + button.AppendComponentIf(TitleIcon != null, ()=>TitleIcon); button.AppendTextIf(TitleIcon != null, " "); button.AppendText(Title); }); diff --git a/src/Core/UI/Components/Html/HtmlComponentFactory.cs b/src/Core/UI/Components/Html/HtmlComponentFactory.cs index e2b559363..fc5a20fbe 100644 --- a/src/Core/UI/Components/Html/HtmlComponentFactory.cs +++ b/src/Core/UI/Components/Html/HtmlComponentFactory.cs @@ -18,13 +18,15 @@ public class HtmlComponentFactory( public AlertFactory Alert => new(); + public BreadcrumbFactory Breadcrumb => new(); + public CardFactory Card => new(); public CollapsePanelFactory CollapsePanel => new(currentContext.Request.Form); - + public IconFactory Icon => new(); - public ImageFactory Image => new(currentContext); + public ImageFactory Image => new(); public LabelFactory Label => new(stringLocalizer); @@ -32,6 +34,10 @@ public class HtmlComponentFactory( public MessageBoxFactory MessageBox => new(stringLocalizer); + public MessageToastFactory MessageToast => new(stringLocalizer); + + public OffcanvasFactory Offcanvas => new(); + public ModalDialogFactory ModalDialog => new(); public SpinnerFactory Spinner => new(); diff --git a/src/Core/UI/Components/Html/Image/ImageFactory.cs b/src/Core/UI/Components/Html/Image/ImageFactory.cs index 69e373151..4700182b7 100644 --- a/src/Core/UI/Components/Html/Image/ImageFactory.cs +++ b/src/Core/UI/Components/Html/Image/ImageFactory.cs @@ -1,27 +1,14 @@ -using JJMasterData.Core.Http.Abstractions; - namespace JJMasterData.Core.UI.Components; -public class ImageFactory(IHttpContext httpContext) +public class ImageFactory : IComponentFactory { - public JJImage Create(string src) + JJImage IComponentFactory.Create() { - return new JJImage(src); + return new JJImage(string.Empty); } - - public JJImage CreateMasterDataLogo() + + public JJImage Create(string src) { - var appPath = httpContext.Request.ApplicationPath; - var baseUrl = string.IsNullOrEmpty(appPath) ? "/" : appPath; - - if (!baseUrl.EndsWith("/")) - baseUrl += "/"; - - var logoSrc = $"{baseUrl}_content/JJMasterData.Web/images/JJMasterData.png"; - var image = Create(logoSrc); - image.SetAttr("style","width:8%;height:8%;"); - image.Title = "JJMasterData"; - return image; + return new JJImage(src); } - } \ No newline at end of file diff --git a/src/Core/UI/Components/Html/Image/JJImage.cs b/src/Core/UI/Components/Html/Image/JJImage.cs index eb0a43bb3..c6fc40f2a 100644 --- a/src/Core/UI/Components/Html/Image/JJImage.cs +++ b/src/Core/UI/Components/Html/Image/JJImage.cs @@ -9,7 +9,7 @@ public class JJImage : HtmlComponent public string Src { get; set; } public string? Title { get; set; } - internal JJImage(string src) + public JJImage(string src) { Src = src; } diff --git a/src/Core/UI/Components/Html/Image/JJMasterDataLogo.cs b/src/Core/UI/Components/Html/Image/JJMasterDataLogo.cs new file mode 100644 index 000000000..cbbe51caf --- /dev/null +++ b/src/Core/UI/Components/Html/Image/JJMasterDataLogo.cs @@ -0,0 +1,32 @@ +using JJMasterData.Core.Http.Abstractions; +using JJMasterData.Core.UI.Html; + +namespace JJMasterData.Core.UI.Components; + +public class JJMasterDataLogo(IHttpContext httpContext) +{ + public HtmlBuilder GetHtmlBuilder() + { + var logoSrc = GetMasterDataLogoSrc(); + + var image = new JJImage(logoSrc) + { + CssClass = "img-responsive md-logo", + Title = "JJMasterData" + }; + + return image.GetHtmlBuilder(); + } + + private string GetMasterDataLogoSrc() + { + var appPath = httpContext.Request.ApplicationPath; + var baseUrl = string.IsNullOrEmpty(appPath) ? "/" : appPath; + + if (!baseUrl.EndsWith("/")) + baseUrl += "/"; + + var logoSrc = $"{baseUrl}_content/JJMasterData.Web/images/JJMasterData.png"; + return logoSrc; + } +} \ No newline at end of file diff --git a/src/Core/UI/Components/Html/MessageBox/MessageBoxFactory.cs b/src/Core/UI/Components/Html/MessageBox/MessageBoxFactory.cs index f28d92818..373f6c5c3 100644 --- a/src/Core/UI/Components/Html/MessageBox/MessageBoxFactory.cs +++ b/src/Core/UI/Components/Html/MessageBox/MessageBoxFactory.cs @@ -22,8 +22,8 @@ public JJMessageBox Create(string text, MessageIcon icon) messageBox.Size = MessageSize.Default; messageBox.Title = messageBox.Icon switch { - MessageIcon.Error => StringLocalizer["Erro"], - MessageIcon.Warning => StringLocalizer["Aviso"], + MessageIcon.Error => StringLocalizer["Error"], + MessageIcon.Warning => StringLocalizer["Warning"], MessageIcon.Info => StringLocalizer["Info"], _ => StringLocalizer["Message"], }; diff --git a/src/Core/UI/Components/Html/MessageToast/JJMessageToast.cs b/src/Core/UI/Components/Html/MessageToast/JJMessageToast.cs new file mode 100644 index 000000000..6cf2f3c3e --- /dev/null +++ b/src/Core/UI/Components/Html/MessageToast/JJMessageToast.cs @@ -0,0 +1,78 @@ +#nullable enable + +using JJMasterData.Core.UI.Html; +using JJMasterData.Core.DataDictionary.Models; + +namespace JJMasterData.Core.UI.Components; + +public class JJMessageToast : HtmlComponent +{ + public string Title { get; set; } = null!; + public string? TitleMuted { get; set; } + public string? Message { get; set; } + public JJIcon? Icon { get; set; } + public BootstrapColor TitleColor { get; set; } + public bool ShowAsOpened { get; set; } = true; + + internal JJMessageToast() + { + TitleColor = BootstrapColor.Default; + Name = "toast-alert"; + } + + internal override HtmlBuilder BuildHtml() + { + var htmlToast = new HtmlBuilder(HtmlTag.Div) + .WithCssClass("position-fixed bottom-0 end-0 p-3") + .WithAttribute("style", "z-index: 5") + .AppendDiv(alert => + { + alert.WithId(Name) + .WithCssClass("toast fade") + .WithAttribute("role", "alert") + .WithAttribute("aria-live", "assertive") + .WithAttribute("aria-atomic", "true") + .AppendDiv(header => + { + header.WithCssClass("toast-header") + .Append(HtmlTag.Strong) + .WithCssClass($"me-auto text-{TitleColor.ToColorString()}") + .Append(HtmlTag.Strong, s => + { + s.WithCssClass($"me-auto text-{TitleColor.ToColorString()}") + .Append(Icon?.GetHtmlBuilder()?.WithCssClass("fs-7 me-1")) + .AppendText(Title); + }) + .AppendIf(TitleMuted != null, HtmlTag.Small, small => + { + small.WithCssClass("text-muted") + .AppendText(TitleMuted!); + }) + .Append(HtmlTag.Button, b => + { + b.WithCssClass("btn ms-2 p-0") + .WithAttribute("type", "button") + .WithAttribute("data-bs-dismiss", "toast") + .WithAttribute("aria-label", "Close") + .AppendSpan(uil => { uil.WithCssClass("uil uil-times fs-7"); }); + }); + }); + alert.AppendIf(Message != null, HtmlTag.Div, body => + { + body.WithCssClass("toast-body") + .AppendText(Message!); + }); + }); + + var html = new HtmlBuilder(); + html.Append(htmlToast); + html.AppendIf(ShowAsOpened, HtmlTag.Script, script => + { + script.WithAttribute("type", "text/javascript") + .WithAttribute("lang", "javascript") + .AppendText($"MessageToastHelper.showWhenDOMLoaded('{Name}');"); + }); + + return html; + } +} \ No newline at end of file diff --git a/src/Core/UI/Components/Html/MessageToast/MessageToastFactory.cs b/src/Core/UI/Components/Html/MessageToast/MessageToastFactory.cs new file mode 100644 index 000000000..27bd22b4c --- /dev/null +++ b/src/Core/UI/Components/Html/MessageToast/MessageToastFactory.cs @@ -0,0 +1,43 @@ +using System; +using JJMasterData.Commons.Localization; +using JJMasterData.Core.DataDictionary; +using JJMasterData.Core.DataDictionary.Models; +using Microsoft.Extensions.Localization; + +namespace JJMasterData.Core.UI.Components; + +public class MessageToastFactory(IStringLocalizer stringLocalizer) : IComponentFactory +{ + public JJMessageToast Create() + { + return new JJMessageToast(); + } + + public JJMessageToast Create(string message, BootstrapColor color = BootstrapColor.Default) + { + var messageToast = Create(); + messageToast.Message = message; + messageToast.TitleMuted = DateTime.Now.ToShortTimeString(); + messageToast.TitleColor = color; + messageToast.Icon = new JJIcon(); + + switch (color) + { + case BootstrapColor.Danger: + messageToast.Icon.IconClass = IconType.TimesCircle.GetCssClass(); + messageToast.Title = stringLocalizer["Error"]; + break; + case BootstrapColor.Warning: + messageToast.Icon.IconClass = IconType.Warning.GetCssClass(); + messageToast.Title = stringLocalizer["Warning"]; + break; + default: + messageToast.Icon.IconClass = IconType.Check.GetCssClass(); + messageToast.Title = stringLocalizer["Operation Performed"]; + break; + } + + return messageToast; + } + +} \ No newline at end of file diff --git a/src/Core/UI/Components/Html/Offcanvas/JJOffcanvas.cs b/src/Core/UI/Components/Html/Offcanvas/JJOffcanvas.cs new file mode 100644 index 000000000..1a0c04437 --- /dev/null +++ b/src/Core/UI/Components/Html/Offcanvas/JJOffcanvas.cs @@ -0,0 +1,43 @@ +#nullable enable +using JJMasterData.Core.UI.Html; + +namespace JJMasterData.Core.UI.Components; + +public class JJOffcanvas : HtmlComponent +{ + public OffcanvasPosition Position { get; set; } + public string? Title { get; set; } + public HtmlBuilder? Body { get; set; } + + internal override HtmlBuilder BuildHtml() + { + var offcanvas = new Div() + .WithCssClass($"offcanvas {Position.GetCssClass()}") + .WithAttribute("tabindex", "-1") + .WithId(Name) + .AppendDiv(div => + { + div.WithCssClass("offcanvas-header") + .AppendIf(!string.IsNullOrEmpty(Title),HtmlTag.H5, h5 => + { + h5.AppendText(Title!).WithCssClass("offcanvas-title"); + }) + .Append(HtmlTag.Button, button => + { + button.WithAttribute("type", "button") + .WithCssClass("btn-close") + .WithAttribute("data-bs-dismiss", "offcanvas") + .WithAttribute("aria-label", "Close"); + }); + } + ) + .AppendDiv(div => + { + div.WithId(Name + "-body") + .WithCssClass("offcanvas-body") + .Append(Body); + }); + + return offcanvas; + } +} \ No newline at end of file diff --git a/src/Core/UI/Components/Html/Offcanvas/OffcanvasFactory.cs b/src/Core/UI/Components/Html/Offcanvas/OffcanvasFactory.cs new file mode 100644 index 000000000..a9587eeb2 --- /dev/null +++ b/src/Core/UI/Components/Html/Offcanvas/OffcanvasFactory.cs @@ -0,0 +1,6 @@ +namespace JJMasterData.Core.UI.Components; + +public class OffcanvasFactory : IComponentFactory +{ + public JJOffcanvas Create() => new(); +} \ No newline at end of file diff --git a/src/Core/UI/Components/Html/Offcanvas/OffcanvasPosition.cs b/src/Core/UI/Components/Html/Offcanvas/OffcanvasPosition.cs new file mode 100644 index 000000000..eef974e08 --- /dev/null +++ b/src/Core/UI/Components/Html/Offcanvas/OffcanvasPosition.cs @@ -0,0 +1,26 @@ +using System; + +namespace JJMasterData.Core.UI.Components; + +public enum OffcanvasPosition +{ + Top, + Bottom, + Start, + End +} + +public static class OffcanvasPositionExtensions +{ + public static string GetCssClass(this OffcanvasPosition offcanvasPosition) + { + return offcanvasPosition switch + { + OffcanvasPosition.Top => "offcanvas-top", + OffcanvasPosition.Bottom =>"offcanvas-bottom", + OffcanvasPosition.Start => "offcanvas-start", + OffcanvasPosition.End => "offcanvas-end", + _ => throw new ArgumentOutOfRangeException(nameof(offcanvasPosition), offcanvasPosition, null) + }; + } +} \ No newline at end of file diff --git a/src/Core/UI/Components/Html/Title/JJTitle.cs b/src/Core/UI/Components/Html/Title/JJTitle.cs index a33780063..64eabb107 100644 --- a/src/Core/UI/Components/Html/Title/JJTitle.cs +++ b/src/Core/UI/Components/Html/Title/JJTitle.cs @@ -1,4 +1,6 @@ -using System; +#nullable enable +using System; +using System.Collections.Generic; using JJMasterData.Core.DataDictionary; using JJMasterData.Core.UI.Html; @@ -6,10 +8,12 @@ namespace JJMasterData.Core.UI.Components; public class JJTitle : HtmlComponent { - public string Title { get; set; } - public string SubTitle { get; set; } + public string? Title { get; set; } + public string? SubTitle { get; set; } public HeadingSize Size { get; set; } public IconType? Icon { get; set; } + + public List? Actions { get; set; } private HtmlTag Tag => Size switch { @@ -21,9 +25,7 @@ public class JJTitle : HtmlComponent HeadingSize.H6 => HtmlTag.H6, _ => throw new ArgumentOutOfRangeException() }; - - - + public JJTitle() { Size = HeadingSize.H1; @@ -38,27 +40,52 @@ public JJTitle(string title, string subtitle) internal override HtmlBuilder BuildHtml() { - if (string.IsNullOrWhiteSpace(Title) && string.IsNullOrWhiteSpace(SubTitle)) + if (string.IsNullOrEmpty(Title) && string.IsNullOrEmpty(SubTitle)) return new HtmlBuilder(); - return new HtmlBuilder(HtmlTag.Div) + var div = new HtmlBuilder(HtmlTag.Div) .WithNameAndId(Name) .WithAttributes(Attributes) .WithCssClass(CssClass) .WithCssClass(BootstrapHelper.PageHeader) - .Append(Tag, e => + .WithCssClass("d-flex justify-content-between") + .Append(Tag, tag => { - e.AppendIf(Icon.HasValue,HtmlTag.Span,span => + tag.AppendIf(Icon.HasValue,HtmlTag.Span,span => { span.AppendComponent(new JJIcon(Icon!.Value)); }); - e.AppendText(Title); - e.Append(HtmlTag.Small, small => + tag.AppendText(Title); + tag.Append(HtmlTag.Small, small => { small.WithCssClass("sub-title"); small.AppendText($" {SubTitle}"); }); }); + + if (Actions == null) + return div; + + div.AppendDiv(div => + { + foreach (var action in Actions) + { + div.Append(HtmlTag.A,a => + { + a.WithCssClass("btn btn-secondary"); + a.WithHref(action.Url); + a.AppendComponentIf(Icon.HasValue, () => new JJIcon(action.Icon!.Value) + { + CssClass = "fs-8" + }); + a.AppendTextIf(!string.IsNullOrEmpty(action.Text)," "+ action.Text!); + a.WithToolTip(action.Tooltip); + }); + } + }); + + + return div; } diff --git a/src/Core/UI/Components/Html/Title/TitleAction.cs b/src/Core/UI/Components/Html/Title/TitleAction.cs new file mode 100644 index 000000000..14408c6eb --- /dev/null +++ b/src/Core/UI/Components/Html/Title/TitleAction.cs @@ -0,0 +1,13 @@ +#nullable enable + +using JJMasterData.Core.DataDictionary; + +namespace JJMasterData.Core.UI.Components; + +public sealed class TitleAction +{ + public IconType? Icon { get; set; } + public string? Text { get; set; } + public string? Tooltip { get; set; } + public required string Url { get; set; } +} \ No newline at end of file diff --git a/src/Core/UI/Components/Html/Title/TitleFactory.cs b/src/Core/UI/Components/Html/Title/TitleFactory.cs index 2fb01fa15..9f40d512c 100644 --- a/src/Core/UI/Components/Html/Title/TitleFactory.cs +++ b/src/Core/UI/Components/Html/Title/TitleFactory.cs @@ -1,4 +1,6 @@ +#nullable enable using System; +using System.Collections.Generic; using System.Drawing; using JJMasterData.Core.DataDictionary; using JJMasterData.Core.DataDictionary.Models; @@ -14,17 +16,18 @@ public JJTitle Create() return new JJTitle(); } - public JJTitle Create(string title, string subtitle, IconType? icon) + public JJTitle Create(string title, string subtitle, IconType? icon = null, List? actions = null) { var htmlTitle = Create(); htmlTitle.Title = title; htmlTitle.SubTitle = subtitle; htmlTitle.Icon = icon; + htmlTitle.Actions = actions; return htmlTitle; } - public JJTitle Create(FormElement formElement, FormStateData formStateData) + public JJTitle Create(FormElement formElement, FormStateData formStateData, List? actions) { if (formElement == null) throw new ArgumentNullException(nameof(formElement)); @@ -33,6 +36,7 @@ public JJTitle Create(FormElement formElement, FormStateData formStateData) htmlTitle.Title = expressionsService.GetExpressionValue(formElement.Title, formStateData) as string; htmlTitle.Size = formElement.TitleSize; htmlTitle.Icon = formElement.Icon; + htmlTitle.Actions = actions; htmlTitle.SubTitle = expressionsService.GetExpressionValue(formElement.SubTitle, formStateData) as string; return htmlTitle; diff --git a/src/Core/UI/Components/IO/UploadView/JJUploadView.cs b/src/Core/UI/Components/IO/UploadView/JJUploadView.cs index 706792125..5aa0408fd 100644 --- a/src/Core/UI/Components/IO/UploadView/JJUploadView.cs +++ b/src/Core/UI/Components/IO/UploadView/JJUploadView.cs @@ -550,8 +550,8 @@ await li.AppendAsync(HtmlTag.Table, async table => table.WithCssClass("table-gallery"); var fileValues = ConvertFormFileToDictionary(file); var formStateData = new FormStateData(fileValues, UserValues, PageState.List); - var htmlActions = GridView.Table.Body.GetActionsHtmlListAsync(formStateData); - await table.AppendRangeAsync(htmlActions); + var htmlActions = await GridView.Table.Body.GetActionsHtmlListAsync(formStateData); + table.AppendRange(htmlActions); }); }); }); diff --git a/src/Core/UI/Components/Importation/DataImportationHelp.cs b/src/Core/UI/Components/Importation/DataImportationHelp.cs index 3bd76ac80..537312c86 100644 --- a/src/Core/UI/Components/Importation/DataImportationHelp.cs +++ b/src/Core/UI/Components/Importation/DataImportationHelp.cs @@ -37,7 +37,7 @@ public async Task GetHtmlHelpAsync() var html = panel.BuildHtml() .AppendHiddenInput("filename", "") - .AppendComponentIf(!string.IsNullOrWhiteSpace(DataImportation.ImportAction.HelpText), new JJAlert + .AppendComponentIf(!string.IsNullOrWhiteSpace(DataImportation.ImportAction.HelpText), ()=>new JJAlert { Title = StringLocalizer["Information"], Icon = IconType.InfoCircle, diff --git a/src/Core/UI/Html/HtmlBuilder.Children.cs b/src/Core/UI/Html/HtmlBuilder.Children.cs index 1a2729b98..02de98e0c 100644 --- a/src/Core/UI/Html/HtmlBuilder.Children.cs +++ b/src/Core/UI/Html/HtmlBuilder.Children.cs @@ -161,11 +161,11 @@ public HtmlBuilder AppendIf(bool condition, HtmlTag tag, Action? bu ///

/// Insert raw text as a child of caller builder. /// - public HtmlBuilder AppendText(string rawText) + public HtmlBuilder AppendText(string? rawText) { if (!string.IsNullOrEmpty(rawText)) { - var child = new HtmlBuilder(rawText); + var child = new HtmlBuilder(rawText!); Append(child); } @@ -249,10 +249,10 @@ public HtmlBuilder AppendComponent(HtmlComponent? component) return this; } - public HtmlBuilder AppendComponentIf(bool condition, HtmlComponent? component) + public HtmlBuilder AppendComponentIf(bool condition, Func componentFunc) { if (condition) - AppendComponent(component); + AppendComponent(componentFunc()); return this; } diff --git a/src/Core/UI/Html/HtmlBuilder.cs b/src/Core/UI/Html/HtmlBuilder.cs index 20b6b50b7..55fe0923f 100644 --- a/src/Core/UI/Html/HtmlBuilder.cs +++ b/src/Core/UI/Html/HtmlBuilder.cs @@ -88,7 +88,7 @@ private string ParseHtmlAsString(int tabCount) } html.Append('<'); - html.Append(Tag.TagName.ToString().ToLower()); + html.Append(Tag.TagName.GetTagName()); html.Append(GetAttributesHtml()); if (!Tag.HasClosingTag) @@ -112,7 +112,7 @@ private string ParseHtmlAsString(int tabCount) } html.Append("'); return html.ToString(); diff --git a/src/Core/UI/Html/HtmlBuilderTags.cs b/src/Core/UI/Html/HtmlBuilderTags.cs index 8e6bbdf63..16b5fa4b6 100644 --- a/src/Core/UI/Html/HtmlBuilderTags.cs +++ b/src/Core/UI/Html/HtmlBuilderTags.cs @@ -17,6 +17,7 @@ public sealed class H3() : HtmlBuilder(HtmlTag.H3); public sealed class H4() : HtmlBuilder(HtmlTag.H4); public sealed class H5() : HtmlBuilder(HtmlTag.H5); public sealed class H6() : HtmlBuilder(HtmlTag.H6); +public sealed class Ol() : HtmlBuilder(HtmlTag.Ol); public sealed class Small() : HtmlBuilder(HtmlTag.Small); public sealed class Ul() : HtmlBuilder(HtmlTag.Ul); public sealed class Li() : HtmlBuilder(HtmlTag.Li); diff --git a/src/Core/UI/Html/HtmlTag.cs b/src/Core/UI/Html/HtmlTag.cs index f864ec871..55ab8df32 100644 --- a/src/Core/UI/Html/HtmlTag.cs +++ b/src/Core/UI/Html/HtmlTag.cs @@ -1,4 +1,6 @@ -namespace JJMasterData.Core.UI.Html; +using System; + +namespace JJMasterData.Core.UI.Html; public enum HtmlTag { @@ -44,5 +46,63 @@ public enum HtmlTag FieldSet, Legend, U, - OptGroup + OptGroup, + Nav, + Ol +} + +public static class HtmlTagExtensions +{ + public static string GetTagName(this HtmlTag tag) + { + return tag switch + { + HtmlTag.A => "a", + HtmlTag.B => "b", + HtmlTag.Blockquote => "blockquote", + HtmlTag.Area => "area", + HtmlTag.Br => "br", + HtmlTag.Div => "div", + HtmlTag.Span => "span", + HtmlTag.Label => "label", + HtmlTag.Input => "input", + HtmlTag.Strong => "strong", + HtmlTag.Button => "button", + HtmlTag.H1 => "h1", + HtmlTag.H2 => "h2", + HtmlTag.H3 => "h3", + HtmlTag.H4 => "h4", + HtmlTag.H5 => "h5", + HtmlTag.H6 => "h6", + HtmlTag.Small => "small", + HtmlTag.Ul => "ul", + HtmlTag.Li => "li", + HtmlTag.TextArea => "textarea", + HtmlTag.Script => "script", + HtmlTag.Select => "select", + HtmlTag.Option => "option", + HtmlTag.Table => "table", + HtmlTag.Tr => "tr", + HtmlTag.Th => "th", + HtmlTag.Td => "td", + HtmlTag.Thead => "thead", + HtmlTag.Tbody => "tbody", + HtmlTag.Hr => "hr", + HtmlTag.I => "i", + HtmlTag.Section => "section", + HtmlTag.P => "p", + HtmlTag.Footer => "footer", + HtmlTag.Img => "img", + HtmlTag.Center => "center", + HtmlTag.Video => "video", + HtmlTag.Form => "form", + HtmlTag.FieldSet => "fieldset", + HtmlTag.Legend => "legend", + HtmlTag.U => "u", + HtmlTag.OptGroup => "optgroup", + HtmlTag.Nav => "nav", + HtmlTag.Ol => "ol", + _ => throw new ArgumentOutOfRangeException(nameof(tag), tag, null) + }; + } } \ No newline at end of file diff --git a/src/Plugins/Hangfire/Hangfire.csproj b/src/Plugins/Hangfire/Hangfire.csproj index 93ffae5e2..a2bae392c 100644 --- a/src/Plugins/Hangfire/Hangfire.csproj +++ b/src/Plugins/Hangfire/Hangfire.csproj @@ -5,9 +5,9 @@ true JJMasterData Hangfire support to background tasks, like exportation and importation. https://www.github.com/jjconsulting/jjmasterdata - 2.0.2 - 2.0.2 - 2.0.2 + 2.0.3 + 2.0.3 + 2.0.3 hangfire,jjmasterdata JJMasterData.Hangfire JJMasterData.Hangfire diff --git a/src/Plugins/NCalc/Configuration/MasterDataServiceBuilderExtensions.cs b/src/Plugins/NCalc/Configuration/MasterDataServiceBuilderExtensions.cs index 2e39e129b..ab6d43717 100644 --- a/src/Plugins/NCalc/Configuration/MasterDataServiceBuilderExtensions.cs +++ b/src/Plugins/NCalc/Configuration/MasterDataServiceBuilderExtensions.cs @@ -23,10 +23,29 @@ public static MasterDataServiceBuilder WithNCalcExpressionProvider(this MasterDa builder.Services.PostConfigure(o => { o.ReplaceDefaultExpressionProvider = options.ReplaceDefaultExpressionProvider; - o.EvaluateOptions = options.EvaluateOptions; + o.ExpressionOptions = options.ExpressionOptions; o.AdditionalFunctions = options.AdditionalFunctions; }); return builder; } + + public static MasterDataServiceBuilder WithNCalcExpressions(this MasterDataServiceBuilder builder) + { + builder.WithNCalcExpressionProvider(new NCalcExpressionProviderOptions + { + ReplaceDefaultExpressionProvider = true, + AdditionalFunctions = + [ + (name, args) => + { + if (name == "now") + args.Result = DateTime.Now; + } + ] + }); + + return builder; + } + } \ No newline at end of file diff --git a/src/Plugins/NCalc/Configuration/NCalcExpressionProviderOptions.cs b/src/Plugins/NCalc/Configuration/NCalcExpressionProviderOptions.cs index b0d1e2177..4559637bb 100644 --- a/src/Plugins/NCalc/Configuration/NCalcExpressionProviderOptions.cs +++ b/src/Plugins/NCalc/Configuration/NCalcExpressionProviderOptions.cs @@ -1,4 +1,5 @@ using NCalc; +using NCalc.Handlers; namespace JJMasterData.NCalc.Configuration; @@ -10,9 +11,9 @@ public class NCalcExpressionProviderOptions public bool ReplaceDefaultExpressionProvider { get; set; } = false; /// - /// EvaluateOptions [Flags] enum. Check NCalc wiki for more information + /// ExpressionOptions [Flags] enum. Check NCalc wiki for more information /// - public EvaluateOptions EvaluateOptions { get; set; } = EvaluateOptions.IgnoreCase | EvaluateOptions.CaseInsensitiveComparer; + public ExpressionOptions ExpressionOptions { get; set; } = ExpressionOptions.IgnoreCase | ExpressionOptions.CaseInsensitiveComparer; /// /// Additional functions to be used at expressions. Check NCalc wiki for more information diff --git a/src/Plugins/NCalc/NCalc.csproj b/src/Plugins/NCalc/NCalc.csproj index 5d9a8482a..3183ac58d 100644 --- a/src/Plugins/NCalc/NCalc.csproj +++ b/src/Plugins/NCalc/NCalc.csproj @@ -12,10 +12,10 @@ JJMasterData.NCalc ncalc,jjmasterdata true - Update NCalc to 3.12.0. - 1.0.5 - 1.0.5 - 1.0.5 + Update NCalc to 4.0. + 2.0.0 + 2.0.0 + 2.0.0 @@ -23,7 +23,7 @@ - + diff --git a/src/Plugins/NCalc/NCalcExpressionProvider.cs b/src/Plugins/NCalc/NCalcExpressionProvider.cs index 68c3cbc43..8fa1d0fbe 100644 --- a/src/Plugins/NCalc/NCalcExpressionProvider.cs +++ b/src/Plugins/NCalc/NCalcExpressionProvider.cs @@ -6,7 +6,7 @@ namespace JJMasterData.NCalc; -public class NCalcExpressionProvider(IOptionsSnapshot options) : +public sealed class NCalcExpressionProvider(IOptionsSnapshot options) : IAsyncExpressionProvider, ISyncExpressionProvider { @@ -14,11 +14,10 @@ public class NCalcExpressionProvider(IOptionsSnapshot Options.ReplaceDefaultExpressionProvider ? "Expression" : "NCalc"; private NCalcExpressionProviderOptions Options { get; } = options.Value; - public object? Evaluate(string expression, Dictionary parsedValues) { var replacedExpression = ExpressionHelper.ReplaceExpression(expression, parsedValues); - var ncalcExpression = new Expression(replacedExpression, Options.EvaluateOptions); + var ncalcExpression = new Expression(replacedExpression, Options.ExpressionOptions); foreach (var function in Options.AdditionalFunctions) ncalcExpression.EvaluateFunction += function; diff --git a/src/Plugins/Pdf/Pdf.csproj b/src/Plugins/Pdf/Pdf.csproj index 56c3f8653..c9dfd67ea 100644 --- a/src/Plugins/Pdf/Pdf.csproj +++ b/src/Plugins/Pdf/Pdf.csproj @@ -8,9 +8,9 @@ https://www.github.com/jjconsulting/jjmasterdata JJMasterData.png pdf,jjmasterdata - 2.0.3 - 2.0.3 - 2.0.3 + 2.0.4 + 2.0.4 + 2.0.4 © 2023 JJConsulting. All rights reserved. JJMasterData.Pdf JJMasterData.Pdf diff --git a/src/Plugins/Pdf/PdfWriter.cs b/src/Plugins/Pdf/PdfWriter.cs index da41d5a9f..e333f75ac 100644 --- a/src/Plugins/Pdf/PdfWriter.cs +++ b/src/Plugins/Pdf/PdfWriter.cs @@ -201,7 +201,8 @@ private async Task CreateCellAsync(Dictionary row, FormElem } else { - value = await FieldFormattingService.FormatGridValueAsync(field, row,null); + var fieldSelector = new FormElementFieldSelector(FormElement, field.Name); + value = await FieldFormattingService.FormatGridValueAsync(fieldSelector, new FormStateData(row,PageState.List)); } } @@ -306,7 +307,10 @@ private void SetCellStyle(FormElementField field, ref Cell cell) string value = string.Empty; string selectedValue = values[field.Name].ToString(); var formStateData = new FormStateData(values, PageState.List); - var dataItemValues = await DataItemService.GetValuesAsync(field.DataItem!, formStateData); + + var dataQuery = new DataQuery(formStateData, FormElement.ConnectionId); + + var dataItemValues = await DataItemService.GetValuesAsync(field.DataItem!, dataQuery); var item = dataItemValues.First(v=>v.Id == selectedValue); if (item != null) diff --git a/src/Web/Areas/DataDictionary/Controllers/AboutController.cs b/src/Web/Areas/DataDictionary/Controllers/AboutController.cs index b7251adf1..b3c8a2b3f 100644 --- a/src/Web/Areas/DataDictionary/Controllers/AboutController.cs +++ b/src/Web/Areas/DataDictionary/Controllers/AboutController.cs @@ -17,7 +17,6 @@ public IActionResult Index() ExecutingAssemblyVersion = executingAssembly.GetName() .Version!.ToString(), ExecutingAssemblyCopyright = AboutService.GetAssemblyCopyright(executingAssembly), - Dependencies = AboutService.GetJJAssemblies(), ExecutingAssemblyLastWriteTime = AboutService.GetAssemblyDate(executingAssembly) }; diff --git a/src/Web/Areas/DataDictionary/Controllers/ElementController.cs b/src/Web/Areas/DataDictionary/Controllers/ElementController.cs index 128f5aab1..8c151c9f2 100644 --- a/src/Web/Areas/DataDictionary/Controllers/ElementController.cs +++ b/src/Web/Areas/DataDictionary/Controllers/ElementController.cs @@ -4,6 +4,7 @@ using JJMasterData.Commons.Configuration.Options; using JJMasterData.Commons.Data.Entity.Repository.Abstractions; using JJMasterData.Commons.Localization; +using JJMasterData.Core.DataDictionary.Models; using JJMasterData.Core.UI.Components; using JJMasterData.Core.UI.Events.Args; using JJMasterData.Web.Areas.DataDictionary.Models; @@ -123,7 +124,7 @@ public async Task Scripts(string elementName) { var formElement = await elementService.GetFormElementAsync(elementName); var scripts = await scriptsService.GetScriptsAsync(formElement); - var tableExists = await entityRepository.TableExistsAsync(formElement.TableName); + var tableExists = await entityRepository.TableExistsAsync(formElement.TableName, formElement.ConnectionId); var model = new ElementScriptsViewModel { @@ -136,16 +137,16 @@ public async Task Scripts(string elementName) } [HttpPost] - public async Task Add(AddElementViewModel model) + public async Task Add(ElementBean model) { - var element = await elementService.CreateEntityAsync(model.Name, model.ImportFields); - if (element != null) + var formElement = await elementService.CreateEntityAsync(model); + if (formElement != null) { - return RedirectToAction("Index", "Entity", new { elementName = element.Name }); + return RedirectToAction("Index", "Entity", new { elementName = formElement.Name }); } - var jjValidationSummary = elementService.GetValidationSummary(); - ViewBag.Error = jjValidationSummary.GetHtml(); + var validationSummary = elementService.GetValidationSummary(); + ViewBag.Error = validationSummary.GetHtml(); return View(); } diff --git a/src/Web/Areas/DataDictionary/Controllers/EntityController.cs b/src/Web/Areas/DataDictionary/Controllers/EntityController.cs index a62c4b337..7b2007f72 100644 --- a/src/Web/Areas/DataDictionary/Controllers/EntityController.cs +++ b/src/Web/Areas/DataDictionary/Controllers/EntityController.cs @@ -1,17 +1,16 @@ -using JJMasterData.Commons.Configuration.Options; + using JJMasterData.Core.DataDictionary.Models; using JJMasterData.Core.DataDictionary.Services; using JJMasterData.Core.Events.Abstractions; using JJMasterData.Core.UI.Events.Abstractions; using JJMasterData.Web.Areas.DataDictionary.Models; using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Options; + namespace JJMasterData.Web.Areas.DataDictionary.Controllers; public class EntityController( EntityService entityService, - IOptions options, IFormEventHandlerResolver? formEventHandlerFactory = null, IGridEventHandlerResolver? gridEventHandlerResolver = null) : DataDictionaryController @@ -20,7 +19,25 @@ public async Task Index(string elementName) { return View(await Populate(elementName, true)); } + + [HttpPost] + public async Task Index( + EntityViewModel model) + { + var entity = await entityService.EditEntityAsync(model.Entity, model.ElementName); + + if (entity != null) + { + return View(model); + } + model.MenuId = "Entity"; + model.ValidationSummary = entityService.GetValidationSummary(); + + return View(model); + + } + public async Task Edit(string elementName) { return View(await Populate(elementName, false)); @@ -54,12 +71,6 @@ private async Task Populate(string elementName, bool readOnly) FormEvent = formEventHandlerFactory?.GetFormEventHandler(elementName) as IEventHandler ?? gridEventHandlerResolver?.GetGridEventHandler(elementName), Disabled = readOnly }; - - if (string.IsNullOrEmpty(viewModel.Entity.ReadProcedureName)) - entity.ReadProcedureName = options.Value.GetReadProcedureName(formElement); - - if (string.IsNullOrEmpty(viewModel.Entity.WriteProcedureName)) - entity.WriteProcedureName = options.Value.GetWriteProcedureName(formElement); return viewModel; } diff --git a/src/Web/Areas/DataDictionary/Controllers/FieldController.cs b/src/Web/Areas/DataDictionary/Controllers/FieldController.cs index 50889260b..3e236d98e 100644 --- a/src/Web/Areas/DataDictionary/Controllers/FieldController.cs +++ b/src/Web/Areas/DataDictionary/Controllers/FieldController.cs @@ -203,6 +203,7 @@ private async Task PopulateViewBag(FormElement formElement, FormElementField? fi else ViewBag.OriginalName = field.Name; + ViewBag.IsForm = formElement.TypeIdentifier == 'F'; ViewBag.MenuId = "Fields"; ViewBag.FormElement = formElement; ViewBag.ElementName = formElement.Name; diff --git a/src/Web/Areas/DataDictionary/Models/AboutViewModel.cs b/src/Web/Areas/DataDictionary/Models/AboutViewModel.cs index eb75ff9a4..3a53134c5 100644 --- a/src/Web/Areas/DataDictionary/Models/AboutViewModel.cs +++ b/src/Web/Areas/DataDictionary/Models/AboutViewModel.cs @@ -4,7 +4,6 @@ namespace JJMasterData.Web.Areas.DataDictionary.Models; public sealed class AboutViewModel { - public required List Dependencies { get; set; } public required string ExecutingAssemblyProduct { get; set; } public required string ExecutingAssemblyVersion { get; set; } public required string ExecutingAssemblyCopyright { get; set; } diff --git a/src/Web/Areas/DataDictionary/Models/AddElementViewModel.cs b/src/Web/Areas/DataDictionary/Models/AddElementViewModel.cs deleted file mode 100644 index 048f89d51..000000000 --- a/src/Web/Areas/DataDictionary/Models/AddElementViewModel.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace JJMasterData.Web.Areas.DataDictionary.Models; - -public sealed class AddElementViewModel -{ - [Display(Name = "Table Or View Name", Prompt = "Table Or View Name")] - public string Name { get; init; } = null!; - [Display(Name = "Import Fields")] - public bool ImportFields { get; init; } -} \ No newline at end of file diff --git a/src/Web/Areas/DataDictionary/Models/ConnectionResult.cs b/src/Web/Areas/DataDictionary/Models/ConnectionResult.cs deleted file mode 100644 index 800e22341..000000000 --- a/src/Web/Areas/DataDictionary/Models/ConnectionResult.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace JJMasterData.Web.Areas.DataDictionary.Models; - -public class ConnectionResult -{ - public bool? IsConnectionSuccessful { get; set; } - public string? ErrorMessage { get; set; } - - public ConnectionResult() - { - - } - public ConnectionResult(bool isConnectionSuccessful, string? errorMessage) - { - IsConnectionSuccessful = isConnectionSuccessful; - ErrorMessage = errorMessage; - } - -} \ No newline at end of file diff --git a/src/Web/Areas/DataDictionary/Models/ConnectionString.cs b/src/Web/Areas/DataDictionary/Models/ConnectionStringModel.cs similarity index 91% rename from src/Web/Areas/DataDictionary/Models/ConnectionString.cs rename to src/Web/Areas/DataDictionary/Models/ConnectionStringModel.cs index c471c8e7a..789260017 100644 --- a/src/Web/Areas/DataDictionary/Models/ConnectionString.cs +++ b/src/Web/Areas/DataDictionary/Models/ConnectionStringModel.cs @@ -3,7 +3,7 @@ namespace JJMasterData.Web.Areas.DataDictionary.Models; -public class ConnectionString +public class ConnectionStringModel { [Required] public string? Server { get; init; } @@ -19,21 +19,21 @@ public class ConnectionString public int? Timeout { get; init; } - public bool? TrustServerCertificate { get; init; } + public bool TrustServerCertificate { get; init; } - public bool? Encrypt { get; init; } + public bool Encrypt { get; init; } - public bool? Pooling { get; init; } + public bool Pooling { get; init; } public int? MinPoolSize { get; init; } public int? MaxPoolSize { get; init; } - public ConnectionString() + public ConnectionStringModel() { } - public ConnectionString(string? connectionString) + public ConnectionStringModel(string? connectionString) { var builder = new DbConnectionStringBuilder { @@ -143,13 +143,13 @@ public override string ToString() if (Timeout != null) builder["timeout"] = Timeout; - if (TrustServerCertificate != null) + if (TrustServerCertificate) builder["trust server certificate"] = TrustServerCertificate; - if (Encrypt != null) + if (Encrypt) builder["encrypt"] = Encrypt; - if (Pooling != null) + if (Pooling) builder["pooling"] = Pooling; if (MinPoolSize != null) diff --git a/src/Web/Areas/DataDictionary/Models/EntityViewModel.cs b/src/Web/Areas/DataDictionary/Models/EntityViewModel.cs index 5644e4c68..cb100fbd7 100644 --- a/src/Web/Areas/DataDictionary/Models/EntityViewModel.cs +++ b/src/Web/Areas/DataDictionary/Models/EntityViewModel.cs @@ -12,7 +12,7 @@ public sealed class EntityViewModel : DataDictionaryViewModel public string FormEventType => IsPythonFormEvent ? "Python" : ".NET"; public bool IsPythonFormEvent => FormEvent != null && FormEvent.GetType().ToString().Contains('$'); public bool Disabled { get; init; } - + // ReSharper disable once UnusedMember.Global // Reason: Used for model binding. public EntityViewModel() diff --git a/src/Web/Areas/DataDictionary/Models/SettingsViewModel.cs b/src/Web/Areas/DataDictionary/Models/SettingsViewModel.cs index b0661c977..7df8eca96 100644 --- a/src/Web/Areas/DataDictionary/Models/SettingsViewModel.cs +++ b/src/Web/Areas/DataDictionary/Models/SettingsViewModel.cs @@ -7,7 +7,7 @@ namespace JJMasterData.Web.Areas.DataDictionary.Models; public sealed class SettingsViewModel { - public required ConnectionString ConnectionString { get; init; } = new(); + public required ConnectionStringModel ConnectionString { get; init; } = new(); public MasterDataCommonsOptions? Options { get; init; } public string? FilePath { get; init; } diff --git a/src/Web/Areas/DataDictionary/Services/SettingsService.cs b/src/Web/Areas/DataDictionary/Services/SettingsService.cs index 88c0b0dec..c810af6ed 100644 --- a/src/Web/Areas/DataDictionary/Services/SettingsService.cs +++ b/src/Web/Areas/DataDictionary/Services/SettingsService.cs @@ -1,6 +1,7 @@ using JJMasterData.Commons.Configuration.Options; using JJMasterData.Commons.Configuration.Options.Abstractions; using JJMasterData.Commons.Data; +using JJMasterData.Commons.Data.Entity.Models; using JJMasterData.Commons.Localization; using JJMasterData.Core.Configuration.Options; using JJMasterData.Core.DataDictionary.Repository.Abstractions; @@ -63,12 +64,11 @@ public async Task GetViewModel() var connectionResult = await GetConnectionResultAsync(connectionString, connectionProvider); var viewModel = new SettingsViewModel { - ConnectionString = new ConnectionString(connectionString), + ConnectionString = new ConnectionStringModel(connectionString), CommonsOptions = CommonsWritableOptions.Value!, CoreOptions = CoreWritableOptions.Value!, WebOptions = WebWritableOptions.Value!, - FilePath = CoreWritableOptions.FilePath, - + FilePath = CoreWritableOptions.FilePath }; if (!viewModel.PathExists) @@ -96,7 +96,6 @@ public static async Task GetConnectionResultAsync( { TimeOut = 5 }; - var result = await dataAccess.TryConnectionAsync(cancellationToken); - return new ConnectionResult(result.Item1, result.Item2); + return await dataAccess.TryConnectionAsync(cancellationToken); } } \ No newline at end of file diff --git a/src/Web/Areas/DataDictionary/Views/About/Index.cshtml b/src/Web/Areas/DataDictionary/Views/About/Index.cshtml index 1da3d11fc..8b02130c4 100644 --- a/src/Web/Areas/DataDictionary/Views/About/Index.cshtml +++ b/src/Web/Areas/DataDictionary/Views/About/Index.cshtml @@ -6,33 +6,20 @@ }
- JJMasterData +
@Model.ExecutingAssemblyProduct
- Version: @Model.ExecutingAssemblyVersion + @Localizer["Version"]: @Model.ExecutingAssemblyVersion
- Last Write: @Model.ExecutingAssemblyLastWriteTime + @Localizer["Last Write"]: @Model.ExecutingAssemblyLastWriteTime
@Model.ExecutingAssemblyCopyright
- -
    - @foreach (var assembly in Model.Dependencies!) - { -
  • - @assembly.GetName().Name -
    - Version: @assembly.GetName().Version?.ToString() -
    -
  • - } -
-
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/AuditLogFormToolbarAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/AuditLogFormToolbarAction.cshtml index e9a8c2e5c..e4091c4ae 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/AuditLogFormToolbarAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/AuditLogFormToolbarAction.cshtml @@ -9,14 +9,14 @@ } @using (Html.BeginMasterDataForm("AuditLogFormToolbarAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
@await Html.PartialAsync("_NavGeneral", Model)
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/AuditLogGridToolbarAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/AuditLogGridToolbarAction.cshtml index e852d78aa..0a0161c4b 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/AuditLogGridToolbarAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/AuditLogGridToolbarAction.cshtml @@ -10,14 +10,14 @@ } @using (Html.BeginMasterDataForm("AuditLogGridToolbarAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
@await Html.PartialAsync("_NavGeneral", Model)
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/BackAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/BackAction.cshtml index 69489cba1..21102e909 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/BackAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/BackAction.cshtml @@ -7,14 +7,14 @@ } @using (Html.BeginMasterDataForm("BackAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/CancelAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/CancelAction.cshtml index 0097cbf4e..97af80bba 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/CancelAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/CancelAction.cshtml @@ -7,14 +7,14 @@ } @using (Html.BeginMasterDataForm("CancelAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/ConfigAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/ConfigAction.cshtml index 5c408fec3..f96f49639 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/ConfigAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/ConfigAction.cshtml @@ -18,7 +18,7 @@ -
+
@await Html.PartialAsync("_NavGeneral", Model)
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/DeleteAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/DeleteAction.cshtml index d4f685e7d..b4a9ea0be 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/DeleteAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/DeleteAction.cshtml @@ -7,14 +7,14 @@ } @using (Html.BeginMasterDataForm("DeleteAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/EditAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/EditAction.cshtml index f1f87148a..adb8c643c 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/EditAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/EditAction.cshtml @@ -9,7 +9,7 @@ } @using (Html.BeginMasterDataForm("EditAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/ExportAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/ExportAction.cshtml index c6cfb8ffe..468f473f2 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/ExportAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/ExportAction.cshtml @@ -7,7 +7,7 @@ } @using (Html.BeginMasterDataForm("ExportAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/FilterAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/FilterAction.cshtml index 6a9c2cf9c..9a48d89dc 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/FilterAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/FilterAction.cshtml @@ -7,7 +7,7 @@ } @using (Html.BeginMasterDataForm("FilterAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/FormEditAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/FormEditAction.cshtml index 06f2c5d86..7cbc37438 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/FormEditAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/FormEditAction.cshtml @@ -7,14 +7,14 @@ } @using (Html.BeginMasterDataForm("FormEditAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/ImportAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/ImportAction.cshtml index 6f585e835..3ce3b7623 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/ImportAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/ImportAction.cshtml @@ -7,7 +7,7 @@ } @using (Html.BeginMasterDataForm("ImportAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/InsertAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/InsertAction.cshtml index 80cadf073..0f4e76079 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/InsertAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/InsertAction.cshtml @@ -33,7 +33,7 @@ } @using (Html.BeginMasterDataForm("InsertAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
@await Html.PartialAsync("_NavGeneral", Model)
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/InternalAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/InternalAction.cshtml index 47f4e7230..bdc6cd545 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/InternalAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/InternalAction.cshtml @@ -49,7 +49,7 @@ @using (Html.BeginMasterDataForm("InternalAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction, fieldName = ViewBag.FieldName }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction, fieldName = ViewBag.FieldName })) { @@ -59,7 +59,7 @@ -
+
@await Html.PartialAsync("_NavGeneral", Model)
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/LegendAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/LegendAction.cshtml index 817641840..c6f800fa9 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/LegendAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/LegendAction.cshtml @@ -7,14 +7,14 @@ } @using (Html.BeginMasterDataForm("LegendAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
@await Html.PartialAsync("_NavGeneral", Model)
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/PluginAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/PluginAction.cshtml index 8997a9c6d..ffda527c9 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/PluginAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/PluginAction.cshtml @@ -35,7 +35,7 @@ -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/PluginFieldAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/PluginFieldAction.cshtml index 695e1f0c3..2c5bb1203 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/PluginFieldAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/PluginFieldAction.cshtml @@ -21,7 +21,7 @@ } @using (Html.BeginMasterDataForm("PluginFieldAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction, fieldName = ViewBag.FieldName }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction, fieldName = ViewBag.FieldName })) { @@ -43,7 +43,7 @@ -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/RefreshAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/RefreshAction.cshtml index 025297a9d..793f05cbc 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/RefreshAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/RefreshAction.cshtml @@ -7,14 +7,14 @@ } @using (Html.BeginMasterDataForm("RefreshAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
@await Html.PartialAsync("_NavGeneral", Model)
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/SaveAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/SaveAction.cshtml index c2ae1e842..efa4c0c68 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/SaveAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/SaveAction.cshtml @@ -7,14 +7,14 @@ } @using (Html.BeginMasterDataForm("SaveAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/ScriptAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/ScriptAction.cshtml index f055470fc..029112da7 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/ScriptAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/ScriptAction.cshtml @@ -8,7 +8,7 @@ } @using (Html.BeginMasterDataForm("ScriptAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction, fieldName = ViewBag.FieldName }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction, fieldName = ViewBag.FieldName })) { -
+
@await Html.PartialAsync("_NavGeneral", Model)
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/SortAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/SortAction.cshtml index 6896b6fc4..491151593 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/SortAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/SortAction.cshtml @@ -7,14 +7,14 @@ } @using (Html.BeginMasterDataForm("SortAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction })) { -
+
@await Html.PartialAsync("_NavGeneral", Model)
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/SqlCommandAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/SqlCommandAction.cshtml index 858df99fd..8360dc2e3 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/SqlCommandAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/SqlCommandAction.cshtml @@ -45,7 +45,7 @@ } @using (Html.BeginMasterDataForm("SqlCommandAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction, fieldName = ViewBag.FieldName }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction, fieldName = ViewBag.FieldName })) { -
+
@await Html.PartialAsync("_NavGeneral", Model)
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/UrlRedirectAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/UrlRedirectAction.cshtml index 9ff4c769b..e69545281 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/UrlRedirectAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/UrlRedirectAction.cshtml @@ -8,7 +8,7 @@ } @using (Html.BeginMasterDataForm("UrlRedirectAction", "Actions", - new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction, fieldName = ViewBag.FieldName }, FormMethod.Post)) + new { elementName = ViewBag.ElementName, context = ViewBag.ContextAction, fieldName = ViewBag.FieldName })) { -
+
@await Html.PartialAsync("_NavGeneral", Model)
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/ViewAction.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/ViewAction.cshtml index 2ee314b58..8904db9f2 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/ViewAction.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/ViewAction.cshtml @@ -22,7 +22,7 @@ -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Actions/_List.cshtml b/src/Web/Areas/DataDictionary/Views/Actions/_List.cshtml index 9933020c6..f0e99f8a8 100644 --- a/src/Web/Areas/DataDictionary/Views/Actions/_List.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Actions/_List.cshtml @@ -94,12 +94,12 @@
-
    +
    @foreach (var action in Model.Actions!) { -
  • -
    -
    +
    +
    +
      @{ var actionName = StringLocalizer[action.Text ?? action.Tooltip ?? action.Name]; @@ -141,10 +141,9 @@ }
    -
  • +
    } -
- +
diff --git a/src/Web/Areas/DataDictionary/Views/Element/Add.cshtml b/src/Web/Areas/DataDictionary/Views/Element/Add.cshtml index 0edd7effc..77c0893f6 100644 --- a/src/Web/Areas/DataDictionary/Views/Element/Add.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Element/Add.cshtml @@ -1,18 +1,32 @@ -@using JJMasterData.Core.UI.Components +@using JJMasterData.Commons.Configuration.Options +@using JJMasterData.Core.UI.Components @inject IStringLocalizer StringLocalizer -@inject IComponentFactory ComponentFactory -@model AddElementViewModel +@inject IOptionsSnapshot OptionsSnapshot +@inject JJMasterDataLogo MasterDataLogo +@model JJMasterData.Core.DataDictionary.Models.ElementBean - +@{ + var backUrl = Url.Action("Index", "Element")!; + List breadcrumbs = [ + new BreadcrumbItem(MasterDataLogo.GetHtmlBuilder(), backUrl), + new BreadcrumbItem(StringLocalizer["Data Dictionary"], backUrl), + new BreadcrumbItem(StringLocalizer["Add Element"]) + ]; +} + + @using (Html.BeginMasterDataForm()) { -
-
+
+
- + +
+ +
+
+ + +
+
+
@@ -34,7 +62,7 @@
- +
diff --git a/src/Web/Areas/DataDictionary/Views/Element/Duplicate.cshtml b/src/Web/Areas/DataDictionary/Views/Element/Duplicate.cshtml index 66ee41fea..5b8e6015b 100644 --- a/src/Web/Areas/DataDictionary/Views/Element/Duplicate.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Element/Duplicate.cshtml @@ -1,11 +1,19 @@ @using JJMasterData.Core.UI.Components @inject IStringLocalizer StringLocalizer -@inject IComponentFactory ComponentFactory +@inject JJMasterDataLogo MasterDataLogo + @model DuplicateElementViewModel - +@{ + var backUrl = Url.Action("Index", "Element")!; + List breadcrumbs = [ + new BreadcrumbItem(MasterDataLogo.GetHtmlBuilder(), backUrl), + new BreadcrumbItem(StringLocalizer["Data Dictionary"], backUrl), + new BreadcrumbItem(StringLocalizer["Duplicate Element"]) + ]; +} + + @using (Html.BeginMasterDataForm()) { @@ -42,7 +50,7 @@
- +
diff --git a/src/Web/Areas/DataDictionary/Views/Element/Index.cshtml b/src/Web/Areas/DataDictionary/Views/Element/Index.cshtml index 402dac5d6..235b78237 100644 --- a/src/Web/Areas/DataDictionary/Views/Element/Index.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Element/Index.cshtml @@ -1,11 +1,17 @@ -@inject IStringLocalizer StringLocalizer - +@using JJMasterData.Core.UI.Components +@inject IStringLocalizer StringLocalizer +@inject JJMasterDataLogo MasterDataLogo @{ - ViewData["Title"] = StringLocalizer["Data Dictionary"]; + string title = StringLocalizer["Data Dictionary"]; + ViewData["Title"] = title; + List breadcrumbs = [new BreadcrumbItem(MasterDataLogo.GetHtmlBuilder()), new BreadcrumbItem(title)]; } + + @Html.Raw(ViewBag.FormViewHtml) + diff --git a/src/Web/Areas/DataDictionary/Views/Entity/Edit.cshtml b/src/Web/Areas/DataDictionary/Views/Entity/Edit.cshtml index e074cbde7..81af0a183 100644 --- a/src/Web/Areas/DataDictionary/Views/Entity/Edit.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Entity/Edit.cshtml @@ -1,6 +1,7 @@ @inject IStringLocalizer StringLocalizer @using JJMasterData.Core.UI.Components -@model EntityViewModel; +@using JJMasterData.Web.Extensions +@model JJMasterData.Web.Areas.DataDictionary.Models.EntityViewModel; @{ ViewData["Title"] = $"{Model.ElementName} - {StringLocalizer["Entity"]}"; @@ -8,7 +9,7 @@ -@using (Html.BeginMasterDataForm("Edit", "Entity", FormMethod.Post)) +@using (Html.BeginMasterDataForm("Edit", "Entity")) {
@@ -24,14 +25,9 @@ - + - - - - - if (Model.FormEvent != null) { diff --git a/src/Web/Areas/DataDictionary/Views/Entity/Index.cshtml b/src/Web/Areas/DataDictionary/Views/Entity/Index.cshtml index e54b282bf..f3ff57d91 100644 --- a/src/Web/Areas/DataDictionary/Views/Entity/Index.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Entity/Index.cshtml @@ -1,4 +1,5 @@ -@inject IStringLocalizer StringLocalizer + +@inject IStringLocalizer StringLocalizer @model EntityViewModel; @@ -30,13 +31,9 @@ - + - - - - if (Model.FormEvent != null) { diff --git a/src/Web/Areas/DataDictionary/Views/Entity/_ElementPanel.cshtml b/src/Web/Areas/DataDictionary/Views/Entity/_ElementPanel.cshtml index a5bb9db40..beb8c6be5 100644 --- a/src/Web/Areas/DataDictionary/Views/Entity/_ElementPanel.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Entity/_ElementPanel.cshtml @@ -1,24 +1,28 @@  @inject IStringLocalizer StringLocalizer +@inject IOptionsSnapshot OptionsSnapshot +@using JJMasterData.Commons.Configuration.Options @model EntityViewModel +@{ + bool hasConnections = OptionsSnapshot.Value.AdditionalConnectionStrings.Count > 0; + var options = OptionsSnapshot.Value; +}
-
- - -
+ +
-
- - -
+ +
+ +
-
- - -
+
+
-
- - -
+ + +
+
+
+ +
+ @if (hasConnections) + { +
+ +
+ } +
+ +
@@ -60,14 +80,14 @@ { - - - } - - - - @using (Html.BeginMasterDataForm("Index", "Field", FormMethod.Post)) - { - - - } - + \ No newline at end of file diff --git a/src/Web/Areas/DataDictionary/Views/Field/_Component.cshtml b/src/Web/Areas/DataDictionary/Views/Field/_Component.cshtml index b253bdeaa..4d1e36ae5 100644 --- a/src/Web/Areas/DataDictionary/Views/Field/_Component.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Field/_Component.cshtml @@ -9,11 +9,19 @@ @{ var componentList = Html.GetEnumSelectList().ToList(); + if (!ViewBag.IsForm) + { + componentList.RemoveAll(c => c.Text == "File"); + } + foreach (var component in componentList) component.Group.Name = StringLocalizer[component.Group.Name]; }
- +
@@ -38,7 +46,7 @@ or FormComponent.Cep or FormComponent.Cnpj or FormComponent.Cpf - or FormComponent.CnpjCpf) + or FormComponent.CnpjCpf && ViewBag.IsForm) { if (ViewBag.OriginalName == null || ViewBag.OriginalName == "") { diff --git a/src/Web/Areas/DataDictionary/Views/Field/_DataItem.cshtml b/src/Web/Areas/DataDictionary/Views/Field/_DataItem.cshtml index c666d1a28..f3b707696 100644 --- a/src/Web/Areas/DataDictionary/Views/Field/_DataItem.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Field/_DataItem.cshtml @@ -19,20 +19,24 @@
-
-
- - + @if (ViewBag.IsForm) + { +
+
+ + +
-
+ + } @if (Model.Component is FormComponent.ComboBox) { @@ -54,7 +58,7 @@
} - @if (Model.Component is FormComponent.ComboBox) + @if (Model.Component is FormComponent.ComboBox && ViewBag.IsForm) {
diff --git a/src/Web/Areas/DataDictionary/Views/Field/_Detail.cshtml b/src/Web/Areas/DataDictionary/Views/Field/_Detail.cshtml index f3b1c8a1d..059904b05 100644 --- a/src/Web/Areas/DataDictionary/Views/Field/_Detail.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Field/_Detail.cshtml @@ -71,7 +71,7 @@ -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Field/_FieldLayout.cshtml b/src/Web/Areas/DataDictionary/Views/Field/_FieldLayout.cshtml index d2f7ba77a..2261227cc 100644 --- a/src/Web/Areas/DataDictionary/Views/Field/_FieldLayout.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Field/_FieldLayout.cshtml @@ -7,14 +7,16 @@ @inject IStringLocalizer StringLocalizer -
-
- - -
-
+ +
+
+ + +
+
+
@@ -24,23 +26,28 @@
- +
+
-
-
- - + +
+
+
+ + +
-
- - @if (Model.SupportsFloatingLabel()) - { -
- +
+
+ + +
+ +
- } -
\ No newline at end of file +
+
\ No newline at end of file diff --git a/src/Web/Areas/DataDictionary/Views/Field/_General.cshtml b/src/Web/Areas/DataDictionary/Views/Field/_General.cshtml index 8aecef805..5e3dd05c6 100644 --- a/src/Web/Areas/DataDictionary/Views/Field/_General.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Field/_General.cshtml @@ -29,20 +29,23 @@
-
-
-
- - +@if (ViewBag.IsForm) +{ +
+
+
+ + +
-
-
-
- - +
+
+ + +
-
+}
@@ -69,24 +72,31 @@
-
- -
-
- -
-
- -
-
- -
+ + @if (ViewBag.IsForm) + { +
+ +
+
+ +
+ +
+ +
+ }
-
- -
+ + @if (ViewBag.IsForm) + { +
+ +
+ } + @if (Options.Value.SupportNetFramework) {
diff --git a/src/Web/Areas/DataDictionary/Views/Log/Index.cshtml b/src/Web/Areas/DataDictionary/Views/Log/Index.cshtml index 2da67cc1e..01672ed53 100644 --- a/src/Web/Areas/DataDictionary/Views/Log/Index.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Log/Index.cshtml @@ -8,6 +8,12 @@ Layout = Model.IsModal ? Options.Value.ModalLayoutPath : Options.Value.LayoutPath; } + + @Html.Raw(Model.FormViewHtml) \ No newline at end of file diff --git a/src/Web/Areas/DataDictionary/Views/Panel/Index.cshtml b/src/Web/Areas/DataDictionary/Views/Panel/Index.cshtml index 18a82c84b..b8da59afe 100644 --- a/src/Web/Areas/DataDictionary/Views/Panel/Index.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Panel/Index.cshtml @@ -144,7 +144,7 @@
-
+
@{int nLine = 0;} @if (ViewBag.Panels.Count == 0) { diff --git a/src/Web/Areas/DataDictionary/Views/Panel/_Detail.cshtml b/src/Web/Areas/DataDictionary/Views/Panel/_Detail.cshtml index 81b7f761a..28768f3e5 100644 --- a/src/Web/Areas/DataDictionary/Views/Panel/_Detail.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Panel/_Detail.cshtml @@ -100,7 +100,7 @@ @Html.HiddenFor(model => model.PanelId) -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Panel/_DetailExpressions.cshtml b/src/Web/Areas/DataDictionary/Views/Panel/_DetailExpressions.cshtml index 407022656..c70712f38 100644 --- a/src/Web/Areas/DataDictionary/Views/Panel/_DetailExpressions.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Panel/_DetailExpressions.cshtml @@ -4,9 +4,9 @@
- +
- +
\ No newline at end of file diff --git a/src/Web/Areas/DataDictionary/Views/Panel/_DetailGeneral.cshtml b/src/Web/Areas/DataDictionary/Views/Panel/_DetailGeneral.cshtml index 99369a852..1293f4b57 100644 --- a/src/Web/Areas/DataDictionary/Views/Panel/_DetailGeneral.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Panel/_DetailGeneral.cshtml @@ -5,36 +5,31 @@
-
- - -
+ +
-
- - -
+ + + +
-
- - -
- + +
- +
- +
diff --git a/src/Web/Areas/DataDictionary/Views/Relationships/DetailLayout.cshtml b/src/Web/Areas/DataDictionary/Views/Relationships/DetailLayout.cshtml index c55c34178..aacf03983 100644 --- a/src/Web/Areas/DataDictionary/Views/Relationships/DetailLayout.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Relationships/DetailLayout.cshtml @@ -57,7 +57,7 @@ -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Relationships/Index.cshtml b/src/Web/Areas/DataDictionary/Views/Relationships/Index.cshtml index 67f8791d1..1701a4fad 100644 --- a/src/Web/Areas/DataDictionary/Views/Relationships/Index.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Relationships/Index.cshtml @@ -39,7 +39,7 @@ -
+
diff --git a/src/Web/Areas/DataDictionary/Views/Relationships/_IndexLayout.cshtml b/src/Web/Areas/DataDictionary/Views/Relationships/_IndexLayout.cshtml index 72e0fcb03..eef90d3e2 100644 --- a/src/Web/Areas/DataDictionary/Views/Relationships/_IndexLayout.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Relationships/_IndexLayout.cshtml @@ -50,12 +50,12 @@
@if (Model.Relationships.Any()) { -
    +
    @foreach (var relationship in Model.Relationships) { var id = relationship.ElementRelationship?.ChildElement ?? "parent"; var title = relationship.ElementRelationship?.ChildElement ?? Model.ElementName; -
  • +
      @@ -67,9 +67,9 @@
    -
  • +
    } -
+
} else { diff --git a/src/Web/Areas/DataDictionary/Views/Settings/Index.cshtml b/src/Web/Areas/DataDictionary/Views/Settings/Index.cshtml index 0e90dcd9f..026bbb8c5 100644 --- a/src/Web/Areas/DataDictionary/Views/Settings/Index.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Settings/Index.cshtml @@ -3,22 +3,27 @@ @model SettingsViewModel @inject IComponentFactory ComponentFactory @inject IStringLocalizer StringLocalizer +@inject JJMasterDataLogo MasterDataLogo + @{ - ViewData["Title"] = StringLocalizer["Application Settings"]; + string title = StringLocalizer["Application Settings"]; + ViewData["Title"] = title; + List breadcrumbs = [ + new BreadcrumbItem(MasterDataLogo.GetHtmlBuilder()) + { + Url = Url.Action("Index","Element", new {Area="DataDictionary"}) + }, + new BreadcrumbItem(title) + ]; + }
-
-

- @Html.Raw(ComponentFactory.Html.Image.CreateMasterDataLogo().GetHtml()) - @StringLocalizer["Application Settings"] -

-
+
-
@if (!ViewData.ModelState.IsValid && Model.ValidationSummary != null) diff --git a/src/Web/Areas/DataDictionary/Views/Settings/_ConnectionString.cshtml b/src/Web/Areas/DataDictionary/Views/Settings/_ConnectionString.cshtml index e220b67e9..77778d738 100644 --- a/src/Web/Areas/DataDictionary/Views/Settings/_ConnectionString.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Settings/_ConnectionString.cshtml @@ -4,96 +4,23 @@
- * - - -
-
- * - -
-
- - -
-
- * - -
- -
-
- * - -
-
- * - -
-
- -
- * - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- - -
-
- - +
+ +
+ +
-
- -
+
+
+
- - + + \ No newline at end of file diff --git a/src/Web/Areas/DataDictionary/Views/Shared/_Menu.cshtml b/src/Web/Areas/DataDictionary/Views/Shared/_Menu.cshtml index 43c8f300c..05e02e09e 100644 --- a/src/Web/Areas/DataDictionary/Views/Shared/_Menu.cshtml +++ b/src/Web/Areas/DataDictionary/Views/Shared/_Menu.cshtml @@ -1,90 +1,73 @@ - -@using JJMasterData.Core.UI.Components +@using JJMasterData.Core.UI.Components @using JJMasterData.Core.DataDictionary.Models @inject IStringLocalizer StringLocalizer -@inject IComponentFactory ComponentFactory +@inject JJMasterDataLogo MasterDataLogo @model DataDictionaryViewModel; + +@{ + var backUrl = Url.Action("Index", "Element")!; + List breadcrumbs = [new BreadcrumbItem(MasterDataLogo.GetHtmlBuilder(), backUrl), new BreadcrumbItem(StringLocalizer["Data Dictionary"], backUrl), new BreadcrumbItem(Model.ElementName)]; +} + -
-

- @Html.Raw(ComponentFactory.Html.Image.CreateMasterDataLogo().GetHtml()) - @Model.ElementName -

+ - + @functions { private string IsActive(string menuId) { string cssClass = string.Empty; - + if (Model.MenuId!.Equals(menuId)) { cssClass += " active"; } - + return cssClass; } + private void NavItem( string label, string iconCssClass, string? url) { diff --git a/src/Web/Areas/DataDictionary/Views/UIOptions/Edit.cshtml b/src/Web/Areas/DataDictionary/Views/UIOptions/Edit.cshtml index d61ab3d54..997423c3c 100644 --- a/src/Web/Areas/DataDictionary/Views/UIOptions/Edit.cshtml +++ b/src/Web/Areas/DataDictionary/Views/UIOptions/Edit.cshtml @@ -9,7 +9,7 @@ -@using (Html.BeginMasterDataForm("Edit", "UIOptions", FormMethod.Post)) +@using (Html.BeginMasterDataForm("Edit", "UIOptions")) {
diff --git a/src/Web/Areas/DataDictionary/Views/UIOptions/_Options.cshtml b/src/Web/Areas/DataDictionary/Views/UIOptions/_Options.cshtml index dfbf21df1..cbf62c2cb 100644 --- a/src/Web/Areas/DataDictionary/Views/UIOptions/_Options.cshtml +++ b/src/Web/Areas/DataDictionary/Views/UIOptions/_Options.cshtml @@ -1,7 +1,12 @@ @model JJMasterData.Core.DataDictionary.Models.FormElementOptions +@inject IStringLocalizer StringLocalizer +
-
+
+
+ +
\ No newline at end of file diff --git a/src/Web/Areas/MasterData/Controllers/FormController.cs b/src/Web/Areas/MasterData/Controllers/FormController.cs index b7cd0428a..88cb9e502 100644 --- a/src/Web/Areas/MasterData/Controllers/FormController.cs +++ b/src/Web/Areas/MasterData/Controllers/FormController.cs @@ -1,12 +1,17 @@ -using JJMasterData.Core.Extensions; +using JJMasterData.Commons.Localization; +using JJMasterData.Core.DataDictionary; +using JJMasterData.Core.Extensions; using JJMasterData.Core.UI.Components; using JJMasterData.Web.Areas.MasterData.Models; -using JJMasterData.Web.Extensions; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Localization; namespace JJMasterData.Web.Areas.MasterData.Controllers; -public class FormController(IFormElementComponentFactory formViewFactory) : MasterDataController +public class FormController( + IFormElementComponentFactory formViewFactory, + IStringLocalizer stringLocalizer + ) : MasterDataController { public async Task Render(string elementName) { @@ -15,7 +20,7 @@ public async Task Render(string elementName) ConfigureFormView(formView); var result = await formView.GetResultAsync(); - + if (result is IActionResult actionResult) return actionResult; @@ -34,6 +39,18 @@ private void ConfigureFormView(JJFormView formView) if (userId == null) return; + + if (HttpContext.User.HasClaim(c => c.Type is "DataDictionary")) + { + formView.TitleActions = [ + new TitleAction + { + Url = Url.Action("Index","Entity", new {Area="DataDictionary", elementName=formView.FormElement.Name})!, + Icon = IconType.Pencil, + Tooltip = stringLocalizer["Edit Element"] + } + ]; + } formView.GridView.SetCurrentFilter("USERID", userId); diff --git a/src/Web/Configuration/ServiceCollectionExtensions.cs b/src/Web/Configuration/ServiceCollectionExtensions.cs index 8bccfa3e5..59daefe74 100644 --- a/src/Web/Configuration/ServiceCollectionExtensions.cs +++ b/src/Web/Configuration/ServiceCollectionExtensions.cs @@ -97,7 +97,7 @@ private static void AddMasterDataWebServices( services.AddHttpContextAccessor(); services.AddSession(); - services.AddDistributedMemoryCache(); + services.AddMemoryCache(); services.AddActionFilters(); } diff --git a/src/Web/Extensions/AssetPipelineExtensions.cs b/src/Web/Extensions/AssetPipelineExtensions.cs index cd7657ec4..060074056 100644 --- a/src/Web/Extensions/AssetPipelineExtensions.cs +++ b/src/Web/Extensions/AssetPipelineExtensions.cs @@ -64,6 +64,9 @@ private static void BundleAndMinifyJsFiles(IAssetPipeline options) { "_content/JJMasterData.Web/js/codemirror/lib/codemirror.js", "_content/JJMasterData.Web/js/codemirror/mode/sql.js", + "_content/JJMasterData.Web/js/codemirror/mode/html.js", + "_content/JJMasterData.Web/js/codemirror/mode/css.js", + "_content/JJMasterData.Web/js/codemirror/mode/xml.js", "_content/JJMasterData.Web/js/codemirror/addon/hint/show-hint.js", "_content/JJMasterData.Web/js/codemirror/addon/hint/sql-hint.js", }; diff --git a/src/Web/Models/ModelStateWrapper.cs b/src/Web/Models/ModelStateWrapper.cs index 92f73e8a9..2585aabb3 100644 --- a/src/Web/Models/ModelStateWrapper.cs +++ b/src/Web/Models/ModelStateWrapper.cs @@ -6,7 +6,7 @@ namespace JJMasterData.Web.Models; public class ModelStateWrapper(IActionContextAccessor actionContextAccessor) : IValidationDictionary { - private readonly ModelStateDictionary _modelState = actionContextAccessor.ActionContext!.ModelState; + private readonly ModelStateDictionary _modelState = actionContextAccessor.ActionContext?.ModelState ?? new ModelStateDictionary(); public IEnumerable Errors => _modelState.Values.SelectMany(entry => entry.Errors.Select(e => e.ErrorMessage)); diff --git a/src/Web/Scripts/ActionHelper.ts b/src/Web/Scripts/ActionHelper.ts index b7afb6bb7..0de5cd2a6 100644 --- a/src/Web/Scripts/ActionHelper.ts +++ b/src/Web/Scripts/ActionHelper.ts @@ -5,15 +5,15 @@ class ActionHelper { getMasterDataForm().submit(); } - static executeSqlCommand( + static async executeSqlCommand( componentName: string, - encryptedActionMap: string, + encryptedActionMap: string, encryptedRouteContext: string, isSubmit: boolean, confirmMessage: string) { - + if (confirmMessage) { - const result = confirm(confirmMessage); + const result = await showConfirmationMessage(confirmMessage); if (!result) { return false; } @@ -21,33 +21,31 @@ class ActionHelper { const gridViewActionInput = document.querySelector("#grid-view-action-map-" + componentName); const formViewActionInput = document.querySelector("#current-action-map-" + componentName); - - if(gridViewActionInput){ + + if (gridViewActionInput) { gridViewActionInput.value = encryptedActionMap; - } - else if(formViewActionInput){ + } else if (formViewActionInput) { formViewActionInput.value = encryptedActionMap; } - - - if(isSubmit){ + if (isSubmit) { ActionHelper.submitWithScrollPosition(); - } - else{ + } else { const urlBuilder = new UrlBuilder(); urlBuilder.addQueryParameter("routeContext", encryptedRouteContext); - postFormValues({url:urlBuilder.build(), success: data => { + postFormValues({ + url: urlBuilder.build(), success: data => { TooltipHelper.dispose("#" + componentName) - HTMLHelper.setOuterHTML(componentName,data); + HTMLHelper.setOuterHTML(componentName, data); listenAllEvents("#" + componentName); - }}) + } + }) } } - static executeRedirectAction(componentName: string, routeContext: string, encryptedActionMap: string, confirmationMessage?: string) { + static async executeRedirectAction(componentName: string, routeContext: string, encryptedActionMap: string, confirmationMessage?: string) { if (confirmationMessage) { - const result = confirm(confirmationMessage); + const result = await showConfirmationMessage(confirmationMessage); if (!result) { return false; } @@ -66,11 +64,10 @@ class ActionHelper { newFormInput.value = encryptedActionMap; document.querySelector('form').appendChild(newFormInput); } - + if (gridViewActionInput) { gridViewActionInput.value = encryptedActionMap; - } - else{ + } else { const newGridInput = document.createElement("input"); newGridInput.id = "grid-view-action-map-" + componentName; newGridInput.name = "grid-view-action-map-" + componentName; @@ -78,7 +75,7 @@ class ActionHelper { newGridInput.value = encryptedActionMap; document.querySelector('form').appendChild(newGridInput); } - + const urlBuilder = new UrlBuilder(); urlBuilder.addQueryParameter("routeContext", routeContext); urlBuilder.addQueryParameter("componentName", componentName); @@ -90,22 +87,20 @@ class ActionHelper { return true; } - static executeClientSideRedirect(url, isModal, modalTitle,modalSize, isIframe,confirmationMessage) { + static async executeClientSideRedirect(url, isModal, modalTitle, modalSize, isIframe, confirmationMessage) { if (confirmationMessage) { - const result = confirm(confirmationMessage); + const result = await showConfirmationMessage(confirmationMessage); if (!result) { return false; } } if (isModal) { - if(isIframe){ + if (isIframe) { defaultModal.showIframe(url, modalTitle, modalSize); - } - else{ + } else { defaultModal.showUrl(url, modalTitle, modalSize); } - } - else { + } else { window.location.href = url; } } @@ -128,9 +123,10 @@ class ActionHelper { }) } - private static executeInternalRedirect(url: string, modalSize: ModalSize, confirmationMessage: string) { + private static async executeInternalRedirect(url: string, modalSize: ModalSize, confirmationMessage: string) { if (confirmationMessage) { - if (!confirm(confirmationMessage)) { + const confirmed = await showConfirmationMessage(confirmationMessage); + if (!confirmed) { return false; } } @@ -138,7 +134,7 @@ class ActionHelper { defaultModal.showIframe(url, "", modalSize); } - static executeActionData(actionData: ActionData){ + static async executeActionData(actionData: ActionData) { const { componentName, actionMap, @@ -148,9 +144,10 @@ class ActionHelper { isSubmit, confirmationMessage } = actionData; - + if (confirmationMessage) { - if (!confirm(confirmationMessage)) { + const confirm = await showConfirmationMessage(confirmationMessage); + if (!confirm) { return false; } } @@ -158,7 +155,7 @@ class ActionHelper { const gridViewActionInput = document.querySelector("#grid-view-action-map-" + componentName); const formViewActionInput = document.querySelector("#current-action-map-" + componentName); const formViewRouteContext = document.querySelector("#form-view-route-context-" + componentName)?.value; - + if (gridViewActionInput) { gridViewActionInput.value = ""; } @@ -184,27 +181,26 @@ class ActionHelper { const modal = new Modal(); modal.modalId = componentName + "-modal"; - $("body").on('hidden.bs.modal',"#" + modal.modalId, function () { + $("body").on('hidden.bs.modal', "#" + modal.modalId, function () { onModalClose(); }); - + SpinnerOverlay.show(); const requestOptions = getRequestOptions(); modal.showUrl({ url: urlBuilder.build(), requestOptions: requestOptions }, modalTitle).then(function (data) { SpinnerOverlay.hide(); - listenAllEvents("#" + modal.modalId + " ") - + listenAllEvents("#" + modal.modalId + " ") + if (typeof data === "object") { if (data.closeModal) { - if(isSubmit){ + if (isSubmit) { onModalClose(); ActionHelper.submitWithScrollPosition(); - } - else{ + } else { modal.hide(); - GridViewHelper.refresh(componentName,gridViewRouteContext); + GridViewHelper.refresh(componentName, gridViewRouteContext); } } } @@ -214,20 +210,20 @@ class ActionHelper { const urlBuilder = new UrlBuilder(); urlBuilder.addQueryParameter("routeContext", formViewRouteContext); - postFormValues({url:urlBuilder.build(), success:(data)=>{ + postFormValues({ + url: urlBuilder.build(), success: (data) => { if (typeof data === "string") { TooltipHelper.dispose("#" + componentName) - HTMLHelper.setOuterHTML(componentName,data); + HTMLHelper.setOuterHTML(componentName, data); listenAllEvents("#" + componentName); - } - else{ - if(data.jsCallback){ + } else { + if (data.jsCallback) { eval(data.jsCallback) } } - }}); - } - else { + } + }); + } else { ActionHelper.submitWithScrollPosition(); } } @@ -245,9 +241,9 @@ class ActionHelper { modal.hide(); } - static launchUrl(url, isModal, title, confirmationMessage, modalSize = 1) { + static async launchUrl(url, isModal, title, confirmationMessage, modalSize = 1) { if (confirmationMessage) { - const result = confirm(confirmationMessage); + const result = await showConfirmationMessage(confirmationMessage); if (!result) { return false; } diff --git a/src/Web/Scripts/CodeMirrorWrapper.ts b/src/Web/Scripts/CodeMirrorWrapper.ts index 7f004715f..27ce44029 100644 --- a/src/Web/Scripts/CodeMirrorWrapper.ts +++ b/src/Web/Scripts/CodeMirrorWrapper.ts @@ -5,6 +5,7 @@ class CodeMirrorWrapperOptions{ hintList: string hintKey: string singleLine: boolean + size: number } class CodeMirrorWrapper{ @@ -45,7 +46,7 @@ class CodeMirrorWrapper{ }); } else{ - codeMirrorTextArea.setSize(null, 250); + codeMirrorTextArea.setSize(null, options.size ?? 250); } diff --git a/src/Web/Scripts/DataDictionaryUtils.ts b/src/Web/Scripts/DataDictionaryUtils.ts index 57848188f..451f346f4 100644 --- a/src/Web/Scripts/DataDictionaryUtils.ts +++ b/src/Web/Scripts/DataDictionaryUtils.ts @@ -1,16 +1,17 @@ class DataDictionaryUtils { static deleteAction(actionName: string, url: string, confirmationMessage: string): void { - let confirmed = confirm(confirmationMessage); - if (confirmed == true) { - postFormValues({ - url:url, - success:function(data){ - if (data.success) { - document.getElementById(actionName).remove(); + showConfirmationMessage(confirmationMessage).then(function(confirmed){ + if(confirmed){ + postFormValues({ + url:url, + success:function(data){ + if (data.success) { + document.getElementById(actionName).remove(); + } } - } - }); - } + }); + } + }); } static sortAction(context: string, url: string, errorMessage: string): void { @@ -81,4 +82,8 @@ SpinnerOverlay.hide() }); } + + static async showAbout(url) { + await OffcanvasHelper.populateOffcanvas("about-offcanvas",url); + } } diff --git a/src/Web/Scripts/Index.ts b/src/Web/Scripts/Index.ts index 5a4d81bf3..e96052d50 100644 --- a/src/Web/Scripts/Index.ts +++ b/src/Web/Scripts/Index.ts @@ -1,5 +1,6 @@ document.addEventListener("DOMContentLoaded", function () { const masterDataScrollPosition = localStorage.getItem("masterDataScrollPosition"); + if(masterDataScrollPosition){ window.scrollTo({ top: Number.parseFloat(masterDataScrollPosition), @@ -8,5 +9,8 @@ }); localStorage.removeItem("masterDataScrollPosition"); } + + Localization.initialize(); + listenAllEvents() }); \ No newline at end of file diff --git a/src/Web/Scripts/Localization.ts b/src/Web/Scripts/Localization.ts new file mode 100644 index 000000000..d49acbc78 --- /dev/null +++ b/src/Web/Scripts/Localization.ts @@ -0,0 +1,21 @@ +class Localization { + private static strings: { [key: string]: string } = {}; + + static initialize() { + const lang = document.documentElement.lang.toLowerCase(); + switch (lang) { + case "pt-br": + Localization.strings = { + Yes: "Sim", + No: "Não", + Close: "Fechar" + }; + break; + } + } + + static get(key: string): string { + return Localization.strings[key] || key; + } +} + diff --git a/src/Web/Scripts/MessageBox.ts b/src/Web/Scripts/MessageBox.ts index a903e551f..c913ac70c 100644 --- a/src/Web/Scripts/MessageBox.ts +++ b/src/Web/Scripts/MessageBox.ts @@ -23,7 +23,8 @@ class MessageBox { private static readonly button1Id = MessageBox.jQueryModalButton1Id.substring(1); private static setTitle(title: string): void { - $(MessageBox.jQueryModalTitleId).html(title); + if(title) + $(MessageBox.jQueryModalTitleId).html(title); } private static setContent(content: string): void { @@ -70,7 +71,7 @@ class MessageBox { MessageBox.hide() } - private static loadHtml(icontype: TMessageIcon, sizetype: TMessageSize): void { + private static loadHtml(hasTitle: boolean, iconType: TMessageIcon, iconSize: TMessageSize): void { if ($(MessageBox.jQueryModalId).length) { $(MessageBox.jQueryModalId).remove(); } @@ -78,18 +79,18 @@ class MessageBox { let html = ""; html += "
\r\n"; html += "
\r\n"; html += "
\r\n"; html += "
\r\n"; - if (bootstrapVersion >= 4) { + if (bootstrapVersion >= 4 && hasTitle) { html += "

\r\n"; } else if (bootstrapVersion >= 5) { html += ' \r\n'; - } else if (bootstrapVersion == 3) { + } else if (bootstrapVersion == 3 && hasTitle) { html += ' \r\n'; } @@ -100,25 +101,25 @@ class MessageBox { html += " \r\n"; html += ' \r\n'; - if (icontype == TMessageIcon.ERROR) { + if (iconType == TMessageIcon.ERROR) { html += ' \r\n'; html += - ' \r\n'; + ' \r\n'; html += " \r\n"; - } else if (icontype == TMessageIcon.WARNING) { + } else if (iconType == TMessageIcon.WARNING) { html += ' \r\n'; html += - ' \r\n'; + ' \r\n'; html += " \r\n"; - } else if (icontype == TMessageIcon.INFO) { + } else if (iconType == TMessageIcon.INFO) { html += ' \r\n'; html += - ' \r\n'; + ' \r\n'; html += " \r\n"; - } else if (icontype == TMessageIcon.QUESTION) { + } else if (iconType == TMessageIcon.QUESTION) { html += ' \r\n'; html += - ' \r\n'; + ' \r\n'; html += " \r\n"; } html += " \r\n"; @@ -147,48 +148,80 @@ class MessageBox { $("body").append(html); } - /** - * Exibe uma caixa de mensagem (dialog) - * - * @param {string} title Título da mensagem - * @param {string} content Mensagem - * @param {TMessageIcon} icontype [opcional] Tipo do ícone 1=NONE(padrão), 2=INFO, 3=WARNING, 4=ERROR - * @param {TMessageSize} sizetype [opcional] Tamanho 1=SMALL, 2=DEFAULT(padrão), 3=LARGE - * @param {string} btn1Label [opcional] Descrição do btn1 padrão = 'Fechar' - * @param {Function} btn1Func [opcional] Evento disparado ao clicar no btn1 - * @param {string} btn2Label [opcional] Descrição do btn2 - * @param {Function} btn2Func [opcional] Evento disparado ao clicar no btn2 - * @memberof MessageBox - */ public static show( title: string, - content: string, - icontype: TMessageIcon, - sizetype?: TMessageSize, + description: string, + iconType: TMessageIcon, + sizeType?: TMessageSize, btn1Label?: string, - btn1Func?: (() => void) | null, + btn1Callback?: (() => void) | null, btn2Label?: string, - btn2Func?: (() => void) | null + btn2Callback?: (() => void) | null ): void { MessageBox.reset(); - MessageBox.loadHtml(icontype, sizetype || TMessageSize.DEFAULT); - MessageBox.setTitle(title); - MessageBox.setContent(content); + MessageBox.loadHtml((title != null && title != ""), iconType, sizeType || TMessageSize.DEFAULT); + MessageBox.setTitle(title) + MessageBox.setContent(description); if (btn1Label === undefined) { - MessageBox.setBtn1("Fechar", null); + MessageBox.setBtn1(Localization.get("Close"), null); } else { - MessageBox.setBtn1(btn1Label, btn1Func); + MessageBox.setBtn1(btn1Label, btn1Callback); } if (btn2Label === undefined) { $(MessageBox.jQueryModalButton2Id).hide(); } else { - MessageBox.setBtn2(btn2Label, btn2Func); + MessageBox.setBtn2(btn2Label, btn2Callback); } MessageBox.showModal(); } + + public static showConfirmationDialog(options: { + description: string, + cancelLabel?: string, + cancelCallback?: (() => void) | null + confirmLabel?: string, + confirmCallback?: (() => void) | null + }): void { + const { + description, + cancelLabel, + cancelCallback, + confirmLabel, + confirmCallback + } = options; + + MessageBox.show( + null, + description, + TMessageIcon.QUESTION, + TMessageSize.DEFAULT, + confirmLabel ?? Localization.get("Yes"), + confirmCallback, + cancelLabel ?? Localization.get("No"), + cancelCallback ?? MessageBox.hide + ) + } + + public static showConfirmationMessage(message: string): Promise { + return new Promise((resolve, reject) => { + MessageBox.showConfirmationDialog({ + description: message, + cancelLabel: Localization.get('No'), + confirmLabel: Localization.get('Yes'), + confirmCallback: () => { + MessageBox.hide(); + resolve(true); + }, + cancelCallback: () => { + MessageBox.hide(); + resolve(false); + }, + }); + }); + } public static hide(): void { $(MessageBox.jQueryModalId).modal("hide"); @@ -197,4 +230,7 @@ class MessageBox { } // Maintain compatibility with the global variable -const messageBox = MessageBox; \ No newline at end of file +const messageBox = MessageBox; + +const showConfirmationDialog = MessageBox.showConfirmationDialog; +const showConfirmationMessage = MessageBox.showConfirmationMessage; \ No newline at end of file diff --git a/src/Web/Scripts/MessageToast.ts b/src/Web/Scripts/MessageToast.ts new file mode 100644 index 000000000..61af6fd68 --- /dev/null +++ b/src/Web/Scripts/MessageToast.ts @@ -0,0 +1,10 @@ +class MessageToastHelper{ + static showWhenDOMLoaded(name: string){ + document.addEventListener("DOMContentLoaded", ()=>this.show(name)) + } + static show(name: string){ + const toastElement = document.getElementById(name); + const toast = bootstrap.Toast.getOrCreateInstance(toastElement); + toast.show(); + } +} \ No newline at end of file diff --git a/src/Web/Scripts/Modal.ts b/src/Web/Scripts/Modal.ts index 053f67dae..f6c433160 100644 --- a/src/Web/Scripts/Modal.ts +++ b/src/Web/Scripts/Modal.ts @@ -92,7 +92,7 @@ class _Modal extends ModalBase {
`; - let form = this.modalElement.closest("form"); + let form = getMasterDataForm(); if(form){ form.appendChild(this.modalElement); } diff --git a/src/Web/Scripts/OffcanvasHelper.ts b/src/Web/Scripts/OffcanvasHelper.ts new file mode 100644 index 000000000..6ca42aace --- /dev/null +++ b/src/Web/Scripts/OffcanvasHelper.ts @@ -0,0 +1,16 @@ +class OffcanvasHelper{ + + static showOffcanvas(id){ + const offcanvasElement = bootstrap.Offcanvas.getOrCreateInstance(document.getElementById(id)); + offcanvasElement.show(); + } + + static async populateOffcanvas(id, url) { + const offcanvasElement = bootstrap.Offcanvas.getOrCreateInstance(document.getElementById(id)); + const response = await fetch(url); + const data = await response.text(); + const offcanvasBody = document.getElementById(`${id}-body`); + offcanvasBody.innerHTML = data; + offcanvasElement.show(); + } +} \ No newline at end of file diff --git a/src/Web/Scripts/UploadViewHelper.ts b/src/Web/Scripts/UploadViewHelper.ts index 5dc404a77..040ff1013 100644 --- a/src/Web/Scripts/UploadViewHelper.ts +++ b/src/Web/Scripts/UploadViewHelper.ts @@ -20,16 +20,16 @@ class UploadViewHelper { } static deleteFile(componentName: string, fileName: string, confirmationMessage: string, jsCallback: string) { - if(confirmationMessage){ + if (confirmationMessage) { const confirmed = confirm(confirmationMessage) - if(!confirmed){ + if (!confirmed) { return } } - + this.performFileAction(componentName, fileName, "deleteFile"); eval(jsCallback); - this.clearFileAction(componentName,fileName); + this.clearFileAction(componentName, fileName); } static downloadFile(componentName: string, fileName: string, jsCallback: string) { diff --git a/src/Web/Styles/_code-mirror.scss b/src/Web/Styles/_code-mirror.scss index 98fd68046..e81e1a488 100644 --- a/src/Web/Styles/_code-mirror.scss +++ b/src/Web/Styles/_code-mirror.scss @@ -28,3 +28,8 @@ outline: 0; box-shadow: 0 0 0 .25rem rgba(var(--#{$prefix}primary-rgb),.25); } + +.CodeMirror-gutters{ + border-right: 1px solid var(--#{$prefix}border-color) !important; + background-color: var(--#{$prefix}secondary-bg) !important; +} \ No newline at end of file diff --git a/src/Web/Styles/_data-dictionary.scss b/src/Web/Styles/_data-dictionary.scss index 65ababecf..4bfece94f 100644 --- a/src/Web/Styles/_data-dictionary.scss +++ b/src/Web/Styles/_data-dictionary.scss @@ -4,7 +4,7 @@ height: 64vh !important; } - #field-list { + .jj-list-group { height: 55vh !important; } } @@ -15,7 +15,7 @@ height: 71vh !important; } - #field-list { + .jj-list-group { height: 64vh !important; } } @@ -26,7 +26,7 @@ height: 75vh !important; } - #field-list { + .jj-list-group { height: 70vh !important; } } @@ -42,7 +42,7 @@ overflow: auto; } -#field-list { +.jj-list-group { border-width: 0px; width: 100%; overflow: auto; @@ -62,3 +62,8 @@ text-align: center; padding-top: 0.938rem; } + + +.md-logo{ + width: 120px;margin-top: -5px; +} \ No newline at end of file diff --git a/src/Web/Styles/_form.scss b/src/Web/Styles/_form.scss index b9f8409a0..62de9bbeb 100644 --- a/src/Web/Styles/_form.scss +++ b/src/Web/Styles/_form.scss @@ -1,5 +1,5 @@ .tab-content { - margin-top: 20px; + margin-top: 1.25rem; } textarea { @@ -254,4 +254,10 @@ input.form-control:read-only { .dropdown-toggle.form-dropdown:after{ content: none !important; +} + +.btn-floating-action{ + display: flex !important; + align-items: center !important; + justify-content: center !important; } \ No newline at end of file diff --git a/src/Web/Styles/_table.scss b/src/Web/Styles/_table.scss index c1501bc7b..78a452781 100644 --- a/src/Web/Styles/_table.scss +++ b/src/Web/Styles/_table.scss @@ -42,10 +42,9 @@ table.table-fixed-header { table.table-fixed-header th { position: -webkit-sticky; position: sticky; - top: 0; + top: var(--md-sticky-top-height); z-index: 2; - box-shadow: 0px 4px 0px rgba(0, 0, 0, .2); - background: #eee; + background: var(--#{$prefix}body-bg); } table.table-fixed-header th[scope=row] { diff --git a/src/Web/TagHelpers/BreadcrumbTagHelper.cs b/src/Web/TagHelpers/BreadcrumbTagHelper.cs new file mode 100644 index 000000000..e9c788060 --- /dev/null +++ b/src/Web/TagHelpers/BreadcrumbTagHelper.cs @@ -0,0 +1,25 @@ +using JJMasterData.Core.UI.Components; +using Microsoft.AspNetCore.Razor.TagHelpers; + +namespace JJMasterData.Web.TagHelpers; + +public class BreadcrumbTagHelper(HtmlComponentFactory htmlComponentFactory) : TagHelper +{ + [HtmlAttributeName("items")] + public List Items { get; set; } = null!; + + [HtmlAttributeName("css-class")] + public string? CssClass { get; set; } + + public override void Process(TagHelperContext context, TagHelperOutput output) + { + var breadcrumb = htmlComponentFactory.Breadcrumb.Create(Items); + + if(CssClass is not null) + breadcrumb.CssClass = CssClass; + output.SuppressOutput(); + output.Content.SetHtmlContent(breadcrumb.GetHtml()); + + base.Process(context, output); + } +} \ No newline at end of file diff --git a/src/Web/TagHelpers/CollapsePanelTagHelper.cs b/src/Web/TagHelpers/CollapsePanelTagHelper.cs index 41549294e..8229df5ca 100644 --- a/src/Web/TagHelpers/CollapsePanelTagHelper.cs +++ b/src/Web/TagHelpers/CollapsePanelTagHelper.cs @@ -25,6 +25,9 @@ public class CollapsePanelTagHelper(IComponentFactory collapseP [HtmlAttributeName("color")] public BootstrapColor Color { get; set; } + + [HtmlAttributeName("visible")] + public bool Visible { get; set; } = true; private IComponentFactory CollapsePanelFactory { get; } = collapsePanelFactory; @@ -33,10 +36,11 @@ public override async Task ProcessAsync(TagHelperContext context, TagHelperOutpu AssertAttributes(); var panel = CollapsePanelFactory.Create(); - panel.Name = Title!.ToLower().Replace(" ", "_"); + panel.Name = Title!.ToLowerInvariant().Replace(" ", "_"); panel.Title = Title; panel.ExpandedByDefault = ExpandedByDefault; panel.Color = Color; + panel.Visible = Visible; if (Icon != default) { diff --git a/src/Web/TagHelpers/ExpressionTagHelper.cs b/src/Web/TagHelpers/ExpressionTagHelper.cs index 561ada06a..556925d52 100644 --- a/src/Web/TagHelpers/ExpressionTagHelper.cs +++ b/src/Web/TagHelpers/ExpressionTagHelper.cs @@ -44,6 +44,9 @@ [ViewContext] [HtmlAttributeNotBound] [HtmlAttributeName("disabled")] public bool Disabled { get; set; } + [HtmlAttributeName("use-floating-label")] + public bool UseFloatingLabel { get; set; } = true; + private bool IsSyncExpression { get @@ -92,12 +95,23 @@ public override void Process(TagHelperContext context, TagHelperOutput output) var displayName = For?.ModelExplorer.Metadata.GetDisplayName() ?? Label; - fieldSet.AppendIf(displayName is not null, HtmlTag.Div, div => + var label = new Label(); + label.WithAttribute("for", name + "-ExpressionValue"); + label.AppendText(displayName!); + + if (!UseFloatingLabel) + { + label.WithCssClass("form-label"); + fieldSet.Append(label); + } + + fieldSet.Append(HtmlTag.Div, div => { - var label = new Label(); - label.WithAttribute("for", name + "-ExpressionValue"); - label.AppendText(displayName!); + + div.WithCssClass("mb-3"); + var isAdvanced = options.Value.UseAdvancedModeAtExpressions; + if (!isAdvanced) { div.WithCssClass("input-group"); @@ -106,16 +120,27 @@ public override void Process(TagHelperContext context, TagHelperOutput output) .WithAttribute("id", name + "-ExpressionValue")); } - div.AppendDiv(div => - { - div.WithCssClass("form-floating"); - div.WithAttributeIf(!isAdvanced, "style", "width:80%"); - div.Append(GetEditorHtml(name, selectedExpressionType, selectedExpressionValue)); - div.Append(label); - }).WithAttribute("placeholder", displayName!) - .WithCssClass("mb-3") - .WithCssClassIf(isInvalid, "form-control is-invalid") - .WithAttribute("id", name + "-ExpressionValue"); + + var editor = GetEditorHtml(name, selectedExpressionType, selectedExpressionValue); + + editor.WithAttributeIf(UseFloatingLabel,"placeholder", displayName!); + editor.WithCssClassIf(isInvalid, "form-control is-invalid"); + editor.WithAttribute("id", name + "-ExpressionValue"); + editor.WithAttributeIf(!isAdvanced && !UseFloatingLabel, "style", "width:80%"); + + if (UseFloatingLabel) + { + var formFloating = new Div(); + formFloating.WithCssClass("form-floating"); + formFloating.Append(editor); + formFloating.Append(label); + formFloating.WithAttributeIf(!isAdvanced, "style", "width:75%"); + div.Append(formFloating); + } + else + { + div.Append(editor); + } }); output.TagMode = TagMode.StartTagAndEndTag; diff --git a/src/Web/TagHelpers/IconPickerTagHelper.cs b/src/Web/TagHelpers/IconPickerTagHelper.cs index 77835fa05..be25a5934 100644 --- a/src/Web/TagHelpers/IconPickerTagHelper.cs +++ b/src/Web/TagHelpers/IconPickerTagHelper.cs @@ -1,14 +1,14 @@ -using JJMasterData.Commons.Localization; -using JJMasterData.Core.DataDictionary; -using JJMasterData.Core.Http.Abstractions; +using JJMasterData.Core.DataDictionary; using JJMasterData.Core.UI.Components; +using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Razor.TagHelpers; -using Microsoft.Extensions.Localization; namespace JJMasterData.Web.TagHelpers; -public class IconPickerTagHelper(IControlFactory iconPickerFactory, IMasterDataUrlHelper urlHelper, IStringLocalizer stringLocalizer) : TagHelper +public class IconPickerTagHelper( + IHtmlHelper htmlHelper, + IControlFactory iconPickerFactory) : TagHelper { [HtmlAttributeName("for")] @@ -25,16 +25,18 @@ public class IconPickerTagHelper(IControlFactory iconPickerFactory [HtmlAttributeName("enabled")] public bool Enabled { get; set; } = true; - - private IMasterDataUrlHelper UrlHelper { get; } = urlHelper; - private IControlFactory IconPickerFactory { get; } = iconPickerFactory; - private IStringLocalizer StringLocalizer { get; } = stringLocalizer; + + [ViewContext] + [HtmlAttributeNotBound] + public ViewContext ViewContext { get; set; } = null!; public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { - var name = For?.Name ?? Name ?? throw new ArgumentException("For or Name properties are required."); + Contextualize(ViewContext); + + var name = htmlHelper.Name(For?.Name) ?? Name ?? throw new ArgumentException("For or Name properties are required."); - var id = Id ?? name; + var id = htmlHelper.Id(For?.Name) ?? name; IconType? modelValue = null; @@ -46,7 +48,7 @@ public override async Task ProcessAsync(TagHelperContext context, TagHelperOutpu { modelValue = Value; } - var iconPicker = IconPickerFactory.Create(); + var iconPicker = iconPickerFactory.Create(); iconPicker.Id = id; iconPicker.Name = name; iconPicker.Enabled = Enabled; @@ -58,4 +60,11 @@ public override async Task ProcessAsync(TagHelperContext context, TagHelperOutpu output.Content.SetHtmlContent((await iconPicker.GetHtmlBuilderAsync()).ToString()); } + + public void Contextualize(ViewContext viewContext) + { + if (htmlHelper is IViewContextAware aware) { + aware.Contextualize(viewContext); + } + } } \ No newline at end of file diff --git a/src/Web/TagHelpers/MessageToastTagHelper.cs b/src/Web/TagHelpers/MessageToastTagHelper.cs new file mode 100644 index 000000000..3b73297c1 --- /dev/null +++ b/src/Web/TagHelpers/MessageToastTagHelper.cs @@ -0,0 +1,57 @@ +using JJMasterData.Core.DataDictionary; +using JJMasterData.Core.DataDictionary.Models; +using JJMasterData.Core.UI.Components; +using Microsoft.AspNetCore.Razor.TagHelpers; + +namespace JJMasterData.Web.TagHelpers; + +public class MessageToastTagHelper(HtmlComponentFactory htmlComponentFactory) : TagHelper +{ + [HtmlAttributeName("name")] + public required string Name { get; set; } + + [HtmlAttributeName("title")] + public required string Title { get; set; } + + [HtmlAttributeName("title-muted")] + public string? TitleMuted { get; set; } + + [HtmlAttributeName("title-color")] + public BootstrapColor Color { get; set; } + + [HtmlAttributeName("icon")] + public IconType? Icon { get; set; } + + [HtmlAttributeName("message")] + public string? Message { get; set; } + + [HtmlAttributeName("show-as-opened")] + public bool ShowAsOpened { get; set; } + + public override void Process(TagHelperContext context, TagHelperOutput output) + { + var toast = htmlComponentFactory.MessageToast.Create(Message, Color); + + toast.Name = Name; + + if (!string.IsNullOrEmpty(Title)) + { + toast.Title = Title; + } + + if (!string.IsNullOrEmpty(TitleMuted)) + { + toast.TitleMuted = TitleMuted; + } + + if (Icon is not null) + { + toast.Icon = new JJIcon(Icon.Value); + } + + toast.ShowAsOpened = ShowAsOpened; + + output.TagMode = TagMode.StartTagAndEndTag; + output.Content.SetHtmlContent(toast.GetHtml()); + } +} \ No newline at end of file diff --git a/src/Web/TagHelpers/OffcanvasTagHelper.cs b/src/Web/TagHelpers/OffcanvasTagHelper.cs new file mode 100644 index 000000000..1d91d391d --- /dev/null +++ b/src/Web/TagHelpers/OffcanvasTagHelper.cs @@ -0,0 +1,32 @@ +using JJMasterData.Core.DataDictionary.Models; +using JJMasterData.Core.UI.Components; +using JJMasterData.Core.UI.Html; +using Microsoft.AspNetCore.Razor.TagHelpers; + +namespace JJMasterData.Web.TagHelpers; + +public class OffcanvasTagHelper(HtmlComponentFactory htmlComponentFactory) : TagHelper +{ + [HtmlAttributeName("name")] + public required string Name { get; set; } + + public OffcanvasPosition Position { get; set; } + + public string? Title { get; set; } + + public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) + { + var offcanvas = htmlComponentFactory.Offcanvas.Create(); + + offcanvas.Name = Name; + offcanvas.Title = Title; + offcanvas.Position = Position; + + var content = (await output.GetChildContentAsync()).GetContent(); + + offcanvas.Body = new HtmlBuilder(content); + + output.TagMode = TagMode.StartTagAndEndTag; + output.Content.SetHtmlContent(offcanvas.GetHtml()); + } +} \ No newline at end of file diff --git a/src/Web/TagHelpers/TitleTagHelper.cs b/src/Web/TagHelpers/TitleTagHelper.cs index 845e8fee9..6da656181 100644 --- a/src/Web/TagHelpers/TitleTagHelper.cs +++ b/src/Web/TagHelpers/TitleTagHelper.cs @@ -20,18 +20,21 @@ public class TitleTagHelper(HtmlComponentFactory htmlComponentFactory) : TagHelp [HtmlAttributeName("icon")] public IconType? Icon { get; set; } - public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output) + [HtmlAttributeName("actions")] + public List? Actions {get; set; } + + public override void Process(TagHelperContext context, TagHelperOutput output) { var title = htmlComponentFactory.Title.Create(Title ?? string.Empty, SubTitle ?? string.Empty, Icon); + title.Actions = Actions; + if (Size is not null) { title.Size = Size.Value; } - output.TagMode = TagMode.StartTagAndEndTag; + output.SuppressOutput(); output.Content.SetHtmlContent(title.GetHtml()); - - return Task.CompletedTask; } } diff --git a/src/Web/TagHelpers/ValidationSummaryTagHelper.cs b/src/Web/TagHelpers/ValidationSummaryTagHelper.cs index 5b37130c7..6faffe638 100644 --- a/src/Web/TagHelpers/ValidationSummaryTagHelper.cs +++ b/src/Web/TagHelpers/ValidationSummaryTagHelper.cs @@ -1,4 +1,6 @@ using JJMasterData.Core.UI.Components; +using Microsoft.AspNetCore.Mvc.Rendering; +using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Razor.TagHelpers; namespace JJMasterData.Web.TagHelpers; @@ -8,14 +10,37 @@ public class ValidationSummaryTagHelper(ValidationSummaryFactory validationSumma [HtmlAttributeName("errors")] public IEnumerable? Errors { get; set; } + [ViewContext] + [HtmlAttributeNotBound] + public ViewContext ViewContext { get; set; } = null!; + public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { var validationSummary = validationSummaryFactory.Create(); + var isValid = true; + if (Errors != null) + { validationSummary.Errors.AddRange(Errors); - - output.TagMode = TagMode.StartTagAndEndTag; - output.Content.SetHtmlContent(validationSummary.GetHtml()); + isValid = false; + } + else if(!ViewContext.ModelState.IsValid) + { + var errors = ViewContext.ModelState.Values + .SelectMany(v => v.Errors) + .Select(e => e.ErrorMessage); + validationSummary.Errors.AddRange(errors); + isValid = false; + } + + if (isValid) + output.SuppressOutput(); + else + { + output.TagMode = TagMode.StartTagAndEndTag; + output.Content.SetHtmlContent(validationSummary.GetHtml()); + } + return Task.CompletedTask; } } \ No newline at end of file diff --git a/src/Web/Views/Shared/_MasterDataLayout.cshtml b/src/Web/Views/Shared/_MasterDataLayout.cshtml index b5b8f4cac..a0df3742d 100644 --- a/src/Web/Views/Shared/_MasterDataLayout.cshtml +++ b/src/Web/Views/Shared/_MasterDataLayout.cshtml @@ -12,7 +12,7 @@ -
+
@RenderBody()
diff --git a/src/Web/Views/Shared/_MasterDataScripts.cshtml b/src/Web/Views/Shared/_MasterDataScripts.cshtml index aecdcbf3d..0e4456652 100644 --- a/src/Web/Views/Shared/_MasterDataScripts.cshtml +++ b/src/Web/Views/Shared/_MasterDataScripts.cshtml @@ -55,6 +55,9 @@ { + + + } diff --git a/src/Web/wwwroot/js/codemirror/mode/css.js b/src/Web/wwwroot/js/codemirror/mode/css.js new file mode 100644 index 000000000..f351f0db0 --- /dev/null +++ b/src/Web/wwwroot/js/codemirror/mode/css.js @@ -0,0 +1 @@ +!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(T){"use strict";function e(e){for(var t={},r=0;r*\/]/.test(r)?(a="select-op",null):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?a="qualifier":/[:;{}\[\]\(\)]/.test(r)?v(null,r):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=z),a="variable","variable callee"):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),a="word","property"):a=null})(e,t);return r&&"object"==typeof r&&(a=r[1],r=r[0]),i=r,"comment"!=a&&(t.state=_[t.state](a,e,t)),i},indent:function(e,t){var e=e.context,t=t&&t.charAt(0),r=e.indent;return(e="prop"!=e.type||"}"!=t&&")"!=t?e:e.prev).prev&&("}"!=t||"block"!=e.type&&"top"!=e.type&&"interpolation"!=e.type&&"restricted_atBlock"!=e.type?(")"!=t||"parens"!=e.type&&"atBlock_parens"!=e.type)&&("{"!=t||"at"!=e.type&&"atBlock"!=e.type)||(r=Math.max(0,e.indent-n)):r=(e=e.prev).indent),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:k,fold:"brace"}});var t=["domain","regexp","url","url-prefix"],r=e(t),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=e(o),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],n=e(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],s=e(l),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=e(c),p=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],u=e(p),m=e(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],h=e(b),f=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],k=e(f),t=t.concat(o).concat(a).concat(l).concat(c).concat(p).concat(b).concat(f);function y(e,t){for(var r,o=!1;null!=(r=e.next());){if(o&&"/"==r){t.tokenize=null;break}o="*"==r}return["comment","comment"]}T.registerHelper("hintWords","css",t),T.defineMIME("text/css",{documentTypes:r,mediaTypes:i,mediaFeatures:n,mediaValueKeywords:s,propertyKeywords:d,nonStandardPropertyKeywords:u,fontProperties:m,counterDescriptors:g,colorKeywords:h,valueKeywords:k,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=y)(e,t)}},name:"css"}),T.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:n,mediaValueKeywords:s,propertyKeywords:d,nonStandardPropertyKeywords:u,colorKeywords:h,valueKeywords:k,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=y)(e,t):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),T.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:n,mediaValueKeywords:s,propertyKeywords:d,nonStandardPropertyKeywords:u,colorKeywords:h,valueKeywords:k,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=y)(e,t):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),T.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:i,mediaFeatures:n,propertyKeywords:d,nonStandardPropertyKeywords:u,fontProperties:m,counterDescriptors:g,colorKeywords:h,valueKeywords:k,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=y)(e,t)}},name:"css",helperType:"gss"})}); \ No newline at end of file diff --git a/src/Web/wwwroot/js/codemirror/mode/html.js b/src/Web/wwwroot/js/codemirror/mode/html.js new file mode 100644 index 000000000..b4922120c --- /dev/null +++ b/src/Web/wwwroot/js/codemirror/mode/html.js @@ -0,0 +1 @@ +!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],t):t(CodeMirror)}(function(m){"use strict";var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};var a={};function d(t,e){e=t.match(a[t=e]||(a[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")));return e?/^\s*(.*?)\s*$/.exec(e[2])[1]:""}function g(t,e){return new RegExp((e?"^":"")+"","i")}function o(t,e){for(var a in t)for(var n=e[a]||(e[a]=[]),l=t[a],o=l.length-1;0<=o;o--)n.unshift(l[o])}m.defineMode("htmlmixed",function(i,t){var c=m.getMode(i,{name:"xml",htmlMode:!0,multilineTagIndentFactor:t.multilineTagIndentFactor,multilineTagIndentPastTag:t.multilineTagIndentPastTag,allowMissingTagName:t.allowMissingTagName}),s={},e=t&&t.tags,a=t&&t.scriptTypes;if(o(l,s),e&&o(e,s),a)for(var n=a.length-1;0<=n;n--)s.script.unshift(["type",a[n].matches,a[n].mode]);function u(t,e){var a,o,r,n=c.token(t,e.htmlState),l=/\btag\b/.test(n);return l&&!/[<>\s\/]/.test(t.current())&&(a=e.htmlState.tagName&&e.htmlState.tagName.toLowerCase())&&s.hasOwnProperty(a)?e.inTag=a+" ":e.inTag&&l&&/>$/.test(t.current())?(a=/^([\S]+) (.*)/.exec(e.inTag),e.inTag=null,l=">"==t.current()&&function(t,e){for(var a=0;a")):null:e.match("--")?t(o("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),t(function r(o){return function(t,e){for(var n;null!=(n=t.next());){if("<"==n)return e.tokenize=r(o+1),e.tokenize(t,e);if(">"==n){if(1!=o)return e.tokenize=r(o-1),e.tokenize(t,e);e.tokenize=c;break}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),n.tokenize=o("meta","?>"),"meta"):(i=e.eat("/")?"closeTag":"openTag",n.tokenize=d,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(t,e){var n,r,o=t.next();return">"==o||"/"==o&&t.eat(">")?(e.tokenize=c,i=">"==o?"endTag":"selfcloseTag","tag bracket"):"="==o?(i="equals",null):"<"==o?(e.tokenize=c,e.state=p,e.tagName=e.tagStart=null,(n=e.tokenize(t,e))?n+" tag error":"tag error"):/[\'\"]/.test(o)?(e.tokenize=(r=o,a.isInAttribute=!0,a),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");function a(t,e){for(;!t.eol();)if(t.next()==r){e.tokenize=d;break}return"string"}}function o(n,r){return function(t,e){for(;!t.eol();){if(t.match(r)){e.tokenize=c;break}t.next()}return n}}function s(t){return t&&t.toLowerCase()}function f(t,e,n){this.prev=t.context,this.tagName=e||"",this.indent=t.indented,this.startOfLine=n,(u.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function m(t){t.context&&(t.context=t.context.prev)}function g(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!u.contextGrabbers.hasOwnProperty(s(n))||!u.contextGrabbers[s(n)].hasOwnProperty(s(e)))return;m(t)}}function p(t,e,n){return"openTag"==t?(n.tagStart=e.column(),h):"closeTag"==t?x:p}function h(t,e,n){return"word"==t?(n.tagName=e.current(),a="tag",w):u.allowMissingTagName&&"endTag"==t?(a="tag bracket",w(t,0,n)):(a="error",h)}function x(t,e,n){var r;return"word"==t?(r=e.current(),n.context&&n.context.tagName!=r&&u.implicitlyClosed.hasOwnProperty(s(n.context.tagName))&&m(n),n.context&&n.context.tagName==r||!1===u.matchClosing?(a="tag",b):(a="tag error",k)):u.allowMissingTagName&&"endTag"==t?(a="tag bracket",b(t,0,n)):(a="error",k)}function b(t,e,n){return"endTag"!=t?(a="error",b):(m(n),p)}function k(t,e,n){return a="error",b(t,0,n)}function w(t,e,n){return"word"==t?(a="attribute",T):"endTag"==t||"selfcloseTag"==t?(r=n.tagName,o=n.tagStart,n.tagName=n.tagStart=null,"selfcloseTag"==t||u.autoSelfClosers.hasOwnProperty(s(r))?g(n,r):(g(n,r),n.context=new f(n,r,o==n.indented)),p):(a="error",w);var r,o}function T(t,e,n){return"equals"==t?v:(u.allowMissing||(a="error"),w(t,0,n))}function v(t,e,n){return"string"==t?N:"word"==t&&u.allowUnquoted?(a="string",w):(a="error",w(t,0,n))}function N(t,e,n){return"string"==t?N:w(t,0,n)}return c.isInText=!0,{startState:function(t){var e={tokenize:c,state:p,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;i=null;var n=e.tokenize(t,e);return(n||i)&&"comment"!=n&&(a=null,e.state=e.state(i||n,t,e),a&&(n="error"==a?n+" error":a)),n},indent:function(t,e,n){var r=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(r&&r.noIndent)return y.Pass;if(t.tokenize!=d&&t.tokenize!=c)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==u.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(u.multilineTagIndentFactor||1);if(u.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:u.htmlMode?"html":"xml",helperType:u.htmlMode?"html":"xml",skipAttribute:function(t){t.state==v&&(t.state=w)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)e.push(n.tagName);return e.reverse()}}}),y.defineMIME("text/xml","xml"),y.defineMIME("application/xml","xml"),y.mimeModes.hasOwnProperty("text/html")||y.defineMIME("text/html",{name:"xml",htmlMode:!0})}); \ No newline at end of file diff --git a/src/Web/wwwroot/js/jjmasterdata/jjmasterdata.js b/src/Web/wwwroot/js/jjmasterdata/jjmasterdata.js index 3caf16c17..f384e2bc6 100644 --- a/src/Web/wwwroot/js/jjmasterdata/jjmasterdata.js +++ b/src/Web/wwwroot/js/jjmasterdata/jjmasterdata.js @@ -16,89 +16,97 @@ class ActionHelper { getMasterDataForm().submit(); } static executeSqlCommand(componentName, encryptedActionMap, encryptedRouteContext, isSubmit, confirmMessage) { - if (confirmMessage) { - const result = confirm(confirmMessage); - if (!result) { - return false; + return __awaiter(this, void 0, void 0, function* () { + if (confirmMessage) { + const result = yield showConfirmationMessage(confirmMessage); + if (!result) { + return false; + } } - } - const gridViewActionInput = document.querySelector("#grid-view-action-map-" + componentName); - const formViewActionInput = document.querySelector("#current-action-map-" + componentName); - if (gridViewActionInput) { - gridViewActionInput.value = encryptedActionMap; - } - else if (formViewActionInput) { - formViewActionInput.value = encryptedActionMap; - } - if (isSubmit) { - ActionHelper.submitWithScrollPosition(); - } - else { - const urlBuilder = new UrlBuilder(); - urlBuilder.addQueryParameter("routeContext", encryptedRouteContext); - postFormValues({ url: urlBuilder.build(), success: data => { - TooltipHelper.dispose("#" + componentName); - HTMLHelper.setOuterHTML(componentName, data); - listenAllEvents("#" + componentName); - } }); - } + const gridViewActionInput = document.querySelector("#grid-view-action-map-" + componentName); + const formViewActionInput = document.querySelector("#current-action-map-" + componentName); + if (gridViewActionInput) { + gridViewActionInput.value = encryptedActionMap; + } + else if (formViewActionInput) { + formViewActionInput.value = encryptedActionMap; + } + if (isSubmit) { + ActionHelper.submitWithScrollPosition(); + } + else { + const urlBuilder = new UrlBuilder(); + urlBuilder.addQueryParameter("routeContext", encryptedRouteContext); + postFormValues({ + url: urlBuilder.build(), success: data => { + TooltipHelper.dispose("#" + componentName); + HTMLHelper.setOuterHTML(componentName, data); + listenAllEvents("#" + componentName); + } + }); + } + }); } static executeRedirectAction(componentName, routeContext, encryptedActionMap, confirmationMessage) { - if (confirmationMessage) { - const result = confirm(confirmationMessage); - if (!result) { - return false; + return __awaiter(this, void 0, void 0, function* () { + if (confirmationMessage) { + const result = yield showConfirmationMessage(confirmationMessage); + if (!result) { + return false; + } } - } - const gridViewActionInput = document.querySelector("#grid-view-action-map-" + componentName); - const formViewActionInput = document.querySelector("#current-action-map-" + componentName); - if (formViewActionInput) { - formViewActionInput.value = encryptedActionMap; - } - else { - const newFormInput = document.createElement("input"); - newFormInput.id = "current-action-map-" + componentName; - newFormInput.name = "current-action-map-" + componentName; - newFormInput.type = "hidden"; - newFormInput.value = encryptedActionMap; - document.querySelector('form').appendChild(newFormInput); - } - if (gridViewActionInput) { - gridViewActionInput.value = encryptedActionMap; - } - else { - const newGridInput = document.createElement("input"); - newGridInput.id = "grid-view-action-map-" + componentName; - newGridInput.name = "grid-view-action-map-" + componentName; - newGridInput.type = "hidden"; - newGridInput.value = encryptedActionMap; - document.querySelector('form').appendChild(newGridInput); - } - const urlBuilder = new UrlBuilder(); - urlBuilder.addQueryParameter("routeContext", routeContext); - urlBuilder.addQueryParameter("componentName", componentName); - const url = urlBuilder.build(); - this.executeUrlRedirect(url); - return true; + const gridViewActionInput = document.querySelector("#grid-view-action-map-" + componentName); + const formViewActionInput = document.querySelector("#current-action-map-" + componentName); + if (formViewActionInput) { + formViewActionInput.value = encryptedActionMap; + } + else { + const newFormInput = document.createElement("input"); + newFormInput.id = "current-action-map-" + componentName; + newFormInput.name = "current-action-map-" + componentName; + newFormInput.type = "hidden"; + newFormInput.value = encryptedActionMap; + document.querySelector('form').appendChild(newFormInput); + } + if (gridViewActionInput) { + gridViewActionInput.value = encryptedActionMap; + } + else { + const newGridInput = document.createElement("input"); + newGridInput.id = "grid-view-action-map-" + componentName; + newGridInput.name = "grid-view-action-map-" + componentName; + newGridInput.type = "hidden"; + newGridInput.value = encryptedActionMap; + document.querySelector('form').appendChild(newGridInput); + } + const urlBuilder = new UrlBuilder(); + urlBuilder.addQueryParameter("routeContext", routeContext); + urlBuilder.addQueryParameter("componentName", componentName); + const url = urlBuilder.build(); + this.executeUrlRedirect(url); + return true; + }); } static executeClientSideRedirect(url, isModal, modalTitle, modalSize, isIframe, confirmationMessage) { - if (confirmationMessage) { - const result = confirm(confirmationMessage); - if (!result) { - return false; + return __awaiter(this, void 0, void 0, function* () { + if (confirmationMessage) { + const result = yield showConfirmationMessage(confirmationMessage); + if (!result) { + return false; + } } - } - if (isModal) { - if (isIframe) { - defaultModal.showIframe(url, modalTitle, modalSize); + if (isModal) { + if (isIframe) { + defaultModal.showIframe(url, modalTitle, modalSize); + } + else { + defaultModal.showUrl(url, modalTitle, modalSize); + } } else { - defaultModal.showUrl(url, modalTitle, modalSize); + window.location.href = url; } - } - else { - window.location.href = url; - } + }); } static executeUrlRedirect(url) { postFormValues({ @@ -119,88 +127,96 @@ class ActionHelper { }); } static executeInternalRedirect(url, modalSize, confirmationMessage) { - if (confirmationMessage) { - if (!confirm(confirmationMessage)) { - return false; + return __awaiter(this, void 0, void 0, function* () { + if (confirmationMessage) { + const confirmed = yield showConfirmationMessage(confirmationMessage); + if (!confirmed) { + return false; + } } - } - defaultModal.showIframe(url, "", modalSize); + defaultModal.showIframe(url, "", modalSize); + }); } static executeActionData(actionData) { - var _a; - const { componentName, actionMap, gridViewRouteContext, modalTitle, isModal, isSubmit, confirmationMessage } = actionData; - if (confirmationMessage) { - if (!confirm(confirmationMessage)) { - return false; - } - } - const gridViewActionInput = document.querySelector("#grid-view-action-map-" + componentName); - const formViewActionInput = document.querySelector("#current-action-map-" + componentName); - const formViewRouteContext = (_a = document.querySelector("#form-view-route-context-" + componentName)) === null || _a === void 0 ? void 0 : _a.value; - if (gridViewActionInput) { - gridViewActionInput.value = ""; - } - if (formViewActionInput) { - formViewActionInput.value = actionMap; - } - let form = getMasterDataForm(); - if (!form) { - return; - } - function onModalClose() { - formViewActionInput.value = String(); - setPageState(componentName, PageState.List); - } - if (isModal) { - const urlBuilder = new UrlBuilder(); - urlBuilder.addQueryParameter("routeContext", formViewRouteContext); - const modal = new Modal(); - modal.modalId = componentName + "-modal"; - $("body").on('hidden.bs.modal', "#" + modal.modalId, function () { - onModalClose(); - }); - SpinnerOverlay.show(); - const requestOptions = getRequestOptions(); - modal.showUrl({ - url: urlBuilder.build(), requestOptions: requestOptions - }, modalTitle).then(function (data) { - SpinnerOverlay.hide(); - listenAllEvents("#" + modal.modalId + " "); - if (typeof data === "object") { - if (data.closeModal) { - if (isSubmit) { - onModalClose(); - ActionHelper.submitWithScrollPosition(); - } - else { - modal.hide(); - GridViewHelper.refresh(componentName, gridViewRouteContext); - } - } + return __awaiter(this, void 0, void 0, function* () { + var _a; + const { componentName, actionMap, gridViewRouteContext, modalTitle, isModal, isSubmit, confirmationMessage } = actionData; + if (confirmationMessage) { + const confirm = yield showConfirmationMessage(confirmationMessage); + if (!confirm) { + return false; } - }); - } - else { - if (!isSubmit) { + } + const gridViewActionInput = document.querySelector("#grid-view-action-map-" + componentName); + const formViewActionInput = document.querySelector("#current-action-map-" + componentName); + const formViewRouteContext = (_a = document.querySelector("#form-view-route-context-" + componentName)) === null || _a === void 0 ? void 0 : _a.value; + if (gridViewActionInput) { + gridViewActionInput.value = ""; + } + if (formViewActionInput) { + formViewActionInput.value = actionMap; + } + let form = getMasterDataForm(); + if (!form) { + return; + } + function onModalClose() { + formViewActionInput.value = String(); + setPageState(componentName, PageState.List); + } + if (isModal) { const urlBuilder = new UrlBuilder(); urlBuilder.addQueryParameter("routeContext", formViewRouteContext); - postFormValues({ url: urlBuilder.build(), success: (data) => { - if (typeof data === "string") { - TooltipHelper.dispose("#" + componentName); - HTMLHelper.setOuterHTML(componentName, data); - listenAllEvents("#" + componentName); - } - else { - if (data.jsCallback) { - eval(data.jsCallback); + const modal = new Modal(); + modal.modalId = componentName + "-modal"; + $("body").on('hidden.bs.modal', "#" + modal.modalId, function () { + onModalClose(); + }); + SpinnerOverlay.show(); + const requestOptions = getRequestOptions(); + modal.showUrl({ + url: urlBuilder.build(), requestOptions: requestOptions + }, modalTitle).then(function (data) { + SpinnerOverlay.hide(); + listenAllEvents("#" + modal.modalId + " "); + if (typeof data === "object") { + if (data.closeModal) { + if (isSubmit) { + onModalClose(); + ActionHelper.submitWithScrollPosition(); + } + else { + modal.hide(); + GridViewHelper.refresh(componentName, gridViewRouteContext); } } - } }); + } + }); } else { - ActionHelper.submitWithScrollPosition(); + if (!isSubmit) { + const urlBuilder = new UrlBuilder(); + urlBuilder.addQueryParameter("routeContext", formViewRouteContext); + postFormValues({ + url: urlBuilder.build(), success: (data) => { + if (typeof data === "string") { + TooltipHelper.dispose("#" + componentName); + HTMLHelper.setOuterHTML(componentName, data); + listenAllEvents("#" + componentName); + } + else { + if (data.jsCallback) { + eval(data.jsCallback); + } + } + } + }); + } + else { + ActionHelper.submitWithScrollPosition(); + } } - } + }); } static executeAction(actionDataJson) { const actionData = JSON.parse(actionDataJson); @@ -211,19 +227,21 @@ class ActionHelper { modal.modalId = componentName + "-modal"; modal.hide(); } - static launchUrl(url, isModal, title, confirmationMessage, modalSize = 1) { - if (confirmationMessage) { - const result = confirm(confirmationMessage); - if (!result) { - return false; + static launchUrl(url_1, isModal_1, title_1, confirmationMessage_1) { + return __awaiter(this, arguments, void 0, function* (url, isModal, title, confirmationMessage, modalSize = 1) { + if (confirmationMessage) { + const result = yield showConfirmationMessage(confirmationMessage); + if (!result) { + return false; + } } - } - if (isModal) { - popup.show(title, url, modalSize); - } - else { - window.location.href = url; - } + if (isModal) { + popup.show(title, url, modalSize); + } + else { + window.location.href = url; + } + }); } } class AuditLogViewHelper { @@ -330,6 +348,7 @@ class CodeMirrorWrapper { return textArea.codeMirrorInstance != null; } static setupCodeMirror(elementId, options) { + var _a; const textArea = document.getElementById(elementId); if (!textArea) return; @@ -357,7 +376,7 @@ class CodeMirrorWrapper { }); } else { - codeMirrorTextArea.setSize(null, 250); + codeMirrorTextArea.setSize(null, (_a = options.size) !== null && _a !== void 0 ? _a : 250); } CodeMirror.registerHelper('hint', 'hintList', function (_) { const cur = codeMirrorTextArea.getCursor(); @@ -403,17 +422,18 @@ class CollapsePanelListener { } class DataDictionaryUtils { static deleteAction(actionName, url, confirmationMessage) { - let confirmed = confirm(confirmationMessage); - if (confirmed == true) { - postFormValues({ - url: url, - success: function (data) { - if (data.success) { - document.getElementById(actionName).remove(); + showConfirmationMessage(confirmationMessage).then(function (confirmed) { + if (confirmed) { + postFormValues({ + url: url, + success: function (data) { + if (data.success) { + document.getElementById(actionName).remove(); + } } - } - }); - } + }); + } + }); } static sortAction(context, url, errorMessage) { $("#sortable-" + context).sortable({ @@ -476,6 +496,11 @@ class DataDictionaryUtils { SpinnerOverlay.hide(); })); } + static showAbout(url) { + return __awaiter(this, void 0, void 0, function* () { + yield OffcanvasHelper.populateOffcanvas("about-offcanvas", url); + }); + } } class DataExportationHelper { static startProgressVerification(componentName, routeContext) { @@ -1452,6 +1477,7 @@ document.addEventListener("DOMContentLoaded", function () { }); localStorage.removeItem("masterDataScrollPosition"); } + Localization.initialize(); listenAllEvents(); }); const listenAllEvents = (selectorPrefix = String()) => { @@ -1508,6 +1534,24 @@ const listenAllEvents = (selectorPrefix = String()) => { } }); }; +class Localization { + static initialize() { + const lang = document.documentElement.lang.toLowerCase(); + switch (lang) { + case "pt-br": + Localization.strings = { + Yes: "Sim", + No: "Não", + Close: "Fechar" + }; + break; + } + } + static get(key) { + return Localization.strings[key] || key; + } +} +Localization.strings = {}; class LookupHelper { static setLookupValues(fieldName, id, description) { const idInput = window.parent.document.querySelector("#" + fieldName); @@ -1581,7 +1625,8 @@ var TMessageSize; })(TMessageSize || (TMessageSize = {})); class MessageBox { static setTitle(title) { - $(MessageBox.jQueryModalTitleId).html(title); + if (title) + $(MessageBox.jQueryModalTitleId).html(title); } static setContent(content) { $(MessageBox.jQueryModalContentId).html(content); @@ -1619,28 +1664,28 @@ class MessageBox { static reset() { MessageBox.hide(); } - static loadHtml(icontype, sizetype) { + static loadHtml(hasTitle, iconType, iconSize) { if ($(MessageBox.jQueryModalId).length) { $(MessageBox.jQueryModalId).remove(); } let html = ""; html += "
\r\n"; html += "
\r\n"; html += "
\r\n"; html += "
\r\n"; - if (bootstrapVersion >= 4) { + if (bootstrapVersion >= 4 && hasTitle) { html += "

\r\n"; } else if (bootstrapVersion >= 5) { html += ' \r\n'; } - else if (bootstrapVersion == 3) { + else if (bootstrapVersion == 3 && hasTitle) { html += ' \r\n'; } @@ -1649,28 +1694,28 @@ class MessageBox { html += " \r\n"; html += " \r\n"; html += ' \r\n"; @@ -1699,25 +1744,46 @@ class MessageBox { html += "\r\n"; $("body").append(html); } - static show(title, content, icontype, sizetype, btn1Label, btn1Func, btn2Label, btn2Func) { + static show(title, description, iconType, sizeType, btn1Label, btn1Callback, btn2Label, btn2Callback) { MessageBox.reset(); - MessageBox.loadHtml(icontype, sizetype || TMessageSize.DEFAULT); + MessageBox.loadHtml((title != null && title != ""), iconType, sizeType || TMessageSize.DEFAULT); MessageBox.setTitle(title); - MessageBox.setContent(content); + MessageBox.setContent(description); if (btn1Label === undefined) { - MessageBox.setBtn1("Fechar", null); + MessageBox.setBtn1(Localization.get("Close"), null); } else { - MessageBox.setBtn1(btn1Label, btn1Func); + MessageBox.setBtn1(btn1Label, btn1Callback); } if (btn2Label === undefined) { $(MessageBox.jQueryModalButton2Id).hide(); } else { - MessageBox.setBtn2(btn2Label, btn2Func); + MessageBox.setBtn2(btn2Label, btn2Callback); } MessageBox.showModal(); } + static showConfirmationDialog(options) { + const { description, cancelLabel, cancelCallback, confirmLabel, confirmCallback } = options; + MessageBox.show(null, description, TMessageIcon.QUESTION, TMessageSize.DEFAULT, confirmLabel !== null && confirmLabel !== void 0 ? confirmLabel : Localization.get("Yes"), confirmCallback, cancelLabel !== null && cancelLabel !== void 0 ? cancelLabel : Localization.get("No"), cancelCallback !== null && cancelCallback !== void 0 ? cancelCallback : MessageBox.hide); + } + static showConfirmationMessage(message) { + return new Promise((resolve, reject) => { + MessageBox.showConfirmationDialog({ + description: message, + cancelLabel: Localization.get('No'), + confirmLabel: Localization.get('Yes'), + confirmCallback: () => { + MessageBox.hide(); + resolve(true); + }, + cancelCallback: () => { + MessageBox.hide(); + resolve(false); + }, + }); + }); + } static hide() { $(MessageBox.jQueryModalId).modal("hide"); $(".modal-backdrop").hide(); @@ -1731,6 +1797,18 @@ MessageBox.jQueryModalButton2Id = "#site-modal-btn2"; MessageBox.modalId = MessageBox.jQueryModalId.substring(1); MessageBox.button1Id = MessageBox.jQueryModalButton1Id.substring(1); const messageBox = MessageBox; +const showConfirmationDialog = MessageBox.showConfirmationDialog; +const showConfirmationMessage = MessageBox.showConfirmationMessage; +class MessageToastHelper { + static showWhenDOMLoaded(name) { + document.addEventListener("DOMContentLoaded", () => this.show(name)); + } + static show(name) { + const toastElement = document.getElementById(name); + const toast = bootstrap.Toast.getOrCreateInstance(toastElement); + toast.show(); + } +} var ModalSize; (function (ModalSize) { ModalSize[ModalSize["Fullscreen"] = 0] = "Fullscreen"; @@ -1795,7 +1873,7 @@ class _Modal extends ModalBase { `; - let form = this.modalElement.closest("form"); + let form = getMasterDataForm(); if (form) { form.appendChild(this.modalElement); } @@ -2058,6 +2136,22 @@ class popup { defaultModal.hide(); } } +class OffcanvasHelper { + static showOffcanvas(id) { + const offcanvasElement = bootstrap.Offcanvas.getOrCreateInstance(document.getElementById(id)); + offcanvasElement.show(); + } + static populateOffcanvas(id, url) { + return __awaiter(this, void 0, void 0, function* () { + const offcanvasElement = bootstrap.Offcanvas.getOrCreateInstance(document.getElementById(id)); + const response = yield fetch(url); + const data = yield response.text(); + const offcanvasBody = document.getElementById(`${id}-body`); + offcanvasBody.innerHTML = data; + offcanvasElement.show(); + }); + } +} var PageState; (function (PageState) { PageState[PageState["List"] = 1] = "List"; diff --git a/src/Web/wwwroot/js/jjmasterdata/jjmasterdata.js.map b/src/Web/wwwroot/js/jjmasterdata/jjmasterdata.js.map index af7087d11..72ed7df40 100644 --- a/src/Web/wwwroot/js/jjmasterdata/jjmasterdata.js.map +++ b/src/Web/wwwroot/js/jjmasterdata/jjmasterdata.js.map @@ -1 +1 @@ -{"version":3,"file":"jjmasterdata.js","sourceRoot":"/Scripts/","sources":["ActionData.ts","ActionHelper.ts","AuditLogViewHelper.ts","CalendarListener.ts","CheckboxHelper.ts","CodeMirrorWrapper.ts","CollapsePanelListener.ts","DataDictionaryUtils.ts","DataExportationHelper.ts","DataImportationHelper.ts","DataImportationModal.ts","DataPanelHelper.ts","DecimalPlaces.ts","FeedbackIcon.ts","FormViewHelper.ts","GlobalVariables.ts","GridViewFilterHelper.ts","GridViewHelper.ts","GridViewSelectionHelper.ts","HTMLHelper.ts","Index.ts","JQueryPlugins.ts","ListenAllEvents.ts","LookupHelper.ts","LookupListener.ts","MasterDataForm.ts","MessageBox.ts","Modal.ts","PageState.ts","PostFormValues.ts","SearchBoxListener.ts","SliderListener.ts","SortableListener.ts","SpinnerOverlay.ts","TabNavListener.ts","TextAreaListener.ts","TextFileHelper.ts","TooltipHelper.ts","UploadAreaListener.ts","UploadAreaOptions.ts","UploadViewHelper.ts","UrlBuilder.ts","UrlRedirectModel.ts","Utils.ts","WindowPlugins.ts"],"names":[],"mappings":";;;;;;;;;AAAA,MAAM,UAAU;CAQf;ACRD,MAAM,YAAY;IACd,MAAM,CAAC,wBAAwB;QAC3B,YAAY,CAAC,OAAO,CAAC,0BAA0B,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC5E,cAAc,CAAC,IAAI,EAAE,CAAC;QACtB,iBAAiB,EAAE,CAAC,MAAM,EAAE,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AAEpE,SAAS,UAAU,CAAC,QAAQ;IACxB,IAAI,QAAQ,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QACpC,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;SAAM,CAAC;QACJ,QAAQ,EAAE,CAAC;IACf,CAAC;AACL,CAAC;AAED,MAAM,UAAU,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,UAAU,CAAC,OAAO,GAAG,aAAa,CAAC;AACnC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC"} \ No newline at end of file +{"version":3,"file":"jjmasterdata.js","sourceRoot":"/Scripts/","sources":["ActionData.ts","ActionHelper.ts","AuditLogViewHelper.ts","CalendarListener.ts","CheckboxHelper.ts","CodeMirrorWrapper.ts","CollapsePanelListener.ts","DataDictionaryUtils.ts","DataExportationHelper.ts","DataImportationHelper.ts","DataImportationModal.ts","DataPanelHelper.ts","DecimalPlaces.ts","FeedbackIcon.ts","FormViewHelper.ts","GlobalVariables.ts","GridViewFilterHelper.ts","GridViewHelper.ts","GridViewSelectionHelper.ts","HTMLHelper.ts","Index.ts","JQueryPlugins.ts","ListenAllEvents.ts","Localization.ts","LookupHelper.ts","LookupListener.ts","MasterDataForm.ts","MessageBox.ts","MessageToast.ts","Modal.ts","OffcanvasHelper.ts","PageState.ts","PostFormValues.ts","SearchBoxListener.ts","SliderListener.ts","SortableListener.ts","SpinnerOverlay.ts","TabNavListener.ts","TextAreaListener.ts","TextFileHelper.ts","TooltipHelper.ts","UploadAreaListener.ts","UploadAreaOptions.ts","UploadViewHelper.ts","UrlBuilder.ts","UrlRedirectModel.ts","Utils.ts","WindowPlugins.ts"],"names":[],"mappings":";;;;;;;;;AAAA,MAAM,UAAU;CAQf;ACRD,MAAM,YAAY;IACd,MAAM,CAAC,wBAAwB;QAC3B,YAAY,CAAC,OAAO,CAAC,0BAA0B,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CA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AAU,CAAC,OAAO,GAAG,aAAa,CAAC;AACnC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC"} \ No newline at end of file diff --git a/src/WebApi/Services/MasterApiService.cs b/src/WebApi/Services/MasterApiService.cs index b43aed756..da8010525 100644 --- a/src/WebApi/Services/MasterApiService.cs +++ b/src/WebApi/Services/MasterApiService.cs @@ -363,8 +363,8 @@ public async Task> PostTriggerAsync( { if (field.Component is FormComponent.ComboBox or FormComponent.Search) { - formValues.DataItems = await DataItemService - .GetValuesAsync(field.DataItem!, formData, null, null); + var dataQuery = new DataQuery(formData, dictionary.ConnectionId); + formValues.DataItems = await DataItemService.GetValuesAsync(field.DataItem!, dataQuery); } } diff --git a/src/WebApi/WebApi.csproj b/src/WebApi/WebApi.csproj index 36dc68c09..c38cdba3b 100644 --- a/src/WebApi/WebApi.csproj +++ b/src/WebApi/WebApi.csproj @@ -19,6 +19,7 @@ + diff --git a/test/Commons.Test/Data/DataAccessTest.cs b/test/Commons.Test/Data/DataAccessTest.cs index f1860ebb1..87793fa24 100644 --- a/test/Commons.Test/Data/DataAccessTest.cs +++ b/test/Commons.Test/Data/DataAccessTest.cs @@ -25,13 +25,13 @@ private void ConfigureSeedValues() [InlineData("Foo",false)] public async Task TableExistsTest(string table, bool exists) { - Assert.Equal(exists, await DataAccess.TableExistsAsync(table, default)); + Assert.Equal(exists, await DataAccess.TableExistsAsync(table)); } [Fact] public async Task GetDataTableTest() { - var dataTable = await DataAccess.GetDataTableAsync($"SELECT * FROM {TableName}", default); + var dataTable = await DataAccess.GetDataTableAsync($"SELECT * FROM {TableName}"); Assert.True(dataTable.Rows.Count > 0); } diff --git a/test/Core.Test/DataManager/Expressions/ExpressionsServiceTests.cs b/test/Core.Test/DataManager/Expressions/ExpressionsServiceTests.cs index 766d81355..1aa68b1b8 100644 --- a/test/Core.Test/DataManager/Expressions/ExpressionsServiceTests.cs +++ b/test/Core.Test/DataManager/Expressions/ExpressionsServiceTests.cs @@ -49,7 +49,14 @@ public ExpressionsServiceTests() public async Task GetDefaultValueAsync_ShouldReturnExpressionValue() { // Arrange - var field = new ElementField { DefaultValue = "example:sampleExpression" }; + var field = new FormElementFieldSelector(new FormElement + { + Name = "field", + Fields = + { + new FormElementField { TriggerExpression = "example:sampleExpression" } + } + }, "field"); var values = new Dictionary(); @@ -98,7 +105,14 @@ public bool GetBoolValue_ShouldReturnBooleanValue() public async Task GetTriggerValueAsync_ShouldReturnExpressionValue() { // Arrange - var field = new FormElementField { TriggerExpression = "example:sampleExpression" }; + var field = new FormElementFieldSelector(new FormElement + { + Name = "field", + Fields = + { + new FormElementField { TriggerExpression = "example:sampleExpression" } + } + }, "field"); var values = new Dictionary(); var formStateData = new FormStateData( new Dictionary(), diff --git a/test/Core.Test/DataManager/Services/FieldValidationServiceTests.cs b/test/Core.Test/DataManager/Services/FieldValidationServiceTests.cs index a4f9ac606..d93342149 100644 --- a/test/Core.Test/DataManager/Services/FieldValidationServiceTests.cs +++ b/test/Core.Test/DataManager/Services/FieldValidationServiceTests.cs @@ -64,7 +64,7 @@ public void ValidateField_RequiredFieldEmpty_ReturnsError() var value = ""; // Act - var result = service.ValidateField(field, fieldId, value, true); + var result = service.ValidateField(field, fieldId, value); // Assert Assert.Equal("Field is required", result);
\r\n'; - if (icontype == TMessageIcon.ERROR) { + if (iconType == TMessageIcon.ERROR) { html += ' \r\n'; html += - ' \r\n'; + ' \r\n'; html += " \r\n"; } - else if (icontype == TMessageIcon.WARNING) { + else if (iconType == TMessageIcon.WARNING) { html += ' \r\n'; html += - ' \r\n'; + ' \r\n'; html += " \r\n"; } - else if (icontype == TMessageIcon.INFO) { + else if (iconType == TMessageIcon.INFO) { html += ' \r\n'; html += - ' \r\n'; + ' \r\n'; html += " \r\n"; } - else if (icontype == TMessageIcon.QUESTION) { + else if (iconType == TMessageIcon.QUESTION) { html += ' \r\n'; html += - ' \r\n'; + ' \r\n'; html += " \r\n"; } html += "